/* Siraj — surcharges propres à la version arabe (dir="rtl").
   Chargée après la feuille principale (intégrée dans chaque page) par les pages /ar/.
   La feuille principale utilise déjà des propriétés logiques (inline-start/end, text-align:start…) :
   il ne reste ici que la typographie arabe, les flèches directionnelles et les blocs techniques. */

:root[dir="rtl"] {
  /* Les polices embarquées sont latines (+ Noto Kufi Arabic pour le logotype) :
     le latin reste servi par Plus Jakarta Sans, l'arabe tombe sur Kufi puis sur les polices système. */
  --font-display: 'Plus Jakarta Sans', 'Noto Kufi Arabic', 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Arabic Typesetting', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, 'Geeza Pro', 'Noto Sans Arabic', 'Noto Naskh Arabic', 'Droid Arabic Kufi', system-ui, -apple-system, sans-serif;
}

/* L'espacement des lettres et la casse cassent la liaison des lettres arabes */
:root[dir="rtl"] *,
:root[dir="rtl"] *::before,
:root[dir="rtl"] *::after {
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Interlignes plus généreux : les signes diacritiques et les hampes arabes sont plus hauts */
:root[dir="rtl"] body { line-height: 1.75; }
:root[dir="rtl"] h1,
:root[dir="rtl"] h2,
:root[dir="rtl"] h3,
:root[dir="rtl"] h4 { line-height: 1.35; }
:root[dir="rtl"] .h1 { line-height: 1.28; font-size: clamp(2.2rem, 4.6vw, 3.7rem); }
:root[dir="rtl"] .h2 { line-height: 1.3; font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
:root[dir="rtl"] .h3 { line-height: 1.4; }
:root[dir="rtl"] .cta-band h2 { line-height: 1.3; }
:root[dir="rtl"] .post-body h2,
:root[dir="rtl"] .post-body h3 { line-height: 1.45; }
:root[dir="rtl"] .prose { line-height: 1.9; }
:root[dir="rtl"] .lead,
:root[dir="rtl"] .card p,
:root[dir="rtl"] .faq .a { line-height: 1.8; }
:root[dir="rtl"] .eyebrow { font-size: 15px; }

/* Flèches directionnelles : → devient ← */
:root[dir="rtl"] .link::after { content: '←'; }
:root[dir="rtl"] .link:hover::after { transform: translateX(-4px); }
:root[dir="rtl"] .btn svg { transform: scaleX(-1); }
:root[dir="rtl"] .drop-panel a:last-child .di svg { transform: scaleX(-1); }

/* Barre du chargeur : se remplit de la droite vers la gauche */

/* Éléments techniques : toujours de gauche à droite */
:root[dir="rtl"] code,
:root[dir="rtl"] kbd,
:root[dir="rtl"] .mono,
:root[dir="rtl"] .ds-url,
:root[dir="rtl"] .ds-row strong,
:root[dir="rtl"] .mock-ping,
:root[dir="rtl"] .contact-card a.mail,
:root[dir="rtl"] a.mail {
  direction: ltr;
  unicode-bidi: isolate;
}
:root[dir="rtl"] .verify {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

/* Maquettes d'interface : les noms d'appareils (latins) gardent leur ordre */
:root[dir="rtl"] .mock-title,
:root[dir="rtl"] .fleet-table td:first-child { unicode-bidi: plaintext; }

/* Le texte justifié ou centré garde son alignement ; les tableaux restent alignés sur le début */
:root[dir="rtl"] .nf,
:root[dir="rtl"] .section-head--center { text-align: center; }

/* Petits écrans : même gouttière que la version française */
@media (max-width: 760px) {
  :root[dir="rtl"] .h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
}
