/* Proposal A, Three.js variant. Loaded after verre.css: only what the WebGL hero adds. */
.gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; display: none; }
.hero.gl-on .gl { display: block; }
/* The CSS stack is only the fallback (and the layout anchor): hidden from the first paint while WebGL starts, so the old
   render never flashes; shown when WebGL is unavailable (.gl-off) or when motion is off / scripts did not run. */
.verre3d .hero:not(.gl-off) .iso { visibility: hidden; }
html.static .verre3d .hero .iso { visibility: visible; }
.gl-card { display: none; }
@media (min-width: 1000px) {
  html.motion .hero.gl-on .gl-card { display: grid; gap: 12px; position: absolute; z-index: 4; visibility: hidden;
    left: min(calc(69% + 76px), calc(100% - 330px - var(--pad))); top: 55%; width: 330px; border-radius: 26px; padding: 22px; }
}
.gl-card .eyebrow { color: var(--d-faint); }
.gl-card > b { font-size: 26px; font-weight: 600; letter-spacing: -.025em; margin-top: -6px; color: #fff; }
.gl-card ol { display: grid; gap: 10px; margin: 4px 0; }
.gl-card li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--d-muted); }
.gl-card li.ok { color: var(--d-text); font-weight: 500; }
.gl-card li i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.gl-card li.ok i { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.gl-card li i svg { width: 13px; height: 13px; }
.gl-card time { margin-left: auto; font: 400 12px var(--mono); color: var(--d-faint); }
.gl-card .badge { justify-self: start; font-size: 12.5px; }

/* ---------- the glass ribbon IS the timeline of « le trajet d'une facture ». It runs full-bleed in its own band between
   the heading and the five statuses, and replaces the rail's hairline: as it unrolls, its scalloped tip passes over each
   status, which lights up (pages/ruban.js sets .on). Without WebGL the generated image fills the band and every status
   is simply on. ---------- */
.ruban { position: relative; width: 100vw; margin-left: calc(50% - 50vw); height: clamp(150px, 17.4vw, 300px); margin-block: clamp(-30px, -1.6vw, -8px) clamp(-100px, -5.6vw, -48px); --dof: 1.95; overflow: hidden; pointer-events: none; }
.ruban img, .ruban canvas { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.ruban img { object-fit: cover; object-position: center 40%; mix-blend-mode: lighten; }
.ruban canvas { display: none; }
/* depth of field toward the end of the ribbon: the last stretch goes softly out of focus. The sharp canvas fades out to
   the right while a blurred copy of it (canvas.dof, redrawn by ruban.js each frame) fades in. --dof scales the blur. */
.ruban.gl-on canvas:not(.dof) { -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent), linear-gradient(90deg, #000 50%, transparent 84%); mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent), linear-gradient(90deg, #000 50%, transparent 84%); -webkit-mask-composite: source-in; mask-composite: intersect; }
.ruban canvas.dof { filter: blur(calc(var(--dof, 1) * 3.2px)); -webkit-mask-image: linear-gradient(90deg, transparent 50%, #000 84%); mask-image: linear-gradient(90deg, transparent 50%, #000 84%); }
.ruban.gl-on canvas { display: block; }
.ruban.gl-on img { display: none; }
@media (min-width: 901px) {
  /* the ribbon replaces the line; each status hangs from it by a short thread */
  .verre3d .rail { padding-top: 0; }
  .verre3d .rail::before, .verre3d .rail::after { display: none; }
  /* the dimming lives on the children: the li itself is revealed by GSAP, and a CSS transition there would fight it */
  .verre3d .rail li { padding-top: 54px; }
  .verre3d .rail li > * { transition: opacity .5s var(--ease-out); }
  .verre3d .rail li::before { left: 14px; top: 0; width: 1px; height: 42px; border: 0; border-radius: 0; background: linear-gradient(transparent, var(--mint)); transform-origin: bottom; transition: scale .6s var(--ease-out), opacity .4s; }
  .verre3d .rail li::after { content: ""; position: absolute; left: 10.5px; top: 38px; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px rgba(126,243,181,.8); transition: scale .5s var(--ease-out); }
  .ruban.gl-on ~ .rail li:not(.on) > * { opacity: .28; }
  .ruban.gl-on ~ .rail li:not(.on)::before { scale: 1 0; opacity: 0; }
  .ruban.gl-on ~ .rail li:not(.on)::after { scale: 0; }
}

/* ---------- review aid: live tweak panel for the ribbon shader (pages/ruban.js). Remove with the A/B/C switcher. ---------- */
.tweak { position: fixed; right: 16px; bottom: 16px; z-index: 90; font: 400 12px/1.3 var(--font); color: var(--d-text); }
.tweak-toggle { display: block; margin-left: auto; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(17,29,23,.92); border: 1px solid rgba(255,255,255,.16); color: #fff; font: 500 13px var(--font); cursor: pointer; }
.tweak-toggle:hover { border-color: var(--mint); }
.tweak-body { width: 300px; max-height: min(74vh, 720px); overflow: auto; margin-bottom: 8px; padding: 14px 14px 12px; border-radius: 18px; background: rgba(13,22,18,.94); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); overscroll-behavior: contain; }
.tweak-body[hidden] { display: none; }
.tweak h3 { font: 400 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mint); margin: 12px 0 8px; }
.tweak h3:first-child { margin-top: 0; }
.tweak label { display: grid; grid-template-columns: 1fr 44px; gap: 2px 8px; align-items: center; margin-bottom: 7px; color: var(--d-muted); }
.tweak label output { font-family: var(--mono); font-size: 11px; color: #fff; text-align: right; }
.tweak input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--mint); height: 16px; margin: 0; }
.tweak-actions { display: flex; gap: 8px; margin-top: 12px; }
.tweak-actions button { flex: 1; height: 32px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; font: 500 12px var(--font); cursor: pointer; }
.tweak-actions button:hover { border-color: var(--mint); }
.tweak textarea { width: 100%; height: 0; padding: 0; border: 0; opacity: 0; position: absolute; }
@media (max-width: 700px) { .tweak { bottom: 68px; } }
