/* ==========================================================================
   Dar Sétif — Arabic (RTL) Style Sheet
   Chargé uniquement quand $lang == 'ar'
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Police arabe : Cairo (Google Fonts)
      On importe Cairo avec tous les graisses utiles (400, 600, 700, 800)
      via @import pour éviter une dépendance réseau dans le <head>.
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

/* Applique Cairo à tous les éléments sauf les icônes */
*:not(i):not([class*="flaticon-"]):not([class*="fa-"]):not([class*="ti-"]):not([class*="icon-"]) {
    font-family: 'Cairo', sans-serif !important;
    letter-spacing: normal !important;
}

/* --------------------------------------------------------------------------
   2. Direction et alignement de base RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"],
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

/* Meilleur line-height pour la lisibilité de l'arabe */
html[dir="rtl"] p,
html[dir="rtl"] li,
html[dir="rtl"] .blog_details p,
html[dir="rtl"] .footer-pera p {
    line-height: 1.9 !important;
}

html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
    line-height: 1.5 !important;
}

/* --------------------------------------------------------------------------
   3. Header top bar — inversé en RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"] .header-top .row > div,
html[dir="rtl"] .header-top .d-flex {
    flex-direction: row-reverse;
}

html[dir="rtl"] .header-info-left ul,
html[dir="rtl"] .header-info-right {
    padding-right: 0;
    padding-left: 0;
}

html[dir="rtl"] .header-info-left ul li {
    padding-right: 0;
    margin-right: 0;
    margin-left: 15px;
}

html[dir="rtl"] .header-info-left ul li i {
    margin-right: 0;
    margin-left: 4px;
}

html[dir="rtl"] .lang-switch {
    margin-right: 0;
    margin-left: 20px;
    flex-direction: row-reverse;
}

html[dir="rtl"] .header-social {
    padding-right: 0;
    padding-left: 0;
    flex-direction: row-reverse;
}

/* custom.css espace désormais les icônes via "margin-left" sur chaque pastille (voir .header-social
   a) : la simple inversion flex ci-dessus ne suffit pas, l'espace reste physiquement à gauche de
   chaque icône au lieu de la précéder - décalage visible entre les icônes. */
html[dir="rtl"] .header-social a {
    margin-left: 0;
    margin-right: 8px;
}

/* --------------------------------------------------------------------------
   4. Navigation principale — items flottés à droite
   -------------------------------------------------------------------------- */
html[dir="rtl"] .main-menu ul#navigation > li {
    float: right;
}

html[dir="rtl"] .main-menu ul#navigation > li > a {
    padding: 35px 20px 35px 20px;
}

html[dir="rtl"] .main-menu ul#navigation .submenu {
    right: 0;
    left: auto;
    text-align: right;
}

html[dir="rtl"] .main-menu ul#navigation .submenu li a {
    padding-right: 20px;
    padding-left: 10px;
}

/* --------------------------------------------------------------------------
   5. Sticky bar & logo flex
   -------------------------------------------------------------------------- */
html[dir="rtl"] .header-flex {
    flex-direction: row-reverse;
}

html[dir="rtl"] .sticky-logo {
    margin-right: 0;
    margin-left: 30px;
}

/* --------------------------------------------------------------------------
   6. Barre de recherche header
   -------------------------------------------------------------------------- */
html[dir="rtl"] .search-box {
    left: 0;
    right: auto;
}

/* --------------------------------------------------------------------------
   7. Menu mobile Slicknav
   -------------------------------------------------------------------------- */
html[dir="rtl"] .slicknav_menu {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .slicknav_btn {
    float: left;
    margin-right: 0;
    margin-left: 5px;
}

html[dir="rtl"] .slicknav_arrow {
    float: left;
    margin-right: 0;
    margin-left: 0.4em;
}

html[dir="rtl"] .slicknav_nav {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .slicknav_nav li a {
    padding-right: 10px !important;
    padding-left: 0 !important;
}

/* --------------------------------------------------------------------------
   8. Ticker "À la une"
   -------------------------------------------------------------------------- */
html[dir="rtl"] .trending-tittle {
    flex-direction: row-reverse;
}

html[dir="rtl"] .trending-animated {
    direction: rtl;
}

/* --------------------------------------------------------------------------
   9. Titres de section — barre colorée à droite en RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"] .section-tittle h3::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .section-tittle h3 {
    padding-left: 0;
    padding-right: 20px;
}

/* --------------------------------------------------------------------------
   10. Cartes articles (.what-cap) — ancrage RTL miroir
   -------------------------------------------------------------------------- */
html[dir="rtl"] .single-what-news .what-cap,
html[dir="rtl"] .single-recent .what-cap {
    left: auto !important;
    right: 0 !important;
    border-radius: 7px 0 0 0 !important;
}

/* --------------------------------------------------------------------------
   11. Colonne droite "À la une" — flex miroir
   -------------------------------------------------------------------------- */
html[dir="rtl"] .trand-right-single {
    flex-direction: row-reverse;
}

html[dir="rtl"] .trand-right-cap {
    padding-right: 10px;
    padding-left: 0;
    text-align: right;
}

/* --------------------------------------------------------------------------
   12. Blog item date badge
   -------------------------------------------------------------------------- */
html[dir="rtl"] .blog_item_date {
    right: auto;
    left: 0;
    border-radius: 0 0 0 0;
}

/* --------------------------------------------------------------------------
   13. Blog info-link (icônes + texte)
   -------------------------------------------------------------------------- */
html[dir="rtl"] .blog-info-link {
    padding-right: 0;
    padding-left: 0;
    direction: rtl;
}

html[dir="rtl"] .blog-info-link li {
    margin-right: 0;
    margin-left: 20px;
}

html[dir="rtl"] .blog-info-link li i {
    margin-right: 0;
    margin-left: 4px;
}

/* --------------------------------------------------------------------------
   14. Input group (recherche sidebar) — bouton à gauche en RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"] .input-group {
    flex-direction: row-reverse;
}

html[dir="rtl"] .input-group .form-control {
    border-radius: 0 4px 4px 0 !important;
    border-right: 1px solid var(--border) !important;
    border-left: none !important;
}

html[dir="rtl"] .input-group-append {
    margin-right: 0;
    margin-left: -1px;
}

html[dir="rtl"] .input-group-append .btns {
    border-radius: 4px 0 0 4px !important;
}

/* --------------------------------------------------------------------------
   15. Formulaire de recherche héros (page recherche)
   -------------------------------------------------------------------------- */
html[dir="rtl"] .search-hero-form {
    flex-direction: row-reverse;
}

html[dir="rtl"] .search-hero-form input {
    border-radius: 0 4px 4px 0 !important;
}

html[dir="rtl"] .search-hero-form button {
    border-radius: 4px 0 0 4px !important;
}

/* --------------------------------------------------------------------------
   16. Pagination — flèches inversées en RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"] .flaticon-arrow.right-arrow,
html[dir="rtl"] span.right-arrow {
    display: inline-block;
    transform: scaleX(-1);
}

html[dir="rtl"] .flaticon-arrow.roted,
html[dir="rtl"] span.roted {
    display: inline-block;
    transform: scaleX(-1);
}

/* --------------------------------------------------------------------------
   17. Sidebar — widgets
   -------------------------------------------------------------------------- */
html[dir="rtl"] .single_sidebar_widget .cat-list {
    padding-right: 0;
    padding-left: 0;
    text-align: right;
}

html[dir="rtl"] .single_sidebar_widget .cat-list a {
    flex-direction: row-reverse;
}

html[dir="rtl"] .single_sidebar_widget .cat-list a p:first-child {
    flex: 1;
}

html[dir="rtl"] .post_item {
    direction: rtl;
    flex-direction: row-reverse;
}

html[dir="rtl"] .post_item .media-body {
    text-align: right;
    padding-right: 10px;
    padding-left: 0;
}

html[dir="rtl"] .media {
    flex-direction: row-reverse;
}

html[dir="rtl"] .media-body {
    text-align: right;
}

/* --------------------------------------------------------------------------
   18. Navigation top article (partage social)
   -------------------------------------------------------------------------- */
html[dir="rtl"] .navigation-top .d-sm-flex {
    flex-direction: row-reverse;
}

html[dir="rtl"] .social-icons {
    padding-right: 0;
    padding-left: 0;
    flex-direction: row-reverse;
}

/* --------------------------------------------------------------------------
   19. Footer — inversions RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"] .footer-area .row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-tittle h4,
html[dir="rtl"] .footer-pera p,
html[dir="rtl"] .footer-contact-info li,
html[dir="rtl"] .footer-copy-right p {
    text-align: right;
}

html[dir="rtl"] .footer-menu ul {
    padding-right: 0;
    padding-left: 0;
    text-align: left;
}

html[dir="rtl"] .footer-border .row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-social {
    direction: rtl;
}

/* custom.css pose l'espacement entre pastilles via margin-right sur le <a> (icônes maintenant
   centrées dans leur pastille, voir le commentaire sur .footer-social a dans custom.css) : à
   mirorer ici, sinon l'espace reste physiquement à droite de chaque pastille. */
html[dir="rtl"] .footer-social a {
    margin-right: 0;
    margin-left: 8px;
}

/* Footer newsletter form en RTL */
html[dir="rtl"] .footer-form .subscribe_form {
    direction: rtl;
}

html[dir="rtl"] .footer-form input {
    border-radius: 0 4px 4px 0 !important;
    text-align: right;
    padding-right: 12px;
    padding-left: 50px;
}

html[dir="rtl"] .footer-form .form-icon {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* Le bouton (icône enveloppe) est positionné en absolu à "right:-20px" dans le SCSS d'origine
   (pensé pour un input LTR où le bouton déborde à droite) : il faut le faire déborder à gauche. */
html[dir="rtl"] .footer-form .form-icon button {
    right: auto;
    left: -20px;
}

/* --------------------------------------------------------------------------
   20. Slider hero — caption déjà géré dans custom.css, on complète
   -------------------------------------------------------------------------- */
html[dir="rtl"] .hero-slide-cap {
    text-align: right;
}

html[dir="rtl"] .hero-slide-cat {
    display: inline-block;
}

html[dir="rtl"] .hero-slider .owl-dots {
    right: auto;
    left: 40px;
}

/* --------------------------------------------------------------------------
   21. Owl carousel — nav buttons miroir en RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"] .hero-slider .owl-nav button.owl-prev {
    left: auto;
    right: 20px;
}

html[dir="rtl"] .hero-slider .owl-nav button.owl-next {
    right: auto;
    left: 20px;
}

/* --------------------------------------------------------------------------
   22. Weekly / Recent carousels (slick)
   Note : pas de "direction: rtl" ici sur les conteneurs .slick — Slick calcule
   ses positions en JS et a besoin de sa propre option rtl:true (voir main.js,
   isRTL) plutôt que d'un direction CSS forcé, sinon le carrousel reste vide.
   -------------------------------------------------------------------------- */
html[dir="rtl"] .weekly-caption,
html[dir="rtl"] .weekly2-caption {
    text-align: right;
}

/* Slick dots — le titre de section passe à droite en RTL (barre colorée + padding-right, cf. §9),
   donc les points (positionnés en absolu à "right:-2px" dans le SCSS d'origine, pensés pour un
   titre à gauche) doivent basculer à gauche pour ne plus se superposer au titre. */
html[dir="rtl"] .dot-style .slick-dots {
    text-align: left;
    padding-right: 0;
    right: auto;
    left: -2px;
}

/* --------------------------------------------------------------------------
   23. Section vidéothèque
   -------------------------------------------------------------------------- */
html[dir="rtl"] .video-caption {
    text-align: right;
}

html[dir="rtl"] .video-intro h4 {
    text-align: right;
}

/* --------------------------------------------------------------------------
   24. Contact / À propos
   -------------------------------------------------------------------------- */
html[dir="rtl"] .contact-info .media {
    flex-direction: row-reverse;
}

html[dir="rtl"] .contact-info .media-body {
    text-align: right;
    padding-right: 15px;
    padding-left: 0;
}

html[dir="rtl"] .contact-info__icon {
    margin-right: 0;
    margin-left: 15px;
}

html[dir="rtl"] .form-contact label {
    text-align: right;
    display: block;
}

html[dir="rtl"] .form-contact input,
html[dir="rtl"] .form-contact textarea {
    text-align: right;
    direction: rtl;
}

/* --------------------------------------------------------------------------
   25. Onglets "Actualités" (nav-tabs)
   -------------------------------------------------------------------------- */
html[dir="rtl"] .nav-tabs {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

html[dir="rtl"] .properties__button nav {
    direction: rtl;
}

/* --------------------------------------------------------------------------
   26. Trending top image — caption overlay en RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"] .trend-top-cap {
    text-align: right;
}

html[dir="rtl"] .trend-bottom-cap {
    text-align: right;
}

/* --------------------------------------------------------------------------
   27. Corrections générales float/margin en RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"] .f-right {
    float: left !important;
}

html[dir="rtl"] .f-left {
    float: right !important;
}

html[dir="rtl"] ul,
html[dir="rtl"] ol {
    padding-right: 0;
    padding-left: 0;
}