/* ═══════════════════════════════════════════════════════════════════════════
   Bilantis : page des tarifs (lot 1, 26.11.2026). Chargée après site.css par
   site_head(['css_files' => ['site-tarife']]). Ne contient que ce qui est propre à cette
   page : titre principal, étiquette « Populaire », ligne des conditions, matrice
   comparative. Cartes, bascule, FAQ, bande finale et tableaux viennent de site.css.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Haut de page : moins d'air sous le fil d'Ariane ─────────────────────── */
.pg-tarife .price-sec { padding-top: clamp(28px, 4vw, 56px); }
.pg-tarife .price-top { align-items: flex-end; gap: 20px 32px; }
.pg-tarife .price-intro { flex: 1 1 520px; min-width: 0; }
.price-h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.04em; margin: 0 0 18px; max-width: 22ch; }
/* Une phrase par ligne quand la place manque (« Trois prix. » puis « Pas de surprise. ») */
.price-l { display: inline-block; }
.price-kw { display: block; font-family: var(--text); font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: 0; color: var(--accent); margin-bottom: 14px; }
.pg-tarife .price-intro .sub { max-width: 58ch; }

/* ── Cartes : étiquette « Populaire » sur le plan mis en avant ───────────── */
.pg-tarife .plan-card { position: relative; }
.plan-flag {
    position: absolute; top: -13px; left: clamp(20px, 2.4vw, 30px); margin: 0;
    background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 700; line-height: 1.5;
    padding: 2px 11px; border-radius: 99px; white-space: nowrap;
}
.pg-tarife .plan-name { font-size: 26px; line-height: 1.15; }
.pg-tarife .plan-card .per { margin-bottom: 4px; }
.pg-tarife .plan-note { min-height: 1.6em; margin: 0 0 16px; }

/* Ligne des conditions sous les cartes, séparée par le filet de registre */
.price-terms {
    list-style: none; margin: clamp(20px, 2.6vw, 32px) 0 0; padding: 16px 0 0;
    border-top: 1px solid var(--rule);
    display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 14.5px; color: var(--ink-2);
}
.price-terms li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; }
.price-terms li::before { content: ""; width: 12px; height: 8px; border-block: 2px solid var(--accent); }

/* ── Matrice comparative ─────────────────────────────────────────────────────
   Le conteneur .tbl défile seul sur le côté (la page jamais) ; la première colonne reste
   collée à gauche. Coche : SVG ; case vide : petit anneau neutre ; les deux portent un
   texte pour lecteurs d'écran. */
.tbl.cmp {
    margin: 0; background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius);
    overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
}
.tbl.cmp:focus-visible { outline-offset: 2px; }
.tbl.cmp table { min-width: 640px; font-size: 15px; }
.tbl.cmp th, .tbl.cmp td { padding: 11px 16px; border-top: 1px solid var(--rule); vertical-align: middle; }
.tbl.cmp thead th {
    border-top: 0; border-bottom: 1px solid var(--ink); color: var(--ink); font-size: 15px;
    padding-top: 18px; padding-bottom: 12px; vertical-align: bottom; white-space: nowrap;
}
.tbl.cmp th.cmp-plan, .tbl.cmp td { text-align: center; width: 17%; }
.cmp-plan small { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-2); font-variant-numeric: tabular-nums lining-nums; margin-top: 2px; }
.tbl.cmp tbody th[scope="row"] { font-weight: 400; color: var(--ink); white-space: normal; font-size: 15px; }
.tbl.cmp th:first-child { position: sticky; left: 0; z-index: 1; background: var(--white); text-align: left; }
.tbl.cmp tr.cat th {
    background: var(--paper); color: var(--accent); font-size: 14px; font-weight: 700;
    padding-top: 20px; padding-bottom: 8px; border-top: 1px solid var(--rule);
}
.tbl.cmp tr.cat th { position: static; }
.tbl.cmp tr.cat th span { position: sticky; left: 16px; }
.tbl.cmp tbody tr:first-child th { border-top: 0; }
.cmp-yes { display: inline-block; width: 18px; height: 18px; color: var(--accent); vertical-align: middle; }
.cmp-no { display: inline-block; width: 7px; height: 7px; border: 1.5px solid var(--ink-3); border-radius: 50%; vertical-align: middle; }

/* ── FAQ en deux colonnes ────────────────────────────────────────────────────
   site.css donne « max-width: none » à .faq:has(> div > details), ce qui annule la largeur
   de .wrap quand les deux classes sont sur le même élément (balisage documenté dans SOCLE.md) :
   on rend sa largeur au conteneur. Défaut du système commun, signalé dans le rapport. */

/* Lien vers toute la FAQ : même dessin que sur l'accueil (règle .faq-all de site-landing.css). */
.faq-all { margin: 18px 0 0; }
.faq-all a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; text-decoration: none; }
.faq-all a:hover { text-decoration: underline; }

.cmp-hint { display: none; margin: 10px 0 0; color: var(--ink-3); }
.cmp-bexio { margin: 22px 0 0; font-size: 15px; color: var(--ink-2); max-width: 70ch; }
.cmp-bexio .fine { display: inline-block; margin-top: 4px; }

/* ── Bande finale : texte d'appui et deux boutons ────────────────────────── */
.pg-tarife .final .h2 { max-width: 18ch; margin-bottom: 14px; }
.final-txt { max-width: 52ch; margin: 0 0 24px; font-size: clamp(16px, 1.4vw, 18px); }
.pg-tarife .final .cta-row { margin-bottom: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .pg-tarife .plan-card + .plan-card { margin-top: 8px; }
}
/* Tablette : une carte par ligne sur toute la largeur, la liste sur deux colonnes */
@media (min-width: 601px) and (max-width: 860px) {
    .pg-tarife .plan-card ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
    .pg-tarife .plan-card .btn { align-self: flex-start; width: auto; min-width: 280px; }
}

@media (max-width: 700px) {
    .cmp-hint { display: block; }
    /* Première colonne d'environ 190 px, collée à gauche ; trois colonnes de plan de 88 px. */
    .tbl.cmp table { table-layout: fixed; width: 100%; min-width: 454px; font-size: 14px; }
    .tbl.cmp th, .tbl.cmp td { padding: 10px 10px; }
    .tbl.cmp th.cmp-plan, .tbl.cmp td { width: 88px; padding-left: 6px; padding-right: 6px; }
    .tbl.cmp thead th { font-size: 14.5px; }
    .cmp-plan small { white-space: normal; }
    .cmp-plan small [data-per] { display: block; }
    .tbl.cmp tbody th[scope="row"] { font-size: 14px; }
    .tbl.cmp tr.cat th span { left: 10px; }
    .tbl.cmp th:first-child { box-shadow: 1px 0 0 var(--rule); }
}

@media (max-width: 520px) {
    /* La bascule prend toute la largeur : les libellés longs passent à la ligne au lieu de déborder. */
    .pg-tarife .toggle { display: flex; width: 100%; }
    .pg-tarife .toggle button { flex: 1 1 0; min-height: 44px; white-space: normal; line-height: 1.25; padding: 9px 10px; }
    .price-terms { flex-direction: column; }
    .pg-tarife .final .cta-row .btn { width: 100%; }
}

@media (max-width: 380px) {
    .pg-tarife .final .btn-lg { white-space: normal; text-align: center; }
}
