/*
Theme Name: Carlynx
Author: Carlynx Médicaux Services
Version: 1.1
Description: Thème sur-mesure ultra-premium (Correction contraste Navbar, Animations Logo, Icônes Pro)
*/

/* ==========================================================================
   1. VARIABLES ET CONFIGURATION GLOBALE
   ========================================================================== */
:root {
    /* Couleurs principales */
    --primary-blue: #008eb0; 
    --dark-blue: #0A192F; 
    --green-cms: #128a42;    
    --white: #ffffff;
    
    /* Fonds et Dégradés */
    --bg-global-gradient: linear-gradient(135deg, #a3bcca 0%, #e5e7eb 100%);
    --bg-light: transparent;
    --bg-gray: rgba(255, 255, 255, 0.4); 
    --gradient-primary: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    
    /* Textes */
    --text-main: #1E293B;
    --text-muted: #64748B;
    
    /* Typographie Fluide (Adaptative) */
    --text-hero: clamp(2.5rem, 5vw + 1rem, 5rem); 
    --text-h2: clamp(2rem, 4vw + 1rem, 3.2rem);
    --text-body: clamp(1rem, 1vw + 0.5rem, 1.1rem);
    
    /* Ombres Organiques Premium */
    --shadow-soft: 0 2px 4px -1px rgba(0, 0, 0, 0.03), 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 10px 15px -3px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 10px 15px -3px rgba(0, 142, 176, 0.1), 0 20px 25px -5px rgba(0, 142, 176, 0.05), 0 0 0 1px rgba(0, 142, 176, 0.05);
    --glow: 0 0 25px rgba(0, 142, 176, 0.2);
    
    /* Polices */
    --font-fr: 'Plus Jakarta Sans', sans-serif;
    --font-ar: 'Cairo', sans-serif;
    
    /* Transitions Ultra-Fluides */
    --transition-smooth: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body { 
    font-family: var(--font-fr); 
    background: var(--bg-global-gradient); 
    background-attachment: fixed;
    color: var(--text-main); 
    line-height: 1.7; 
    overflow-x: hidden; 
    position: relative;
    min-height: 100vh;
}
body.lang-ar { font-family: var(--font-ar); }

/* Animation de fond global adoucie (Lumière qui respire) */
body::before { 
    content: ''; position: fixed; top: -20vh; left: -20vw; 
    width: 150vw; height: 150vh; 
    background: radial-gradient(circle at 50% 50%, rgba(0,142,176,0.08), transparent 60%); 
    z-index: 0; animation: breatheGlow 15s infinite alternate ease-in-out; 
    pointer-events: none;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-blue); border-radius: 10px; }

/* Gestion de la barre d'administration WordPress */
.admin-bar header { top: 32px !important; }
@media (max-width: 782px) { .admin-bar header { top: 46px !important; } }

/* ==========================================================================
   2. STANDARDS PRO : ACCESSIBILITÉ ET PERFORMANCES
   ========================================================================== */
*:focus-visible { outline: 2px dashed var(--primary-blue); outline-offset: 4px; border-radius: 4px; transition: outline-offset 0.2s ease; }
p, li, a { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Accélération matérielle GPU (Force le 60fps) */
.service-card, .process-step, .team-card, .value-card, .btn-main { will-change: transform, box-shadow; transform: translateZ(0); }

/* Sélection de texte aux couleurs de la marque */
::selection { background-color: var(--primary-blue); color: var(--white); }
::-moz-selection { background-color: var(--primary-blue); color: var(--white); }

/* ==========================================================================
   3. KEYFRAMES & ANIMATIONS 
   ========================================================================== */
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0px); } }
@keyframes breatheGlow { from { opacity: 0.6; transform: scale(1); } to { opacity: 1; transform: scale(1.05); } }
@keyframes pulse-glow { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); } 70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
@keyframes scroll-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes logo-shine { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }

/* Classes d'apparition au scroll */
.reveal { opacity: 0; transform: translateY(30px) scale(0.98); filter: blur(5px); transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal-left { opacity: 0; transform: translateX(-30px); filter: blur(5px); transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal-right { opacity: 0; transform: translateX(30px); filter: blur(5px); transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.active, .reveal-left.active, .reveal-right.active { opacity: 1 !important; transform: translate(0) scale(1) !important; filter: blur(0) !important; }

/* ==========================================================================
   4. HEADER, LOGO ANIMÉ & NAVBAR (CORRIGÉ POUR LE CONTRASTE)
   ========================================================================== */
header { 
    position: fixed; /* Toujours fixé en haut */
    top: 0; 
    width: 100%; 
    padding: 15px 5%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    z-index: 1000; 
    transition: var(--transition-smooth); 
    
    /* NOUVEAU : Effet verre dépoli (Glassmorphism) permanent */
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(20px); 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); 
    border-bottom: none;
}

/* Le header se rétrécit légèrement au scroll pour l'élégance */
header.scrolled { padding: 8px 5%; }

/* --- LOGO (Texte sombre pour être visible sur le fond clair) --- */
.logo-container { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.logo-text { font-weight: 800; color: var(--dark-blue); font-size: 1.4rem; line-height: 1.1; letter-spacing: -0.5px; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); position: relative; display: inline-block; }
.logo-text span { color: var(--primary-blue); display: block; font-size: 0.9rem; font-weight: 600; letter-spacing: 1px; transition: letter-spacing 0.5s cubic-bezier(0.22, 1, 0.36, 1), color 0.4s ease; }

/* Animation Luxe au survol */
.logo-container:hover .logo-text { transform: scale(1.03); background: linear-gradient(120deg, var(--dark-blue) 20%, var(--primary-blue) 40%, var(--primary-blue) 60%, var(--dark-blue) 80%); background-size: 200% auto; color: transparent; -webkit-background-clip: text; background-clip: text; animation: logo-shine 3s linear infinite; }
.logo-container:hover .logo-text span { letter-spacing: 3px; color: transparent; }

/* --- NAVIGATION GÉNÉRALE (Liens sombres) --- */
nav ul { display: flex; list-style: none; gap: 35px; align-items: center; }
nav ul li a { text-decoration: none; color: var(--text-main); font-weight: 600; font-size: 1rem; transition: var(--transition-fast); position: relative; padding: 5px 0; }
nav ul li > a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary-blue); transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
nav ul li > a:hover, nav ul li > a.active { color: var(--primary-blue); }
nav ul li > a:hover::after, nav ul li > a.active::after { width: 100%; }

/* --- ICÔNES MÉDICALES ANIMÉES --- */
#nav-links > li > a { display: flex; align-items: center; gap: 8px; position: relative; }
.nav-icon { font-size: 1.15em; color: var(--primary-blue); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease; }
.dropdown-arrow { font-size: 0.7em; margin-left: 4px; opacity: 0.7; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }

/* Animation au survol (Effet rebond) */
#nav-links > li:hover > a .nav-icon { transform: scale(1.2) translateY(-2px); color: var(--dark-blue); }
#nav-links > li:hover > a .dropdown-arrow { transform: translateY(3px) rotate(180deg); opacity: 1; }

/* --- SOUS-MENUS --- */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: 0; background: rgba(255,255,255,0.98); backdrop-filter: blur(10px); border-radius: 12px; box-shadow: var(--shadow-hover); overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition-smooth); min-width: 260px; z-index: 1000; padding: 10px 0; display: flex; flex-direction: column; }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li { width: 100%; }
.dropdown-menu li a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: var(--text-main) !important; font-weight: 600; font-size: 0.95rem; border-radius: 0; text-align: left; transition: var(--transition-fast); }
.dropdown-menu li a::after { display: none; }
.dropdown-menu li a i { width: 20px; text-align: center; font-size: 1.1em; color: var(--primary-blue); opacity: 0.6; transition: all 0.3s ease; }
.dropdown-menu li a:hover { background: var(--bg-gray); color: var(--primary-blue) !important; padding-left: 25px; }

/* Glissement de l'icône dans le sous-menu */
.dropdown-menu li a:hover i { opacity: 1; transform: translateX(5px) scale(1.1); }

/* --- BOUTONS ET LANGUES --- */
.nav-actions { display: flex; align-items: center; gap: 15px; position: relative; }
.btn-nav-devis { display: flex; align-items: center; gap: 8px; background: var(--gradient-primary); color: var(--white) !important; padding: 10px 22px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 0.9rem; transition: var(--transition-smooth); box-shadow: var(--shadow-soft); border: none; white-space: nowrap;}
.btn-nav-devis i { font-size: 1.1em; transition: transform 0.3s ease; }
.btn-nav-devis:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); filter: brightness(1.1); }
.btn-nav-devis:hover i { transform: scale(1.1) rotate(5deg); }

/* Bouton langue (Ajusté pour être lisible sur fond blanc) */
.lang-selector { position: relative; display: inline-block; }
.btn-translate { background: var(--bg-gray); border: none; color: var(--primary-blue); padding: 10px 20px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: var(--transition-fast); display: flex; align-items: center; gap: 8px; backdrop-filter: blur(10px); }
.btn-translate:hover { background: var(--primary-blue); color: var(--white) !important; transform: translateY(-2px); box-shadow: var(--shadow-soft); }

.lang-menu { position: absolute; top: 120%; right: 0; background: var(--white); border-radius: 12px; box-shadow: var(--shadow-soft); overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition-smooth); min-width: 120px; z-index: 1000; }
.lang-selector:hover .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu button { display: block; width: 100%; text-align: left; padding: 12px 20px; border: none; background: none; cursor: pointer; font-weight: 600; color: var(--dark-blue); font-family: inherit; transition: var(--transition-fast); }
.lang-menu button:hover { background: var(--bg-gray); color: var(--primary-blue); padding-left: 25px; }

/* Bouton Mobile (sombre) */
.mobile-menu-btn { display: none; color: var(--dark-blue); font-size: 1.5rem; cursor: pointer; background: none; border: none; transition: var(--transition-fast); }

.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background-color: #25d366; color: white; border-radius: 50%; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3); z-index: 1000; transition: var(--transition-smooth); text-decoration: none; animation: pulse-glow 3s infinite; }
.whatsapp-float:hover { transform: translateY(-4px); background-color: #1ebe57; animation: none; box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4); }

/* ==========================================================================
   5. EN-TÊTES DE PAGES
   ========================================================================== */
.hero { position: relative; height: 100vh; min-height: 700px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); overflow: hidden; margin-top: 0; }
.hero-slider, .slide, .hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.hero-slider { z-index: 1; }
.slide { background-size: cover; background-position: center; opacity: 0; transition: opacity 2s ease-in-out, transform 10s ease-out; transform: scale(1.1); }
.slide.active { opacity: 1; transform: scale(1); }
.hero-overlay { background: linear-gradient(135deg, rgba(10, 25, 47, 0.85) 0%, rgba(0, 142, 176, 0.65) 100%); z-index: 2; }
.particle { position: absolute; z-index: 2; opacity: 0.15; color: var(--white); animation: float 8s infinite ease-in-out; }
.p1 { top: 20%; left: 10%; font-size: 3rem; animation-delay: 0s; }
.p2 { top: 60%; right: 15%; font-size: 4rem; animation-delay: 2s; }
.p3 { bottom: 15%; left: 20%; font-size: 2.5rem; animation-delay: 4s; }
.hero-content { position: relative; z-index: 3; max-width: 1000px; padding: 0 20px; margin-top: 80px; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 25px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); border-radius: 50px; font-size: 0.9rem; font-weight: 700; letter-spacing: 2px; margin-bottom: 30px; backdrop-filter: blur(10px); text-transform: uppercase; }
.hero h1 { font-size: var(--text-hero); font-weight: 800; margin-bottom: 25px; line-height: 1.1; letter-spacing: -1.5px; text-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.hero p { font-size: 1.3rem; margin-bottom: 45px; font-weight: 400; opacity: 0.9; max-width: 800px; margin-left: auto; margin-right: auto; }

.page-header { position: relative; height: 45vh; min-height: 350px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); background: url('https://images.unsplash.com/photo-1538108149393-fbbd81895907?q=80&w=2000&auto=format&fit=crop') center/cover; margin-top: 0; padding-top: 40px; }
.page-header-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(10, 25, 47, 0.9), rgba(0, 142, 176, 0.8)); z-index: 1; }
.page-header-content { position: relative; z-index: 2; padding-top: 60px; }
.page-header h1 { font-size: 4rem; font-weight: 800; margin-bottom: 15px; letter-spacing: -1px; animation: reveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.breadcrumb { font-size: 1.1rem; font-weight: 500; opacity: 0.9; animation: reveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;}
.breadcrumb a { color: var(--white); text-decoration: none; transition: var(--transition-fast); }
.breadcrumb a:hover { color: #8ee4ff; }
.breadcrumb span { margin: 0 10px; opacity: 0.6; }

.btn-main { background: var(--gradient-primary); color: var(--white); padding: 18px 45px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 1.1rem; transition: var(--transition-smooth); display: inline-flex; align-items: center; gap: 10px; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; z-index: 1; border: none; }
.btn-main::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.15); z-index: -1; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); transform: scaleX(0); transform-origin: right; }
.btn-main:hover::before { transform: scaleX(1); transform-origin: left; }
.btn-main:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* ==========================================================================
   6. SECTIONS COMMUNES
   ========================================================================== */
.section-header { text-align: center; margin-bottom: 80px; position: relative; z-index: 2;}
.section-header h2 { font-size: var(--text-h2); color: var(--dark-blue); font-weight: 800; letter-spacing: -1px;}
.section-header p { color: var(--text-muted); font-size: var(--text-body); max-width: 600px; margin: 15px auto 0; }
.section-subtitle { display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; background: rgba(0, 142, 176, 0.08); color: var(--primary-blue); font-weight: 700; border-radius: 50px; font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 20px; text-transform: uppercase; }

/* Stats */
.stats-section { background: rgba(255,255,255,0.6); backdrop-filter: blur(20px); padding: 70px 5%; position: relative; margin-top: -60px; z-index: 10; border-radius: 30px; box-shadow: var(--shadow-soft); border: 1px solid rgba(255,255,255,0.8); max-width: 1300px; margin-left: auto; margin-right: auto;}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.stat-item { position: relative; padding: 20px; transition: var(--transition-smooth); border-radius: 20px;}
.stat-item:hover { transform: translateY(-5px); background: rgba(255,255,255,0.8); }
.stat-item i { font-size: 3rem; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 15px; display: inline-block; }
.stat-value-container { display: flex; justify-content: center; align-items: baseline; gap: 2px; }
.stat-number { font-size: 3.5rem; font-weight: 900; color: var(--dark-blue); line-height: 1; }
.stat-symbol { font-size: 2.5rem; font-weight: 900; color: var(--primary-blue); line-height: 1; }
.stat-text { color: var(--text-muted); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; }

/* Partenaires */
.partners-section { padding: 60px 0; background: transparent; overflow: hidden; }
.partners-title { text-align: center; font-size: 1rem; font-weight: 700; color: var(--text-muted); margin-bottom: 30px; text-transform: uppercase; letter-spacing: 2px; }
.marquee-wrapper { width: 100%; overflow: hidden; position: relative; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-content { display: flex; width: calc(250px * 12); animation: scroll-marquee 40s linear infinite; }
.marquee-item { width: 250px; flex-shrink: 0; display: flex; justify-content: center; align-items: center; padding: 0 20px; opacity: 0.4; transition: var(--transition-smooth); filter: grayscale(100%); }
.marquee-item:hover { opacity: 1; filter: grayscale(0%); transform: scale(1.05); }
.marquee-item i { font-size: 2.5rem; color: var(--dark-blue); }
.marquee-item span { font-size: 1.1rem; font-weight: 700; color: var(--dark-blue); margin-left: 10px; }

/* FAQ */
.faq-section { padding: 100px 5%; background: transparent; max-width: 1000px; margin: 0 auto; position: relative; z-index: 2; }
.faq-container { display: flex; flex-direction: column; gap: 15px; margin-top: 50px; }
.faq-item { background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); border-radius: 16px; overflow: hidden; transition: var(--transition-smooth); border: 1px solid rgba(255,255,255,0.5); }
.faq-item:hover { background: rgba(255,255,255,0.9); box-shadow: var(--shadow-soft); }
.faq-item.active { background: var(--white); border-color: rgba(0, 142, 176, 0.3); box-shadow: var(--shadow-soft); }
.faq-question { padding: 25px 30px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 700; color: var(--dark-blue); font-size: 1.1rem; transition: var(--transition-fast);}
.faq-question i { color: var(--primary-blue); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); font-size: 1.2rem; }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; padding: 0 30px; color: var(--text-muted); transition: max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1), padding 0.6s ease, opacity 0.4s ease; opacity: 0; }
.faq-item.active .faq-answer { max-height: 400px; padding: 0 30px 25px; opacity: 1; }

/* CTA */
.cta-section { background: url('https://images.unsplash.com/photo-1538108149393-fbbd81895907?q=80&w=2000&auto=format&fit=crop') center/cover fixed; padding: 100px 5%; text-align: center; color: var(--white); position: relative; overflow: hidden; border-radius: 40px; max-width: 1400px; margin: 60px auto; }
.cta-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(10, 25, 47, 0.95), rgba(0, 142, 176, 0.85)); }
.cta-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }
.cta-content h2 { font-size: 3rem; font-weight: 800; margin-bottom: 20px; }
.btn-white { background: var(--white); color: var(--primary-blue); padding: 18px 45px; border-radius: 50px; text-decoration: none; font-weight: 800; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 10px; transition: var(--transition-smooth); }
.btn-white:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }












/* ==========================================================================
   7. PAGES SPÉCIFIQUES
   ========================================================================== */
.about-section, .mission-section { padding: 100px 5%; background: transparent; display: flex; align-items: center; gap: 80px; max-width: 1400px; margin: 0 auto; overflow: hidden;}
.about-text, .mission-text { flex: 1.1; }
.about-text h2, .mission-text h2 { font-size: var(--text-h2); color: var(--dark-blue); margin-bottom: 25px; font-weight: 800; line-height: 1.2; letter-spacing: -1px; }
.about-text h2 span { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.about-text p, .mission-text p { font-size: var(--text-body); color: var(--text-muted); margin-bottom: 20px; line-height: 1.8; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0; list-style: none; padding: 0; }
.about-features li { display: flex; align-items: center; gap: 15px; background: rgba(255,255,255,0.5); backdrop-filter: blur(10px); padding: 15px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.4); transition: var(--transition-smooth); color: var(--dark-blue); font-weight: 700; font-size: 1.05rem; }
.about-features li:hover { transform: translateX(5px); background: rgba(255,255,255,0.9); box-shadow: var(--shadow-soft); border-color: rgba(0, 142, 176, 0.2); }
.about-features li i { color: var(--primary-blue); font-size: 1.4rem; flex-shrink: 0; }

.about-images-wrapper, .mission-image { flex: 0.9; position: relative; display: flex; justify-content: center; align-items: center; padding: 20px; }
.about-image-frame, .mission-image img { position: relative; width: 100%; max-width: 500px; z-index: 2; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-hover); }
.about-image-frame img { width: 100%; height: auto; display: block; transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.about-image-frame:hover img, .mission-image:hover img { transform: scale(1.03); }
.about-images-wrapper::after { content: ''; position: absolute; width: 400px; height: 400px; background: var(--primary-blue); opacity: 0.08; filter: blur(40px); border-radius: 50%; z-index: 0; }
.about-images-wrapper::before { content: ''; position: absolute; top: -10px; right: -10px; width: 100%; max-width: 500px; height: 100%; border: 2px solid rgba(0, 142, 176, 0.3); border-radius: 24px; z-index: 1; transition: var(--transition-smooth); }
.about-images-wrapper:hover::before { transform: translate(-5px, 5px); border-color: var(--primary-blue); }
.about-floating-badge { position: absolute; bottom: 30px; left: -30px; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); padding: 20px 25px; border-radius: 16px; box-shadow: var(--shadow-hover); display: flex; align-items: center; gap: 15px; z-index: 3; border: 1px solid rgba(255,255,255,0.5); animation: float 6s ease-in-out infinite; }
.about-floating-badge i { font-size: 2.5rem; color: var(--primary-blue); }

.quote-box { background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); border-left: 4px solid var(--primary-blue); padding: 25px; border-radius: 0 12px 12px 0; margin-top: 30px; font-style: italic; color: var(--dark-blue); font-weight: 600; font-size: 1.05rem; }

.values-section, .team-section { padding: 100px 5%; background: transparent; position: relative; z-index: 2;}
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; max-width: 1400px; margin: 0 auto; }
.value-card { background: rgba(255,255,255,0.5); backdrop-filter: blur(10px); padding: 50px 30px; border-radius: 20px; text-align: center; transition: var(--transition-smooth); border: 1px solid rgba(255,255,255,0.4); }
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); background: rgba(255,255,255,0.95); border-color: rgba(0, 142, 176, 0.2); }
.value-icon { width: 70px; height: 70px; background: rgba(0, 142, 176, 0.08); color: var(--primary-blue); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 25px; transition: var(--transition-smooth);}
.value-card:hover .value-icon { background: var(--primary-blue); color: var(--white); transform: scale(1.05); }

.team-grid { display: flex; justify-content: center; gap: 40px; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; position: relative; z-index: 2;}
.team-card { background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-soft); width: 320px; text-align: center; transition: var(--transition-smooth); border: 1px solid rgba(255,255,255,0.5); }
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); background: rgba(255,255,255,0.95); }
.team-avatar-container { padding: 40px 40px 10px; }
.team-avatar { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; margin: 0 auto; background: var(--bg-gray); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--primary-blue); transition: var(--transition-smooth);}
.team-info { padding: 20px 30px 30px; }
.team-info h3 { color: var(--dark-blue); font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; }
.team-role { color: var(--primary-blue); font-weight: 600; font-size: 0.95rem; display: block; }
.team-card:hover .team-avatar { transform: scale(1.05); }

.process-section { padding: 120px 5%; background: transparent; position: relative; overflow: hidden;}
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; max-width: 1400px; margin: 0 auto; position: relative; z-index: 2; }
.process-step { background: rgba(255,255,255,0.5); backdrop-filter: blur(10px); padding: 40px 30px; border-radius: 20px; text-align: center; box-shadow: var(--shadow-soft); transition: var(--transition-smooth); border: 1px solid rgba(255,255,255,0.4); position: relative; overflow: hidden; }
.process-step::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--primary-blue); transform: scaleX(0); transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); transform-origin: left; }
.process-step:hover::after { transform: scaleX(1); }
.process-step:hover { transform: translateY(-6px); background: rgba(255,255,255,0.95); box-shadow: var(--shadow-hover); }
.step-number { width: 60px; height: 60px; background: rgba(0, 142, 176, 0.1); color: var(--primary-blue); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; margin: 0 auto 20px; transition: var(--transition-smooth); }
.process-step:hover .step-number { background: var(--primary-blue); color: var(--white); transform: scale(1.1); }
.process-step h3 { color: var(--dark-blue); font-size: 1.2rem; margin-bottom: 10px; font-weight: 700; }

.timeline-section { padding: 100px 5%; background: transparent; position: relative; overflow: hidden; }
.timeline { position: relative; max-width: 1000px; margin: 0 auto; z-index: 2;}
.timeline::after { content: ''; position: absolute; width: 2px; background: rgba(0, 142, 176, 0.15); top: 0; bottom: 0; left: 50%; transform: translateX(-50%); }
.timeline-step { padding: 20px 40px; position: relative; width: 50%; box-sizing: border-box; }
.timeline-step:nth-child(odd) { left: 0; text-align: right; }
.timeline-step:nth-child(even) { left: 50%; text-align: left; }
.timeline-icon { position: absolute; width: 40px; height: 40px; background: var(--bg-global-gradient); border: 2px solid var(--primary-blue); border-radius: 50%; top: 30px; z-index: 2; display: flex; align-items: center; justify-content: center; color: var(--primary-blue); font-size: 1rem; transition: var(--transition-fast); }
.timeline-step:hover .timeline-icon { background: var(--primary-blue); color: var(--white); transform: scale(1.1); box-shadow: 0 0 15px rgba(0, 142, 176, 0.3); }
.timeline-step:nth-child(odd) .timeline-icon { right: -20px; }
.timeline-step:nth-child(even) .timeline-icon { left: -20px; }
.timeline-content { padding: 30px; background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); border-radius: 20px; box-shadow: var(--shadow-soft); transition: var(--transition-smooth); position: relative; border: 1px solid rgba(255,255,255,0.4); }
.timeline-step:hover .timeline-content { background: rgba(255,255,255,0.95); transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: rgba(0, 142, 176, 0.2); }
.step-badge { display: inline-block; padding: 4px 12px; background: rgba(0, 142, 176, 0.1); color: var(--primary-blue); font-weight: 700; border-radius: 4px; font-size: 0.8rem; margin-bottom: 10px; }

.guarantee-banner { max-width: 1000px; margin: 80px auto 0; background: var(--dark-blue); border-radius: 24px; padding: 40px 50px; display: flex; align-items: center; justify-content: space-between; color: var(--white); position: relative; overflow: hidden; z-index: 2; box-shadow: var(--shadow-soft); }
.guarantee-banner .bg-icon { font-size: 8rem; color: rgba(255,255,255,0.03); position: absolute; right: -10px; bottom: -20px; pointer-events: none; }

.services-section, .detailed-services { padding: 100px 5%; background: transparent; max-width: 100%; margin: 0 auto; position: relative; z-index: 2;}
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1400px; margin: 0 auto;}
.service-card { background: rgba(255,255,255,0.5); backdrop-filter: blur(10px); border-radius: 20px; padding: 0; box-shadow: var(--shadow-soft); transition: var(--transition-smooth); border: 1px solid rgba(255,255,255,0.4); display: flex; flex-direction: column; overflow: hidden; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); background: rgba(255,255,255,0.95); border-color: rgba(0, 142, 176, 0.2); }
.service-img-container { overflow: hidden; position: relative; height: 220px; }
.service-img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.service-card:hover .service-img { transform: scale(1.05); }
.service-icon-floating { position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.9); backdrop-filter: blur(5px); color: var(--primary-blue); width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: var(--shadow-soft); z-index: 2; transition: var(--transition-smooth); }
.service-card:hover .service-icon-floating { background: var(--primary-blue); color: var(--white); }
.service-content { padding: 25px; flex-grow: 1; }
.service-content h3 { font-size: 1.2rem; color: var(--dark-blue); margin-bottom: 10px; }

.service-row { display: flex; align-items: center; gap: 60px; max-width: 1200px; margin: 0 auto 80px; scroll-margin-top: 150px; }
.service-row.reverse { flex-direction: row-reverse; }
.service-image { flex: 1; position: relative; }
.service-image img { width: 100%; height: 400px; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-soft); transition: var(--transition-smooth); }
.service-image::before { content: ''; position: absolute; top: -15px; left: -15px; width: 100%; height: 100%; border: 2px solid rgba(0, 142, 176, 0.2); border-radius: 24px; z-index: -1; transition: var(--transition-smooth); }
.service-row.reverse .service-image::before { left: auto; right: -15px; }
.service-row:hover .service-image::before { transform: translate(-5px, 5px); border-color: var(--primary-blue); }
.service-row.reverse:hover .service-image::before { transform: translate(5px, 5px); }
.service-icon-large { position: absolute; bottom: 20px; right: -20px; width: 70px; height: 70px; background: var(--primary-blue); color: var(--white); display: flex; align-items: center; justify-content: center; border-radius: 16px; font-size: 2rem; box-shadow: var(--shadow-soft); }
.service-row.reverse .service-icon-large { right: auto; left: -20px; }
.service-info { flex: 1.2; }
.service-number { font-size: 4rem; font-weight: 800; color: rgba(0, 142, 176, 0.08); line-height: 1; margin-bottom: -20px; }
.service-list { list-style: none; margin-bottom: 25px; }
.service-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-weight: 600; color: var(--text-main); }
.service-list li i { color: var(--primary-blue); font-size: 1.1rem; }

.contact-section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; display: flex; gap: 50px; position: relative; z-index: 2;}
.contact-info { flex: 1; display: grid; gap: 20px; }
.info-card { background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); padding: 30px; border-radius: 16px; box-shadow: var(--shadow-soft); display: flex; align-items: flex-start; gap: 20px; transition: var(--transition-smooth); border: 1px solid rgba(255,255,255,0.4); }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); background: rgba(255,255,255,0.95); border-color: rgba(0, 142, 176, 0.2); }
.info-icon { width: 50px; height: 50px; background: rgba(0, 142, 176, 0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--primary-blue); flex-shrink: 0; transition: var(--transition-fast); }
.info-card:hover .info-icon { background: var(--primary-blue); color: var(--white); }
.contact-form-wrapper { flex: 1.5; background: rgba(255,255,255,0.8); backdrop-filter: blur(15px); padding: 40px; border-radius: 24px; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,0.6); }
.contact-form-wrapper::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--primary-blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-control { width: 100%; padding: 15px 18px; background: rgba(255,255,255,0.8); border: 1px solid rgba(0, 142, 176, 0.1); border-radius: 8px; font-size: 0.95rem; transition: var(--transition-fast); }
.form-control:focus { background: #ffffff; border-color: var(--primary-blue); outline: none; box-shadow: 0 0 0 3px rgba(0, 142, 176, 0.1); }
.btn-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; background: var(--primary-blue) !important; color: #ffffff !important; border: none !important; border-radius: 8px; font-family: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: var(--transition-smooth); text-transform: none; }
.btn-submit:hover { background: var(--dark-blue) !important; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 142, 176, 0.2); }
.btn-submit i { transition: transform 0.4s ease; }
.btn-submit:hover i { transform: translateX(5px); }
body.lang-ar .btn-submit { flex-direction: row-reverse; }
body.lang-ar .btn-submit:hover i { transform: translateX(-5px); }

.map-section { padding: 0 5% 80px; max-width: 1200px; margin: 0 auto; position: relative; z-index: 2;}
.map-container { width: 100%; height: 400px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-soft); border: 1px solid rgba(255,255,255,0.5); background: #eee; }
.map-container iframe { width: 100% !important; height: 100% !important; border: none !important; display: block; filter: grayscale(20%); transition: var(--transition-smooth); }
.map-container:hover iframe { filter: grayscale(0%); }

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer { background: var(--dark-blue); color: var(--white); padding: 70px 5% 30px; position: relative; z-index: 2;}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 40px; }
.footer-col h4 { font-size: 1.1rem; margin-bottom: 25px; font-weight: 700; color: var(--white); letter-spacing: 1px; text-transform: uppercase; }
.footer-col p { color: #8BA2B8; font-size: 0.95rem; margin-bottom: 20px; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 10px; color: #8BA2B8; font-size: 0.95rem; transition: var(--transition-fast); cursor: pointer; }
.footer-col ul li:hover { color: var(--primary-blue); transform: translateX(3px); }
.footer-col i { color: var(--primary-blue); font-size: 1.1rem; margin-top: 3px; }
.footer-bottom { text-align: center; padding-top: 25px; color: #58728C; font-size: 0.85rem; }

/* ==========================================================================
   9. PAGE SPÉCIALITÉS (DESIGN PREMIUM)
   ========================================================================== */
.specialties-section { padding: 80px 5%; position: relative; z-index: 2; background: transparent; }
.container-specialties { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 60px; }

/* Bloc Catégorie */
.specialty-category-card { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(15px); border-radius: 24px; padding: 50px; box-shadow: var(--shadow-soft); border: 1px solid rgba(255, 255, 255, 0.8); transition: var(--transition-smooth); }
.specialty-category-card:hover { box-shadow: var(--shadow-hover); background: rgba(255, 255, 255, 0.9); }

/* En-tête de la catégorie */
.category-header { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; border-bottom: 2px solid rgba(0, 142, 176, 0.1); padding-bottom: 20px; }
.category-icon { width: 60px; height: 60px; background: var(--gradient-primary); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--white); box-shadow: var(--shadow-soft); }
.category-header h3 { font-size: 2rem; color: var(--dark-blue); font-weight: 800; }

/* Grille des spécialités */
.specialty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; }

/* Design de chaque spécialité */
.specialty-item { background: var(--white); padding: 15px 20px; border-radius: 12px; font-weight: 600; color: var(--text-main); display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); border: 1px solid rgba(0, 142, 176, 0.08); transition: var(--transition-fast); cursor: default; }
.specialty-item i { color: var(--primary-blue); font-size: 1.1rem; transition: transform 0.3s ease; }
.specialty-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary-blue); color: var(--primary-blue); }
.specialty-item:hover i { transform: scale(1.2); }

/* ==========================================================================
   10. RESPONSIVE & ANIMATIONS MOBILE
   ========================================================================== */
@media (max-width: 992px) {
    header { top: 0; padding: 15px 5%; }
    .btn-nav-devis { display: none; }
    .mobile-menu-btn { display: block; }
    
    nav ul { position: fixed; top: 0; right: -100%; width: 300px; height: 100vh; background: rgba(255,255,255,0.98); backdrop-filter: blur(20px); flex-direction: column; justify-content: center; box-shadow: -10px 0 30px rgba(0,0,0,0.08); padding: 40px; transition: 0.5s cubic-bezier(0.22, 1, 0.36, 1); z-index: 1001;}
    nav ul.active { right: 0; }
    nav ul li a { color: var(--dark-blue); font-size: 1.2rem; }
    
    nav ul li { opacity: 0; transform: translateY(15px); transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
    nav ul.active li { opacity: 1; transform: translateY(0); }
    nav ul.active li:nth-child(1) { transition-delay: 0.1s; }
    nav ul.active li:nth-child(2) { transition-delay: 0.15s; }
    nav ul.active li:nth-child(3) { transition-delay: 0.2s; }
    nav ul.active li:nth-child(4) { transition-delay: 0.25s; }
    nav ul.active li:nth-child(5) { transition-delay: 0.3s; }

    .dropdown-menu { position: relative; top: 0; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; padding-left: 15px; display: none;}
    .dropdown:hover .dropdown-menu { display: flex; animation: slideDown 0.3s ease forwards; } 
    
    .menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 25, 47, 0.5); backdrop-filter: blur(3px); z-index: 999; display: none; opacity: 0; transition: var(--transition-fast);}
    .menu-overlay.active { display: block; opacity: 1;}

    .about-section, .mission-section { flex-direction: column; padding: 60px 5%; gap: 40px; }
    .about-features { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3.5rem; }
    .page-header h1 { font-size: 2.8rem; }
    
    .timeline::after { left: 30px; transform: none; }
    html[dir="rtl"] .timeline::after { right: 30px; left: auto; }
    .timeline-step { width: 100%; padding: 20px 0 20px 70px; left: 0 !important; text-align: left !important;}
    html[dir="rtl"] .timeline-step { padding: 20px 70px 20px 0; right: 0 !important; text-align: right !important;}
    .timeline-step:nth-child(odd) .timeline-icon, .timeline-step:nth-child(even) .timeline-icon { left: 10px; right: auto; top: 20px; }
    html[dir="rtl"] .timeline-step:nth-child(odd) .timeline-icon, html[dir="rtl"] .timeline-step:nth-child(even) .timeline-icon { right: 10px; left: auto; }
    
    .service-row, .service-row.reverse { flex-direction: column; gap: 30px; margin-bottom: 60px; }
    .service-image::before { display: none; }
    .service-icon-large { left: 10px !important; bottom: -15px; width: 60px; height: 60px; font-size: 1.6rem; }
    
    .contact-section { flex-direction: column; gap: 40px; }
    .form-grid { grid-template-columns: 1fr; }
    .map-container { height: 300px; border-radius: 16px; }

    .reveal-left, .reveal-right { transform: translateY(20px) !important; }
    .reveal-left.active, .reveal-right.active { transform: translateY(0) !important; }

    .service-card:active, .process-step:active, .value-card:active { transform: scale(0.98) !important; transition: 0.1s; }
}

@media (max-width: 768px) {
    .specialty-category-card { padding: 30px 20px; }
    .category-header h3 { font-size: 1.5rem; }
    .specialty-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .stats-grid { grid-template-columns: 1fr; }
    .cta-content h2 { font-size: 2rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .process-grid { gap: 20px; }
    .guarantee-banner { flex-direction: column; text-align: center; padding: 30px 20px; border-radius: 16px; }
    .guarantee-banner .bg-icon { font-size: 5rem; }
}

/* ==========================================================================
   11. TRADUCTIONS RTL (ARABE)
   ========================================================================== */
html[dir="rtl"] .timeline::after { right: 50%; left: auto; transform: translateX(50%); }
html[dir="rtl"] .timeline-step:nth-child(odd) { right: 0; left: auto; text-align: left; }
html[dir="rtl"] .timeline-step:nth-child(even) { right: 50%; left: auto; text-align: right; }
html[dir="rtl"] .timeline-step:nth-child(odd) .timeline-icon { left: -22px; right: auto; }
html[dir="rtl"] .timeline-step:nth-child(even) .timeline-icon { right: -22px; left: auto; }




/* ==========================================================================
   AFFICHAGE DES IMAGES OPPOSÉES DANS LA TIMELINE
   ========================================================================== */

/* Conteneur de l'image, positionné en absolu par rapport à la carte texte */
.timeline-image-opposite {
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* Centre l'image verticalement par rapport au texte */
    width: 100%; /* Prend la même largeur que l'étape (la moitié de l'écran) */
    display: flex;
    z-index: 1;
}

/* L'image en elle-même */
.timeline-image-opposite img {
    width: 100%;
    max-width: 420px; /* J'ai mis un peu plus grand pour que ce soit bien visible */
    height: auto; /* Magie : la hauteur s'adapte à l'image complète ! */
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 3px solid rgba(255,255,255,0.7);
    transition: var(--transition-smooth);
}
.timeline-image-opposite img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-blue);
}

/* --- ÉTAPES IMPAIRES (1, 3, 5) : Texte à GAUCHE, Image envoyée à DROITE --- */
.timeline-step:nth-child(odd) .timeline-image-opposite {
    left: 100%; /* On pousse l'image dans l'autre moitié de l'écran */
    padding-left: 60px; /* Espace entre l'image et la ligne centrale */
    justify-content: flex-start;
}

/* --- ÉTAPES PAIRES (2, 4, 6) : Texte à DROITE, Image envoyée à GAUCHE --- */
.timeline-step:nth-child(even) .timeline-image-opposite {
    right: 100%; /* On pousse l'image dans l'autre moitié de l'écran */
    padding-right: 60px; /* Espace entre l'image et la ligne centrale */
    justify-content: flex-end;
}

/* ==========================================================================
   RÉGLAGES POUR MOBILE (Écrans < 992px)
   ========================================================================== */
@media (max-width: 992px) {
    /* Sur mobile, la ligne est à gauche, donc on met l'image SOUS le texte */
    .timeline-image-opposite {
        position: relative;
        top: 0;
        left: 0 !important;
        right: 0 !important;
        transform: none;
        width: 100%;
        padding: 20px 0 0 0 !important;
        justify-content: flex-start !important;
    }
    
    html[dir="rtl"] .timeline-image-opposite {
        justify-content: flex-end !important;
    }

    .timeline-image-opposite img {
        max-width: 100%;
        height: 200px;
    }
}
/* ==========================================================================
   MEGA MENU SPÉCIALITÉS
   ========================================================================== */

/* Structure principale du Mega Menu */
.mega-dropdown {
    position: static !important; /* Nécessaire pour que le menu prenne toute la largeur */
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 5%; /* Aligné avec les marges de ton header */
    right: 5%;
    width: 90%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 142, 176, 0.15);
    display: flex !important; /* Force l'affichage en colonnes */
    justify-content: space-between;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition-smooth);
    z-index: 1000;
    border: 1px solid rgba(0, 142, 176, 0.1);
    
    /* On cache le mega menu par défaut, affichage géré par le hover du parent */
    pointer-events: none; 
}

/* Affichage au survol */
.mega-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Les 3 colonnes du Mega Menu */
.mega-menu-column {
    flex: 1;
    padding: 0 20px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

/* Enlève la bordure de la dernière colonne */
.mega-menu-column:last-child {
    border-right: none;
}

html[dir="rtl"] .mega-menu-column {
    border-right: none;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}
html[dir="rtl"] .mega-menu-column:last-child {
    border-left: none;
}

/* Titres des colonnes */
.mega-menu-column h3 {
    font-size: 1.1rem;
    color: var(--dark-blue);
    margin-bottom: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 142, 176, 0.1);
}

.mega-menu-column h3 i {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

/* Liste scrollable pour les nombreuses spécialités */
.scrollable-list {
    max-height: 350px; /* Limite la hauteur */
    overflow-y: auto; /* Ajoute un scroll si c'est trop long */
    padding-right: 10px;
    list-style: none;
}

/* Style de la barre de défilement (Scrollbar) */
.scrollable-list::-webkit-scrollbar {
    width: 6px;
}
.scrollable-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.02);
    border-radius: 10px;
}
.scrollable-list::-webkit-scrollbar-thumb {
    background: rgba(0, 142, 176, 0.3);
    border-radius: 10px;
}
.scrollable-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Liens des spécialités */
.scrollable-list li {
    width: 100%;
    margin-bottom: 5px;
}

.scrollable-list li a {
    display: block;
    padding: 8px 12px;
    color: var(--text-main) !important;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition-fast);
    text-decoration: none;
}

.scrollable-list li a:hover {
    background: rgba(0, 142, 176, 0.08);
    color: var(--primary-blue) !important;
    padding-left: 18px; /* Petit effet de glissement au survol */
}

html[dir="rtl"] .scrollable-list li a:hover {
    padding-left: 12px;
    padding-right: 18px;
}

/* ==========================================================================
   MEGA MENU SUR MOBILE
   ========================================================================== */
@media (max-width: 992px) {
    .mega-menu {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column; /* Les colonnes s'empilent */
        padding: 10px;
        background: transparent;
        box-shadow: none;
        border: none;
        display: none !important; /* Caché par défaut sur mobile */
    }

    .mega-dropdown:hover .mega-menu {
        display: flex !important; /* Apparaît au clic/survol */
    }

    .mega-menu-column {
        border-right: none;
        border-left: none;
        padding: 0;
        margin-bottom: 20px;
    }
    
    .scrollable-list {
        max-height: 200px; /* Un peu plus court sur mobile */
    }
}

.scrollable-list li a i {
    color: var(--primary-blue);
    opacity: 0.6;
    margin-right: 8px; /* Espace avec le texte */
    transition: all 0.3s ease;
}
.scrollable-list li a:hover i {
    opacity: 1;
    transform: translateX(5px); /* La petite flèche avance au survol ! */
}

/* ==========================================================================
   CORRECTION DU BUG DE CLIC SUR LE MEGA MENU
   ========================================================================== */

/* 1. Le pont invisible pour que la souris ne quitte jamais la zone */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -30px; /* Remonte pour toucher le texte du menu */
    left: 0;
    width: 100%;
    height: 30px; /* Crée une zone de sécurité invisible */
    background: transparent;
    z-index: -1;
}

/* 2. On s'assure que le menu s'attache bien en dessous */
.mega-dropdown {
    padding-bottom: 0; /* Prolonge la zone de survol vers le bas */
}

.mega-menu {
    top: 95%; /* Colle le menu un peu plus près du texte */
}





/* Gestion de l'affichage des sous-menus sur mobile (ajout JS) */
@media (max-width: 992px) {
    .dropdown.menu-mobile-open > .dropdown-menu,
    .mega-dropdown.menu-mobile-open > .mega-menu {
        display: flex !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}