/* =====================================================================
   MSH-AFRIQUE — Adaptation RTL (arabe)
   Chargée uniquement lorsque la langue active s'écrit de droite à gauche.
   ===================================================================== */

body { direction: rtl; text-align: right; }

.topbar .container,
.header .container,
.footer-bottom,
.cta .container { flex-direction: row-reverse; }

.brand { flex-direction: row-reverse; }
.nav { flex-direction: row-reverse; }
.topbar-links, .topbar-info, .header-cta { flex-direction: row-reverse; }

.submenu { left: auto; right: 0; text-align: right; }
.nav-item:last-child .submenu, .nav-item:nth-last-child(2) .submenu { right: auto; left: 0; }
.submenu a { border-left: 0; border-right: 3px solid transparent; }
.submenu a:hover { border-right-color: var(--secondary); padding-right: 17px; padding-left: 14px; }
.sub-toggle { right: auto; left: 4px; }

.slide-body .container, .page-hero .container { text-align: right; }
.slide::after { background: linear-gradient(260deg, rgba(6,26,51,.96) 12%, rgba(8,33,63,.78) 48%, rgba(8,33,63,.28) 100%); }
.page-hero::after { background: linear-gradient(270deg, rgba(6,26,51,.95), rgba(8,33,63,.6)); }
.slider-prev { left: auto; right: 16px; transform: translateY(-50%) rotate(180deg); }
.slider-next { right: auto; left: 16px; transform: translateY(-50%) rotate(180deg); }

.ticker-track { animation-direction: reverse; }
.logo-marquee { animation-direction: reverse; }

.mosaic img:nth-child(even) { margin-top: 28px; }
.card-body, .box, .value-card, .form-card { text-align: right; }
.meta-list .v { text-align: left; }
.card-link::after { content: " ←"; }
.card-link { }

.float-actions { right: auto; left: 16px; align-items: flex-start; }
.whatsapp-float { right: auto; left: 18px; }
.pwa-banner { flex-direction: row-reverse; }

.dash { direction: rtl; }
.dash-side a { flex-direction: row-reverse; }
.member-card .mc-code { flex-direction: row-reverse; }

table.tbl th, table.tbl td { text-align: right; }
.df-search input { padding-left: 14px; padding-right: 42px; }
.df-ico { left: auto; right: 15px; }

.ribbon { left: auto; right: 12px; }
.ribbon-right { right: auto; left: 12px; }
.status-chip { right: auto; left: 12px; }
.live-badge.on-card { left: auto; right: 12px; }
.mt-flag { right: auto; left: 14px; }

.breadcrumb { direction: rtl; }
.steps, .wc-actions, .slide-actions, .share-grid { direction: rtl; }
.ec-top, .rep-head, .dir-card, .world-item { flex-direction: row-reverse; }
.progress div { float: right; }

.lang-menu { left: 0; right: auto; }

/* Police adaptée à l'arabe */
body, .btn, input, select, textarea, table.tbl {
  font-family: "Segoe UI", "Tahoma", "Noto Naskh Arabic", "Arial", sans-serif;
}
h1, h2, h3, h4 { letter-spacing: 0; }

/* Nouveau menu institutionnel en RTL */
.header > .container { flex-direction: row-reverse; }
.nav { margin-left: 0; margin-right: auto; }
.nav-item > a { flex-direction: row-reverse; }
.submenu a { flex-direction: row-reverse; text-align: right; }
.submenu a:hover { padding-left: 14px; padding-right: 18px; }
.submenu-arrow { left: auto; right: 26px; }
.submenu-head { text-align: right; }
.header-cta { flex-direction: row-reverse; }
.hdr-btn { flex-direction: row-reverse; }
.nav-item > a::after { transform-origin: right; }
@media (max-width: 1024px) {
  .nav { inset: 0 auto 0 0; transform: translateX(-105%); box-shadow: 18px 0 46px -24px rgba(8,33,63,.8); }
  .nav.open { transform: none; }
  .sub-toggle { right: auto; left: 4px; }
  .submenu { border-left: 0; border-right: 2px solid var(--line); margin: 2px 14px 8px 0; padding: 0 6px 0 0; }
}

/* ===================== Correctifs responsive en RTL ===================== */
@media (max-width: 1024px) {
  .nav {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 18px 0 46px -24px rgba(8, 33, 63, .8);
    padding: 84px 16px calc(28px + env(safe-area-inset-bottom));
  }
  .nav.open { transform: translateX(0); }
  .nav-item > a { padding: 13px 14px 13px 52px; }
  .sub-toggle { right: auto; left: 4px; }
  .submenu { border-inline-start: 0; border-inline-end: 2px solid var(--line); margin: 2px 14px 8px 0; padding: 0 6px 0 0; }
}
@media (max-width: 480px) { .nav { width: 100%; } }

.header-cta { margin-inline-start: auto; margin-inline-end: 0; }
.float-actions { right: auto; left: 12px; }
