/* Souffle · ART-SYSTEM v1
   Tokens : nuit d'atelier (dérivé Oryzo #100904) / verre froid (teinte sodocalcique) / braise = seul accent. */

/* @font-face : css/fonts.css (Instrument Sans embarquée, fichiers source dans fonts/) */

:root {
  --nuit: #0e0b09;
  --nuit-2: #17120f;
  --verre: #e6ece6;
  --verre-2: #9aa59d;      /* secondaire sur nuit : 7.6:1 */
  --encre: #141a17;        /* texte sur verre */
  --encre-2: #4a514c;      /* secondaire sur verre : 7.4:1 */
  --braise: #ff6a1f;
  --braise-texte: #ff8a4c; /* braise lisible en petit sur nuit */
  --braise-fonce: #b23a00; /* braise lisible sur verre : 4.9:1 */
  --gut: clamp(20px, 6vw, 96px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);        /* expo, REGISTRE §3 */
  --ease-press: cubic-bezier(0.23, 1, 0.32, 1);     /* emil, micro-UI */
  --display: clamp(48px, 7.4vw, 112px);
  --h2: clamp(44px, 6vw, 96px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--verre);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  font-stretch: 100%;
  font-kerning: normal;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--braise); color: var(--nuit); }
:focus-visible { outline: 2px solid var(--braise); outline-offset: 4px; border-radius: 2px; }
html { scrollbar-color: #4a3a30 var(--nuit); }

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
em { font-style: italic; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--verre); color: var(--nuit); padding: 10px 16px; }
.skip:focus { left: 8px; }

.display {
  font-size: var(--h2);
  font-stretch: 75%;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
  perspective: 600px;
}
.display em { font-weight: 450; padding-right: 0.04em; }
.js-blur .char { display: inline-block; will-change: transform, filter, opacity; }
.js-blur .word { display: inline-block; white-space: nowrap; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px;
  background: var(--verre); color: var(--nuit);
  font-weight: 600; font-size: 16px; letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap; border: 0; cursor: pointer;
  font-family: inherit;
  transition: transform 160ms var(--ease-press), background-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #fff6ee; } }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--fire { background: var(--braise); color: var(--nuit); }
@media (hover: hover) and (pointer: fine) { .btn--fire:hover { background: #ff8340; } }
.link {
  color: var(--verre); font-weight: 500; text-decoration: underline;
  text-decoration-color: var(--braise); text-decoration-thickness: 1px; text-underline-offset: 6px;
  min-height: 44px; display: inline-flex; align-items: center;
  transition: text-underline-offset 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .link:hover { text-underline-offset: 9px; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 72px; padding: 0 var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  color: var(--verre);
  transition: color 300ms ease, background-color 300ms ease;
}
.nav::before { content: ""; position: absolute; inset: 0; background: var(--nuit); opacity: 0; transition: opacity 300ms ease; z-index: -1; }
.nav.is-scrolled::before { opacity: 0.86; }
body[data-theme="verre"] .nav { color: var(--encre); }
body[data-theme="verre"] .nav::before { background: var(--verre); }
body[data-theme="verre"] .nav .btn { background: var(--encre); color: var(--verre); }
.nav__mark { font-style: italic; font-weight: 600; font-size: 24px; font-stretch: 75%; letter-spacing: -0.02em; text-decoration: none; }
.nav__links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 12px 0; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--braise); transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover::after { transform: scaleX(1); } }

/* ---------- rail de température ---------- */
.rail { position: fixed; right: 22px; top: 22vh; height: 56vh; width: 60px; z-index: 40; pointer-events: none; display: flex; flex-direction: column; align-items: flex-end; }
.rail__label { font-size: 12px; color: var(--verre-2); letter-spacing: 0.02em; margin-bottom: 10px; transition: color 300ms ease; }
.rail__line { flex: 1; width: 1px; margin-right: 4px; background-image: linear-gradient(to bottom, currentColor 50%, transparent 50%); background-size: 1px 6px; color: rgba(230, 236, 230, 0.28); }
.rail__bead { position: absolute; right: 0; top: 30px; width: 9px; height: 9px; border-radius: 50%; background: var(--braise); transform: translateY(0); }
body[data-theme="verre"] .rail__label { color: var(--encre-2); }
body[data-theme="verre"] .rail__line { color: rgba(20, 26, 23, 0.3); }

/* ---------- 01 hero ---------- */
.hero { position: relative; height: 190vh; }
.hero__stage { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.hero__frame {
  position: absolute; inset: 0;
  clip-path: inset(var(--fy, 0%) var(--fx, 0%) 0% var(--fx, 0%) round var(--fr, 0px) var(--fr, 0px) 0 0);
}
.glow { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.glow-fallback { position: absolute; inset: 0; background: radial-gradient(circle at 70% 42%, #fff1c9 0, #ffb347 5%, #ff6a1f 10%, #6e1d03 17%, rgba(14,11,9,0) 34%), var(--nuit); z-index: -1; }
.no-webgl .glow { display: none; }
.hero__canne {
  position: absolute; left: 0; top: 42%; height: 1px; width: var(--fx, 0%);
  background: linear-gradient(to right, rgba(255,106,31,0.15), rgba(255,106,31,0.7));
}
.hero__copy {
  position: absolute; left: var(--gut); bottom: clamp(40px, 9vh, 96px);
  width: min(46rem, 52vw);
  display: grid; gap: 28px;
}
.hero__title { font-size: var(--display); }
.hero__sub { font-size: 19px; color: var(--verre-2); max-width: 30rem; }
.hero__actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

/* ---------- 02 geste ---------- */
.geste { position: relative; background: linear-gradient(to bottom, var(--nuit) 70%, #1b1714 100%); }
.geste__pin { height: 100vh; height: 100dvh; overflow: hidden; display: flex; align-items: center; }
.geste__track {
  position: relative;
  display: flex; align-items: stretch;
  height: 78vh; padding: 0 var(--gut);
  gap: 6vw;
  width: max-content;
}
.geste__canne {
  position: absolute; left: 0; right: 0; top: 52%; height: 1px;
  background: linear-gradient(to right, rgba(255,106,31,0.75) 0%, rgba(255,106,31,0.55) 45%, rgba(230,236,230,0.45) 100%);
}
.geste__intro { width: 30vw; align-self: flex-start; display: grid; gap: 24px; padding-top: 4vh; }
.geste__intro p { color: var(--verre-2); max-width: 26rem; }
.step {
  --c: color-mix(in oklab, var(--braise) calc(var(--t) * 100%), var(--verre));
  width: 42vw; position: relative;
  display: grid; grid-template-rows: 1fr auto auto; gap: 18px;
}
.step__fig { position: absolute; left: 0; top: 52%; width: 100%; max-width: 520px; height: auto; transform: translateY(-62.5%); overflow: visible; }
.step__verb {
  grid-row: 2; font-size: clamp(56px, 7.6vw, 128px); font-stretch: 75%; font-weight: 500;
  line-height: 0.9; letter-spacing: -0.035em; color: var(--c);
}
.step--cold .step__verb { color: var(--verre); }
.step__text { grid-row: 3; color: var(--verre-2); max-width: 26rem; font-size: 17px; }
.fig-canne { stroke: var(--c); stroke-width: 1.5; opacity: 0.9; }
.fig-fill { fill: var(--c); opacity: calc(0.16 + var(--t) * 0.5); }
.draw { fill: none; stroke: var(--c); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fig-curve { fill: none; stroke: rgba(230,236,230,0.4); stroke-width: 1; stroke-dasharray: 3 5; }
.fig-base { stroke: rgba(230,236,230,0.5); stroke-width: 1; }

/* svg-draw-on-reveal (fiche TESTED) */
@keyframes draw-on { 0% { stroke-dashoffset: var(--len, 1000); } 100% { stroke-dashoffset: 0; } }
.js .draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); }
.js .draw.in-view { animation: draw-on 1.2s ease-out forwards; }

/* ---------- 03 collection ---------- */
.collection {
  /* raccord geste -> collection : le verre refroidit, la nuit fond vers la lumière du jour (fusion, pas de coupe) */
  position: relative; color: var(--encre);
  background: linear-gradient(to bottom, #1b1714 0, #6f716c 12vh, #c9d0ca 23vh, var(--verre) 32vh);
  padding: calc(32vh + clamp(24px, 4vh, 56px)) var(--gut) clamp(80px, 12vh, 140px);
}
.collection__head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; margin-bottom: clamp(56px, 9vh, 104px); }
.collection__head .display { grid-column: 1 / span 7; }
.collection__head p { grid-column: 9 / span 4; color: var(--encre-2); font-size: 17px; }
.collection em, .atelier em { color: var(--braise-fonce); }

.shelf {
  --u: 1.12px;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); column-gap: clamp(16px, 2.4vw, 40px);
  border-top: 1px dashed rgba(20,26,23,0.35);
  position: relative;
}
.piece { display: grid; grid-template-rows: calc(var(--u) * 380) auto auto auto; row-gap: 6px; outline: none; }
.piece__fig { align-self: end; justify-self: center; overflow: visible; border-bottom: 1px solid var(--encre); width: 100%; }
.piece--hang .piece__fig { align-self: start; border-bottom: 0; }
.piece__name { margin-top: 22px; font-size: 26px; font-stretch: 75%; font-weight: 500; letter-spacing: -0.02em; transition: color 200ms ease; }
.piece__mat { font-size: 13px; color: var(--encre-2); letter-spacing: 0.01em; }
.piece__line { font-size: 15px; color: var(--encre); max-width: 22ch; line-height: 1.45; }
.p-axis { stroke: var(--encre); stroke-width: 0.8; stroke-dasharray: 6 3 1 3; opacity: 0.55; }
.p-out { fill: none; stroke: var(--encre); stroke-width: 1.2; stroke-linejoin: round; }
.p-wall { fill: var(--encre); }
.p-glass { fill: var(--tint, #cfe0d8); opacity: 0; transition: opacity 360ms var(--ease-out); }
.p-cord { stroke: var(--encre); stroke-width: 1; }
.piece:hover .p-glass, .piece:focus-within .p-glass, .piece:focus .p-glass { opacity: 0.9; }
.piece:hover .piece__name, .piece:focus .piece__name { color: var(--braise-fonce); }
.piece .draw-line { stroke-dasharray: var(--len, 1000); stroke-dashoffset: 0; }
.js .piece .draw-line { stroke-dashoffset: var(--len, 1000); }
.js .piece .draw-line.in-view { animation: draw-on 1.5s ease-out forwards; }
.js .piece .p-wall { opacity: 0; transition: opacity 500ms ease 900ms; }
.js .piece.is-drawn .p-wall { opacity: 1; }

/* ---------- 04 atelier ---------- */
.atelier {
  position: relative; background: var(--verre);
  color: var(--encre);
  padding: clamp(80px, 12vh, 140px) var(--gut) clamp(80px, 12vh, 140px);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 56px;
  align-items: end;
}
.atelier__visit { grid-column: 1 / span 4; align-self: start; display: grid; gap: 20px; }
.atelier__visit p { color: var(--encre-2); font-size: 17px; }
.arche { grid-column: 5 / span 5; grid-row: 1 / span 2; margin: 0; display: grid; gap: 18px; }
.arche__mouth {
  aspect-ratio: 5 / 6;
  background:
    radial-gradient(120% 70% at 50% 108%, rgba(255,106,31,0.42), rgba(255,106,31,0) 60%),
    var(--nuit);
  border-radius: 999px 999px 0 0;
  padding: 26% 9% 9%;
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--encre);
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.arche__mouth { position: relative; }
.scale { position: relative; width: 3.2em; font-size: 12px; color: var(--verre-2); }
/* même repère que .day__bar : la barre commence après le nom du jour (34 px) */
.scale span { position: absolute; right: 6px; top: calc(34px + (100% - 34px) * var(--h) / 11); transform: translateY(-50%); white-space: nowrap; }
.week { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: grid; grid-template-rows: 22px 1fr; justify-items: center; gap: 12px; color: var(--verre); position: relative; }
.day__name { font-size: 14px; font-weight: 600; }
.day__bar {
  /* échelle verticale 8 h → 19 h ; ouverture 10 h → 17 h = de 2/11 à 9/11 */
  width: 2px; height: 100%;
  background: linear-gradient(to bottom, rgba(230,236,230,0.12) 0 18.18%, var(--braise) 18.18% 81.82%, rgba(230,236,230,0.12) 81.82% 100%);
  border-radius: 2px;
}
.day__state { font-size: 12px; color: var(--verre-2); writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; min-height: 6.5em; text-align: left; }
.day--off .day__name { color: var(--verre-2); font-weight: 500; }
.day--off .day__bar { background: repeating-linear-gradient(to bottom, rgba(230,236,230,0.22) 0 3px, transparent 3px 8px); width: 1px; }
.arche figcaption { font-size: 15px; color: var(--encre-2); text-align: center; }
.atelier__adresse { grid-column: 10 / span 3; font-style: normal; display: grid; gap: 8px; align-self: start; }
.atelier__rue { font-size: clamp(28px, 2.6vw, 40px); font-stretch: 75%; font-weight: 500; line-height: 1.02; letter-spacing: -0.02em; }
.atelier__ville { font-size: 17px; color: var(--encre-2); }

.raccord { height: 34vh; background: linear-gradient(to bottom, var(--verre) 0, #8d918b 30%, #2a2420 70%, var(--nuit) 100%); position: relative; }
/* x = centre de l'arche (colonnes 5 à 9 de la grille 12, gouttière 24 px) */
.raccord::after { content: ""; position: absolute; left: calc(var(--gut) + (100% - 2 * var(--gut) + 24px) * 6.5 / 12 - 12px); top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, rgba(20,26,23,0.5), rgba(255,106,31,0.8)); }

/* ---------- 05 réservation ---------- */
.reserver { position: relative; min-height: 100vh; overflow: hidden; display: grid; align-items: center; padding: clamp(96px, 14vh, 160px) var(--gut); }
.reserver__glow { z-index: 0; }
.glow-fallback--cta { background: radial-gradient(circle at 22% 52%, #fff1c9 0, #ffb347 5%, #ff6a1f 11%, #6e1d03 19%, rgba(14,11,9,0) 36%), var(--nuit); }
.reserver__body { position: relative; z-index: 1; margin-left: 41%; display: grid; gap: 48px; max-width: 52rem; }
.reserver__title { font-size: clamp(48px, 6.4vw, 104px); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.field { display: grid; gap: 8px; }
.field:first-child { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--verre); }
.field input {
  height: 52px; padding: 0 16px; font: inherit; font-size: 17px; color: var(--verre);
  background: rgba(230,236,230,0.04); border: 1px solid rgba(230,236,230,0.38); border-radius: 4px;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.field input::placeholder { color: var(--verre-2); }
.field input:focus { outline: none; border-color: var(--braise); background: rgba(255,106,31,0.06); }
.field input:focus-visible { outline: 2px solid var(--braise); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: var(--braise-texte); }
.field input::-webkit-calendar-picker-indicator { filter: invert(0.9); }
.field__err { font-size: 14px; color: var(--braise-texte); min-height: 0; }
.field__err:empty { display: none; }
.form .btn { grid-column: 1 / -1; justify-self: start; min-height: 56px; padding: 0 34px; font-size: 17px; }
.form__note { grid-column: 1 / -1; font-size: 15px; color: var(--verre-2); }
.form__ok { grid-column: 1 / -1; font-size: 18px; color: var(--verre); border-top: 1px solid var(--braise); padding-top: 16px; }

/* ---------- pied ---------- */
.pied { position: relative; padding: 0 var(--gut) 40px; overflow: hidden; }
.pied__mark {
  font-size: clamp(96px, 23vw, 380px); font-style: italic; font-weight: 600; font-stretch: 75%;
  line-height: 0.8; letter-spacing: -0.04em; color: var(--verre); margin-left: -0.04em;
}
.pied__canne { display: block; position: relative; height: 1px; margin-top: 20px; background: linear-gradient(to right, rgba(230,236,230,0.3), var(--braise)); }
.pied__bead { position: absolute; right: -2px; top: -5px; width: 11px; height: 11px; border-radius: 50%; background: var(--braise); }
.pied__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 28px; font-size: 14px; color: var(--verre-2); }
.pied__cols p:last-child { text-align: right; }

/* ---------- état au repos (reduced-motion, mobile) ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__stage { position: relative; }
  .geste__pin { height: auto; display: block; padding: clamp(96px, 14vh, 160px) 0 clamp(96px, 18vh, 200px); }
  .geste__track { width: auto; height: auto; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: auto auto; gap: 56px 3vw; }
  .geste__intro { grid-column: 1 / -1; width: auto; grid-template-columns: repeat(12, 1fr); align-items: end; padding-top: 0; }
  .geste__intro h2 { grid-column: 1 / span 6; }
  .geste__intro p { grid-column: 8 / span 5; }
  .geste__canne { top: auto; bottom: calc(var(--step-axis, 0px)); display: none; }
  .step { width: auto; grid-template-rows: 300px auto auto; }
  .step__fig { position: relative; top: 0; transform: none; grid-row: 1; align-self: center; }
  .step::before { content: ""; position: absolute; left: -3vw; right: -3vw; top: 187px; height: 1px; background: var(--c); opacity: 0.6; }
  .step__verb { font-size: clamp(48px, 5.4vw, 88px); }
  .js .draw, .js .piece .draw-line { stroke-dashoffset: 0; animation: none; }
  .js .piece .p-wall { opacity: 1; transition: none; }
  .piece .p-glass { transition: none; }
  .btn, .link, .nav__links a::after { transition: none; }
}

@media (max-width: 1080px) and (min-width: 768px) {
  .shelf { grid-template-columns: repeat(3, 1fr); row-gap: 64px; --u: 0.95px; }
  .atelier__visit { grid-column: 1 / span 6; }
  .atelier__adresse { grid-column: 1 / span 6; grid-row: 2; }
  .arche { grid-column: 7 / span 6; }
}

@media (max-width: 767px) {
  body { font-size: 17px; }
  .nav { height: 64px; }
  .nav__links { display: none; }
  .rail { display: none; }
  .hero { height: 150vh; }
  .hero__copy { width: auto; right: var(--gut); bottom: 36px; gap: 20px; }
  .hero__sub { font-size: 17px; }
  .hero__actions { gap: 12px 24px; }
  .hero .btn { width: 100%; }

  .geste__pin { height: auto; display: block; padding: 96px 0 120px; }
  .geste__track { width: auto; height: auto; flex-direction: column; gap: 72px; padding-left: calc(var(--gut) + 28px); }
  .geste__canne { left: calc(var(--gut) + 6px); right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(to bottom, rgba(255,106,31,0.8), rgba(230,236,230,0.45)); }
  .geste__intro { width: auto; padding-top: 0; }
  .step { width: auto; grid-template-rows: 200px auto auto; gap: 12px; }
  .step::before { content: ""; position: absolute; left: -26px; top: 124px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
  .step__fig { position: relative; top: 0; transform: none; max-width: 300px; grid-row: 1; }
  .step__verb { font-size: 60px; }

  .collection__head { display: grid; grid-template-columns: 1fr; row-gap: 20px; }
  .collection__head .display, .collection__head p { grid-column: 1; }
  .shelf { grid-template-columns: 1fr 1fr; column-gap: 20px; row-gap: 56px; --u: 0.6px; border-top: 0; }
  .piece { grid-template-rows: calc(var(--u) * 380) auto auto auto; }
  .piece--hang { border-top: 1px dashed rgba(20,26,23,0.35); }
  .piece__name { font-size: 24px; margin-top: 16px; }

  .atelier { grid-template-columns: 1fr; row-gap: 48px; }
  .atelier__visit, .arche, .atelier__adresse { grid-column: 1; grid-row: auto; }
  .arche { max-width: 420px; width: 100%; justify-self: center; }
  .arche__mouth { padding: 30% 7% 8%; }
  .raccord { height: 22vh; }
  .raccord::after { left: 50%; }
  .day__state { font-size: 11px; }

  .reserver { align-items: end; padding-top: 52vh; min-height: auto; }
  .reserver__body { margin-left: 0; gap: 36px; }
  .form { grid-template-columns: 1fr; }
  .form .btn { width: 100%; }

  .pied__cols { grid-template-columns: 1fr; }
  .pied__cols p:last-child { text-align: left; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .geste__track { display: flex; }
  .step::before { content: ""; position: absolute; left: -26px; top: 124px; right: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--c); opacity: 1; }
  .geste__canne { display: block; }
  .geste__intro { display: grid; grid-template-columns: 1fr; }
  .geste__intro h2, .geste__intro p { grid-column: 1; }
}
