/* CSS amélioré pour corriger les problèmes de header compressé */

/* Header principal */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    min-height: 70px; /* Hauteur minimale pour éviter compression */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 70px;
    flex-wrap: nowrap; /* Évite le passage à la ligne */
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0; /* Empêche la réduction */
    min-width: 120px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    text-decoration: none;
    white-space: nowrap;
}

.beta-badge {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation principale */
.main-nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px; /* Espacement réduit mais lisible */
    align-items: center;
    flex-wrap: nowrap;
}

.nav-links > li {
    position: relative;
    white-space: nowrap;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px; /* Taille réduite pour éviter compression */
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: block;
    white-space: nowrap;
}

.nav-link:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

/* Boutons d'action */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 180px;
    justify-content: flex-end;
}

.btn-login {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-login:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.btn-signup {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-signup:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Menu mobile (masqué par défaut) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #64748b;
    transition: all 0.3s ease;
}

.mobile-nav-overlay {
    display: none;
}

/* Responsive - Tablette */
@media (max-width: 1200px) {
    .nav-links {
        gap: 4px;
    }
    
    .nav-link {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .nav-buttons {
        min-width: 150px;
    }
    
    .btn-login, .btn-signup {
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* Responsive - Mobile */
@media (max-width: 991px) {
    .header-container {
        padding: 0 16px;
    }
    
    /* Cacher la navigation principale sur mobile */
    .main-nav {
        display: none;
    }
    
    .nav-buttons {
        display: none;
    }
    
    /* Afficher le menu burger */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Header mobile en deux lignes si nécessaire */
    .header-main {
        flex-wrap: wrap;
        min-height: 60px;
    }
    
    .logo-container {
        flex: 1;
    }
    
    /* Menu mobile overlay */
    .mobile-nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-nav-content {
        background: white;
        width: 280px;
        height: 100vh;
        position: absolute;
        right: 0;
        top: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 20px;
    }
    
    .mobile-nav-overlay.active .mobile-nav-content {
        transform: translateX(0);
    }
    
    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .mobile-menu-close {
        background: none;
        border: none;
        font-size: 24px;
        color: #64748b;
        cursor: pointer;
        padding: 4px;
    }
    
    .mobile-nav-links ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .mobile-nav-links .nav-link {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid #f1f5f9;
        color: #334155;
        font-size: 16px;
    }
    
    .mobile-nav-buttons {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #e2e8f0;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .mobile-nav-buttons .btn-login,
    .mobile-nav-buttons .btn-signup {
        text-align: center;
        padding: 12px 20px;
        border-radius: 8px;
    }
}

/* Correction spécifique pour éviter la compression sur très petits écrans */
@media (max-width: 480px) {
    .header {
        min-height: 80px; /* Plus de hauteur sur petits écrans */
    }
    
    .header-container {
        min-height: 80px;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
    }
    
    .header-main {
        width: 100%;
        justify-content: space-between;
    }
    
    .logo {
        font-size: 20px;
    }
}

/* Thème sombre */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(15, 23, 42, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .logo {
        color: #f8fafc;
    }
    
    .nav-link, .btn-login {
        color: #cbd5e1;
    }
    
    .nav-link:hover, .btn-login:hover {
        color: #3b82f6;
        background: rgba(59, 130, 246, 0.1);
    }
    
    .mobile-nav-content {
        background: #0f172a;
    }
    
    .mobile-nav-links .nav-link {
        color: #cbd5e1;
        border-bottom-color: #334155;
    }
    
    .mobile-menu-close {
        color: #cbd5e1;
    }
}
