:root {
    --orange: #ff6600;
}

*, *::before, *::after { box-sizing: border-box; }

img { max-width: 100%; }

body { 
    margin:0;
    font-family:"Source Sans 3",Arial,sans-serif;
    font-size:1.0625rem;
    line-height:1.65;
    color: #1c1f3a;
    background: #ffffff;
}
h1,h2,h3 { 
    font-family:"Bricolage Grotesque",Arial,sans-serif;
    line-height:1.15;
    color: #0f1496;
    margin:0 0 .6em;
}

a{color: #0f1496}
a:focus-visible,label:focus-visible{outline:3px solid var(--orange);outline-offset:3px}

/*---------------------------format images--------------------*/
/* CORRECTION : il y avait un « * » parasite devant ce commentaire,
   ce qui transformait « .logo1 » en « * .logo1 » */
.logo1 {
    display: block;
    width: 100%;
    padding-left: 10px;
}
.logo2 {
    width: 100%;
}
.image-dimension {
    width: 350px;
    max-width: 100%;
    height: 500px;
    object-fit: cover; /* Pour s'assurer que l'image garde son aspect */
}
.img_carte {
    width: 80%;
    height: auto;
}

.header-image {
    position: relative;
    display: block;
    width: 100%;
}

.header-image img {
    display: block;
    width: 100%;
    height: auto;
}

.header-text {
    position: absolute;
    top: 85%;          /* position verticale */
    left: 91%;         /* position horizontale */
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px black; /* lisibilité */
}

.header-text a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
}

.header-text a:hover {
    text-decoration: underline;
}

/*----------------------------menu---------------------*/
#menu {
    display: flex; 
    justify-content: center;
    background-color: aqua; 
    padding: 10px 0;
}
 
#menu > ul {
    display: flex; 
    gap: 400px;
    padding: 0; 
    margin: 0; 
    list-style: none; 
}

#menu ul li {
    position: relative; /* nécessaire pour le sous-menu */
}

ul li a {
    text-decoration: none;
    color: #0f1496;
    font-family: Arial, sans-serif;
    font-size: 1.2em;
    transition: color 0.3s ease;
}

ul li a:hover {
    color: #ff6600; /* Couleur au survol */
}

/* --- Sous-menu --- */
.submenu-title {
    color: #0f1496;
    font-family: Arial, sans-serif;
    font-size: 1.5em;
    cursor: pointer;
}

.submenu input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    appearance: none;
}

.submenu .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    background: aqua;
    padding: 10px 0;
    list-style: none;
    border: 1px solid #0f1496;
    min-width: 160px;
    flex-direction: column;
}

.submenu .dropdown li {
    padding: 5px 15px;
}

.submenu .dropdown li a {
    font-size: 1em;
}

/* Affichage au survol (souris) */
.submenu:hover .dropdown {
    display: block;
}

/* Affichage au clic / au toucher (tablettes, smartphones) */
.submenu input[type="checkbox"]:checked + .dropdown {
    display: block;
}

/* --- Bouton hamburger (visible uniquement sur smartphone) --- */
#toggle-menu {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.burger {
    display: none;
}

/*---------------------------Corps de la page------------------------*/
#main {
    display: flex;
    flex-direction: column;   /* .deux-col et .viva l'un sous l'autre */
    gap: 30px;
    margin-top: 20px;
}

.deux-col, .vfl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    margin: 0 auto;
}

/* évite qu'un contenu large fasse déborder la grille */
.deux-col > div, .vfl > div {
    min-width: 0;
}

.deux-col p,.deux-col li {
    max-width:62ch;
}
.vfl {
    background: #0a0e63;
    padding: 20px 100px;
    margin: 0 80px;
}

.vfl h2, .vfl p {
    color:white;
    max-width:62ch;
}

.btn {
    display:inline-block;
    align-self:flex-start; 
    background: #ff6600;
    color:#fff;
    text-decoration:none;
    font-weight:700;
    padding:.8rem 1.4rem;
    border-radius:4px;
}
.btn:hover {
    background:#e55a00;
}

.chiffres {
    display:flex;
    gap:2.5rem;
    margin:1.5rem 0 0;
    padding:0;
    list-style:none;
}
.chiffres b {
    display:block;
    font-family:"Bricolage Grotesque",Arial,sans-serif;
    font-size:2.4rem;
    color:#ff6600;
    line-height:1;
}
.membre ul {
    padding-left:1.2rem;
}
.membre li {
    margin:.4rem 0;
}

#carte {
    text-align: center;
    margin-top: 30px;
    padding: 0 10px;
}

/*-----------------------------------------------------------------*/

@media screen and (min-width: 768px) {
     
   .header-text {
        font-size: 12px;
   }

    #menu > ul {
         gap: 50px;
    }

    .submenu-title {
        font-size: 20px;
    }

}

/* ---------- Écrans moyens : le menu peut passer sur 2 lignes ---------- */
@media screen and (max-width: 1100px) {

    #menu > ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 30px;
    }

    .deux-col, .vfl {
        gap: 50px;
    }

    .deux-col {
        padding: 0 30px;
    }

    .vfl {
        padding: 20px 50px;
        margin: 0 30px;
    }
}

/* ---------- Tablette portrait / smartphone : une seule colonne ---------- */
@media screen and (max-width: 900px) {

    .deux-col, .vfl {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .deux-col {
        padding: 0 20px;
    }

    .vfl {
        padding: 20px;
        margin: 0 20px;
    }

    .deux-col p, .deux-col li,
    .vfl h2, .vfl p {
        max-width: none;
    }
}

/* ---------- Smartphone ---------- */
@media screen and (max-width: 800px) {
   body {
        margin: 0;
        padding: 0;
        font-size: 1rem;
   } 

   html, body {
        position: relative;
        overflow-x: hidden;
   } 
   
   .header-text a { 
        display: none;
    }

    h2 { font-size: 1.4rem; }

    /* ===== Menu smartphone : barre « MENU » + panneau déroulant ===== */
    #menu {
        display: block;
        width: 70%;
        margin: 0 auto;
        padding: 0;
        background: aqua;
        box-shadow: 0 4px 12px rgba(15, 20, 150, .25);
    }

    /* Bouton hamburger */
    .burger {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 14px;
        min-height: 42px;
        padding: 6px 20px;
        color: #0a0e63;
        font-family: "Bricolage Grotesque", Arial, sans-serif;
        font-size: 1.15rem;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .burger::before {
        content: "Menu";
    }
    .burger span,
    .burger span::before,
    .burger span::after {
        display: block;
        width: 26px;
        height: 3px;
        border-radius: 2px;
        background: #0a0e63;
        transition: transform .3s ease, top .3s ease, background .3s ease;
    }
    .burger span {
        position: relative;
    }
    .burger span::before,
    .burger span::after {
        content: "";
        position: absolute;
        left: 0;
    }
    .burger span::before { top: -8px; }
    .burger span::after  { top: 8px; }

    /* Panneau déroulant */
    #menu > ul {
        display: block;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        margin: 0;
        padding: 0;
        text-align: left;
        background: #0b1073;
        transition: max-height .35s ease;
    }
    #toggle-menu:checked ~ ul {
        max-height: 85vh;
        overflow-y: auto;
    }

    #menu > ul > li {
        border-top: 1px solid rgba(255, 255, 255, .12);
    }

    /* Liens et titres de sous-menus : grandes zones tactiles */
    #menu a,
    #menu .submenu-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 52px;
        padding: 14px 20px;
        color: #fff;
        font-family: Arial, sans-serif;
        font-size: 1.05rem;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    #menu a:hover,
    #menu a:active {
        color: #fff;
        background: rgba(255, 255, 255, .12);
    }

    /* Petites flèches */
    #menu > ul > li > a::after {
        content: "›";
        font-size: 2.2rem;
        line-height: 1;
        opacity: .9;
    }
     #menu .submenu-title::after {
        content: "";
        width: 14px;
        height: 14px;
        margin: -8px 8px 0 0;
        border-right: 3px solid #fff;
        border-bottom: 3px solid #fff;
        transform: rotate(45deg);
        opacity: .9;
        flex-shrink: 0;
        transition: transform .3s ease, margin .3s ease;
    }
    .submenu:has(input:checked) .submenu-title::after {
        margin-top: 4px;
        transform: rotate(225deg);
    }

    /* Désactiver le hover sur mobile */
    .submenu:hover .dropdown {
        display: none;
    }

    /* Sous-menus : accordéon */
    .submenu .dropdown {
        display: none;
        position: static;
        min-width: 0;
        margin-left: 30px;
        padding: 0;
        border: none;
        background: rgba(0, 0, 0, .2);
    }
    .submenu input[type="checkbox"]:checked + .dropdown {
        display: block;
    }
    .submenu .dropdown li {
        padding: 0;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }
    .submenu .dropdown li a {
        padding: 13px 16px;
        font-size: .98rem;
        color: rgba(255, 255, 255, .9);
    }

    /* Images */
    .logo1 {
        width: 85%;
        max-width: 400px;
        margin: 8px auto;
        padding-left: 0;
    }

    .image-dimension {
        width: 100%;
        height: auto;
    }

    .img_carte {
        width: 100%;
    }

    /* Corps */
    #main {
        gap: 20px;
    }

    .chiffres {
        gap: 1.5rem;
    }

    .chiffres b {
        font-size: 2rem;
    }

    .btn {
        display: block;
        text-align: center;
        padding: .9rem 1rem;
    }

    .vfl img {
        max-width: 60%;
    }

    #carte h3 {
        font-size: 1.05rem;
        line-height: 1.35;
    }
}
