/* ========================================
   HEADER - Navigation professionnelle
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    gap: 1rem;
}

/* Conteneur des contrôles à droite/gauche selon direction */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Brand / Logo */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: transform 0.2s ease;
}

.header-brand:hover {
    transform: scale(1.05);
}

.brand-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.3));
}

.brand-name {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Desktop */
.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    position: relative;
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #10b981;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
    right: auto;
}

.nav-link.active {
    color: #10b981;
}

.nav-link.active::after {
    width: 100%;
    left: 0;
    right: auto;
}

/* CTA Button Header - caché complètement, seulement dans menu mobile */
.btn-header {
    display: none !important;
}

/* Language Toggle in Header */
.lang-toggle-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    color: #10b981;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.lang-toggle-header:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.lang-toggle-header:active {
    transform: translateY(0);
}

.lang-icon {
    font-size: 1rem;
    line-height: 1;
}

.lang-text {
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}

.hamburger {
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all 0.3s ease;
    display: block;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    bottom: -7px;
}

/* Animation hamburger */
.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    padding-top: 60px;
    overflow-y: auto;
}

html[dir="rtl"] .mobile-menu {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

html[dir="rtl"] .mobile-menu.active {
    transform: translateX(0);
}

html[dir="ltr"] .mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu.active {
    transform: translateX(0) !important;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
}

.mobile-nav-link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(16, 185, 129, 0.05);
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: rgba(16, 185, 129, 0.15);
    transform: translateX(-4px);
}

html[dir="rtl"] .mobile-nav-link:hover,
html[dir="rtl"] .mobile-nav-link:active {
    transform: translateX(4px);
}

.mobile-nav-cta {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.mobile-nav-cta:hover,
.mobile-nav-cta:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.mobile-nav-lang {
    display: none !important;
}

/* Ajuster le body pour le header fixe */
body {
    padding-top: 50px;
}

/* Cacher l'ancien bouton flottant de langue */
.lang-toggle {
    display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-nav {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    .lang-toggle-header {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .lang-icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 48px;
    }

    .header-content {
        padding: 0.4rem 0;
    }

    .header-nav,
    .btn-header {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .brand-name {
        font-size: 0.95rem;
    }

    .brand-icon {
        font-size: 1.3rem;
    }

    .lang-toggle-header {
        padding: 0.35rem 0.65rem;
        font-size: 0.8rem;
        gap: 0.3rem;
        border-radius: 8px;
    }

    .lang-icon {
        font-size: 0.9rem;
    }

    .lang-text {
        font-size: 0.8rem;
    }

    .header-controls {
        gap: 0.75rem;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Fix pour les boutons en mode RTL */
html[dir="rtl"] .btn-header {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .nav-link::after {
    left: 0;
    right: auto;
}

html[dir="rtl"] .nav-link:hover::after {
    right: 0;
    left: auto;
}

/* Fix pour mode LTR (français) */
html[dir="ltr"] .nav-link::after {
    right: auto;
    left: 0;
}

html[dir="ltr"] .nav-link:hover::after {
    left: 0;
    right: auto;
}

html[dir="ltr"] .nav-link.active::after {
    left: 0;
    right: auto;
}

html[dir="ltr"] .mobile-nav-link:hover,
html[dir="ltr"] .mobile-nav-link:active {
    transform: translateX(4px);
}

/* Pas de margins auto qui séparent les éléments */
