/* =====================================================================
   EduLink Learning — V9.5 : interface trilingue (fr, en, ar)
   Polices arabes LOCALES (Tajawal pour le texte, Amiri pour les titres à empattement),
   sélecteur de langue, et ajustements de lecture de droite à gauche (dir="rtl").
   ===================================================================== */
@font-face { font-family:'Tajawal'; src:url('fonts/Tajawal-Medium.ttf') format('truetype'); font-weight:400 600; font-display:swap; }
@font-face { font-family:'Tajawal'; src:url('fonts/Tajawal-Bold.ttf') format('truetype'); font-weight:700 900; font-display:swap; }
@font-face { font-family:'Amiri'; src:url('fonts/Amiri-Bold.ttf') format('truetype'); font-weight:400 900; font-display:swap; }

/* Arabe : Tajawal pour l'interface ; les titres à empattement passent en Amiri */
html[lang="ar"] body, html[lang="ar"] button, html[lang="ar"] input, html[lang="ar"] select, html[lang="ar"] textarea {
  font-family:'Tajawal', 'Inter', system-ui, sans-serif !important; letter-spacing:0 !important;
}
html[lang="ar"] .serif, html[lang="ar"] h1.serif, html[lang="ar"] [class*="serif"],
html[lang="ar"] .hero--ref h1, html[lang="ar"] .v3-title, html[lang="ar"] .section h2 { font-family:'Amiri', 'DM Serif Display', serif !important; letter-spacing:0 !important; }
html[lang="ar"] [class*="kicker"], html[lang="ar"] .eyebrow { letter-spacing:0 !important; text-transform:none !important; }
html[lang="ar"] body { line-height:1.6; }

/* Sélecteur de langue */
.edu-lang { display:inline-flex; align-items:center; gap:2px; padding:3px; border:1px solid #E4DFEA; border-radius:999px; background:#fff; direction:ltr; }
.edu-lang a { display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:30px; padding:0 9px; border-radius:999px;
  font:700 12.5px/1 'Inter', 'Tajawal', sans-serif; color:#514466 !important; text-decoration:none !important; letter-spacing:.02em; }
.edu-lang a[lang="ar"] { font-family:'Tajawal', sans-serif; font-size:15px; }
.edu-lang a:hover { background:#F1EBFC; color:#302044 !important; }
.edu-lang a[aria-current="true"] { background:#302044; color:#fff !important; }
.edu-lang a:focus-visible { outline:3px solid #302044; outline-offset:2px; }
@media (pointer:coarse) { .edu-lang a { height:36px; min-width:40px; } }
.edu-lang--sombre { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.18); }
.edu-lang--sombre a { color:#E9E3F5 !important; }
.edu-lang--sombre a[aria-current="true"] { background:#fff; color:#302044 !important; }
.edu-sr { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- Lecture de droite à gauche ----------
   Les mises en page flex/grid s'inversent d'elles-mêmes avec dir="rtl" ; on corrige ici
   les alignements, marges et positions écrites « à gauche » dans les feuilles existantes. */
html[dir="rtl"] body { text-align:right; }
html[dir="rtl"] .ga-svg, html[dir="rtl"] .gb-svg, html[dir="rtl"] svg.chart, html[dir="rtl"] code, html[dir="rtl"] pre, html[dir="rtl"] .mono,
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="url"], html[dir="rtl"] input[type="tel"], html[dir="rtl"] .ltr { direction:ltr; }
html[dir="rtl"] input[type="email"], html[dir="rtl"] input[type="url"], html[dir="rtl"] input[type="tel"] { text-align:right; }
/* Icônes de flèche : pointent dans le sens de lecture */
html[dir="rtl"] .icon-arrow-right, html[dir="rtl"] .icon-arrow-left, html[dir="rtl"] .icon-chevron-left,
html[dir="rtl"] svg[data-icon="arrow-right"], html[dir="rtl"] svg[data-icon="arrow-left"], html[dir="rtl"] svg[data-icon="chevron-left"] { transform:scaleX(-1); }
/* Listes et tableaux */
html[dir="rtl"] ul, html[dir="rtl"] ol { padding-right:1.4em; padding-left:0; }
html[dir="rtl"] th, html[dir="rtl"] td { text-align:right; }
/* Barres de progression : se remplissent de droite à gauche */
html[dir="rtl"] .gm-bar i, html[dir="rtl"] [role="progressbar"] > i, html[dir="rtl"] [role="progressbar"] > span { margin-left:auto; }

/* Sélecteur flottant (pages de connexion, inscription, assistants) */
.edu-lang-float { position:fixed; top:14px; inset-inline-end:14px; z-index:60; box-shadow:0 6px 18px rgba(48,32,68,.10); border-radius:999px; }
@media print { .edu-lang, .edu-lang-float { display:none !important; } }

/* Lien d'évitement : en RTL, le décalage à gauche créerait un défilement horizontal */
html[dir="rtl"] body.ec .ec-skip { left:auto; right:-9999px; }
html[dir="rtl"] body.ec .ec-skip:focus { right:12px; }
html[dir="rtl"] body { overflow-x:hidden; }
/* Mobile : sélecteur compact ; dans l'en-tête public il passe dans le menu */
.nav-lang-mobile { display:none; }
@media (max-width:640px) {
  .edu-lang a { min-width:32px; height:32px; padding:0 6px; font-size:12px; }
  .eu-top-right .eu-sitelink { display:none !important; }
  .nav-cta .edu-lang { display:none; }
  .nav-lang-mobile { display:block; padding:10px 0; }
}
