/**
 * PROFESSIONAL HEADER STYLES
 * Modern, Fluid, Intelligent Design
 */

/* ============================================
   HEADER FOUNDATION
   ============================================ */

.pro-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible !important; /* IMPORTANT : Ne pas couper les dropdowns */
}

.pro-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 2rem;
    overflow: visible !important; /* IMPORTANT : Ne pas couper les dropdowns */
}

/* Espace pour le header fixe */
body {
    padding-top: 72px !important;
}

/* ============================================
   LOGO SECTION
   ============================================ */

.logo-section {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: translateY(-1px);
}

.logo-badge {
    width: 44px;
    height: 44px;
    position: relative;
}

.logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.2));
    transition: filter 0.3s ease;
}

.logo-link:hover .logo-svg {
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.3));
}

.brand-identity {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* ============================================
   MAIN NAVIGATION
   ============================================ */

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 10px;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: calc(100% - 2rem);
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.nav-link.active::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.nav-label {
    white-space: nowrap;
}

/* ============================================
   HEADER ACTIONS
   ============================================ */

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    overflow: visible !important; /* IMPORTANT : Ne pas couper les dropdowns */
}

/* Search Widget */
.search-widget {
    position: relative;
}

.search-trigger {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: rgba(100, 116, 139, 0.08);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-trigger:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.search-icon {
    width: 20px;
    height: 20px;
}

.search-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 380px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    background: white;
    border-color: #667eea;
}

.search-box-icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: #1e293b;
    outline: none;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.search-close svg {
    width: 16px;
    height: 16px;
}

.search-results {
    margin-top: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: none;
    background: rgba(100, 116, 139, 0.08);
    color: #64748b;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-trigger:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.lang-icon {
    width: 18px;
    height: 18px;
}

.lang-code {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.lang-menu {
    min-width: 180px;
    margin-top: 0.5rem !important;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    inset: auto !important;
    transform: translate(0, 0) !important;
}

.lang-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.15s ease;
}

.lang-menu .dropdown-item:hover {
    background: #f8fafc;
    color: #667eea;
}

.lang-menu .dropdown-item.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: 600;
}

.lang-menu img {
    width: 20px;
    height: auto;
    border-radius: 3px;
}

/* Notification Bell */
.notification-bell {
    position: relative;
}

.bell-trigger {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: rgba(100, 116, 139, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bell-trigger:hover {
    background: rgba(102, 126, 234, 0.1);
}

.bell-icon {
    width: 20px;
    height: 20px;
    color: #64748b;
    transition: all 0.2s ease;
}

.bell-trigger:hover .bell-icon {
    color: #667eea;
    animation: bellShake 0.5s ease;
}

@keyframes bellShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-dropdown {
    min-width: 360px;
    max-height: none !important;
    overflow-y: visible !important;
    overflow: visible !important;
    margin-top: 0.5rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
}

.notification-dropdown .dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.notification-item {
    display: flex;
    align-items: start;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.08);
}

.notification-item.unread:hover {
    background: rgba(102, 126, 234, 0.12);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-message {
    font-size: 0.875rem;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    /* stylelint-disable-next-line property-no-unknown */
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
}

.notif-dot {
    position: absolute;
    top: 16px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f5576c;
}

.notification-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.notification-empty p {
    margin: 0;
    font-size: 0.875rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    border-radius: 12px;
    border: none;
    background: rgba(100, 116, 139, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-trigger:hover {
    background: rgba(102, 126, 234, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.user-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1e293b;
}

/* Cacher les chevrons Bootstrap par défaut */
.dropdown-toggle::after {
    display: none !important;
}

.user-chevron {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

/* ============================================
   DROPDOWN SYSTEM
   ============================================ */

.dropdown-custom {
    position: relative;
    display: inline-block;
}

.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    display: none;
    min-width: 200px;
    padding: 0.5rem 0;
    margin: 0.5rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.dropdown-menu-custom.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.dropdown-item-custom {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: all 0.2s ease;
}

.dropdown-item-custom:hover,
.dropdown-item-custom:focus {
    color: #667eea;
    background-color: #f8f9fa;
}

.dropdown-item-custom.active {
    color: #fff;
    background-color: #667eea;
}

.dropdown-item-custom i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

.dropdown-header-custom {
    display: block;
    padding: 0.75rem 1.5rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}

.dropdown-divider-custom {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #e9ecef;
}

.chevron-icon {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.dropdown-custom.show .chevron-icon {
    transform: rotate(180deg);
}

.user-dropdown {
    min-width: 280px;
}

.guest-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guest-trigger:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.guest-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.guest-label {
    font-weight: 500;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.dropdown-user-info img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.dropdown-user-name {
    font-weight: 600;
    color: #212529;
}

.dropdown-user-email {
    font-size: 0.875rem;
    color: #6c757d;
}

.notification-dropdown {
    min-width: 320px;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem !important;
    position: relative;
}

.notification-item.unread {
    background-color: #f0f4ff;
}

.notification-item .notif-icon {
    font-size: 1.5rem;
    color: #667eea;
}

.notification-item .notif-content {
    flex: 1;
}

.notification-item .notif-message {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: #212529;
}

.notification-item .notif-time {
    font-size: 0.75rem;
    color: #6c757d;
}

.notification-item .notif-dot {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
}

/* Styles pour les dropdowns Bootstrap */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    left: auto;
}

.dropdown-menu.show {
    display: block;
}

/* S'assurer que les dropdowns sont au-dessus */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    z-index: 1050;
    max-width: 90vw;
    right: 0;
    left: auto;
    transform: none !important;
    will-change: transform;
}

/* Empêcher le débordement des dropdowns */
@media (max-width: 768px) {
    /* FORCER l'affichage complet des dropdowns - TOUT DOIT ÊTRE VISIBLE */
    .dropdown-menu,
    .dropdown-menu.show,
    .lang-menu,
    .lang-menu.show,
    .notification-dropdown,
    .notification-dropdown.show,
    .user-dropdown,
    .user-dropdown.show {
        position: fixed !important;
        right: 1rem !important;
        left: 1rem !important;
        width: calc(100vw - 2rem) !important;
        max-width: calc(100vw - 2rem) !important;
        min-width: auto !important;
        
        /* AUCUNE LIMITE DE HAUTEUR */
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
        
        /* AUCUN SCROLL */
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        
        /* Styling */
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
        padding: 1rem !important;
        margin-top: 0.5rem !important;
        z-index: 10050 !important;
    }
    
    .dropdown-menu {
        display: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    
    .dropdown-menu.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* Items plus grands */
    .dropdown-item,
    .mobile-nav-item,
    .lang-menu .dropdown-item,
    .notification-item,
    .user-dropdown .dropdown-item {
        padding: 1rem 1.25rem !important;
        font-size: 1rem !important;
        min-height: 56px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Forcer les limites du header pour éviter le débordement */
    body {
        overflow-x: hidden !important;
    }
    
    .pro-header {
        max-width: 100vw !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .header-container {
        max-width: 100% !important;
        overflow-x: visible !important;
    }
    
    .header-actions {
        flex-shrink: 0;
        min-width: 0;
    }
}

.user-trigger[aria-expanded="true"] .user-chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    min-width: 280px;
    max-height: none !important;
    overflow-y: visible !important;
    overflow: visible !important;
    margin-top: 0.5rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
}

.dropdown-header {
    padding: 0;
    margin-bottom: 0.5rem;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.dropdown-user-info img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dropdown-user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    margin-bottom: 2px;
}

.dropdown-user-email {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.15s ease;
}

.user-dropdown .dropdown-item:hover {
    background: #f8fafc;
    color: #667eea;
}

.user-dropdown .dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.user-dropdown .dropdown-divider {
    margin: 0.5rem 0;
    border-color: rgba(0, 0, 0, 0.06);
}

/* Create Button */
.btn-create {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
    color: white;
}

.create-icon {
    width: 18px;
    height: 18px;
}

/* Auth Buttons */
.auth-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login,
.btn-register {
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-login {
    color: #64748b;
    background: rgba(100, 116, 139, 0.08);
}

.btn-login:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.btn-register {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10001;
    position: relative;
    pointer-events: auto !important;
}

.menu-line {
    width: 25px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 9998;
}

.mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Overlay sombre quand le menu est ouvert */
body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-radius: 12px;
    color: #64748b;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.mobile-nav-item svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
        gap: 1rem;
        flex-wrap: nowrap;
        overflow-x: hidden;
    }
    
    .main-navigation {
        display: none;
    }
    
    .header-actions {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }
    
    .search-widget,
    .create-label {
        display: none;
    }
    
    .btn-create {
        padding: 0.625rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    .mobile-menu-btn {
        display: flex;
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Touch-friendly user menu */
    .user-trigger {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Touch-friendly lang selector */
    .lang-trigger {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 768px) {
    /* Forcer le header à ne pas déborder */
    .pro-header {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: clip !important;
        overflow-y: visible !important;
    }
    
    .header-container {
        height: 64px;
        padding: 0 0.75rem;
        gap: 0.5rem;
        max-width: 100vw !important;
        width: 100% !important;
        overflow: visible !important;
    }
    
    /* Cacher la navigation principale sur mobile */
    .main-navigation {
        display: none !important;
    }
    
    /* Logo plus compact */
    .logo-badge {
        width: 36px;
        height: 36px;
    }
    
    .brand-title {
        font-size: 1.25rem;
    }
    
    .header-actions {
        gap: 0.375rem;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }
    
    /* Cacher la barre de recherche sur mobile */
    .search-widget {
        display: none !important;
    }
    
    body {
        padding-top: 64px !important;
        overflow-x: hidden !important;
    }
    
    .mobile-menu {
        top: 64px;
        padding: 1.5rem;
    }
    
    .brand-subtitle {
        display: none;
    }
    
    .user-label {
        display: none !important;
    }
    
    /* Boutons plus compacts */
    .lang-trigger,
    .notif-trigger,
    .user-trigger {
        padding: 0.5rem !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }
    
    .lang-code {
        display: none;
    }
    
    /* Cacher le texte du bouton d'inscription, garder juste l'icône */
    .btn-primary span {
        display: none;
    }
    
    .btn-primary {
        padding: 0.5rem !important;
        min-width: 40px !important;
    }
    
    /* User menu dropdown optimized for mobile */
    .user-menu .dropdown-menu {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: 70px;
        width: auto;
        max-width: none;
    }
    
    /* Lang menu optimized for mobile */
    .lang-menu {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: 70px;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .header-container {
        gap: 0.5rem;
        padding: 0 0.75rem;
        max-width: 100vw;
    }
    
    .logo-badge {
        width: 36px;
        height: 36px;
    }
    
    .brand-title {
        font-size: 1.125rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .auth-group {
        gap: 0.5rem;
    }
    
    .btn-login,
    .btn-register {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    .btn-login {
        display: none;
    }
    
    /* Cacher le texte du bouton lang sur mobile */
    .lang-trigger {
        padding: 0.5rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    /* Reduire la taille des boutons sur mobile */
    .bell-trigger,
    .search-trigger {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .user-trigger {
        padding: 0.375rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    .mobile-menu {
        padding: 1rem;
    }
    
    .mobile-nav-item {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 375px) {
    .header-container {
        padding: 0 0.5rem;
    }
    
    .brand-title {
        font-size: 1rem;
    }
    
    .btn-register {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-menu {
        overflow-y: auto;
        max-height: calc(100vh - 64px);
    }
}
/* ============================================
   SEARCH RESULT STATES
   ============================================ */

.search-loading,
.search-empty,
.search-error {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-error {
    color: #ef4444;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.result-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex-shrink: 0;
}

.result-icon svg {
    width: 18px;
    height: 18px;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    font-size: 0.8rem;
    color: #94a3b8;
}