/* /comptoir — the jeweller's velvet tray, in Cairn's palette.
   Forest velvet is the ground, cream is the tags, mint is the one accent:
   it lights a ready piece and marks the primary action, nothing else. */
/* The homepage type system (css/style.css): Inter Tight for headings, labels and buttons,
   Newsreader Light for the reading text. */
@font-face { font-family: "Inter Tight"; src: url("../assets/fonts/inter-tight-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../assets/fonts/newsreader-normal.woff2") format("woff2"); font-weight: 300 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 300 400; font-style: italic; font-display: swap; }

:root {
  --bg: #06110d;
  --velvet: #0e2a1f;
  --velvet-deep: #0b1c16;
  --well: #061510;
  --ink: #f2eee4;
  --ink-body: #d9ddd4;
  --ink-soft: #b9c4bc;
  --mint: #569f7e;          /* the homepage mint (#6cc79d), 20 % darker */
  --mint-ink: #04140d;
  --cream: #efe9dc;
  --tag-ink: #0b1c16;
  --line: rgba(214, 230, 220, .16);
  --sans: "Inter Tight", system-ui, sans-serif;     /* homepage --sans */
  --serif: "Newsreader", Georgia, serif;            /* homepage --serif */
  --gutter: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* Velvet nap: fine fractal grain laid over the forest ground. */
  --nap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .8 0 0 0 0 .95 0 0 0 0 .88 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #2c4a3d var(--bg); }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55;
  background: var(--nap), radial-gradient(ellipse 90% 70% at 72% 18%, var(--velvet) 0%, var(--velvet-deep) 45%, var(--bg) 85%) fixed, var(--bg);
  -webkit-font-smoothing: antialiased; caret-color: var(--mint); accent-color: var(--mint);
}
::selection { background: var(--mint); color: var(--mint-ink); }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Homepage headings: Inter Tight bold, tight tracking. */
h1, h2 { font-family: var(--sans); font-weight: 700; text-wrap: balance; margin: 0; }
h1 { letter-spacing: -.035em; }
h2 { letter-spacing: -.03em; }
/* Homepage reading text: Newsreader Light. */
.lede, .path p, .outil-copy p, .fit dd, .close > p { font-family: var(--serif); font-weight: 300; }
.path p, .outil-copy p, .fit dd, .close > p { font-size: clamp(18px, 1.35vw, 21px); line-height: 1.5; }
strong { font-weight: 600; color: var(--ink); }

/* The homepage particles, gathered into a square around the tray (js/comptoir-square.js). */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.nav, main, .foot { position: relative; z-index: 1; }
/* The homepage frame (css/style.css): a fine line 12 px inside the window, over everything, never in the way. */
.frame { position: fixed; inset: 12px; border: 1px solid rgba(214, 230, 220, .18); pointer-events: none; z-index: 3; }

/* ---------- nav ---------- */
/* Same logo, wordmark and links as the homepage header (css/style.css), value for value. */
.nav { display: flex; justify-content: space-between; align-items: center; padding: 30px calc(var(--gutter) + 4px) 26px; line-height: normal; }
/* The nav follows the scroll, transparent like the homepage header. */
.nav { position: sticky; top: 0; z-index: 2; }
html { scroll-padding-top: var(--nav-h, 99px); }
.brand { display: flex; align-items: center; gap: 18px; color: var(--ink); text-decoration: none; }
.brand img { width: 46px; height: auto; opacity: .92; }
.brand-text { display: flex; flex-direction: column; gap: 6px; }
.brand-name { font-family: "Newsreader", Georgia, serif; font-size: 24px; letter-spacing: .55em; text-transform: uppercase; line-height: 1; }
.brand-sub { font-family: "Inter Tight", system-ui, sans-serif; font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--ink-soft); }
.nav-links { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav-links a { font-family: "Newsreader", Georgia, serif; font-size: 18px; color: var(--ink); text-decoration: none; opacity: .85; transition: opacity .2s; }
.nav-links a:hover, .nav-links a:focus-visible { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
@media (max-width: 820px) {
  .nav { padding-top: 26px; }
  .nav-links a { font-size: 16px; }
  .brand img { width: 38px; }
  .brand-name { font-size: 19px; }
}

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
/* The homepage button (css/style.css .btn), value for value: cream outline on a light veil, fills cream on hover. */
.btn { display: inline-flex; align-items: center; gap: 22px; padding: 16px 30px; border: 1px solid var(--ink); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-family: "Inter Tight", system-ui, sans-serif; font-size: 17px; font-weight: 500;
  background: rgba(6, 17, 13, .35); backdrop-filter: blur(4px); transition: background .25s, color .25s; }
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--bg); }
.btn { white-space: nowrap; }
/* Desktop QR next to the demo button, a cream card like the tray tags. Hidden where the visitor already holds a phone. */
.qr { display: none; }
@media (min-width: 961px) and (hover: hover) {
  .qr { display: inline-flex; align-items: center; gap: 14px; }
  .qr img { width: 76px; height: 76px; padding: 5px; border-radius: 6px; background: var(--cream); transform: rotate(-2deg); box-shadow: 0 6px 12px -4px rgba(0, 0, 0, .6); }
  .qr span { font-size: 13px; line-height: 1.35; color: var(--ink-soft); max-width: 10.5em; }
}
.btn-text { font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); transition: text-decoration-color .3s; }
.btn-text:hover { text-decoration-color: var(--ink); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 5vw, 90px); align-items: center;
  max-width: 1500px; margin: 0 auto; padding: clamp(24px, 5vh, 70px) var(--gutter) clamp(80px, 12vh, 140px); }
/* Same veil as the homepage copy: the particle line stays visible but never fights the text. */
.hero-copy { background: radial-gradient(closest-side, rgba(6, 17, 13, .62), transparent); }
.hero h1 { font-size: clamp(46px, 5.4vw, 92px); line-height: .92; margin-bottom: 28px; }
.lede { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; color: var(--ink-body); max-width: 31em; margin: 0 0 34px; }
.note { font-size: 14px; color: var(--ink-soft); margin: 18px 0 0; }

/* ---------- the tray ---------- */
.tray-wrap { position: relative; margin: 0; container-type: inline-size; }
/* Desktop: the tray is sized by the window's height (header + caption + margins taken out),
   so tray and caption always sit whole on the first screen; its width follows. */
@media (min-width: 961px) {
  .hero { padding-top: 4px; align-items: start; }
  .hero-copy { padding-top: clamp(8px, 3vh, 64px); }
  .hero .lede { margin-bottom: 26px; }
  .tray-wrap { justify-self: end; width: min(100%, calc((100svh - 200px) * 1.02)); }
  /* Tags scale with the tray (cqi = 1% of its width), never covering more of a piece than at full size. */
  .tag { padding: .45em .75em .5em 1.15em; max-width: 94%; right: 3%; }
}
.tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.2vw, 18px); padding: clamp(12px, 1.6vw, 22px); border-radius: 22px;
  background: var(--nap), radial-gradient(ellipse at 40% 20%, #123627, var(--velvet) 55%, var(--velvet-deep));
  box-shadow: inset 0 0 0 1px rgba(239, 233, 220, .22), inset 0 14px 40px rgba(0, 0, 0, .5), 0 40px 80px -30px rgba(0, 0, 0, .85); }
.slot { position: relative; overflow: hidden; aspect-ratio: 1 / .92; border: 0; border-radius: 14px; padding: 0; cursor: pointer; color: inherit; font: inherit;
  background: radial-gradient(ellipse at 50% 38%, #0d2a1e, var(--well) 70%);
  box-shadow: inset 0 6px 16px rgba(0, 0, 0, .7), inset 0 -1px 0 rgba(239, 233, 220, .06);
  transition: background .9s var(--ease); }
.slot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; z-index: 1; mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 40%, rgba(86, 159, 126, .30), rgba(86, 159, 126, .06) 50%, transparent 72%);
  transition: opacity .9s var(--ease); }
.slot.is-lit::before { opacity: 1; }
/* Real photographs of the pieces on the same velvet: dimmed while waiting, full light once ready. */
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 92%; border-radius: inherit;
  transform: scale(1.04); filter: brightness(.74) saturate(.92); transition: transform .8s var(--ease), filter .9s var(--ease); }
.slot:hover .photo { transform: scale(1.09); }
.slot.is-lit .photo { filter: brightness(1.02) saturate(1.04); }
.slot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(239, 233, 220, .08); }
/* The tag is sewn to its piece: a thread runs from the tag's eyelet up to the piece. */
.tag { position: absolute; z-index: 2; right: 4%; bottom: 5%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  background: var(--cream); color: var(--tag-ink); padding: 7px 11px 8px 16px; border-radius: 3px 10px 10px 3px; transform: rotate(-3deg);
  box-shadow: 0 6px 12px -4px rgba(0, 0, 0, .6); transition: background-color .6s var(--ease); max-width: 88%; }
.tag::before { content: ""; position: absolute; left: 6px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--well); }
.tag::after { content: ""; position: absolute; left: 8px; top: 50%; width: 1px; height: 30px; background: rgba(239, 233, 220, .32); transform-origin: bottom; transform: translateY(-30px) rotate(-38deg); }
.tag .no { font-family: var(--sans); font-weight: 600; font-size: clamp(12.5px, 2.5cqi, 19px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tag .st { font-size: clamp(11px, 1.65cqi, 12.5px); font-weight: 600; line-height: 1.2; }
.slot.is-lit .tag { background: var(--mint); }
.slot.is-late .tag .st { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.slot.is-new::before { animation: breathe 3.6s var(--ease) infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* Clear of the particle band that runs around the tray. */
.tray-cap { margin-top: 50px; font-size: 14px; color: var(--ink-soft); min-height: 2.6em; }

/* The ready message unfolds from the tag, like a note pulled from the tray. */
.billet { position: absolute; left: 50%; bottom: 58px; width: min(360px, 86%); transform: translateX(-50%); z-index: 2;
  background: var(--cream); color: var(--tag-ink); border-radius: 6px; padding: 18px 20px 16px;
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .9); clip-path: inset(0 0 0 0 round 6px);
  animation: unfold .7s var(--ease) both; }
.billet[hidden] { display: none; }
@keyframes unfold { from { clip-path: inset(0 0 100% 0 round 6px); transform: translate(-50%, 10px); } to { clip-path: inset(0 0 0 0 round 6px); transform: translate(-50%, 0); } }
.billet-head { font-family: var(--sans); font-weight: 600; letter-spacing: .02em; font-size: 12.5px; margin: 0 0 8px; color: #355246; }
.billet-msg { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; margin: 0 0 12px; }
.billet-foot { font-size: 13px; margin: 0; color: #355246; }
.billet-close { position: absolute; right: 8px; top: 6px; min-width: 40px; min-height: 40px; border: 0; background: none; color: #355246; font: inherit; font-size: 13px; cursor: pointer; border-radius: 6px; }
.billet-close:hover { color: var(--tag-ink); }

/* ---------- sections ---------- */
main > section:not(.hero) { max-width: 1500px; margin: 0 auto; padding: clamp(80px, 12vh, 150px) var(--gutter); border-top: 1px solid var(--line); }
h2 { font-size: clamp(36px, 4.6vw, 68px); line-height: 1; }

.path { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; }
.path::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 1px; background: var(--line); }
.path li { position: relative; padding-top: 64px; }
/* Each stop is one of the tray's tags: the same cream card, the ready one lit. */
.stop { position: absolute; top: -6px; left: 0; display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 700; letter-spacing: -.02em; font-size: 22px; line-height: 1;
  background: var(--cream); color: var(--tag-ink); padding: 8px 16px 9px 14px; border-radius: 3px 10px 10px 3px; transform: rotate(-2deg);
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .8); }
.stop::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--well); }
.stop { transition: background-color .5s var(--ease); }
.stop-lit { background: var(--mint); }
.path p { color: var(--ink-body); max-width: 26em; margin: 0; }

.outil { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 110px); align-items: center; }
.outil-copy p { color: var(--ink-body); max-width: 30em; margin: 24px 0 30px; }
.screens { position: relative; height: clamp(440px, 46vw, 680px); }
.screen { position: absolute; width: clamp(200px, 19vw, 300px); height: auto; border-radius: 26px;
  box-shadow: 0 0 0 9px #13241c, 0 0 0 10px rgba(239, 233, 220, .14), 0 40px 70px -24px rgba(0, 0, 0, .9); }
.screen-a { left: 6%; top: 0; transform: rotate(-3deg); }
.screen-b { right: 6%; bottom: 0; transform: rotate(2.5deg); }

.atelier h2 { max-width: 16em; }
.fit { margin: 64px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 48px; }
.fit div { border-top: 1px solid var(--line); padding-top: 22px; }
.fit dt { font-family: var(--sans); font-weight: 700; letter-spacing: -.02em; font-size: 24px; line-height: 1.15; margin-bottom: 12px; }
.fit dd { margin: 0; color: var(--ink-body); }

.close { text-align: center; }
.close h2 { margin: 0 auto; max-width: 14em; }
.close > p { color: var(--ink-body); margin: 22px auto 36px; max-width: 28em; }
.close .actions { justify-content: center; }
/* The last screen: the demo button and the link on one line, the QR on the line below. */
.close > .qr { justify-content: center; text-align: left; margin-top: 26px; }

/* Inside the last section: the credits, at the foot of the same screen. */
.foot { text-align: center; color: var(--ink-soft); font-size: 13px; margin-top: clamp(64px, 10vh, 120px); padding: 0; }
.foot p { margin: 0; }
.foot a { color: var(--ink-soft); }

/* ---------- one section per screen ---------- */
/* Desktop: every section fills one screen, scrolling stays free (no snapping). The first screen is the header plus the hero
   (--nav-h is measured in js/comptoir-page.js); every other section fills the window, content centred. */
@media (min-width: 961px) and (min-height: 600px) {
  .hero { min-height: calc(100svh - var(--nav-h, 99px)); padding-bottom: 12px; }
  main > section:not(.hero) { min-height: 100svh; padding-block: clamp(48px, 8vh, 110px);
    display: flex; flex-direction: column; justify-content: center; }
  main > section.outil { display: grid; align-content: center; }
  /* Parcours: three screens tall, its content pinned while the grains walk Déposée → Prête → Récupérée. */
  main > section.parcours { display: block; position: relative; height: 300svh; min-height: 0; padding-block: 0; }
  .parcours-stage { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: clamp(48px, 8vh, 110px); }
  /* The two phones shrink with the window's height so the section never spills onto the next screen. */
  .screens { height: min(46vw, 680px, calc(100svh - 180px)); }
  .screen { width: min(19vw, 300px, calc((100svh - 180px) * .42)); }
  /* Last screen: the call centred in the space above, the footer on the bottom edge. */
  main > section.close { padding-bottom: 34px; }
  .close > h2 { margin-top: auto; }
  .close .foot { margin-top: auto; }
  .close .actions { margin-bottom: clamp(24px, 6vh, 64px); }
}
/* With the QR shown, the gap above the footer goes under the QR instead. */
@media (min-width: 961px) and (min-height: 600px) and (hover: hover) {
  .close .actions { margin-bottom: 0; }
  .close > .qr { margin-bottom: clamp(24px, 6vh, 64px); }
}

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  .hero, .outil { grid-template-columns: 1fr; }
  .hero { padding-top: 8px; }
  .path, .fit { grid-template-columns: 1fr; gap: 36px; }
  .path::before { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .path li { padding: 40px 0 0 32px; }
  .screens { height: auto; display: flex; justify-content: center; gap: 14px; }
  .screen { position: static; width: min(46%, 240px); }
}
@media (max-width: 640px) {
  .nav-links a:not(:last-child) { display: none; }
  .slot-extra { display: none; }
  /* Phone: the slot grows taller and the piece rises, so the tag hangs below it instead of covering it. */
  .slot { aspect-ratio: 1 / 1.28; }
  /* Phone slots are taller than the photo: lift it so the piece sits above the tag. */
  .photo { transform: scale(1.04) translateY(-14%); }
  .slot:hover .photo { transform: scale(1.07) translateY(-14%); }
  .tag { left: 6%; right: 6%; bottom: 6%; max-width: none; padding: 5px 7px 6px 12px; transform: rotate(-2deg); }
  .tag::after { display: none; }
  .tag .no { font-size: 13.5px; }
  .tag .st { font-size: 11px; }
  .billet { position: relative; left: 0; bottom: 0; transform: none; width: 100%; margin-top: 14px; animation-name: unfold-flow; }
}
@keyframes unfold-flow { from { clip-path: inset(0 0 100% 0 round 6px); transform: translateY(10px); } to { clip-path: inset(0 0 0 0 round 6px); transform: none; } }

/* Reduced motion: the light still comes on and the note still unfolds, slower and smaller, never frozen. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slot.is-new::before { animation: breathe-soft 7s ease-in-out infinite; }
  .billet { animation-duration: .35s; }
  .slot:hover .photo { transform: scale(1.04) translateY(-14%); }}
@keyframes breathe-soft { 0%, 100% { opacity: 1; } 50% { opacity: .8; } }

/* ---------- reveal, as on the homepage (css/style.css) ----------
   The section under the middle of the screen is active (js/comptoir-page.js): its lines
   rise 24 px and fade in, one after the other. Leaving a section fades it out quickly.
   --d is each line's place in its section, set by the script. */
.reveals .reveal { opacity: 0; transform: translateY(24px); transition: opacity .4s ease, transform .4s cubic-bezier(.2, .7, .2, 1); }
.reveals .is-active .reveal { opacity: 1; transform: none; transition-duration: .9s; transition-delay: calc(.3s + var(--d, 0) * .08s); }
/* The hero is active straight from the HTML, so its copy shows on first paint: a transition
   can't run then, so the same fade is a keyframe, with the same timing. */
@keyframes reveal-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes reveal-fade { from { opacity: 0; } }
.reveals .hero.is-active .reveal { animation: reveal-in .9s cubic-bezier(.2, .7, .2, 1) calc(.3s + var(--d, 0) * .08s) backwards; }
/* The title is the page's largest element: it rises into place but never starts invisible,
   so the browser counts it as painted at once (LCP, SEO audit v3). */
@keyframes rise-in { from { transform: translateY(24px); } }
.reveals .hero.is-active h1.reveal { animation-name: rise-in; }
@media (prefers-reduced-motion: reduce) {
  .reveals .reveal, .reveals .is-active .reveal { transform: none; }
  .reveals .hero.is-active .reveal { animation-name: reveal-fade; }
  .reveals .hero.is-active h1.reveal { animation: none; }
}
