/* FreeWorkDZ — Ajustements multilingues (anglais, arabe).
   1. Textes générés en CSS (content: '…'), inaccessibles à la traduction serveur.
   2. Corrections de mise en page de droite à gauche pour les styles propres au site
      (Bootstrap est chargé dans sa version RTL officielle pour l'arabe). */

/* ── 1. Textes en CSS ─────────────────────────────────────────────────────── */
html[lang="en"] .hero-copy::before { content: 'FREEWORK PRO · 100% ALGERIAN'; }
html[lang="ar-DZ"] .hero-copy::before { content: 'FREEWORK PRO · جزائري 100%'; }
html[lang="en"] .hero-tags-label::after { content: 'Scroll'; }
html[lang="ar-DZ"] .hero-tags-label::after { content: 'مرّر'; }
html[lang="en"] .svc-price:before { content: 'From'; }
html[lang="ar-DZ"] .svc-price:before { content: 'ابتداءً من'; }

/* ── 2. Droite à gauche ───────────────────────────────────────────────────── */
html[dir="rtl"] body { font-family: 'Inter', 'Segoe UI', Tahoma, 'Noto Sans Arabic', Arial, sans-serif; }

/* Groupes de champs (style.css) : icône à droite, coins inversés. */
html[dir="rtl"] .input-group .form-control { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
html[dir="rtl"] .input-group .btn,
html[dir="rtl"] .input-group [data-toggle-password] { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
html[dir="rtl"] .input-group-text {
    border-right: 1.5px solid #d1d5db;
    border-left: 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
html[dir="rtl"] .input-group > :not(:first-child) { margin-left: 0; margin-right: -1.5px; }

/* Les champs de saisie d'adresses, e-mails, téléphones et montants restent de gauche à droite. */
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="password"] { direction: ltr; text-align: right; }
html[dir="rtl"] input[type="email"]::placeholder,
html[dir="rtl"] input[type="url"]::placeholder,
html[dir="rtl"] input[type="password"]::placeholder { text-align: right; }

/* Flèches « suivant » orientées dans le sens de lecture. */
html[dir="rtl"] .bi-arrow-right::before,
html[dir="rtl"] .bi-chevron-right::before,
html[dir="rtl"] .bi-arrow-left::before,
html[dir="rtl"] .bi-chevron-left::before { display: inline-block; transform: scaleX(-1); }

/* Listes : puces et retraits du côté droit. */
html[dir="rtl"] ul, html[dir="rtl"] ol { padding-right: 1.25rem; padding-left: 0; }
html[dir="rtl"] .navbar-nav, html[dir="rtl"] .nav-dropdown, html[dir="rtl"] .language-menu,
html[dir="rtl"] .category-drawer-list, html[dir="rtl"] #bottomNav ul { padding-right: 0; }

/* Textes mêlant arabe et éléments latins (adresses, numéros) : isolés pour garder leur ordre. */
html[dir="rtl"] .notranslate, html[dir="rtl"] [translate="no"] { unicode-bidi: isolate; }

/* Préfixes et étiquettes de champs (+213, DA…) : toujours lus de gauche à droite. */
html[dir="rtl"] .input-group-text { direction: ltr; }

/* Espaces freelancer et client : menu latéral à droite en arabe. */
html[dir="rtl"] .freelancer-dashboard-pro .freelancer-sidebar,
html[dir="rtl"] .client-dashboard-pro .client-sidebar { left: auto !important; right: 0; }
html[dir="rtl"] .freelancer-dashboard-pro .dashboard-layout { padding: var(--fd-topbar) var(--fd-sidebar) 0 0 !important; }
html[dir="rtl"] .client-dashboard-pro .dashboard-layout { padding: var(--cl-topbar) var(--cl-sidebar) 0 0 !important; }
html[dir="rtl"] .freelancer-pro-topbar { left: 0; right: var(--fd-sidebar); }
html[dir="rtl"] .client-pro-topbar { left: 0; right: var(--cl-sidebar); }
html[dir="rtl"] .freelancer-dashboard-pro .freelancer-sidebar .badge,
html[dir="rtl"] .client-dashboard-pro .client-sidebar .badge { margin-left: 0; margin-right: auto; }
@media (max-width: 991px) {
    html[dir="rtl"] .freelancer-dashboard-pro .dashboard-layout,
    html[dir="rtl"] .client-dashboard-pro .dashboard-layout { padding-right: 0 !important; }
    html[dir="rtl"] .freelancer-dashboard-pro .freelancer-sidebar,
    html[dir="rtl"] .client-dashboard-pro .client-sidebar { transform: translateX(102%); }
    html[dir="rtl"] .freelancer-dashboard-pro .freelancer-sidebar.open,
    html[dir="rtl"] .freelancer-dashboard-pro .freelancer-sidebar.mobile-open,
    html[dir="rtl"] .client-dashboard-pro .client-sidebar.open { transform: none; }
    html[dir="rtl"] .freelancer-pro-topbar,
    html[dir="rtl"] .client-pro-topbar { right: 0; padding: 0 62px 0 .75rem; }
    html[dir="rtl"] .freelancer-dashboard-pro .freelancer-mobile-menu-btn,
    html[dir="rtl"] .client-mobile-menu-btn { left: auto; right: 10px; }
}

/* Chaque paragraphe suit le sens de son propre texte : un contenu d'utilisateur
   en français reste lisible dans une page arabe (et inversement). */
html[dir="rtl"] p, html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[dir="rtl"] h5, html[dir="rtl"] h6, html[dir="rtl"] li, html[dir="rtl"] td, html[dir="rtl"] th,
html[dir="rtl"] dd, html[dir="rtl"] dt, html[dir="rtl"] blockquote,
html[dir="rtl"] .msg-text, html[dir="rtl"] .msg-bubble, html[dir="rtl"] .candp-msg, html[dir="rtl"] .mc-msg { unicode-bidi: plaintext; }
