/* ============================================================
   RTL — Adaptation pour l'arabe (ar) et le darija (dar)
   Activé automatiquement via body.rtl par js/i18n.js
   ============================================================ */

body.rtl {
    direction: rtl;
    text-align: right;
}

/* Police plus lisible pour l'arabe sur les titres et le corps */
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4,
body.rtl .docteur-signature, body.rtl .faq-question {
    font-family: 'Tahoma', 'Segoe UI', var(--f-corps), sans-serif;
}
body.rtl {
    font-family: 'Segoe UI', Tahoma, var(--f-corps), sans-serif;
}

/* --- Header / Navigation --- */
body.rtl .header-inner { flex-direction: row-reverse; }
body.rtl .logo { flex-direction: row-reverse; }
body.rtl .nav-principale { flex-direction: row-reverse; }
body.rtl .header-actions { flex-direction: row-reverse; }
body.rtl .nav-principale a::after { right: 0; left: auto; }

@media (max-width: 980px) {
    body.rtl .nav-principale {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }
    body.rtl .nav-principale.ouvert { transform: translateX(0); }
}

/* --- Hero --- */
body.rtl .hero-grid { direction: rtl; }
body.rtl .hero-indicateur { flex-direction: row-reverse; }
body.rtl .hero-indicateur-texte { text-align: right; }

/* --- Eyebrow (petit trait décoratif avant le texte) --- */
body.rtl .eyebrow { flex-direction: row-reverse; }
body.rtl .eyebrow::before { content: none; }
body.rtl .eyebrow::after {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--c-or-champagne);
}

/* --- Services / cartes --- */
body.rtl .service-num { right: auto; left: 28px; }
body.rtl .services-grille { direction: rtl; }
body.rtl .service-cta { flex-direction: row-reverse; text-align: right; }
body.rtl .service-cta:hover svg { transform: translateX(-4px); }

/* --- Docteur --- */
body.rtl .docteur-credentials li { flex-direction: row-reverse; text-align: right; }

/* Docteur premium — hero */
body.rtl .dr-hero-grid { direction: rtl; }
body.rtl .dr-hero-cta { flex-direction: row-reverse; }
body.rtl .dr-hero-dots { right: auto; left: -2%; }
body.rtl .dr-hero-plus-1 { left: auto; right: 6%; }
body.rtl .dr-hero-plus-2 { right: auto; left: -4%; }
body.rtl .dr-hero-badge-experience { left: auto; right: -9%; flex-direction: row-reverse; }
body.rtl .dr-hero-badge-stat { right: auto; left: -7%; }
@media (max-width: 980px) {
    body.rtl .dr-hero-badge-experience { right: -4%; }
    body.rtl .dr-hero-badge-stat { left: -4%; }
}

/* --- Avis --- */
body.rtl .avis-grille { direction: rtl; }
body.rtl .avis-etoiles { unicode-bidi: bidi-override; direction: ltr; display: inline-block; }
body.rtl .avis-stat-etoiles { unicode-bidi: bidi-override; direction: ltr; display: inline-block; }
body.rtl .avis-deco-coeur { left: auto; right: -4%; }
body.rtl .avis-deco-check { right: auto; left: 1%; }
body.rtl .avis-deco-chip { right: auto; left: -2%; padding: 9px 10px 9px 16px; }
body.rtl .avis-btn-avis-curseur { right: auto; left: -8px; transform: rotate(12deg); }

/* --- FAQ --- */
body.rtl .faq-question { flex-direction: row-reverse; }
body.rtl .faq-question .icone-plus::before { right: 50%; transform: translateX(50%); }
body.rtl .faq-question-contenu { flex-direction: row-reverse; }
body.rtl .faq-item::before { left: auto; right: 0; }
body.rtl .faq-reponse-inner { padding: 0 78px 24px 26px; }
@media(max-width:600px){ body.rtl .faq-reponse-inner { padding: 0 60px 20px 18px; } }

/* --- Contact --- */
body.rtl .contact-grid { direction: rtl; }
body.rtl .contact-info-item { flex-direction: row-reverse; text-align: right; }
body.rtl .statut-ouverture { flex-direction: row-reverse; }
body.rtl .horaires-table td:last-child { text-align: left; }
body.rtl .contact-reseaux { flex-direction: row-reverse; justify-content: flex-end; }

/* --- Footer --- */
body.rtl .footer-grid { direction: rtl; }
body.rtl .footer-logo { flex-direction: row-reverse; }
body.rtl .footer-bottom { flex-direction: row-reverse; }

/* --- Modal RDV --- */
body.rtl .modal-fermer { right: auto; left: 20px; }
body.rtl .champ-tel-groupe { flex-direction: row-reverse; }
body.rtl .qcm-item { flex-direction: row-reverse; }
body.rtl .qcm-toggle { flex-direction: row-reverse; }
body.rtl .rdv-categorie-btn,
body.rtl .rdv-motif-btn,
body.rtl .rdv-service-entete { flex-direction: row-reverse; }

/* Les numéros de téléphone et dates restent toujours en LTR même en RTL */
body.rtl input[type="tel"],
body.rtl input[type="date"],
body.rtl input[type="time"],
body.rtl input[type="email"],
body.rtl .creneau-btn,
body.rtl #cabinetTelephone,
body.rtl #cabinetEmail {
    direction: ltr;
    text-align: right;
}

/* --- Chatbot --- */
body.rtl .chatbot-fenetre { right: auto; left: 28px; }
body.rtl .chatbot-toggle { right: auto; left: 28px; }
body.rtl .chatbot-header { flex-direction: row-reverse; }
body.rtl .chatbot-header-actions { margin-left: 0 !important; margin-right: auto; }
body.rtl .chatbot-options button { flex-direction: row-reverse; }
body.rtl .bulle-bot { align-self: flex-end; border-bottom-left-radius: 14px; border-bottom-right-radius: 3px; }
body.rtl .bulle-user { align-self: flex-start; border-bottom-right-radius: 14px; border-bottom-left-radius: 3px; }
body.rtl .chatbot-options { align-self: flex-end; }
body.rtl .chatbot-options button { text-align: right; }
body.rtl .chatbot-hint { right: auto; left: 98px; border-bottom-right-radius: var(--radius-lg); border-bottom-left-radius: 6px; }
body.rtl .chatbot-proactive { right: auto; left: 20px; border-bottom-right-radius: var(--radius-lg); border-bottom-left-radius: 6px; }
body.rtl .chatbot-proactive-fermer { right: auto; left: 8px; }
body.rtl .chatbot-fenetre { transform-origin: bottom left; }
body.rtl .chatbot-chip, body.rtl .chatbot-saisie { direction: rtl; }

@media (max-width: 480px) {
    body.rtl .chatbot-fenetre { left: 14px; right: auto; }
    body.rtl .chatbot-toggle { left: 18px; right: auto; }
    body.rtl .chatbot-hint { left: auto; right: 12px; }
    body.rtl .chatbot-proactive { left: 12px; right: auto; }
}

/* --- Sélecteur de langue --- */
body.rtl .langue-menu { right: auto; left: 0; }
body.rtl .langue-menu button { text-align: right; flex-direction: row-reverse; }
body.rtl .langue-active-btn { flex-direction: row-reverse; }

@media (max-width: 980px) {
    body.rtl .langue-menu { left: auto; right: 0; }
}

/* --- Toast notification --- */
body.rtl .notification-toast { left: auto; right: 24px; }
