/* Le sélecteur natif fonctionne au clavier et reste accessible sans JavaScript. */
.langues-vitrine { position: relative; flex: none; color: #1e3a5c; }
.langues-vitrine summary {
  display: flex; align-items: center; justify-content: center; gap: .35rem;
  min-height: 44px; max-width: 11rem; padding: .3rem .65rem; cursor: pointer;
  font: 600 .9rem/1.3 'Instrument Sans', system-ui, sans-serif; list-style: none;
  background: #fff; border: 1px solid #cad2d7; border-radius: 8px;
}
.langues-vitrine summary::after { content: ''; width: .4rem; height: .4rem; margin: 0 .1rem .18rem .22rem;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.langues-vitrine[open] summary::after { transform: rotate(225deg); margin-bottom: -.1rem; }
.langues-vitrine summary::-webkit-details-marker { display: none; }
.langues-vitrine nav, header.site .langues-vitrine nav {
  position: absolute; z-index: 5; top: calc(100% + 4px); right: 0;
  display: grid; align-items: stretch; justify-content: stretch; gap: 0;
  width: max-content; min-width: 10.5rem; max-width: calc(100vw - 2rem); max-height: 62vh; overflow: auto;
  margin: 0; padding: 4px; background: #fff; border: 1px solid #cad2d7; border-radius: 9px;
  box-shadow: 0 7px 18px rgba(15,29,46,.16);
}
.langues-vitrine nav a {
  display: flex; align-items: center; min-height: 44px; padding: .4rem .75rem;
  text-decoration: none; border-radius: 5px; color: #1e3a5c;
}
.langues-vitrine nav a:hover, .langues-vitrine nav a[aria-current] { background: #edf2f5; }
.langues-vitrine nav a[aria-current] { font-weight: 700; }
.langues-vitrine :focus-visible { outline: 3px solid #a66800; outline-offset: -3px; }
header.site > nav:has(> .langues-vitrine) { max-width: 1360px; gap: clamp(6px, 1vw, 16px); }
@media (max-width: 1140px) {
  header.site nav > .langues-vitrine { margin-left: auto; }
  header.site nav > .logo { min-width: 0; }
  header.site nav > .logo small { white-space: normal; }
  .langues-vitrine summary { font-size: .85rem; }
}

/* La même offre se lit en deux périodes. Chaque prix garde toute la largeur de sa période. */
#grille .formules.public-formules {
  grid-template-columns: minmax(0, 1fr);
  max-inline-size: 66rem;
  padding: clamp(1.4rem, 3vw, 2.8rem);
}
#grille .formules .salle-pique {
  width: 34px; height: 46px; margin-block-end: .4rem;
}
#grille .formules .formule {
  display: flex; flex-direction: column; align-items: stretch;
  min-inline-size: 0; gap: .65rem;
  padding: clamp(1.05rem, 2.2vw, 2rem);
}
#grille .formules .formule::before { display: none; }
#grille .formules .formule + .formule { border: 0; border-block-start: 1px solid var(--salle-filet); }
#grille .formules .formule h3,
#grille .formules .formule .public-formule-prix {
  align-self: stretch; text-align: start; line-height: 1.2; overflow-wrap: anywhere;
}
#grille .formules .formule .public-formule-prix {
  white-space: normal; font-size: clamp(1.6rem, 2.5vw, 2.25rem);
}
#grille .formules .formule .btn {
  align-self: flex-start; margin-block-start: .5rem;
  width: fit-content; max-inline-size: 100%; white-space: normal; text-align: center;
}
@media (min-width: 56rem) {
  #grille .formules.public-formules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #grille .formules .formule + .formule { border: 0; border-inline-start: 1px solid var(--salle-filet); }
}

/* Les conditions tarifaires traduites restent lisibles quelle que soit leur longueur. */
@media (max-width: 640px) {
  html[lang] .promesses .conteneur { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[lang] .promesse { padding-inline: clamp(.7rem, 3vw, 1.5rem); overflow-wrap: anywhere; }
  #adistance .constructeur .ligne-tarif {
    grid-template: "nom" auto "prix" auto "desc" auto / minmax(0, 1fr);
    gap: .35rem;
  }
  #adistance .constructeur .ligne-tarif::before { display: none; }
  #adistance .constructeur .ligne-prix {
    white-space: normal; overflow-wrap: anywhere; text-align: start;
  }
  html[lang] body.refonte-salle .public-formules article,
  html[lang] body.refonte-salle .public-formules .formule {
    display: flex; flex-direction: column; align-items: stretch;
    gap: .5rem;
  }
  html[lang] body.refonte-salle .public-formules article::before,
  html[lang] body.refonte-salle .public-formules .formule::before { display: none; }
  html[lang] body.refonte-salle .public-formules .public-formule-prix {
    white-space: normal; text-align: start; overflow-wrap: anywhere;
  }
  html[lang] body.refonte-salle .demarrer-duo { grid-template-columns: minmax(0, 1fr); }
  html[lang] body.refonte-salle .demarrer-duo .ligne-tarif,
  html[lang] body.refonte-salle .demarrer-duo .total {
    display: flex; flex-wrap: wrap; gap: .35rem .75rem;
  }
  html[lang] body.refonte-salle .demarrer-duo .ligne-prix,
  html[lang] body.refonte-salle .demarrer-duo .total > * {
    min-width: 0; white-space: normal; overflow-wrap: anywhere;
  }
  html[lang] body main p, html[lang] body .prepa li { overflow-wrap: anywhere; }
  html[lang] body main h1, html[lang] body main h2 { hyphens: auto; overflow-wrap: anywhere; }
}

/* Le récapitulatif du devis affiche les deux mensualités dans une même phrase. */
html[lang] body.refonte-salle .demarrer-duo > * { min-width: 0; }
html[lang] body.refonte-salle .demarrer-duo .ligne-prix {
  min-width: 0; white-space: normal; overflow-wrap: anywhere;
}
html[lang] body.refonte-salle .demarrer-duo .ligne-tarif.socle {
  display: flex; flex-direction: column; align-items: stretch; gap: .5rem;
}
html[lang] body.refonte-salle .demarrer-duo .ligne-tarif.socle::before { display: none; }

html[dir="rtl"] body,
html[dir="rtl"] :is(h1, h2, h3, p, li, label, summary, button, input, select, textarea, .btn, .ligne-prix, .public-formule-prix) {
  font-family: Tahoma, Arial, sans-serif;
  letter-spacing: normal;
}
html[dir="rtl"] :is(h1, h2, h3) { line-height: 1.45; }
html[dir="rtl"] :is(.logo-texte, .logo-pied-bloc .mot, input[type="tel"], input[type="email"], #jourSaisie, a[href^="tel:"]) {
  direction: ltr; unicode-bidi: isolate;
}
html[dir="rtl"] .logo-texte small { direction: rtl; }
html[dir="rtl"] body.refonte-salle.vitrine-lisible .vit-conditions,
html[dir="rtl"] :is(.public-details, .ligne-nom, .form-contact label) { text-align: start; }
html[dir="rtl"] :is(.vit-conditions, .public-details ul) { padding-left: 0; padding-inline-start: 1.4em; }
html[dir="rtl"] .points li { padding-left: 0; padding-inline-start: 1.25em; }
html[dir="rtl"] .points li::before { left: auto; inset-inline-start: 0; }
html[dir="rtl"] .formule .public-formule-prix { white-space: normal; }
html[dir="rtl"] .langues-vitrine nav { right: auto; inset-inline-end: 0; }
@media (max-width: 1140px) {
  html[dir="rtl"] header.site nav > .langues-vitrine { margin-left: 0; margin-inline-start: auto; }
}
