
/* Labs303 — composants et page d'accueil.
   Toutes les couleurs viennent des tokens (tokens.css). Aucune valeur en dur sauf le noir du carré voyageur. */

.l3 {
  container-type: inline-size;
  container-name: l3;
  position: relative;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
.l3 *, .l3 *::before, .l3 *::after { box-sizing: border-box; }
.l3 :where(h1, h2, h3, p, ol, form) { margin: 0; padding: 0; }
.l3 :where(ol) { list-style: none; }
.l3 :where(a) { color: inherit; }
.l3 :focus-visible { outline: 2px solid var(--prune); outline-offset: 3px; }
.l3-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Cadre de page ---------- */
.l3-page {
  --rail: 72px;
  --pad: 48px;
  --sec: 96px;
  max-width: 1280px;
  margin: 0 auto;
  border-left: var(--stroke-frame) solid var(--grid);
  border-right: var(--stroke-frame) solid var(--grid);
  position: relative;
}
.l3-band {
  position: relative;
  padding: var(--sec) calc(var(--rail) + var(--pad)) var(--sec) var(--pad);
  border-top: var(--stroke-frame) solid var(--grid);
  background: var(--bg);
  color: var(--ink);
}
.l3-rail {
  position: absolute; top: 0; bottom: 0; right: 0;
  width: var(--rail);
  border-left: var(--stroke-hair) solid var(--grid);
  pointer-events: none;
}
.l3-trame {
  position: absolute; top: 0; bottom: 0;
  left: var(--pad); right: calc(var(--rail) + var(--pad));
  display: grid; grid-template-columns: repeat(6, 1fr);
  pointer-events: none;
}
.l3-trame > span { border-left: var(--stroke-hair) solid var(--trame); }
.l3-trame > span:last-child { border-right: var(--stroke-hair) solid var(--trame); }

.l3-in { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.l3-span6 { grid-column: 1 / -1; }

/* ---------- En-tête ---------- */
.l3-top {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-16);
  height: 72px;
  padding: 0 calc(var(--rail) + var(--pad)) 0 var(--pad);
}
.l3-mark { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-decoration: none; }
.l3-toptel {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none;
  border-bottom: var(--stroke-hair) solid var(--grid);
}

/* ---------- Typographie ---------- */
.l3-display {
  font-size: 104px; font-weight: 900; line-height: 0.88; letter-spacing: -0.05em;
  margin-bottom: var(--space-48);
}
.l3-h2 { font-size: 48px; font-weight: 800; font-stretch: 112%; font-variation-settings: 'wdth' 112; line-height: 1; letter-spacing: -0.03em; max-width: 16ch; }
.l3-h3 { font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.l3-fig { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.l3-lead { font-size: 19px; line-height: 1.5; max-width: 60ch; }
.l3-tag { font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.l3-muted { color: var(--ink-2); }
.l3-text { max-width: 66ch; }

.l3-head {
  grid-column: 1 / -1;
  min-height: 168px;
  display: flex; align-items: flex-end;
  padding-bottom: var(--space-48);
}

/* ---------- Actions ---------- */
.l3-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-24); margin-top: var(--space-48); }
.l3-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 var(--space-24);
  border: 0; border-radius: var(--radius-touch);
  background: var(--prune); color: var(--on-prune);
  font: 600 17px/1 var(--font-sans);
  text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease-out, transform 150ms ease-out;
}
.l3-btn:hover { background: var(--prune-strong); }
.l3-btn:active { transform: translateY(1px); background: var(--prune-strong); }
.l3-link {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
  transition: text-decoration-thickness 150ms ease-out, text-underline-offset 150ms ease-out;
}
.l3-link:hover { text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- Cellules de grille ---------- */
.l3-cells {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--stroke-hair);
  background: var(--grid);
  border: var(--stroke-hair) solid var(--grid);
}
.l3-cell {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-8);
  min-height: 232px;
  padding: var(--space-48) var(--space-24) var(--space-24);
  background: var(--bg);
  transition: background-color 150ms ease-out;
}
.l3-cell-hover:hover, .l3-cell-hover:active { background: var(--surface); }
.l3-cell-pale { background: var(--prune-pale); }
.l3-cell-note { min-height: 0; padding: var(--space-24); background: var(--surface); }
.l3-c2 { grid-column: span 2; }
.l3-c3 { grid-column: span 3; }
.l3-c6 { grid-column: 1 / -1; }
.l3-cell .l3-fig { margin-bottom: var(--space-8); }

.l3-cell-dark { background: var(--bg); color: var(--ink); }
.l3-cell-prune { background: var(--prune); color: var(--on-prune); }
.l3-cell-prune .l3-tag, .l3-cell-prune .l3-muted { color: var(--on-prune); }
.l3-cell-prune.l3-cell-hover:hover, .l3-cell-prune.l3-cell-hover:active { background: var(--prune-strong); }

/* ---------- Poché : aplats et plans superposés ---------- */
.l3-head { position: relative; }
.l3-art { position: absolute; top: calc(-1 * var(--sec)); bottom: 0; right: 0; width: 50%; pointer-events: none; }
.l3-art > * { position: absolute; display: block; }
.l3-mass { background: var(--bg); }
.l3-art .l3-v { top: 0; bottom: 0; width: var(--stroke-frame); background: var(--grid); }
.l3-art .l3-av1 { left: 0; }
.l3-art .l3-av2 { left: 66.667%; }
.l3-head { gap: var(--space-24); }
.l3-rappel { flex: 1 1 0; min-width: 48px; height: var(--stroke-frame); margin-bottom: 18px; background: var(--grid); }
.l3-tint { display: block; background: var(--prune-pale); }
.l3-solid { background: var(--prune); }
.l3-hero-in .l3-fact {
  grid-column: auto; grid-row: auto;
  position: absolute; right: calc(-1 * var(--pad)); bottom: calc(-1 * var(--sec));
  width: calc(100% / 6 + var(--pad)); height: calc(224px + var(--sec));
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-8);
  padding: var(--space-24); background: var(--bg); color: var(--ink);
}

/* ---------- Contact par mail (en attendant un vrai envoi du formulaire) ---------- */
.l3-contact-mail { margin: var(--space-24) 0 var(--space-16); }

/* ---------- Champs (formulaire retiré pour l'instant : gardés pour le jour où il enverra vraiment) ---------- */
.l3-form { display: grid; gap: var(--space-24); }
.l3-field { display: grid; gap: var(--space-8); }
.l3-field label { font-weight: 600; line-height: 1.3; }
.l3-input {
  width: 100%; min-height: 52px;
  padding: 13px var(--space-16);
  border: var(--stroke-hair) solid var(--field); border-radius: var(--radius-touch);
  background: var(--bg); color: var(--ink);
  font: 400 17px/1.4 var(--font-sans);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.l3-input:hover { border-color: var(--ink); }
.l3-input:focus { outline: none; border-color: var(--prune); box-shadow: 0 0 0 1px var(--prune); }
textarea.l3-input { min-height: 132px; resize: vertical; }
.l3-ok { padding: var(--space-16); background: var(--prune-pale); font-weight: 600; }

/* ---------- Formes suprématistes ---------- */
.l3-sq { background: var(--ink); }
.l3-bar { display: block; background: var(--prune); }
.l3-dot { display: block; border-radius: 50%; background: var(--prune); }
.l3-glass {
  display: block;
  background: var(--glass);
  border: var(--stroke-hair) solid var(--glass-line);
  border-radius: var(--radius-touch);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-plan);
}

/* ---------- Compteur mécanique ---------- */
.l3-odo { display: inline-flex; vertical-align: top; }
.l3-wheel { display: inline-block; height: 1em; overflow: hidden; line-height: 1; }
.l3-wheel-t { width: 0; }
.l3-col { display: flex; flex-direction: column; will-change: transform; }
.l3-col > span { display: block; height: 1em; line-height: 1; text-align: center; }

/* ---------- 1. Haut de page ---------- */
.l3-hero { min-height: 820px; display: flex; flex-direction: column; justify-content: flex-end; }
.l3-hero-in > * { grid-column: 1 / span 4; }

/* Haut de page : la moitié droite est une composition pleine — colonnes 5 et 6, du filet du haut au filet du bas. */
.l3-hz {
  --c: calc((100% - var(--pad)) / 2);
  position: absolute; top: 0; bottom: 0; right: var(--rail);
  width: calc((100% - var(--rail) - 2 * var(--pad)) / 3 + var(--pad));
  pointer-events: none;
}
.l3-hz > * { position: absolute; display: block; }
.l3-hz .l3-v { top: 0; bottom: 0; width: var(--stroke-frame); background: var(--grid); }
.l3-hz .l3-h { left: 0; right: 0; top: 330px; height: var(--stroke-frame); background: var(--grid); }
.l3-hz .l3-v1 { left: 0; }
.l3-hz .l3-v2 { left: var(--c); }
.l3-hz-slab { left: var(--c); right: 0; top: 0; height: 500px; background: var(--surface); }
.l3-hz-tint { left: -60px; width: 230px; top: 470px; height: 170px; }
.l3-slot-hero { left: 40px; top: 70px; width: 220px; height: 220px; background: var(--ink); rotate: -14deg; }
.l3-hz .l3-dot { left: -44px; top: 40px; width: 36px; height: 36px; }
.l3-hz .l3-bar { left: -80px; top: 506px; width: 520px; height: 28px; rotate: -27deg; }
.l3-hz .l3-glass { left: 110px; top: 250px; width: 250px; height: 190px; z-index: 3; }
.l3-hero .l3-lead { grid-column: 1 / span 4; max-width: 52ch; }

/* ---------- 4. Séquence et ligne de cote ---------- */
.l3-seq { border-bottom: var(--stroke-hair) solid var(--grid); background: var(--bg); }
.l3-step {
  position: relative;
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-24);
  padding: var(--space-24) 0;
  border-top: var(--stroke-hair) solid var(--grid);
}
.l3-num { font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; transition: color 150ms ease-out; }
.l3-step .l3-h3 { margin-bottom: var(--space-8); max-width: 40ch; }
.l3-tick {
  position: absolute; top: 37px;
  right: calc(-1 * (var(--pad) + var(--rail) / 2) - 7px);
  width: 14px; height: 14px;
  background: var(--ink);
}
.l3-cote {
  position: absolute; right: calc(var(--rail) / 2); width: var(--stroke-hair);
  top: 0; height: 0;
  background: var(--ink);
  transform-origin: 50% 0;
  pointer-events: none;
}

/* ---------- 6. Exemple (anthracite) ---------- */
.l3-ex { min-height: 880px; display: flex; flex-direction: column; justify-content: flex-end; }
.l3-ex-in > * { grid-column: 1 / span 3; }
.l3-ex-in .l3-h2 { margin-bottom: var(--space-24); }
.l3-ex-in .l3-text + .l3-text { margin-top: var(--space-16); }
.l3-stage {
  position: absolute; top: var(--sec); bottom: var(--sec);
  right: calc(var(--rail) + var(--pad)); width: calc((100% - var(--rail) - 2 * var(--pad)) / 2);
  pointer-events: none;
}
.l3-stage > * { position: absolute; }
.l3-stage .l3-glass { left: 0; right: 0; top: 64px; height: 488px; z-index: 1; }
.l3-stage .l3-bar { top: 150px; left: -56px; width: 380px; height: 28px; rotate: -28deg; }
.l3-slot-frame { top: 0; right: 72px; width: 292px; height: 548px; background: var(--ink); }
.l3-ex .l3-slot-frame { background: #0a0a0a; }
.l3-screen {
  position: absolute; inset: 10px; z-index: 3;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font-size: 14px; line-height: 1.35;
  overflow: hidden;
}
.l3-scr-bar { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-bottom: var(--stroke-hair) solid var(--grid); }
.l3-scr-bar b { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.l3-scr-client { padding: 14px 16px 12px; border-bottom: var(--stroke-hair) solid var(--trame); }
.l3-scr-client b { display: block; font-size: 17px; font-weight: 600; }
.l3-scr-lines { flex: 1; }
.l3-scr-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 16px; border-bottom: var(--stroke-hair) solid var(--trame); }
.l3-scr-line span:last-child, .l3-scr-tot span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.l3-scr-line small { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); }
.l3-scr-tot { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 12px 16px; border-top: var(--stroke-hair) solid var(--grid); }
.l3-scr-tot .l3-scr-ttc { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.l3-scr-btn { margin: 0 16px 16px; min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-touch); background: var(--prune); color: var(--on-prune); font-weight: 600; font-size: 15px; }

/* ---------- 7. Contact ---------- */
.l3-contact .l3-dot { position: absolute; top: var(--sec); right: calc(var(--rail) + var(--pad) + 24px); width: 40px; height: 40px; }
.l3-contact .l3-cell { justify-content: flex-start; padding: var(--space-48) var(--space-24); }
.l3-tel { text-decoration: none; display: inline-block; margin: var(--space-24) 0 var(--space-8); }
.l3-tel:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- 8. Pied de page ---------- */
.l3-foot { padding-top: var(--space-48); padding-bottom: var(--space-48); }
.l3-foot .l3-in { row-gap: var(--space-24); align-items: end; }
.l3-foot-a { grid-column: 1 / span 3; }
.l3-foot-b { grid-column: 4 / span 3; }
.l3-foot .l3-mark { display: inline-block; margin-bottom: var(--space-8); }

/* ---------- Carré voyageur ---------- */
.l3-trav {
  display: none;
  position: absolute; left: 0; top: 0; z-index: 2;
  width: 100px; height: 100px;
  transform-origin: 50% 50%;
  will-change: transform;
  pointer-events: none;
}
.l3-trav > i { display: block; width: 100%; height: 100%; background: #0a0a0a; }

/* ---------- Mode mouvement (ajouté par le script, jamais si l'appareil demande moins de mouvement) ---------- */
.l3-moving .l3-trav { display: block; }
.l3-moving .l3-slot { background: transparent !important; rotate: none; }
.l3-moving .l3-tick { background: transparent; }
.l3-moving .l3-tick::before {
  content: ""; position: absolute; left: -3px; right: -3px; top: 50%;
  height: var(--stroke-hair); background: var(--ink); rotate: -45deg;
}
.l3-moving .l3-step.is-on .l3-num { color: var(--prune); }

@keyframes l3-draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes l3-draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes l3-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes l3-land { from { transform: translateY(-28px); opacity: 0; } to { transform: none; opacity: 1; } }
.l3-moving .l3-hero .l3-trame > span,
.l3-moving .l3-hero .l3-v,
.l3-moving .l3-hero .l3-rail {
  transform-origin: 50% 0;
  animation: l3-draw-y 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.l3-moving .l3-hero .l3-trame > span:nth-child(2) { animation-delay: 70ms; }
.l3-moving .l3-hero .l3-trame > span:nth-child(3) { animation-delay: 140ms; }
.l3-moving .l3-hero .l3-trame > span:nth-child(4) { animation-delay: 210ms; }
.l3-moving .l3-hero .l3-trame > span:nth-child(5) { animation-delay: 280ms; }
.l3-moving .l3-hero .l3-trame > span:nth-child(6) { animation-delay: 350ms; }
.l3-moving .l3-hero .l3-rail { animation-delay: 420ms; }
.l3-moving .l3-hero .l3-v2 { animation-delay: 200ms; }
.l3-moving .l3-hero .l3-h { transform-origin: 0 50%; animation: l3-draw-x 800ms cubic-bezier(0.2, 0.7, 0.2, 1) 480ms both; }
.l3-moving .l3-hero .l3-hz-slab, .l3-moving .l3-hero .l3-hz-tint, .l3-moving .l3-hero .l3-fact { animation: l3-fade 700ms ease-out 300ms both; }
.l3-moving .l3-trav > i { animation: l3-land 760ms cubic-bezier(0.34, 1.35, 0.64, 1) 620ms both; }
.l3-moving .l3-hero .l3-dot { animation: l3-land 760ms cubic-bezier(0.34, 1.35, 0.64, 1) 680ms both; }
.l3-moving .l3-hero .l3-bar { animation: l3-land 760ms cubic-bezier(0.34, 1.35, 0.64, 1) 740ms both; }
.l3-moving .l3-hero .l3-glass { animation: l3-land 760ms cubic-bezier(0.34, 1.35, 0.64, 1) 860ms both; }

@media (prefers-reduced-motion: reduce) {
  .l3 *, .l3 *::before { animation: none !important; transition: none !important; }
}

/* ---------- Téléphone ---------- */
@container l3 (max-width: 760px) {
  .l3-page { --rail: 32px; --pad: 16px; --sec: 48px; }
  .l3-top { height: 64px; }
  .l3-toptel { font-size: 17px; }
  .l3-display { font-size: 52px; margin-bottom: var(--space-24); }
  .l3-h2 { font-size: 34px; }
  .l3-lead { font-size: 17px; }
  .l3-head { min-height: 0; padding-top: 104px; padding-bottom: var(--space-24); }
  .l3-art { bottom: auto; height: calc(var(--sec) + 80px); }
  .l3-hero-in .l3-fact { grid-column: 1 / -1; position: relative; right: auto; bottom: auto; width: auto; height: auto; margin-top: var(--space-24); }
  .l3-actions { margin-top: var(--space-24); gap: var(--space-16); }
  .l3-btn { width: 100%; }
  .l3-c2, .l3-c3 { grid-column: 1 / -1; }
  .l3-cell { min-height: 0; padding: var(--space-24) var(--space-16); }
  .l3-hero { min-height: 0; padding-top: 336px; }
  .l3-hero-in > *, .l3-hero .l3-lead { grid-column: 1 / -1; }
  .l3-rappel { display: none; }
  .l3-hz { --c: 50%; left: var(--pad); width: auto; bottom: auto; height: 312px; }
  .l3-hz .l3-v1 { left: 33.333%; }
  .l3-hz .l3-v2 { left: 66.667%; }
  .l3-hz .l3-h { top: 168px; }
  .l3-hz-slab { left: 66.667%; height: 312px; }
  .l3-hz-tint { left: 0; width: 46%; top: 200px; height: 88px; }
  .l3-slot-hero { left: 38%; top: 34px; width: 128px; height: 128px; }
  .l3-hz .l3-dot { left: 12%; top: 40px; width: 26px; height: 26px; }
  .l3-hz .l3-bar { left: 4%; top: 214px; width: 92%; height: 18px; rotate: -24deg; }
  .l3-hz .l3-glass { left: 52%; top: 132px; width: 40%; height: 112px; }
    .l3-step { grid-template-columns: 40px minmax(0, 1fr); gap: var(--space-16); }
  .l3-tick { top: 33px; width: 10px; height: 10px; right: calc(-1 * (var(--pad) + var(--rail) / 2) - 5px); }
  .l3-num { font-size: 40px; }
  .l3-ex { min-height: 0; }
  .l3-ex-in > * { grid-column: 1 / -1; }
  .l3-stage { position: relative; top: auto; bottom: auto; right: auto; width: auto; height: 520px; margin-top: var(--space-48); }
  .l3-stage .l3-glass { top: 56px; height: 400px; left: 0; right: 0; }
  .l3-stage .l3-bar { top: 110px; left: -24px; width: 240px; height: 18px; }
  .l3-slot-frame { top: 0; right: 24px; width: 244px; height: 500px; }
  .l3-screen { inset: 8px; font-size: 13px; }
  .l3-contact .l3-dot { top: var(--sec); width: 28px; height: 28px; right: calc(var(--rail) + var(--pad)); }
  .l3-contact .l3-h2 { padding-right: 48px; }
  .l3-contact .l3-cell { padding: var(--space-24) var(--space-16); }
  .l3-foot-a, .l3-foot-b { grid-column: 1 / -1; }
}
