/* ══ /tarifs : « Composez votre site, option par option » ═══════════════════
   Feuille DE PAGE (chargée par tarifs.html seulement, patron de methode.css).
   Le tableau des options : la prestation, son prix, trois colonnes d'exemple
   à cases cochées, une colonne « Votre sélection » à cases à cocher dont le
   total suit (static/js/tarifs-options.js). Tout ce qui n'a de sens qu'avec
   le script (la colonne à cocher, la barre d'estimation, « Partir de cet
   exemple ») n'existe que sous `.is-live`, posée par lui : sans script, il
   reste le tableau des prix et les trois exemples, complets. */
.opt-sheet {
  max-width: 1000px;
  margin: 0 auto;
}
.opt { position: relative; }

/* Ce qui n'existe que sous le script. */
.opt:not(.is-live) .opt-col-custom,
.opt:not(.is-live) .opt-use-row,
.opt:not(.is-live) .opt-bar,
.opt:not(.is-live) .opt-pack-use { display: none; }

/* Texte pour le lecteur d'écran seulement (le « compris » derrière la coche). */
.opt-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Les exemples en cartes : téléphone seulement (sur un écran large, ce sont
   les colonnes du tableau qui comparent). ────────────────────────────────── */
.opt-packs { display: none; }
.opt-pack {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 16px 16px 14px;
}
.opt-pack-name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
}
.opt-pack-who { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.opt-pack-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.opt-pack-list li { display: flex; gap: 8px; align-items: flex-start; }
.opt-pack-list svg { flex: none; margin-top: 2px; color: var(--opt-yes); }
.opt-pack-total { margin: 0 0 12px; font-size: 15px; }
.opt-pack-total b { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.opt-pack .opt-pack-use { width: 100%; justify-content: center; min-height: 44px; }

/* ── Le tableau ─────────────────────────────────────────────────────────── */
.opt-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  /* « Partir de cet exemple » amène le tableau à l'écran : sous la barre de
     navigation fixe, pas dessous (la valeur de .home-section). */
  scroll-margin-top: 88px;
}
.opt-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.opt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.opt-table th,
.opt-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.opt-table thead th {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-3); font-weight: 500;
  background: var(--paper);
}
.opt-group-row th {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted-3); font-weight: 500;
  background: var(--paper-2);
  padding-top: 9px; padding-bottom: 9px;
}
.opt-col-label { width: 44%; }
.opt-h-short { display: none; }
.opt-table tbody th { font-weight: 400; }
.opt-name { display: block; font-weight: 600; color: var(--fg); }
.opt-desc { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.opt-col-price { width: 1%; white-space: nowrap; }
.opt-col-price b { font-weight: 650; color: var(--fg); }
.opt-prefix { font-size: 12px; color: var(--muted); white-space: nowrap; }
/* « par an », « par page » : c'est le mot qui distingue un paiement unique
   d'une redevance ; --muted-3 tombait à 4,35:1 en thème sombre à cette taille. */
.opt-unit { display: block; font-size: 11.5px; color: var(--muted); }
.opt-col-pack { text-align: center; }
.opt-table thead th.opt-col-pack { text-align: center; }
/* Le vert de la coche est celui du comparatif de marché (.cmp-yes), en jeton
   local : un seul endroit pour les deux thèmes. */
.opt { --opt-yes: oklch(0.52 0.13 150); }
[data-theme="dark"] .opt { --opt-yes: oklch(0.75 0.15 150); }
.opt-yes { color: var(--opt-yes); display: inline-flex; }
.opt-yes svg { width: 20px; height: 20px; }
.opt-no { color: var(--muted-3); }
/* La colonne à cocher est la colonne « à vous » : même fond que « Cette
   offre » dans le comparatif de marché. */
.opt-col-custom { background: var(--paper-2); }
.opt-table thead th.opt-col-custom { color: var(--fg); }
.opt-check {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 24px;
  cursor: pointer;
  font-size: 13px; color: var(--muted);
}
.opt-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--fg); cursor: pointer; }
.opt-check input:disabled { cursor: default; }
.opt-row--base .opt-check { color: var(--fg); }
.opt-qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--muted); }
/* Piège [hidden] : un display posé par la règle bat l'attribut. */
.opt-qty[hidden] { display: none; }
.opt-qty input {
  width: 58px;
  padding: 4px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--card);
  color: var(--fg);
  font: inherit; font-size: 13px;
}
.opt-row.is-on { background: color-mix(in oklab, var(--fg) 4%, transparent); }
.opt-row.is-on .opt-col-custom { background: color-mix(in oklab, var(--fg) 8%, var(--paper-2)); }
.opt-total-row th,
.opt-total-row td { border-top: 2px solid var(--line-strong); border-bottom: 0; font-size: 15px; }
.opt-total-row th { font-weight: 600; color: var(--fg); }
.opt-total-row b { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.opt-total-row .opt-col-pack { text-align: center; }
.opt-yearly { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.opt-yearly[hidden] { display: none; }
.opt-use-row td { border-bottom: 0; padding-top: 0; text-align: center; }
.opt-use-row .opt-link { white-space: nowrap; }
.opt-link {
  background: none; border: 0; padding: 6px 0; margin: 0;
  min-height: 38px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--fg); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklab, var(--fg) 30%, transparent);
}
@media (hover: hover) {
  .opt-link:hover { text-decoration-color: var(--fg); }
  .opt-row:not(.opt-row--base):hover { background: color-mix(in oklab, var(--fg) 3%, transparent); }
}

/* ── La barre d'estimation ─────────────────────────────────────────────
   Collée au bas de l'écran le temps du tableau, à TOUTES les largeurs : à
   1280 px le tableau fait 2 600 px et la barre posée dessous était 1 800 px
   sous la fenêtre au moment de cocher (mesuré), ce qui rendait « l'estimation
   se fait sous vos yeux » faux. Zone sûre comprise. */
.opt-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.opt.is-live .opt-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.18);
}
/* La pastille « Admin » du site flotte en bas à gauche, PAR-DESSUS la barre
   (elle recouvrait les trois quarts du bouton « Demander ce devis » sur
   téléphone, mesuré) : tant que le tableau est à l'écran, elle remonte
   au-dessus de la barre (hauteur posée par le script dans --opt-bar-h). */
body.has-opt-bar #mn-admin-pill { bottom: calc(16px + var(--opt-bar-h, 72px)); }
.opt-bar-txt { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.opt-bar-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-3); }
.opt-bar-total { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.opt-bar-yearly { font-size: 13px; color: var(--muted); }
.opt-bar-yearly[hidden] { display: none; }
.opt-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted-3); }
.opt-note a { color: var(--fg); }

/* ── Petits écrans (téléphone ET tablette) : les exemples en cartes, le
   tableau à trois colonnes ──────────────────────────────────────────────
   Six colonnes ne tiennent pas sous 980 px (mesuré par pas de 4 px : le
   tableau débordait de son cadre de 238 px à 704 px et encore de 58 px à
   900 px, et la colonne utile, celle à cocher, était hors écran sur un iPad
   en portrait) : les exemples remontent en cartes, et le tableau ne garde
   que la prestation, son prix et la case. ─────────────────────────────── */
@media (max-width: 980px) {
  .opt-packs { display: grid; gap: 12px; margin-bottom: 18px; }
  .opt-wrap { border-radius: 12px; }
  .opt-col-pack { display: none; }
  .opt-use-row .opt-col-custom { text-align: left; }
  .opt-table { font-size: 13px; }
  .opt-table th, .opt-table td { padding: 10px 8px; }
  .opt-col-label { width: auto; }
  .opt-desc { font-size: 12px; }
  .opt-h-long { display: none; }
  .opt-h-short { display: inline; }
  /* Le prix reste d'un bloc (« 36 € »), ce qui le suit se replie (« par an,
     par boîte » en nowrap imposait 100 px à la colonne, mesuré à 320 px). */
  /* `width: 1%` (le plus serré, sur un écran large) forcerait ici la colonne
     à son minimum et couperait « par page » en deux même quand la place ne
     manque pas (mesuré à 768 px) : la largeur suit le contenu, et le tableau
     ne resserre que quand il le faut. */
  .opt-col-price { width: auto; text-align: right; white-space: normal; }
  .opt-col-price b { white-space: nowrap; }
  .opt-col-price .opt-prefix { display: block; }
  .opt-col-custom { text-align: center; width: 64px; }
  .opt-check-txt { display: none; }
  .opt-check { min-height: 44px; min-width: 44px; justify-content: center; }
  .opt-check input { width: 22px; height: 22px; }
  .opt-qty { flex-direction: column; gap: 2px; }
  .opt-qty span { display: none; }
  .opt-qty input { width: 52px; min-height: 38px; }
  .opt-link { min-height: 44px; }
  .opt-total-row th, .opt-total-row td { font-size: 14px; }
  .opt-total-row b { font-size: 16px; }
  /* À 320 px, un total en `nowrap` (« à partir de 499 € ») imposait au
     tableau 57 px de plus que son cadre (mesuré) : les totaux et les
     redevances se replient. */
  .opt-total-row b, .opt-yearly, .opt-bar-total { white-space: normal; }
  /* La barre, compacte : le libellé passe au lecteur d'écran seulement, le
     total et le bouton tiennent sur une ligne (138 px sur trois lignes à
     320 px, mesuré, soit un quart de l'écran pris au tableau). */
  .opt.is-live .opt-bar { flex-wrap: nowrap; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; margin-top: 12px; }
  .opt-bar-label {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .opt-bar-txt { flex-direction: column; gap: 0; }
  .opt-bar .btn-primary { flex: 0 0 auto; min-height: 44px; }
  .opt-bar-total { font-size: 19px; }
}

/* Aucun champ sous 16 px sur téléphone : iOS zoome au premier tap. Les
   PORTEUSES sont nommées (règle maison). */
@media (max-width: 760px) {
  .opt-qty input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .opt-row, .opt-link { transition: none; }
}
