/* Espace Courtiers — film de présentation, palette pâle et pastel.
   Décisions produit : docs/DECISIONS.md.
   Couleurs : la base (papier crème, encre prune) ne bouge pas ; --soft, --accent,
   --deep et --b1..--b3 suivent le chapitre en cours (film.js les anime). Chaque
   produit garde aussi ses propres tons fixes, tirés de sa vraie couleur de marque
   (--lc-* pêche, --tb-* sarcelle, --md-* bleu Québec) pour ses objets.
   Les particules (assets/js/stage/) se dessinent sous la scène, sur le papier. */

@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  --paper: #faf6ef;
  --sheet: #fffdf9;
  --ink: #2e2530;
  --muted: #6b5f6b;
  --line: rgba(46, 37, 48, 0.12);

  /* Live tones: start on the opening's lilac, then follow the chapters. */
  --soft: #e6dff5;
  --accent: #7a62c9;
  --deep: #6a4fbf;
  --b1: #dcd0f7;
  --b2: #fbdccb;
  --b3: #cfe2fa;

  /* Fixed product tones: each product's REAL brand colour, made pastel for the
     washes (Marco 2026-11-26). Soft = wash, accent = fills and marks,
     deep = text and buttons (AA on cream).
     LeClasseur = peach, Trombone = teal, Mots-Dits = Québec blue. */
  --lc-soft: #f8dbc4;
  --lc-accent: #f0b894;
  --lc-strong: #c97f4a;
  --lc-deep: #a4532a;
  --tb-soft: #cfe6e6;
  --tb-accent: #1c7a87;
  --tb-deep: #146874;
  --tb-ivory: #f6f3ee;
  --tb-card: #fffefb;
  --tb-ink: #2b2620;
  --md-soft: #d6e3f3;
  --md-accent: #8fb4d9;
  --md-strong: #3e6fa0;
  --md-deep: #0c45a1;
  --ec-soft: #e6dff5;
  --ec-accent: #7a62c9;
  --ec-deep: #6a4fbf;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --shadow-paper: 0 1px 2px rgba(46, 37, 48, 0.06), 0 12px 24px -10px rgba(46, 37, 48, 0.18), 0 32px 64px -32px rgba(46, 37, 48, 0.24);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: 7vw;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; font-family: var(--sans); font-size: 1rem; line-height: 1.5; }
a { color: inherit; }
p { margin: 0; }

/* The film owns the screen: the page never scrolls, a gesture plays the next step. */
.js body { height: 100svh; overflow: hidden; overscroll-behavior: none; }
.js:not(.isReady) .story,
.js:not(.isReady) .scene,
.js:not(.isReady) [data-chrome] { opacity: 0; }

/* ---------- Backdrop ---------- */

.aura { position: fixed; inset: -12vmax; z-index: 0; pointer-events: none; }
.aura__blob { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, var(--c), transparent); }
.aura__blob--1 { --c: var(--b1); width: 78vmax; height: 78vmax; left: 42%; top: 0%; }
.aura__blob--2 { --c: var(--b2); width: 62vmax; height: 62vmax; left: 2%; top: 38%; }
.aura__blob--3 { --c: var(--b3); width: 56vmax; height: 56vmax; left: 62%; top: 52%; }
.glow { position: fixed; left: 0; top: 0; z-index: 0; width: 38vmax; height: 38vmax; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, var(--soft), transparent); opacity: 0; }
.hasPointer .glow { opacity: 0.85; }
.dots {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(rgba(46, 37, 48, 0.11) 1px, transparent 1.3px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 85%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 85%);
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .14 0 0 0 0 .19 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Chrome ---------- */

.nav { position: fixed; inset: 0 0 auto; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem var(--gutter); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__logo { display: block; width: auto; height: 3rem; }
.navLinks { display: flex; gap: 0.25rem; padding: 0.3rem; border-radius: 999px; background: rgba(255, 253, 249, 0.6); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.navLinks a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.95rem; border-radius: 999px; font: 500 0.9rem/1 var(--sans); color: var(--muted); text-decoration: none; transition: background 0.3s, color 0.3s, box-shadow 0.3s; }
.navLinks a::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--dot, transparent); }
.navLinks a.navLinks__plain::before { display: none; }
.navLinks a:hover { color: var(--ink); }
.navLinks a[aria-current] { background: var(--sheet); color: var(--ink); box-shadow: 0 6px 14px -8px rgba(46, 37, 48, 0.35); }
.navLinks a:focus-visible, .brand:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; }

.progress { position: fixed; left: var(--gutter); bottom: 2.2rem; z-index: 10; display: flex; align-items: center; gap: 1rem; font: 500 0.74rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.progress__count { color: var(--ink); }
.progress__bar { width: 6.5rem; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress__bar i { display: block; height: 100%; background: var(--deep); transform-origin: left; transform: scaleX(0); }

.hint { position: fixed; right: var(--gutter); bottom: 2rem; z-index: 10; display: flex; align-items: center; gap: 0.7rem; font: 500 0.74rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); transition: opacity 0.6s; }
.hint i { position: relative; width: 1.1rem; height: 1.7rem; border: 1.5px solid currentColor; border-radius: 1rem; }
.hint i::after { content: ""; position: absolute; left: 50%; top: 0.3rem; width: 2px; height: 0.35rem; margin-left: -1px; border-radius: 2px; background: currentColor; animation: hint 1.8s var(--ease-out) infinite; }
@keyframes hint { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(0.5rem); opacity: 0; } 100% { opacity: 0; } }
.hasMoved .hint { opacity: 0 !important; }

/* ---------- Copy ---------- */

.story { position: relative; z-index: 3; }
.js .story { position: fixed; inset: 0; pointer-events: none; }
.chapter { display: flex; align-items: center; padding: 0 var(--gutter); }
.js .chapter { position: absolute; inset: 0; }
.chapter[data-side="right"] { justify-content: flex-end; }
.copy { width: min(33rem, 40vw); pointer-events: auto; }
.copy--hero { width: min(40rem, 45vw); }

.kicker { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.5rem; font: 500 0.78rem/1 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--deep); }
.kicker__num { display: inline-grid; place-items: center; min-width: 2.2rem; height: 1.6rem; padding: 0 0.5rem; border-radius: 999px; background: var(--soft); }

/* SplitText wraps each word in a clipping mask for the rise: give italic
   overhangs (the hook of a "j") and descenders room inside it, without
   changing the spacing. */
.w-mask { padding: 0.04em 0.16em 0.22em; margin: -0.04em -0.16em -0.22em; }
.hero, .name, .title { text-wrap: balance; }
.lead, .body { text-wrap: pretty; }
.hero { margin: 0; font: 500 clamp(3.1rem, 6.8vw, 6.6rem)/0.96 var(--serif); letter-spacing: -0.028em; }
.hero em, .title em { font-style: italic; color: var(--deep); }
.hero--end { font-size: clamp(2.8rem, 5.6vw, 5.4rem); }
.name { margin: 0; font: 600 clamp(3rem, 6.2vw, 6rem)/0.95 var(--serif); letter-spacing: -0.035em; color: var(--deep); }
.title { margin-top: 1.1rem; font: 500 clamp(1.4rem, 2.15vw, 2.05rem)/1.16 var(--serif); letter-spacing: -0.01em; }
.lead, .body { margin-top: 1.5rem; max-width: 30rem; font: 400 clamp(1.02rem, 1.25vw, 1.2rem)/1.6 var(--sans); color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.1rem; margin-top: 2.1rem; }
.button { display: inline-flex; align-items: center; gap: 0.65rem; padding: 0.95rem 1.45rem; border-radius: 999px; background: var(--deep); color: var(--paper); font: 600 1rem/1 var(--sans); text-decoration: none; box-shadow: 0 16px 30px -16px var(--deep); transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out); }
.button svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease-out); }
.button:hover { transform: translateY(-2px); box-shadow: 0 22px 38px -16px var(--deep); }
.button:hover svg { transform: translateX(3px); }
.button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.chip { padding: 0.5rem 0.8rem; border-radius: 999px; border: 1px dashed var(--accent); background: rgba(255, 253, 249, 0.55); font: 500 0.72rem/1 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--deep); }

.links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.links a { display: inline-flex; align-items: center; gap: 0.5rem; font: 500 0.95rem/1 var(--sans); color: var(--ink); text-decoration: none; }
.links a::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--dot); }
.links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.legal { margin-top: 2.4rem; font: 500 0.72rem/1.4 var(--mono); letter-spacing: 0.05em; color: var(--muted); }
.legal a { color: var(--deep); }

/* ---------- Scene ---------- */

.scene { position: fixed; inset: 0; z-index: 2; pointer-events: none; font-size: clamp(11px, min(1.08vw, 1.72vh), 16px); }
.no-js .scene { display: none; }
/* The particle layer (assets/js/stage/): under the scene objects and the copy. */
.stage { position: fixed; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1s var(--ease-out); }
.stage.isOn { opacity: 1; }
.no-js .stage { display: none; }
.slot { position: absolute; top: 9vh; bottom: 6vh; display: grid; place-items: center; }
.slot--left { left: 3vw; width: 46vw; }
.slot--right, .slot--chaos { left: 51vw; width: 46vw; }
/* The chaos flies over the folder into its rows, so it is drawn on top. */
.slot--chaos { z-index: 1; }
.chaos { position: absolute; inset: 0; }

/* Chaos sheets: outer = moved by the film, float = idle drift, body = pointer parallax. */
.sheet { --w: 9.6em; --h: 12.4em; position: absolute; left: calc(var(--px) - var(--w) / 2); top: calc(var(--py) - var(--h) / 2); width: var(--w); height: var(--h); }
.sheet--photo { --w: 12.4em; --h: 8.2em; }
.sheet__float, .sheet__body { width: 100%; height: 100%; }
.sheet__body { position: relative; display: flex; flex-direction: column; gap: 0.55em; padding: 0.8em 0.75em; overflow: hidden; border-radius: 0.45em; background: var(--sheet); border: 1px solid rgba(46, 37, 48, 0.06); box-shadow: var(--shadow-paper); }
.sheet__name { font: 500 0.66em/1.2 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__title { flex: none; width: 62%; height: 0.55em; border-radius: 2px; background: rgba(46, 37, 48, 0.22); }
.sheet__lines { flex: 1; background: repeating-linear-gradient(to bottom, rgba(46, 37, 48, 0.1) 0 0.28em, transparent 0.28em 0.75em); -webkit-mask-image: linear-gradient(to right, #000 72%, transparent); mask-image: linear-gradient(to right, #000 72%, transparent); }
.sheet__grid { flex: 1; border: 1px solid rgba(46, 37, 48, 0.13); border-radius: 2px; background-image: linear-gradient(rgba(46, 37, 48, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(46, 37, 48, 0.12) 1px, transparent 1px); background-size: 33.4% 1.5em; }
.sheet__table { flex: 1; background:
  linear-gradient(90deg, transparent 68%, rgba(46, 37, 48, 0.05) 68%),
  repeating-linear-gradient(to bottom, rgba(46, 37, 48, 0.1) 0 1px, transparent 1px 1.05em); }
.sheet--photo .sheet__body { padding: 0.5em; gap: 0.45em; background: #fff; }
.sheet__img { position: relative; flex: 1; border-radius: 0.3em; background: linear-gradient(135deg, #f8d6c0, #dcd3f4 60%, #cfe3f7); }
.sheet__img::before { content: ""; position: absolute; left: 8%; top: 18%; width: 26%; aspect-ratio: 0.8; border-radius: 0.3em; background: rgba(255, 255, 255, 0.7); }
.sheet__img::after { content: ""; position: absolute; left: 42%; right: 10%; top: 24%; height: 44%; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.75) 0 0.3em, transparent 0.3em 0.75em); }
.sheet__pages { position: absolute; right: 0.6em; bottom: 0.6em; padding: 0.3em 0.5em; border-radius: 999px; background: var(--ec-soft); font: 500 0.6em/1 var(--mono); color: var(--ec-deep); }

/* LeClasseur: the folder. */
.folder { position: relative; width: 30em; margin-top: 2.2em; }
.folder__tab { position: absolute; left: 1.5em; top: -2.3em; display: flex; align-items: center; height: 2.5em; padding: 0 1.1em; border-radius: 0.9em 0.9em 0 0; background: var(--lc-soft); font: 500 0.78em/1 var(--mono); color: var(--lc-deep); }
.folder__card { position: relative; padding: 1.5em 1.4em 1.35em; border-radius: 1.4em; background: linear-gradient(180deg, #fff7f0, var(--sheet) 40%); border: 1px solid rgba(164, 83, 42, 0.16); box-shadow: 0 2px 4px rgba(164, 83, 42, 0.06), 0 44px 90px -40px rgba(164, 83, 42, 0.5); }
.folder__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.1em; }
.folder__client { font: 500 1.55em/1 var(--serif); letter-spacing: -0.01em; }
.folder__count { font: 500 0.78em/1 var(--mono); color: var(--muted); }
.folder__count b { font-weight: 600; color: var(--lc-deep); }
.folder__rows { display: grid; gap: 0.5em; margin: 0; padding: 0; list-style: none; }
.row { display: grid; grid-template-columns: 2.2em 1fr auto; align-items: center; gap: 0.8em; padding: 0.5em 0.65em 0.5em 0.5em; border-radius: 0.8em; background: #fff; border: 1px solid rgba(46, 37, 48, 0.08); box-shadow: 0 6px 14px -10px rgba(46, 37, 48, 0.3); }
.row__ic { display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 0.55em; background: var(--lc-soft); }
.row__ic::before { content: ""; width: 0.95em; height: 1.2em; border-radius: 2px; background: #fff repeating-linear-gradient(to bottom, transparent 0 0.25em, rgba(164, 83, 42, 0.35) 0.25em 0.33em); background-clip: content-box; padding: 0.12em 0.16em; box-shadow: 0 1px 2px rgba(164, 83, 42, 0.35); }
.row__name { font: 500 0.95em/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__tag { padding: 0.42em 0.6em; border-radius: 999px; background: var(--lc-soft); font: 500 0.68em/1 var(--mono); letter-spacing: 0.04em; color: var(--lc-deep); }
.row--missing { background: rgba(255, 253, 249, 0.5); border: 1.5px dashed rgba(164, 83, 42, 0.5); box-shadow: none; animation: missing 2.4s ease-in-out infinite; }
.row--missing .row__ic { background: transparent; border: 1.5px dashed rgba(164, 83, 42, 0.5); }
.row--missing .row__ic::before { content: "?"; width: auto; height: auto; padding: 0; background: none; box-shadow: none; font: 600 1em/1 var(--serif); color: var(--lc-deep); }
.row--missing .row__name { color: var(--lc-deep); }
.row--missing .row__tag { background: var(--lc-deep); color: #fff; }
@keyframes missing { 50% { border-color: rgba(164, 83, 42, 0.95); background: rgba(251, 217, 194, 0.35); } }
.folder__meter { height: 0.4em; margin-top: 1.15em; border-radius: 1em; background: rgba(164, 83, 42, 0.12); overflow: hidden; }
.folder__meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lc-strong), var(--lc-accent)); transform-origin: left; transform: scaleX(0); }

/* Trombone: its work table. The whole folder is open on a free ivory canvas,
   each PDF is an upright card (drawn in this site's language, not a screenshot).
   The film fades the chrome (bg, ribbon, side, dock) in around the cards, which
   fly in from the folder, so the cards are never inside a fading parent. */
.bench { --line-tb: rgba(20, 104, 116, 0.16); --hair: rgba(43, 38, 32, 0.09); position: relative; font-size: min(1.1em, 1.07vw); display: grid; grid-template: "ribbon ribbon" 3.2em "side table" 1fr / 8.8em 1fr; width: 42em; height: 31em; color: var(--tb-ink); }
.bench__bg { position: absolute; inset: 0; border-radius: 1.2em; background: var(--tb-ivory) radial-gradient(rgba(43, 38, 32, 0.07) 1px, transparent 1.2px) 0 0 / 1.1em 1.1em; border: 1px solid var(--line-tb); box-shadow: 0 2px 4px rgba(20, 104, 116, 0.06), 0 44px 90px -40px rgba(20, 104, 116, 0.5); }
.bench__ribbon { grid-area: ribbon; position: relative; display: flex; align-items: center; gap: 0.75em; min-width: 0; padding: 0 0.9em; border-radius: 1.2em 1.2em 0 0; background: rgba(255, 254, 251, 0.85); border-bottom: 1px solid var(--hair); white-space: nowrap; }
.bench__brand { display: flex; align-items: center; gap: 0.35em; font: 600 0.74em/1 var(--sans); color: var(--tb-deep); }
.bench__brand svg { width: 0.62em; height: 1.55em; fill: none; stroke: var(--tb-accent); stroke-width: 3; stroke-linecap: round; }
.bench__group { display: flex; align-items: center; gap: 0.15em; padding: 0.25em 0.3em; border-radius: 0.55em; border: 1px solid var(--hair); background: rgba(246, 243, 238, 0.6); }
.bench__group b { margin-right: 0.3em; padding-right: 0.45em; border-right: 1px solid var(--hair); font: 600 0.48em/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.bench__tool { padding: 0.4em 0.45em; border-radius: 0.45em; font: 500 0.58em/1 var(--sans); color: var(--tb-ink); }
.bench__tool--sign { position: relative; }
.bench__tool--on { background: var(--tb-soft); color: var(--tb-deep); box-shadow: inset 0 0 0 1px rgba(20, 104, 116, 0.3); }
.bench__count { margin-left: auto; font: 500 0.6em/1 var(--sans); color: var(--muted); }
.bench__count b { font-weight: 600; color: var(--tb-ink); }
.bench__zoom { padding: 0.35em 0.5em; border-radius: 0.45em; border: 1px solid var(--hair); font: 500 0.56em/1 var(--mono); color: var(--tb-ink); }
.bench__side { grid-area: side; position: relative; display: flex; flex-direction: column; gap: 0.2em; min-width: 0; padding: 0.9em 0.7em; border-radius: 0 0 0 1.2em; background: rgba(255, 254, 251, 0.6); border-right: 1px solid var(--hair); }
.bench__h { margin-bottom: 0.4em; font: 600 0.74em/1 var(--sans); }
.bench__k { margin: 0.6em 0 0.15em; font: 600 0.46em/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.bench__dir { display: flex; align-items: center; gap: 0.45em; padding: 0.42em 0.45em; border-radius: 0.4em; font: 500 0.6em/1.1 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bench__dir--on { background: var(--tb-soft); color: var(--tb-deep); font-weight: 600; }
.bench__dir--folder::before { content: ""; flex: none; width: 1.1em; height: 0.85em; border-radius: 0.12em 0.3em 0.15em 0.15em; background: linear-gradient(var(--tb-accent), var(--tb-accent)) 0 0 / 45% 0.22em no-repeat, rgba(28, 122, 135, 0.35); }
.bench__search { margin: 0.5em 0 0.1em; padding: 0.55em 0.5em; border-radius: 0.45em; border: 1px solid var(--hair); background: var(--tb-card); font: 500 0.56em/1 var(--sans); color: var(--muted); white-space: nowrap; overflow: hidden; }
.bench__local { display: flex; align-items: center; gap: 0.45em; margin-top: auto; font: 500 0.5em/1.2 var(--sans); color: var(--muted); }
.bench__local::before { content: ""; flex: none; width: 0.7em; height: 0.7em; border-radius: 50%; background: var(--tb-accent); }
.bench__table { grid-area: table; position: relative; }

/* A document card: header (PDF icon, name, page count, grip, chevron) over its first page. */
.tcard { --w: 7.55; --g: 0.6; --ph: calc((var(--w) - 0.8) * 1.294em); position: absolute; left: calc((var(--g) + var(--c) * (var(--w) + var(--g))) * 1em); top: calc(1em + var(--r) * (var(--ph) + 2.5em + var(--g) * 1em)); width: calc(var(--w) * 1em); border-radius: 0.55em; background: var(--tb-card); border: 1px solid rgba(43, 38, 32, 0.1); box-shadow: 0 1px 2px rgba(43, 38, 32, 0.06), 0 14px 26px -16px rgba(43, 38, 32, 0.35); }
.tcard__head { display: flex; align-items: center; gap: 0.32em; height: 1.95em; padding: 0 0.45em; }
.tcard__pdf { flex: none; width: 0.62em; height: 0.8em; border: 0.1em solid #d6453d; border-radius: 0.1em 0.25em 0.1em 0.1em; }
.tcard__name { flex: 1; min-width: 0; font: 600 0.7em/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard__n { flex: none; font: 500 0.58em/1 var(--sans); color: var(--muted); }
.tcard__grip { display: none; flex: none; width: 0.42em; height: 0.66em; background: radial-gradient(circle, rgba(43, 38, 32, 0.5) 0.06em, transparent 0.075em) 0 0 / 0.21em 0.22em; }
.tcard__chev { flex: none; width: 0.36em; height: 0.36em; margin: 0 0.12em 0 0.05em; border-right: 0.1em solid var(--tb-ink); border-bottom: 0.1em solid var(--tb-ink); transform: rotate(-45deg); }
.tcard__page { position: relative; height: var(--ph); margin: 0 0.4em 0.4em; background-color: #fff; box-shadow: 0 0 0 1px rgba(43, 38, 32, 0.08), 0 1px 3px rgba(43, 38, 32, 0.08); }
.tcard--stack .tcard__page { box-shadow: 0 0 0 1px rgba(43, 38, 32, 0.08), 0.2em 0.2em 0 0 #fbfaf7, 0.2em 0.2em 0 1px rgba(43, 38, 32, 0.1), 0.4em 0.4em 0 0 #f6f4ef, 0.4em 0.4em 0 1px rgba(43, 38, 32, 0.08); }
.tcard__badge { position: absolute; right: 0.4em; bottom: 0.4em; padding: 0.32em 0.45em; border-radius: 0.35em; background: rgba(43, 38, 32, 0.74); color: #fff; font: 500 0.52em/1 var(--sans); white-space: nowrap; }

/* Page faces (stylised scans). */
.tcard__page--id, .tcard__page--pay, .tcard__page--form, .tcard__page--table, .tcard__page--letter, .tcard__page--notice, .tcard__page--contract { background-color: #fff; background-repeat: no-repeat; }
.tcard__page--id { background-image: linear-gradient(135deg, #f8d6c0, #dcd3f4 55%, #cfe6e6); background-position: 0.75em 0.9em; background-size: calc(100% - 1.5em) 4.6em; }
.tcard__page--id::before { content: ""; position: absolute; left: 1.3em; top: 1.5em; width: 1.9em; height: 2.5em; border-radius: 0.25em; background: rgba(255, 255, 255, 0.75); }
.tcard__page--id::after { content: ""; position: absolute; left: 3.8em; right: 1.4em; top: 1.7em; height: 2.2em; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.8) 0 0.28em, transparent 0.28em 0.62em); }
.tcard__page--pay { background-image: linear-gradient(rgba(43, 38, 32, 0.55), rgba(43, 38, 32, 0.55)), linear-gradient(rgba(20, 104, 116, 0.18), rgba(20, 104, 116, 0.18)), repeating-linear-gradient(to bottom, rgba(43, 38, 32, 0.13) 0 1px, transparent 1px 0.78em), linear-gradient(90deg, transparent 64%, rgba(43, 38, 32, 0.06) 64%); background-position: 0.75em 0.85em, 0.75em 1.75em, 0.75em 2.9em, 0.75em 2.9em; background-size: 48% 0.32em, calc(100% - 1.5em) 0.7em, calc(100% - 1.5em) 6.3em, calc(100% - 1.5em) 6.3em; }
.tcard__page--form { background-image: linear-gradient(rgba(43, 38, 32, 0.6), rgba(43, 38, 32, 0.6)), linear-gradient(rgba(43, 38, 32, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(43, 38, 32, 0.14) 1px, transparent 1px); background-position: 0.75em 0.85em, 0.75em 1.8em, 0.75em 1.8em; background-size: 2.2em 0.6em, calc(100% - 1.5em) 1.25em, 33.4% 7.5em; }
.tcard__page--form { background-repeat: no-repeat, repeat-y, repeat-x; }
.tcard__page--table { background-image: linear-gradient(rgba(43, 38, 32, 0.5), rgba(43, 38, 32, 0.5)), repeating-linear-gradient(to bottom, rgba(43, 38, 32, 0.12) 0 1px, transparent 1px 0.72em), linear-gradient(90deg, transparent 70%, rgba(20, 104, 116, 0.08) 70%); background-position: 0.75em 0.85em, 0.75em 1.8em, 0.75em 1.8em; background-size: 55% 0.3em, calc(100% - 1.5em) 7.6em, calc(100% - 1.5em) 7.6em; }
.tcard__page--letter { background-image: linear-gradient(rgba(43, 38, 32, 0.45), rgba(43, 38, 32, 0.45)), repeating-linear-gradient(to bottom, rgba(43, 38, 32, 0.12) 0 0.2em, transparent 0.2em 0.58em); background-position: 0.75em 0.9em, 0.75em 2.2em; background-size: 40% 0.28em, calc(100% - 2.4em) 6.4em; }
.tcard__page--notice { background-image: linear-gradient(rgba(43, 38, 32, 0.6), rgba(43, 38, 32, 0.6)), linear-gradient(rgba(43, 38, 32, 0.25), rgba(43, 38, 32, 0.25)), repeating-linear-gradient(to bottom, transparent 0 0.42em, rgba(43, 38, 32, 0.13) 0.42em calc(0.42em + 1px)), repeating-linear-gradient(to bottom, rgba(43, 38, 32, 0.1) 0 0.2em, transparent 0.2em 0.55em); background-position: 0.75em 0.85em, 0.75em 1.45em, 0.75em 2.3em, 0.75em 5.6em; background-size: 62% 0.36em, 35% 0.2em, calc(100% - 1.5em) 2.9em, calc(100% - 2em) 3.8em; }
.tcard__page--contract { background-image: linear-gradient(rgba(43, 38, 32, 0.62), rgba(43, 38, 32, 0.62)), repeating-linear-gradient(to bottom, rgba(43, 38, 32, 0.11) 0 0.2em, transparent 0.2em 0.55em); background-position: 0.75em 0.85em, 0.75em 1.8em; background-size: 58% 0.36em, calc(100% - 1.5em) 3.9em; }

/* The open card: its pages fan out with numbered badges; one is dragged out. */
.tcard--avis { z-index: 2; }
.tcard__sheet { position: absolute; inset: 0; background-color: #fff; box-shadow: 0 0 0 1px rgba(43, 38, 32, 0.1), 0 6px 14px -8px rgba(43, 38, 32, 0.4); }
.tcard__sheet b { position: absolute; right: 0.4em; top: 0.4em; display: grid; place-items: center; min-width: 1.5em; height: 1.5em; border-radius: 0.3em; background: rgba(43, 38, 32, 0.78); color: #fff; font: 600 0.6em/1 var(--sans); }
.cursor { position: absolute; left: 68%; top: 26%; width: 1.5em; height: 1.9em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 20'%3E%3Cpath d='M2 1.5v14.2l3.7-3.4 2.4 5.6 2.6-1.1-2.4-5.5H13z' fill='%23fff' stroke='%232b2620' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain; filter: drop-shadow(0 2px 2px rgba(43, 38, 32, 0.3)); }
.tip { position: absolute; right: 18%; top: 44%; padding: 0.55em 0.7em; border-radius: 0.45em; background: var(--tb-ink); color: #fff; font: 500 0.66em/1 var(--sans); white-space: nowrap; box-shadow: 0 10px 20px -10px rgba(43, 38, 32, 0.7); }
.tcard__insert { position: absolute; top: -0.35em; bottom: -0.35em; right: -0.32em; width: 0.2em; border-radius: 1em; background: #e5484d; box-shadow: 0 0 0.5em rgba(229, 72, 77, 0.7); transform-origin: center; }
.tcard__under { position: absolute; inset: 0; z-index: -1; background: #fff; box-shadow: 0 0 0 1px rgba(43, 38, 32, 0.1); }

/* The signature: saved in the library, placed on the page, then "Apposer". */
.sig { display: block; overflow: visible; fill: none; stroke: var(--tb-ink); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.sig path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.sigpop { position: absolute; right: 0.8em; top: 0.7em; z-index: 6; width: 13.4em; padding: 0.75em 0.8em 0.8em; border-radius: 0.8em; background: var(--tb-card); border: 1px solid rgba(20, 104, 116, 0.22); box-shadow: 0 22px 44px -20px rgba(20, 104, 116, 0.55); }
.sigpop__h { font: 600 0.66em/1 var(--sans); }
.sigpop__tile { display: block; margin-top: 0.65em; padding: 0.35em 0.9em; border-radius: 0.5em; border: 1.5px solid var(--tb-accent); background: #fff; box-shadow: 0 0 0 0.22em var(--tb-soft); }
.sigpop__hint { margin-top: 0.6em; font: 500 0.56em/1.35 var(--sans); color: var(--muted); }
.sigpop__row { display: flex; align-items: center; justify-content: space-between; gap: 0.5em; margin-top: 0.6em; }
.sigpop__new { font: 600 0.6em/1 var(--sans); color: var(--tb-deep); }
.sig--placed { position: absolute; left: 11%; bottom: 31%; z-index: 1; width: 64%; stroke-width: 2.6; }
.tcard__line { position: absolute; left: 10%; right: 16%; bottom: 31%; height: 1px; background: rgba(43, 38, 32, 0.45); }
.tcard__siglabel { position: absolute; left: 10%; bottom: 22%; font: 500 0.46em/1 var(--mono); color: var(--muted); white-space: nowrap; }
.sigbox { position: absolute; left: 8%; right: 18%; bottom: 27%; height: 30%; border: 1.5px dashed var(--tb-accent); border-radius: 0.2em; background: rgba(207, 230, 230, 0.25); }
.sigbox i { position: absolute; width: 0.5em; height: 0.5em; border-radius: 0.1em; background: #fff; border: 1.5px solid var(--tb-accent); }
.sigbox i:nth-child(1) { left: -0.3em; top: -0.3em; }
.sigbox i:nth-child(2) { right: -0.3em; top: -0.3em; }
.sigbox i:nth-child(3) { left: -0.3em; bottom: -0.3em; }
.sigbox i:nth-child(4) { right: -0.3em; bottom: -0.3em; }
.apposer { padding: 0.5em 0.85em; border-radius: 999px; background: var(--tb-deep); color: #fff; font: 600 0.62em/1 var(--sans); box-shadow: 0 10px 18px -10px rgba(20, 104, 116, 0.9); }
.bench__dock { position: absolute; right: 0.8em; bottom: 0.8em; z-index: 4; display: flex; align-items: center; gap: 0.3em; padding: 0.35em 0.4em 0.35em 0.3em; border-radius: 0.8em; background: rgba(255, 254, 251, 0.94); border: 1px solid rgba(43, 38, 32, 0.1); box-shadow: 0 14px 28px -16px rgba(43, 38, 32, 0.45); }
.bench__dockk { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 0.4em/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.bench__send { padding: 0.5em 0.6em; border-radius: 0.5em; font: 500 0.56em/1 var(--sans); }
.bench__send:first-of-type { background: var(--tb-soft); color: var(--tb-deep); }
.bench__trash { width: 2em; height: 2em; margin-left: 0.25em; border-radius: 50%; border: 1px solid rgba(43, 38, 32, 0.14); background: var(--tb-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232b2620' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M3 4.5h10M6.5 4.5V3h3v1.5M4.5 4.5l.6 8.5h5.8l.6-8.5'/%3E%3C/svg%3E") no-repeat center / 55%; }

/* Mots-Dits: a dictated note. */
.note { width: 31em; padding: 1.5em 1.6em 1.6em; border-radius: 1.4em; background: linear-gradient(180deg, #eef3fb, var(--sheet) 45%); border: 1px solid rgba(12, 69, 161, 0.16); box-shadow: 0 2px 4px rgba(12, 69, 161, 0.06), 0 44px 90px -40px rgba(12, 69, 161, 0.45); }
.note__head { display: flex; align-items: center; justify-content: space-between; gap: 1em; font: 500 0.75em/1 var(--mono); color: var(--muted); }
.note__live { display: inline-flex; align-items: center; gap: 0.5em; padding: 0.5em 0.8em; border-radius: 999px; background: var(--md-soft); color: var(--md-deep); }
.note__live::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--md-strong); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.wave { display: flex; align-items: center; gap: 0.2em; height: 3.6em; margin: 1.3em 0 1.2em; }
.wave i { flex: 1; height: 100%; border-radius: 1em; background: linear-gradient(180deg, var(--md-strong), var(--md-accent)); transform: scaleY(var(--a)); animation: wave var(--t) ease-in-out var(--d) infinite alternate; }
@keyframes wave { from { transform: scaleY(calc(var(--a) * 0.22)); } to { transform: scaleY(var(--a)); } }
.note__text { min-height: 4.8em; font: 400 1.25em/1.5 var(--serif); }
.note__foot { display: flex; gap: 0.5em; margin-top: 1.1em; }
.note__chip { padding: 0.45em 0.7em; border-radius: 999px; background: var(--md-soft); font: 500 0.7em/1 var(--mono); color: var(--md-deep); }

/* The end: the folder, closed and stamped. */
.done { position: relative; width: 23em; aspect-ratio: 1.3; margin-top: 3em; }
.done__tabs { position: absolute; left: 40%; right: 6%; top: -2.2em; display: flex; justify-content: flex-end; gap: 0.4em; }
.done__tab { padding: 0.6em 0.75em 2em; border-radius: 0.6em 0.6em 0 0; font: 500 0.7em/1 var(--mono); }
.done__tab--lc { background: var(--lc-soft); color: var(--lc-deep); }
.done__tab--tb { background: var(--tb-soft); color: var(--tb-deep); }
.done__tab--md { background: var(--md-soft); color: var(--md-deep); }
.done__folder { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.55em; padding: 1.8em; border-radius: 0.6em 1.6em 1.6em 1.6em; background: linear-gradient(160deg, #f1ecfb, #e3daf6); border: 1px solid rgba(106, 79, 191, 0.2); box-shadow: 0 2px 4px rgba(106, 79, 191, 0.08), 0 44px 90px -40px rgba(106, 79, 191, 0.55); }
.done__folder::before { content: ""; position: absolute; left: -1px; top: -1.3em; width: 38%; height: 1.4em; border-radius: 0.7em 0.7em 0 0; background: #f1ecfb; border: 1px solid rgba(106, 79, 191, 0.2); border-bottom: 0; }
.done__label { font: 500 2em/1 var(--serif); letter-spacing: -0.015em; }
.done__meta { font: 500 0.78em/1 var(--mono); color: var(--muted); }
.done__stamp { position: absolute; right: -1.4em; top: 14%; display: grid; place-items: center; width: 8em; height: 8em; border-radius: 50%; border: 0.2em solid var(--ec-deep); color: var(--ec-deep); background: rgba(255, 253, 249, 0.35); box-shadow: inset 0 0 0 0.3em rgba(255, 253, 249, 0.6), inset 0 0 0 0.42em var(--ec-deep); text-align: center; font: 600 1.05em/1.05 var(--serif); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Phones and narrow windows: scene on top, copy below. ---------- */

@media (max-width: 820px) {
  :root { --gutter: 6vw; }
  .navLinks { display: none; }
  .nav { padding-top: 1.1rem; }
  .js .chapter, .js .chapter[data-side="right"] { justify-content: flex-start; align-items: flex-end; padding: 0 var(--gutter) 5.5rem; }
  .copy, .copy--hero { width: 100%; }
  .hero { font-size: clamp(2.5rem, 11vw, 3.6rem); }
  .hero--end { font-size: clamp(2.2rem, 9.5vw, 3.2rem); }
  .name { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .title { margin-top: 0.7rem; font-size: 1.25rem; }
  .kicker { margin-bottom: 0.9rem; }
  .lead, .body { margin-top: 0.9rem; font-size: 0.98rem; }
  .actions { margin-top: 1.2rem; }
  .button { padding: 0.85rem 1.2rem; }
  .links { margin-top: 1.2rem; }
  .legal { margin-top: 1.2rem; }
  .scene { font-size: clamp(8.5px, min(2.55vw, 1.25vh), 12px); }
  .slot, .slot--left, .slot--right, .slot--chaos { left: 0; width: 100vw; top: 9svh; bottom: auto; height: 44svh; }
  /* The work table: no side panel nor dock, a touch larger so it stays legible. */
  .bench { font-size: 1.16em; grid-template: "ribbon" 2.9em "table" 1fr / 1fr; width: 31.6em; height: 26.8em; }
  .bench__side, .bench__dock, .bench__zoom, .bench__brand span, .bench__tool--extra { display: none; }
  .bench__ribbon { gap: 0.5em; padding: 0 0.6em; }
  .tcard { --w: 7.15; }
  .brand__logo { height: 2.6rem; }
  .progress { bottom: 1.4rem; }
  .progress__name { display: none; }
  .hint { display: none; }
}

/* ---------- Without the film (no JavaScript, or it failed): a plain readable page. ---------- */

.no-js .chapter { min-height: 70vh; padding-top: 8rem; padding-bottom: 4rem; }
.no-js .chapter[data-side="right"] { justify-content: flex-start; }
.no-js .copy, .no-js .copy--hero { width: min(40rem, 100%); }
.no-js .progress, .no-js .hint { display: none; }
.no-js .nav { position: absolute; }

@media (prefers-reduced-motion: reduce) {
  .wave i, .note__live::before, .row--missing, .hint i::after { animation: none; }
}
