/* ==========================================================================
   SÉCURITÉ : styles propres à la page
   ========================================================================== */

/* ---------- Les règles 1 à 3 : texte + visuel, en zigzag sur desktop ---------- */
.regles {
    display: flex;
    flex-direction: column;
    gap: clamp(var(--esp-3), 6vw, var(--esp-section));
}

/* Mobile : chaque règle est une carte, l'image en bandeau au-dessus du texte */
.regle {
    display: grid;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--color-gray-ligne);
    border-radius: var(--br-large);
    background-color: var(--color-gray-placeholder);
}

.regle .regle__visuel {
    order: -1;
    aspect-ratio: 16 / 7;
    border-radius: 0;
}

.regle__texte {
    padding: var(--esp-3) var(--esp-2);
}

/* Desktop : plus de carte, texte et image côte à côte en zigzag */
@media (min-width: 860px) {
    .regle {
        grid-template-columns: 1fr 1fr;
        gap: var(--esp-6);
        overflow: visible;
        border: 0;
        background: none;
    }

    .regle .regle__visuel {
        order: 0;
        aspect-ratio: 4 / 3;
        border-radius: var(--br-large);
    }

    .regle__texte {
        padding: 0;
    }

    /* Une règle sur deux : le visuel passe à gauche */
    .regle--inverse .regle__visuel {
        order: -1;
    }
}

.regle__numero {
    display: block;
    margin-bottom: var(--esp-1);
    color: var(--color-blue-light);
    font-size: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
}

.regle__texte h2 {
    margin-bottom: var(--esp-2);
}

@media (max-width: 859px) {
    .regle__numero {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .regle__points {
        gap: var(--esp-1);
        font-size: 0.9375rem;
    }
}

.regle__points {
    display: grid;
    gap: var(--esp-2);
    padding-left: 1.25rem;
}

.regle__points li::marker {
    color: var(--color-blue-light);
}

.regle__points strong {
    color: var(--color-white);
}

/* Tous les visuels ont la même hauteur : plus de blocs bancals */
.regle__visuel {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--br-large);
}

.regle__visuel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image détourée (fond transparent) : on la pose sur un fond, sans la recadrer */
.regle__visuel--detoure {
    display: grid;
    place-items: center;
    padding: var(--esp-3);
    background: radial-gradient(circle at 50% 60%, #2a3442 0%, var(--color-gray-placeholder) 70%);
    border: 1px solid var(--color-gray-ligne);
}

.regle__visuel--detoure img {
    width: auto;
    height: 100%;
    object-fit: contain;
}

/* ---------- Règle 4 : grille de petites règles ---------- */
.conduite {
    display: grid;
    gap: var(--esp-2);
    padding: 0;
    list-style: none;
}

@media (min-width: 600px) {
    .conduite {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .conduite {
        grid-template-columns: repeat(3, 1fr);
    }
}

.conduite__item {
    display: flex;
    gap: var(--esp-2);
    padding: var(--esp-2);
    border: 1px solid var(--color-gray-ligne);
    border-radius: var(--br-large);
    background-color: var(--color-gray-sombre);
}

.conduite__icone {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: var(--br-round);
    background-color: var(--color-gray-placeholder);
    font-size: 1.5rem;
}

.conduite__item h3 {
    margin-bottom: 0.25rem;
    font-size: 1.0625rem;
}

.conduite__item p {
    font-size: var(--fs-petit);
}

/* ---------- Appel final ---------- */
.appel-securite {
    display: grid;
    gap: var(--esp-4);
    align-items: center;
    justify-items: center;
    text-align: center;
}

.appel-securite img {
    width: 120px;
}

.appel-securite p {
    margin-block: var(--esp-2) var(--esp-4);
}

@media (min-width: 768px) {
    .appel-securite {
        grid-template-columns: auto 1fr;
        justify-items: start;
        text-align: left;
    }

    .appel-securite img {
        width: 240px;
    }
}
