/* Touline Prestige — expérience arabe RTL.
 * Le sens logique est appliqué aux composants, tandis que les données
 * techniques (prix, téléphone, dates et e-mail) restent lisibles en LTR.
 */
html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] body,
.tp-rtl {
  direction: rtl;
  text-align: right;
  font-family: "Noto Kufi Arabic", Tahoma, Arial, sans-serif;
}

.tp-rtl h1,
.tp-rtl h2,
.tp-rtl h3,
.tp-rtl h4,
.tp-rtl p,
.tp-rtl label,
.tp-rtl button,
.tp-rtl input,
.tp-rtl select,
.tp-rtl textarea,
.tp-rtl a {
  font-family: inherit;
}

.tp-rtl .site-contact-inner,
.tp-rtl .site-main-bar,
.tp-rtl .public-nav,
.tp-rtl .tp-simple-actions,
.tp-rtl .tp-contact-hero-actions,
.tp-rtl .tp-seo-actions,
.tp-rtl .tp-footer-simple-main,
.tp-rtl .tp-footer-simple-bottom,
.tp-rtl .tp-home-fleet-heading,
.tp-rtl .tp-seo-section-heading {
  direction: rtl;
}

.tp-rtl .site-contact-phone,
.tp-rtl .tp-footer-simple-contact strong,
.tp-rtl a[href^="tel:"],
.tp-rtl a[href^="mailto:"],
.tp-rtl input[type="tel"],
.tp-rtl input[type="email"],
.tp-rtl input[type="date"],
.tp-rtl input[type="time"],
.tp-rtl input[type="datetime-local"],
.tp-rtl .vehicle-price,
.tp-rtl .tp-home-fleet-price,
.tp-rtl .booking-total,
.tp-rtl [data-booking-total] {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.tp-rtl input:not([type="tel"]):not([type="email"]):not([type="date"]):not([type="time"]):not([type="datetime-local"]),
.tp-rtl textarea,
.tp-rtl select {
  text-align: right;
}

.tp-rtl select {
  background-position: left 14px center;
  padding-left: 42px;
  padding-right: 14px;
}

.tp-rtl .tp-language-menu {
  inset-inline-start: auto;
  inset-inline-end: 0;
  text-align: right;
}

.tp-rtl .tp-language-check {
  margin-inline-start: auto;
  margin-inline-end: 12px;
}

.tp-rtl .tp-floating-whatsapp {
  right: auto;
  left: max(18px, env(safe-area-inset-left));
}

.tp-rtl .tp-whatsapp-tooltip {
  right: auto;
  left: calc(100% + 12px);
}

.tp-rtl .tp-side-contact,
.tp-rtl .side-contact {
  right: auto;
  left: 0;
}

.tp-rtl .tp-home-fleet-controls,
.tp-rtl .tp-fr-home-gallery-lightbox {
  direction: ltr;
}

.tp-rtl .tp-home-fleet-track,
.tp-rtl .tp-seo-card-grid,
.tp-rtl .vehicle-grid,
.tp-rtl .catalog-grid {
  direction: rtl;
}

.tp-rtl .site-footer-arrow,
.tp-rtl .tp-home-fleet-link span,
.tp-rtl .tp-home-fleet-all span,
.tp-rtl .tp-seo-text-link span,
.tp-rtl .tp-seo-cta span,
.tp-rtl .public-cta span,
.tp-rtl .tp-contact-hero-secondary span,
.tp-rtl .tp-contact-booking-form button span {
  display: inline-block;
  transform: scaleX(-1);
}

.tp-rtl .tp-seo-section,
.tp-rtl .tp-contact-step-list li,
.tp-rtl .booking-form,
.tp-rtl .reservation-form,
.tp-rtl .catalog-filter,
.tp-rtl .vehicle-card,
.tp-rtl .tp-home-fleet-card-body,
.tp-rtl .tp-contact-detail-card,
.tp-rtl .tp-seo-faq-item,
.tp-rtl .tp-language-option {
  text-align: right;
}

.tp-rtl .tp-seo-section ul,
.tp-rtl .tp-seo-airport-points,
.tp-rtl .vehicle-features,
.tp-rtl .booking-options {
  padding-right: 0;
  padding-left: initial;
}

.tp-rtl .tp-seo-section li,
.tp-rtl .tp-seo-airport-points li,
.tp-rtl .vehicle-features li {
  padding-right: 0;
}

.tp-rtl .date-range-grid,
.tp-rtl .calendar-grid,
.tp-rtl [data-calendar-grid] {
  direction: ltr;
}

/* Parcours arabe : prise en charge à droite, puis retour à gauche.
 * Dans chaque bloc, la date précède l'heure selon le sens de lecture RTL. */
.tp-rtl .datetime-form-grid,
.tp-rtl .datetime-control-grid {
  direction: rtl;
}

.tp-rtl .datetime-form-grid label,
.tp-rtl .date-range-grid label,
.tp-rtl .calendar-grid button,
.tp-rtl [data-calendar-grid] button {
  direction: rtl;
  text-align: right;
}

.tp-rtl .calendar-grid button,
.tp-rtl [data-calendar-grid] button {
  text-align: center;
}

.tp-rtl .brand-logo,
.tp-rtl img,
.tp-rtl svg,
.tp-rtl .tp-footer-payment {
  direction: ltr;
}

.tp-rtl .tp-contact-map-frame,
.tp-rtl .tp-fr-home-gallery-lightbox-image,
.tp-rtl .tp-home-fleet-media {
  direction: ltr;
}

@media (max-width: 820px) {
  .tp-rtl .site-main-bar,
  .tp-rtl .public-nav,
  .tp-rtl .tp-simple-actions,
  .tp-rtl .tp-contact-hero-actions {
    align-items: stretch;
  }

  .tp-rtl .public-site-header .tp-language-switcher .tp-language-menu {
    inset-inline-start: auto;
    inset-inline-end: auto;
    right: auto;
    left: 0;
    width: min(240px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    transform: none;
  }
}

/* V2 — placement logique de l'en-tête : marque à droite, actions à gauche. */
.tp-rtl .public-site-header .site-main-bar .public-nav {
  margin-right: auto;
  margin-left: 0;
}

.tp-rtl .public-site-header .tp-language-switcher {
  margin-right: 18px;
  margin-left: 0;
}

/* Les sélecteurs conservent l'icône au début de lecture et le texte juste à côté. */
.tp-rtl .tp-location-picker-trigger,
.tp-rtl .tp-location-picker-option,
.tp-rtl .tp-date-picker-trigger {
  direction: rtl;
  text-align: right;
}

.tp-rtl .tp-location-picker-copy,
.tp-rtl .tp-location-picker-option-copy,
.tp-rtl .tp-location-picker-header,
.tp-rtl .tp-location-picker-selection,
.tp-rtl .tp-date-picker-value {
  text-align: right;
}

/* L'indicatif est toujours physiquement à gauche du numéro. */
.tp-rtl .phone-input-group {
  direction: ltr;
}

.tp-rtl .phone-input-group .phone-country-select {
  direction: ltr;
  text-align: left;
}

/* Un montant est une donnée LTR indivisible : 1 300 Dhs, jamais Dhs 1 300. */
.tp-rtl .vehicle-card-price strong,
.tp-rtl .vehicle-card-body > strong,
.tp-rtl .vehicle-result-content > strong,
.tp-rtl .tp-home-fleet-price strong,
.tp-rtl .tp-exact-vehicle-price strong,
.tp-rtl .vehicle-booking-daily,
.tp-rtl .vehicle-booking-rental,
.tp-rtl .vehicle-booking-total-value,
.tp-rtl .vehicle-booking-option-line strong,
.tp-rtl .pricing-fee-line strong,
.tp-rtl .price-line strong,
.tp-rtl .deposit-callout strong,
.tp-rtl .tp-vehicle-price-badge strong,
.tp-rtl .tp-vehicle-action-price strong,
.tp-rtl .confirmation-card strong:last-child,
.tp-rtl .price-card h2,
.tp-rtl .tp-quick-payment-amount,
.tp-rtl .tp-payment-amount,
.tp-rtl .tp-direct-payment-amount,
.tp-rtl .tp-location-picker-fee,
.tp-rtl .tp-money,
.tp-rtl #pricing-daily,
.tp-rtl #rental-preview,
.tp-rtl #delivery-preview,
.tp-rtl #discount-preview,
.tp-rtl #total-preview,
.tp-rtl #deposit-preview,
.tp-rtl [data-booking-total] {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.tp-rtl .tp-home-fleet-price {
  direction: rtl;
  text-align: right;
}

/* Avantages des véhicules : coche à droite, texte immédiatement après. */
.tp-rtl .catalog-section .vehicle-check-list,
.tp-rtl .vehicle-check-list {
  padding-right: 0;
  padding-left: 0;
}

.tp-rtl .catalog-section .vehicle-check-list li,
.tp-rtl .vehicle-check-list li {
  padding-right: 30px;
  padding-left: 0;
  text-align: right;
}

.tp-rtl .catalog-section .vehicle-check-list li::before,
.tp-rtl .vehicle-check-list li::before {
  right: 0;
  left: auto;
}

/* Pied de page arabe : identité, adresse et téléphone alignés à droite. */
.tp-rtl footer.site-footer-modern,
.tp-rtl footer.site-footer-modern .tp-footer-simple-brand,
.tp-rtl footer.site-footer-modern .tp-footer-simple-brand p,
.tp-rtl footer.site-footer-modern .tp-footer-simple-brand-contact {
  text-align: right;
}

.tp-rtl footer.site-footer-modern .tp-footer-logo-link,
.tp-rtl footer.site-footer-modern .tp-footer-simple-brand p,
.tp-rtl footer.site-footer-modern .tp-footer-simple-brand-contact {
  margin-right: 0;
  margin-left: auto;
}

.tp-rtl footer.site-footer-modern .tp-footer-logo-link {
  display: flex;
  width: max-content;
}

.tp-rtl footer.site-footer-modern .tp-footer-simple-brand-contact-link {
  width: 100%;
  justify-content: flex-start;
  direction: rtl;
  text-align: right;
}

.tp-rtl footer.site-footer-modern .tp-footer-phone-link {
  display: flex;
  direction: rtl;
  text-align: right;
  gap: 6px;
}

.tp-rtl footer.site-footer-modern .tp-footer-phone-number,
.tp-rtl .tp-payment-amount {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.tp-rtl footer.site-footer-modern .tp-footer-phone-label {
  direction: rtl;
  unicode-bidi: isolate;
}

@media (max-width: 760px) {
  .tp-rtl .public-site-header .site-main-bar {
    direction: ltr;
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .tp-rtl .public-site-header .site-main-bar .brand {
    grid-column: 3;
    justify-self: end;
    direction: rtl;
  }

  .tp-rtl .public-site-header .site-main-bar .public-nav {
    grid-column: 2;
    direction: rtl;
    margin: 0;
  }

  .tp-rtl .public-site-header .tp-language-switcher {
    grid-column: 1;
    justify-self: start;
    direction: rtl;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .tp-rtl .public-site-header .site-main-bar {
    grid-template-columns: auto minmax(0, clamp(135px, 42vw, 165px)) minmax(0, 1fr);
  }
}
