/* RTL minimal v2 — réactivation prudente */

/* 0. Anti-overflow horizontal (page pannable sur mobile = élément déborde) */
html, body.lang-ar {
	overflow-x: hidden;
	max-width: 100vw;
}

/* 1. Direction de base */
body.lang-ar { direction: rtl; }

/* 2. Police arabe (Tajawal pour le sans-serif, Cairo pour titres) */
body.lang-ar,
body.lang-ar input,
body.lang-ar textarea,
body.lang-ar select,
body.lang-ar button {
	font-family: 'Tajawal', 'Inter', sans-serif;
}
body.lang-ar h1,
body.lang-ar h2,
body.lang-ar h3,
body.lang-ar h4,
body.lang-ar .serif,
body.lang-ar .loader-words {
	font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* 3. Ne jamais italic en arabe */
body.lang-ar em { font-style: normal; }

/* 4. Neutraliser le shimmer-gold sur le <em> du hero (clip:text casse l'arabe) */
body.lang-ar .hero-fs h1 em {
	background: none;
	-webkit-text-fill-color: var(--gold, #C8763A);
	color: var(--gold, #C8763A);
	animation: none;
}

/* 4b. word-reveal a overflow:hidden qui coupe les descenders arabes (queue du ل) */
body.lang-ar .word-reveal {
	overflow: visible;
	line-height: 1.3;
}
body.lang-ar .word-reveal > span {
	transform: none;       /* éviter le slideUp qui peut bloquer en arabe */
	animation: none;
}

/* 5. LTR forcés (contenu universel) */
body.lang-ar input[type="email"],
body.lang-ar input[type="tel"] {
	direction: ltr;
	text-align: left;
}
body.lang-ar .marquee,
body.lang-ar .marquee-track,
body.lang-ar .article,
body.lang-ar .carte-svg-wrap {
	direction: ltr;
	text-align: left;
}

/* 6. Sélecteur langue */
.lang-switch {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	margin-inline-end: 12px;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	opacity: .75;
	transition: opacity .2s;
}
.lang-switch:hover { opacity: 1; }
body.lang-ar .lang-switch { font-family: 'Inter', sans-serif; }

/* 7. Borders qui doivent flipper LR ↔ RL */
body.lang-ar .stat {
	border-right: 3px solid var(--gold, #C8763A);
	border-left: 0;
}
body.lang-ar .quote-block {
	border-right: 4px solid var(--gold, #C8763A);
	border-left: 0;
	padding-right: 32px;
	padding-left: 0;
}
body.lang-ar .form-card .form-context {
	border-right: 3px solid var(--gold, #C8763A);
	border-left: 0;
}

/* 8. Hero badges (originale: bottom-right) */
body.lang-ar .hero-badges {
	right: auto;
	left: 32px;
}

/* 9. Timeline : positions inversées en RTL */
body.lang-ar .tl-item:nth-child(odd) {
	left: auto;
	right: 0;
	text-align: right;
}
body.lang-ar .tl-item:nth-child(even) {
	left: auto;
	right: 50%;
}
body.lang-ar .tl-item:nth-child(odd)::before {
	right: auto;
	left: -9px;
}
body.lang-ar .tl-item:nth-child(even)::before {
	left: auto;
	right: -9px;
}

/* 10. Lightbox prev/next */
body.lang-ar .lightbox-prev { left: auto; right: -72px; }
body.lang-ar .lightbox-next { right: auto; left: -72px; }

/* 11. Mobile (≤900px) — RTL fixes */
@media (max-width: 900px) {
	body.lang-ar .timeline::before {
		left: auto !important;
		right: 18px !important;
	}
	body.lang-ar .tl-item,
	body.lang-ar .tl-item:nth-child(odd),
	body.lang-ar .tl-item:nth-child(even) {
		width: 100% !important;
		left: auto !important;
		right: 0 !important;
		text-align: right !important;
		padding: 24px 40px 24px 0 !important;
	}
	body.lang-ar .tl-item::before,
	body.lang-ar .tl-item:nth-child(odd)::before,
	body.lang-ar .tl-item:nth-child(even)::before {
		left: auto !important;
		right: 9px !important;
	}
	body.lang-ar .lightbox-prev { right: 8px; left: auto; }
	body.lang-ar .lightbox-next { left: 8px;  right: auto; }

	/* Hero badges sur mobile : déjà display:none via le CSS original */
}

/* 12. Mobile petit (≤700px) — adapter le hero pour les mots arabes longs */
@media (max-width: 700px) {
	body.lang-ar .hero-fs h1 {
		font-size: clamp(40px, 11vw, 64px);
	}
}
