/* Styles de base du menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    margin-left: auto;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-base);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Animation du bouton hamburger */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Styles du menu en mode mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: hsl(var(--hue-base) 50% 87%);
        padding: 5rem 1.5rem 2rem;
        margin: 0;
        transition: right 0.3s ease-in-out;
        box-shadow: -2px 0 10px hsl(var(--hue-base) 50% 15% / 0.2);
        z-index: 1000;
    }
    
    nav.active {
        right: 0;
    }

    #index {
        flex-direction: column;
        align-items: stretch;
        height: 100%;
    }

    #index.active {
        right: 0;
    }

    #index li {
        margin: 0.5rem 0;
    }

    #index a {
        padding: 0.8rem 1rem;
        border-radius: 4px;
    }

    body.menu-open {
        overflow: hidden;
    }
}
