/* Podomed – lecture de droite à gauche (arabe).
   Chargé uniquement quand la page est en RTL (is_rtl()), après style.css et ux.css.
   Le français et l'anglais ne sont pas concernés : ces règles sont toutes préfixées par body.rtl. */

/* ---- Typographie ------------------------------------------------------- */
/* Cairo en premier : il ne contient que l'arabe, le latin (numéros, « WhatsApp ») reste en Poppins. */
body.rtl { --pm-font: 'Cairo', 'Poppins', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif; }
/* Elementor (kit) impose Poppins sur les titres et textes : on le remplace, sauf pour les icônes. */
body.rtl :is(h1, h2, h3, h4, h5, h6, p, li, a, span, div, button, label, input, textarea, .elementor-heading-title, .elementor-button, .elementor-button-text):not([class*="fa-"]):not([class*="eicon"]):not(.fa):not(.fas):not(.far):not(.fab) { font-family: var(--pm-font) !important; }
/* Un interlettrage négatif ou positif coupe les liaisons des lettres arabes. */
body.rtl,
body.rtl :is(h1, h2, h3, h4, h5, p, a, li, span, div, button, .elementor-heading-title, .elementor-button) { letter-spacing: 0 !important; }
body.rtl :is(p, li, .elementor-widget-text-editor, .elementor-icon-box-description) { line-height: 1.85; }
body.rtl :is(h1, h2, h3) { line-height: 1.35; }
/* « Caveat » (écriture manuscrite) n'a pas d'arabe : on garde la police du site. */
body.rtl .pm-script, body.rtl .pm-script p { font-family: var(--pm-font); font-weight: 600; }

/* ---- Alignements ------------------------------------------------------- */
body.rtl .pm-feat .elementor-icon-box-wrapper,
body.rtl .pm-feat,
body.rtl .pm-range__grid { text-align: right; }
@media (max-width: 767px) { body.rtl .pm-range__grid { text-align: right; } }

/* ---- Icônes et pictogrammes : marges du côté du texte ---------------- */
body.rtl .pm-note i,
body.rtl .pm-alger__text i,
body.rtl .pm-phone i,
body.rtl .pm-reassure i { margin-right: 0; margin-left: 8px; }
body.rtl .pm-mini { padding-left: 0; padding-right: 1.2rem; }

/* ---- Boutons : icône du côté de départ, flèche retournée ---------------- */
body.rtl .pm-btn--wa .elementor-button-text::before,
body.rtl .pm-btn--map .elementor-button-text::before { margin-right: 0; margin-left: .55em; }
body.rtl .pm-btn--navy .elementor-button-text::after,
body.rtl .pm-btn--ghost:not(.pm-btn--map) .elementor-button-text::after { content: "\f060"; margin-left: 0; margin-right: .6em; }
body.rtl .pm-btn--navy .elementor-button:hover .elementor-button-text::after,
body.rtl .pm-btn--ghost .elementor-button:hover .elementor-button-text::after { transform: translateX(-3px); }

/* ---- Numéros de téléphone : toujours lus de gauche à droite (sinon « 67 92 76 96 7 213+ ») ---- */
body.rtl a[href^="tel:"],
body.rtl .pm-foot__phone,
body.rtl :is(p, li, span) > a[href*="wa.me"]:not(.elementor-button):not(.pm-wa-float) { direction: ltr; unicode-bidi: isolate; display: inline-block; }
/* Chevron des cartes « besoins » */
body.rtl .pm-need__title .elementor-heading-title a::after { content: "\f053"; }
body.rtl .pm-need:hover .pm-need__title a::after { transform: translateX(-3px); }

/* ---- En-tête et menu ---------------------------------------------------- */
/* Le menu reste poussé vers la fin de la ligne : en RTL, c'est le côté gauche (miroir du français). */
body.rtl .site-navigation ul.menu li.pm-menu-cta > a { margin-left: 0; margin-right: 6px; }
@media (min-width: 1025px) { body.rtl .site-navigation ul.menu li.pm-menu-cta > a { margin-right: 14px; } }
body.rtl .site-navigation ul.menu li.pm-menu-cta > a::before,
body.rtl .site-header .site-navigation-dropdown ul.menu li.pm-menu-cta > a::before { margin-right: 0; margin-left: .5em; }

/* ---- Bouton WhatsApp flottant : passe à gauche pour ne pas gêner la lecture ---- */
body.rtl .pm-wa-float { right: auto; left: 18px; }

/* ---- Fil d'Ariane : le séparateur › regarde vers la gauche ----------------- */
body.rtl .pm-crumb span[aria-hidden] { display: inline-block; transform: scaleX(-1); }

/* ---- Héros : photo et voile retournés (miroir du français) ------------------
   En français : texte à gauche, semelles à droite. En arabe le texte passe à droite, il faut donc
   mettre les semelles à gauche. On retourne tout le conteneur (fond + voile) puis on remet le contenu
   à l'endroit : aucun fichier image dupliqué, et la photo choisie dans Elementor reste utilisée.
   Le voile blanc (dégradé de style.css) se retrouve ainsi du côté du texte, à droite. */
@media (min-width: 768px) {
	body.rtl .e-con.pm-hero { transform: scaleX(-1); }
	body.rtl .e-con.pm-hero > * { transform: scaleX(-1); }
}

/* ---- Professionnels : titre posé sur la photo, de l'autre côté ------------- */
/* Le titre passe à droite : la photo du médecin est retournée pour qu'il reste du côté opposé
   (sinon le texte arabe se superpose à sa blouse). */
@media (min-width: 768px) {
	body.rtl .pm-pros__text > .elementor-widget-heading:first-child { left: auto; right: 44px; }
	body.rtl .pm-pros > .elementor-widget-image img,
	body.rtl .pm-pros img[src*="professionnels-sante"] { transform: scaleX(-1); }
}

/* ---- Barre d'infos et sélecteur de langue ------------------------------- */
body.rtl .pm-topbar__wa { margin-inline-start: auto; }
