/* Kheweul UA — rtl.css
   Overrides RTL pour l'arabe. Activés uniquement via [dir="rtl"].
   Ce fichier est toujours chargé — les sélecteurs ne s'appliquent
   que lorsque le moteur i18n positionne dir="rtl" sur <html>.
   ================================================================ */

/* ── 1. DIRECTION GLOBALE ────────────────────────────────────── */
[dir="rtl"] body {
    text-align: right;
}

/* ── 2. TYPOGRAPHIE ──────────────────────────────────────────── */
html.lang-ar body,
html.lang-ar h1,
html.lang-ar h2,
html.lang-ar h3,
html.lang-ar h4,
html.lang-ar p,
html.lang-ar span,
html.lang-ar a,
html.lang-ar button {
    font-family: 'Segoe UI', 'Tahoma', 'Arabic Transparent',
                 'Traditional Arabic', 'Noto Sans Arabic',
                 'Arial Unicode MS', sans-serif;
}

/* ── 3. NAVIGATION ───────────────────────────────────────────── */
[dir="rtl"] .glass-nav-unified {
    flex-direction: row-reverse;
}
[dir="rtl"] nav.nav-desktop {
    flex-direction: row-reverse;
}
/* Le sélecteur de langue reste toujours LTR */
[dir="rtl"] .lang-switcher {
    direction: ltr;
    flex-direction: row;
}
[dir="rtl"] .nav-ctas {
    flex-direction: row-reverse;
}

/* ── 4. HERO ─────────────────────────────────────────────────── */
[dir="rtl"] .fp-hero-inner {
    flex-direction: row-reverse;
}
[dir="rtl"] .fp-hero-left {
    text-align: right;
}
[dir="rtl"] .hero-ctas {
    flex-direction: row-reverse;
    justify-content: flex-start;
}
[dir="rtl"] .overline-label {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* ── 5. BENTO CARDS ──────────────────────────────────────────── */
[dir="rtl"] .bento-card {
    text-align: right;
}
[dir="rtl"] .bento-icon {
    margin-left: auto;
    margin-right: 0;
}

/* ── 6. EAI CHIPS ────────────────────────────────────────────── */
[dir="rtl"] .eai-chip {
    flex-direction: row-reverse;
    text-align: right;
}
/* Les adresses email/domaines restent toujours LTR */
[dir="rtl"] .eai-chip code,
[dir="rtl"] code,
[dir="rtl"] .font-mono {
    direction: ltr;
    unicode-bidi: embed;
}

/* ── 7. COUNTDOWN ────────────────────────────────────────────── */
[dir="rtl"] .countdown-grid {
    flex-direction: row-reverse;
    flex-wrap: nowrap;          /* empêche le retour à la ligne en arabe */
}
/* Les chiffres du countdown restent LTR */
[dir="rtl"] .countdown-number,
[dir="rtl"] .countdown-sep {
    direction: ltr;
    unicode-bidi: embed;
}
[dir="rtl"] .countdown-label {
    direction: rtl;
}

/* ── 8. STATS STRIP ──────────────────────────────────────────── */
[dir="rtl"] .stats-strip {
    flex-direction: row-reverse;
}
[dir="rtl"] .stat-item {
    text-align: right;
}
/* Les valeurs numériques restent LTR pour éviter l'inversion RTL */
[dir="rtl"] .fp-stat-num {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}
[dir="rtl"] .fp-big-num {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

/* ── 9. AGENDA ───────────────────────────────────────────────── */
[dir="rtl"] .agenda-card {
    text-align: right;
}
[dir="rtl"] .agenda-time {
    text-align: right;
}

/* ── 10. FOOTER ──────────────────────────────────────────────── */
[dir="rtl"] footer {
    direction: rtl;
}
[dir="rtl"] .footer-link {
    text-align: right;
}
[dir="rtl"] .partners-logos {
    flex-direction: row-reverse;
}
[dir="rtl"] .marquee-track {
    animation-direction: reverse;
}

/* ── 11. BOUTON BACK TO TOP ──────────────────────────────────── */
[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

/* ── 12. BARRE DE PROGRESSION ────────────────────────────────── */
[dir="rtl"] #scroll-progress {
    right: 0;
    left: auto;
    transform-origin: right;
}

/* ── 13. NAVIGATION MOBILE ───────────────────────────────────── */
[dir="rtl"] #mobile-nav {
    text-align: right;
}
[dir="rtl"] #mobile-nav a {
    text-align: right;
    justify-content: flex-end;
    flex-direction: row-reverse;
}

/* ── 14. SECTIONS GÉNÉRALES ──────────────────────────────────── */
[dir="rtl"] .section-title,
[dir="rtl"] .section-subtitle,
[dir="rtl"] .eyebrow,
[dir="rtl"] .overline-label {
    text-align: right;
}
[dir="rtl"] .editorial-header {
    text-align: right;
}

/* ── 15. GRILLES & FLEXBOX ───────────────────────────────────── */
[dir="rtl"] .idn-step {
    flex-direction: row-reverse;
}
[dir="rtl"] .compare-row {
    flex-direction: row-reverse;
}

/* ── 16. CTA SECTION ─────────────────────────────────────────── */
[dir="rtl"] .fp-cta-box {
    text-align: right;
}
[dir="rtl"] .fp-cta-box .hero-ctas {
    justify-content: flex-start;
}
