/* ==========================================================================
   COMPOSANT PARTAGÉ : LE TABLEAU DES FORMULES (bande châssis marine)
   L'écran de la borne montre la voiture en plan (intérieur) et de profil (extérieur) ; chaque zone traitée
   s'allume comme un voyant. À côté : les poussoirs de programme (clés), la fiche de la formule choisie,
   les options. Comportement : borne/js/formules.js (un tableau par élément [data-formules]).

   Deux dispositions :
   - .formules (accueil) : les deux familles dans un seul tableau, écran à deux vues ;
   - .formules--groupe (page Particuliers) : une famille par bande, écran à une seule vue, options dessous.
   ========================================================================== */

/* ---------- Accueil : les deux familles, troisième rangée vide pour que l'écran reste entier ---------- */
.formules { grid-template-rows: auto auto 88px; row-gap: 40px; align-items: start; }
.formules-titre { grid-column: 1 / span 6; align-self: end; }
.formules-intro { grid-column: 7 / span 6; align-self: end; display: grid; gap: 20px; justify-items: start; }
.afficheur--tarifs .afficheur-texte { font-size: clamp(0.92rem, 0.72rem + 0.45vw, 1.12rem); }

/* ---------- L'écran : un grand afficheur, même matière que les autres (fond écran, trame, anneau inox) ---------- */
.ecran-formules {
    grid-column: 1 / span 6;
    grid-row: 2 / span 2;
    position: sticky;
    top: calc(var(--auvent) + 24px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px clamp(14px, 1.4vw, 20px) 16px;
    border-radius: var(--rayon-plaque);
    background-color: var(--ecran);
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 0.9px, transparent 1.25px);
    background-size: 5px 5px;
    box-shadow: var(--ecran-creuse);
    color: var(--blanc);
}

.ecran-statut {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 3.5rem;
    padding: 0 4px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.ecran-statut .afficheur-texte {
    font-size: 0.94rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ecran-statut .afficheur-temoin { align-self: flex-start; margin-top: 0.42rem; }

.vue-bloc { position: relative; }
/* L'écran tient dans la hauteur de la fenêtre : les deux vues se partagent la place restante */
.vue--interieur { max-height: calc((100svh - var(--auvent) - 236px) * 0.545); }
.vue--exterieur { max-height: calc((100svh - var(--auvent) - 236px) * 0.455); }
.vue-titre {
    position: absolute;
    top: 2px;
    left: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--condense);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(207, 221, 242, 0.55);
    pointer-events: none;
}
.vue-titre::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(207, 221, 242, 0.3); }
.ecran-formules[data-vue="interieur"] .vue-bloc--interieur .vue-titre,
.ecran-formules[data-vue="exterieur"] .vue-bloc--exterieur .vue-titre { color: var(--blanc); }
.ecran-formules[data-vue="interieur"] .vue-bloc--interieur .vue-titre::before,
.ecran-formules[data-vue="exterieur"] .vue-bloc--exterieur .vue-titre::before { background: var(--vif); outline: 2px solid rgba(255, 255, 255, 0.35); }

/* Le schéma : traits clairs sur l'écran, zones en voyants */
.vue { width: 100%; height: auto; overflow: visible; }
.vue text {
    font-family: var(--condense);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.vue .coque,
.vue .contexte,
.vue .sol { fill: none; stroke: rgba(207, 221, 242, 0.4); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.vue .coque { stroke: rgba(207, 221, 242, 0.66); stroke-width: 1.8; }
.vue .sol { stroke-dasharray: 2 6; stroke-width: 1.5; }
.vue .contexte--cache { stroke-dasharray: 5 3; }

.vue .zone { cursor: default; outline: none; }
.vue .zone .forme {
    fill: rgba(207, 221, 242, 0.04);
    stroke: rgba(207, 221, 242, 0.56);
    stroke-width: 1.4;
    transition: fill 0.15s ease, stroke 0.15s ease;
}
.vue .prise { fill: transparent; stroke: none; }
.vue .prise--trait { fill: none; stroke: transparent; stroke-width: 10; pointer-events: stroke; }
.vue .zone--fantome .forme { fill: none; stroke-dasharray: 10 4 2 4; pointer-events: none; }
.vue .zone--cache .forme { stroke-dasharray: 5 3; }

/* Un seul code, écran et fiche : plein = nouveau dans la formule, creux = déjà inclus (pack hérité) */
.vue .zone.est-herite .forme { fill: rgba(207, 221, 242, 0.06); stroke: var(--bleu-texte); stroke-width: 2.4; }
.vue .zone.est-nouveau .forme { fill: var(--vif); stroke: var(--blanc); stroke-width: 1.8; }
.vue .zone.est-survolee .forme,
.vue .zone:focus-visible .forme { fill: var(--vif-clair); stroke: var(--blanc); stroke-width: 2.6; }
.vue .zone--fantome.est-survolee .forme,
.vue .zone--fantome:focus-visible .forme { fill: rgba(42, 127, 218, 0.3); stroke-dasharray: 10 4 2 4; }

/* Ensembles (habitacle, extérieur) : la nappe sous les zones, allumée par les prestations d'ensemble */
.vue .ensemble { outline: none; }
.vue .ensemble .forme { fill: transparent; stroke: none; pointer-events: none; transition: fill 0.15s ease, stroke 0.15s ease; }
.vue .ensemble.est-herite .forme { fill: rgba(207, 221, 242, 0.04); stroke: var(--bleu-texte); stroke-width: 1.8; stroke-dasharray: 6 4; }
.vue .ensemble.est-nouveau .forme { fill: rgba(0, 99, 206, 0.26); stroke: var(--vif-clair); stroke-width: 2; }
.vue .ensemble.est-survolee .forme,
.vue .ensemble:focus-visible .forme { fill: rgba(42, 127, 218, 0.45); stroke: var(--blanc); stroke-width: 2.4; stroke-dasharray: none; }

/* Repères : libellés, traits de rappel et cote de l'habitacle */
.vue .repere, .vue .cote { cursor: default; }
.vue .repere text, .vue .cote text { fill: rgba(207, 221, 242, 0.5); transition: fill 0.15s ease; }
.vue .repere .trait, .vue .cote .trait { fill: none; stroke: rgba(207, 221, 242, 0.36); stroke-width: 1; stroke-dasharray: 3 3; }
.vue .cote .trait { stroke-dasharray: none; }
.vue .repere .point { fill: rgba(207, 221, 242, 0.6); }
.vue .repere.est-herite text, .vue .cote.est-herite text { fill: rgba(207, 221, 242, 0.8); }
.vue .repere.est-nouveau text, .vue .cote.est-nouveau text { fill: var(--blanc); }
.vue .repere.est-nouveau .trait, .vue .cote.est-nouveau .trait { stroke: rgba(255, 255, 255, 0.85); stroke-dasharray: none; }
.vue .repere.est-nouveau .point { fill: var(--blanc); }
.vue .repere.est-survolee text, .vue .cote.est-survolee text { fill: var(--blanc); }
.vue .repere.est-survolee .trait, .vue .cote.est-survolee .trait { stroke: var(--blanc); stroke-width: 1.8; stroke-dasharray: none; }
.vue .repere.est-survolee .point { fill: var(--vif-clair); stroke: var(--blanc); stroke-width: 1.5; }

/* Survol d'une prestation, d'une option ou d'une zone : tout le reste recule */
.vue .zone, .vue .ensemble, .vue .repere, .vue .cote { transition: opacity 0.15s ease; }
.ecran-formules.a-un-survol .vue :is(.zone, .ensemble, .repere, .cote):not(.est-survolee) { opacity: 0.28; }

/* La vue qui ne concerne pas la formule montrée s'éteint à moitié */
.ecran-formules[data-vue="exterieur"] .vue--interieur :is(.coque, .contexte, .zone:not(.est-survolee), .repere:not(.est-survolee), .cote:not(.est-survolee)),
.ecran-formules[data-vue="interieur"] .vue--exterieur :is(.sol, .contexte, .zone:not(.est-survolee), .repere:not(.est-survolee)) { opacity: 0.42; }

/* Un voyant qui vient de s'allumer clignote une fois (« qu'est-ce qui a changé ? ») */
.vue .vient-de-sallumer .forme { animation: voyant-allume 0.34s steps(3, end) 1; }
@keyframes voyant-allume {
    0% { opacity: 0.15; }
    40% { opacity: 1; }
    70% { opacity: 0.45; }
    100% { opacity: 1; }
}

.ecran-legende {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    padding: 10px 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.ecran-legende.est-vide { visibility: hidden; }
.legende-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--condense);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bleu-texte);
}
.legende-item::before { content: ''; flex: none; width: 13px; height: 13px; border-radius: 50%; }
.legende-item--nouveau::before { background: var(--vif); box-shadow: inset 0 0 0 1.5px var(--blanc); }
.legende-item--herite::before { background: transparent; box-shadow: inset 0 0 0 2px var(--bleu-texte); }

.ecran-zones { display: none; }
/* Un nom par zone, insécable, séparateur porté en fin de nom : aucune ligne ne commence par « · » */
.ecran-zones .zone-nom { white-space: nowrap; transition: opacity 0.15s ease, color 0.15s ease; }
.ecran-zones .zone-nom:not(:last-child)::after { content: ' ·'; }
.ecran-formules.a-un-survol .ecran-zones .zone-nom:not(.est-survolee) { opacity: 0.28; }
.ecran-zones .zone-nom.est-survolee { color: var(--blanc); }

/* ---------- Accueil : deux groupes côte à côte, puis la fiche, puis les options ---------- */
.formules-tableau {
    grid-column: 7 / span 6;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        "gi ge"
        "ci ce"
        "fiches fiches"
        "oi oe";
    column-gap: var(--col-gap);
    row-gap: 14px;
    align-items: start;
}
/* Le bouton WhatsApp flottant (écrans de plus de 900 px) ne doit passer sur aucun prix */
@media (min-width: 901px) {
    .formules-tableau,
    .formules--groupe .options--page { padding-right: var(--reserve-wa); }
}
.groupe-titre--int { grid-area: gi; }
.groupe-titre--ext { grid-area: ge; }
.cles--int { grid-area: ci; }
.cles--ext { grid-area: ce; }
.options--int { grid-area: oi; }
.options--ext { grid-area: oe; }
.fiches { grid-area: fiches; margin: 8px 0 14px; }

.groupe-titre { display: flex; align-items: center; gap: 12px; font-size: 1.55rem; line-height: 1.1; }
.groupe-titre .poussoir-cap { --cap: 2.3rem; background: var(--blanc); color: var(--marine); }

/* ---------- Poussoir de programme (clé) : cap à voyant, nom sur la plaque, prix imprimé ---------- */
.cles { display: grid; gap: 10px; }
.cle {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "bouton prix"
        "duree prix";
    align-items: center;
    column-gap: 12px;
    row-gap: 3px;
    min-height: 74px;
    padding: 10px 16px 10px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.2);
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s var(--course);
}
.cle-bouton {
    grid-area: bouton;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--blanc);
    font-family: var(--condense);
    font-weight: 700;
    font-size: 1.06rem;
    line-height: 1.15;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
}
.cle-bouton::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.cle-bouton:focus-visible { outline: none; }
/* Focus : la cap s'entoure d'une bague (partout), et toute la clé quand :has() est connu */
.cle-bouton:focus-visible .cle-cap { box-shadow: 0 0 0 3px var(--blanc), 0 0 0 6px var(--vif); }
.cle:has(.cle-bouton:focus-visible) { outline: 3px solid var(--blanc); outline-offset: 3px; }
.cle-cap {
    flex: none;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--marine);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}
.cle-cap::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: rgba(207, 221, 242, 0.35); }
.cle-prix {
    grid-area: prix;
    font-family: var(--condense);
    font-weight: 800;
    font-size: 1.75rem;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
    pointer-events: none;
}
.prix-mention {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
    font-size: 0.5em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bleu-texte);
}
.cle-duree {
    grid-area: duree;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: calc(2.3rem + 12px);
    font-size: 0.92rem;
    color: var(--bleu-texte);
    pointer-events: none;
}
.cle-duree svg,
.fiche-duree svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.cle:hover { background: rgba(255, 255, 255, 0.12); }
.cle:hover .cle-cap { background: var(--bleu); }
.cle:active { transform: translateY(2px); }
.cle.est-choisie { background: rgba(0, 99, 206, 0.2); box-shadow: inset 0 0 0 2px var(--vif); }
.cle.est-choisie .cle-cap { background: var(--vif); box-shadow: 0 0 0 3px var(--anneau-vif); }
.cle.est-choisie .cle-cap::after { background: var(--blanc); }

/* Étiquettes (« Populaire », « Premium », « Éco ») : composant partagé .etiquette de borne.css */
.cle .etiquette { margin-left: 2px; }

/* ---------- Options : lignes secondaires sous leur groupe ---------- */
.options { display: grid; }
.options-titre {
    padding: 12px 0 8px;
    border-bottom: 1px solid var(--bleu-filet);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--bleu-texte);
}
.options-liste { list-style: none; margin: 0; padding: 0; }
.option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "voyant nom prix"
        ". desc desc";
    column-gap: 10px;
    align-items: baseline;
    padding: 9px 8px;
    border-bottom: 1px solid var(--bleu-filet);
    border-radius: 8px;
    cursor: default;
    outline: none;
    transition: background-color 0.15s ease;
}
.option::before { content: ''; grid-area: voyant; align-self: center; width: 9px; height: 9px; border-radius: 50%; background: rgba(207, 221, 242, 0.3); }
.option-nom { grid-area: nom; font-family: var(--texte); font-weight: 600; font-size: 0.98rem; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.option-prix { grid-area: prix; font-family: var(--condense); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em; }
.option-desc { grid-area: desc; font-size: 0.88rem; line-height: 1.4; color: var(--bleu-texte); }
.option.est-survolee,
.option.ressort { background: rgba(0, 99, 206, 0.26); }
.option.est-survolee::before,
.option.ressort::before { background: var(--vif-clair); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }
.option:focus-visible { box-shadow: inset 0 0 0 2px var(--blanc); }

/* ---------- La fiche : plaque blanche imprimée en marine, prestations rangées par zone ---------- */
.fiche {
    padding: 24px clamp(20px, 2.4vw, 34px) 26px;
    border-radius: var(--rayon-plaque);
    background: var(--blanc);
    color: var(--marine);
    box-shadow: var(--ombre-plaque), inset 0 0 0 1px var(--inox-2);
}
.fiche-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; padding-bottom: 16px; }
.fiche-nom { font-size: clamp(1.8rem, 1.25rem + 1.1vw, 2.35rem); }
.fiche-sous-titre {
    margin-top: 6px;
    font-family: var(--condense);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ardoise);
}
.fiche-tarif { display: grid; justify-items: end; gap: 6px; }
.fiche-prix { font-family: var(--condense); font-weight: 800; font-size: clamp(2.3rem, 1.7rem + 1.2vw, 3rem); line-height: 0.95; text-align: right; }
.fiche-prix .prix-mention { font-size: 1.05rem; color: var(--ardoise); }
.cle-prix .prix-mention { font-size: 0.8rem; }
.fiche-duree {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--condense);
    font-weight: 700;
    font-size: 1.08rem;
    letter-spacing: 0.04em;
    color: var(--ardoise);
}
.fiche-note { margin: -4px 0 14px; max-width: 46ch; font-size: 0.95rem; color: var(--ardoise); }
.fiche-legende { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px 0; border-top: 1px solid var(--inox-2); }
.fiche-inclut,
.fiche-nouveautes {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--condense);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.fiche-inclut { color: var(--ardoise); }
.fiche-inclut::before,
.fiche-nouveautes::before { content: ''; flex: none; width: 12px; height: 12px; border-radius: 50%; }
.fiche-inclut::before { background: transparent; box-shadow: inset 0 0 0 2px var(--ardoise); }
.fiche-nouveautes::before { background: var(--vif); box-shadow: 0 0 0 3px rgba(0, 99, 206, 0.22); }

.fiche-zones { margin: 0; border-bottom: 1px solid var(--inox-2); }
.famille {
    display: grid;
    grid-template-columns: minmax(0, 11.5rem) minmax(0, 1fr);
    column-gap: 18px;
    padding: 10px 0;
    border-top: 1px solid var(--inox-2);
}
.famille dt {
    grid-column: 1;
    grid-row: 1 / span 4;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding-top: 6px;
    font-family: var(--condense);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: default;
    transition: color 0.15s ease;
}
.famille dt::before { content: ''; flex: none; width: 10px; height: 10px; margin-top: 2px; border-radius: 50%; background: var(--inox-1); box-shadow: inset 0 0 0 1.5px var(--inox-2); }
.famille.est-nouveau dt::before { background: var(--vif); box-shadow: 0 0 0 3px rgba(0, 99, 206, 0.2); }
.famille.est-herite dt::before { background: transparent; box-shadow: inset 0 0 0 2px var(--ardoise); }
.famille.est-eteinte dt { color: var(--ardoise); font-weight: 600; }
.famille.est-eteinte dt::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--inox-2); }
.famille dt.est-survolee { color: var(--vif); }
.famille dd { grid-column: 2; margin: 0; }

.ligne {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 5px 8px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--marine);
    cursor: default;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.ligne::before { content: ''; flex: none; align-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--vif); box-shadow: 0 0 0 3px rgba(0, 99, 206, 0.2); }
.ligne[data-origine] { font-weight: 400; color: var(--ardoise); }
.ligne[data-origine]::before { background: transparent; box-shadow: inset 0 0 0 2px var(--ardoise); }
.ligne[data-origine]::after {
    content: attr(data-origine);
    flex: none;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--inox-1);
    font-family: var(--condense);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--ardoise);
}
.ligne.est-survolee,
.ligne.ressort { background: rgba(0, 99, 206, 0.1); box-shadow: inset 0 0 0 1.5px rgba(0, 99, 206, 0.45); }
.ligne:focus-visible { outline: 3px solid var(--vif); outline-offset: 1px; }

.fiche-action { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Page Particuliers : une famille par bande, fiche plus complète ---------- */
.formules--groupe { grid-template-rows: auto auto auto 88px; row-gap: 40px; align-items: start; }
.formules--groupe .formules-titre { grid-column: 1 / span 8; grid-row: 1; }
.formules--groupe .ecran-formules { grid-column: 1 / span 6; grid-row: 2 / span 3; }
.formules--groupe .formules-tableau { grid-column: 7 / span 6; grid-row: 2; grid-template-columns: minmax(0, 1fr); grid-template-areas: none; row-gap: 12px; }
.formules--groupe .formules-tableau > * { grid-area: auto; }
.formules--groupe .fiches { margin: 10px 0 0; }
.formules--groupe .options--page { grid-column: 7 / span 6; grid-row: 3; }
/* Une seule vue : elle prend toute la hauteur que l'écran laisse */
.ecran-formules--une-vue .vue { max-height: calc(100svh - var(--auvent) - 210px); }

.cle-sous-titre {
    display: block;
    margin-top: 3px;
    font-weight: 600;
    font-size: 0.86rem;
    letter-spacing: 0.07em;
    color: var(--bleu-texte);
}
.cle-nom-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cle-plaque { display: block; min-width: 0; }

.fiche-accroche { margin-top: 10px; font-family: var(--condense); font-weight: 600; font-size: 1.12rem; line-height: 1.25; letter-spacing: 0.02em; color: var(--ardoise); }
.fiche-titre .etiquette { margin-left: 10px; vertical-align: 0.35em; }

/* Options d'une famille, sous la fiche (page Particuliers) : titre de bande, note, lignes */
.options--page { display: grid; gap: 12px; }
.options--page .options-titre-page { font-size: clamp(1.55rem, 1.1rem + 1vw, 2.1rem); line-height: 1.05; }
.options--page .options-note { max-width: 58ch; color: var(--bleu-texte); font-size: 0.98rem; }
.options--page .options-liste { border-top: 1px solid var(--bleu-filet); }
.options--page .option-nom { font-size: 1.02rem; }
.options--page .option-prix { font-size: 1.3rem; }

/* ==========================================================================
   ÉCRANS INTERMÉDIAIRES ET TÉLÉPHONE
   ========================================================================== */
@media (max-width: 1260px) {
    .famille { grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); }
}

@media (max-width: 1080px) {
    /* L'écran devient un bandeau collant sous l'auvent, sans libellés (les deux vues côte à côte) */
    .formules-titre, .formules-intro, .ecran-formules, .formules-tableau,
    .formules--groupe .formules-titre, .formules--groupe .ecran-formules,
    .formules--groupe .formules-tableau, .formules--groupe .options--page { grid-column: 1 / -1; }
    .formules, .formules--groupe { grid-template-rows: none; row-gap: 28px; }
    .ecran-formules, .formules-tableau,
    .formules--groupe .ecran-formules, .formules--groupe .formules-tableau, .formules--groupe .options--page { grid-row: auto; }
    .ecran-formules {
        top: var(--auvent);
        z-index: 20;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "statut statut"
            "vi ve"
            "zones zones";
        gap: 6px 20px;
        padding: 10px 16px 12px;
    }
    .ecran-zones {
        grid-area: zones;
        display: block;
        font-size: 0.85rem;
        line-height: 1.35;
        color: var(--bleu-texte);
    }
    .ecran-statut { grid-area: statut; min-height: 0; padding-bottom: 8px; }
    .vue-bloc--interieur { grid-area: vi; }
    .vue-bloc--exterieur { grid-area: ve; }
    /* La vue du groupe montré prend les deux tiers ; la vue éteinte se contente du tiers restant */
    .ecran-formules[data-vue="interieur"] { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
    .ecran-formules[data-vue="exterieur"] { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
    .vue { max-height: 116px; }
    .ecran-formules[data-vue="interieur"] .vue--interieur,
    .ecran-formules[data-vue="exterieur"] .vue--exterieur { max-height: 176px; }
    .vue .reperes { display: none; }
    .vue-titre { top: 0; left: 0; }
    .ecran-legende { display: none; }
    /* Une seule vue (page Particuliers) : pleine largeur du bandeau */
    .ecran-formules--une-vue,
    .ecran-formules--une-vue[data-vue] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "statut" "vue" "zones"; }
    .ecran-formules--une-vue .vue-bloc { grid-area: vue; }
    .ecran-formules--une-vue[data-vue] .vue { max-height: 190px; }
    .formules--groupe .options--page { padding-right: 0; }
}

@media (max-width: 900px) {
    /* Formules au téléphone : bandeau d'écran collant, une seule vue (celle du groupe montré) */
    .formules, .formules--groupe { row-gap: 22px; }
    .ecran-formules {
        margin-inline: calc(var(--gouttiere) * -1);
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "statut"
            "vue"
            "zones";
        gap: 4px;
        padding: 8px 16px 10px;
        border-radius: 0;
        box-shadow: var(--ecran-creuse), var(--ombre-plaque);
    }
    .ecran-statut { gap: 0.6rem; padding: 0 0 6px; }
    .ecran-statut .afficheur-texte { font-size: 0.8rem; min-height: 2.6em; }
    .ecran-statut .afficheur-temoin { width: 8px; height: 8px; }
    .vue-bloc { grid-area: vue; }
    .ecran-formules[data-vue="interieur"] .vue-bloc--exterieur,
    .ecran-formules[data-vue="exterieur"] .vue-bloc--interieur { display: none; }
    .vue-titre { position: absolute; top: 0; left: 0; margin: 0; font-size: 0.72rem; }
    .ecran-formules[data-vue="interieur"],
    .ecran-formules[data-vue="exterieur"] { grid-template-columns: minmax(0, 1fr); }
    .ecran-formules[data-vue] .vue { max-height: 112px; }
    .ecran-zones {
        grid-area: zones;
        display: block;
        font-size: 0.8rem;
        line-height: 1.35;
        color: var(--bleu-texte);
        min-height: 2.7em;
    }

    .formules-tableau { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; row-gap: 12px; }
    .formules-tableau > * { grid-area: auto; }
    .groupe-titre--int { order: 1; }
    .cles--int { order: 2; }
    .fiches { order: 3; margin-top: 4px; }
    .options--int { order: 4; }
    .groupe-titre--ext { order: 5; margin-top: 18px; }
    .cles--ext { order: 6; }
    .options--ext { order: 8; }
    .formules-tableau[data-groupe="exterieur"] .fiches { order: 7; }
    .groupe-titre { font-size: 1.35rem; }
    .cle { min-height: 64px; padding: 8px 14px 8px 8px; }
    .cle-prix { font-size: 1.55rem; }

    .fiche { padding: 20px 16px 22px; }
    .fiche-tete { gap: 8px 16px; padding-bottom: 12px; }
    /* Prix et durée sur une ligne, au bord gauche quand l'en-tête passe à la ligne (fiche à accroche longue) */
    .fiche-tarif { grid-auto-flow: column; justify-items: start; align-items: baseline; column-gap: 14px; }
    .fiche-prix { text-align: left; }
    .famille { grid-template-columns: minmax(0, 1fr); row-gap: 2px; padding: 10px 0 8px; }
    .famille dt { grid-row: auto; padding: 0 0 4px; }
    .famille dd { grid-column: 1; }
    .ligne { padding: 6px 6px; }
    .fiche-action .poussoir { width: 100%; }
}
