/* CSS pour l'affichage RTL arabe */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body {
    font-family: 'Cairo', 'Arial', sans-serif;
    direction: rtl;
}

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

/* Navigation */
html[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .navbar-nav .nav-link {
    text-align: right;
}

/* Header */
html[dir="rtl"] .headerlogo {
    text-align: right;
}

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

/* Carousel */
html[dir="rtl"] .carousel-prev {
    left: auto;
    right: 15px;
}

html[dir="rtl"] .carousel-next {
    right: auto;
    left: 15px;
}

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

/* Cards */
html[dir="rtl"] .card-title {
    text-align: right;
}

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

/* Lists */
html[dir="rtl"] .list-group-item {
    text-align: right;
}

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

/* Text alignment */
html[dir="rtl"] .text-right {
    text-align: left;
}

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

/* Buttons */
html[dir="rtl"] .btn {
    text-align: center;
}

/* Forms */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    text-align: right;
}

html[dir="rtl"] input[type="submit"],
html[dir="rtl"] input[type="button"] {
    text-align: center;
}

/* Float adjustments */
html[dir="rtl"] .float-right {
    float: left !important;
}

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

/* Margin and padding adjustments */
html[dir="rtl"] .mr-1 {
    margin-right: 0;
    margin-left: 0.25rem;
}

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

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

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

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

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

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

html[dir="rtl"] .row .col-md-4:first-child {
    order: 2;
}

html[dir="rtl"] .row .col-md-8:last-child {
    order: 1;
}

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

html[dir="rtl"] .actus-row .col-md-4:first-child {
    order: 1;
}

html[dir="rtl"] .actus-row .col-md-8:last-child {
    order: 2;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    html[dir="rtl"] .row .col-md-4 {
        display: none;
    }

    html[dir="rtl"] .actus-container .col-md-4,
    html[dir="rtl"] .actus-container .col-md-8 {
        display: block;
        flex: 0 0 100%;
        max-width: 100%;
    }

    html[dir="rtl"] .row .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    html[dir="rtl"] .row .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

}


@media (max-width: 989px) {
    html[dir="rtl"] .actus-row .col-md-4 {
        order: 1;
    }
    
    html[dir="rtl"] .actus-row .col-md-8 {
        order: 2;
    }

    html[dir="rtl"] #footer ul li + li {
        border-right: none !important;
    }
}

html[dir="rtl"] .actus-minister-info,
html[dir="rtl"] .ministre-info {
    text-align: center !important;
}

html[dir="rtl"] .actus-minister-info h2,
html[dir="rtl"] .actus-minister-info h3,
html[dir="rtl"] .actus-minister-info p {
    text-align: center !important;
}

html[dir="rtl"] .pr-1 {
    padding-right: 0;
    padding-left: 0.25rem;
}

html[dir="rtl"] .pr-2 {
    padding-right: 0;
    padding-left: 0.5rem;
}

html[dir="rtl"] .pr-3 {
    padding-right: 0;
    padding-left: 1rem;
}

html[dir="rtl"] .pl-1 {
    padding-left: 0;
    padding-right: 0.25rem;
}

html[dir="rtl"] .pl-2 {
    padding-left: 0;
    padding-right: 0.5rem;
}

html[dir="rtl"] .pl-3 {
    padding-left: 0;
    padding-right: 1rem;
}

html[dir="rtl"] .select2-container .select2-selection--single .select2-selection__arrow {
    left: 20px !important;
    right: auto !important;
}

html[dir="rtl"] .select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 20px !important;
    padding-right: 8px !important;
}

html[dir="rtl"] .select2-container .select2-selection--single .select2-selection__clear {
    position: absolute;
    left: 8px !important;
    right: auto !important;
}

html[dir="rtl"] .select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 35px !important;
    padding-right: 35px !important;
    text-align: right;
}

html[dir="rtl"] .paging a img[src*="arrow-right.svg"] {
    transform: scaleX(-1);
}

html[dir="rtl"] .paging a img[src*="arrow-left.svg"] {
    transform: scaleX(-1);
}

html[dir="rtl"] .paging a img[src*="arrow-end.svg"] {
    transform: scaleX(-1);
}

html[dir="rtl"] .paging a img[src*="arrow-start.svg"] {
    transform: scaleX(-1);
}

html[dir="rtl"] .paging a img[src*="arrow"] {
    transform: scaleX(-1);
}

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

html[dir="rtl"] .paging a,
html[dir="rtl"] .paging span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

html[dir="rtl"] .card.search-results .card-title .row.pr-3 {
    padding-right: 0 !important;
    padding-left: 1rem !important;
}

html[dir="rtl"] .card.search-results .card-title b.pl-3 {
    padding-left: 0 !important;
    padding-right: 1rem !important;
}

html[dir="rtl"] .card.search-results .card-title .row {
    justify-content: flex-end !important;
}

html[dir="rtl"] .card.search-results .card-title .row:has(.col-lg-3) {
    justify-content: flex-start !important;
}

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

html[dir="rtl"] #footer .row .col {
    text-align: right;
}

html[dir="rtl"] #footer .row .col-auto {
    text-align: left;
}