/* Styles RTL pour la version arabe */
.rtl {
    direction: rtl;
}

/* Navigation RTL */
.rtl .header nav {
    direction: rtl;
}

.rtl .header .flex {
    flex-direction: row-reverse;
}

.rtl .header .space-x-8 > * + * {
    margin-left: 0;
    margin-right: 2rem;
}

.rtl .header .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .header .space-x-2 > * + * {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Hero section RTL */
.rtl .hero-gradient .flex-col.md\:flex-row {
    flex-direction: column;
}

@media (min-width: 768px) {
    .rtl .hero-gradient .flex-col.md\:flex-row {
        flex-direction: row-reverse;
    }
}

.rtl .hero-gradient .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

/* Features grid RTL */
.rtl .grid {
    direction: rtl;
}

/* Features section specific RTL styles */
.rtl #features .text-center h2,
.rtl #features .text-center h3,
.rtl #features .text-center p {
    text-align: center !important;
}

.rtl #features .feature-card h3 {
    text-align: right;
}

.rtl #features .feature-card p {
    text-align: right;
}

/* Pricing cards RTL */
.rtl .pricing-card .flex {
    flex-direction: row-reverse;
}

.rtl .pricing-card .mr-3 {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* Testimonials RTL */
.rtl .testimonial-card .flex {
    flex-direction: row-reverse;
}

.rtl .testimonial-card .mr-4 {
    margin-right: 0;
    margin-left: 1rem;
}

/* FAQ RTL */
.rtl .faq-question {
    flex-direction: row-reverse;
}

/* Footer RTL */
.rtl .footer .grid {
    direction: rtl;
}

.rtl .footer .flex {
    flex-direction: row-reverse;
}

.rtl .footer .mr-3 {
    margin-right: 0;
    margin-left: 0.75rem;
}

.rtl .footer .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

.rtl .footer .space-x-2 > * + * {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Texte aligné à droite pour l'arabe - mais pas pour les éléments centrés */
.rtl h1:not(.text-center h1):not(.text-center), 
.rtl h2:not(.text-center h2):not(.text-center), 
.rtl h3:not(.text-center h3):not(.text-center), 
.rtl h4:not(.text-center h4):not(.text-center), 
.rtl h5:not(.text-center h5):not(.text-center), 
.rtl h6:not(.text-center h6):not(.text-center) {
    text-align: right;
}

.rtl p:not(.text-center p):not(.text-center) {
    text-align: right;
}

/* Force le centrage pour les éléments avec la classe text-center */
.rtl .text-center,
.rtl .text-center h1,
.rtl .text-center h2,
.rtl .text-center h3,
.rtl .text-center h4,
.rtl .text-center h5,
.rtl .text-center h6,
.rtl .text-center p {
    text-align: center !important;
}

/* Ajustements pour les icônes */
.rtl .fas, .rtl .fab {
    transform: scaleX(-1);
}

.rtl .fa-chevron-down, .rtl .fa-chevron-up {
    transform: none;
}

/* Navigation du questionnaire RTL */
.rtl .questionnaire-navigation {
    flex-direction: row-reverse !important;
    justify-content: space-between;
}

/* Quand on est en RTL et qu'il n'y a qu'un bouton visible, l'aligner à droite */
.rtl .questionnaire-navigation.single-button {
    justify-content: flex-end;
}

.rtl .questionnaire-navigation.single-button #next-btn {
    margin-left: 0;
    margin-right: 0;
}

/* Forcer l'alignement à droite pour le bouton suivant quand précédent est caché */
.rtl .questionnaire-navigation #next-btn:only-child {
    margin-left: auto;
    margin-right: 0;
}

/* Alternative avec sélecteur adjacent */
.rtl .questionnaire-navigation #prev-btn[style*="display: none"] + #next-btn {
    margin-left: auto;
    margin-right: 0;
}

/* Styles responsifs RTL pour mobile */
@media (max-width: 640px) {
    .rtl .questionnaire-navigation {
        flex-direction: row-reverse !important;
        justify-content: space-between;
    }

    .rtl .questionnaire-navigation.single-button {
        justify-content: flex-end;
    }
}

/* Police arabe */
.lang-ar-ma {
    font-family: 'Alexandria', 'Noto Sans Arabic', 'Arial', sans-serif;
}

/* Import des polices arabes */
@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@400;700&family=Noto+Sans+Arabic:wght@300;400;500;600;700&display=swap');