/* ==============================================================
   A47CD — i18n.css — RTL + Polices Pro Internationales
   Police LTR: Inter (Google Fonts) — chargée dans layout.mjs
   Police RTL/Arabe: Noto Naskh Arabic — pro, lisible, universelle
   ============================================================== */

/* ---------- Polices RTL pro (Arabe, Persan, Kurde, Hébreu) --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

/* ---------- RTL global ---------------------------------------- */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
  /* Cairo = font arabe moderne (titres) / Noto Naskh = corpo du texte */
  font-family: 'Cairo', 'Noto Naskh Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

html[dir="rtl"] body {
  font-family: 'Cairo', 'Noto Naskh Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  line-height: 1.85;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
  font-family: 'Cairo', 'Noto Naskh Arabic', Arial, sans-serif;
  letter-spacing: 0;
  font-weight: 700;
}

/* ---------- Corrections RTL layout ---------------------------- */
html[dir="rtl"] .nav__list,
html[dir="rtl"] .header__actions {
  margin-inline-start: auto;
}

html[dir="rtl"] .header__cta span {
  transform: rotate(180deg);
  display: inline-block;
}

html[dir="rtl"] .hero {
  background-position: left top;
}

html[dir="rtl"] .hero__badge,
html[dir="rtl"] .hero__actions {
  justify-content: flex-end;
}

/* ---------- Lang Switcher Component --------------------------- */
.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-switcher__btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text, #fff);
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.lang-switcher__btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-switcher__code {
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.lang-switcher__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(8, 8, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
  list-style: none;
  min-width: 200px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  backdrop-filter: blur(20px);
  z-index: 1000;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

html[dir="rtl"] .lang-switcher__list {
  right: auto;
  left: 0;
}

.lang-switcher__list[hidden] {
  display: none;
}

.lang-switcher__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.lang-switcher__link:hover,
.lang-switcher__link:focus {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.lang-switcher__link.is-active {
  color: #fff;
  background: rgba(124, 58, 237, 0.2);
  font-weight: 600;
}

.lang-switcher__list::-webkit-scrollbar { width: 6px; }
.lang-switcher__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}
