/* ==========================================================================
   POWERS — Fan Selector
   Une question à la fois, en pleine largeur.

   Ce qui a changé et pourquoi : la version précédente demandait de taper des
   nombres dans un panneau à deux colonnes. Deux défauts — il faut connaître
   sa surface au mètre près pour commencer, et tout se marchait dessus.
   Ici, aucun champ à remplir : on choisit parmi des propositions, une seule
   décision par écran, et la page respire.
   ========================================================================== */

.fs2 { --fs2-max: 860px; }

.fs2-wrap { max-width: var(--fs2-max); margin-inline: auto; padding-block: var(--s-8) var(--s-24); }

/* ------------------------------------------------------------ Progression */
.fs2-prog { display: flex; align-items: center; gap: var(--s-4); margin-bottom: clamp(36px, 6vw, 72px); }
.fs2-prog[hidden] { display: none; }
.fs2-prog-bar { flex: 1; height: 3px; border-radius: 99px; background: var(--n-150); overflow: hidden; }
.fs2-prog-bar span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--a-500), var(--cy-400));
  transition: width 520ms var(--e-out);
}
.fs2-prog-lab {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------- L'écran */
.fs2-ecran { animation: fade-up 480ms var(--e-out); }
.fs2-ecran[hidden] { display: none; }

.fs2-q { text-align: center; max-width: 620px; margin: 0 auto clamp(32px, 5vw, 56px); }
.fs2-q h2 {
  font-size: clamp(1.75rem, 1.1rem + 2.2vw, 2.75rem);
  letter-spacing: -.035em; line-height: 1.1;
}
.fs2-q p { font-size: var(--fs-body); color: var(--ink-2); margin-top: var(--s-4); line-height: 1.6; }

/* ---- Les choix : grandes cartes, beaucoup d'air ------------------------ */
.fs2-choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s-4); }
@media (max-width: 560px) { .fs2-choix { grid-template-columns: 1fr; } }

.fs2-carte {
  position: relative; display: flex; flex-direction: column; gap: var(--s-3);
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--r-lg); border: 1.5px solid var(--n-200);
  background: var(--n-0); text-align: left; cursor: pointer;
  transition: border-color 200ms var(--e-out), transform 220ms var(--e-out),
              box-shadow 240ms var(--e-out), background-color 200ms var(--e-out);
}
.fs2-carte:hover { border-color: var(--n-300); transform: translateY(-3px); box-shadow: var(--sh-3); }
.fs2-carte:focus-visible { outline: 2px solid var(--a-500); outline-offset: 3px; }
.fs2-carte[aria-pressed="true"] {
  border-color: var(--a-500); background: var(--a-50);
  box-shadow: 0 0 0 1px var(--a-500), var(--sh-2);
}

.fs2-ic {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 14px; background: var(--n-50); color: var(--a-600);
  transition: background-color 200ms var(--e-out), transform 260ms var(--e-spring);
}
.fs2-carte:hover .fs2-ic { transform: scale(1.06) rotate(-5deg); }
.fs2-carte[aria-pressed="true"] .fs2-ic { background: var(--a-100); }

.fs2-carte b { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.018em; }
.fs2-carte small { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }

/* ---- Navigation entre écrans ------------------------------------------ */
.fs2-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: clamp(32px, 5vw, 52px); }
.fs2-retour {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  transition: color 180ms var(--e-out), gap 180ms var(--e-out);
}
.fs2-retour:hover { color: var(--ink); gap: 14px; }
.fs2-retour[hidden] { visibility: hidden; display: inline-flex; }
.fs2-aide { font-size: var(--fs-xs); color: var(--ink-3); }

/* ══════════════════════════════════════════════════════════ LE RÉSULTAT */
.fs2-res { animation: fade-up 560ms var(--e-out); }
.fs2-res[hidden] { display: none; }

.fs2-verdict {
  border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(158deg, var(--n-900), #16202e 58%, #0f3557);
  color: #fff; padding: clamp(28px, 4vw, 48px);
  text-align: center;
}
.fs2-verdict-lab {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cy-400);
}
.fs2-verdict-num {
  display: flex; align-items: baseline; justify-content: center; gap: 10px;
  margin-top: var(--s-4);
}
.fs2-verdict-num b {
  font-size: clamp(3rem, 2rem + 4vw, 4.75rem); font-weight: 680;
  letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums;
}
.fs2-verdict-num small { font-size: var(--fs-body); opacity: .6; }
.fs2-verdict p { font-size: var(--fs-sm); color: rgba(255,255,255,.66); margin-top: var(--s-4); max-width: 46ch; margin-inline: auto; line-height: 1.6; }

.fs2-recap { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: var(--s-6); }
.fs2-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--r-full);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  font-size: var(--fs-xs); font-weight: 500; color: rgba(255,255,255,.9);
}
.fs2-tag button { color: var(--cy-400); font-size: var(--fs-xs); font-weight: 600; }

/* La famille conseillée */
.fs2-famille {
  margin-top: var(--s-6); padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-lg); border: 1.5px solid var(--a-100); background: var(--a-50);
  display: flex; gap: var(--s-5); align-items: flex-start;
}
@media (max-width: 560px) { .fs2-famille { flex-direction: column; } }
.fs2-famille .fs2-ic { background: var(--n-0); }
.fs2-famille b { display: block; font-size: 1.125rem; font-weight: 600; letter-spacing: -.02em; }
.fs2-famille p { font-size: var(--fs-sm); color: var(--a-700); margin-top: 6px; line-height: 1.55; }

/* Les modèles */
.fs2-modeles { margin-top: var(--s-8); }
.fs2-modeles h3 { font-size: var(--fs-h3); margin-bottom: var(--s-5); }
.fs2-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s-4); }

.fs2-mod {
  display: flex; flex-direction: column;
  border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: var(--surface);
  overflow: hidden;
  transition: border-color 200ms var(--e-out), box-shadow 240ms var(--e-out), transform 220ms var(--e-out);
  animation: fade-up 420ms var(--e-out) both;
}
.fs2-mod:hover { border-color: transparent; box-shadow: var(--sh-3); transform: translateY(-4px); }
.fs2-mod figure { aspect-ratio: 4/3; background: var(--n-25); display: grid; place-items: center; padding: 12%; }
.fs2-mod img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fs2-mod-corps { padding: var(--s-4) var(--s-5) var(--s-5); display: flex; flex-direction: column; gap: 5px; flex: 1; }
.fs2-mod b { font-size: var(--fs-sm); font-weight: 550; line-height: 1.35; }
.fs2-mod small { font-size: var(--fs-xs); color: var(--ink-3); }
.fs2-mod .price { margin-top: auto; padding-top: var(--s-3); font-size: 1rem; }

/* Détail repliable */
.fs2-detail { margin-top: var(--s-8); border-top: 1px solid var(--line-soft); }
.fs2-detail summary {
  display: flex; align-items: center; gap: 10px; padding: var(--s-5) 0;
  cursor: pointer; list-style: none; font-size: var(--fs-sm); font-weight: 600;
}
.fs2-detail summary::-webkit-details-marker { display: none; }
.fs2-detail summary::after {
  content: ""; width: 13px; height: 13px; margin-left: auto;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 240ms var(--e-out);
}
.fs2-detail[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.fs2-ligne {
  display: flex; justify-content: space-between; gap: var(--s-5);
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-sm); font-variant-numeric: tabular-nums;
}
.fs2-ligne:last-child { border-bottom: 0; }
.fs2-ligne em { display: block; font-style: normal; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 3px; }
.fs2-ligne b { white-space: nowrap; }

.fs2-note {
  margin-top: var(--s-6); padding: var(--s-5);
  border-radius: var(--r); background: var(--n-25); border: 1px solid var(--line-soft);
  font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6;
}

.fs2-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-8); }

@media (prefers-reduced-motion: reduce) {
  html:not(.mouvement-force) .fs2-ecran,
  html:not(.mouvement-force) .fs2-res,
  html:not(.mouvement-force) .fs2-mod { animation: none; }
  html:not(.mouvement-force) .fs2-prog-bar span { transition: none; }
}

/* ══════════════════════════════════════════════════════ MODE EXPERT
   Parcours professionnel imposé par le document métier :
   Débit + Pression -> Type -> Filtres -> Recherche -> Résultats -> Modèle
   -> Courbes -> Fiche. Cohabite avec le mode guidé (fs2-*) ci-dessus. */

.fx-toggle {
  display: inline-flex; gap: 2px; padding: 4px; margin-bottom: var(--s-6);
  border-radius: var(--r-full); background: var(--n-50); border: 1px solid var(--n-150);
}
.fx-toggle button {
  padding: 9px 18px; border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-2); transition: background-color 180ms var(--e-out), color 180ms var(--e-out);
}
.fx-toggle button[aria-pressed="true"] { background: var(--n-900); color: #fff; }

.fx-panel[hidden] { display: none; }
.fx-panel { animation: fade-up 420ms var(--e-out); }

/* `--s-7` n'existe dans aucune echelle d'espacement : le `gap` entier
   devenait invalide a cause de lui et retombait a 0 — les deux colonnes se
   touchaient sans respirer. */
.fx-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s-8); align-items: start; }
@media (max-width: 880px) { .fx-grid { grid-template-columns: 1fr; } }

.fx-sidebar { display: flex; flex-direction: column; gap: var(--s-5); }
.fx-results-col { position: sticky; top: calc(var(--header-h, 72px) + 16px); }
@media (max-width: 880px) { .fx-results-col { position: static; } }

.fx-card {
  border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: var(--surface);
  padding: clamp(22px, 3vw, 32px);
}
.fx-card + .fx-card { margin-top: var(--s-5); }
.fx-card h3 { font-size: 1.125rem; font-weight: 650; letter-spacing: -.015em; margin-bottom: var(--s-5); }
.fx-card h3 small { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); margin-top: 3px; }

/* Accordéons de filtres — regroupent les filtres secondaires sans les
   masquer en permanence : ouverts par défaut, résumé du nombre de filtres
   actifs visible même repliés. */
.fx-accordion {
  border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: var(--surface);
  overflow: hidden;
}
.fx-accordion summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: clamp(18px, 2.6vw, 22px) clamp(22px, 3vw, 32px);
  font-size: 1.0625rem; font-weight: 650; letter-spacing: -.015em; color: var(--ink);
}
.fx-accordion summary::-webkit-details-marker { display: none; }
.fx-accordion summary small { font-weight: 500; font-size: var(--fs-xs); color: var(--ink-3); }
.fx-accordion summary::after {
  content: ""; width: 9px; height: 9px; margin-left: auto;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg); transition: transform 200ms var(--e-out);
}
.fx-accordion[open] summary::after { transform: rotate(-135deg); }
.fx-accordion-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-full); background: var(--a-500); color: #fff; font-size: 11px; font-weight: 700;
}
.fx-accordion-count[hidden] { display: none; }
.fx-accordion-body { padding: 0 clamp(22px, 3vw, 32px) clamp(22px, 3vw, 32px); }

.fx-active-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-active-filters[hidden] { display: none; }
.fx-chip--actif { background: var(--a-50); border-color: var(--a-200, var(--a-100)); color: var(--a-700); cursor: pointer; }
.fx-chip--actif:hover { background: var(--a-100); }

.fx-row { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.fx-field { flex: 1; min-width: 150px; margin-bottom: var(--s-4); }
.fx-field label { display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.fx-field .fx-inline { display: flex; gap: 8px; }
.fx-field input[type="number"], .fx-field select, .fx-field input[type="text"] {
  width: 100%; min-height: 46px; padding: 12px 14px; border-radius: var(--r); border: 1.5px solid var(--n-200);
  font-size: var(--fs-sm); font-variant-numeric: tabular-nums; background: var(--n-0); color: var(--ink);
}
.fx-field input[type="number"]:focus-visible, .fx-field select:focus-visible, .fx-field input[type="text"]:focus-visible { outline: 2px solid var(--a-500); outline-offset: 1px; }
.fx-field select { flex: 0 0 96px; }

.fx-range { margin-top: 6px; }
.fx-range input[type="range"] { width: 100%; accent-color: var(--a-500); }
.fx-range-vals { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Le périmètre du mode expert. Il se lit avant les champs, sinon on cherche
   une famille absente avant de comprendre pourquoi elle l'est. Discret : ce
   n'est pas un avertissement, c'est une précision honnête. */
.fx-portee {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--a-500);
  background: var(--n-25);
  border-radius: 0 var(--r-sm, 8px) var(--r-sm, 8px) 0;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 78ch;
}
.fx-portee b { color: var(--ink); }
.fx-portee:empty { display: none; }

.fx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-chip {
  padding: 8px 14px; border-radius: var(--r-full); border: 1.5px solid var(--n-200);
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); background: var(--n-0);
  transition: border-color 160ms var(--e-out), background-color 160ms var(--e-out), color 160ms var(--e-out);
}
.fx-chip[aria-pressed="true"] { background: var(--n-900); border-color: var(--n-900); color: #fff; }
.fx-chip:focus-visible { outline: 2px solid var(--a-500); outline-offset: 2px; }

.fx-submit { width: 100%; margin-top: var(--s-5); }

/* ══════════════════════════════════════════════════════════════════════
   LA SAISIE
   Un point de fonctionnement s'enonce comme une phrase du metier :
   « 18 450 m³/h a 700 Pa ». Six champs de meme poids ne disaient pas cela.
   Les deux nombres qui decident sont ecrits en grand, dans la police
   reservee aux mesures ; le reste a des valeurs par defaut correctes et
   se replie sous un resume.
   ══════════════════════════════════════════════════════════════════════ */
.fx-saisie h3 { margin-bottom: var(--s-4); }

.fx-duo { display: flex; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; }
.fx-grand { flex: 1 1 190px; min-width: 0; }
.fx-grand label {
  display: block; font-size: var(--fs-xs); font-weight: 600;
  color: var(--ink-3); letter-spacing: .03em; text-transform: uppercase;
  margin-bottom: 2px;
}
/* Un trait sous le nombre plutot qu'une boite autour : c'est la convention
   des feuilles de releve, et cela laisse le chiffre etre le sujet. */
.fx-grand-ligne {
  display: flex; align-items: baseline; gap: var(--s-2);
  border-bottom: 2px solid var(--n-200);
  transition: border-color 160ms var(--e-out);
}
.fx-grand-ligne:focus-within { border-bottom-color: var(--a-600); }
.fx-grand-ligne input {
  flex: 1; min-width: 0; padding: 4px 0; border: 0; background: none;
  font-family: var(--font-mono); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
  font-weight: 600; letter-spacing: -.03em; color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.fx-grand-ligne input:focus { outline: none; }
/* Les fleches du champ nombre encombrent un chiffre de cette taille. */
.fx-grand-ligne input::-webkit-outer-spin-button,
.fx-grand-ligne input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fx-grand-ligne input[type=number] { -moz-appearance: textfield; }
.fx-grand-ligne select {
  flex: 0 0 auto; border: 0; background: none; cursor: pointer;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3);
  padding: 0 0 6px;
}
.fx-grand-ligne select:focus-visible { outline: 2px solid var(--a-500); outline-offset: 2px; }
.fx-duo-lien {
  padding-bottom: 10px; font-size: var(--fs-body); color: var(--ink-3);
  font-style: italic;
}
@media (max-width: 520px) {
  .fx-duo { flex-direction: column; align-items: stretch; gap: var(--s-3); }
  .fx-duo-lien { display: none; }
}

/* Le repli. Il annonce son contenu, pour qu'on sache sans l'ouvrir si les
   conditions ont ete touchees. */
.fx-reglages { margin-top: var(--s-5); border-top: 1px solid var(--line-soft); }
.fx-reglages > summary {
  display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap;
  padding: var(--s-4) 0 var(--s-3); cursor: pointer; list-style: none;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
}
.fx-reglages > summary::-webkit-details-marker { display: none; }
.fx-reglages > summary::after {
  content: '+'; margin-left: auto; font-size: 1.1rem; color: var(--ink-3); line-height: 1;
}
.fx-reglages[open] > summary::after { content: '\2212'; }
.fx-reglages > summary:hover { color: var(--ink-1); }
.fx-reglages > summary em {
  font-style: normal; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3);
}
.fx-reglages[open] > summary em { display: none; }

/* L'ecran d'avant-recherche. */
.fx-attente {
  padding: var(--s-10) var(--s-5); text-align: center;
  font-size: var(--fs-sm); line-height: 1.7; color: var(--ink-3);
}

.fx-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.fx-results-head b { font-size: var(--fs-h4, 1.125rem); }
.fx-results-head span { font-size: var(--fs-xs); color: var(--ink-3); }

.fx-empty {
  padding: var(--s-8) var(--s-5); text-align: center; border-radius: var(--r-lg);
  border: 1.5px dashed var(--n-200); color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════════
   L'ÉCHELLE DE LA GAMME
   Le BVFC est une suite de tailles, du 9/9 au 30/28. L'écran la présente
   donc comme une échelle : une ligne par taille, dans l'ordre, et le même
   fil vertical qui les traverse toutes — le débit demandé. Ce fil est le
   trait de l'écran : il répond d'un regard à « quelle caisson ».
   ══════════════════════════════════════════════════════════════════════ */
.fx-echelle-carte { padding-bottom: var(--s-4); }

.fx-result {
  display: block;
  padding: 7px var(--s-3); border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  transition: background 160ms var(--e-out), border-color 160ms var(--e-out);
}
.fx-rang-ligne { display: flex; align-items: center; gap: 10px; }
.fx-result:hover { background: var(--a-50); }
.fx-result[aria-current="true"] { border-color: var(--a-500); background: var(--a-50); }
.fx-result-check { flex-shrink: 0; display: flex; }
.fx-result-check input { width: 16px; height: 16px; accent-color: var(--a-500); cursor: pointer; }
/* Le rail prend sa propre ligne, sur toute la largeur disponible. Partage
   avec le nom et le verdict, il tombait a quelques pixels — or c'est lui
   qui repond a la question de l'ecran : ou tombe la demande dans la gamme. */
.fx-result-btn {
  display: grid; grid-template-columns: 4.5em 1fr; align-items: center;
  grid-template-areas: 'nom val' 'rail rail';
  gap: 2px var(--s-3); cursor: pointer; text-align: left; width: 100%; background: none;
}
.fx-result-btn:focus-visible { outline: 2px solid var(--a-500); outline-offset: 2px; border-radius: var(--r-sm); }

.fx-rang-nom {
  grid-area: nom;
  font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-1); letter-spacing: -.02em; white-space: nowrap;
}

/* Le rail : le segment de débit que la taille couvre, sur une échelle
   logarithmique partagée par les neuf lignes. `--a` et `--b` bornent le
   segment, `--x` place le fil du débit demandé. */
.fx-rang-rail { grid-area: rail; position: relative; height: 16px; min-width: 0; }
.fx-rang-rail::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%;
  border-top: 1px dashed var(--n-150);
}
.fx-rang-rail i {
  position: absolute; top: 50%; transform: translateY(-50%);
  left: var(--a); width: calc(var(--b) - var(--a)); min-width: 3px;
  height: 6px; border-radius: 99px; background: var(--n-300);
}
/* Le fil du débit demandé. Même `--x` sur toutes les lignes : elles
   s'alignent et le trait se lit comme continu d'un bout à l'autre. */
.fx-rang-rail::after {
  content: ''; position: absolute; top: -8px; bottom: -8px; left: var(--x);
  width: 2px; margin-left: -1px; background: var(--a-600); opacity: .55;
}
.fx-rang--ok .fx-rang-rail i { background: var(--cy-500); }
.fx-rang--off .fx-rang-rail i { background: var(--n-200); }

.fx-rang-val {
  grid-area: val;
  font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-1); font-variant-numeric: tabular-nums;
  white-space: nowrap; text-align: right;
}
.fx-rang-val small { font-family: var(--font); font-weight: 500; color: var(--ink-3); }
.fx-rang--off .fx-rang-val { color: var(--ink-3); font-weight: 500; }

/* Le meilleur choix est signalé sur place : il n'a pas besoin d'être
   premier de liste pour se faire voir, et la gamme garde son ordre. */
.fx-rang--reco { position: relative; }
.fx-rang--reco::before {
  content: ''; position: absolute; left: -2px; top: 6px; bottom: 6px;
  width: 3px; border-radius: 99px; background: var(--cy-500);
}
.fx-rang-reco {
  margin: 3px 0 2px 26px;
  font-size: var(--fs-xs); color: var(--cy-500); font-weight: 600; line-height: 1.4;
}

.fx-rang-legende {
  display: flex; gap: var(--s-4); flex-wrap: wrap;
  margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs); color: var(--ink-3);
}
.fx-rang-cle { display: inline-flex; align-items: center; gap: 6px; }
.fx-rang-cle i { display: inline-block; }
.fx-rang-cle--seg { width: 18px; height: 6px; border-radius: 99px; background: var(--cy-500); }
.fx-rang-cle--fil { width: 2px; height: 14px; background: var(--a-600); opacity: .55; }

/* ══════════════════════════════════════════════════════════════════════
   LA PLANCHE
   Le diagramme débit-pression, en pleine largeur. Le teal de mesure du kit
   est ici à sa place : il est réservé aux données, jamais aux boutons.
   ══════════════════════════════════════════════════════════════════════ */
.fx-planche-carte {
  margin-top: var(--s-6); padding: var(--s-5) var(--s-5) var(--s-4);
  border-radius: var(--r-lg); border: 1.5px solid var(--line-soft);
  background: var(--n-0);
}
.fx-planche-carte[hidden] { display: none; }
.fx-planche-tete {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-3);
}
.fx-planche-tete b { font-size: var(--fs-h4, 1.125rem); }
.fx-planche-tete span { font-size: var(--fs-xs); color: var(--ink-3); margin-left: var(--s-3); }
.fx-planche-legende { display: flex; gap: 6px; flex-wrap: wrap; }
.fxp-puce {
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  padding: 4px 9px; border-radius: var(--r-full); cursor: pointer;
  border: 1.5px solid var(--n-150); background: var(--n-0); color: var(--ink-2);
}
.fxp-puce small { font-family: var(--font); font-weight: 500; color: var(--ink-3); margin-left: 5px; }
.fxp-puce:hover { border-color: var(--cy-400); }
.fxp-puce.est-actif { border-color: var(--cy-500); background: var(--cy-500); color: #fff; }
.fxp-puce.est-actif small { color: rgba(255,255,255,.8); }

.fxp-svg { width: 100%; height: auto; display: block; overflow: visible; }
.fxp-grille { stroke: var(--n-100); stroke-width: 1; }
.fxp-axe { stroke: var(--n-200); stroke-width: 1.5; }
.fxp-tick {
  font-family: var(--font-mono); font-size: 13px; fill: var(--ink-3);
}
.fxp-titre-axe { font-size: 12px; fill: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }

/* La planche etroite : moins large en unites, donc chaque unite vaut plus
   de pixels a l'ecran. Les textes grossissent en consequence, sinon les
   graduations tombent sous les 5 px et ne se lisent plus. */
.fxp-svg.est-etroit .fxp-tick { font-size: 17px; }
.fxp-svg.est-etroit .fxp-titre-axe { font-size: 15px; }
.fxp-svg.est-etroit .fxp-note { font-size: 16px; }
.fxp-svg.est-etroit .fxp-courbe { stroke-width: 2.4; }
.fxp-svg.est-etroit .fxp-courbe.est-actif { stroke-width: 4; }
.fxp-svg.est-etroit .fxp-reseau { stroke-width: 2.6; }
.fxp-svg.est-etroit .fxp-point { r: 8; }

/* La courbe de réseau. En pointillé parce qu'elle ne décrit aucun
   ventilateur : c'est l'installation. */
.fxp-reseau { fill: none; stroke: var(--a-600); stroke-width: 2; stroke-dasharray: 7 5; opacity: .65; }

.fxp-courbe {
  fill: none; stroke: var(--cy-500); stroke-width: 1.75; opacity: .32;
  cursor: pointer; transition: opacity 160ms var(--e-out), stroke-width 160ms var(--e-out);
}
.fxp-courbe:hover { opacity: .75; }
.fxp-courbe.est-actif { opacity: 1; stroke-width: 3; }

.fxp-visee { stroke: var(--a-600); stroke-width: 1; stroke-dasharray: 3 4; opacity: .5; }
.fxp-point { fill: var(--a-600); stroke: var(--n-0); stroke-width: 2.5; }
.fxp-note { font-size: 12px; fill: var(--a-700); font-weight: 600; }

@media (max-width: 560px) {
  .fx-result-btn { grid-template-columns: 4.2em 1fr auto; gap: var(--s-2); }
  .fx-rang-reco { margin-left: 0; }
  .fx-planche-carte { padding: var(--s-4) var(--s-3); }
}

.fx-detail-empty { padding: var(--s-8) var(--s-5); text-align: center; color: var(--ink-3); font-size: var(--fs-sm); }

/* ══════════════════════════════════════════════════════════════════════
   LA FICHE
   Elle repond a deux questions, dans cet ordre : qu'est-ce que je commande
   et comment je le regle, puis pourquoi. La version precedente ouvrait sur
   un pave de raisons et noyait la vitesse a regler dans un tableau ou tout
   avait le meme poids.
   ══════════════════════════════════════════════════════════════════════ */
.fx-fiche-tete {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: var(--s-4); flex-wrap: wrap;
}
.fx-fiche-tete h3 { font-size: 1.375rem; letter-spacing: -.025em; }
.fx-fiche-tete p { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 3px; }

/* La reponse. Meme langage que la planche : chiffres de mesure, en grand. */
.fx-verdict {
  margin-top: var(--s-5); padding: var(--s-5);
  border-radius: var(--r-lg); border: 1.5px solid var(--cy-400);
  background: linear-gradient(180deg, rgba(43,196,189,.07), rgba(43,196,189,0));
}
.fx-verdict--ecarte {
  border-color: var(--n-200);
  background: var(--n-50);
}
.fx-verdict-chiffres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--s-4);
}
.fx-verdict-chiffres small {
  display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .05em;
}
.fx-verdict-chiffres b {
  display: block; margin-top: 2px;
  font-family: var(--font-mono); font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem);
  font-weight: 650; letter-spacing: -.035em; color: var(--ink-1);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.fx-verdict-chiffres b em {
  font-family: var(--font); font-style: normal; font-size: var(--fs-sm);
  font-weight: 500; color: var(--ink-3); margin-left: 5px;
}
.fx-verdict--alerte b { color: #b42318; }
.fx-verdict-dit {
  margin-top: var(--s-4); padding-top: var(--s-3);
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55;
}
.fx-verdict--ecarte .fx-verdict-dit { margin-top: 0; padding-top: 0; border-top: 0; }

/* Le second rang de faits : utiles, mais pas ce qu'on vient chercher. */
.fx-faits {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--s-3) var(--s-5); margin-top: var(--s-5);
}
.fx-faits > div { padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-soft); }
.fx-faits dt { font-size: var(--fs-xs); color: var(--ink-3); }
.fx-faits dd {
  margin: 2px 0 0; font-size: var(--fs-sm); color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.fx-mauvais { color: #b42318; }

/* Le produit au catalogue. La sélection est technique ; la commande, elle,
   porte sur une référence du catalogue. Les deux doivent se voir sur le
   même écran, sans que l’une prétende etre l autre. */
.fx-produits {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-3);
}
.fx-produit {
  display: flex; gap: var(--s-3); align-items: center;
  padding: var(--s-3); border-radius: var(--r);
  border: 1.5px solid var(--line-soft); background: var(--n-0);
  transition: border-color 180ms var(--e-out), box-shadow 200ms var(--e-out);
}
.fx-produit:hover { border-color: var(--a-300); box-shadow: var(--sh-2); }
.fx-produit figure {
  flex: 0 0 56px; width: 56px; height: 56px; border-radius: var(--r-sm);
  background: var(--n-25); display: grid; place-items: center; overflow: hidden;
}
.fx-produit img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fx-produit > div { min-width: 0; }
.fx-produit b { display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }
.fx-produit small { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
.fx-produit-prix {
  display: block; margin-top: 3px; font-family: var(--font-mono);
  font-size: var(--fs-sm); font-weight: 600; color: var(--a-700);
}
.fx-produits-note {
  margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.6;
}

.fx-suite {
  display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-6);
}
.fx-suite .btn { flex: 1 1 220px; }
.fx-faits--large { grid-column: 1 / -1; }
/* Les dimensions : quinze cotes d’une lettre, elles tiennent en colonnes
   étroites. */
.fx-faits--serre { grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: var(--s-2) var(--s-4); }
.fx-faits--serre dt { font-family: var(--font-mono); font-weight: 600; color: var(--ink-2); }

.fx-fiche-titre {
  margin-top: var(--s-8); margin-bottom: var(--s-3);
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3);
  padding-bottom: var(--s-2); border-bottom: 1px solid var(--line-soft);
}

/* Le raisonnement, repliable. Il reste entier — c'est la garantie du
   projet — mais il ne s'impose plus avant la reponse. Il s'ouvre de
   lui-meme quand le modele est ecarte : la, c'est le raisonnement qu'on
   vient lire. */
.fx-pourquoi { margin-top: var(--s-6); }
.fx-pourquoi > summary {
  cursor: pointer; list-style: none; padding: var(--s-3) 0;
  font-size: var(--fs-sm); font-weight: 650; color: var(--ink-2);
  border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 8px;
}
.fx-pourquoi > summary::-webkit-details-marker { display: none; }
.fx-pourquoi > summary::after { content: '+'; margin-left: auto; color: var(--ink-3); font-size: 1.1rem; }
.fx-pourquoi[open] > summary::after { content: '\2212'; }
.fx-pourquoi ul { margin: 0 0 var(--s-3); padding-left: 1.1em; }
.fx-pourquoi li { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; margin-bottom: 4px; }
.fx-pourquoi-source { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.6; }

/* Sur la planche, le modele selectionne mais ecarte : trace, mais sans
   pretendre au meme statut que ceux qui conviennent. */
.fxp-courbe.est-ecarte { stroke: var(--n-400); stroke-dasharray: 5 4; }
.fxp-puce.est-ecarte { border-style: dashed; color: var(--ink-3); }
.fxp-puce.est-ecarte.est-actif { background: var(--n-500); border-color: var(--n-500); color: #fff; }


.fx-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.fx-table th, .fx-table td { padding: 9px 4px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.fx-table th { color: var(--ink-3); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; }
.fx-table td { font-variant-numeric: tabular-nums; }

.fx-acoustic-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: var(--s-3); }
.fx-acoustic-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.fx-acoustic-bars b { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--cy-400), var(--a-500)); }
.fx-acoustic-bars small { font-size: 10px; color: var(--ink-3); }

.fx-why { padding: var(--s-4); border-radius: var(--r); background: var(--n-25); border: 1px solid var(--line-soft); font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; }
.fx-why ul { margin: 6px 0 0; padding-left: 18px; }

@media print {
  body * { visibility: hidden; }
  #fxFiche, #fxFiche * { visibility: visible; }
  #fxFiche { position: absolute; inset: 0; }
}

@media (prefers-reduced-motion: reduce) { html:not(.mouvement-force) .fx-panel { animation: none; } }

/* ---------------------------------------------------------------------------
   Résultats vérifiés

   Une proposition « vérifiée » a passé un contrôle chiffré : le diamètre de la
   déclinaison tient la vitesse d'air, ou son moteur tient la puissance requise.
   La distinction est visuelle parce qu'elle est réelle — les autres cartes
   relèvent de la bonne famille, sans validation possible faute de données
   publiées. Ne jamais styler une carte non vérifiée comme une vérifiée.
   --------------------------------------------------------------------------- */
.fs2-mod.est-verifie {
  border-color: color-mix(in srgb, var(--a-500) 42%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--a-500) 18%, transparent);
}
.fs2-mod.est-verifie::after {
  content: "Vérifié";
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--a-600);
  padding: 3px 8px; border-radius: 99px;
}
.fs2-mod { position: relative; }

.fs2-motif {
  display: block; margin-top: 2px;
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--a-700, var(--a-600));
}

/* Aucun modèle ne convient : on le dit, plutôt que d'élargir la liste au
   hasard comme le faisait la version précédente. */
.fs2-vide {
  padding: var(--s-8) var(--s-6); text-align: center;
  font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6;
  border: 1px dashed var(--line); border-radius: var(--r-lg);
  background: var(--n-25);
}
.fs2-vide a { color: var(--a-600); font-weight: 600; text-decoration: underline; }
