/* Pages arabes (/ar/) : polices arabes et lecture de droite a gauche.
   Chargee seulement par les pages /ar/, apres leurs propres styles.
   Les selecteurs commencent par html[dir="rtl"] : ils l'emportent sur les styles
   de la page meme quand la navigation sans rechargement change l'ordre des feuilles.
   Polices servies par le site (assets/fonts), comme les cartes arabes en ligne :
   Amiri pour les titres (classique), Noto Naskh Arabic pour le texte (sobre).
   Les lettres latines (logo, noms, heures) gardent les polices du site. */

@font-face { font-family: 'Amiri'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/amiri-400.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Amiri'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/amiri-700.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Noto Naskh Arabic'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/assets/fonts/notonaskharabic-400.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

html[dir="rtl"] {
  --serif: 'Amiri', 'Noto Serif Display', Georgia, serif;
  --sans: 'Noto Naskh Arabic', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}
html[dir="rtl"] body { font-family: var(--sans); }

/* L'espacement des lettres casse la liaison des lettres arabes ; l'italique n'existe pas en arabe. */
html[dir="rtl"] body *:not(.nav-brand-text):not(.nav-brand-text *) { letter-spacing: 0 !important; }
html[dir="rtl"] body * { font-style: normal !important; }
/* Amiri porte haut ses voyelles : les titres serres en latin (0,95 a 1,05) se chevauchent en arabe. */
html[dir="rtl"] :is(h1, h2, h3, [class*="title"], [class*="quote"]) { line-height: 1.5 !important; }
html[dir="rtl"] :is(p, [class*="body"], [class*="sub"]) { line-height: 1.9; }
html[dir="rtl"] .nav-brand-text, html[dir="rtl"] .nav-brand-text * { direction: ltr; }

/* Petits textes en capitales (surtitres, heures, boutons) : un peu plus grands, l'arabe se lit mal sous 12 px. */
html[dir="rtl"] :is([class*="eyebrow"], [class*="-time"], [class*="-hour"], [class*="label"], [class*="-cta"],
  [class*="-tag"], [class*="rule-text"], [class*="scroll-text"], [class*="-link"]:not(.drawer-link)) { font-size: max(13px, 1em) !important; text-transform: none !important; }

/* Sous les noms de lieux : leur sens, en petit (LISEZMOI § 6). */
html[dir="rtl"] .ar-sens { display: block; font-family: 'Noto Naskh Arabic', sans-serif; font-size: 13px; font-weight: 400; line-height: 1.6; opacity: 0.75; margin-top: 6px; }
html[dir="rtl"] h1 .ar-sens, html[dir="rtl"] h2 .ar-sens { font-size: 15px; }
@media (max-width: 767px) { html[dir="rtl"] .drawer-link .ar-sens { display: none; } }
html[dir="rtl"] .drawer-link .ar-sens { font-size: 12px; margin-top: 2px; }

/* Reserver : le moteur est en anglais (mention a relire). */
html[dir="rtl"] .ar-mention-moteur { display: block; margin-top: 8px; font-size: 12px; opacity: 0.75; text-align: center; }

/* Menu lateral : il s'ouvre depuis la gauche. */
html[dir="rtl"] .drawer { right: auto; left: 0; transform: translateX(-100%); }
html[dir="rtl"] .drawer.open { transform: translateX(0); }
html[dir="rtl"] .drawer-link { text-align: right; }

/* Fleches : elles pointent vers la gauche, sens de la lecture. Pas les icones des reseaux. */
html[dir="rtl"] a:not(.footer-socials a) svg, html[dir="rtl"] button.close-btn svg { transform: scaleX(-1); }
html[dir="rtl"] a:not(.footer-socials a):hover svg { transform: scaleX(-1) translateX(4px); }

/* Telephone et courriel affiches : de gauche a droite (attribut dir pose par l'outil), meme en chiffres orientaux. */
html[dir="rtl"] [dir="ltr"] { unicode-bidi: isolate; white-space: nowrap; }

/* Bouton de musique : a droite, en miroir. */
html[dir="rtl"] .vd-musique { left: auto; right: 16px; }

/* ---------- Accueil ---------- */
@media (min-width: 1024px) and (max-width: 1671px) { html[dir="rtl"] .hero-content { padding: 0 176px 96px 96px; } }
html[dir="rtl"] .timeline-desktop { left: auto; right: max(24px, calc(50vw - 772px)); }
html[dir="rtl"] .timeline-line, html[dir="rtl"] .timeline-progress { left: auto; right: 5px; }
html[dir="rtl"] .chapter-image-label { left: auto; right: 24px; }
html[dir="rtl"] .privee-card-arrow { right: auto; left: 28px; }

/* ---------- Notre histoire ---------- */
html[dir="rtl"] .timeline { left: auto; right: max(28px, calc(50vw - 662px)); }
html[dir="rtl"] .timeline .timeline-line { left: auto; right: 4px; }
/* Grandes annees et grandes heures en filigrane : du cote oppose au texte. */
html[dir="rtl"] .era-year, html[dir="rtl"] .act-hour { right: auto; left: 5%; }


/* ---------- Le Sur-mesure ---------- */
html[dir="rtl"] .recit-list li { padding-left: 0; padding-right: 20px; }
html[dir="rtl"] .recit-list li::before { left: auto; right: 2px; }
html[dir="rtl"] .cap-table th, html[dir="rtl"] .cap-table td { text-align: right; }


/* ---------- Les Suites ---------- */
html[dir="rtl"] .hero-eyebrow-line { margin-right: 0; margin-left: 12px; }

/* ---------- Pages legales ---------- */
html[dir="rtl"] .legal-section li { padding-left: 0; padding-right: 20px; }
html[dir="rtl"] .legal-section li::before { left: auto; right: 2px; }
html[dir="rtl"] .legal-callout { border-left: 0; border-right: 3px solid var(--blue); }
