/* ==========================================================================
   Démo « Diagnostic & continuité » — enquête guidée en cinq étapes (simulée).
   Tout est limité à [data-demo="diagnostic"]. Sans JavaScript : les cinq
   étapes du premier cas se lisent l'une sous l'autre.
   ========================================================================== */
[data-demo="diagnostic"] {
  --dg-ok: #4ade80;
  --dg-ok-t: #a7f3c4;
  --dg-bad: #ff7a6b;
  --dg-bad-t: #ffb8ae;
  --dg-sec: #8fd8e8;
  --dg-halo: #0e0c09;
}
[data-mode="platinum"] [data-demo="diagnostic"], [data-mode="base"] [data-demo="diagnostic"] { --dg-halo: #0d0d0d; }

/* ---------- En-tête : cas + commandes ---------- */
[data-demo="diagnostic"] .dg-head { display: none; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.2rem; border-bottom: 1px solid var(--mode-line); }
[data-demo="diagnostic"].is-live .dg-head { display: flex; }
[data-demo="diagnostic"] .dg-cases { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: #ffffff08; border: 1px solid #ffffff12; }
[data-demo="diagnostic"] .dg-cases button {
  display: grid; gap: .2rem; text-align: left; padding: .55rem 1rem .6rem; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; color: #c4c4cc; font: inherit; transition: background .3s var(--ease), color .3s;
}
[data-demo="diagnostic"] .dg-cases button:hover { color: #fff; background: #ffffff0a; }
[data-demo="diagnostic"] .dg-cases button[aria-pressed="true"] { background: #ffffff16; color: #fff; box-shadow: var(--mode-spec), 0 6px 18px #0006; }
[data-demo="diagnostic"] .dg-cases small { font: 500 .58rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #a8a8b0; }
[data-demo="diagnostic"] .dg-cases button[aria-pressed="true"] small { color: var(--gold-soft); }
[data-demo="diagnostic"] .dg-cases b { font-weight: 600; font-size: .95rem; letter-spacing: -.01em; }
[data-demo="diagnostic"] .dg-ctrl { display: flex; gap: .45rem; align-items: center; }
[data-demo="diagnostic"] .dg-ctrl button {
  display: inline-flex; align-items: center; gap: .5rem; height: 2.5rem; min-width: 2.5rem; justify-content: center; padding: 0 .9rem;
  border-radius: 999px; border: 1px solid #ffffff2e; background: transparent; color: #fff; cursor: pointer;
  font: 600 .8rem/1 var(--sans); white-space: nowrap; transition: background .25s, border-color .25s, transform .25s var(--ease);
}
[data-demo="diagnostic"] .dg-ctrl button:hover { background: #ffffff12; }
[data-demo="diagnostic"] .dg-ctrl button:disabled { opacity: .35; cursor: default; background: transparent; }
[data-demo="diagnostic"] .dg-ctrl [data-nav="prev"], [data-demo="diagnostic"] .dg-ctrl [data-nav="next"] { padding: 0; font-size: 1rem; }
[data-demo="diagnostic"] .dg-pp { position: relative; width: 10px; height: 12px; }
[data-demo="diagnostic"] .dg-pp::before, [data-demo="diagnostic"] .dg-pp::after { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; border-radius: 1px; background: currentColor; }
[data-demo="diagnostic"] .dg-pp::before { left: 0; } [data-demo="diagnostic"] .dg-pp::after { right: 0; }
[data-demo="diagnostic"] [data-nav="play"][aria-pressed="false"] .dg-pp::before { width: 0; height: 0; background: none; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
[data-demo="diagnostic"] [data-nav="play"][aria-pressed="false"] .dg-pp::after { display: none; }
[data-demo="diagnostic"] .dg-pl-off { display: none; }
[data-demo="diagnostic"] [data-nav="play"][aria-pressed="false"] .dg-pl-on { display: none; }
[data-demo="diagnostic"] [data-nav="play"][aria-pressed="false"] .dg-pl-off { display: inline; }
[data-demo="diagnostic"] [data-nav="play"][aria-pressed="true"] { border-color: color-mix(in srgb, var(--mode-glow) 55%, transparent); color: var(--gold-soft); }
[data-demo="diagnostic"].is-end [data-nav="replay"] { background: var(--mode-action); color: var(--mode-on-action); border-color: transparent; box-shadow: var(--mode-action-edge); animation: dgPulse 2.2s ease-in-out infinite; }

/* ---------- Rail des cinq étapes ---------- */
[data-demo="diagnostic"] .dg-rail {
  --done: 0; position: relative; list-style: none; margin: 0; padding: 1.15rem 1.2rem 1rem;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--mode-line);
}
[data-demo="diagnostic"] .dg-rail::before, [data-demo="diagnostic"] .dg-rail::after {
  content: ""; position: absolute; top: calc(1.15rem + 15px); left: calc(1.2rem + 10%); right: calc(1.2rem + 10%); height: 2px; border-radius: 2px; background: #ffffff1c;
}
[data-demo="diagnostic"] .dg-rail::after { background: var(--mode-action); transform-origin: left; transform: scaleX(var(--done)); transition: transform .9s var(--ease); box-shadow: 0 0 12px color-mix(in srgb, var(--mode-glow) 50%, transparent); }
[data-demo="diagnostic"] .dg-rail li { position: relative; z-index: 1; display: flex; justify-content: center; }
[data-demo="diagnostic"] .dg-rail button {
  --p: 0; display: grid; justify-items: center; gap: .5rem; padding: 0 .3rem; border: 0; background: none; color: #a8a8b0; font: inherit; cursor: default; text-align: center;
}
[data-demo="diagnostic"].is-live .dg-rail button { cursor: pointer; }
[data-demo="diagnostic"] .dg-rail i {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 600 .78rem/1 var(--mono); font-style: normal;
  background: #141210; border: 1px solid #ffffff2e; color: #d4d4d8; transition: background .4s, border-color .4s, color .4s, box-shadow .4s, transform .4s var(--ease);
}
[data-demo="diagnostic"] .dg-rail span { position: relative; font-weight: 600; font-size: .82rem; line-height: 1.3; letter-spacing: -.005em; transition: color .4s; padding-bottom: .45rem; }
[data-demo="diagnostic"] .dg-rail span::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 2px; border-radius: 2px; background: var(--gold-soft);
  transform-origin: left; transform: scaleX(var(--p)); opacity: 0;
}
[data-demo="diagnostic"] .dg-rail li.is-done i { background: color-mix(in srgb, var(--gold-soft) 18%, #141210); border-color: color-mix(in srgb, var(--gold-soft) 60%, transparent); color: var(--gold-soft); }
[data-demo="diagnostic"] .dg-rail li.is-done span { color: #d6d6dc; }
[data-demo="diagnostic"] .dg-rail li.is-on i { background: var(--mode-action); color: var(--mode-on-action); border-color: transparent; transform: scale(1.12); box-shadow: var(--mode-action-edge), 0 0 0 6px color-mix(in srgb, var(--mode-glow) 16%, transparent), 0 0 24px color-mix(in srgb, var(--mode-glow) 40%, transparent); }
[data-demo="diagnostic"] .dg-rail li.is-on span { color: #fff; }
[data-demo="diagnostic"] .dg-rail li.is-on span::after { opacity: 1; }
[data-demo="diagnostic"] .dg-rail button:hover span { color: #fff; }
[data-demo="diagnostic"] .dg-rail li[data-step="5"].is-ok i { background: var(--dg-ok); color: #062012; box-shadow: 0 0 0 6px #4ade8022, 0 0 24px #4ade8066; }

/* ---------- Scène : visualisation + panneau ---------- */
[data-demo="diagnostic"] .dg-stage { display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); }
[data-demo="diagnostic"] .dg-viz { position: relative; padding: 1.3rem 1.3rem 1.2rem; border-right: 1px solid var(--mode-line); min-width: 0; display: none; }
[data-demo="diagnostic"].is-live .dg-viz { display: block; }
[data-demo="diagnostic"] .dg-chart { position: relative; min-height: 410px; transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s; }
[data-demo="diagnostic"] .dg-svg { display: block; width: 100%; overflow: visible; font-family: var(--sans); touch-action: pan-y; }
[data-demo="diagnostic"][data-step="1"] .dg-chart, [data-demo="diagnostic"][data-step="1"] .dg-legend { opacity: 0; transform: translateY(14px) scale(.98); filter: blur(6px); pointer-events: none; }
[data-demo="diagnostic"][data-step="4"] .dg-chart { opacity: .55; }
[data-demo="diagnostic"] .dg-legend { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; list-style: none; margin: .7rem 0 0; padding: 0; transition: opacity .7s var(--ease); }
[data-demo="diagnostic"] .dg-legend[hidden] { display: none; }
[data-demo="diagnostic"] .dg-legend li { display: flex; align-items: center; gap: .45rem; font: 500 .62rem/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #b4b4bc; }
[data-demo="diagnostic"] .dg-legend i { flex: none; display: block; }
[data-demo="diagnostic"] .lg-line { width: 18px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--gold-soft) 55%, var(--dg-bad) 55%); }
[data-demo="diagnostic"] .lg-band { width: 16px; height: 10px; border-radius: 3px; background: #4ade8026; border: 1px solid #4ade8066; }
[data-demo="diagnostic"] .lg-bar { width: 16px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--gold-soft) 70%, #000); }
[data-demo="diagnostic"] .lg-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff8; }
[data-demo="diagnostic"] .lg-sec { width: 18px; height: 2px; background: var(--dg-sec); }
[data-demo="diagnostic"] .lg-set { width: 18px; height: 0; border-top: 1.5px dashed #ffffffaa; }

/* Héros de l'étape 1 : la mesure qui pose problème */
[data-demo="diagnostic"] .dg-hero { text-align: center; padding: 1.5rem 1rem 1rem; }
[data-demo="diagnostic"].is-live .dg-hero { position: absolute; inset: 1.3rem 1.3rem auto; z-index: 2; display: grid; justify-items: center; align-content: center; min-height: 410px; transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-demo="diagnostic"] .dg-hero[hidden] { display: none !important; }
[data-demo="diagnostic"].is-live:not([data-step="1"]) .dg-hero { opacity: 0; transform: scale(.92); pointer-events: none; }
[data-demo="diagnostic"] .dg-hk { display: inline-flex; align-items: center; gap: .55rem; margin: 0; font: 600 .66rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: #dcdce0; }
[data-demo="diagnostic"] .dg-hk i { width: 8px; height: 8px; border-radius: 50%; background: var(--dg-bad); box-shadow: 0 0 12px var(--dg-bad); animation: dgBlink 1.4s ease-in-out infinite; }
/* Cadran : lunette métallique, verre noir, graduations fines, plage normale verte, arc de la mesure en corail */
[data-demo="diagnostic"] .dg-gauge { position: relative; width: min(100%, 250px); aspect-ratio: 1; margin: 1rem auto 0; filter: drop-shadow(0 18px 26px #000) drop-shadow(0 0 22px #ff7a6b1a); }
[data-demo="diagnostic"] .dg-dial { display: block; width: 100%; height: 100%; overflow: visible; }
[data-demo="diagnostic"] .dg-dial .dz-bz { stroke: #ffffff2e; stroke-width: .8; }
[data-demo="diagnostic"] .dg-dial .dz-in { fill: none; stroke: #000; stroke-width: 2.5; }
[data-demo="diagnostic"] .dg-dial .dz-tk { fill: none; stroke: rgb(255 255 255 / .16); stroke-width: 1.2; stroke-linecap: round; }
[data-demo="diagnostic"] .dg-dial .dz-tk.is-maj { stroke: rgb(255 255 255 / .34); stroke-width: 1.6; }
[data-demo="diagnostic"] .dg-dial .dz-tr { fill: none; stroke: #ffffff14; stroke-width: 5; stroke-linecap: round; }
[data-demo="diagnostic"] .dg-dial .dz-band { fill: none; stroke: #34d399; stroke-width: 3; filter: drop-shadow(0 0 4px #34d39999); }
[data-demo="diagnostic"] .dg-dial .dz-v { fill: none; stroke: var(--dg-bad); stroke-width: 5; stroke-linecap: round; stroke-dasharray: calc(var(--vk) * 1) 200; filter: drop-shadow(0 0 5px #ff7a6baa); }
[data-demo="diagnostic"] .dg-dial .dz-knob { transform: rotate(calc(var(--vk) * 2.7deg - 135deg)); transform-origin: 100px 100px; }
[data-demo="diagnostic"] .dg-dial .dz-knob circle { fill: #fff; stroke: #000; stroke-width: 1.5; filter: drop-shadow(0 0 6px var(--dg-bad)); }
[data-demo="diagnostic"] .dg-big { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; line-height: 1; pointer-events: none; }
[data-demo="diagnostic"] .dg-big b {
  font-weight: 300; font-size: 4.2rem; letter-spacing: -.05em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 20%, #ffc9c0 95%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px #ff7a6b40);
}
[data-demo="diagnostic"] .dg-big span { align-self: flex-start; margin: 4.6rem 0 0 .2rem; font-size: 1rem; font-weight: 500; color: #ffb8ae; }
[data-demo="diagnostic"] .dg-gscale { position: absolute; left: 14%; right: 14%; bottom: 4%; display: flex; justify-content: space-between; font: 500 .58rem/1 var(--mono); letter-spacing: .1em; color: #a8a8b0; }
:root[data-mode="base"] [data-demo="diagnostic"] .dg-gauge { filter: none; }
:root[data-mode="base"] [data-demo="diagnostic"] .dg-dial :is(.dz-v, .dz-knob circle) { filter: none; }
:root[data-mode="base"] [data-demo="diagnostic"] .dg-dial ellipse { display: none; }
[data-demo="diagnostic"] .dg-hs { margin: 1.1rem 0 0; color: #d0d0d6; font-size: .95rem; }
[data-demo="diagnostic"] .dg-since { display: inline-block; margin: .8rem 0 0; padding: .45rem .8rem; border-radius: 999px; border: 1px solid #ff7a6b55; background: #ff7a6b14; color: var(--dg-bad-t); font: 600 .66rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Graphique (SVG tracé par le script) ---------- */
[data-demo="diagnostic"] .dg-svg text { font: 500 10px var(--mono); letter-spacing: .06em; fill: #9a9aa3; }
[data-demo="diagnostic"] .dg-svg .halo { paint-order: stroke; stroke: var(--dg-halo); stroke-width: 4px; stroke-linejoin: round; }
[data-demo="diagnostic"] .dg-gl { stroke: #ffffff10; stroke-width: 1; }
[data-demo="diagnostic"] .dg-band { fill: #4ade8017; }
[data-demo="diagnostic"] .dg-bandl { stroke: #4ade8055; stroke-width: 1; stroke-dasharray: 2 4; }
[data-demo="diagnostic"] .dg-svg text.dg-bandt { fill: #86efac; }
[data-demo="diagnostic"] .dg-set { stroke: #ffffff66; stroke-width: 1; stroke-dasharray: 5 5; }
[data-demo="diagnostic"] .dg-fut { fill: url(#dg-hatch); }
[data-demo="diagnostic"] .dg-anom { fill: #ff7a6b12; stroke: #ff7a6b55; stroke-width: 1; opacity: 0; transition: opacity .8s var(--ease); }
[data-demo="diagnostic"] .dg-svg.is-anom .dg-anom { opacity: 1; animation: dgGlow 2.6s ease-in-out infinite; }
[data-demo="diagnostic"] .dg-svg text.dg-anomt { fill: var(--dg-bad-t); font-weight: 600; opacity: 0; transition: opacity .8s .3s; }
[data-demo="diagnostic"] .dg-svg.is-anom text.dg-anomt { opacity: 1; }
[data-demo="diagnostic"] .dg-area { fill: url(#dg-area); }
[data-demo="diagnostic"] .dg-line { fill: none; stroke: url(#dg-grad); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
[data-demo="diagnostic"] .dg-line2 { fill: none; stroke: url(#dg-grad2); stroke-width: 2.6; stroke-linejoin: round; }
[data-demo="diagnostic"] .dg-comp rect { fill: color-mix(in srgb, var(--gold-soft) 72%, #000); }
[data-demo="diagnostic"] .dg-comp rect.is-anom { fill: var(--dg-bad); }
[data-demo="diagnostic"] .dg-comp rect.is-fix { fill: var(--dg-ok); }
[data-demo="diagnostic"] .dg-door { fill: #fff; }
[data-demo="diagnostic"] .dg-cut { fill: var(--dg-bad); }
[data-demo="diagnostic"] .dg-secp { fill: none; stroke: var(--dg-sec); stroke-width: 1.5; stroke-linejoin: round; }
[data-demo="diagnostic"] .dg-secp2 { fill: none; stroke: var(--dg-ok); stroke-width: 1.7; }
[data-demo="diagnostic"] .dg-thr { stroke: var(--dg-bad); stroke-width: 1; stroke-dasharray: 4 4; }
[data-demo="diagnostic"] .dg-svg text.dg-thrt { fill: var(--dg-bad-t); }
[data-demo="diagnostic"] .dg-svg text.dg-lane { font-size: 9.5px; letter-spacing: .14em; fill: #b4b4bc; }
[data-demo="diagnostic"] .dg-svg.is-small text { font-size: 11.5px; letter-spacing: .02em; }
[data-demo="diagnostic"] .dg-svg.is-small text.dg-lane { font-size: 10.5px; letter-spacing: .1em; }
[data-demo="diagnostic"] .dg-marks { opacity: 0; transition: opacity .8s var(--ease); }
[data-demo="diagnostic"] .dg-svg.is-marked .dg-marks { opacity: 1; }
[data-demo="diagnostic"] .dg-nowl { stroke: #ffffffaa; stroke-width: 1; stroke-dasharray: 3 3; }
[data-demo="diagnostic"] .dg-nowp rect { fill: var(--gold-soft); }
[data-demo="diagnostic"] .dg-svg .dg-nowp text { fill: #1a1307; font-weight: 700; text-anchor: middle; }
[data-demo="diagnostic"] .dg-headdot .h { fill: var(--gold-soft); opacity: .35; }
[data-demo="diagnostic"] .dg-headdot .c { fill: #fff; }
[data-demo="diagnostic"] .dg-flag { opacity: 0; transition: opacity .6s var(--ease); }
[data-demo="diagnostic"] .dg-svg.is-verified .dg-flag { opacity: 1; }
[data-demo="diagnostic"] .dg-flag rect { fill: var(--dg-ok); }
[data-demo="diagnostic"] .dg-svg .dg-flag text { fill: #062012; font-weight: 700; text-anchor: middle; }
[data-demo="diagnostic"] .dg-flag line { stroke: var(--dg-ok); stroke-width: 1.2; }
[data-demo="diagnostic"] .dg-flag circle { fill: var(--dg-ok); }
[data-demo="diagnostic"] .dg-svg.is-verified .dg-band { fill: #4ade802a; animation: dgBand 1.6s var(--ease); }
[data-demo="diagnostic"] .dg-cur { opacity: 0; pointer-events: none; }
[data-demo="diagnostic"] .dg-cur.is-on { opacity: 1; }
[data-demo="diagnostic"] .dg-cur line { stroke: #ffffff80; stroke-width: 1; }
[data-demo="diagnostic"] .dg-cur circle { fill: #fff; stroke: var(--dg-halo); stroke-width: 2; }
[data-demo="diagnostic"] .dg-hit { fill: transparent; cursor: crosshair; }

/* Mise en évidence pendant l'étape 3 */
[data-demo="diagnostic"] .dg-svg [data-k] { transition: opacity .5s var(--ease); }
[data-demo="diagnostic"] .dg-svg[data-hl] [data-k] { opacity: .22; }
[data-demo="diagnostic"] .dg-svg[data-hl="power"] [data-k="line"],
[data-demo="diagnostic"] .dg-svg[data-hl="doors"] [data-k="doors"],
[data-demo="diagnostic"] .dg-svg[data-hl="set"] [data-k="set"],
[data-demo="diagnostic"] .dg-svg[data-hl="set"] [data-k="line"],
[data-demo="diagnostic"] .dg-svg[data-hl="sec"] [data-k="sec"],
[data-demo="diagnostic"] .dg-svg[data-hl="sec"] [data-k="comp"] { opacity: 1; }
[data-demo="diagnostic"] .dg-svg[data-hl="doors"] .dg-door { filter: drop-shadow(0 0 4px #fff); }
[data-demo="diagnostic"] .dg-svg[data-hl="set"] .dg-set { stroke: #fff; stroke-width: 1.6; }
[data-demo="diagnostic"] .dg-svg[data-hl="sec"] .dg-secp { stroke-width: 2.2; filter: drop-shadow(0 0 4px var(--dg-sec)); }

/* Infobulle de la courbe */
[data-demo="diagnostic"] .dg-tip {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; min-width: 11rem; padding: .6rem .75rem .65rem;
  border-radius: 11px; border: 1px solid var(--mode-line); background: color-mix(in srgb, #0b0a08 94%, transparent);
  box-shadow: 0 16px 36px #000c, var(--mode-spec); font-size: .8rem; line-height: 1.45; color: #d6d6dc; opacity: 0; transition: opacity .15s;
}
[data-demo="diagnostic"] .dg-tip.is-on { opacity: 1; }
[data-demo="diagnostic"] .dg-tip b { display: block; font: 600 .62rem/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); }
[data-demo="diagnostic"] .dg-tip strong { display: block; color: #fff; font-size: 1.05rem; font-weight: 650; }
[data-demo="diagnostic"] .dg-tip span { display: block; }

/* ---------- Panneau des étapes ---------- */
[data-demo="diagnostic"] .dg-panels { position: relative; padding: 1.4rem 1.5rem 1.5rem; min-width: 0; }
[data-demo="diagnostic"] .dg-step + .dg-step { margin-top: 2rem; }
[data-demo="diagnostic"] .dg-step[hidden] { display: none; }
[data-demo="diagnostic"].is-live .dg-panels { display: grid; }
[data-demo="diagnostic"].is-live .dg-step { grid-area: 1 / 1; margin: 0; visibility: hidden; opacity: 0; transform: translateX(14px); transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s .5s; }
[data-demo="diagnostic"].is-live .dg-step.is-on { visibility: visible; opacity: 1; transform: none; transition: opacity .6s var(--ease) .1s, transform .7s var(--ease) .1s, visibility 0s; }
[data-demo="diagnostic"] .dg-k { margin: 0; font: 600 .66rem/1.3 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); }
[data-demo="diagnostic"] .dg-step h3 { margin: .65rem 0 0; font-weight: 650; font-size: 1.32rem; line-height: 1.22; letter-spacing: -.022em; color: #fff; }
[data-demo="diagnostic"] .dg-step > p, [data-demo="diagnostic"] .dg-prop + p { margin: .7rem 0 0; color: #d0d0d6; font-size: .93rem; line-height: 1.6; }
[data-demo="diagnostic"] .dg-take { padding: .8rem .95rem; border-radius: 12px; border-left: 3px solid var(--gold-soft); background: color-mix(in srgb, var(--gold-soft) 7%, transparent); color: #f0f0f3 !important; }
[data-demo="diagnostic"] .dg-take b { color: var(--gold-soft); font-weight: 600; }

[data-demo="diagnostic"] .dg-notif {
  display: flex; gap: .8rem; align-items: flex-start; margin-top: 1.1rem; padding: .85rem .95rem; border-radius: 18px;
  background: #ffffff10; border: 1px solid #ffffff1a; box-shadow: 0 18px 40px #0008, inset 0 1px 0 #ffffff14;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
[data-demo="diagnostic"] .dg-notif > i { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--mode-action); box-shadow: var(--mode-action-edge); position: relative; }
[data-demo="diagnostic"] .dg-notif > i::after { content: "J"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 .95rem/1 var(--sans); color: var(--mode-on-action); }
[data-demo="diagnostic"] .dg-notif b { display: block; font-size: .78rem; font-weight: 600; color: #fff; letter-spacing: .02em; }
[data-demo="diagnostic"] .dg-notif span { display: block; margin-top: .15rem; color: #e6e6ea; font-size: .88rem; line-height: 1.4; }
[data-demo="diagnostic"] .dg-notif small { display: block; margin-top: .3rem; font: 500 .6rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #a8a8b0; }
[data-demo="diagnostic"].is-live .dg-step.is-on .dg-notif { animation: dgNotif .8s var(--ease) .9s both; }

[data-demo="diagnostic"] .dg-checks { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .45rem; }
[data-demo="diagnostic"] .dg-checks li { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .62rem .75rem; border-radius: 12px; border: 1px solid #ffffff12; background: #ffffff05; transition: opacity .45s var(--ease), transform .45s var(--ease); }
[data-demo="diagnostic"] .dg-checks li > i { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #ffffff38; }
[data-demo="diagnostic"] .dg-checks b { display: block; color: #fff; font-weight: 600; font-size: .9rem; line-height: 1.3; }
[data-demo="diagnostic"] .dg-checks span { display: block; margin-top: .1rem; color: #c4c4cc; font-size: .8rem; line-height: 1.4; }
[data-demo="diagnostic"] .dg-checks em { font-style: normal; font: 600 .6rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
[data-demo="diagnostic"] .dg-checks em s { text-decoration: none; display: none; color: var(--gold-soft); }
[data-demo="diagnostic"] .dg-checks em u { text-decoration: none; display: inline-block; padding: .38rem .55rem; border-radius: 999px; border: 1px solid #2f5c42; color: var(--dg-ok-t); }
[data-demo="diagnostic"] .dg-checks li[data-res="bad"] em u { border-color: #ff7a6b88; color: var(--dg-bad-t); background: #ff7a6b14; }
[data-demo="diagnostic"] .dg-checks li[data-res="ok"] > i { background: var(--dg-ok); border-color: transparent; }
[data-demo="diagnostic"] .dg-checks li[data-res="ok"] > i::after { content: ""; position: absolute; left: 7.5px; top: 4px; width: 5px; height: 10px; border: solid #062012; border-width: 0 2px 2px 0; transform: rotate(45deg); }
[data-demo="diagnostic"] .dg-checks li[data-res="bad"] > i { background: var(--dg-bad); border-color: transparent; }
[data-demo="diagnostic"] .dg-checks li[data-res="bad"] > i::before, [data-demo="diagnostic"] .dg-checks li[data-res="bad"] > i::after { content: ""; position: absolute; left: 10px; top: 5px; width: 2px; height: 12px; background: #2a0b07; border-radius: 1px; transform: rotate(45deg); }
[data-demo="diagnostic"] .dg-checks li[data-res="bad"] > i::before { transform: rotate(-45deg); }
[data-demo="diagnostic"] .dg-checks li[data-res="bad"] { border-color: #ff7a6b66; background: #ff7a6b10; }
[data-demo="diagnostic"] .dg-concl { margin: .9rem 0 0; padding: .8rem .95rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--gold-soft) 45%, transparent); background: color-mix(in srgb, var(--gold-soft) 8%, transparent); color: #f0f0f3; font-size: .9rem; line-height: 1.55; }
[data-demo="diagnostic"] .dg-concl b { color: var(--gold-soft); }
/* États animés (script seulement) */
[data-demo="diagnostic"].is-live .dg-checks li { opacity: .3; transform: translateX(8px); }
[data-demo="diagnostic"].is-live .dg-checks li:not(.is-done) > i { background: transparent; border-color: #ffffff38; }
[data-demo="diagnostic"].is-live .dg-checks li:not(.is-done) > i::before, [data-demo="diagnostic"].is-live .dg-checks li:not(.is-done) > i::after { display: none; }
[data-demo="diagnostic"].is-live .dg-checks li:not(.is-done) em u { display: none; }
[data-demo="diagnostic"].is-live .dg-checks li:not(.is-done)[data-res="bad"] { border-color: #ffffff12; background: #ffffff05; }
[data-demo="diagnostic"].is-live .dg-checks li.is-run, [data-demo="diagnostic"].is-live .dg-checks li.is-done { opacity: 1; transform: none; }
[data-demo="diagnostic"].is-live .dg-checks li.is-run > i { border-color: transparent; border-top-color: var(--gold-soft); border-right-color: var(--gold-soft); animation: dgSpin .8s linear infinite; }
[data-demo="diagnostic"].is-live .dg-checks li.is-run em s { display: inline; }
[data-demo="diagnostic"].is-live .dg-checks li.is-done > i { animation: dgPop .45s var(--ease); }
[data-demo="diagnostic"].is-live .dg-concl { opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-demo="diagnostic"].is-live .dg-step.is-concl .dg-concl { opacity: 1; transform: none; }

/* Dossier technicien */
[data-demo="diagnostic"] .dg-sheet { margin-top: .9rem; border-radius: 16px; overflow: hidden; border: 1px solid #ffffff1f; background: linear-gradient(180deg, #ffffff0d, #ffffff05); box-shadow: 0 20px 50px #0009, inset 0 1px 0 #ffffff14; }
[data-demo="diagnostic"] .dg-sheet header { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; padding: .85rem 1rem; border-bottom: 1px solid #ffffff14; background: #ffffff08; }
[data-demo="diagnostic"] .dg-sheet header b { font-weight: 650; font-size: .95rem; color: #fff; }
[data-demo="diagnostic"] .dg-sheet header small { font: 500 .6rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #a8a8b0; }
[data-demo="diagnostic"] .dg-sheet dl { margin: 0; padding: .35rem 1rem .4rem; }
[data-demo="diagnostic"] .dg-sheet dl div { display: grid; grid-template-columns: 7.2rem 1fr; gap: .7rem; padding: .48rem 0; border-bottom: 1px solid #ffffff0d; }
[data-demo="diagnostic"] .dg-sheet dl div:last-child { border-bottom: 0; }
[data-demo="diagnostic"] .dg-sheet dt { font: 500 .6rem/1.7 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #a8a8b0; }
[data-demo="diagnostic"] .dg-sheet dd { margin: 0; color: #ececf0; font-size: .84rem; line-height: 1.45; }
[data-demo="diagnostic"] .dg-sheet dl div:nth-child(4) dd { color: var(--gold-soft); font-weight: 600; }
[data-demo="diagnostic"] .dg-sheet footer { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem .85rem; border-top: 1px solid #ffffff14; }
[data-demo="diagnostic"] .dg-atts { display: flex; flex-wrap: wrap; gap: .35rem; }
[data-demo="diagnostic"] .dg-att { font: 500 .58rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: .38rem .5rem; border-radius: 6px; background: #ffffff0d; color: #c4c4cc; border: 1px solid #ffffff14; }
[data-demo="diagnostic"] .dg-att::before { content: "+ "; color: var(--gold-soft); }
[data-demo="diagnostic"] .dg-ready { font: 700 .62rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: .5rem .7rem; border-radius: 999px; background: var(--dg-ok); color: #062012; }
[data-demo="diagnostic"] .dg-after { color: #c9c9d0 !important; font-size: .88rem !important; }
[data-demo="diagnostic"].is-live .dg-sheet header, [data-demo="diagnostic"].is-live .dg-sheet dl div, [data-demo="diagnostic"].is-live .dg-sheet footer { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
[data-demo="diagnostic"].is-live .dg-sheet .is-in { opacity: 1; transform: none; }
[data-demo="diagnostic"].is-live .dg-ready { transform: scale(.6); opacity: 0; transition: transform .5s var(--ease), opacity .3s; }
[data-demo="diagnostic"].is-live .dg-sheet.is-ready .dg-ready { transform: none; opacity: 1; animation: dgStamp .7s var(--ease); }
[data-demo="diagnostic"].is-live .dg-after { opacity: 0; transition: opacity .6s; }
[data-demo="diagnostic"].is-live .dg-step.is-concl .dg-after { opacity: 1; }

/* Remise en service : accord, envoyé, vérifié */
[data-demo="diagnostic"] .dg-prop { margin-top: 1.1rem; padding: 1rem 1.05rem; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--mode-glow) 45%, transparent); background: color-mix(in srgb, var(--mode-glow) 7%, transparent); }
[data-demo="diagnostic"] .dg-approve {
  font: 600 .95rem/1 var(--sans); padding: 1rem 1.5rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--mode-action); color: var(--mode-on-action); box-shadow: var(--mode-action-edge); transition: transform .25s var(--ease), box-shadow .25s;
}
[data-demo="diagnostic"] .dg-approve:hover { transform: translateY(-1px) scale(1.02); box-shadow: var(--mode-action-edge), 0 10px 30px color-mix(in srgb, var(--mode-glow) 35%, transparent); }
[data-demo="diagnostic"].is-live .dg-prop.is-wait .dg-approve { animation: dgPulse 2.2s ease-in-out infinite; }
[data-demo="diagnostic"] .dg-wait { margin: .7rem 0 0; font: 500 .62rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-soft); }
[data-demo="diagnostic"] .dg-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
[data-demo="diagnostic"] .dg-flow li { display: flex; align-items: center; gap: .6rem; color: #d6d6dc; font-size: .88rem; line-height: 1.4; }
[data-demo="diagnostic"] .dg-flow li > i { flex: none; position: relative; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #ffffff38; }
[data-demo="diagnostic"] .dg-flow li.is-run > i { border-color: transparent; border-top-color: var(--gold-soft); border-right-color: var(--gold-soft); animation: dgSpin .8s linear infinite; }
[data-demo="diagnostic"] .dg-flow li.is-done > i { background: var(--dg-ok); border-color: transparent; }
[data-demo="diagnostic"] .dg-flow li.is-done > i::after { content: ""; position: absolute; left: 5px; top: 2.5px; width: 4px; height: 8px; border: solid #062012; border-width: 0 2px 2px 0; transform: rotate(45deg); }
[data-demo="diagnostic"] .dg-flow li[data-k="ok"].is-done { color: var(--dg-ok-t); font-weight: 700; font-size: 1rem; }
[data-demo="diagnostic"].is-live .dg-flow li { display: none; }
[data-demo="diagnostic"].is-live .dg-flow li.is-on { display: flex; animation: dgIn .5s var(--ease) both; }
[data-demo="diagnostic"] .dg-prop.is-sent .dg-approve, [data-demo="diagnostic"] .dg-prop.is-sent .dg-wait { display: none; }
[data-demo="diagnostic"] .dg-prop.is-sent { border-color: #ffffff1f; background: #ffffff06; }
[data-demo="diagnostic"] .dg-done { margin-top: .9rem; padding: .9rem 1rem; border-radius: 14px; border: 1px solid #2f5c42; background: #0b201633; box-shadow: 0 0 40px #4ade8014; }
[data-demo="diagnostic"] .dg-done b { display: flex; align-items: center; gap: .55rem; color: var(--dg-ok-t); font-weight: 650; font-size: 1rem; }
[data-demo="diagnostic"] .dg-done b::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dg-ok); box-shadow: 0 0 12px var(--dg-ok); }
[data-demo="diagnostic"] .dg-done span { display: block; margin-top: .3rem; color: #c9c9d0; font-size: .85rem; line-height: 1.5; }
[data-demo="diagnostic"].is-live .dg-done { display: none; }
[data-demo="diagnostic"].is-live .dg-step.is-verified .dg-done { display: block; animation: dgIn .7s var(--ease) both; }

/* Hors écran : toutes les animations continues s'arrêtent */
[data-demo="diagnostic"].is-paused *, [data-demo="diagnostic"].is-paused *::before, [data-demo="diagnostic"].is-paused *::after { animation-play-state: paused !important; }
@keyframes dgSpin { to { transform: rotate(360deg); } }
@keyframes dgPop { 0% { transform: scale(.5); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes dgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dgNotif { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes dgStamp { 0% { transform: scale(1.6) rotate(-6deg); opacity: 0; } 60% { transform: scale(.95) rotate(0); opacity: 1; } 100% { transform: none; } }
@keyframes dgPulse { 0%, 100% { box-shadow: var(--mode-action-edge), 0 0 0 0 color-mix(in srgb, var(--mode-glow) 45%, transparent); } 60% { box-shadow: var(--mode-action-edge), 0 0 0 12px transparent; } }
@keyframes dgGlow { 0%, 100% { fill-opacity: .7; } 50% { fill-opacity: 1.6; stroke-opacity: 1; } }
@keyframes dgBand { 0% { fill: #4ade8066; } 100% { fill: #4ade802a; } }
@keyframes dgBlink { 50% { opacity: .3; } }

/* ==========================================================================
   La mesure qui vit (seulement sous html.fx) : capteur en direct, tête de
   lecture, faisceau des preuves, causes biffées, dossier assemblé, retour
   dans la plage en temps réel.
   ========================================================================== */
[data-demo="diagnostic"] .dg-stage { position: relative; }
/* Capteur : chaque lecture fait battre le point rouge */
html.fx [data-demo="diagnostic"] .dg-hk i { animation: none; }
html.fx [data-demo="diagnostic"] .dg-hk.is-tick i { animation: dgTick 1s var(--ease); }
@keyframes dgTick { 0% { transform: scale(1.7); box-shadow: 0 0 0 0 #ff7a6b99, 0 0 12px var(--dg-bad); } 100% { transform: none; box-shadow: 0 0 0 9px transparent, 0 0 12px var(--dg-bad); } }
html.fx [data-demo="diagnostic"] .dg-dial :is(.dz-v, .dz-knob) { transition: stroke-dasharray 1.2s var(--ease), transform 1.2s var(--ease); }

/* Point « Maintenant » : il respire et affiche la dernière lecture */
[data-demo="diagnostic"] .dg-live { visibility: hidden; }
html.fx [data-demo="diagnostic"] .dg-live { visibility: visible; }
[data-demo="diagnostic"] .dg-live .c { fill: #fff; stroke: var(--dg-bad); stroke-width: 2.4; }
[data-demo="diagnostic"] .dg-live .r { fill: none; stroke: var(--dg-bad); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: dgLive 2s ease-out infinite; }
@keyframes dgLive { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(3.4); } }
[data-demo="diagnostic"] .dg-svg .dg-live text { fill: var(--dg-bad-t); font-weight: 600; letter-spacing: .02em; }
html.fx [data-demo="diagnostic"] .dg-svg:not(.is-verified) .dg-nowl { animation: dgNowl 2s ease-in-out infinite; }
@keyframes dgNowl { 50% { stroke-opacity: .45; } }

/* Tête de lecture : la courbe se trace sous un faisceau doré */
[data-demo="diagnostic"] .dg-pen { display: none; pointer-events: none; }
html.fx [data-demo="diagnostic"] .dg-svg.is-drawing .dg-pen { display: inline; }
[data-demo="diagnostic"] .dg-pen rect { fill: url(#dg-peng); }
[data-demo="diagnostic"] .dg-pen line { stroke: var(--gold-soft); stroke-width: 1.2; stroke-opacity: .8; }
html.fx [data-demo="diagnostic"] .dg-svg.is-drawing .dg-headdot .h { animation: dgHead 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes dgHead { 50% { transform: scale(1.5); opacity: .15; } }
/* Valeur portée par la tête pendant la vérification */
[data-demo="diagnostic"] .dg-svg .dg-headdot text { fill: var(--dg-bad-t); font-weight: 700; font-size: 11px; text-anchor: middle; transition: fill .4s; }
[data-demo="diagnostic"] .dg-svg .dg-headdot text.is-ok { fill: var(--dg-ok-t); }
html.fx [data-demo="diagnostic"] .dg-band { transition: fill .6s var(--ease); }
html.fx [data-demo="diagnostic"] .dg-svg.is-inband .dg-band { fill: #4ade8033; }
html.fx [data-demo="diagnostic"] .dg-svg.is-inband .dg-bandl { stroke: #4ade80aa; }

/* Faisceau des preuves (étape 3) */
[data-demo="diagnostic"] .dg-sweep { position: absolute; z-index: 1; display: none; overflow: hidden; pointer-events: none; }
html.fx [data-demo="diagnostic"].is-live .dg-sweep { display: block; }
[data-demo="diagnostic"] .dg-sweep i {
  position: absolute; inset: 0; transform: translateX(-100%); opacity: 0;
  background: linear-gradient(90deg, transparent 82%, color-mix(in srgb, var(--gold-soft) 14%, transparent) 97%, color-mix(in srgb, var(--gold-soft) 70%, transparent) 99.6%, transparent);
}
[data-demo="diagnostic"] .dg-sweep.is-on i { animation: dgSweep .95s cubic-bezier(.45, 0, .3, 1) both; }
@keyframes dgSweep { 0% { transform: translateX(-100%); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(0); opacity: 0; } }

/* Causes : biffées une à une, avec leur raison */
html.fx [data-demo="diagnostic"].is-live .dg-checks b { position: relative; width: fit-content; transition: color .5s; }
html.fx [data-demo="diagnostic"].is-live .dg-checks b::after {
  content: ""; position: absolute; left: -2px; right: -2px; top: 54%; height: 1.5px; border-radius: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .55s var(--ease) .1s;
}
html.fx [data-demo="diagnostic"].is-live .dg-checks li.is-done[data-res="ok"] b { color: #a8a8b0; }
html.fx [data-demo="diagnostic"].is-live .dg-checks li.is-done[data-res="ok"] b::after { transform: none; }
html.fx [data-demo="diagnostic"].is-live .dg-checks li span { clip-path: inset(0 100% 0 0); transition: clip-path .8s var(--ease) .2s; }
html.fx [data-demo="diagnostic"].is-live .dg-checks li.is-done span { clip-path: inset(0 0 0 0); }
html.fx [data-demo="diagnostic"].is-live .dg-checks li.is-done em u { animation: dgIn .45s var(--ease) .15s both; }
html.fx [data-demo="diagnostic"].is-live .dg-checks li.is-done[data-res="bad"] { animation: dgCulprit 1.4s var(--ease) both; }
@keyframes dgCulprit { 0% { box-shadow: 0 0 0 0 #ff7a6b66; } 40% { box-shadow: 0 0 0 5px #ff7a6b22, 0 0 30px #ff7a6b33; } 100% { box-shadow: 0 0 0 0 transparent, 0 0 18px #ff7a6b1f; } }

/* Dossier : la feuille se pose, chaque ligne s'écrit, chaque pièce jointe ajoute une page */
html.fx [data-demo="diagnostic"].is-live .dg-sheet {
  --pg: 0; margin-bottom: 12px;
  box-shadow:
    0 calc(var(--pg) * 4px) 0 calc(var(--pg) * -1.5px) #141416, 0 calc(var(--pg) * 4px + 1px) 0 calc(var(--pg) * -1.5px) #ffffff1c,
    0 calc(min(var(--pg), 2) * 4px) 0 calc(min(var(--pg), 2) * -1.5px) #111113, 0 calc(min(var(--pg), 2) * 4px + 1px) 0 calc(min(var(--pg), 2) * -1.5px) #ffffff16,
    0 calc(min(var(--pg), 1) * 4px) 0 calc(min(var(--pg), 1) * -1.5px) #0e0e10, 0 calc(min(var(--pg), 1) * 4px + 1px) 0 calc(min(var(--pg), 1) * -1.5px) #ffffff12,
    0 20px 50px #0009, inset 0 1px 0 #ffffff14;
  transition: box-shadow .5s var(--ease), opacity .6s var(--ease), transform .8s var(--ease);
}
html.fx [data-demo="diagnostic"].is-live .dg-sheet:not(.is-laid) { opacity: 0; transform: translateY(22px) rotate(-1.6deg) scale(.97); }
html.fx [data-demo="diagnostic"].is-live .dg-sheet dl div { position: relative; transform: translateX(16px); }
html.fx [data-demo="diagnostic"].is-live .dg-sheet dl div.is-in { transform: none; }
html.fx [data-demo="diagnostic"].is-live .dg-sheet dl div.is-in::after {
  content: ""; position: absolute; inset: 0 -1rem; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold-soft) 12%, transparent) 50%, transparent) no-repeat;
  background-size: 40% 100%; animation: dgWrite .9s var(--ease) both;
}
@keyframes dgWrite { from { background-position: -60% 0; } to { background-position: 160% 0; opacity: 0; } }
html.fx [data-demo="diagnostic"].is-live .dg-att { transition: opacity .35s, transform .5s var(--ease), border-color .5s, box-shadow .5s; }
html.fx [data-demo="diagnostic"].is-live .dg-att:not(.is-in) { opacity: 0; transform: translateY(-6px) scale(.9); }
html.fx [data-demo="diagnostic"].is-live .dg-att.is-in { animation: dgClip 1s var(--ease); }
@keyframes dgClip { 0% { border-color: var(--gold-soft); box-shadow: 0 0 16px color-mix(in srgb, var(--gold-soft) 45%, transparent); } 100% { border-color: #ffffff14; box-shadow: none; } }
[data-demo="diagnostic"] .dg-fly {
  position: absolute; z-index: 6; left: 0; top: 0; pointer-events: none; white-space: nowrap; will-change: transform, opacity;
  font: 500 .58rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: .38rem .5rem; border-radius: 6px;
  color: #fff; background: #0c0b09f2; border: 1px solid var(--gold-soft);
  box-shadow: 0 12px 30px #000c, 0 0 18px color-mix(in srgb, var(--gold-soft) 40%, transparent);
}
[data-demo="diagnostic"] .dg-fly::before { content: "+ "; color: var(--gold-soft); }

/* ---------- Réactif ---------- */
@media (max-width: 1080px) {
  [data-demo="diagnostic"] .dg-rail span { font-size: .76rem; }
}
@media (max-width: 880px) {
  [data-demo="diagnostic"] .dg-stage { grid-template-columns: 1fr; }
  [data-demo="diagnostic"] .dg-viz { border-right: 0; border-bottom: 1px solid var(--mode-line); }
}
@media (max-width: 640px) {
  [data-demo="diagnostic"] .dg-head { padding: .8rem; gap: .7rem; }
  [data-demo="diagnostic"] .dg-cases { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  [data-demo="diagnostic"] .dg-cases button { padding: .55rem .7rem; }
  [data-demo="diagnostic"] .dg-cases b { font-size: .88rem; }
  [data-demo="diagnostic"] .dg-ctrl { width: 100%; justify-content: space-between; }
  [data-demo="diagnostic"] .dg-ctrl [data-nav="play"] { flex: 1; }
  [data-demo="diagnostic"] .dg-rail { padding: .9rem .6rem .8rem; }
  [data-demo="diagnostic"] .dg-rail::before, [data-demo="diagnostic"] .dg-rail::after { top: calc(.9rem + 15px); left: calc(.6rem + 10%); right: calc(.6rem + 10%); }
  [data-demo="diagnostic"].is-live .dg-rail span { font-size: .68rem; opacity: 0; max-height: 0; padding: 0; overflow: hidden; }
  [data-demo="diagnostic"].is-live .dg-rail li.is-on span { opacity: 1; max-height: 3rem; padding-bottom: .4rem; overflow: visible; white-space: nowrap; }
  [data-demo="diagnostic"].is-live .dg-rail li:first-child.is-on button { justify-items: start; }
  [data-demo="diagnostic"].is-live .dg-rail li:last-child.is-on button { justify-items: end; }
  [data-demo="diagnostic"] .dg-viz { padding: 1rem .8rem .9rem; }
  [data-demo="diagnostic"] .dg-chart { min-height: 280px; }
  [data-demo="diagnostic"].is-live .dg-hero { inset: 1rem .8rem auto; min-height: 280px; }
  [data-demo="diagnostic"] .dg-panels { padding: 1.2rem 1.1rem 1.4rem; }
  [data-demo="diagnostic"] .dg-step h3 { font-size: 1.2rem; }
  [data-demo="diagnostic"] .dg-sheet dl div { grid-template-columns: 1fr; gap: .15rem; }
  [data-demo="diagnostic"] .dg-checks li { grid-template-columns: auto 1fr; }
  [data-demo="diagnostic"] .dg-checks em { grid-column: 2; justify-self: start; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-demo="diagnostic"] *, [data-demo="diagnostic"] *::before, [data-demo="diagnostic"] *::after { animation: none !important; transition: none !important; }
}

/* ---------- Sans JavaScript : le récit complet du premier cas, sur une colonne ---------- */
[data-demo="diagnostic"]:not(.is-live) .dg-stage { grid-template-columns: 1fr; }
[data-demo="diagnostic"]:not(.is-live) .dg-panels { max-width: 46rem; }
[data-demo="diagnostic"]:not(.is-live) .dg-approve, [data-demo="diagnostic"]:not(.is-live) .dg-wait { display: none; }
[data-demo="diagnostic"]:not(.is-live) .dg-flow li > i { background: var(--dg-ok); border-color: transparent; }

/* ==========================================================================
   Sous la démo : bibliothèque, boucle complète et santé des équipements.
   Tout est limité à .dgx. Cartes en verre noir, cadres en cristal doré.
   Sans JavaScript : toutes les fiches et toutes les étapes se lisent.
   ========================================================================== */
.dgx {
  --dgx-ok: #34d399; --dgx-warn: #fbbf24; --dgx-bad: #f87171; --dgx-ref: #9aa4b2; --dgx-halo: #0a0908;
  --dgx-font: "Jarvis Manrope", var(--sans);
  max-width: 76rem; margin: 0 auto; font-family: var(--dgx-font);
}
:root[data-mode="platinum"] .dgx, :root[data-mode="base"] .dgx { --dgx-halo: #0a0b0d; }
.dgx [data-off] { display: block; }
.dgx.is-live [data-off] { display: none !important; }
.dgx-sect { margin-top: 5rem; }
.dgx-head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: .6rem 4rem; align-items: end; margin-bottom: 1.8rem; }
.dgx-head .eyebrow { grid-column: 1 / -1; margin: 0; }
.dgx-head h3 { margin: 0; font: 650 clamp(1.5rem, 2.7vw, 2.15rem)/1.12 var(--dgx-font); letter-spacing: -.025em; color: #fff; }
.dgx-head h3 em { font-style: normal; background: var(--mode-display); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dgx-head > p { margin: 0; color: #b8b8c0; font-size: .97rem; line-height: 1.6; }
.dgx-note { margin: 1rem 0 0; font: 500 .68rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #8c8c94; }

/* Panneau commun : verre noir, cadre en cristal doré */
.dgl-body, .dgo-shell, .dgh-board {
  position: relative; isolation: isolate; border-radius: 22px;
  background: radial-gradient(120% 90% at 0% 0%, #17140f, #070707 58%); box-shadow: 0 30px 80px #000c, inset 0 1px 0 #ffffff14;
}
:root[data-mode="platinum"] :is(.dgl-body, .dgo-shell, .dgh-board) { background: radial-gradient(120% 90% at 0% 0%, #12161d, #070708 58%); }
:root[data-mode="base"] :is(.dgl-body, .dgo-shell, .dgh-board) { background: #0a0a0a; }
.dgl-body::after, .dgo-shell::after, .dgh-board::after {
  content: ""; position: absolute; inset: -4px; z-index: 5; pointer-events: none;
  border: 16px solid transparent; border-image: url("/media/modes/rim.png") 50 / 16px / 0 stretch; filter: var(--mode-rim-filter);
}
:root[data-mode="base"] :is(.dgl-body, .dgo-shell, .dgh-board)::after { inset: 0; border: 1px solid var(--mode-line); border-image: none; border-radius: 22px; filter: none; }

/* ---------- Courbes ---------- */
.dgx-svg { display: block; width: 100%; overflow: visible; font: 600 10.5px/1 var(--dgx-font); }
.dgx-svg text { fill: #9d9da6; }
.dgx-svg .halo { paint-order: stroke; stroke: var(--dgx-halo); stroke-width: 4px; stroke-linejoin: round; }
.dgx-grid line { stroke: #ffffff10; }
.dgx-grid .dgx-unit { fill: var(--gold-soft); font-size: 10px; letter-spacing: .08em; }
.dgx-band { fill: color-mix(in srgb, var(--dgx-ok) 11%, transparent); stroke: color-mix(in srgb, var(--dgx-ok) 30%, transparent); stroke-dasharray: 2 3; }
.dgx-anom { fill: color-mix(in srgb, var(--dgx-bad) 9%, transparent); }
.dgx-okz { fill: color-mix(in srgb, var(--dgx-ok) 9%, transparent); }
.dgx-thr { stroke: var(--dgx-bad); stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .85; }
.dgx-svg .dgx-thrt { fill: #ffb4ab; font-size: 10px; }
.dgx-ref { fill: none; stroke: var(--dgx-ref); stroke-width: 1.6; stroke-dasharray: 4 4; opacity: .8; }
.dgx-svg .dgx-refl { fill: #c4cad3; font-size: 10px; }
.dgx-line { fill: none; stroke: var(--gold-soft); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--mode-glow) 45%, transparent)); }
.dgx-line.is-bad { stroke: var(--dgx-bad); filter: drop-shadow(0 0 6px #f8717166); }
.dgx-line.is-ok { stroke: var(--dgx-ok); filter: drop-shadow(0 0 6px #34d39966); }
.dgx-area { fill: color-mix(in srgb, var(--gold-soft) 9%, transparent); }
.dgx-bar { fill: color-mix(in srgb, var(--gold-soft) 78%, #000); }
.dgx-bar.is-bad { fill: var(--dgx-bad); }
.dgx-bar.is-ok { fill: var(--dgx-ok); }
.dgx-dot .h { fill: var(--gold-soft); opacity: .18; }
.dgx-dot .c { fill: var(--gold-soft); stroke: #000; stroke-width: 1.4; }
.dgx-dot.is-bad .h, .dgx-dot.is-bad .c { fill: var(--dgx-bad); }
.dgx-dot.is-ok .h, .dgx-dot.is-ok .c { fill: var(--dgx-ok); }
.dgx-svg .dgx-dot text { fill: #fff; font-size: 11.5px; font-weight: 700; }
.dgx-mk { stroke-width: 1.2; stroke-dasharray: 3 3; }
.dgx-mk-test { stroke: var(--dgx-ref); } .dgx-mk-fix { stroke: var(--dgx-ok); }
.dgx-svg .dgx-mkt { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.dgx-svg .dgx-mkt-test { fill: #d6dbe2; } .dgx-svg .dgx-mkt-fix { fill: #a7f3d0; }
.fx .dgx-main.is-draw .dgx-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dgxDraw 1.1s var(--ease) forwards; }
.fx .dgx-main.is-draw .dgx-area { animation: dgxFade .9s .4s both; }
.fx .dgx-main.is-draw .dgx-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: dgxBar .6s var(--ease) both; }
.fx .dgx-dot.is-late { animation: dgxFade .4s 1s both; }
.fx .dgx-dot .h { animation: dgxBreath 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes dgxDraw { to { stroke-dashoffset: 0; } }
@keyframes dgxFade { from { opacity: 0; } }
@keyframes dgxBar { from { transform: scaleY(0); } }
@keyframes dgxBreath { 50% { transform: scale(1.5); opacity: .05; } }

/* ---------- 1. Bibliothèque ---------- */
.dgl-methods { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.dgl-methods li { display: grid; gap: .3rem; padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--mode-line); background: var(--mode-panel); box-shadow: var(--mode-spec); }
.dgl-methods b { font-size: .86rem; color: var(--gold-soft); }
.dgl-methods span { font-size: .82rem; line-height: 1.45; color: #b4b4bc; }
.dgl-filters { display: none; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.1rem; }
.dgx.is-live .dgl-filters { display: flex; }
.dgl-filters button, .dgh-tools button, .dgo-ctrl button {
  display: inline-flex; align-items: center; gap: .45rem; height: 2.3rem; padding: 0 .95rem; border-radius: 999px; cursor: pointer;
  border: 1px solid #ffffff24; background: #ffffff06; color: #d4d4da; font: 600 .8rem/1 var(--dgx-font); transition: background .25s, color .25s, border-color .25s;
}
.dgl-filters button small { font: 600 .66rem/1 var(--mono); color: #8e8e96; }
.dgl-filters button:hover, .dgh-tools button:hover, .dgo-ctrl button:hover { background: #ffffff10; color: #fff; }
.dgl-filters button[aria-pressed="true"], .dgh-tools button[aria-pressed="true"] { background: var(--mode-action); color: var(--mode-on-action); border-color: transparent; }
.dgl-filters button[aria-pressed="true"] small { color: inherit; opacity: .7; }
.dgl-body { display: block; padding: 10px; }
.dgx.is-live .dgl-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 10px; }
.dgl-list { display: none; list-style: none; margin: 0; padding: 8px; max-height: 760px; overflow: auto; border-radius: 16px; background: #00000059; scrollbar-width: thin; scrollbar-color: #ffffff22 transparent; }
.dgx.is-live .dgl-list { display: block; }
.dgl-list li + li { margin-top: 2px; }
.dgl-list button {
  position: relative; display: grid; gap: .22rem; width: 100%; text-align: left; padding: .62rem .8rem .66rem 1rem; border: 0; border-radius: 11px; cursor: pointer;
  background: transparent; color: #d0d0d6; font: inherit; transition: background .25s, color .25s;
}
.dgl-list button::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: transparent; transition: background .25s; }
.dgl-list button:hover { background: #ffffff0a; color: #fff; }
.dgl-list button[aria-pressed="true"] { background: #ffffff14; color: #fff; box-shadow: var(--mode-spec); }
.dgl-list button[aria-pressed="true"]::before { background: var(--mode-action); }
.dgl-list b { font-size: .93rem; font-weight: 650; letter-spacing: -.01em; }
.dgl-i-env { font: 600 .58rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--gold-soft); }
.dgl-i-m { font-size: .76rem; color: #96969e; }
.dgl-cards { min-width: 0; }
.dgl-card { padding: 1.4rem 1.5rem 1.3rem; border-radius: 16px; background: #00000047; }
.dgl-card + .dgl-card { margin-top: 10px; }
.fx .dgl-card.is-in { animation: dglIn .55s var(--ease) both; }
@keyframes dglIn { from { opacity: 0; transform: translateY(8px); } }
.dgl-card header { margin-bottom: .9rem; }
.dgl-env { margin: 0 0 .35rem; font: 600 .62rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.dgl-card h4 { margin: 0; font: 700 1.5rem/1.15 var(--dgx-font); letter-spacing: -.02em; color: #fff; }
.dgl-eq { margin: .3rem 0 0; color: #a4a4ac; font-size: .88rem; }
.dgl-chart { display: none; margin: 0 -.2rem 1rem; padding: .7rem .4rem .2rem; border-radius: 14px; background: #0000006b; box-shadow: inset 0 0 0 1px #ffffff0d; }
.dgx.is-live .dgl-chart { display: block; }
.dgl-spec { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: 14px; overflow: hidden; background: #ffffff10; }
.dgl-r { padding: .8rem .95rem .85rem; background: #0b0b0b; }
:root[data-mode="signature"] .dgl-r { background: #0c0b09; }
.dgl-r dt { margin-bottom: .3rem; font: 600 .6rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #8d8d95; }
.dgl-r dd { margin: 0; font-size: .88rem; line-height: 1.5; color: #e4e4e8; }
.dgl-r-sig dd { color: #ffc6bf; }
.dgl-r-res dd { color: #fff; font-weight: 600; }
.dgl-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; }
.dgl-tag { padding: .22rem .5rem; border-radius: 999px; font: 600 .62rem/1 var(--mono); letter-spacing: .08em; color: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--mode-glow) 40%, transparent); background: #00000066; }
.dgl-bon { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .8rem; margin-top: .9rem; padding: .8rem 1rem; border-radius: 12px; background: color-mix(in srgb, var(--mode-glow) 8%, #000); border: 1px solid color-mix(in srgb, var(--mode-glow) 28%, transparent); }
.dgl-bon-k { font: 600 .6rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--gold-soft); }
.dgl-bon b { color: #fff; font-size: .95rem; }
.dgl-bon span:last-child { color: #c8c8ce; font-size: .87rem; }

/* ---------- 2. La boucle complète ---------- */
.dgo-shell { padding: 10px; }
.dgo-top { display: none; align-items: center; justify-content: space-between; gap: .8rem 1rem; flex-wrap: wrap; padding: .6rem .7rem .9rem; }
.dgx.is-live .dgo-top { display: flex; }
.dgo-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: #ffffff08; border: 1px solid #ffffff12; }
.dgo-tabs button { display: grid; gap: .2rem; text-align: left; padding: .5rem .95rem .55rem; border: 0; border-radius: 12px; cursor: pointer; background: transparent; color: #c4c4cc; font: inherit; transition: background .3s, color .3s; }
.dgo-tabs button:hover { color: #fff; background: #ffffff0a; }
.dgo-tabs button[aria-pressed="true"] { background: #ffffff16; color: #fff; box-shadow: var(--mode-spec), 0 6px 18px #0006; }
.dgo-tabs small { font: 600 .56rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #a0a0a8; }
.dgo-tabs button[aria-pressed="true"] small { color: var(--gold-soft); }
.dgo-tabs b { font-size: .92rem; font-weight: 650; }
.dgo-ctrl { display: flex; gap: .45rem; }
.dgo-ctrl .off { display: none; }
.dgo-ctrl [aria-pressed="false"] .on { display: none; } .dgo-ctrl [aria-pressed="false"] .off { display: inline; }
.dgo-ctrl [data-lp="play"][aria-pressed="true"] { color: var(--gold-soft); border-color: color-mix(in srgb, var(--mode-glow) 55%, transparent); }
.dgo-ctrl .dg-pp { position: relative; width: 10px; height: 12px; }
.dgo-ctrl .dg-pp::before, .dgo-ctrl .dg-pp::after { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; border-radius: 1px; background: currentColor; }
.dgo-ctrl .dg-pp::before { left: 0; } .dgo-ctrl .dg-pp::after { right: 0; }
.dgo-ctrl [aria-pressed="false"] .dg-pp::before { width: 0; height: 0; background: none; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.dgo-ctrl [aria-pressed="false"] .dg-pp::after { display: none; }
.dgo-rail { --done: 0; position: relative; display: none; list-style: none; margin: 0 0 10px; padding: .9rem .6rem .8rem; grid-template-columns: repeat(8, minmax(0, 1fr)); border-radius: 16px; background: #00000059; }
.dgx.is-live .dgo-rail { display: grid; }
.dgo-rail::before, .dgo-rail::after { content: ""; position: absolute; top: calc(.9rem + 13px); left: 6.25%; right: 6.25%; height: 2px; border-radius: 2px; background: #ffffff1a; }
.dgo-rail::after { background: var(--mode-action); transform-origin: left; transform: scaleX(var(--done)); transition: transform .8s var(--ease); box-shadow: 0 0 12px color-mix(in srgb, var(--mode-glow) 50%, transparent); }
.dgo-rail li { position: relative; z-index: 1; display: flex; justify-content: center; }
.dgo-rail button { --p: 0; display: grid; justify-items: center; gap: .45rem; padding: 0 .2rem; border: 0; background: none; color: #9a9aa2; font: inherit; cursor: pointer; text-align: center; }
.dgo-rail i {
  position: relative; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 700 .74rem/1 var(--dgx-font); font-style: normal;
  background: #121212; border: 1px solid #ffffff2a; color: #b4b4bc; transition: background .3s, color .3s, border-color .3s;
}
.dgo-rail i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(var(--gold-soft) calc(var(--p) * 360deg), transparent 0); -webkit-mask: radial-gradient(circle, #0000 15px, #000 15.5px); mask: radial-gradient(circle, #0000 15px, #000 15.5px); opacity: 0; }
.dgo-rail li.is-on i::after { opacity: 1; }
.dgo-rail span { font-size: .74rem; font-weight: 600; line-height: 1.2; }
.dgo-rail li.is-done i { background: var(--mode-action); color: var(--mode-on-action); border-color: transparent; }
.dgo-rail li.is-on i { background: #000; color: #fff; border-color: var(--gold-soft); box-shadow: 0 0 16px color-mix(in srgb, var(--mode-glow) 55%, transparent); }
.dgo-rail li.is-on span, .dgo-rail li.is-done span { color: #fff; }
.dgo-case[hidden] { display: none; }
.dgo-case { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; }
.dgo-viz { display: grid; gap: 10px; align-content: start; min-width: 0; }
.dgo-media { position: relative; overflow: hidden; height: 170px; border-radius: 16px; background: #000; }
.dgo-media .dgx-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dgo-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #000000d9, #00000059 60%, #0000); pointer-events: none; }
.dgo-media-t { position: absolute; z-index: 2; left: 1.2rem; bottom: 1rem; display: grid; gap: .3rem; }
.dgo-media-t small { font: 600 .6rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.dgo-media-t b { font: 700 1.55rem/1.1 var(--dgx-font); letter-spacing: -.02em; color: #fff; }
.dgx-noph { display: grid; place-content: end; justify-items: end; gap: .45rem; padding: 1rem 1.2rem; background: radial-gradient(80% 120% at 85% 0%, #1a1712, #050505 70%); color: #86868e; }
:root[data-mode="platinum"] .dgx-noph, :root[data-mode="base"] .dgx-noph { background: radial-gradient(80% 120% at 85% 0%, #14171c, #050505 70%); }
.dgx-noph i { width: 22px; height: 18px; border: 1.5px solid color-mix(in srgb, var(--gold-soft) 60%, #000); border-radius: 4px; position: relative; }
.dgx-noph i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--gold-soft) 60%, #000); }
.dgx-noph small { font: 600 .6rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.dgo-chart { padding: .8rem .5rem .3rem; border-radius: 16px; background: #0000006b; box-shadow: inset 0 0 0 1px #ffffff0d; }
.dgx:not(.is-live) .dgo-chart { display: none; }
.dgo-panes { min-width: 0; padding: 1.3rem 1.4rem; border-radius: 16px; background: #00000059; }
.dgx:not(.is-live) .dgo-pane + .dgo-pane { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid #ffffff14; }
.dgo-k { margin: 0 0 .5rem; font: 600 .62rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.dgo-pane h4 { margin: 0 0 .6rem; font: 700 1.32rem/1.2 var(--dgx-font); letter-spacing: -.02em; color: #fff; }
.dgo-pane > p:not(.dgo-k) { margin: 0; color: #c4c4cc; font-size: .93rem; line-height: 1.6; }
.fx .dgo-pane.is-on > * { animation: dglIn .55s var(--ease) both; }
.fx .dgo-pane.is-on > :nth-child(2) { animation-delay: .06s; } .fx .dgo-pane.is-on > :nth-child(3) { animation-delay: .12s; } .fx .dgo-pane.is-on > :nth-child(4) { animation-delay: .2s; }
.dgo-mini { margin: 1rem 0 .5rem; font: 600 .6rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #8e8e96; }
.dgo-mini em { font-style: normal; margin-left: .4rem; padding: .18rem .45rem; border-radius: 999px; color: var(--dgx-warn); border: 1px solid #fbbf2455; }
/* Confiance */
.dgo-conf { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 1.2rem; align-items: start; margin-top: 1rem; }
.dgo-ring { position: relative; width: 132px; height: 132px; display: grid; place-content: center; text-align: center; }
.dgo-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.dgo-ring circle { fill: none; stroke-width: 9; }
.dgo-ring .t { stroke: #ffffff12; }
.dgo-ring .v { stroke: var(--dgx-ok); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--c)); filter: drop-shadow(0 0 8px #34d39977); }
.fx .dgo-pane.is-on .dgo-ring .v { animation: dgoRing 1.3s var(--ease) both; }
@keyframes dgoRing { from { stroke-dashoffset: 100; } }
.dgo-ring b { font: 750 2.3rem/1 var(--dgx-font); letter-spacing: -.03em; color: #fff; }
.dgo-ring small { margin-top: .25rem; font-size: .68rem; color: #a4a4ac; }
.dgo-conf .dgo-mini:first-child { margin-top: 0; }
.dgo-why, .dgo-alt { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.dgo-why li { position: relative; display: flex; justify-content: space-between; gap: .6rem; padding: .45rem .6rem .55rem; border-radius: 9px; background: #ffffff08; font-size: .82rem; overflow: hidden; }
.dgo-why li span { color: #c4c4cc; } .dgo-why li b { color: #fff; font-weight: 650; text-align: right; }
.dgo-why li i { position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--w) * 2.4%); background: var(--dgx-ok); }
.fx .dgo-pane.is-on .dgo-why li i { animation: dgoBar 1s .3s var(--ease) both; }
@keyframes dgoBar { from { width: 0; } }
.dgo-alt li { display: flex; justify-content: space-between; gap: .6rem; font-size: .82rem; color: #9a9aa2; }
.dgo-alt s { color: #b4b4bc; text-decoration-color: #f8717199; }
/* Bon de travail */
.dgo-wo { margin-top: .4rem; }
.dgo-wo-route { display: flex; align-items: center; gap: .4rem; margin-bottom: .9rem; }
.dgo-wo-route .n { padding: .35rem .65rem; border-radius: 999px; font: 650 .74rem/1 var(--dgx-font); white-space: nowrap; color: #fff; background: #ffffff10; border: 1px solid #ffffff1f; }
.dgo-wo-route .n:nth-child(3) { color: var(--gold-soft); border-color: color-mix(in srgb, var(--mode-glow) 45%, transparent); }
.dgo-wo-route .n:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dgo-wo-route .w { position: relative; flex: 1; min-width: 14px; height: 2px; border-radius: 2px; background: #ffffff1c; overflow: hidden; }
.dgo-wo-route .w i { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--mode-action); }
.fx .dgo-pane.is-on .dgo-wo-route .w i { animation: dgoWire .7s var(--ease) both; transform-origin: left; }
.fx .dgo-pane.is-on .dgo-wo-route .w + .n + .w i { animation-delay: .7s; }
@keyframes dgoWire { from { transform: scaleX(0); } }
.dgo-wo-card { border-radius: 14px; overflow: hidden; background: #0b0b0b; border: 1px solid #ffffff17; box-shadow: 0 16px 40px #0009; }
.dgo-wo-card header { display: grid; gap: .25rem; padding: .8rem 1rem; background: #ffffff08; border-bottom: 1px solid #ffffff12; }
.dgo-wo-card header b { color: #fff; font-size: .92rem; } .dgo-wo-card header small { color: var(--gold-soft); font-size: .74rem; }
.dgo-wo-card dl { margin: 0; padding: .3rem 1rem; }
.dgo-wo-card dl div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .8rem; padding: .48rem 0; border-bottom: 1px solid #ffffff0c; }
.dgo-wo-card dt { font: 600 .6rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #8e8e96; }
.dgo-wo-card dd { margin: 0; font-size: .84rem; line-height: 1.45; color: #e4e4e8; }
.dgo-wo-card footer { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; justify-content: space-between; padding: .7rem 1rem .8rem; }
.dgo-wo-card footer small { color: #9a9aa2; font-size: .74rem; }
.dgo-wo-ok { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .65rem; border-radius: 999px; font: 650 .74rem/1 var(--dgx-font); color: #a7f3d0; background: #34d3991a; border: 1px solid #34d39955; }
.dgo-wo-ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dgx-ok); box-shadow: 0 0 8px var(--dgx-ok); }
.fx .dgo-pane.is-on .dgo-wo-card { animation: dglIn .6s .9s var(--ease) both; }
.fx .dgo-pane.is-on .dgo-wo-ok { animation: dgxFade .4s 2.2s both; }
/* Rapport et coûts évités */
.dgo-rep { display: grid; gap: .2rem; }
.dgo-rep-dl { margin: .9rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: 12px; overflow: hidden; background: #ffffff10; }
.dgo-rep-dl div { padding: .6rem .8rem; background: #0b0b0b; }
.dgo-rep-dl dt { font: 600 .58rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #8e8e96; }
.dgo-rep-dl dd { margin: .2rem 0 0; font-size: .86rem; color: #fff; font-weight: 600; }
.dgo-cost ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.dgo-cost li { display: flex; justify-content: space-between; gap: 1rem; font-size: .84rem; color: #c4c4cc; padding-bottom: .35rem; border-bottom: 1px dashed #ffffff14; }
.dgo-cost li b { color: #fff; white-space: nowrap; }
.fx .dgo-pane.is-on .dgo-cost li { animation: dglIn .45s var(--ease) both; }
.fx .dgo-pane.is-on .dgo-cost li:nth-child(2) { animation-delay: .25s; } .fx .dgo-pane.is-on .dgo-cost li:nth-child(3) { animation-delay: .5s; }
.dgo-tot { display: flex; justify-content: space-between; align-items: baseline; margin: .7rem 0 0; }
.dgo-tot span { font-weight: 650; color: #fff; }
.dgo-tot b { font: 750 1.7rem/1 var(--dgx-font); letter-spacing: -.02em; color: var(--dgx-ok); font-variant-numeric: tabular-nums; }
.dgo-est { margin: .45rem 0 0; font-size: .72rem; line-height: 1.45; color: #8e8e96; }

/* ---------- 3. Santé des équipements ---------- */
.dgh-board { padding: 10px; }
.dgh-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; border-radius: 16px; overflow: hidden; background: #ffffff10; }
.dgh-kpi { display: grid; gap: .3rem; padding: 1rem 1.1rem; background: #090909; }
:root[data-mode="signature"] .dgh-kpi { background: #0b0a08; }
.dgh-kpi small { font: 600 .6rem/1.3 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: #8e8e96; }
.dgh-kpi b { font: 750 1.75rem/1 var(--dgx-font); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.dgh-kpi:nth-child(2) b { color: var(--dgx-bad); } .dgh-kpi:nth-child(3) b { color: var(--dgx-warn); } .dgh-kpi:nth-child(5) b { color: var(--dgx-ok); }
.dgh-kpi span { font-size: .76rem; color: #9a9aa2; }
.dgh-tools { display: none; align-items: center; gap: .45rem; padding: .9rem .4rem .6rem; }
.dgx.is-live .dgh-tools { display: flex; }
.dgh-tools > span { font: 600 .6rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #8e8e96; margin-right: .3rem; }
.dgh-tools button { height: 2rem; padding: 0 .8rem; font-size: .76rem; }
.dgh-wrap { border-radius: 16px; overflow: hidden; background: #00000059; }
.dgh-t { width: 100%; border-collapse: collapse; font-size: .86rem; }
.dgh-t thead th { padding: .75rem 1rem; text-align: left; font: 600 .6rem/1.3 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: #8e8e96; border-bottom: 1px solid #ffffff14; }
.dgh-t tbody tr { border-bottom: 1px solid #ffffff0b; transition: background .25s; }
.dgh-t tbody tr:hover { background: #ffffff07; }
.dgh-t tbody tr:last-child { border-bottom: 0; }
.dgh-t th[scope="row"], .dgh-t td { padding: .8rem 1rem; vertical-align: middle; text-align: left; font-weight: 400; }
.dgh-t th[scope="row"] b, .dgh-t td b { display: block; color: #fff; font-weight: 650; }
.dgh-t small { display: block; margin-top: .2rem; font-size: .76rem; color: #96969e; line-height: 1.4; }
.dgh-score { white-space: nowrap; }
.dgh-ring { --c: var(--dgx-ok); display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; vertical-align: middle;
  background: radial-gradient(circle, #0b0b0b 58%, transparent 59%), conic-gradient(var(--c) calc(var(--s) * 1%), #ffffff14 0); }
.dgh-t .dgh-ring b { display: inline; font-size: .9rem; font-weight: 750; font-variant-numeric: tabular-nums; }
tr.is-warn .dgh-ring { --c: var(--dgx-warn); } tr.is-bad .dgh-ring { --c: var(--dgx-bad); }
.dgh-spark { display: inline-block; vertical-align: middle; width: 86px; height: 30px; margin-left: .7rem; overflow: visible; }
.dgh-spark polyline { fill: none; stroke: var(--dgx-ok); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
tr.is-warn .dgh-spark polyline { stroke: var(--dgx-warn); } tr.is-bad .dgh-spark polyline { stroke: var(--dgx-bad); }
.dgh-badge { display: inline-block; padding: .25rem .55rem; border-radius: 999px; font: 600 .64rem/1 var(--mono); letter-spacing: .08em; white-space: nowrap; border: 1px solid; }
.dgh-badge[data-src="Mesure"] { color: var(--gold-soft); border-color: color-mix(in srgb, var(--mode-glow) 45%, transparent); background: #00000066; }
.dgh-badge[data-src="Fabricant"] { color: #c7d2fe; border-color: #818cf855; background: #818cf814; }
.dgh-badge[data-src="Calendrier"] { color: #d6dbe2; border-color: #9aa4b255; background: #9aa4b214; }
.dgh-badge[data-src="Règlement"] { color: #fecaca; border-color: #f8717155; background: #f8717114; }
.dgh-legend { list-style: none; margin: 0; padding: .9rem .5rem .3rem; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: .78rem; color: #9a9aa2; }
.dgh-legend li { display: flex; align-items: center; gap: .5rem; }

/* ---------- Largeurs ---------- */
@media (max-width: 1100px) {
  .dgo-case { grid-template-columns: minmax(0, 1fr); }
  .dgh-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dgh-kpi { grid-column: span 2; }
  .dgh-kpi:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 900px) {
  .dgx-head { grid-template-columns: minmax(0, 1fr); }
  .dgl-methods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgx.is-live .dgl-body { grid-template-columns: minmax(0, 1fr); }
  .dgx.is-live .dgl-list { display: flex; gap: 4px; max-height: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
  .dgl-list li { flex: 0 0 auto; scroll-snap-align: start; }
  .dgl-list li + li { margin-top: 0; }
  .dgl-list li[hidden] { display: none; }
  .dgl-list button { width: auto; min-width: 9.5rem; }
  .dgo-rail span { display: none; }
  .dgo-rail { padding: .7rem .4rem; }
  .dgo-rail::before, .dgo-rail::after { top: calc(.7rem + 13px); }
  /* Sur petit écran, le tableau devient une liste de fiches */
  .dgh-t thead { display: none; }
  .dgh-t, .dgh-t tbody { display: block; }
  .dgh-t tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; padding: .9rem 1rem; }
  .dgh-t th[scope="row"], .dgh-t td { padding: 0; }
  .dgh-t th[scope="row"] { grid-column: 1; grid-row: 1; }
  .dgh-t .dgh-score { grid-column: 2; grid-row: 1 / span 2; align-self: start; display: grid; justify-items: end; gap: .3rem; }
  .dgh-spark { margin-left: 0; width: 70px; height: 22px; }
  .dgh-t .dgh-rul, .dgh-t .dgh-next, .dgh-t .dgh-src { grid-column: 1; }
  .dgh-t .dgh-next b::before { content: "Prochain : "; color: #96969e; font-weight: 500; }
  .dgh-t .dgh-src { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
  .dgh-t .dgh-src small { margin: 0; }
}
@media (max-width: 600px) {
  .dgx-sect { margin-top: 3.4rem; }
  .dgl-methods { grid-template-columns: minmax(0, 1fr); }
  .dgl-spec { grid-template-columns: minmax(0, 1fr); }
  .dgl-card { padding: 1.1rem 1rem; }
  .dgl-card h4 { font-size: 1.3rem; }
  .dgo-tabs { display: flex; width: 100%; }
  .dgo-tabs button { flex: 1; padding: .45rem .55rem; }
  .dgo-tabs b { font-size: .8rem; line-height: 1.2; }
  .dgo-tabs small { display: none; }
  .dgo-panes { padding: 1.1rem 1rem; }
  .dgo-conf { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .dgo-wo-card dl div { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .dgo-wo-route .n { font-size: .68rem; padding: .3rem .5rem; }
  .dgo-media { height: 130px; }
  .dgo-rep-dl { grid-template-columns: minmax(0, 1fr); }
  .dgh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgh-kpi, .dgh-kpi:nth-child(n+4) { grid-column: span 1; }
  .dgh-kpi:last-child { grid-column: 1 / -1; }
  .dgh-kpi b { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dgx *, .dgx *::before, .dgx *::after { animation: none !important; transition: none !important; }
}
