/* ===================================
   HEADER FIX - COULEURS CORRIGÉES
   Utilise les mêmes bleus que la page principale
   =================================== */

.header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    z-index: var(--z-header) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
    transition: var(--transition-base) !important;
    padding: 0 !important;
    height: 90px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

.navbar {
    padding: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.navbar .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 3rem !important;
}

.nav-wrapper {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    gap: 2rem !important;
}

.logo {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.logo-img {
    height: 70px !important;
    width: auto !important;
    object-fit: contain !important;
}

.nav-menu {
    display: flex !important;
    list-style: none !important;
    gap: 2.5rem !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 !important;
    justify-content: center !important;
    height: 100% !important;
}

.nav-menu li {
    margin: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    white-space: nowrap !important;
}

.nav-menu a {
    color: #1e293b !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    transition: var(--transition-fast) !important;
    position: relative !important;
    padding: 0 0.6rem !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    white-space: nowrap !important;
}

/* Ligne sous les liens */
.nav-menu a::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 2px !important;
    background: #2563eb !important;
    transition: var(--transition-base) !important;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100% !important;
}

.nav-menu a:hover {
    color: #2563eb !important;
}

/* ===================================
   LANGUAGE SWITCHER - EN / FR TEXTE
   =================================== */

.language-switcher {
    display: flex !important;
    gap: 0.4rem !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    background: rgba(15, 23, 42, 0.06) !important;
    padding: 0.3rem !important;
    border-radius: 10px !important;
}

.lang-btn {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    padding: 0.4rem 0.9rem !important;
    border-radius: 7px !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    transition: all 0.25s ease !important;
    min-width: 44px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Cache les flags */
.lang-btn .fi {
    display: none !important;
}

/* Affiche EN / FR via data-lang */
.lang-btn[data-lang="en"]::before {
    content: "EN" !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
}

.lang-btn[data-lang="fr"]::before {
    content: "FR" !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
}

/* Hover */
.lang-btn:hover {
    color: #2563eb !important;
    background: rgba(37, 99, 235, 0.08) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Actif - pill bleue */
.lang-btn.active {
    background: #2563eb !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}

.lang-btn.active:hover {
    background: #1d4ed8 !important;
    color: white !important;
}

/* Supprime le tooltip */
.lang-btn::after {
    content: none !important;
}

/* ===================================
   MOBILE MENU TOGGLE
   =================================== */

.mobile-menu-toggle {
    display: none !important;
}

/* Ajustement contenu principal */
.hero {
    margin-top: 0 !important;
    padding-top: 10rem !important;
}

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

/* Grands écrans */
@media (min-width: 1600px) {
    .navbar .container {
        padding: 0 4rem !important;
    }
}

/* Écrans moyens */
@media (max-width: 1400px) {
    .navbar .container {
        padding: 0 2.5rem !important;
    }
}

@media (max-width: 1200px) {
    .navbar .container {
        padding: 0 2rem !important;
    }

    .nav-menu {
        gap: 2rem !important;
    }

    .nav-menu a {
        font-size: 14px !important;
        padding: 0 0.5rem !important;
    }
}

@media (max-width: 1024px) {
    .navbar .container {
        padding: 0 1.5rem !important;
    }

    .nav-menu {
        gap: 1.5rem !important;
    }

    .nav-menu a {
        font-size: 14px !important;
        padding: 0 0.4rem !important;
    }

    .lang-btn {
        min-width: 38px !important;
        height: 32px !important;
        padding: 0.3rem 0.7rem !important;
    }

    .logo-img {
        height: 60px !important;
    }
}

/* ===================================
   MOBILE - FIX LANGUAGE SWITCHER
   =================================== */

@media (max-width: 768px) {
    .header {
        height: 70px !important;
    }

    .navbar .container {
        padding: 0 1rem !important;
    }

    /* Ordre et alignement des éléments dans le header mobile */
    .nav-wrapper {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .logo {
        order: 1 !important;
        flex-shrink: 0 !important;
    }

    .logo-img {
        height: 45px !important;
    }

    .mobile-menu-toggle {
        order: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        padding: 0.5rem !important;
        z-index: 101 !important;
        flex-shrink: 0 !important;
    }

    .mobile-menu-toggle span {
        width: 25px !important;
        height: 3px !important;
        background: #1e293b !important;
        border-radius: 2px !important;
        transition: var(--transition-base) !important;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px) !important;
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0 !important;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px) !important;
    }

    /* ✅ FIX : language-switcher reste dans le header, aligné verticalement */
    .language-switcher {
        order: 3 !important;
        flex-shrink: 0 !important;
        margin-top: 0 !important;        /* ← suppression du margin qui causait le décalage */
        align-self: center !important;
        width: auto !important;
        justify-content: center !important;
        padding: 0.3rem !important;
    }

    .lang-btn {
        min-width: 44px !important;
        height: 34px !important;
        font-size: 0.85rem !important;
        padding: 0.35rem 0.8rem !important;
    }

    /* Menu mobile en overlay */
    .nav-menu {
        position: fixed !important;
        top: 70px !important;
        left: -100% !important;
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        flex-direction: column !important;
        padding: 2rem !important;
        gap: 0 !important;
        transition: left 0.3s ease !important;
        align-items: flex-start !important;
        overflow-y: auto !important;
        z-index: 100 !important;
        justify-content: flex-start !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
        flex: none !important;
    }

    .nav-menu.active {
        left: 0 !important;
    }

    .nav-menu li {
        width: 100% !important;
        height: auto !important;
        border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
    }

    .nav-menu a {
        width: 100% !important;
        height: auto !important;
        padding: 1rem 0 !important;
        font-size: 16px !important;
        justify-content: flex-start !important;
    }

    .nav-menu a::after {
        display: none !important;
    }

    .hero {
        padding-top: 6rem !important;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0 0.75rem !important;
    }

    .logo-img {
        height: 40px !important;
    }

    .nav-menu {
        padding: 1.5rem !important;
    }

    .nav-menu a {
        font-size: 15px !important;
        padding: 0.875rem 0 !important;
    }

    .lang-btn {
        min-width: 40px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
        padding: 0.3rem 0.6rem !important;
    }
}