body {
    margin: 0;
}

/* ======== NAVIGATION PRINCIPALE ======== */
.Accueil_Nav {
    grid-area: nav;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    background: linear-gradient(to right, #7baad1, #5784ae);
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    position: relative;
}

.Accueil_Nav>.menu {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.Accueil_Nav>.menu>li {
    min-width: 125px;
    width: 16vw;
    max-width: 325px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.Accueil_Nav>.menu>li>a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Ysabeau Infant', sans-serif;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: clamp(14px, 1.4vw, 36px);
    transition: background-color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
}

.Accueil_Nav>.menu>li>a:hover,
.Accueil_Nav>.menu>li>ul>li>a:hover {
    background-color: #ffffff10;
    border-bottom: 2px solid white;
}

/* ======== MENU BURGER ======== */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(to right, #7baad1, #5784ae);
    border-radius: 12px;
    border: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 102;
    cursor: pointer;
    gap: 6px;
}

/* ======== BARRES DU BOUTON ======== */
.burger-bar {
    display: block;
    width: 24px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

.burger.open .burger-bar {
    width: 30px;
    /* rallonge les barres uniquement en mode ouvert */
}

.burger.open .burger-bar:nth-child(1) {
    transform: rotate(45deg) translate(7.5px, 7.5px);
}

.burger.open .burger-bar:nth-child(2) {
    opacity: 0;
}

.burger.open .burger-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ======== LABEL "Le Club" AVEC FLÈCHE ======== */
.menu-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Ysabeau Infant', sans-serif;
    padding: 18px 24px;
    color: white;
    font-weight: bold;
    font-size: clamp(14px, 1.5vw, 36px);
    cursor: default;
    user-select: none;
    transition: background-color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
}

.menu-label .chevron {
    margin-left: 0.4em;
    font-size: 0.8em;
    display: inline-block;
    transition: transform 0.3s ease;
}

.has-submenu:hover .menu-label {
    background-color: #ffffff10;
    border-bottom: 2px solid white;
}

.has-submenu:hover .chevron {
    transform: rotate(90deg);
}

/* ======== SOUS-MENU ======== */
.Accueil_Nav .menu li>ul {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    background-color: rgba(123, 170, 209, 0.85);
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    z-index: 100;
}

.Accueil_Nav .menu li:hover>ul {
    display: block;
}

.Accueil_Nav .menu li>ul>li {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.Accueil_Nav .menu li>ul>li>a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Ysabeau Infant', sans-serif;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: clamp(14px, 1.3vw, 36px);
    transition: background-color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
    width: 100%;
    padding: 10px 15px;
    text-align: center;
}

.Accueil_Nav .menu li ul li a:hover {
    background-color: #ffffff10;
    border-bottom: 2px solid white;
}

/* ======== RESPONSIVE - BURGER SLIDE-IN MENU ======== */
@media (max-width: 800px) {
    .burger {
        display: flex;
        background: linear-gradient(to right, #75bffd, #0586ff);
    }

    .Accueil_Nav {
        position: relative;
    }

    .Accueil_Nav>.menu {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 50%;
        background: rgba(87, 132, 174, 0.97);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 20px 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 101;
        display: flex;
    }

    .Accueil_Nav>.menu.open {
        transform: translateX(0);
    }

    .Accueil_Nav .menu li {
        width: 100%;
        margin: 10px 0;
    }

    .Accueil_Nav .menu li a,
    .menu-label {
        width: 100%;
        text-align: left;
        padding: 12px;
        font-size: 1.2rem;
    }

    .Accueil_Nav .menu li ul {
        position: static;
    }

    .has-submenu:hover .chevron {
        transform: none;
    }

    /* Empêche le hover de s’appliquer sur mobile */
    .Accueil_Nav .menu li:hover>ul {
        display: none;
    }

    /* Sous-menu à droite */
    .Accueil_Nav .menu li.has-submenu>ul {
        display: none;
        position: fixed;
        top: 0;
        left: 99%;
        width: 50%;
        height: 100vh;
        background-color: rgba(123, 170, 209, 0.95);
        padding: 80px 20px 20px;
        flex-direction: column;
        z-index: 101;
    }


    /* Affiché dynamiquement en JS */
    .Accueil_Nav .menu li.has-submenu.active>ul {
        display: flex;
    }

    /* Chevron rotation */
    .menu-label .chevron {
        transition: transform 0.3s ease;
    }

    .menu-label.rotate .chevron {
        transform: rotate(90deg);
        /* vers le bas */
    }

}