/* Mise en page : une colonne de lecture de 760 px ; chaque réalisation est un chapitre séparé par un filet ; un seul bandeau nuit (l'en-tête). Charte Pleine Terre : zéro coin arrondi, filets de 1 px. */
:root {
  --night: #0a2434;
  --bg: #faf7f0;
  --bg-deep: #f5f0e6;
  --card: #fcfaf5;
  --line: #e5ddcf;
  --ink: #1f2a24;
  --ink-body: #2b3630;
  --ink-soft: #4a544d;
  --ink-muted: #697267;
  --accent: #507249;
  --brown: #8b4513;
  --sand: #d4c6a3;
  --lite: #9cc196;
  --on-night: #f5f0e6;
  --bar: #507249;
  --bar-last: #8b4513;
  --display: "Tenor Sans", "Optima", "Candara", Georgia, serif;
  --body: "Montserrat", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1d26; --bg-deep: #12242f; --card: #142a36; --line: #24404f;
    --ink: #eef0ea; --ink-body: #d9ddd5; --ink-soft: #b4bcb2; --ink-muted: #8f9a90;
    --accent: #9cc196; --brown: #d9a273; --bar: #7fa878; --bar-last: #d9a273;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1d26; --bg-deep: #12242f; --card: #142a36; --line: #24404f;
  --ink: #eef0ea; --ink-body: #d9ddd5; --ink-soft: #b4bcb2; --ink-muted: #8f9a90;
  --accent: #9cc196; --brown: #d9a273; --bar: #7fa878; --bar-last: #d9a273;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink-body);
  font-family: var(--body); font-size: 16px; line-height: 1.7;
}
.wrap {
  max-width: 760px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap-wide { max-width: 1000px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--ink); text-wrap: balance; line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eyebrow {
  font-size: 10px; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; color: var(--ink-muted);
}

/* En-tête nuit */
header.hero { background: var(--night); color: var(--on-night); }
header.hero .wrap { padding-block: 64px 56px; display: grid; gap: 20px; }
header.hero .eyebrow { color: var(--sand); }
header.hero h1 { color: #fff; font-size: clamp(34px, 6vw, 52px); }
header.hero .lead { font-size: 18px; color: #dfe5df; max-width: 62ch; }
header.hero .lead em { font-style: normal; color: var(--lite); }
.toc { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 8px; padding: 0; list-style: none; font-size: 14px; }
.toc a { color: var(--sand); text-decoration: none; border-bottom: 1px solid rgba(212,198,163,.4); }
.toc a:hover { border-bottom-color: var(--sand); }
.toc span { color: rgba(212,198,163,.6); font-variant-numeric: tabular-nums; margin-right: 6px; }

/* Chapitres */
section.work { border-top: 1px solid var(--line); }
section.work > .wrap { padding-block: 56px; display: grid; gap: 22px; }
section.work:first-of-type { border-top: 0; }
.head { display: grid; gap: 10px; }
.head .eyebrow { color: var(--accent); }
.head h2 { font-size: clamp(26px, 4.4vw, 36px); }
.head .since { font-size: 13px; color: var(--ink-muted); }
.prose { display: grid; gap: 16px; }
.prose p { max-width: 66ch; }
.human {
  background: var(--bg-deep); border: 1px solid var(--line); padding: 16px 20px; font-size: 15px; color: var(--ink-soft);
}
.human strong { color: var(--ink); font-weight: 600; }

/* Chiffres */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--card); }
.figures > div { padding: 18px 20px; border-left: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.figures > div:first-child { border-left: 0; }
.figures b { font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.figures span { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
@media (max-width: 620px) {
  .figures { grid-template-columns: 1fr; }
  .figures > div { border-left: 0; border-top: 1px solid var(--line); }
  .figures > div:first-child { border-top: 0; }
}

/* Graphique */
figure { margin: 0; display: grid; gap: 10px; }
figcaption { font-size: 13px; color: var(--ink-muted); }
.chart { border: 1px solid var(--line); background: var(--card); padding: 18px 14px 8px; overflow-x: auto; }
.chart svg { display: block; width: 100%; min-width: 520px; height: auto; }
.chart text { font-family: var(--body); fill: var(--ink-muted); font-size: 11px; }
.chart .val { fill: var(--ink); font-weight: 600; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .mark { stroke: var(--ink-muted); stroke-dasharray: 3 3; stroke-width: 1; }
.chart .mark-label { fill: var(--brown); font-weight: 600; }
.shot { border: 1px solid var(--line); background: var(--card); }
.shot img { display: block; width: 100%; height: auto; }
.shot.video { display: block; position: relative; text-decoration: none; }
.shot.video .play {
  position: absolute; left: 0; bottom: 0; background: var(--night); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .3px; padding: 10px 16px;
}
.shot.video:hover .play, .shot.video:focus-visible .play { background: var(--brown); }
figcaption strong { color: var(--ink); font-weight: 600; }

/* Outils */
.tools { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.tools li { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: grid; gap: 2px; }
.tools li:nth-child(odd) { padding-right: 24px; }
.tools li strong { color: var(--ink); font-weight: 600; font-size: 14px; }
.tools li span { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
@media (max-width: 620px) { .tools { grid-template-columns: 1fr; } .tools li:nth-child(odd) { padding-right: 0; } }

.cycle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); counter-reset: c; }
.cycle li { counter-increment: c; padding: 14px; border-left: 1px solid var(--line); font-size: 13px; line-height: 1.45; color: var(--ink-soft); display: grid; gap: 6px; align-content: start; }
.cycle li:first-child { border-left: 0; }
.cycle li::before { content: counter(c); font-family: var(--display); font-size: 22px; color: var(--accent); line-height: 1; }
.cycle li b { color: var(--ink); font-weight: 600; }
@media (max-width: 700px) {
  .cycle { grid-template-columns: 1fr; }
  .cycle li { border-left: 0; border-top: 1px solid var(--line); grid-template-columns: 28px 1fr; }
  .cycle li:first-child { border-top: 0; }
}

.links { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; font-weight: 500; }

footer { background: var(--bg-deep); border-top: 1px solid var(--line); }
footer .wrap { padding-block: 48px; display: grid; gap: 14px; }
footer h2 { font-size: 26px; }
footer .contact { font-size: 15px; display: grid; gap: 6px; }
footer .contact code { font-family: var(--body); font-weight: 600; color: var(--ink); user-select: all; }
footer small { color: var(--ink-muted); font-size: 12px; }
