/* Menu mobile direct - Solution indépendante */

/* Style par défaut - menu caché */
#mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: #2c2c2c;
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    padding-top: 60px;
}

/* Menu ouvert */
#mobile-nav.open {
    right: 0;
}

/* Liens dans le menu */
#mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mobile-nav li {
    border-bottom: 1px solid #3a3a3a;
}

#mobile-nav a {
    display: block;
    color: #ffffff;
    padding: 15px 20px;
    text-decoration: none;
    font-size: 18px;
    transition: background 0.3s;
}

#mobile-nav a:hover,
#mobile-nav a.active {
    background-color: #444;
}

#mobile-nav a.btn-login {
    background-color: #ffa407;
    color: white;
    margin: 20px;
    text-align: center;
    border-radius: 4px;
}

/* Icône hamburger */
#hamburger-icon {
    display: none; /* masqué par défaut sur desktop */
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 10000;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s;
}

#hamburger-icon span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #ffa407;
    margin: 6px 0;
    transition: all 0.3s;
    border-radius: 3px;
}

/* Animation du hamburger quand le menu est ouvert */
#hamburger-icon.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

#hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

#hamburger-icon.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Overlay quand le menu est ouvert */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
}

#overlay.open {
    display: block;
}

/* Réglages responsive */
@media screen and (max-width: 768px) {
    #hamburger-icon {
        display: block;
    }
    
    /* Masquer le menu normal */
    header nav {
        display: none;
    }
}
