/* RTL Support for Arabic Language */


/* Ce fichier doit être chargé uniquement lorsque la langue est l'arabe */


/* Il utilise le sélecteur html[dir="rtl"] pour cibler spécifiquement le mode RTL */


/* Direction générale du document */

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


/* Navigation principale */

html[dir="rtl"] .navmenu ul {
    padding-right: 0;
}

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

html[dir="rtl"] .navmenu {
    margin-left: 0;
    margin-right: auto;
}


/* Boutons et formulaires */

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

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


/* Icons Bootstrap */

html[dir="rtl"] .bi {
    margin-right: 0;
    margin-left: 8px;
}


/* Renversement des marges et paddings */

html[dir="rtl"] .me-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

html[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] .ms-1 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

html[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

html[dir="rtl"] .ms-3 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

html[dir="rtl"] .ms-4 {
    margin-left: 0 !important;
    margin-right: 1.5rem !important;
}

html[dir="rtl"] .ms-5 {
    margin-left: 0 !important;
    margin-right: 3rem !important;
}

html[dir="rtl"] .me-1 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

html[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

html[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

html[dir="rtl"] .me-4 {
    margin-right: 0 !important;
    margin-left: 1.5rem !important;
}

html[dir="rtl"] .me-5 {
    margin-right: 0 !important;
    margin-left: 3rem !important;
}


/* Renversement des colonnes Bootstrap dans les rangées */

@media (min-width: 768px) {
    html[dir="rtl"] .row {
        flex-direction: row-reverse;
    }
}


/* Alignement du texte pour les classes utilitaires */

html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}


/* Footer spécifique */

html[dir="rtl"] .footer-contact i {
    float: right;
    margin-left: 10px;
    margin-right: 0;
    display: inline-block;
    width: 20px;
    /* Largeur fixe pour l'alignement */
    text-align: center;
}

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

html[dir="rtl"] .footer .logo-text {
    margin-right: 10px;
    margin-left: 0;
}

html[dir="rtl"] .footer-links ul li {
    position: relative;
    padding-right: 15px;
    padding-left: 0;
}

html[dir="rtl"] .footer-links ul li::before {
    content: "\F134";
    /* Code pour bi-chevron-left */
    font-family: "bootstrap-icons";
    position: absolute;
    right: 0;
    top: 2px;
    transform: rotate(180deg);
    /* Tourner la flèche pour RTL */
}

/* Ajoutez ces styles à votre fichier rtl.css */

/* RTL Footer Fixes */
.rtl #footer {
    direction: rtl;
    text-align: right;
}

.rtl #footer .footer-top {
    direction: rtl;
}

.rtl #footer .row {
    direction: rtl;
}

.rtl #footer .footer-brand {
    text-align: right;
}

.rtl #footer .footer-links {
    text-align: right;
}

.rtl #footer .footer-links h4 {
    text-align: right;
    margin-bottom: 15px;
}

.rtl #footer .footer-links ul {
    text-align: right;
    padding-right: 0;
    padding-left: 0;
}

.rtl #footer .footer-links ul li {
    text-align: right;
    margin-bottom: 8px;
}

.rtl #footer .footer-links ul li a {
    text-align: right;
    display: block;
    padding-right: 0;
}

.rtl #footer .footer-contact {
    text-align: right;
}

.rtl #footer .footer-contact h4 {
    text-align: right;
    margin-bottom: 15px;
}

.rtl #footer .footer-contact p {
    text-align: right;
    direction: rtl;
}

.rtl #footer .footer-contact i {
    margin-left: 8px;
    margin-right: 0;
}

/* Logo RTL */
.rtl #footer .logo {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.rtl #footer .logo-text {
    text-align: right;
    margin-right: 10px;
    margin-left: 0;
}

/* Copyright RTL */
.rtl #footer .copyright {
    direction: rtl;
    text-align: center;
}

.rtl #footer .copyright p {
    direction: rtl;
}

/* Responsive fixes pour RTL */
@media (max-width: 768px) {
    .rtl #footer .footer-brand,
    .rtl #footer .footer-links,
    .rtl #footer .footer-contact {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .rtl #footer .logo {
        flex-direction: row;
        justify-content: center;
    }
    
    .rtl #footer .logo-text {
        text-align: center;
        margin-right: 0;
        margin-left: 10px;
    }
}

/* Adaptation des popups et dropdowns */

html[dir="rtl"] .dropdown-menu {
    text-align: right;
    left: auto;
    right: 0;
}


/* Adaptation des formulaires */

html[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.5em;
}

html[dir="rtl"] .form-check .form-check-input {
    float: right;
    margin-left: 0;
    margin-right: -1.5em;
}


/* Classes de Bootstrap pour le RTL */

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

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


/* Spécifique pour les listes */

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

html[dir="rtl"] .list-unstyled {
    padding-right: 0;
}


/* Adaptations pour les breadcrumbs */

html[dir="rtl"] .breadcrumb-item+.breadcrumb-item::before {
    float: right;
    padding-right: 0;
    padding-left: 0.5rem;
}


/* Adaptations pour les alertes */

html[dir="rtl"] .alert-dismissible {
    padding-left: 3rem;
    padding-right: 1.25rem;
}

html[dir="rtl"] .alert-dismissible .btn-close {
    left: 0;
    right: auto;
}


/* Adaptations pour les media objects */

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

html[dir="rtl"] .media-body {
    margin-left: 0;
    margin-right: 1rem;
}


/* Corrections pour le mobile nav toggle */

html[dir="rtl"] .mobile-nav-toggle {
    margin-right: 10px;
    margin-left: 0;
}

@media (max-width: 768px) {
    html[dir="rtl"] .navbar-mobile .mobile-nav-toggle {
        right: auto;
        left: 15px;
    }
}