/* ————————————————————————————————
   Designs Genius 2026 : bleu de travail + ciré jaune
   ———————————————————————————————— */

:root {
  --ink:       oklch(21% 0.05 268);
  --ink-2:     oklch(24.5% 0.052 268);
  --ink-3:     oklch(32% 0.05 268);
  --chalk:     oklch(94% 0.02 92);
  --chalk-dim: oklch(73% 0.035 268);
  --cire:      oklch(86% 0.155 92);
  --cire-deep: oklch(76% 0.155 84);
  --coral:     oklch(71% 0.14 40);

  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Familjen Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --stitch: repeating-linear-gradient(90deg, var(--cire) 0 9px, transparent 9px 16px);
  --stitch-v: repeating-linear-gradient(180deg, var(--ink-3) 0 9px, transparent 9px 16px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ————— Flavors : le fil se choisit sur l'établi ————— */
html[data-flavor="corail"] { --cire: oklch(75% 0.14 32); --cire-deep: oklch(65% 0.14 28); }
html[data-flavor="menthe"] { --cire: oklch(82% 0.14 160); --cire-deep: oklch(72% 0.14 155); }
html[data-flavor="lilas"]  { --cire: oklch(78% 0.11 300); --cire-deep: oklch(68% 0.12 298); }

::selection { background: var(--cire); color: var(--ink); }

html { background: var(--ink); }

#starfield {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

body {
  background: transparent;
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--cire); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--cire); color: var(--ink); padding: .6rem 1rem; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* ————— Header ————— */

.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 1rem 0;
  background: color-mix(in oklab, var(--ink) 97%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--ink-3) 55%, transparent);
}
.wordmark {
  position: relative;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark span { color: var(--cire); }
.wordmark .wordmark-badge {
  position: absolute;
  top: -.55em; right: 0;
  font-family: var(--font-mono);
  font-size: .5rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; white-space: nowrap;
  color: var(--chalk-dim);
}
.main-nav a {
  font-size: .95rem; font-weight: 500; text-decoration: none; color: var(--chalk-dim);
  transition: color .2s;
}
.main-nav a:hover { color: var(--chalk); }
.lang-switch {
  font-family: var(--font-mono); font-size: .8rem; text-decoration: none;
  color: var(--chalk-dim); border: 1px solid var(--ink-3); border-radius: 99px; padding: .25rem .6rem;
  transition: color .2s, border-color .2s;
}
.lang-switch:hover { color: var(--chalk); border-color: var(--chalk-dim); }

/* ————— Boutons ————— */

.btn-cire {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--cire); color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  padding: .85rem 1.5rem; border-radius: 99px; text-decoration: none;
  transition: background .2s, transform .25s var(--ease-out);
}
.btn-cire:hover { background: var(--cire-deep); color: var(--ink); }
.btn-cire .ico { display: inline-block; transition: transform .25s var(--ease-out); }
.btn-cire:hover .ico { transform: translateX(4px); }
.btn-cire:hover .ico-down { transform: translateY(4px); }
.btn-cire-sm { font-size: .9rem; padding: .5rem 1rem; }

.mail-link {
  font-family: var(--font-mono); font-size: .95rem; color: var(--chalk-dim);
  text-decoration: underline dashed; text-decoration-color: var(--cire); text-underline-offset: 6px; text-decoration-thickness: 1.5px;
  transition: color .2s;
}
.mail-link:hover { color: var(--cire); }

/* ————— Héro ————— */

.hero { padding: clamp(5rem, 14vh, 9rem) 0 clamp(4rem, 10vh, 7rem); position: relative; }
.eyebrow {
  font-family: var(--font-mono); font-size: .85rem; letter-spacing: .04em;
  color: var(--chalk-dim); margin-bottom: 2.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.eyebrow::before { content: ""; width: 72px; height: 2px; background: var(--stitch); flex: none; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 7.25rem);
  font-weight: 800; line-height: 0.98; letter-spacing: -0.025em;
  margin: 0 0 2.5rem;
}
.hero h1 em { font-style: normal; color: var(--cire); }
.work-year {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--font-mono); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .18em; color: var(--cire);
  margin: 0 0 .75rem;
}
.work-year::before {
  content: ""; width: 34px; height: 3px;
  background: var(--stitch);
}
.work-client { margin: 1.5rem 0 0; }
.work-client img { height: 21px; width: auto; opacity: .75; }

/* ————— Bobines de fil (navbar) ————— */
.nav-flavors {
  display: flex; align-items: center;
  gap: .55rem;
}
.flavor {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 0; padding: 0; cursor: pointer;
  transition: transform .2s var(--ease-out);
}
.flavor:hover { transform: scale(1.25); }
.flavor[aria-pressed="true"] { transform: scale(1.2); box-shadow: 0 0 0 2px var(--ink), 0 0 0 3.5px var(--chalk-dim); }
.flavor-cire   { background: oklch(86% 0.155 92); }
.flavor-corail { background: oklch(75% 0.14 32); }
.flavor-menthe { background: oklch(82% 0.14 160); }
.flavor-lilas  { background: oklch(78% 0.11 300); }
@media (max-width: 575.98px) { .nav-flavors { display: none; } }


.hero-intro p {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.6;
  max-width: 46ch; color: var(--chalk); margin-bottom: 2.75rem;
}
.hero-thread {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 2px; height: clamp(3rem, 8vh, 5.5rem);
  background: repeating-linear-gradient(180deg, var(--cire) 0 9px, transparent 9px 16px);
}

/* ————— Reel héro ————— */

.hero-reel { margin: clamp(3rem, 7vh, 4.5rem) 0 0; }
.hero-reel video { display: block; width: 100%; height: auto; }

/* ————— Chapitres ————— */

.chapter { padding: clamp(5rem, 12vh, 8.5rem) 0; border-top: 1px solid color-mix(in oklab, var(--ink-3) 45%, transparent); }

.chapter-head { display: flex; align-items: baseline; gap: 1.25rem; margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.chapter-num {
  font-family: var(--font-mono); font-weight: 600; font-size: 1rem; color: var(--cire);
  padding-bottom: .35rem;
}
.chapter-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.25rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1; margin: 0;
}

.lead-line {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.3;
  color: var(--cire); margin-bottom: 1.75rem; max-width: 30ch;
}

.prose p { max-width: 58ch; margin-bottom: 1.4rem; color: var(--chalk); }
.prose p:last-child { margin-bottom: 0; }
.aside-note { color: var(--chalk-dim); font-size: .95rem; }

/* Fiche d'atelier */

.fiche { margin: 0; border-top: 2px solid transparent; border-image: var(--stitch) 1; border-image-width: 2px 0 0 0; padding-top: 1.5rem; }
.fiche > div {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding: .8rem 0; border-bottom: 1px solid color-mix(in oklab, var(--ink-3) 60%, transparent);
}
.fiche dt { font-family: var(--font-mono); font-size: .8rem; color: var(--chalk-dim); font-weight: 400; padding-top: .2rem; }
.fiche dd { margin: 0; text-align: right; font-weight: 600; max-width: 22ch; }

/* ————— Terminal ————— */

.terminal {
  background: oklch(17% 0.04 268);
  border: 1px solid var(--ink-3);
  border-radius: 14px; overflow: hidden; margin: 0;
  box-shadow: 0 24px 60px -24px oklch(10% 0.04 268 / 0.8);
}
.terminal-bar, .browser-bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .7rem 1rem; border-bottom: 1px solid color-mix(in oklab, var(--ink-3) 60%, transparent);
}
.terminal .dot, .browser .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--ink-3); }
.terminal-title { font-family: var(--font-mono); font-size: .75rem; color: var(--chalk-dim); margin-left: .6rem; }
.terminal pre {
  margin: 0; padding: 1.4rem 1.5rem; overflow-x: auto;
  font-family: var(--font-mono); font-size: .85rem; line-height: 1.85; color: var(--chalk);
}
.t-prompt { color: var(--chalk-dim); }
.t-ok { color: oklch(78% 0.14 150); }
.t-ia { color: var(--coral); }
.t-caret {
  display: inline-block; width: .55em; height: 1.1em; vertical-align: text-bottom;
  background: var(--cire); animation: caret 1.1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .t-caret { animation: none; } }

.fig-note { font-size: .9rem; color: var(--chalk-dim); margin-top: 1.25rem; font-style: italic; }

/* ————— Réalisations ————— */

.work { margin-top: clamp(3.5rem, 8vh, 5.5rem); }
.work h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.01em; margin-bottom: 1rem; }
.work p { max-width: 42ch; color: var(--chalk); }
.work-tags { font-family: var(--font-mono); font-size: .8rem; color: var(--chalk-dim); margin-top: 1.25rem; }

.browser {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--ink-3);
  background: var(--ink-2);
  box-shadow: 0 24px 60px -24px oklch(10% 0.04 268 / 0.8);
}
.browser .url {
  font-family: var(--font-mono); font-size: .75rem; color: var(--chalk-dim);
  background: color-mix(in oklab, var(--ink) 70%, transparent);
  border-radius: 6px; padding: .2rem .8rem; margin-left: .6rem;
}
.browser img { display: block; width: 100%; height: auto; }

/* ————— Contact ————— */

.chapter-contact { padding-bottom: clamp(6rem, 14vh, 10rem); }
.status-line {
  display: flex; align-items: center; gap: .8rem;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-bottom: 1.5rem;
}
.status-dot { width: 14px; height: 14px; border-radius: 50%; background: oklch(78% 0.14 150); box-shadow: 0 0 16px 2px oklch(78% 0.14 150 / .5); }

.mega-mail {
  display: inline-block; margin-top: 2.5rem;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 4.6vw, 3.9rem);
  color: var(--cire); text-decoration: underline dashed; text-decoration-thickness: 3px; text-underline-offset: 14px;
  transition: color .2s;
  overflow-wrap: anywhere;
}
.mega-mail:hover { color: var(--chalk); }

/* ————— Footer ————— */

.site-footer {
  border-top: 2px solid transparent; border-image: var(--stitch) 1; border-image-width: 2px 0 0 0;
  padding: 2rem 0 2.5rem; font-size: .9rem; color: var(--chalk-dim);
}
.site-footer p { margin: 0; }
.footer-wink { font-style: italic; }

/* ————————————————————————————————
   Pages réalisation
   ———————————————————————————————— */

/* Archives de l'atelier : tokens par défaut, la charte DG elle-même */

.case {
  --c-plate: var(--cire);
  --c-deep:  var(--ink-2);
  --c-pop:   var(--cire);
}

.plate-hero .shot-hero {
  position: relative; z-index: 2;
  max-width: 920px; margin-inline: auto;
  transform: translateY(var(--overlap));
  margin-top: calc(var(--overlap) * -0.4);
}

.plate-mosaic { padding: clamp(3rem, 7vh, 5rem) 0; }
.collage-flow { columns: 2 340px; column-gap: clamp(1rem, 2.5vw, 1.75rem); }
.collage-flow .shot { margin: 0 0 clamp(1rem, 2.5vw, 1.75rem); }

.shot-video { margin: clamp(2.5rem, 6vh, 4rem) 0 .9rem; }
.shot-video iframe { border: 0; }

.case-pancreoscopie {
  --c-plate: oklch(61% 0.16 142);
  --c-deep:  oklch(30% 0.075 275);
  --c-pop:   oklch(89% 0.17 100);
}

.case-head { padding: clamp(4rem, 10vh, 7rem) 0 clamp(3rem, 7vh, 5rem); }
.back-link {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .85rem; letter-spacing: .04em;
  color: var(--chalk-dim); text-decoration: none; margin-bottom: 2.5rem;
  transition: color .2s;
}
.back-link:hover { color: var(--cire); }
.back-link .ico { display: inline-block; transition: transform .25s var(--ease-out); }
.back-link:hover .ico { transform: translateX(-4px); }

.case-head h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 7.25rem);
  font-weight: 800; line-height: 0.98; letter-spacing: -0.025em;
  margin: 0 0 2rem;
}
.case-dek {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem); line-height: 1.35;
  max-width: 32ch; color: var(--chalk-dim); margin: 0;
}
.case-dek strong { color: var(--chalk); }

/* Aplat plein écran */

.plate { position: relative; }
.plate-hero {
  --overlap: clamp(3rem, 9vh, 6rem);
  background: var(--c-plate);
  padding: clamp(3.5rem, 9vh, 6rem) 0 0;
  border-top: 2px solid transparent; border-image: var(--stitch) 1; border-image-width: 2px 0 0 0;
}
.plate-hero .browser {
  position: relative; z-index: 2;
  transform: translateY(var(--overlap));
  margin-top: calc(var(--overlap) * -0.4);
}
.case-overview { padding: calc(clamp(3rem, 9vh, 6rem) + clamp(3rem, 7vh, 5rem)) 0 clamp(4rem, 9vh, 6rem); }
.site-link {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 2.25rem;
  font-family: var(--font-mono); font-size: .95rem; color: var(--chalk);
  text-decoration: underline dashed; text-decoration-color: var(--cire); text-underline-offset: 6px; text-decoration-thickness: 1.5px;
  transition: color .2s;
}
.site-link:hover { color: var(--cire); }
.site-link .ico { display: inline-block; transition: transform .25s var(--ease-out); }
.site-link:hover .ico { transform: translate(3px, -3px); }

/* Chapitre qui se termine sur un aplat */

.chapter-flush { padding-bottom: 0; }
.chapter-flush .plate { margin-top: clamp(2.5rem, 6vh, 4rem); padding: clamp(3rem, 7vh, 5rem) 0; }
.plate-deep { background: var(--c-deep); }
.plate-pop { background: var(--c-pop); }

.collage { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.collage-duo { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); grid-template-columns: 3fr 2fr; align-items: start; }
.shot { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px -24px oklch(10% 0.04 268 / 0.55); }
.shot img { display: block; width: 100%; height: auto; }
.plate-note { margin-top: 1.75rem; color: oklch(94% 0.02 92 / .75); }
.plate-note-ink { color: oklch(32% 0.06 100); }

@media (max-width: 767px) {
  .collage-duo { grid-template-columns: 1fr; }
}

/* Carnet d'atelier */

.pull-quote { padding: clamp(5rem, 13vh, 9rem) 0; }
.pull-quote blockquote {
  margin: 0; position: relative; max-width: 30ch;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.2vw, 3.1rem);
}
.pull-quote blockquote::before {
  content: "«"; position: absolute; left: -0.15em; top: -0.55em;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(5rem, 11vw, 9rem); line-height: 1; color: var(--cire);
  opacity: .9;
}
.pull-quote blockquote p {
  font-weight: 700; font-size: inherit; line-height: 1.18; letter-spacing: -0.015em;
  margin: 0; padding-top: clamp(2.5rem, 6vw, 4.5rem);
}
.quote-source { font-family: var(--font-mono); font-size: .85rem; color: var(--chalk-dim); margin: 2rem 0 0; }

/* Tuile réalisation suivante */

.next-tile {
  position: relative; display: block; overflow: hidden;
  min-height: clamp(300px, 42vh, 440px);
  border-top: 2px solid transparent; border-image: var(--stitch) 1; border-image-width: 2px 0 0 0;
  text-decoration: none;
}
.next-tile > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.34) saturate(0.85);
  transition: transform .6s var(--ease-out), filter .4s;
}
.next-tile:hover > img { transform: scale(1.03); filter: brightness(0.42) saturate(0.95); }
.next-tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 30%, oklch(21% 0.05 268 / 0.75));
}
.next-inner {
  position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
  gap: .75rem; min-height: inherit; padding-top: 3rem; padding-bottom: 3rem;
}
.next-label { font-family: var(--font-mono); font-size: .85rem; letter-spacing: .04em; color: var(--cire); }
.next-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1; color: var(--chalk);
  display: inline-flex; align-items: center; gap: 1rem;
}
.next-title .ico { display: inline-block; transition: transform .25s var(--ease-out); }
.next-tile:hover .next-title .ico { transform: translateX(8px); }

/* Lien « histoire » des réalisations (home) */

.work-more {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--cire); text-decoration: none;
}
.work-more:hover { color: var(--cire-deep); }
.work-more .ico { display: inline-block; transition: transform .25s var(--ease-out); }
.work-more:hover .ico { transform: translateX(4px); }

/* Screenshot cliquable (home) */

.work-shot { display: block; text-decoration: none; }
.work-shot .browser { transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.work-shot:hover .browser,
.work-shot:focus-visible .browser { transform: translateY(-6px); box-shadow: 0 32px 70px -22px oklch(10% 0.04 268 / 0.9); }
@media (prefers-reduced-motion: reduce) {
  .work-shot .browser { transition: none; }
  .work-shot:hover .browser, .work-shot:focus-visible .browser { transform: none; }
}

/* Les gouttières g-5 (marges -24px) dépassent le padding container (12px) sous lg */
@media (max-width: 991px) {
  .row.g-5 { --bs-gutter-x: 1.5rem; }
}

/* Registre des archives (home) */

.archives { margin-top: clamp(4rem, 9vh, 6rem); }
.archives-head {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.015em;
  margin: 0 0 .75rem;
}
.archives-intro { color: var(--chalk-dim); max-width: 62ch; margin: 0 0 2.25rem; }
.archive-index { list-style: none; margin: 0; padding: 0; counter-reset: archive; }
.archive-index li { counter-increment: archive; border-top: 1px solid var(--ink-3); }
.archive-index li:last-child { border-bottom: 1px solid var(--ink-3); }
.archive-index a {
  display: grid; grid-template-columns: 3rem minmax(0, 5fr) minmax(0, 6fr) auto;
  gap: 1.25rem; align-items: baseline;
  padding: 1.05rem .25rem; text-decoration: none;
}
.archive-index a::before {
  content: counter(archive, decimal-leading-zero);
  font-family: var(--font-mono); font-size: .8rem; color: var(--chalk-dim);
}
.archive-title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; transition: color .2s; }
.archive-tag { color: var(--chalk-dim); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-index .ico {
  display: inline-block; color: var(--cire);
  opacity: 0; transform: translateX(-6px);
  transition: opacity .25s, transform .25s var(--ease-out);
}
.archive-index a:hover .archive-title, .archive-index a:focus-visible .archive-title { color: var(--cire); }
.archive-index a:hover .ico, .archive-index a:focus-visible .ico { opacity: 1; transform: none; }
@media (max-width: 767px) {
  .archive-index a { grid-template-columns: 2.2rem 1fr auto; }
  .archive-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .archive-index .ico { transition: none; transform: none; }
}

/* ————— Reveals ————— */

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
