/* ===== MOBILE NAVBAR - MODERNE ET SIMPLE ===== */

/* Reset pour la navbar mobile */
.mobile-navbar * {
    box-sizing: border-box;
}

/* Header mobile principal */
.mobile-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.mobile-navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Contenu du header */
.mobile-navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    max-width: 100%;
}

/* Logo */
.mobile-navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 1.125rem;
}

.mobile-navbar-logo img {
    height: 2rem;
    width: 2rem;
    border-radius: 6px;
}

.mobile-navbar-logo-text {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Bouton menu hamburger */
.mobile-navbar-menu-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1001;
    color: #374151;
}

.mobile-navbar-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-navbar-menu-btn:active {
    transform: scale(0.95);
}

.mobile-navbar-menu-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Icône hamburger */
.mobile-navbar-menu-icon {
    width: 24px;
    height: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-navbar-menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-navbar-menu-icon span:nth-child(1) { top: 6px; }
.mobile-navbar-menu-icon span:nth-child(2) { top: 12px; }
.mobile-navbar-menu-icon span:nth-child(3) { top: 18px; }

/* Animation du bouton actif */
.mobile-navbar-menu-btn.active .mobile-navbar-menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-navbar-menu-btn.active .mobile-navbar-menu-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-navbar-menu-btn.active .mobile-navbar-menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Overlay du menu */
.mobile-navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-navbar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Panneau du menu */
.mobile-navbar-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 300px;
    height: 100vh;
    background: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-navbar-overlay.active .mobile-navbar-panel {
    transform: translateX(0);
}

/* Header du menu */
.mobile-navbar-menu-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-navbar-menu-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.mobile-navbar-menu-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-navbar-menu-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

.mobile-navbar-menu-close:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Navigation du menu */
.mobile-navbar-menu-nav {
    padding: 1rem 0;
}

.mobile-navbar-menu-item {
    display: block;
    padding: 1rem 1.5rem;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-navbar-menu-item:hover {
    background: #f9fafb;
    color: #3b82f6;
}

.mobile-navbar-menu-item:active {
    background: #f3f4f6;
    transform: scale(0.98);
}

.mobile-navbar-menu-item:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* Items avec icônes */
.mobile-navbar-menu-icon-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-navbar-menu-icon-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: #6b7280;
}

.mobile-navbar-menu-item:hover .mobile-navbar-menu-icon-item i {
    color: #3b82f6;
}

/* Séparateurs */
.mobile-navbar-menu-separator {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* Boutons d'action */
.mobile-navbar-menu-action {
    margin: 1rem 1.5rem;
}

.mobile-navbar-menu-btn-primary {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.mobile-navbar-menu-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
}

.mobile-navbar-menu-btn-primary:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 320px) {
    .mobile-navbar-panel {
        width: 100%;
        max-width: none;
    }
    
    .mobile-navbar-content {
        padding: 0.5rem 0.75rem;
    }
    
    .mobile-navbar-logo img {
        height: 1.75rem;
        width: 1.75rem;
    }
    
    .mobile-navbar-logo-text {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .mobile-navbar-panel {
        max-width: 350px;
    }
}

/* Animations réduites pour l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    .mobile-navbar *,
    .mobile-navbar-overlay,
    .mobile-navbar-panel {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .mobile-navbar {
        background: rgba(17, 24, 39, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .mobile-navbar.scrolled {
        background: rgba(17, 24, 39, 0.98);
    }
    
    .mobile-navbar-menu-btn {
        color: #f9fafb;
    }
    
    .mobile-navbar-menu-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .mobile-navbar-panel {
        background: #1f2937;
    }
    
    .mobile-navbar-menu-header {
        background: #374151;
        border-bottom-color: #4b5563;
    }
    
    .mobile-navbar-menu-title {
        color: #f9fafb;
    }
    
    .mobile-navbar-menu-close {
        color: #9ca3af;
    }
    
    .mobile-navbar-menu-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f9fafb;
    }
    
    .mobile-navbar-menu-item {
        color: #f9fafb;
        border-bottom-color: #374151;
    }
    
    .mobile-navbar-menu-item:hover {
        background: #374151;
        color: #60a5fa;
    }
    
    .mobile-navbar-menu-item:active {
        background: #4b5563;
    }
    
    .mobile-navbar-menu-icon-item i {
        color: #9ca3af;
    }
    
    .mobile-navbar-menu-item:hover .mobile-navbar-menu-icon-item i {
        color: #60a5fa;
    }
    
    .mobile-navbar-menu-separator {
        background: #4b5563;
    }
}
