/* =========================================================
   JASSAD — Compléments version arabe (RTL)
   Chargé après jassad-custom-rtl.css
========================================================= */

/* =========================================================
   POLICES ARABES
   Le catalogue PDF utilise (d'après ses polices intégrées) :
   - titres : Kief Montaser Bold / RTL ManGo / RTL Al-Kufa Bold
   - textes : 29LT Zarid Sans (Regular + Bold)
   Ces polices ne sont pas sur Google Fonts : déposez vos fichiers dans
   assets/fonts/arabic/ (voir LISEZ-MOI.txt). Tant qu'ils sont absents,
   le navigateur utilise Cairo / Tajawal comme police de secours.
========================================================= */
/* Les fichiers de polices arabes dédiés ne sont pas encore livrés.
   Ces déclarations sont désactivées pour éviter 9 erreurs 404 par page ;
   le site utilise Cairo / Tajawal / Noto Kufi Arabic (Google Fonts) en secours.
   Pour activer les polices du catalogue : déposez titre.woff2, texte.woff2 et
   texte-gras.woff2 dans assets/fonts/arabic/, puis décommentez ce bloc.
@font-face {
    font-family: "Jassad AR Titre";
    src: url("../fonts/arabic/titre.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Jassad AR Texte";
    src: url("../fonts/arabic/texte.woff2") format("woff2");
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: "Jassad AR Texte";
    src: url("../fonts/arabic/texte-gras.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
}
*/
:root {
    --ar-titre: "Jassad AR Titre", "Noto Kufi Arabic", "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
    --ar-texte: "Jassad AR Texte", "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* On réutilise les variables du thème français (--title-font / --body-font) :
   « Intro Rust Base » et « Intro » restent en tête, donc chiffres et mots latins
   (27-30, 2026, Jassad…) gardent exactement le style du site français.
   Ces polices n'ont aucune lettre arabe : le navigateur bascule alors, lettre par lettre,
   sur la police arabe ci-dessus. */
html[dir="rtl"] {
    --title-font: "Intro Rust Base", var(--ar-titre);
    --body-font: "Intro", var(--ar-texte);
}

/* Titres : poids réel de la police arabe, sans faux gras sur les lettres latines */
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"] .hero-title, html[dir="rtl"] .sec-title, html[dir="rtl"] .box-title,
html[dir="rtl"] .breadcumb-title, html[dir="rtl"] .country-title,
html[dir="rtl"] .main-menu a, html[dir="rtl"] .th-mobile-menu a,
html[dir="rtl"] .th-btn, html[dir="rtl"] .tab-btn {
    font-weight: 800;
    font-synthesis: none;
}
html[dir="rtl"] .main-menu a, html[dir="rtl"] .th-mobile-menu a { font-weight: 700; }

/* Neutralise les polices Cairo imposées par jassad-custom-rtl.css : on reprend les variables du thème */
html[dir="rtl"] body,
body.rtl {
    font-family: var(--body-font);
}

/* Une écriture arabe ne doit jamais être mise en majuscules ni espacée */
html[dir="rtl"] * {
    letter-spacing: 0 !important;
    text-transform: none !important;
}

html[dir="rtl"] body { line-height: 1.9; }
html[dir="rtl"] p, html[dir="rtl"] li { line-height: 1.95; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5 { line-height: 1.4; }

/* Sélecteur de langue dans le menu */
.main-menu .lang-switch > a,
.th-mobile-menu .lang-switch > a { font-weight: 700; }
html[lang="ar"] .main-menu .lang-switch > a { font-family: "Inter", Arial, sans-serif; }
html[lang="fr"] .main-menu .lang-switch > a,
html[lang="fr"] .th-mobile-menu .lang-switch > a {
    font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
    text-transform: none;
}

/* Adresse e-mail et nombres : sens gauche -> droite à l'intérieur du texte arabe */
html[dir="rtl"] a[href^="mailto:"] { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* E-mail : police latine lisible (la police décorative est en capitales) */
html[dir="rtl"] a[href^="mailto:"] { font-family: "Inter", Arial, sans-serif; }

/* Bannière des pages secondaires : le visuel est à droite, on décale le titre pour ne pas le recouvrir */
@media (min-width: 992px) {
    html[dir="rtl"] .breadcumb-wrapper .breadcumb-content { padding-right: 34%; padding-left: 0; }
}

/* Grand mot « Jassad » du pied de page : aligné à gauche, sans débordement */
html[dir="rtl"] .footer-text { direction: ltr; text-align: left; overflow: hidden; }

/* Bloc date du héros : centré sur mobile */
@media (max-width: 767px) {
    html[dir="rtl"] .th-hero-wrapper .hero-style3 { text-align: center; }
}

/* Menu mobile : réserver la place du bouton +/- à droite pour ne pas chevaucher le texte */
html[dir="rtl"] .th-mobile-menu li > a { padding-right: 40px; }
.footer-text {
    padding-bottom: 20px;
    line-height: 1.3;
    overflow: visible;
}

@media (max-width: 767px) {
    .footer-text {
        padding-bottom: 35px;
        margin-bottom: 25px;
        line-height: 1.3;
        overflow: visible;
    }
}
