/* =====================================================================
   HUMANIQ — Surcouche RTL / Arabe
   À charger APRÈS style.css sur les pages en arabe.
   On ne touche PAS aux alignements — flex/grid et les text-align
   spécifiques (center notamment) restent hérités du fichier principal.
   ===================================================================== */

/* ---------- Police arabe ---------- */
body {
  font-family: 'Tajawal', 'Cairo', 'Noto Sans Arabic', 'Fira Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

h1, h2, h3, h4, h5 {
  font-family: 'Tajawal', 'Cairo', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

/* L'italique est moins pertinent en arabe — on le neutralise, on garde la couleur */
em {
  font-style: normal;
  color: var(--don);
}

/* Chiffres et éléments monospace */
.stat-num, .font-mono {
  font-family: 'Tajawal', 'Fira Code', monospace;
}

/* ---------- Inversion des flèches décoratives ---------- */
[dir="rtl"] .btn .fa-arrow-right,
[dir="rtl"] .btn .fa-arrow-left {
  transform: scaleX(-1);
}

/* ---------- Navbar mobile : mirror du hamburger + text-align ---------- */
@media (max-width: 960px) {
  [dir="rtl"] .nav-cta {
    right: auto;
    left: 14px;
  }
  [dir="rtl"] .nav-links a {
    text-align: right;
  }
  /* Logo un peu plus compact en mobile AR car "هيومن آي كيو" est long */
  [dir="rtl"] .logo {
    font-size: 17px;
    gap: 6px;
  }
  [dir="rtl"] .logo-mark {
    width: 34px;
    height: 34px;
  }
  /* Laisser plus de place au logo centré ; le hamburger est à gauche */
  [dir="rtl"] .navbar-inner {
    padding-left: 60px;
    padding-right: 14px;
  }
  /* Hero AR mobile : on respecte le centrage hérité de .hero-inner */
  [dir="rtl"] .hero-inner {
    text-align: center;
    padding: 0 12px;
  }
  [dir="rtl"] .hero h1 {
    word-spacing: 0.05em;
    line-height: 1.35;
  }
  /* Les 3 CTA prennent toute la largeur, bien visibles */
  [dir="rtl"] .cta-trio .btn {
    justify-content: center;
    font-size: 15px;
  }
}

/* ---------- Hide nav lang-switches on mobile, move them into the menu ---------- */
/* (appliqué pour FR et AR via style.css — voir aussi style.css) */

/* ---------- Blocs LTR dans un contexte RTL (données bancaires, numéros) ---------- */
.tel-num, .phone-num,
[dir="rtl"] code,
[dir="rtl"] .bank-value[data-ltr],
[dir="rtl"] .impact-card strong {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

/* ---------- Footer ---------- */
[dir="rtl"] footer ul li { text-align: right; }
[dir="rtl"] footer ul { padding-right: 0; padding-left: 0; }

/* ---------- Finitions typo arabe ---------- */

/* Puces custom alignées à droite */
[dir="rtl"] .feature-list li::before,
[dir="rtl"] .benefits-list li::before {
  content: '◆';
  color: var(--don);
  margin-left: 10px;
  margin-right: 0;
}

/* ---------- LANG SWITCH (partagé avec style.css mais au cas où) ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.lang-switch:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* ---------- SPLASH DE CHOIX DE LANGUE (identique FR / AR) ---------- */
.lang-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lsFade .2s ease;
}
@keyframes lsFade { from { opacity: 0 } to { opacity: 1 } }
.lang-splash-card {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 44px 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: lsSlide .3s cubic-bezier(.4, 0, .2, 1);
}
@keyframes lsSlide { from { transform: translateY(12px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
.lang-splash-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}
.lang-splash-logo img { width: 100%; height: 100%; object-fit: contain; }
.lang-splash-card h1 {
  font-family: 'Playfair Display', 'Tajawal', Georgia, serif;
  font-size: 32px;
  letter-spacing: -.5px;
  margin-bottom: 4px;
  color: var(--ink);
}
.lang-splash-card .lead {
  color: var(--ink-muted);
  font-size: 14px;
  margin-bottom: 26px;
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}
.lang-splash-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lang-splash-actions.lang-3 { grid-template-columns: repeat(3, 1fr); }
.lang-splash-actions button {
  font-family: inherit;
  padding: 16px 10px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.lang-splash-actions button:hover {
  border-color: var(--don);
  background: var(--don-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.lang-splash-actions button .flag { font-size: 22px; line-height: 1; }
.lang-splash-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--ink-muted);
}
@media (max-width: 480px) {
  .lang-splash-card { padding: 32px 22px; }
  .lang-splash-card h1 { font-size: 26px; }
  .lang-splash-actions,
  .lang-splash-actions.lang-3 { grid-template-columns: 1fr; }
}
