/* ==========================================================================
   Portfolio — Mathias Dumain · univers « bistrot »
   Feuille de style unique, sans dépendance externe.

   Direction :
   - Produit : le portfolio d'un étudiant développeur d'applications qui
     cherche un stage, lu par des recruteurs.
   - Caractère : chaleureux, précis, un peu gourmand.
   - Univers : la cuisine de bistrot (carnet de recettes, ardoise, papier).
   - Moments : l'assiette de l'accueil et les fiches recettes des projets.
   - Signature : les annotations manuscrites du chef (petits titres, notes).

   1. Polices  2. Thème  3. Base  4. En-tête  5. Sections  6. Accueil
   7. À propos  8. Projets  9. Compétences  10. Veille  11. Contact
   12. Pages projet  13. Pied de page  14. Mouvement
   Espacements sur une grille de 4 px.
   ========================================================================== */

/* 1. Polices (auto-hébergées) ------------------------------------------- */
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/caveat-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* 2. Thème : rampe neutre chaude, un accent braise ------------------------ */
:root {
  --bg: #f7f4ee;
  --surface: #fdfbf7;
  --surface-2: #efe9df;
  --text: #1f1b16;
  --text-2: #5e554a;
  --muted: #6f665b;
  --line: rgb(31 27 22 / 10%);
  --line-strong: rgb(31 27 22 / 18%);
  --accent: #b4441a;
  --accent-hover: #93360f;
  --accent-ink: #ffffff;
  --accent-soft: #f5e1d3;
  --link: #93360f;
  --navy: #23282d;            /* l'ardoise */
  --navy-text: #f4efe6;       /* la craie */
  --navy-muted: #b7b0a5;
  --chalk-orange: #e7a77f;
  --chalk-green: #a7c4a0;
  --chalk-yellow: #f2c879;
  --wood: #8a6446;
  --wood-dark: #6b4f3a;
  --lined: rgb(84 132 178 / 18%);
  --margin-line: rgb(214 96 96 / 40%);
  --postit: #f6e6b4;
  --postit-ink: #2b2420;
  --ok: #3f6b37;
  --error: #b91c1c;
  --shadow: 0 1px 2px rgb(31 27 22 / 6%), 0 8px 24px rgb(31 27 22 / 6%);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --r-ctl: 10px;
  --r-card: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fast: 150ms;
  --slow: 400ms;
  --container: 1160px;
  --header-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161513; --surface: #1c1a18; --surface-2: #262421;
    --text: #efe9de; --text-2: #aaa398; --muted: #9a9389;
    --line: rgb(239 233 222 / 9%); --line-strong: rgb(239 233 222 / 16%);
    --accent: #f08a5d; --accent-hover: #f6a985; --accent-ink: #161513; --accent-soft: #3a2a22; --link: #f08a5d;
    --navy: #101315; --navy-text: #f4efe6; --navy-muted: #b7b0a5;
    --lined: rgb(160 190 220 / 9%); --margin-line: rgb(240 138 93 / 30%);
    --ok: #8fd18a; --error: #f87171;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 24%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161513; --surface: #1c1a18; --surface-2: #262421;
  --text: #efe9de; --text-2: #aaa398; --muted: #9a9389;
  --line: rgb(239 233 222 / 9%); --line-strong: rgb(239 233 222 / 16%);
  --accent: #f08a5d; --accent-hover: #f6a985; --accent-ink: #161513; --accent-soft: #3a2a22; --link: #f08a5d;
  --navy: #101315; --navy-text: #f4efe6; --navy-muted: #b7b0a5;
  --lined: rgb(160 190 220 / 9%); --margin-line: rgb(240 138 93 / 30%);
  --ok: #8fd18a; --error: #f87171;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 24%);
  color-scheme: dark;
}

/* 3. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1, h2 { font-family: var(--serif); font-optical-sizing: auto; font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
strong { font-weight: 600; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .36em; border-radius: 4px; }
pre, code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }

/* Liens : seuls éléments soulignés */
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
.nav a, .btn, .card-link, .chip, .social a, .project-nav a, .brand { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: var(--r-ctl); font-weight: 500; }
.skip-link:focus { top: 12px; color: var(--accent-ink); }
.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Boutons : rayon de contrôle, survol = changement de couleur, appui = léger enfoncement */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-ctl); border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: 1rem; line-height: 1; cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
:root[data-theme="dark"] .btn-primary:hover { color: var(--accent-ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text); background: var(--surface); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: .8125rem; font-weight: 500; }

/* Signature : annotation manuscrite au-dessus des titres */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--hand); font-size: clamp(1.5rem, 2.4vw, 1.75rem); font-weight: 600; line-height: 1;
  color: var(--accent); margin: 0 0 8px;
}
.kicker svg { width: 18px; height: 18px; flex: none; }

/* Nappe vichy (pied de page uniquement) */
.gingham {
  height: 16px; background-color: var(--bg);
  background-image: linear-gradient(90deg, rgb(180 68 26 / 36%) 50%, transparent 50%), linear-gradient(rgb(180 68 26 / 36%) 50%, transparent 50%);
  background-size: 16px 16px;
}

/* 4. En-tête -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color var(--fast) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -16px rgb(31 27 22 / 25%); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  font-family: var(--serif); font-weight: 500; font-size: .875rem;
}
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: .9375rem; transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="true"], .nav a[aria-current="page"] { color: var(--accent-hover); background: var(--accent-soft); }
:root[data-theme="dark"] .nav a[aria-current] { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a[aria-current] { color: var(--accent); } }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); cursor: pointer; transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.icon-btn:hover { color: var(--text); border-color: var(--text-2); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-switch { width: auto; min-width: 40px; padding: 0 10px; font-size: .8125rem; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.lang-switch:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
.btn-cv { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.menu-toggle { display: none; }
@media (max-width: 940px) {
  .menu-toggle { display: grid; }
  .btn-cv { display: none; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 20px; box-shadow: var(--shadow); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 12px 16px; font-size: 1.0625rem; }
  .header-actions { margin-left: auto; }
}
@media (min-width: 941px) { .nav .nav-cv { display: none; } }

/* 5. Sections ------------------------------------------------------------- */
.section { padding: clamp(80px, 10vw, 128px) 0; position: relative; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head p:not(.kicker) { color: var(--text-2); font-size: 1.125rem; margin: 0; }
.section-head.center { margin-inline: auto; text-align: center; }

/* 6. Accueil : l'assiette (premier moment) -------------------------------- */
.hero { min-height: calc(100svh - var(--header-h)); display: grid; align-content: center; padding: 48px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 64px); align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 5px 12px; line-height: 1.35; border-radius: var(--r-ctl);
  background: var(--surface); border: 1px solid var(--line); font-size: .875rem; font-weight: 500; color: var(--text-2); margin: 0 0 24px;
}
.status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #3f9a5a; }
.hero h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: .95; margin-bottom: 16px; letter-spacing: -.03em; }
.hero h1 .last { display: block; color: var(--accent); }
.hero-role { font-family: var(--serif); font-size: clamp(1.375rem, 2.6vw, 1.75rem); font-weight: 400; margin-bottom: 20px; }
.scribble { position: relative; white-space: nowrap; display: inline-block; }
.scribble svg { position: absolute; left: -2%; bottom: -.3em; width: 104%; height: .5em; overflow: visible; pointer-events: none; }
.scribble path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.hero-lead { font-size: 1.125rem; color: var(--text-2); max-width: 52ch; margin: 0; }
.hero-lead strong { color: var(--text); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-visual { display: grid; place-items: center; padding: 32px 0; }
.plate-wrap { --size: clamp(260px, 34vw, 440px); position: relative; width: var(--size); height: var(--size); }
.plate { width: 100%; height: 100%; filter: drop-shadow(0 24px 28px rgb(31 27 22 / 16%)); }
.steam { position: absolute; left: 50%; top: -16%; width: 28%; transform: translateX(-50%); overflow: visible; }
.steam path { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; opacity: .3; }
.ingredient {
  position: absolute; left: var(--x); top: var(--y); z-index: 2; translate: -50% -50%;
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  font-size: .875rem; font-weight: 500; white-space: nowrap; rotate: calc(var(--r, 0deg) / 2);
}
.ingredient::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--accent)); }
.chef-note { margin: 40px auto 0; text-align: center; font-family: var(--hand); font-size: 1.5rem; font-weight: 500; line-height: 1.1; color: var(--text-2); max-width: 340px; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { padding: 48px 0 0; }
  .plate-wrap { --size: clamp(220px, 62vw, 320px); }
  .chef-note { margin-top: 32px; font-size: 1.375rem; }
}

/* 7. À propos -------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.about-text .lead { font-size: 1.25rem; font-weight: 400; }
.about-text p:not(.kicker):not(.lead) { font-size: 1.0625rem; color: var(--text-2); }
.stickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 32px 0 0; }
.stickers li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: .9375rem; line-height: 1.3; }
.stickers .ico { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.stickers svg { width: 18px; height: 18px; }
.stickers small { display: block; font-weight: 400; color: var(--muted); font-size: .8125rem; }
@media (max-width: 520px) { .stickers { grid-template-columns: minmax(0, 1fr); } }

/* L'ardoise (recette.json) */
.ardoise-wrap { padding: 0; }
.code-card {
  margin: 0; background: var(--navy); color: var(--navy-text);
  border: 12px solid var(--wood-dark); border-radius: 12px; box-shadow: var(--shadow);
  font-family: var(--mono); font-size: .875rem; line-height: 1.8;
}
.code-card-bar { padding: 12px 20px 0; }
.code-card-bar small { font-family: var(--mono); font-size: .8125rem; color: var(--navy-muted); }
.code-card pre { margin: 0; padding: 8px 20px 20px; overflow-x: auto; white-space: pre; }
.tok-key { color: var(--chalk-orange); }
.tok-str { color: var(--chalk-green); }
.tok-num { color: var(--chalk-yellow); }
.tok-punc { color: var(--navy-muted); }
.tok-com { color: #9a9389; }
.ardoise-caption { font-family: var(--hand); font-size: 1.375rem; color: var(--muted); text-align: right; margin: 12px 8px 0 0; }
@media (max-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .code-card pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8125rem; padding: 8px 16px 16px; } }

/* Parcours + l'addition */
.about-row2 { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(40px, 6vw, 80px); margin-top: clamp(64px, 9vw, 112px); align-items: start; }
.about-row2 h3.block-title { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 500; margin-bottom: 24px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 24px; bottom: 24px; border-left: 1px dashed var(--line-strong); }
.timeline::after {
  content: ""; position: absolute; left: 14px; top: var(--line-top, 0); width: 3px; height: var(--line-h, 0); border-radius: 3px;
  background: var(--accent); pointer-events: none;
}
.timeline .step { transition: background-color var(--slow) var(--ease), color var(--slow) var(--ease), border-color var(--slow) var(--ease), scale var(--slow) var(--ease); }
.timeline li.is-reached .step { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); scale: 1.1; }
.timeline .bristol { transition: border-color var(--slow) var(--ease); }
.timeline li.is-reached .bristol { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.timeline li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; align-items: start; }
.timeline .step {
  width: 32px; height: 32px; margin-top: 16px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-2); font-size: .8125rem; font-weight: 500; font-variant-numeric: tabular-nums;
}
.bristol {
  padding: 16px 20px 16px 32px; border-radius: 12px; background-color: var(--surface); border: 1px solid var(--line);
  background-image: linear-gradient(90deg, transparent 16px, var(--margin-line) 16px, var(--margin-line) 17px, transparent 17px);
}
.bristol .when { display: block; font-size: .8125rem; font-weight: 500; color: var(--accent-hover); font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .bristol .when { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bristol .when { color: var(--accent); } }
.bristol h4 { font-size: 1.0625rem; margin: 4px 0 0; }
.bristol .where { color: var(--muted); font-size: .9375rem; margin: 0 0 4px; }
.bristol p { margin: 0; font-size: .9375rem; color: var(--text-2); }

/* L'addition : un vrai ticket pour les chiffres */
.receipt {
  position: relative; background: var(--surface); padding: 24px 24px 20px; margin-bottom: 12px;
  font-family: var(--mono); font-size: .8125rem; line-height: 1.6; font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 8px 16px rgb(31 27 22 / 10%));
}
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px;
  background: linear-gradient(-45deg, transparent 8px, var(--surface) 8px) 0 0 / 16px 12px repeat-x,
              linear-gradient(45deg, transparent 8px, var(--surface) 8px) 0 0 / 16px 12px repeat-x; }
.receipt-head { text-align: center; border-bottom: 1px dashed var(--line-strong); padding-bottom: 12px; margin-bottom: 12px; }
.receipt-head strong { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.receipt-head span { color: var(--muted); font-size: .75rem; }
.receipt-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.receipt-lines li { display: flex; gap: 8px; align-items: baseline; }
.receipt-lines .lbl { color: var(--text-2); }
.receipt-lines .dots { flex: 1; border-bottom: 1px dotted var(--line-strong); min-width: 8px; translate: 0 -4px; }
.receipt-lines .val { color: var(--text); white-space: nowrap; }
.receipt-total { display: flex; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line-strong); margin: 12px 0 0; padding-top: 12px; font-size: .875rem; }
.receipt-total .val { color: var(--accent-hover); }
:root[data-theme="dark"] .receipt-total .val { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .receipt-total .val { color: var(--accent); } }
.receipt-foot { text-align: center; color: var(--muted); font-size: .75rem; margin: 12px 0 0; }
@media (min-width: 901px) { .about-row2 > :last-child { position: sticky; top: calc(var(--header-h) + 32px); } }
@media (max-width: 900px) { .about-row2 { grid-template-columns: minmax(0, 1fr); } .receipt { max-width: 380px; margin-inline: auto; } }

/* 8. Projets : fiches recettes (second moment) ----------------------------- */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0; }
.project-card {
  position: relative; display: flex; flex-direction: column; padding: 12px 12px 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), translate var(--fast) var(--ease);
}
.project-card:hover, .project-card:focus-within { border-color: var(--line-strong); box-shadow: 0 1px 2px rgb(31 27 22 / 6%), 0 16px 32px rgb(31 27 22 / 10%); translate: 0 -2px; }
.project-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.project-card:focus-within .card-link:focus-visible { outline: none; }
.project-media { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; border-radius: 4px; }
.project-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: scale var(--slow) var(--ease); }
.project-card:hover .project-media img { scale: 1.03; }
.project-body { display: flex; flex-direction: column; gap: 12px; padding: 20px 12px 24px; flex: 1; }
.project-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .8125rem; color: var(--muted); margin: 0; }
.project-meta .badge { color: var(--text-2); font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); }
.project-meta .badge-accent { background: var(--accent); color: var(--accent-ink); }
.project-meta span { display: inline-flex; align-items: center; gap: 4px; }
.project-meta svg { width: 16px; height: 16px; flex: none; }
.project-body h3 { font-family: var(--serif); font-size: 1.375rem; font-weight: 500; margin: 0; line-height: 1.2; }
.project-body p { color: var(--text-2); margin: 0; }
.card-link { color: var(--text); }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: var(--r-card); }
.card-link:hover { color: var(--text); }
.project-cta { margin-top: auto; padding-top: 4px; font-weight: 500; color: var(--accent-hover); display: inline-flex; align-items: center; gap: 4px; }
:root[data-theme="dark"] .project-cta { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .project-cta { color: var(--accent); } }
.project-cta svg { width: 18px; height: 18px; }
.project-highlight {
  align-self: flex-start; padding: 4px 10px; border-radius: 6px; font-size: .875rem; font-weight: 600; line-height: 1.4;
  background: var(--accent-soft); color: var(--accent-hover) !important;
}
:root[data-theme="dark"] .project-highlight { color: var(--accent) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .project-highlight { color: var(--accent) !important; } }

/* La carte à la une : image et texte côte à côte */
.project-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); padding: 12px; }
.project-card--featured .project-media { aspect-ratio: auto; height: 100%; min-height: 340px; }
.project-card--featured .project-body { padding: 24px 24px 24px 36px; justify-content: center; gap: 16px; }
.project-card--featured h3 { font-size: clamp(1.625rem, 2.6vw, 2.125rem); }
.project-card--featured .project-body > p:not(.project-meta):not(.project-highlight) { font-size: 1.0625rem; }
.project-card--featured .project-cta { margin-top: 8px; }
@media (max-width: 1020px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card--featured .project-body { padding: 20px 16px 20px 28px; }
  .projects > :last-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); padding: 12px; }
  .projects > :last-child .project-media { aspect-ratio: auto; height: 100%; min-height: 260px; }
  .projects > :last-child .project-body { padding: 20px 16px 20px 28px; justify-content: center; }
}
@media (max-width: 640px) {
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project-card--featured, .projects > :last-child { display: flex; padding: 12px 12px 0; }
  .project-card--featured .project-media, .projects > :last-child .project-media { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
  .project-card--featured .project-body, .projects > :last-child .project-body { padding: 20px 12px 24px; }
}

/* 9. Compétences : étagères d'épices et notes du chef ----------------------- */
.pantry { display: grid; gap: clamp(40px, 5vw, 56px); }
.shelf-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; margin: 0 0 8px; }
.shelf-title h3 { margin: 0; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
.shelf-title span { font-family: var(--hand); font-size: 1.375rem; line-height: 1.2; color: var(--muted); }
.shelf { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.jar { --spice: #c2562a; width: 124px; padding: 12px 6px 0; display: flex; flex-direction: column; align-items: center; border-bottom: 12px solid var(--wood); }
.shelf .jar:first-child { border-bottom-left-radius: 4px; }
.shelf .jar:last-child { border-bottom-right-radius: 4px; }
.jar-lid { width: 76%; height: 14px; transition: translate var(--fast) var(--ease); border-radius: 4px 4px 2px 2px; background: var(--wood-dark); }
.jar-body {
  width: 100%; height: 124px; margin-top: 2px; border-radius: 12px 12px 16px 16px; display: grid; place-items: start center; padding-top: 8px;
  background: linear-gradient(to top, var(--spice) 0 var(--fill), transparent var(--fill)), color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line-strong);
}
.jar-label { width: 88%; background: #fffaf0; color: #2b2420; border-radius: 4px; padding: 8px 4px; text-align: center; box-shadow: 0 1px 2px rgb(0 0 0 / 12%); }
.jar-label strong { display: block; font-size: .8125rem; font-weight: 600; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.jar-label small { display: block; font-size: .6875rem; line-height: 1.25; color: #5e554a; margin-top: 4px; }
@property --fill { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
.jar, .mini-jar { --fill: 44%; }
.jar { transition: --fill 1.1s var(--ease); }
@media screen { .shelf.is-empty .jar { --fill: 0%; } }
.shelf .jar:nth-child(2) { transition-delay: 80ms; } .shelf .jar:nth-child(3) { transition-delay: 160ms; }
.shelf .jar:nth-child(4) { transition-delay: 240ms; } .shelf .jar:nth-child(5) { transition-delay: 320ms; }
.shelf .jar:nth-child(6) { transition-delay: 400ms; } .shelf .jar:nth-child(7) { transition-delay: 480ms; }
.shelf .jar:nth-child(8) { transition-delay: 560ms; }
/* L'étiquette occupe le haut du pot : le niveau se lit en dessous, un pot maîtrisé est plein */
[data-niveau="1"] { --fill: 14%; }
[data-niveau="2"] { --fill: 28%; }
[data-niveau="3"] { --fill: 42%; }
[data-niveau="4"] { --fill: 100%; }
.jar-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: -16px 0 40px; padding: 0; font-size: .9375rem; color: var(--text-2); }
.jar-legend li { display: inline-flex; align-items: center; gap: 8px; }
.mini-jar {
  width: 16px; height: 22px; border-radius: 3px 3px 5px 5px; border: 1px solid var(--line-strong); border-top: 4px solid var(--wood-dark);
  background: linear-gradient(to top, #c2562a 0 var(--fill), var(--surface) var(--fill));
}
.shelf[data-spice="paprika"] .jar { --spice: #c2562a; }
.shelf[data-spice="herbes"] .jar { --spice: #6f8f5e; }
.shelf[data-spice="curry"] .jar { --spice: #d9a441; }
.shelf[data-spice="cannelle"] .jar { --spice: #8a5a3b; }
.jar:hover .jar-lid { translate: 0 -4px; }
/* Pots cliquables (le script transforme leur contenu en bouton) */
.jar-hint { display: none; font-style: italic; }
.js-pantry .jar-hint { display: inline-flex; }
.jar-btn {
  all: unset; box-sizing: border-box; position: relative; display: flex; flex-direction: column; align-items: center; width: 100%;
  cursor: pointer; border-radius: 12px; transition: translate var(--fast) var(--ease);
}
.jar-btn:hover { translate: 0 -4px; }
.jar-btn:hover .jar-lid { translate: 0 -4px; }
.jar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.jar-btn::after {
  content: attr(data-count); position: absolute; top: 8px; right: -2px; z-index: 1; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: .6875rem; font-weight: 700; box-shadow: var(--shadow);
}
.jar.is-active .jar-btn { translate: 0 -6px; }
.jar.is-active .jar-body { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.jar-panel { margin: 16px 0 0; padding: 16px 20px; max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; box-shadow: var(--shadow); }
.jar-panel-title { margin: 0 0 12px; color: var(--text-2); font-size: .9375rem; }
.jar-panel-title strong { color: var(--text); }
.jar-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jar-panel a { display: flex; align-items: center; gap: 16px; padding: 8px 12px 8px 8px; border-radius: 10px; color: var(--text); font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: var(--bg); transition: border-color var(--fast) var(--ease); }
.jar-panel a:hover { border-color: var(--accent); color: var(--text); }
.jar-panel img { width: 96px; height: 60px; object-fit: cover; object-position: top; border-radius: 6px; flex: none; }
.jar-panel span { flex: 1; font-family: var(--serif); font-weight: 500; font-size: 1.0625rem; line-height: 1.3; }
.jar-panel svg { width: 18px; height: 18px; flex: none; color: var(--accent); transition: translate var(--fast) var(--ease); }
.jar-panel a:hover svg { translate: 4px 0; }
@media (prefers-reduced-motion: no-preference) { .jar-panel:not([hidden]) { animation: menu-in 250ms var(--ease); } }
@media (max-width: 560px) {
  .jar-panel { padding: 12px; }
  .jar-panel img { width: 72px; height: 45px; }
  .jar-btn::after { top: 4px; right: -4px; }
}

@media (max-width: 560px) {
  .jar { width: 33.333%; padding: 10px 4px 0; border-bottom-width: 10px; }
  .jar-body { height: 116px; padding-top: 6px; border-radius: 10px 10px 12px 12px; }
  .jar-label { width: 92%; padding: 6px 2px; }
  .jar-label strong { font-size: .75rem; }
  .jar-label small { font-size: .625rem; }
}

.postits-title { margin-top: clamp(56px, 8vw, 88px); }
.postits { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.postit {
  background: var(--postit); color: var(--postit-ink); padding: 24px 20px; border-radius: 4px 4px 16px 4px; box-shadow: 0 8px 16px -8px rgb(0 0 0 / 22%);
  rotate: -1.2deg; transition: rotate var(--slow) var(--ease), scale var(--slow) var(--ease), box-shadow var(--slow) var(--ease);
}
.postit:nth-child(even) { rotate: 1deg; }
.postit:hover { rotate: 0deg; scale: 1.03; box-shadow: 0 16px 24px -12px rgb(0 0 0 / 28%); }
.postit h4 { font-family: var(--hand); font-size: 1.75rem; font-weight: 600; line-height: 1; margin: 0 0 8px; }
.postit p { margin: 0; font-size: .9375rem; line-height: 1.5; }
@media (max-width: 980px) { .postits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .postits { grid-template-columns: minmax(0, 1fr); } }

/* 10. Veille : le tableau noir ---------------------------------------------- */
.chalkboard { position: relative; color: var(--navy-text); background: #2a3130; border: 16px solid var(--wood); border-radius: 12px; box-shadow: var(--shadow); padding: clamp(32px, 5vw, 56px); }
.chalk-title { font-family: var(--hand); font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 600; line-height: 1; margin: 0 0 8px; color: #fff; text-align: center; }
.chalk-sub { text-align: center; font-family: var(--hand); font-size: 1.375rem; color: var(--chalk-yellow); margin: 0 0 clamp(32px, 4vw, 48px); }
.chalk-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.chalk-cols > div { border-top: 1px dashed rgb(255 255 255 / 25%); padding-top: 16px; }
.chalk-cols h3 { font-family: var(--hand); font-size: 1.875rem; font-weight: 600; color: var(--chalk-orange); margin: 0 0 12px; }
.chalk-cols p { color: var(--navy-text); }
.chalkboard .todo { background: rgb(255 255 255 / 6%); color: var(--navy-text); border-color: var(--chalk-yellow); }
.chalkboard .todo::before { color: var(--chalk-yellow); }
@media (max-width: 860px) { .chalk-cols { grid-template-columns: minmax(0, 1fr); } }

/* 11. Contact : le ticket de réservation ------------------------------------ */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-grid > div:first-child > p:not(.kicker) { color: var(--text-2); }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.contact-item {
  display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
a.contact-item:hover { border-color: var(--accent); color: var(--text); }
.contact-item .ci { width: 40px; height: 40px; border-radius: var(--r-ctl); display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); }
a.contact-item:hover .ci { background: var(--accent); color: var(--accent-ink); }
.contact-item .ci svg { width: 18px; height: 18px; }
.contact-item small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.3; }
.contact-item .value { display: block; font-weight: 500; overflow-wrap: anywhere; line-height: 1.4; }
a.contact-item .value { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.contact-cv { margin-top: 20px; }

.ticket { display: grid; grid-template-columns: 64px minmax(0, 1fr); filter: drop-shadow(0 8px 20px rgb(31 27 22 / 12%)); }
.ticket-stub {
  display: flex; align-items: center; justify-content: space-between; writing-mode: vertical-rl; rotate: 180deg;
  padding: 24px 0; border-radius: 0 var(--r-card) var(--r-card) 0;
  background: var(--accent); color: var(--accent-ink); font-size: .875rem; font-weight: 500;
}
.ticket-stub b { font-weight: 500; }
.form {
  position: relative; background: var(--surface); border-radius: 0 var(--r-card) var(--r-card) 0; padding: clamp(24px, 3.5vw, 36px);
  border-left: 2px dashed var(--line-strong);
  -webkit-mask: radial-gradient(circle 12px at 0 0, transparent 98%, #000) top left / 100% 51% no-repeat, radial-gradient(circle 12px at 0 100%, transparent 98%, #000) bottom left / 100% 51% no-repeat;
          mask: radial-gradient(circle 12px at 0 0, transparent 98%, #000) top left / 100% 51% no-repeat, radial-gradient(circle 12px at 0 100%, transparent 98%, #000) bottom left / 100% 51% no-repeat;
}
.ticket-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; margin: 0 0 4px; }
.ticket-sub { color: var(--muted); font-size: .9375rem; margin: 0 0 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field label { font-weight: 500; font-size: .9375rem; }
.field .req { color: var(--error); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl); padding: 12px; min-height: 44px; width: 100%;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .875rem; color: var(--text-2); margin: 4px 0 16px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-note { font-size: .8125rem; color: var(--muted); margin: 0 0 16px; }
.form-status { margin: 16px 0 0; font-weight: 500; min-height: 1.5em; }
.form-status.ok { color: var(--ok); }
.form-status.error { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .ticket { grid-template-columns: minmax(0, 1fr); }
  .ticket-stub { writing-mode: horizontal-tb; rotate: 0deg; border-radius: var(--r-card) var(--r-card) 0 0; padding: 12px 20px; }
  .form { border-left: 0; border-top: 2px dashed var(--line-strong); border-radius: 0 0 var(--r-card) var(--r-card); -webkit-mask: none; mask: none; }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* Bloc « à compléter » (visible uniquement pendant la rédaction) */
.todo { border: 2px dashed #f59e0b; background: color-mix(in srgb, #f59e0b 10%, var(--surface)); border-radius: 8px; padding: 12px 16px; font-size: .9375rem; color: var(--text); }
.todo::before { content: "À COMPLÉTER — "; font-weight: 600; color: #b45309; }

/* 12. Pages projet ----------------------------------------------------------- */
.breadcrumb { padding-top: 32px; font-size: .9375rem; margin: 0; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.breadcrumb svg { width: 18px; height: 18px; }
.project-hero {
  position: relative; margin: 32px 0 48px; padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px) clamp(28px, 4vw, 40px) clamp(40px, 6vw, 80px);
  border-radius: var(--r-card); background-color: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  background-image: linear-gradient(90deg, transparent clamp(24px, 4vw, 48px), var(--margin-line) clamp(24px, 4vw, 48px), var(--margin-line) calc(clamp(24px, 4vw, 48px) + 1px), transparent calc(clamp(24px, 4vw, 48px) + 1px));
}
.project-hero h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); max-width: 20ch; }
.project-hero .lead { font-size: 1.125rem; color: var(--text-2); max-width: 62ch; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 28px 0 24px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts div { padding: 16px 20px; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts dt { font-size: .8125rem; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 500; line-height: 1.4; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.note-private { font-size: .875rem; color: var(--muted); }
@media (max-width: 820px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 460px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .facts div:last-child { border-bottom: 0; }
}

.figure { margin: 0; }
.figure img, .figure > svg { width: 100%; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.figure.polaroid { background: var(--surface); padding: 12px 12px 8px; border-radius: var(--r-card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.figure.polaroid img { box-shadow: none; border: 0; border-radius: 4px; }
.figure figcaption { color: var(--muted); font-size: .875rem; margin-top: 8px; text-align: center; line-height: 1.4; }
.figure video { display: block; width: 100%; height: auto; border-radius: 4px; background: #000; }
.video-demo { margin: 8px 0 16px; }
.small-note { font-size: .875rem; color: var(--muted); }

.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.625rem, 3vw, 2.125rem); }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--muted); }
.recipe-label { display: block; font-family: var(--hand); font-size: 1.5rem; font-weight: 600; color: var(--accent); margin: 2.4em 0 4px; line-height: 1; }
.prose > .recipe-label:first-child { margin-top: 0; }
.prose .recipe-label + h2 { margin-top: 0; }

.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: clamp(32px, 5vw, 64px); align-items: start; padding-top: 56px; }
.aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; }
.aside .panel h3 { font-family: var(--hand); font-size: 1.75rem; font-weight: 600; color: var(--accent); margin: 0 0 12px; line-height: 1; }
.aside .panel ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9375rem; }

@media (max-width: 940px) { .project-layout { grid-template-columns: minmax(0, 1fr); } .aside { position: static; } }

.aside .panel .ingredients { list-style: none; padding: 0 24px; margin: 0 -24px; display: grid; gap: 0 !important;
  background-image: linear-gradient(transparent 31px, var(--lined) 31px); background-size: 100% 32px; }
.ingredients li { display: flex; align-items: baseline; gap: 8px; line-height: 32px; }
.ingredients .qty { font-weight: 500; white-space: nowrap; }
.ingredients .dots { flex: 1; border-bottom: 1px dotted var(--line-strong); translate: 0 -8px; min-width: 12px; }
.ingredients .use { font-size: .875rem; color: var(--muted); text-align: right; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.2em; display: grid; gap: 20px; }
.steps li { counter-increment: step; position: relative; padding: 4px 0 0 48px; margin: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-2); font-size: .8125rem; font-weight: 500; font-variant-numeric: tabular-nums;
}
.steps strong { display: block; font-size: 1.0625rem; }

.challenges { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 0 1em; padding: 0; list-style: none; }
.challenge { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 24px; }
.challenge h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin-bottom: 8px; }
.challenge p { margin: 0 0 8px; font-size: 1rem; color: var(--text-2); }
.challenge p:last-child { margin: 0; }
.challenge .label { font-size: .8125rem; font-weight: 500; color: var(--text); }

.code-block { background: var(--navy); color: var(--navy-text); border-radius: 12px; margin: 12px 0 0; overflow: hidden; }
.code-block figcaption { font-family: var(--mono); font-size: .75rem; color: var(--navy-muted); padding: 12px 16px 0; text-align: left; margin: 0; }
.code-block pre { margin: 0; padding: 12px 16px 16px; overflow-x: auto; font-family: var(--mono); font-size: .8125rem; line-height: 1.7; }
.code-block pre code, .code-card pre code { background: none; padding: 0; color: inherit; font-size: inherit; border-radius: 0; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 16px 0 0; }
.gallery .figure.wide { grid-column: 1 / -1; }
.gallery .figure.phone img { max-width: 260px; margin-inline: auto; }
@media (max-width: 700px) { .gallery { grid-template-columns: minmax(0, 1fr); } }

.callout { background: var(--postit); color: var(--postit-ink); padding: 16px 20px; margin: 0 0 1.2em; border-radius: 4px 4px 12px 4px; }
.callout p:last-child { margin: 0; }

.project-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 48px 0 0; margin-top: 64px; border-top: 1px solid var(--line); }
.project-nav a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 20px; color: var(--text); transition: border-color var(--fast) var(--ease); }
.project-nav a:hover { border-color: var(--line-strong); }
.project-nav small { display: block; color: var(--muted); font-size: .8125rem; }
.project-nav strong { font-family: var(--serif); font-weight: 500; font-size: 1.125rem; }
.project-nav .next { text-align: right; }
@media (max-width: 560px) { .project-nav { grid-template-columns: minmax(0, 1fr); } .project-nav .next { text-align: left; } }

.page-simple { padding: 48px 0 96px; }
.page-simple .prose h2 { font-size: 1.5rem; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; translate: 0 8px;
  transition: opacity var(--fast) var(--ease), visibility var(--fast) var(--ease), translate var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.to-top svg { width: 22px; height: 22px; }
.to-top:hover { background: var(--accent-hover); color: var(--accent-ink); }
.to-top.is-visible, .to-top:focus-visible { opacity: 1; visibility: visible; translate: 0 0; }
.no-js .to-top { display: none; }

/* 13. Pied de page ------------------------------------------------------------ */
.site-footer { background: var(--navy); color: var(--navy-text); padding: 0 0 32px; }
.site-footer .gingham { margin-bottom: 40px; }
.site-footer a { color: var(--navy-text); }
.site-footer a:hover { color: #fff; }
.footer-thanks { font-family: var(--hand); font-size: clamp(1.875rem, 4vw, 2.5rem); font-weight: 600; color: var(--chalk-yellow); margin: 0 0 24px; line-height: 1; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.footer-grid p { margin: 0; color: var(--navy-muted); font-size: .9375rem; }
.footer-grid .name { color: var(--navy-text); font-weight: 600; font-size: 1.0625rem; }
.social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-ctl); border: 1px solid rgb(255 255 255 / 18%); transition: background-color var(--fast) var(--ease); }
.social a:hover { background: rgb(255 255 255 / 8%); }
.social svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 10%); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: .875rem; color: var(--navy-muted); }
.footer-bottom p { margin: 0; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; }

.caret { display: none; }

/* 14. Mouvement : discret, jamais bloquant, coupé si l'on demande moins d'animations */
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes enter { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-text > *, .hero-visual { animation: enter var(--slow) var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: 40ms; }
  .hero-text > :nth-child(3) { animation-delay: 80ms; }
  .hero-text > :nth-child(4) { animation-delay: 120ms; }
  .hero-text > :nth-child(5) { animation-delay: 160ms; }
  .hero-visual { animation-delay: 200ms; }
  .scribble path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 700ms var(--ease) 450ms both; }

  /* L'assiette : arrivée, fumée, herbe, ingrédients qui flottent */
  .plate { animation: plate-in 1s var(--ease) 250ms backwards; transition: rotate 1.2s var(--ease); }
  .plate-wrap:hover .plate { rotate: 10deg; }
  .steam path { animation: steam 3.6s ease-in-out infinite; }
  .steam path:nth-child(2) { animation-delay: 1.2s; }
  .steam path:nth-child(3) { animation-delay: 2.4s; }
  .glyph path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 650ms var(--ease) both; }
  .glyph .sauce:nth-child(1) { animation-delay: 700ms; }
  .glyph .sauce:nth-child(2) { animation-delay: 1150ms; }
  .glyph .shine:nth-child(3) { animation-delay: 1000ms; }
  .glyph .shine:nth-child(4) { animation-delay: 1450ms; }
  .glyph .chive, .glyph .shine:last-child { animation-delay: 1500ms; animation-duration: 500ms; }
  .chive-bits { animation: enter var(--slow) var(--ease) 1.9s both; }
  .herb { transform-box: fill-box; transform-origin: 0 100%; animation: sway 4s ease-in-out infinite alternate; }
  .ingredient { animation: pop 500ms cubic-bezier(.3, 1.5, .5, 1) var(--d, .7s) both, float 6s ease-in-out calc(var(--d, .7s) + .5s) infinite; }
  .ingredient:nth-of-type(even) { animation-duration: 500ms, 7s; }
  .chef-note { animation: enter var(--slow) var(--ease) 1.6s both; }
  .status-dot { animation: pulse 2.4s ease-out infinite; }
  .caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 4px; vertical-align: -.2em; background: var(--chalk-orange); animation: blink 1.1s steps(1) infinite; }

  /* Apparition au défilement (classes posées par le script) */
  .reveal { opacity: 0; translate: 0 20px; transition: opacity 600ms var(--ease), translate 600ms var(--ease), --fill 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .reveal.is-visible { opacity: 1; translate: 0 0; }
  .postit.reveal { rotate: -6deg; } .postit.reveal.is-visible { rotate: -1.2deg; }
  .postit.reveal:nth-child(even) { rotate: 6deg; } .postit.reveal.is-visible:nth-child(even) { rotate: 1deg; }
  .postit.reveal { transition-property: opacity, translate, rotate; }
  .chalkboard .chalk-title { transition: clip-path 1.2s var(--ease) 300ms; }
  .chalkboard.reveal:not(.is-visible) .chalk-title { clip-path: inset(0 100% 0 0); }

  /* Petits retours au survol */
  .btn > svg:last-child:not(:first-child), .project-cta svg { transition: translate var(--fast) var(--ease); }
  .btn:hover > svg:last-child:not(:first-child), .project-card:hover .project-cta svg { translate: 4px 0; }
  .stickers li:hover .ico svg { animation: wiggle 500ms ease-in-out; }
  .nav.is-open { animation: menu-in 200ms var(--ease); }
}
@keyframes plate-in { from { opacity: 0; rotate: -25deg; scale: .9; } to { opacity: 1; rotate: 0deg; scale: 1; } }
@keyframes steam { 0% { opacity: 0; translate: 0 10px; } 35% { opacity: .4; } 100% { opacity: 0; translate: 0 -14px; } }
@keyframes sway { from { rotate: -5deg; } to { rotate: 5deg; } }
@keyframes pop { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(63 154 90 / 50%); } 70%, 100% { box-shadow: 0 0 0 8px rgb(63 154 90 / 0%); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes wiggle { 25% { rotate: -12deg; } 75% { rotate: 12deg; } }
@keyframes menu-in { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .hero-actions, .form, .project-nav, .to-top { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; translate: none !important; }
}
