/* Guillaume Girard — Repères verts. Direction validée le 27 septembre 2026.
   Blanc, Hanken Grotesk, accent vert et terminal en pied de page. */

/* Polices hébergées localement (licence SIL OFL, sous-ensemble latin de
   Google Fonts). Fichiers variables : une plage de graisses par fichier. */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/polices/hanken-grotesk.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/polices/jetbrains-mono.woff2") format("woff2");
}

:root {
  /* Surfaces — blanc et verts très pâles */
  --paper: #FFFFFF;
  --paper-2: #F2F6F3;
  --paper-sink: #E8EFEA;

  /* Encre */
  --ink:          #1A1814;
  --ink-soft:     #423F38;
  --muted:        #625E55;  /* textes secondaires : ≥ 4,5:1 sur les trois fonds, surfaces comprises */
  --faint: #78776F;  /* décoration uniquement (séparateurs, flèches) */

  /* Filets */
  --line: #DCE3DD;
  --line-strong: #8D9E92;

  /* Accent — vert foncé, dosé */
  --accent:       #1F5C3E;
  --accent-deep:  #143E2A;
  --accent-wash: #EDF4EF;

  /* Type */
  --sans:  "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --maxw: 1140px;
  --pad: clamp(20px, 5vw, 64px);
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.006em;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .22s ease, opacity .22s ease, border-color .22s ease, background-color .22s ease, transform .22s ease;
}

:focus-visible {

  border-radius: 2px;
  outline: 3px solid var(--accent); outline-offset: 4px;
}

/* ---------- Helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono {
  font-size: 12px;
  font-weight: 500;
  font-family: var(--sans); letter-spacing: 0; text-transform: none;
}


/* Prose : alignement justifié + césure sur les paragraphes longs
   (la dernière ligne reste alignée à gauche, comportement natif du navigateur) */
.brief-sub,
.mode-desc p,
.work p,
.work .why,
.tl-body > p,
.about-statement,
.case-content p {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* Section scaffold */
.section {
  padding-block: clamp(64px, 11vh, 132px);
  border-top: 1px solid var(--line);
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
  gap: clamp(20px, 5vw, 64px);
  align-items: baseline;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.sec-index {
  color: var(--accent);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.sec-index .of { color: var(--faint); }
.sec-title {
  font-family: var(--sans);

  letter-spacing: -0.025em;
  text-wrap: balance;
  line-height: 1.12;
  font-size: clamp(29px, 3.2vw, 42px); font-weight: 600;
}
.sec-lead {
  margin-top: 16px;
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 18px);
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;

  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
  background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  min-width: 0;
  font-family: var(--sans); letter-spacing: 0; text-transform: none;
}
.brand b { font-weight: 600; }
.brand .sep { color: var(--faint); font-weight: 400; }
.brand .role { color: var(--muted); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-sink); }
.nav-links a.is-active { color: var(--ink); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
  border-radius: 0; box-shadow: none;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  align-items: center;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink-soft);
  cursor: pointer;
  flex: none;
  border-radius: 0; box-shadow: none;
}
.nav-toggle:hover { border-color: var(--ink); color: var(--ink); }
.nav.is-menu-open .nav-toggle { background: var(--ink); border-color: var(--ink); color: var(--paper-2); }

@media (max-width: 1080px) {
  .brand .role, .brand .sep { display: none; }
}
@media (max-width: 860px) {
  .nav .wrap { justify-content: flex-start; gap: 10px; }
  .brand { margin-right: auto;
  font-family: var(--sans); letter-spacing: 0; text-transform: none;
}
  .nav-toggle { display: inline-flex;
  border-radius: 0; box-shadow: none;
}
  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    gap: 2px;
    padding: 10px var(--pad) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
  .nav.is-menu-open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
@media (max-width: 480px) {
  .nav-cta .label-long { display: none; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  padding-top: calc(var(--nav-h) + 20px);
  padding-bottom: clamp(60px, 9vh, 92px);
  text-align: left;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.6vh, 26px);
  align-items: start; will-change: auto;
}


.hero-eyebrow {
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.hero-eyebrow .tick { color: var(--faint); }

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(50px, 9vw, 120px);
  font-weight: 650; letter-spacing: -.045em;
  line-height: 1.12;
}
.hero h1 .hn { display: block; }

.hero-lead {
  max-width: 40ch;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.36;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: pretty;
}
.hero-stack {
  color: var(--faint);
  font-size: 12px;
}

.hero-foot {
  margin-top: clamp(34px, 6vh, 52px);
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 30px);
  flex-wrap: wrap;
}
.hero-sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
}
.hero-sign img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  filter: saturate(0.96);
}
.hero-sign .who { line-height: 1.3; display: inline-flex; align-items: center; gap: 9px; }
.hero-sign .who .n { font-weight: 600; font-size: 15px; }
.hero-sign .who .dot-sep { color: var(--line-strong); }
.hero-sign .who .m { font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }

.cta-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 0; box-shadow: none;
}
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn .arr { transition: transform .22s ease; }
.btn:hover .arr { transform: translate(2px, -2px); }
.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-2);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn .ico { display: inline-flex; width: 16px; height: 16px; flex: none; }
.btn .ico svg { width: 100%; height: 100%; }

/* Indice de défilement */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3.4vh, 32px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 11px;
}
.scroll-hint:hover { color: var(--ink); }
.scroll-hint span { animation: nudge 1.9s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* Big hero divider rule with label */
.rule-label {
  margin-top: clamp(40px, 8vh, 80px);
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--faint);
}
.rule-label .ln { flex: 1; height: 1px; background: var(--line); }

/* =========================================================
   01 — EN BREF (carte de visite)
   ========================================================= */
.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.brief-statement {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(22px, 2.5vw, 31px);
  line-height: 1.36;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.brief-statement .hl { color: var(--accent); }
.brief-statement + .brief-statement,
.brief-sub {
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.006em;
  color: var(--muted);
}

.facts {
  border-top: 1px solid var(--line-strong);
}
.fact {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.fact dt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.fact dd { margin: 0; }
.fact .big {
  font-family: var(--sans);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.fact .small { display: block; margin-top: 3px; color: var(--muted); font-size: 15px; }

/* =========================================================
   02 — EXPERTISE / Modes d'intervention
   ========================================================= */
.modes {
  border-top: 1px solid var(--line-strong);
}
.mode {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(22px, 3.4vh, 32px) 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background-color .25s ease;
}
.mode:hover { background: var(--accent-wash); }
.mode .num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.mode h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(20px, 2.1vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.mode p { color: var(--muted); font-size: 16px; }
.mode .tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: var(--paper-2);
  border-radius: 0; box-shadow: none;
}
.tag-ico {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  fill: currentColor;
}

/* Stack technique (études de cas) */
.stack-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.stack-note { margin-top: 10px; }

/* Schéma d'architecture (études de cas) */
.arch-diagram {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.arch-layer {
  flex: 1 1 170px;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-2);
}
.arch-layer-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.arch-layer-techs { display: flex; flex-wrap: wrap; gap: 6px; }
.arch-layer-note { font-size: 13px; color: var(--muted); }
.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 15px;
}

/* =========================================================
   03 — PARCOURS (timeline éditoriale)
   ========================================================= */
.timeline { border-top: 1px solid var(--line-strong); }
.tl {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
  gap: clamp(18px, 4vw, 56px);
  padding: clamp(26px, 4vh, 40px) 0;
  border-bottom: 1px solid var(--line);
}
.tl-meta .org {
  font-family: var(--sans);
  font-size: clamp(19px, 1.8vw, 23px);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.tl-meta .yr {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.tl-meta .place { margin-top: 2px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--faint); text-transform: uppercase; }
.tl-body h3 {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.tl-body > p { margin-top: 8px; color: var(--muted); }
.tl-body ul { margin-top: 16px; display: grid; gap: 10px; }
.tl-body li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
}
.tl-body li::before {
  content: "";
  position: absolute;
  left: 2px; top: 11px;
  width: 6px; height: 6px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}

/* =========================================================
   04 — TRAVAUX RÉCENTS
   ========================================================= */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.work {

  padding: clamp(22px, 2.6vw, 30px);
  display: flex;
  flex-direction: column;
  min-height: 320px;
  transition: background-color .25s ease;
  border-radius: 0; box-shadow: none;
  background: var(--paper); border: 0; border-top: 2px solid var(--ink);
}
.work:hover { background-color: var(--paper-sink); }
.work .kind { color: var(--accent); margin-bottom: auto; }
.work h3 {
  margin-top: 22px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(21px, 1.9vw, 25px);
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.work p { margin-top: 10px; color: var(--muted); font-size: 15px; }
.work .why {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
}
.work .why b { color: var(--ink); font-weight: 600; }
.work .tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }

/* Bouton de fermeture de la visionneuse d'images. */
.case-close {
  position: absolute;
  top: clamp(18px, 3vw, 26px);
  right: clamp(18px, 3vw, 26px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.case-close:hover { border-color: var(--ink); color: var(--ink); }

/* =========================================================
   ÉTUDES DE CAS — pages /realisations/…/
   Usage, résumé et sommaire d'abord ; détail technique ensuite.
   ========================================================= */
.case-wrap { max-width: calc(760px + 2 * var(--pad)); }

.case-hero { padding-top: calc(var(--nav-h) + clamp(24px, 5vw, 48px)); }
.case-hero .wrap { display: grid; justify-items: start; gap: 12px; }
.case-back { margin-bottom: 4px; font-size: 14px; }
.case-hero .kind { color: var(--accent);
  font-size: 14px; letter-spacing: 0;
}
.case-hero h1 {
  font-family: var(--sans);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  font-weight: 650; letter-spacing: -.045em;
}
.case-use {
  font-family: var(--sans);
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.3;
  color: var(--ink);
  text-wrap: pretty;
}
.case-thesis { color: var(--ink-soft); font-size: 17px; line-height: 1.5; }
.case-facts {    color: var(--ink-soft);
  font-family: var(--sans); letter-spacing: 0; text-transform: none;
  font-size: 15px; line-height: 1.65; padding-left: 16px; border-left: 2px solid var(--accent);
}

/* Liens démo / code : pastilles avec icône, pour qu'ils sautent aux yeux
   au lieu de se fondre dans le texte courant. */
.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
  font-family: var(--sans); letter-spacing: 0; text-transform: none;
  border-radius: 0; box-shadow: none;
}
.case-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.case-link .ic { width: 15px; height: 15px; flex: none; }

.case-label {
  font-size: 12.5px;
  font-weight: 500;

  color: var(--muted);
  font-family: var(--sans); letter-spacing: 0; text-transform: none;
}

/* Résumé : problème, statut, rôle, solution, résultat, limite. */
.case-summary {
  margin-top: clamp(28px, 4vw, 40px);
  padding: clamp(20px, 3vw, 28px);
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  border-radius: 0; box-shadow: none;
}
.case-summary dl { margin: 14px 0 0; display: grid; gap: 12px; }
.case-summary dl > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 2px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.case-summary dl > div:first-child { padding-top: 0; border-top: 0; }
.case-summary dt { font-size: 14px; font-weight: 600; line-height: 1.7; color: var(--accent); }
.case-summary dd { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }

/* Sommaire : les trois parties, puis leurs sections. */
.case-toc { margin-top: clamp(28px, 4vw, 40px); }
.case-toc ol { margin: 0; padding: 0; list-style: none; }
.case-toc > ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px 28px;
  margin-top: 12px;
}
.case-toc a {
  display: inline-block;
  padding-block: 5px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.case-toc a:hover { color: var(--accent); text-decoration-color: currentColor; }
.case-toc > ol > li > a { font-weight: 600; color: var(--ink); }
.case-toc ol ol { margin-top: 4px; padding-left: 14px; border-left: 1px solid var(--line-strong); }
.case-toc ol ol a { font-size: 15px; line-height: 1.4; color: var(--ink-soft); }

/* Corps de l'étude. */
.case-part { margin-top: clamp(48px, 7vw, 72px); }
.case-part-title {
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);


  color: var(--accent);
  font-family: var(--sans); letter-spacing: 0; text-transform: none;
  font-size: 19px; font-weight: 600;
}
.case-content h3 {
  margin-top: clamp(32px, 4vw, 44px);
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 27px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.case-section:first-of-type h3 { margin-top: 28px; }
.case-content h4 {
  margin-top: 28px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.case-content p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.65;
  text-align: left; hyphens: none;
}
.case-content h3 + p,
.case-content h4 + p { margin-top: 12px; }
.case-content strong { color: var(--ink); font-weight: 600; }
.case-content pre {
  margin-top: 16px;
  padding: 18px 20px;
  background: var(--paper-sink);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  /* Retour à la ligne plutôt qu'un défilement horizontal non atteignable au clavier. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.case-content pre code {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.case-content p code {
  padding: 2px 6px;
  background: var(--paper-sink);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .88em;
  color: var(--ink);
}

/* Visuels d'étude de cas : schéma ou démonstration filmée, cadrés dans le
   même vocabulaire que .arch-layer, avec légende optionnelle en pied. */
.case-figure {
  margin: 20px 0;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: var(--paper);
  border-radius: 0; box-shadow: none;
}
.case-figure img,
.case-figure video { display: block; width: 100%; height: auto; }
.case-figure figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  font-style: italic;
}

/* Code des études : même cadre et même légende que les images ; coloration
   écrite dans le HTML (aucun script). Chaque ligne garde son indentation,
   et les lignes trop longues reprennent en retrait. */
.case-code pre {
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-radius: 0;
  background: var(--paper-sink);
}
.case-code .code-line {
  display: block;
  padding-left: calc((var(--i) + 2) * 1ch);
  text-indent: calc((var(--i) + 2) * -1ch);
}
.tok-key { color: var(--accent); }
.tok-str { color: #8A4B1F; }
.tok-num, .tok-lit { color: #8E2A52; }
.tok-punct { color: var(--muted); }
/* Visuels agrandissables dans les études. */
.case-figure .zoom-trigger { border-radius: 0; }
.case-figure .zoom-trigger:focus-visible { outline-offset: -3px; }

/* Schéma en étapes (Legirag) : liste ordonnée, lue dans l'ordre sans le visuel. */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 18px;
  list-style: none;
}
.flow-steps li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-2);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.flow-steps li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -11px;
  transform: translate(50%, -50%);
  color: var(--muted);
  font-family: var(--mono);
}
.flow-steps b { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.flow-loop { padding: 0 18px 16px; font-size: 14px; color: var(--muted); }
.case-content .flow-loop { margin: 0; font-size: 14px; color: var(--muted); }

.case-others {
  margin-top: clamp(56px, 8vw, 88px);
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}
.case-others ul { display: grid; gap: 8px; margin: 12px 0 16px; }
.case-others li { display: grid; }
.case-others li .text-link { min-height: 36px; font-size: 16px; }
.case-others li span:not([aria-hidden]) { color: var(--muted); font-size: 15px; }
.case-page .contact { margin-top: clamp(48px, 7vw, 80px); }

/* Dans la colonne de lecture, les couches se partagent la largeur au lieu
   de faire défiler le schéma. */
.case-content .arch-diagram { overflow: visible; }
.case-content .arch-layer { flex: 1 1 0; min-width: 0; }
.case-content .arch-layer .tag { white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 820px) {
  /* Les schémas passent en colonne plutôt que de défiler horizontalement. */
  .arch-diagram { flex-direction: column; overflow: visible; }
  .arch-layer { flex: none; min-width: 0; }
  .arch-arrow { transform: rotate(90deg); }
}
@media (max-width: 640px) {
  .flow-steps { grid-template-columns: 1fr; gap: 20px; }
  .flow-steps li:not(:last-child)::after { content: "↓"; top: auto; right: auto; bottom: -10px; left: 50%; transform: translate(-50%, 50%); }
  .case-summary dl > div { grid-template-columns: 1fr; }
  .case-content p { font-size: 16.5px;  -webkit-hyphens: manual;
  text-align: left; hyphens: none;
}
}

@media print {
  .nav, .skip-link, .case-back, .case-toc, .case-others, .case-page .contact { display: none; }
  body { background: #fff; }
  .case-hero { padding-top: 0; }
  .case-part { break-before: auto; }
  .case-figure, .case-summary, pre { break-inside: avoid; }
}

.case-table {
  margin-top: 20px;
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.case-table th, .case-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border: 1px solid var(--line);
}
.case-table thead th {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-sink);
}
.case-table tbody th[scope="row"] {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper-sink);
}
.case-table td { color: var(--ink-soft); }

/* =========================================================
   05 — IA
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.about-statement {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-soft);
}

/* =========================================================
   06 — AVIS
   ========================================================= */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}
.review {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
}
.review .q {
  font-family: var(--sans);
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: pretty;
}
.review .mark {
  font-family: var(--sans);
  font-size: 52px;
  line-height: 0.6;
  color: var(--accent);
  height: 26px;
}
.review footer {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.stars { color: var(--accent); letter-spacing: 1px; }

/* =========================================================
   07 — CONTACT
   ========================================================= */
.contact { padding-bottom: clamp(56px, 9vh, 110px); }
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.contact h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(38px, 6.5vw, 86px);
  letter-spacing: -0.035em;
  text-wrap: balance;
  line-height: 1.12;
}
.contact .lead { margin-top: 22px; max-width: 46ch; color: var(--muted); font-size: 18px; }
.contact-actions { display: grid; gap: 12px; }
.contact-card {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--paper-2);
  padding: 8px;
  display: grid;
  gap: 6px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 11px;
}
.contact-link:hover { background: var(--paper-sink); }
.contact-link .ic {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper-2);
  flex: none;
}
.contact-link:hover .ic { background: var(--accent); }
.contact-link .ic svg { width: 18px; height: 18px; }
.contact-link .txt { line-height: 1.3; }
.contact-link .txt .l { display: block; font-weight: 600; font-size: 15px; }
.contact-link .txt .s { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted); }
.contact-link .ext { margin-left: auto; color: var(--faint); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 34px;
}
.footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.footer .prompt { color: var(--accent); }
.footer .term { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 .5ch; }
.footer .arrow { color: var(--muted); }
.footer .end { white-space: nowrap; }
.caret {
  display: inline-block;
  width: .55em;
  height: 1.05em;
  transform: translateY(.16em);
  background: var(--accent);
  animation: blink 1.15s steps(1, end) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.footer a:hover { color: var(--ink); }

/* =========================================================
   REVEAL + MOUVEMENT
   Apparition : montée douce + léger flou qui se résorbe.
   L'intensité est pilotée par data-motion (discret / ample / aucun) ;
   la cascade (transition-delay) est posée en inline par le JS.
   ========================================================= */
.js [data-rise] {
  opacity: 0;
  transform: translateY(var(--rise-shift, 16px));
  filter: blur(var(--rise-blur, 5px));
  transition: opacity .85s cubic-bezier(.2,.7,.2,1),
              transform .85s cubic-bezier(.2,.7,.2,1),
              filter .85s cubic-bezier(.2,.7,.2,1);
}
.js [data-rise].in { opacity: 1; transform: none; filter: none; }
.js [data-rise][data-d="1"] { transition-delay: .07s; }
.js [data-rise][data-d="2"] { transition-delay: .14s; }
.js [data-rise][data-d="3"] { transition-delay: .21s; }
.js [data-rise][data-d="4"] { transition-delay: .28s; }
.js [data-rise][data-d="5"] { transition-delay: .35s; }

/* Intensité du mouvement */
[data-motion="discret"] { --rise-shift: 22px; --rise-blur: 6px; }
[data-motion="ample"]  { --rise-shift: 36px; --rise-blur: 10px; }
[data-motion="aucun"] .js [data-rise] { transition: none; }
[data-motion="aucun"] .js [data-rise],
[data-motion="aucun"] [data-rise] { opacity: 1 !important; transform: none !important; filter: none !important; }

/* Le hero reste statique. */
.hero-inner {
  align-items: start; will-change: auto;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .sec-head,
  .brief-grid,
  .tl,
  .about-grid,
  .contact-inner { grid-template-columns: 1fr; }
  .sec-head { gap: 14px; }
  .work-grid { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: 1fr; }
  .mode { grid-template-columns: 40px 1fr; }
  .mode .mode-desc { grid-column: 2; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .fact { grid-template-columns: 1fr; gap: 4px; }
  .hero-foot { gap: 22px; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }

  /* Tableau des quatre approches : empilement en blocs libellé/valeur
     plutôt que défilement horizontal. */
  .case-table, .case-table thead, .case-table tbody,
  .case-table tr, .case-table th, .case-table td {
    display: block;
    width: 100%;
  }
  .case-table thead { display: none; }
  .case-table tr {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
  }
  .case-table tr:first-child { margin-top: 20px; }
  .case-table th, .case-table td { border: 0; border-bottom: 1px solid var(--line); }
  .case-table tr > :last-child { border-bottom: 0; }
  .case-table th[scope="row"]::before,
  .case-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .js [data-rise] { opacity: 1; transform: none; filter: none; }
}

/* Accueil : proposition éditoriale du 23 septembre 2026. */
.skip-link {
  position: fixed;
  top: 8px;
  left: var(--pad);
  z-index: 300;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper-2);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.hero {
  min-height: 0;
  padding-top: calc(var(--nav-h) + 52px);
  padding-bottom: 48px;
  text-align: left;
}
.hero-inner { gap: 16px;
  align-items: start; will-change: auto;
}
.hero h1 { font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 650; letter-spacing: -.045em;
  line-height: 1.12;
}
.hero-role { font-size: clamp(17px, 2vw, 23px); font-weight: 600; color: var(--accent); }
.hero-lead { max-width: 54ch; font-size: clamp(21px, 2.2vw, 27px); }
.hero-secondary { max-width: 66ch; color: var(--muted); }
.hero-frame { font-size: 14px; font-weight: 500; }
.hero .cta-row { margin-top: 6px;
  justify-content: start;
}
.btn { min-height: 48px; height: auto; padding-block: 12px; line-height: 1.4; text-align: center;
  border-radius: 0; box-shadow: none;
}
.home-section-head { display: grid; gap: 14px; margin-bottom: 28px;
  border-left: 4px solid var(--accent); padding-left: 20px;
}
.projects { padding-block: 36px 64px; }
.projects .work { min-height: 0; }
.projects .work p { text-align: left; hyphens: none; }
.projects .work .kind { margin: 0;   line-height: 1.5;
  font-size: 14px; letter-spacing: 0;
}
.projects .work h3 { margin-top: 14px; font-size: 30px; }
.projects .work .project-use { font-size: 19px; line-height: 1.35; color: var(--ink); font-weight: 500; }
.project-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: auto; padding-top: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; color: var(--accent); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { color: var(--ink); }
/* Toutes les cartes partagent la même anatomie : statut, titre et usage,
   puis visuel au même format, texte et actions alignées en bas. */
/* Sous-grille : en-têtes, visuels et textes restent alignés d'une carte à
   l'autre, même quand un sous-titre passe sur deux lignes. */
.work-grid .work { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.project-body { display: flex; flex-direction: column; }
.project-media { position: relative; margin-top: 18px; }
.project-image { display: block; width: 100%; height: auto; aspect-ratio: 1.6; object-fit: contain; object-position: center; background: var(--paper); border: 1px solid var(--line);
  border-radius: 0; box-shadow: none;
}
.project-media-dark .project-image { background: #080b10; }
.work-mission { margin-block: 20px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px clamp(28px, 4vw, 56px); align-items: start; }
.work-mission .mission-body { display: flex; flex-direction: column; height: 100%; }
.mission-facts { display: grid;  gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line);  overflow: hidden;
  border-radius: 0; box-shadow: none;
  grid-template-columns: 1fr;
}
.mission-facts div {  background: var(--paper);
  padding: 12px 16px;
}
.mission-facts dt {     color: var(--accent);
  font-family: var(--sans); font-size: 20px; line-height: 1.4; font-weight: 600;
}
.mission-facts dd { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45;
  margin-top: 0;
}
.collaboration { padding-block: 64px; }
.mission-review { max-width: 850px; }
.mission-review .q { font-size: clamp(22px, 2.5vw, 30px); }
.mission-review footer { display: block; font-family: var(--sans); font-size: 14px; letter-spacing: 0; }
.collaboration-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-block: 36px; }
.collaboration-steps h3 { font-family: var(--sans); font-size: 25px; font-weight: 500; line-height: 1.25; margin-bottom: 10px; }
.collaboration-steps p { color: var(--muted); font-size: 16px; }
.career-note { display: flex; align-items: center; gap: 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.career-note img { width: 80px; height: 80px; flex: none; border-radius: 50%; object-fit: cover; }
.career-note p { color: var(--muted); max-width: 80ch; }
.contact { padding-block: 64px; }
.contact-inner { margin-top: 24px; }
.contact h2 { font-size: clamp(38px, 5vw, 64px);
  line-height: 1.12;
}
.contact-frame { margin-top: 16px; font-size: 15px; }
.contact-actions { justify-items: start; }
.footer .term { overflow-wrap: anywhere; }

@media (max-width: 860px) {
  /* visibility retire les liens fermés de l'ordre de tabulation ; elle bascule
     après le fondu à la fermeture, immédiatement à l'ouverture. */
  .nav-links { visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
  .nav.is-menu-open .nav-links { visibility: visible; transition-delay: 0s; }
  .collaboration-steps { grid-template-columns: 1fr; gap: 24px; }
  .work-mission { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav .wrap { gap: 8px; }
  .brand { font-size: 12px; gap: 6px; }
  .nav-cta { padding-inline: 12px; }
  .nav-toggle, .nav-cta { min-height: 44px; }
  .hero { padding-top: calc(var(--nav-h) + 24px); padding-bottom: 28px;
  text-align: left;
}
  .hero-inner { gap: 12px;
  align-items: start; will-change: auto;
}
  .hero-role span { display: block; }
  .hero-lead { font-size: 21px; line-height: 1.35; }
  .hero-secondary { font-size: 15px; line-height: 1.5; }
  .hero-frame { font-size: 12px; }
  .hero .cta-row { gap: 8px; width: 100%;
  justify-content: start;
}
  .cta-row .btn { width: 100%; padding-inline: 12px; font-size: 14px; }
  .projects { padding-top: 24px; }
  .home-section-head { gap: 10px; margin-bottom: 20px;
  border-left: 4px solid var(--accent); padding-left: 20px;
}
  .home-section-head .sec-title { font-size: 31px; }
  .projects .work { padding: 20px; }
  .projects .work h3 { margin-top: 10px; font-size: 27px; }
  .projects .work .project-use { font-size: 18px; }
  .project-actions { gap: 0 16px; padding-top: 10px; }
  .project-media { margin-top: 14px; }
  .mission-facts div {
  padding: 12px 16px;
}
  .career-note { align-items: flex-start; gap: 16px; }
  .career-note img { width: 56px; height: 56px; }
  .collaboration, .contact { padding-block: 44px; }
  .contact-actions .btn { padding-inline: 14px; font-size: 14px; }
}
@media (max-width: 360px) {
  .hero { padding-top: calc(var(--nav-h) + 16px); padding-bottom: 22px;
  text-align: left;
}
  .hero-inner { gap: 10px;
  align-items: start; will-change: auto;
}
  .hero-role { line-height: 1.35; }
  .hero-lead { font-size: 20px; line-height: 1.3; }
  .projects .work { padding: 18px; }
  .projects .work .project-use { font-size: 17px; line-height: 1.3; }
  .projects .work .project-body > p, .work-mission .mission-body > p:not(.kind):not(.project-use) { line-height: 1.5; }
}

/* Fenêtre basse (zoom fort, téléphone à l'horizontale) : la barre défile avec
   la page au lieu de masquer en permanence une part de l'écran. */
@media (max-height: 480px) {
  .nav { position: absolute;
  background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none;
}
  html { scroll-padding-top: 16px; }
}

.projects .work .project-role { font-size: 14px; color: var(--ink-soft); }

/* Visuels agrandissables et visionneuse plein écran. */
.zoom-trigger { display: block; width: 100%; padding: 0; border: 0; border-radius: 8px; background: none; cursor: zoom-in; }
.zoom-trigger:hover .project-image { border-color: var(--line-strong); }
.zoom-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(56px, 7vw, 80px) clamp(12px, 4vw, 48px) clamp(16px, 4vw, 48px); border: 0; background: transparent; cursor: zoom-out; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(10, 10, 8, .86); }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; background: #fff; cursor: default; }
.lightbox-close { position: fixed; }

/* SNCF : le paquet partagé est une dépendance, distincte du flux de calcul. */
.sncf-shared {
  display: grid;
  gap: 8px;
  margin: 18px 18px 0;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-2);
  font-size: 15px;
  color: var(--ink-soft);
}
.sncf-shared b { color: var(--accent); }
.sncf-platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px 18px 18px;
}
.case-content .sncf-platforms p { margin: 0; font-size: 14px; }
.case-content .sncf-flow-label {
  margin: 0;
  padding: 16px 18px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
@media (max-width: 600px) {
  .sncf-platforms { grid-template-columns: 1fr; }
}

/* Portrait à côté du nom dans le hero de l'accueil. */
.hero-identity { display: flex; align-items: center; gap: 24px; }
.hero-portrait { width: 80px; height: 80px; flex: none; border-radius: 50%; object-fit: cover; }
@media (max-width: 560px) {
  .hero-identity { gap: 14px; }
  .hero-portrait { width: 56px; height: 56px; }
  .hero-identity h1 { min-width: 0; font-size: clamp(30px, 7vw, 38px); }
}
