/* 🌱 Base mobile-first */
nav {
    display: block;
    background: linear-gradient(to bottom, var(--background1)0%, var(--background1)70%, transparent 100% );
    position: sticky;
    top:0px;
    z-index: 9999;
    height: 46px;
}

nav.active {
    display: flex;
    align-items: center;
    height: 100vh;
}

/* Bouton hamburger */
#mobile-nav-button {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
    position: relative;
    top: 10px;
    left: 10px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

#mobile-nav-button span {
    display: block;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

nav.active #mobile-nav-button{
    position: absolute;
    left: auto;
    right: 10px;
}

/* Menu caché par défaut */
nav ul {
    display: grid;
    grid-template-columns: 4fr;
    grid-template-rows: repeat(6, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    width: 100%;
}

nav ul li {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

nav ul li a {
    display: none;
    width: 100%;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* 📲 Menu ouvert */

nav.active ul {
    top: 0;
}

nav.active ul li{
    display: block;
}

nav.active #mobile-nav-button span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 6px);
}

nav.active #mobile-nav-button span:nth-child(2) {
    opacity: 0;
}

nav.active #mobile-nav-button span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

nav.active ul li a {
    display: block;
    width: 100%;
    margin: 24px 0;
    text-align: center;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
}

/* Animation des liens au menu ouvert */
nav.active ul li {
    opacity: 1;
}

/* Délai pour apparition séquencée */
nav.active ul li:nth-child(1) { transition-delay: 0.3s; }
nav.active ul li:nth-child(2) { transition-delay: 0.4s; }
nav.active ul li:nth-child(3) { transition-delay: 0.5s; }
nav.active ul li:nth-child(4) { transition-delay: 0.6s; }
nav.active ul li:nth-child(5) { transition-delay: 0.7s; }
nav.active ul li:nth-child(6) { transition-delay: 0.8s; }

/* 📲 Tablettes (768px et plus) */
@media (min-width: 768px) {


}

/* 💻 Ordinateurs portables (1025px et plus) */
@media (min-width: 1025px) {


    #mobile-nav-button {
        display: none;
    }

    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: var(--nav-height);
    }

    nav ul {
        display: grid;
        grid-template-columns: 4fr repeat(5, 1fr);
        grid-template-rows: 1fr;
        grid-column-gap: 0px;
        grid-row-gap: 0px;
    }

    nav ul li {
        display: flex;
        opacity: 1;
        transform: none;
        transition: none;
    }

    nav ul li a{
        display: block;
        width: 100%;
        padding: 10px 0;
        text-align: center;
        color: white;
        text-decoration: none;
        font-size: 1.2rem;
    }

}

/* 🖥 Grands écrans (1367px et plus) */
@media (min-width: 1367px) {

}

/* 🖥📺 Ultra-large (1920px et plus) — optionnel */
@media (min-width: 1920px) {

}
