/* ===== MENU HAMBURGER MOBILE ===== */

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Icône hamburger avec des barres */
.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-bar {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animation de l'icône hamburger vers X */
.hamburger.active .hamburger-bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active .hamburger-bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation mobile améliorée */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    /* MASQUER LE MESSAGE DE SALUTATION SUR MOBILE */
    #userGreeting {
        display: none !important;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        gap: 1rem;
        z-index: 999;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        width: 100%;
        max-width: 300px;
    }
    
    .nav-links a {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        border-radius: 12px;
        margin: 0.2rem 0;
        display: block;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }
    
    .nav-links a:hover {
        background: rgba(102, 126, 234, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }
    
    /* Animation décalée pour chaque lien */
    .nav-links.active a:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active a:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active a:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active a:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active a:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.active a:nth-child(6) { transition-delay: 0.35s; }
    .nav-links.active a:nth-child(7) { transition-delay: 0.4s; }
    
    .user-section {
        gap: 0.5rem;
        justify-content: flex-end;
    }
    
    .login-input {
        width: 90px;
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Ajuster l'espacement pour compenser l'absence du message */
    .nav-container {
        gap: 0.5rem;
    }

    /* Overlay pour fermer le menu en cliquant à côté */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}