/* =====================================================================
   INKADH — RTL (Arabe) — Overrides globaux
   Sélecteur [dir="rtl"] : s'applique uniquement quand <html dir="rtl">
   Le français reste inchangé.
   ===================================================================== */

/* ── Police arabe : 'Cairo' est chargée via wp_enqueue_style (voir
   elementor-widgets.php, bloc is_rtl()). On l'applique partout ici. ── */

[dir="rtl"] .inkadh-widget,
[dir="rtl"] .inkadh-hero,
[dir="rtl"] .inkadh-hero *,
[dir="rtl"] .inkadh-textes-section,
[dir="rtl"] .inkadh-textes-section *,
[dir="rtl"] .inkadh-fonds-section,
[dir="rtl"] .inkadh-fonds-section *,
[dir="rtl"] .inkadh-activites-section,
[dir="rtl"] .inkadh-activites-section *,
[dir="rtl"] .inkadh-actu-section,
[dir="rtl"] .inkadh-actu-section *,
[dir="rtl"] .inkadh-podcast-section,
[dir="rtl"] .inkadh-podcast-section *,
[dir="rtl"] .inkadh-annonces-section,
[dir="rtl"] .inkadh-annonces-section *,
[dir="rtl"] .inkadh-sponsors-section,
[dir="rtl"] .inkadh-sponsors-section *,
[dir="rtl"] .inkadh-faq-section,
[dir="rtl"] .inkadh-faq-section *,
[dir="rtl"] .inkadh-footer,
[dir="rtl"] .inkadh-footer *,
[dir="rtl"] .inkadh-about-page,
[dir="rtl"] .inkadh-about-page *,
[dir="rtl"] .inkadh-contact-widget,
[dir="rtl"] .inkadh-contact-widget *,
[dir="rtl"] .inkadh-site-header,
[dir="rtl"] .inkadh-site-header * {
    font-family: 'Cairo', Arial, sans-serif;
}

/* =====================================================================
   HEADER
   ===================================================================== */

/* Logo → droite, actions → gauche (margin déjà dans inkadh-header.css) */

/* Sous-menu : s'ouvre depuis la droite */
[dir="rtl"] .inkadh-header-nav .sub-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .inkadh-header-nav .sub-menu a {
    border-left: none;
    border-right: 3px solid transparent;
}

[dir="rtl"] .inkadh-header-nav .sub-menu a:hover,
[dir="rtl"] .inkadh-header-nav .sub-menu a.active,
[dir="rtl"] .inkadh-header-nav .sub-menu .current-menu-item > a:not([href*="#"]) {
    border-left-color: transparent;
    border-right-color: #2342F7;
}

/* Sous-liens mobile */
[dir="rtl"] .inkadh-mobile-sublink {
    border-left: none;
    border-right: 2px solid rgba(35,66,247,0.3);
    padding-left: 0;
    padding-right: 18px;
    margin-left: 0;
    margin-right: 4px;
}

/* =====================================================================
   HERO CAROUSEL
   ===================================================================== */

/* Bloc texte plus large en arabe : le titre peut tenir sur une seule ligne.
   (En LTR : content 560px / desc 500px — inchangé.) */
[dir="rtl"] .inkadh-hero-content { max-width: 900px; }
[dir="rtl"] .inkadh-hero-desc    { max-width: 760px; }

/* On élargit aussi le conteneur interne pour laisser respirer le texte long */
[dir="rtl"] .inkadh-hero-inner {
    max-width: 1240px !important;
}

/* Le titre ne se coupe pas en plein milieu d'un groupe de mots si évitable */
[dir="rtl"] .inkadh-hero-title { text-wrap: balance; }

/* L'image est à droite en LTR (margin-left); en RTL on la met à gauche */
[dir="rtl"] .inkadh-hero-img-wrapper {
    margin-left: 0;
    margin-right: 150px;
}

/* Décoration circulaire */
[dir="rtl"] .inkadh-hero-circle-deco {
    left: auto;
    right: 55%;
}

/* Boutons précédent/suivant : miroir en RTL.
   On échange la position ET on retourne l'icône (scaleX -1) pour que
   les flèches pointent vers l'EXTÉRIEUR (‹ à gauche, › à droite). */
[dir="rtl"] .inkadh-hero-btn-prev {
    left: auto !important;
    right: 70px !important;
}
[dir="rtl"] .inkadh-hero-btn-next {
    right: auto !important;
    left: 70px !important;
}
[dir="rtl"] .inkadh-hero .inkadh-carousel-btn svg {
    transform: scaleX(-1);
}

@media (max-width: 1100px) {
    [dir="rtl"] .inkadh-hero-btn-prev { right: 16px !important; left: auto !important; }
    [dir="rtl"] .inkadh-hero-btn-next { left:  16px !important; right: auto !important; }
    [dir="rtl"] .inkadh-hero-img-wrapper { margin-right: 40px; }
}

@media (max-width: 900px) {
    [dir="rtl"] .inkadh-hero-img-wrapper { margin-right: 0; }
}

/* =====================================================================
   TEXTES JURIDIQUES
   ===================================================================== */

/* Icône "eye" : passe du coin haut-droit au coin haut-gauche */
[dir="rtl"] .inkadh-card-eye {
    right: auto;
    left: 16px;
}

/* Bouton télécharger : aligner le texte à droite */
[dir="rtl"] .inkadh-btn-telecharger {
    flex-direction: row-reverse;
}

/* =====================================================================
   FONDS DOCUMENTAIRE
   ===================================================================== */

/* Image décorative : bascule de droite vers gauche */
[dir="rtl"] .inkadh-fonds-deco {
    right: auto;
    left: 0;
    object-position: bottom left;
    transform: scaleX(-1); /* miroir horizontal */
}

/* Lien "lire plus" : align du côté start (droite en RTL) */
[dir="rtl"] .inkadh-fonds-card-link {
    align-self: flex-start;
}

/* Flèche du lien : miroir */
[dir="rtl"] .inkadh-fonds-card-link svg {
    transform: scaleX(-1);
}

/* =====================================================================
   ACTIVITÉS
   ===================================================================== */

/* Décoration blur : passe de bas-gauche à bas-droite */
[dir="rtl"] .inkadh-activites-blur {
    left: auto;
    right: 0;
    object-position: bottom right;
    transform: scaleX(-1);
}

/* =====================================================================
   ACTUALITÉS
   ===================================================================== */

/* Flèche "lire plus" : miroir */
[dir="rtl"] .inkadh-actu-link svg {
    transform: scaleX(-1);
}

/* Bannière "Partager" : ordre texte/bouton en RTL */
[dir="rtl"] .inkadh-actu-banner {
    flex-direction: row-reverse;
}
[dir="rtl"] .inkadh-banner-left {
    text-align: right;
}

/* =====================================================================
   PODCAST
   ===================================================================== */

/* Décalage du triangle "play" dans le cercle */
[dir="rtl"] .inkadh-pod-play svg {
    margin-left: 0;
    margin-right: 2px;
}

/* Bouton fermer la modal : passe à gauche */
[dir="rtl"] .inkadh-pod-modal-close {
    right: auto;
    left: 14px;
}

/* =====================================================================
   ANNONCES CAROUSEL
   ===================================================================== */

/* Boutons précédent/suivant : miroir position + icône retournée */
[dir="rtl"] .inkadh-carousel-btn-prev {
    left: auto;
    right: 80px;
}
[dir="rtl"] .inkadh-carousel-btn-next {
    right: auto;
    left: 80px;
}
[dir="rtl"] .inkadh-annonces-section .inkadh-carousel-btn svg {
    transform: scaleX(-1);
}

@media (max-width: 768px) {
    [dir="rtl"] .inkadh-carousel-btn-prev { right: 16px; left: auto; }
    [dir="rtl"] .inkadh-carousel-btn-next { left:  16px; right: auto; }
}

/* =====================================================================
   SPONSORS
   ===================================================================== */

/* Les sponsors sont centrés/grid — aucun besoin de fix directionnel */

/* =====================================================================
   FAQ
   ===================================================================== */

/* L'icône chevron est à droite de la question via justify-content:space-between */
/* En RTL, space-between reverse l'ordre : texte à gauche, icône à droite → correct */

/* =====================================================================
   FOOTER
   L'utilisateur veut la MÊME disposition qu'en français :
     • Réseaux sociaux à GAUCHE
     • Contact au CENTRE (icône à gauche du texte)
     • Navigation à DROITE
   Seule l'ÉCRITURE est en arabe (les glyphes arabes se lisent de droite
   à gauche automatiquement, sans rien forcer).
   → On force la mise en page du footer en LTR pour NE PAS miroiter les
     colonnes. Le texte arabe reste correct.
   ===================================================================== */

/* Empêche le retournement des colonnes (grid + flex) : disposition = FR */
[dir="rtl"] .inkadh-footer-cols,
[dir="rtl"] .inkadh-footer-col-social,
[dir="rtl"] .inkadh-footer-contact,
[dir="rtl"] .inkadh-footer-contact-item,
[dir="rtl"] .inkadh-footer-social-icons,
[dir="rtl"] .inkadh-footer-nav {
    direction: ltr;
}

/* Téléphone / email : s'affichent correctement (ex : +216 45 678 912) */
[dir="rtl"] .inkadh-footer-contact-text {
    unicode-bidi: plaintext;
}

/* Barre copyright : garder l'ordre correct (point, chiffres) */
[dir="rtl"] .inkadh-footer-bottom p {
    unicode-bidi: plaintext;
}

/* =====================================================================
   ABOUT PAGE
   ===================================================================== */

/* Gradient overlay du héro : de droite vers gauche */
[dir="rtl"] .inkadh-about-page .ia-hero-overlay {
    background: linear-gradient(to left,
        rgba(7,19,56,0.92) 0%,
        rgba(7,19,56,0.4) 65%,
        transparent 100%
    );
}

/* Badge : self-start devient self-end en RTL pour rester à droite */
[dir="rtl"] .inkadh-about-page .ia-hero-badge {
    align-self: flex-end;
}

/* Cards mission : bordure accent à droite */
[dir="rtl"] .inkadh-about-page .ia-mission-card {
    border-left: none;
    border-right: 3px solid var(--ia-blue);
}

/* Quote d'alerte : barre colorée à droite */
[dir="rtl"] .inkadh-about-page .ia-alert-quote::before {
    left: auto;
    right: 0;
}
[dir="rtl"] .inkadh-about-page .ia-alert-quote {
    padding: 40px 44px 40px 40px;
}

/* Timeline du fondateur : ligne à droite */
[dir="rtl"] .inkadh-about-page .ia-founder-timeline {
    border-left: none;
    border-right: 2px solid var(--ia-border);
    padding-left: 0;
    padding-right: 28px;
}

[dir="rtl"] .inkadh-about-page .ia-founder-tl-item::before {
    left: auto;
    right: -35px;
}

/* Quote du fondateur : accent à droite */
[dir="rtl"] .inkadh-about-page .ia-founder-quote {
    border-left: none;
    border-right: 4px solid var(--ia-blue);
    padding: 24px 32px 24px 28px;
}

/* Barre décorative du label */
[dir="rtl"] .inkadh-about-page .ia-label {
    flex-direction: row-reverse;
}

@media (max-width: 640px) {
    [dir="rtl"] .inkadh-about-page .ia-founder-timeline {
        padding-right: 20px;
        padding-left: 0;
    }
    [dir="rtl"] .inkadh-about-page .ia-founder-tl-item::before {
        right: -27px;
        left: auto;
    }
}

/* =====================================================================
   CONTACT PAGE
   ===================================================================== */

/* Arc décoratif : passe de haut-gauche à haut-droite */
[dir="rtl"] .inkadh-contact-widget .hero-arc {
    left: auto;
    right: -140px;
}

/* Grille de points : passe à droite */
[dir="rtl"] .inkadh-contact-widget .hero-dots {
    left: auto;
    right: 80px;
}

/* Padding de la colonne texte : extra-padding à droite */
[dir="rtl"] .inkadh-contact-widget .hero-left {
    padding: 36px 80px 36px 60px;
}

/* Étiquette de section formulaire */
[dir="rtl"] .inkadh-contact-widget .form-section-label,
[dir="rtl"] .inkadh-contact-widget .band-label {
    flex-direction: row-reverse;
}

@media (max-width: 640px) {
    [dir="rtl"] .inkadh-contact-widget .hero-left {
        padding: 32px 60px 40px 24px;
    }
}
