/* Portfolio d'Emmanuel Bochu — noir OLED, un grand objet 3D piloté par le défilement.
   Sans JavaScript ou en mouvement réduit : une page de texte et de captures, lisible telle quelle. */

@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/HankenGrotesk-400.ttf") format("truetype"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/HankenGrotesk-600.ttf") format("truetype"); }

:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f5f5f7;
  --fg-2: #a1a1a6;
  --fg-3: #86868b;
  --line: rgba(255, 255, 255, 0.14);
  --link: #2997ff;
  --font: "Hanken Grotesk", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 5vw, 64px);
  --nav-h: 52px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scrollbar-color: #3a3a3c var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1.0625rem/1.55 var(--font); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
::selection { background: var(--fg); color: #000; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 30; padding: 10px 16px; background: var(--fg); color: #000; border-radius: 999px; font-weight: 600; }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--pad); }

/* ——— Navigation : verre dépoli, comme une barre système ——— */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--nav-h); background: rgba(0, 0, 0, 0.9); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.nav .wrap { max-width: 1320px; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.nav ul { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 32px); font-size: 0.875rem; color: var(--fg-2); }
.nav a { text-decoration: none; transition: color 0.2s; }
.nav ul a:hover, .nav a[aria-current="page"] { color: var(--fg); }

/* ——— Boutons ——— */
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 24px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: var(--fg); font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s; }
.pill:hover { background: rgba(255, 255, 255, 0.12); }
.pill.solid { background: var(--fg); color: #000; border-color: var(--fg); }
.pill.solid:hover { background: #fff; }
.link { color: var(--link); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }

/* ——— Qui a écrit le code : un cercle plein, à moitié, vide ——— */
.glyph { display: inline-block; width: 13px; height: 13px; margin-right: 9px; border: 1.5px solid var(--fg); border-radius: 50%; vertical-align: -1px; }
.glyph.moi { background: var(--fg); }
.glyph.binome { background: linear-gradient(90deg, var(--fg) 50%, transparent 50%); }
.glyph.ia { background: transparent; }
.who { margin: 0 0 20px; color: var(--fg-2); font-size: 0.9375rem; line-height: 1.5; }
.who strong { color: var(--fg); font-weight: 600; }

/* ——— Scène 3D : grand objet derrière le texte ——— */
#scene { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: none; pointer-events: none; }
.is3d #scene { display: block; }
.journey, .sec, .foot { position: relative; z-index: 1; }

/* ——— Accueil ——— */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(var(--nav-h) + clamp(48px, 10svh, 120px)) var(--pad) clamp(56px, 8svh, 96px); }
.hero h1 { font-size: clamp(2.75rem, 10.5vw, 6rem); letter-spacing: -0.04em; line-height: 0.98; }
.hero .lead { max-width: 40ch; margin: clamp(16px, 2.4vw, 24px) auto clamp(24px, 3vw, 32px); color: var(--fg); font-size: clamp(1.125rem, 2.3vw, 1.5rem); line-height: 1.35; letter-spacing: -0.015em; }
.hero .sub { max-width: 46ch; margin: 12px auto clamp(22px, 3vw, 30px); color: var(--fg-3); font-size: clamp(0.9375rem, 1.6vw, 1.0625rem); line-height: 1.45; }
.hero .row { justify-content: center; }
.is3d .hero { min-height: 100svh; }
.is3d .hero-copy { opacity: var(--o, 1); transform: translateY(calc((1 - var(--o, 1)) * -30px)); will-change: opacity, transform; }

/* ——— Chapitres projet : repli statique par défaut ——— */
.chapter { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.chapter-in { max-width: 1120px; margin-inline: auto; padding-inline: var(--pad); display: grid; gap: 28px; }
.chapter h2 { font-size: clamp(2.25rem, 6.4vw, 4.5rem); letter-spacing: -0.035em; }
.chapter .sum { max-width: 36ch; margin: 18px 0 18px; color: var(--fg); font-size: clamp(1.125rem, 2vw, 1.375rem); line-height: 1.4; letter-spacing: -0.01em; }
.chapter .hard { margin: 0 0 18px; color: var(--fg-2); font-size: 0.9375rem; line-height: 1.5; }
.chapter .hard strong { color: var(--fg); font-weight: 600; }
.chapter .meta { margin: 0 0 22px; color: var(--fg-3); font-size: 0.875rem; line-height: 1.6; }
.chapter .meta span { display: block; }
.shots { display: grid; gap: 12px; }
.shots img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #0a0a0b; }
.shots.phones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots.phones img { border-radius: 18px; }
.shots pre { margin: 0; padding: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #0a0a0b; color: var(--fg); font: 400 0.8125rem/1.7 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 900px) { .chapter-in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; } }

/* ——— Chapitres projet : mode 3D (pilotés par le défilement) ——— */
.is3d .chapter { height: 250svh; padding: 0; border: 0; }
.is3d .chapter-in { position: sticky; top: 0; height: 100svh; max-width: none; padding: 0 var(--pad) clamp(36px, 8svh, 88px); display: flex; align-items: flex-end; }
.is3d .chapter-text { position: relative; width: min(34rem, 100%); opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 36px)); will-change: opacity, transform; }
.is3d .shots { display: none; }
.is3d .chapter-in::before { content: ""; position: absolute; inset: auto 0 0 0; height: 62%; background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0)); pointer-events: none; }
@media (min-width: 900px) { .is3d .chapter-in::before { height: 100%; inset: 0; background: linear-gradient(to right, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0) 58%); } }

/* ——— Sections courantes, sur fond noir qui recouvre la scène ——— */
.sec { background: var(--bg); padding-block: clamp(72px, 11vw, 150px); border-top: 1px solid var(--line); }
.sec h2 { font-size: clamp(2.25rem, 6vw, 4rem); letter-spacing: -0.035em; max-width: 18ch; }
.sec .big { margin: clamp(24px, 4vw, 40px) 0 0; max-width: 30ch; font-size: clamp(1.5rem, 3.6vw, 2.5rem); line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; }
.sec .big + .big { margin-top: 0.8em; color: var(--fg-2); }
.two { display: grid; gap: 40px; margin-top: clamp(32px, 5vw, 56px); }
.two > div { padding-top: 20px; border-top: 1px solid var(--line); }
.two h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
.two .when { color: var(--fg-3); font-size: 0.875rem; margin-bottom: 10px; }
.two p { color: var(--fg-2); max-width: 40ch; margin: 0; }
@media (min-width: 720px) { .two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; } }

.list { margin-top: clamp(32px, 5vw, 56px); }
.list > li, .list > div { display: grid; gap: 6px 32px; padding-block: 22px; border-top: 1px solid var(--line); }
.list > :last-child { border-bottom: 1px solid var(--line); }
.list h3 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); }
.list .sub { margin: 4px 0 8px; color: var(--fg-3); font-size: 0.9375rem; }
.list p { margin: 0; color: var(--fg-2); max-width: 56ch; }
.list .years { color: var(--fg-3); font-size: 0.9375rem; font-feature-settings: "tnum"; }
.list dt { font-size: clamp(1.125rem, 2vw, 1.375rem); font-weight: 600; letter-spacing: -0.02em; }
.list dd { margin: 0; color: var(--fg-2); }
.list dd + dd { margin-top: 6px; }
.list dd b { color: var(--fg); font-weight: 600; }
.list dd a { color: var(--fg); text-decoration-color: rgba(255,255,255,0.35); text-underline-offset: 0.2em; }
.list dd a:hover { text-decoration-color: var(--fg); }
@media (min-width: 720px) { .list > li, .list > div { grid-template-columns: 200px minmax(0, 1fr); } .faq > div { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

.mail { display: inline-block; margin: clamp(20px, 3vw, 32px) 0; font-size: clamp(1.75rem, 6vw, 3.75rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; text-decoration: none; overflow-wrap: anywhere; }
.mail:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.status { min-height: 1.5em; margin: 14px 0 0; color: var(--fg-3); font-size: 0.875rem; }

.foot { background: var(--bg); border-top: 1px solid var(--line); padding-block: 28px 44px; color: var(--fg-3); font-size: 0.875rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.foot p { margin: 0; }
.foot a { color: var(--fg-2); }

/* ——— Pages projet et légales ——— */
.page { background: var(--bg); position: relative; z-index: 1; padding-top: calc(var(--nav-h) + 24px); }
.back { display: inline-block; margin: 8px 0 clamp(24px, 5vw, 56px); color: var(--fg-2); text-decoration: none; font-size: 0.9375rem; }
.back:hover { color: var(--fg); }
.fiche h1 { font-size: clamp(2.5rem, 8vw, 5.5rem); letter-spacing: -0.04em; max-width: 14ch; }
.fiche .lead { max-width: 40ch; margin: clamp(20px, 3vw, 32px) 0 24px; font-size: clamp(1.25rem, 2.6vw, 1.75rem); line-height: 1.35; letter-spacing: -0.015em; }
.fiche .who { max-width: 56ch; font-size: 1rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin: clamp(32px, 5vw, 56px) 0; padding-block: 24px; border-block: 1px solid var(--line); }
.facts dt { color: var(--fg-3); font-size: 0.875rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
@media (min-width: 820px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fiche-shots { margin-block: clamp(32px, 6vw, 72px); }
.fiche-shots .shots { max-width: 960px; margin-inline: auto; }
.prose { max-width: 66ch; margin-inline: auto; padding-bottom: clamp(48px, 8vw, 96px); }
.prose h2 { font-size: clamp(1.75rem, 3.6vw, 2.25rem); margin: 2.2em 0 0.6em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--fg-2); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul { margin: 0 0 1.2em; }
.prose li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 8px; height: 1.5px; background: var(--fg-3); }
.prose code { padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); color: var(--fg); font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; }
.next { border-top: 1px solid var(--line); padding-block: clamp(40px, 7vw, 80px); }
.next a { display: block; text-decoration: none; }
.next small { display: block; color: var(--fg-3); font-size: 0.875rem; }
.next strong { display: block; margin-top: 6px; font-size: clamp(1.75rem, 5vw, 3.25rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.next a:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.legal { max-width: 66ch; margin-inline: auto; padding-bottom: clamp(48px, 8vw, 96px); }
.legal h1 { font-size: clamp(2.25rem, 7vw, 4rem); letter-spacing: -0.04em; margin-bottom: 12px; }
.legal h2 { font-size: 1.5rem; margin: 2em 0 0.5em; }
.legal p { color: var(--fg-2); }

/* ——— Téléphone ——— */
@media (max-width: 640px) {
  .nav .opt { display: none; }
  .brand { font-size: 1rem; }
  .pill { flex: 1 1 100%; }
  .hero .row { width: 100%; }
  .is3d .chapter .sum { font-size: 1.0625rem; margin: 12px 0 14px; }
  .is3d .chapter h2 { font-size: clamp(2rem, 9.5vw, 2.75rem); }
  .is3d .chapter .meta, .is3d .chapter .hard { display: none; }
  .is3d .chapter h2 { margin-bottom: 14px; }
  .is3d .chapter .row .pill { flex: 0 1 auto; min-height: 42px; padding: 9px 20px; }
  .is3d .who { font-size: 0.875rem; margin-bottom: 14px; }
}
@media (max-width: 380px), (max-height: 640px) {
  .is3d .chapter .sum { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
