/* === NAVIGATION FIXE === */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: #d8b47e;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
}

nav .main_pages {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 60%;
    max-width: 2500px;
}

nav .main_pages a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: white !important;
    font-family: Arial, sans-serif;
    font-size: 1.1rem;
    padding: 0 25px;
    height: 100px;
    background: #d8b47e;
    position: relative;  
    overflow: hidden;
    transition: background 0.3s;
}

nav .main_pages a:hover,
nav .main_pages a:focus,
nav .main_pages a.active-shine {
    background: #ff8800;
}

nav .main_pages a::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    pointer-events: none;
}

nav .main_pages a:hover::after,
nav .main_pages a:focus::after,
nav .main_pages a.active-shine::after {
    animation: shine 0.8s forwards;
}

@keyframes shine {
    0% { left: -75%; }
    100% { left: 125%; }
}

/* Hamburger menu */
.menu-toggle, #toggle { display: none; }
.menu-toggle::before {
    content: "☰";
    font-size: 40px;
    color: white;
    cursor: pointer;
}
#toggle:checked + .menu-toggle::before { content: "✖"; }

/* Hamburger menu et menu mobile */
@media (max-width: 2500px) {
    /* Afficher le hamburger */
    .menu-toggle { 
        display: flex;
        align-items: center;
        cursor: pointer;
        z-index: 10000;
    }

    /* Menu transformé en colonne et caché */
    nav .main_pages {
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;          /* <-- largeur complète */
        background: #48435C;  /* couleur gris */
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.4s ease-in-out;
        z-index: 9999;
    }

    /* Quand on coche le checkbox, le menu s’ouvre */
    #toggle:checked + .menu-toggle + .main_pages {
        max-height: 500px; /* ajuster selon le nombre de liens */
    }

    /* Chaque lien prend toute la largeur */
    nav .main_pages a {
        width: 100%;          /* <-- lien full width */
        height: 50px;
        padding-left: 20px;
        box-sizing: border-box;
        background: #48435C;
        border-radius: 0;
        justify-content: flex-start; /* aligner le texte à gauche */
    }
}
