/* ============================================================
   npartajiw — version Darija (arabe, RTL)
   Reprend les tokens de styles.css, change juste les polices
   (Cairo pour les titres, Tajawal pour le texte courant — le
   mono Space Mono reste pour les chiffres purs : solde, scores).
   ============================================================ */

@import url('styles.css');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@500;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --display-ar: 'Cairo', 'Tajawal', sans-serif;
  --body-ar: 'Tajawal', 'Cairo', sans-serif;
}

html[dir="rtl"] body {
  font-family: var(--body-ar);
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .display {
  font-family: var(--display-ar);
  text-transform: none;
  letter-spacing: 0;
}

/* Ces éléments contiennent maintenant du texte arabe, pas des
   labels courts latins : on repasse en police body arabe. */
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .ticker-item,
html[dir="rtl"] .phone-row,
html[dir="rtl"] .pill,
html[dir="rtl"] .sb-row.head,
html[dir="rtl"] .step-num,
html[dir="rtl"] .legal-updated {
  font-family: var(--body-ar);
  letter-spacing: 0;
  text-transform: none;
}

/* Les chiffres purs (solde, scores, rangs) restent en Space Mono
   — ils s'affichent correctement même dans un contexte RTL. */
html[dir="rtl"] .amount,
html[dir="rtl"] .sb-score,
html[dir="rtl"] .sb-rank {
  font-family: var(--mono);
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] .back-link {
  flex-direction: row-reverse;
}

html[dir="rtl"] .lang-switch {
  font-size: 13px;
  color: var(--chalk);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
}
html[dir="rtl"] .lang-switch:hover { color: var(--floodlight); }
