/* ===========================================================
   DTS TMS — Couche arabe (RTL) pour l'espace interne.
   Chargée en permanence ; active seulement sous body.rtl.
   =========================================================== */
body.rtl{ direction:rtl; font-family:'Cairo','Inter',system-ui,sans-serif; }
body.rtl button, body.rtl input, body.rtl select, body.rtl textarea{ font-family:inherit; }

/* L'arabe est cursif : neutraliser inter-lettrage et majuscules forcées */
body.rtl .tb-crumb, body.rtl .kpi .kt, body.rtl .card-kicker, body.rtl .section-label,
body.rtl .doc-req, body.rtl .ck-sev, body.rtl .lc-tms, body.rtl .od-meta .l,
body.rtl .kvr .kk, body.rtl .tbl th, body.rtl .tb-live{ letter-spacing:normal; text-transform:none; }

/* Marque latine et codes restent LTR */
body.rtl .sb-brand, body.rtl .lc-brand, body.rtl .od-id, body.rtl .op-id,
body.rtl .kv, body.rtl .kvr .vv, body.rtl .inv-line .a, body.rtl .inv-total .a,
body.rtl .ws-ring span, body.rtl .sb-avatar, body.rtl .ltr{ direction:ltr; unicode-bidi:isolate; }

/* Recherche : icône à droite */
body.rtl .tb-search svg{ left:auto; right:12px; }
body.rtl .tb-search input{ padding:10px 38px 10px 14px; }

/* Menus / marges inline : laisser flex + dir gérer, quelques retouches */
body.rtl .lock-reasons{ right:auto; left:0; }
body.rtl .toast{ right:auto; left:24px; }
body.rtl .menu-btn{ margin-left:0; margin-right:auto; }

/* Sélecteur de langue */
.applang{ display:inline-flex; gap:8px; align-items:center; font-weight:700; }
.applang a{ cursor:pointer; opacity:.6; color:var(--slate-500); }
.applang a:hover{ opacity:1; color:var(--blue-500); }
.applang a.on{ opacity:1; color:var(--blue-500); }

/* Cartes / tables : alignement droite déjà via dir=rtl ; forcer l'entête à droite */
body.rtl .tbl th, body.rtl .tbl td{ text-align:right; }
body.rtl .tbl th[style*="text-align:right"], body.rtl .tbl td[style*="text-align:right"]{ text-align:left; }
