/* =========================================================
   Page « Visualiseur de cellules »
   ========================================================= */

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.page-vz [hidden] { display: none !important; }
.page-vz :is(a, button, input, summary):focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* =================== HERO =================== */
.vz-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--nav-h) + clamp(56px, 9vw, 120px)) 0 clamp(48px, 7vw, 88px);
}
.vz-hero__orb { top: -40%; left: -15%; opacity: .2; }
.vz-hero__orb--blue {
  top: -20%; left: auto; right: -25%;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 60%); opacity: .14;
}
.vz-hero__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 15%, transparent 75%);
}
.vz-hero__inner { position: relative; z-index: 1; max-width: 980px; }
.vz-hero__title { font-size: clamp(2.75rem, 8vw, 7rem); margin-bottom: 26px; }
.vz-hero__title .grad-text { display: inline-block; padding-bottom: .06em; }
.vz-hero__lead { max-width: 40ch; margin: 0 0 26px; }
.vz-hero__chips { list-style: none; padding: 0; margin: 0 0 34px; display: flex; flex-wrap: wrap; gap: 8px; }

/* =================== APP =================== */
.vz-app { position: relative; padding: 0 0 clamp(72px, 10vw, 140px); }
.vz {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: clamp(20px, 2.6vw, 36px); align-items: start;
}
.vz__main { display: grid; gap: 20px; min-width: 0; }
.vz__side { position: sticky; top: calc(var(--nav-h) + 16px); min-width: 0; }

/* ---------- Scène ---------- */
.vz-stage {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% 45%, rgba(47,183,255,.07), transparent 65%),
    linear-gradient(180deg, #0b0e13, #07090c);
  overflow: hidden;
}
.vz-stage__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.vz-stage__tag { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.vz-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8125rem; color: var(--text-dim); }
.vz-legend li { display: flex; align-items: center; gap: 8px; }
.vz-legend__dot { width: 12px; height: 12px; border-radius: 50%; }
.vz-legend__dot.is-a { background: #2fb7ff; box-shadow: 0 0 10px rgba(47,183,255,.5); }
.vz-legend__dot.is-b { background: #3ef0a1; box-shadow: 0 0 10px rgba(62,240,161,.5); }

.vz-stage__canvas { position: relative; aspect-ratio: 16 / 11; padding: clamp(8px, 1.5vw, 18px); }
.vz-svg { width: 100%; height: 100%; overflow: hidden; }
.vz-stage__caption { padding: 0 20px 16px; font-size: .8125rem; color: var(--text-faint); }

/* Cellules */
.vz-cell__body { stroke: rgba(0,0,0,.45); stroke-width: .35; }
.vz-cell__cap { fill: none; stroke: rgba(0,0,0,.28); stroke-width: .5; }
.vz-cell.is-a .vz-cell__mark { fill: rgba(4,20,34,.55); }
.vz-cell.is-b .vz-cell__mark { fill: rgba(3,27,16,.62); }

.vz-cell__plus { fill: none; stroke: rgba(0,0,0,.55); }
.vz-cell.is-plus .vz-cell__minus, .vz-cell:not(.is-plus) .vz-cell__plus { display: none; }
.vz-nickel path { fill: none; stroke: #c9ced6; stroke-opacity: .82; stroke-linecap: round; stroke-linejoin: round; }
.vz-legend__line { width: 18px; height: 4px; border-radius: 4px; background: #c9ced6; opacity: .85; }
.vz-env-rect { fill: none; stroke: rgba(255,255,255,.22); stroke-width: .35; stroke-dasharray: 2 1.5; }
.vz-glabels text { font-family: var(--font); font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.vz-glabels .is-a { fill: #7fd3ff; }
.vz-glabels .is-b { fill: #8cf7c6; }
.vz-dims { stroke: var(--text-dim); fill: none; }
.vz-dims__ext { stroke: rgba(255,255,255,.28); }
.vz-dims__arrow { fill: var(--text); stroke: none; }
.vz-dims__line { stroke: var(--text); }
.vz-dims__txt {
  fill: var(--text); stroke: #090b0f; stroke-width: .9em; paint-order: stroke; stroke-linejoin: round;
  font-family: var(--font); font-weight: 600; font-variant-numeric: tabular-nums;
}
.vz-scale { stroke: var(--accent); }
.vz-scale__txt { fill: var(--text-dim); stroke: none; font-family: var(--font); font-weight: 500; }

/* ---------- Contrôles ---------- */
.vz-controls {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
}
.vz-ctl { margin: 0; min-width: 0; padding: clamp(18px, 2.4vw, 26px); border: 0; border-bottom: 1px solid var(--line); }
.vz-ctl:nth-child(odd):not(.vz-ctl--mini) { border-right: 1px solid var(--line); }
.vz-ctl--toggles { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px 28px; border-right: 0 !important; }
.vz-ctl__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vz-ctl__label { float: none; padding: 0; font-size: .9375rem; font-weight: 600; letter-spacing: -0.01em; }
fieldset.vz-ctl > legend { margin-bottom: 14px; }
.vz-ctl__label abbr { text-decoration: none; color: var(--text-faint); }
.vz-ctl__value { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.vz-ctl--mini .vz-ctl__value { font-size: 1rem; letter-spacing: -0.01em; color: var(--accent); }
.vz-ctl--mini .vz-ctl__label { font-weight: 500; color: var(--text-dim); }
.vz-ctl__help { margin: 4px 0 0; font-size: .8125rem; color: var(--text-faint); line-height: 1.45; }
.vz-ctl__flag { display: block; margin-top: 6px; color: #ffc86b; font-weight: 600; }
.vz-band-key { display: inline-block; width: 18px; height: 6px; border-radius: 6px; margin-right: 6px; vertical-align: middle; background: rgba(62,240,161,.35); box-shadow: inset 0 0 0 1px rgba(62,240,161,.6); }

.vz-stepper { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.vz-step {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.03);
  font-size: 1.25rem; line-height: 1; font-weight: 500;
  transition: background .3s, border-color .3s, opacity .3s;
}
.vz-step:hover:not(:disabled) { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }
.vz-step:disabled { opacity: .3; cursor: default; }

.vz-range { position: relative; flex: 1; min-width: 0; }
.vz-range__band {
  position: absolute; top: 50%; height: 14px; transform: translateY(-50%); border-radius: 8px; pointer-events: none;
  background: rgba(62,240,161,.12); box-shadow: inset 0 0 0 1px rgba(62,240,161,.4);
}
.vz-range input[type="range"] {
  --p: 50%;
  position: relative; display: block;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 40px; margin: 0; background: transparent; cursor: pointer;
}
.vz-range input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, #3ef0a1, #2fb7ff) 0 / var(--p) 100% no-repeat, rgba(255,255,255,.12);
}
.vz-range input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); }
.vz-range input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent-grad); }
.vz-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; margin-top: -10px; border-radius: 50%;
  background: #fff; border: 0; box-shadow: 0 0 0 6px rgba(62,240,161,.18), 0 4px 14px rgba(0,0,0,.5);
  transition: box-shadow .3s;
}
.vz-range input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: #fff; box-shadow: 0 0 0 6px rgba(62,240,161,.18), 0 4px 14px rgba(0,0,0,.5);
}
.vz-range input[type="range"]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(62,240,161,.22), 0 4px 14px rgba(0,0,0,.5); }
.vz-range input[type="range"]:focus-visible { outline: none; }
.vz-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--accent-2); }
.vz-range input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--accent-2); }
.vz-ctl--mini .vz-range input[type="range"] { height: 32px; }

/* Segmenté (radios natifs) */
.vz-seg {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  padding: 4px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.vz-seg--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vz-seg__opt { position: relative; display: block; cursor: pointer; }
.vz-seg__opt input, .vz-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.vz-seg__opt span {
  display: block; text-align: center; padding: 10px 8px; border-radius: 999px;
  font-size: .9375rem; font-weight: 600; color: var(--text-dim); white-space: nowrap;
  transition: background .35s var(--ease), color .3s, box-shadow .3s;
}
.vz-seg__opt:hover span { color: var(--text); }
.vz-seg__opt input:checked + span { background: var(--accent); color: #031b10; box-shadow: 0 0 28px rgba(62,240,161,.25); }
.vz-seg__opt input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Interrupteurs */
.vz-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: .9375rem; color: var(--text-dim); position: relative; }
.vz-switch__ui {
  position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid var(--line-strong); transition: background .3s, border-color .3s;
}
.vz-switch__ui::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform .35s var(--ease);
}
.vz-switch input:checked + .vz-switch__ui { background: var(--accent); border-color: var(--accent); }
.vz-switch input:checked + .vz-switch__ui::after { transform: translateX(18px); background: #031b10; }
.vz-switch input:focus-visible + .vz-switch__ui { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.vz-switch input:checked ~ * { color: var(--text); }

/* Avancé */
.vz-adv { grid-column: 1 / -1; }
.vz-adv summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 18px clamp(18px, 2.4vw, 26px); font-weight: 600; font-size: .9375rem;
}
.vz-adv summary::-webkit-details-marker { display: none; }
.vz-adv summary span { font-weight: 400; color: var(--text-faint); font-size: .8125rem; }
.vz-adv summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px;
  border-right: 1.5px solid var(--text-dim); border-bottom: 1.5px solid var(--text-dim);
  transform: rotate(45deg) translateY(-3px); transition: transform .35s var(--ease);
}
.vz-adv[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.vz-adv__body {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 4px;
  padding: 0 0 18px; border-top: 1px solid var(--line);
}
.vz-adv__body .vz-ctl { border: 0; padding-bottom: 6px; }
.vz-adv__reset { grid-column: 1 / -1; justify-self: start; margin: 4px clamp(18px, 2.4vw, 26px) 0; padding: 9px 18px; font-size: .875rem; }

/* ---------- Résultats ---------- */
.vz-res {
  border-radius: var(--radius); padding: clamp(20px, 2.2vw, 28px); background: rgba(17,20,25,.72);
  max-height: calc(100vh - var(--nav-h) - 32px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.vz-res__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vz-res__title { font-size: 1rem; letter-spacing: -0.01em; color: var(--text-dim); font-weight: 600; }
.vz-res__chip { color: var(--accent); border-color: rgba(62,240,161,.35); }
.vz-res__arch { margin: 10px 0 0; font-size: clamp(2.5rem, 4.4vw, 3.5rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.vz-res__count { margin: 6px 0 0; color: var(--text-dim); font-size: .9375rem; }
.vz-res__count span:first-child { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.vz-iso {
  margin: 8px -6px 10px; height: clamp(120px, 15vw, 170px); border-radius: var(--radius-sm);
  background: radial-gradient(ellipse at 50% 60%, rgba(62,240,161,.07), transparent 70%);
}
.vz-iso svg { width: 100%; height: 100%; }
.vz-iso__body { fill: url(#vzIsoBody); stroke: rgba(0,0,0,.55); stroke-width: .4; }
.vz-iso__top { stroke: rgba(0,0,0,.4); stroke-width: .4; }
.vz-iso__top.is-a { fill: #2fb7ff; }
.vz-iso__top.is-b { fill: #3ef0a1; }
.vz-iso__dim { stroke: var(--text-dim); fill: none; }
.vz-iso__dim text { fill: var(--text-dim); stroke: none; font-family: var(--font); font-weight: 600; }

.vz-kpis {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0 0 12px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.vz-kpi { background: var(--bg-card); padding: 12px 14px; min-width: 0; }
.vz-kpi dt { font-size: .6875rem; color: var(--text-faint); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 4px; }
.vz-kpi dd { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.vz-kpi dd small { font-size: .8125rem; font-weight: 500; color: var(--text-dim); margin-left: 4px; }
.vz-kpi dd.vz-kpi__sub { font-size: .75rem; font-weight: 400; color: var(--text-faint); letter-spacing: 0; margin-top: 2px; }
.vz-kpi--main { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 12px; }
.vz-kpi--main dt { grid-column: 1 / -1; }
.vz-kpi--main dd:not(.vz-kpi__sub) { font-size: clamp(1.75rem, 2.6vw, 2.25rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.05; }
.vz-kpi--main dd span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vz-kpi--main .vz-kpi__sub { font-size: .9375rem !important; color: var(--text-dim) !important; padding-bottom: 4px; }
.vz-kpi--main .vz-kpi__sub span { background: none; color: var(--text); -webkit-background-clip: border-box; background-clip: border-box; font-weight: 600; }

.vz-env {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px;
}
.vz-env__k { font-size: .6875rem; color: var(--text-faint); letter-spacing: .05em; text-transform: uppercase; }
.vz-env__k small { text-transform: none; letter-spacing: 0; margin-left: 4px; }
.vz-env__v { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

.vz-note {
  margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: .8125rem; line-height: 1.45;
  color: var(--text-dim); background: rgba(47,183,255,.07); border: 1px solid rgba(47,183,255,.25);
}

.vz-compare { margin-bottom: 12px; }
.vz-compare table { width: 100%; border-collapse: collapse; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.vz-compare caption { text-align: left; font-size: .6875rem; color: var(--text-faint); letter-spacing: .05em; text-transform: uppercase; padding-bottom: 8px; }
.vz-compare caption span { text-transform: none; letter-spacing: 0; margin-left: 4px; }
.vz-compare th, .vz-compare td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.vz-compare thead th { font-weight: 500; color: var(--text-faint); font-size: .75rem; padding-top: 0; }
.vz-compare td:last-child, .vz-compare th:last-child { text-align: right; }
.vz-compare td small { display: block; color: var(--text-faint); font-size: .6875rem; }
.vz-compare tbody tr:last-child > * { border-bottom: 0; }
.vz-compare tbody th { font-weight: 600; }
.vz-compare__btn { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,255,255,.2); text-underline-offset: 3px; padding: 2px 0; }
.vz-compare__btn:hover { text-decoration-color: currentColor; }
.vz-compare tr.is-current .vz-compare__btn { color: var(--accent-2); text-decoration: none; }
.vz-compare tr.is-best td { color: var(--accent); }
.vz-compare__badge {
  display: block; width: max-content; margin-top: 3px; font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #031b10; background: var(--accent); padding: 2px 6px; border-radius: 6px;
}

.vz-disclaimer {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(255,200,107,.07); border: 1px solid rgba(255,200,107,.3); color: #ffc86b;
}
.vz-disclaimer svg { flex: none; margin-top: 2px; }
.vz-disclaimer p { margin: 0; font-size: .8125rem; line-height: 1.45; color: var(--text-dim); }
.vz-disclaimer strong { color: var(--text); }
.vz-res__cta { width: 100%; justify-content: center; margin-top: 16px; }

/* =================== DISPOSITIONS =================== */
.vz-modes { padding-top: clamp(48px, 7vw, 96px); }
.vz-modes__head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 72px); }
.vz-modes__head .t-lead { margin: 22px auto 0; max-width: 48ch; }
.vz-mode { display: flex; flex-direction: column; gap: 12px; }
.vz-mode p { margin: 0; }
.vz-mode__fig {
  display: grid; place-items: center; height: 170px; margin-bottom: 8px; border-radius: var(--radius-sm);
  background: radial-gradient(ellipse at 50% 50%, rgba(47,183,255,.08), transparent 70%);
}
.vz-mini { max-height: 150px; width: auto; max-width: 100%; }
.vz-mode__meta { font-size: .8125rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.vz-mode__try { margin-top: auto; padding: 4px 0; align-self: flex-start; font-size: .9375rem; }

/* =================== CTA =================== */
.vz-cta { overflow: hidden; }
.vz-cta__orb { left: 50%; top: 0; transform: translateX(-50%); opacity: .14; }
.vz-cta__inner { position: relative; z-index: 1; max-width: 820px; }
.vz-cta__lead { margin: 22px auto 0; max-width: 46ch; }
.vz-cta__base { margin: 22px 0 30px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.vz-cta__base strong { color: var(--text); }

/* =================== RESPONSIVE =================== */
@media (max-width: 1080px) {
  .vz { grid-template-columns: 1fr; }
  .vz__side { position: relative; top: 0; }
  .vz-res { max-height: none; overflow: visible; }
  .vz-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vz-kpi--main { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .vz-controls { grid-template-columns: 1fr; }
  .vz-ctl:nth-child(odd):not(.vz-ctl--mini) { border-right: 0; }
  .vz-adv__body { grid-template-columns: 1fr; }
  .vz-stage__canvas { aspect-ratio: 1 / 1; padding: 6px; }
  .vz-stage__bar { padding: 14px 16px; }
  .vz-stage__caption { padding: 0 16px 14px; }
  .vz-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vz-seg__opt span { font-size: .875rem; padding: 10px 4px; }
  .vz-res__cta { white-space: normal; text-align: center; }
}
@media (max-width: 420px) {
  .vz-hero__chips .chip { font-size: .75rem; }
  .vz-compare th, .vz-compare td { padding: 8px 3px; }
  .vz-legend { font-size: .75rem; }
}
