/* Surcharges persan (fa) : direction droite-gauche, polices système arabes en repli.
   Chargé après la feuille principale (déjà intégrée en ligne dans chaque page). */

:root {
  /* Seules les polices latines sont embarquées : les glyphes persans viennent des polices système. */
  --font-display: 'Plus Jakarta Sans', 'Vazirmatn', 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, Arial, system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Vazirmatn', 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, Arial, system-ui, -apple-system, sans-serif;
}

/* L'espacement entre lettres casse la liaison des lettres persanes */
:root[dir="rtl"] :where(h1, h2, h3, h4, p, li, a, span, small, b, strong, em, td, th, label, button, div, summary, time) {
  letter-spacing: 0;
}
:root[dir="rtl"] :where(.eyebrow, .answer-box b, .fleet-table th) { text-transform: none; }

/* Interlignage plus généreux pour l'écriture arabe */
:root[dir="rtl"] body { line-height: 1.8; }
:root[dir="rtl"] :where(.h1, .h2, h1, h2, .cta-band h2) { line-height: 1.4; }
:root[dir="rtl"] :where(h3, h4, .post-body h2, .post-body h3, .plan-card h3, .card h3) { line-height: 1.5; }
:root[dir="rtl"] .lead { line-height: 1.85; }
:root[dir="rtl"] .prose { line-height: 1.95; }
:root[dir="rtl"] :where(.drop-panel small) { line-height: 1.6; }
:root[dir="rtl"] .h1 { font-weight: 700; }

/* Éléments techniques : toujours de gauche à droite, isolés du texte persan */
:root[dir="rtl"] :where(code, kbd, samp) { direction: ltr; unicode-bidi: isolate; }
:root[dir="rtl"] .verify { direction: ltr; text-align: left; }
:root[dir="rtl"] :where(.mono, .ds-url, .contact-card a.mail, a[href^="mailto:"]) { direction: ltr; unicode-bidi: isolate; }
:root[dir="rtl"] .contact-card a.mail { display: inline-block; }
:root[dir="rtl"] :where(.kpi b, .ds-row strong, .mock-ping, .price) { unicode-bidi: isolate; }
:root[dir="rtl"] .price { direction: ltr; justify-content: flex-end; }

/* Flèches et icônes directionnelles */
:root[dir="rtl"] .link::after { content: '←'; }
:root[dir="rtl"] .link:hover::after { transform: translateX(-4px); }
:root[dir="rtl"] svg path[d="M5 12h14M13 6l6 6-6 6"] { transform-box: fill-box; transform-origin: center; transform: scaleX(-1); }

/* Blocs aux coins arrondis asymétriques */
:root[dir="rtl"] .prose blockquote { border-radius: 14px 0 0 14px; }
:root[dir="rtl"] .nav > a[aria-current="page"], :root[dir="rtl"] .nav-drop.is-current > button { border-radius: 10px 10px 4px 4px; }
:root[dir="rtl"] .bubble-user { border-radius: 12px 12px 12px 3px; }
:root[dir="rtl"] .ai-chat .bubble-user { border-radius: 16px 16px 16px 4px; }

/* Curseur du curseur-glissière : le point est centré sur sa position, mesurée depuis la droite */
:root[dir="rtl"] .slider::after { transform: translate(50%, -50%); }

@media (max-width: 980px) {
  :root[dir="rtl"] .drop-panel { padding: 0 8px 8px 0; }
}

/* Le menu déroulant s'ouvre vers la gauche du bouton */
:root[dir="rtl"] .drop-panel { inset-inline-start: -12px; }
