/* ==========================================================================
   Clody Miatti — Portfolio
   Direction artistique : « Backlog éditorial »
   Un seul fichier CSS, sans build. Les couleurs, typos et espacements
   passent par les variables de :root — modifier ici se répercute partout.
   ========================================================================== */

/* ---------- Polices (auto-hébergées, licence SIL OFL) ---------- */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Couleurs */
  --paper: #F5F5F1;
  --surface: #FFFFFF;
  --ink: #0A1433;
  --ink-body: #26304A;
  --ink-2: #4B5064;
  --ink-3: #5D6170;
  --muted: #6B6F7D;
  --line: #E2E2DC;
  --line-2: #CFCFC8;
  --line-soft: #EDEDE8;
  --box: #B9BBB3;
  --accent: #2340F0;
  --accent-hover: #1A2FC4;
  --accent-tint: #E9ECFE;
  --accent-soft: #EEF0FE;
  --on-dark: #F5F5F1;
  --on-dark-2: #C6CBDB;
  --on-dark-3: #A9B0C8;
  --accent-on-dark: #9AABFF;
  --line-dark: #26304F;
  --line-dark-2: #3A4466;
  --ink-raised: #13204A;

  /* Typographie */
  --font-sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Mise en page */
  --container: 1360px;
  --gutter: clamp(20px, 5vw, 80px);
  --section-y: clamp(72px, 8vw, 120px);
  --header-h: 72px;

  /* Rayons */
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 16px;
  --r-md: 18px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* Mouvement */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-card: 0 28px 56px -32px rgba(10, 20, 51, .38);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #FFFFFF; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
section[id], footer[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--ink); color: #FFFFFF; text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--font-mono); }
.label {
  font-family: var(--font-mono); font-size: 12px; font-weight: 400;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.label--sm { font-size: 11px; }
.label--accent { color: var(--accent); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Boutons & liens ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: var(--r-pill);
  border: 1px solid transparent; font-size: 16px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .3s var(--ease); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn--primary { background: var(--accent); color: #FFFFFF; }
.btn--primary:hover { background: var(--ink); color: #FFFFFF; }
.btn--ghost { border-color: var(--line-2); background: transparent; color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.btn--on-dark { border-color: var(--line-dark-2); color: var(--on-dark); }
.btn--on-dark:hover { background: #FFFFFF; border-color: #FFFFFF; color: var(--ink); }
.btn--accent-on-dark { background: var(--accent); color: #FFFFFF; }
.btn--accent-on-dark:hover { background: #FFFFFF; color: var(--ink); }
.btn:hover .i-right { transform: translateX(3px); }
.btn:hover .i-down { transform: translateY(2px); }

.link-quiet {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--ink); font-weight: 500; text-decoration: none; transition: color .2s ease;
}
.link-quiet svg { width: 16px; height: 16px; flex: none; transition: transform .3s var(--ease); }
.link-quiet:hover { color: var(--accent); }
.link-quiet:hover .i-left { transform: translateX(-3px); }
.link-quiet:hover .i-right { transform: translateX(3px); }
.link-quiet--muted { color: var(--ink-2); padding: 0 12px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 245, 241, .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 36px; height: 36px; border-radius: 9px; background: var(--ink); color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; letter-spacing: -.02em;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.brand__role { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.nav__link { position: relative; color: var(--ink); text-decoration: none; }
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after, .nav__link[aria-current="true"]::after { transform: scaleX(1); }

.burger {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer;
}
.burger svg { width: 20px; height: 20px; }
.burger .i-close { display: none; }
.burger[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.burger[aria-expanded="true"] .i-menu { display: none; }
.burger[aria-expanded="true"] .i-close { display: block; }

.mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--paper); border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px -40px rgba(10, 20, 51, .45);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.mobile-menu__nav { display: flex; flex-direction: column; padding-top: 12px; padding-bottom: 28px; }
.mobile-menu__link {
  display: flex; justify-content: space-between; align-items: center; min-height: 60px;
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
  font-size: 28px; font-weight: 600; letter-spacing: -.03em;
}
.mobile-menu__link:last-of-type { border-bottom: 0; }
.mobile-menu__link span:last-child { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.mobile-menu__link:hover { color: var(--accent); }
.mobile-menu .btn { margin-top: 20px; }

@media (max-width: 1020px) {
  .nav, .site-header__cta { display: none; }
  .burger { display: inline-flex; }
}

/* ---------- Titres de section ---------- */
.section { padding: var(--section-y) 0; }
.section--surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; gap: 20px 48px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head--tight { margin-bottom: 36px; }
.section-head__label {
  flex: 1 1 200px; max-width: 300px; padding-top: 14px; align-self: flex-start;
  display: flex; align-items: center; gap: 12px;
}
.section-head__label .rule { width: 32px; height: 1px; background: var(--line-2); flex: none; }
.section-head__body { flex: 999 1 560px; min-width: 0; }
.h2 {
  font-size: clamp(36px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -.04em;
  font-weight: 600; text-wrap: balance;
}
.h2--sm { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.05; letter-spacing: -.035em; }
.lead {
  margin-top: 24px; max-width: 680px; font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6; color: var(--ink-2); text-wrap: pretty;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(56px, 8vw, 112px); }
.hero__dots {
  position: absolute; top: 0; right: 0; width: 58%; height: 100%; pointer-events: none;
  background-image: radial-gradient(rgba(10, 20, 51, .16) 1px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(105deg, transparent 8%, #000 60%);
  mask-image: linear-gradient(105deg, transparent 8%, #000 60%);
}
.hero .container { position: relative; }
.hero__eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.hero__eyebrow .rule { width: 32px; height: 1px; background: var(--line-2); }
.hero__eyebrow > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.hero__grid { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 48px 56px; }
.hero__main { flex: 999 1 600px; min-width: 0; }
.hero__title {
  font-size: clamp(68px, 11.6vw, 176px); line-height: 1.02; letter-spacing: -.05em; font-weight: 600;
}
.hero__title-mark, .contact__title-mark {
  display: inline-block; width: .16em; height: .16em; margin-left: .05em;
  border-radius: .025em; background: var(--accent);
}
.hero__subtitle {
  margin-top: clamp(24px, 3vw, 36px); font-size: clamp(20px, 2vw, 28px);
  line-height: 1.25; letter-spacing: -.02em; font-weight: 500;
}
.hero__subtitle .dash { color: var(--muted); font-weight: 400; }
.hero__intro {
  margin-top: 16px; max-width: 580px; font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.55; color: var(--ink-2); text-wrap: pretty;
}
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.trail {
  margin-top: clamp(56px, 7vw, 96px); padding: 22px 0 28px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 40px; font-size: 15px; color: var(--ink-2);
}
.trail strong { color: var(--ink); font-weight: 600; }
.trail .mono { font-size: 12px; margin-left: 10px; }
.trail .link-quiet { margin-left: auto; }

/* Carte user story */
.story {
  flex: 1 1 340px; max-width: 440px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  box-shadow: 0 1px 0 rgba(10, 20, 51, .04), 0 36px 64px -44px rgba(10, 20, 51, .45);
}
.story__head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
}
.story__head > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.story__id { padding: 4px 8px; border-radius: var(--r-xs); background: var(--accent-tint); color: var(--accent); font-weight: 500; }
.story__text { padding: 22px 20px 6px; font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.story__kw { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--accent); }
.story__criteria { padding: 10px 12px; }
.story__criteria .label { padding: 10px 8px 6px; display: block; }
.criterion {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 8px;
  border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 15px;
  transition: background-color .2s ease;
}
.criterion:hover { background: var(--accent-soft); color: var(--ink); }
.criterion__box {
  flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--box);
  background: var(--surface); display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .2s ease, border-color .2s ease;
}
.criterion__box svg { width: 13px; height: 13px; opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .25s var(--ease); }
.criterion.is-done .criterion__box { background: var(--accent); border-color: var(--accent); }
.criterion.is-done .criterion__box svg { opacity: 1; transform: none; }
.criterion__label { flex: 1; min-width: 0; }
.criterion__sec { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.story__foot { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.progress { flex: 1; display: flex; gap: 4px; }
.progress__seg { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background-color .3s ease; }
.progress__seg.is-on { background: var(--accent); }
.story__count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }

/* ---------- À propos : 4 dimensions ---------- */
.dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 16px; }
.dim {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 28px 26px 30px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  transition: border-color .25s ease;
}
.dim:hover { border-color: var(--ink); }
.dim__bar {
  position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent);
  transform: scaleX(.12); transform-origin: left; transition: transform .5s var(--ease);
}
.dim:hover .dim__bar { transform: scaleX(1); }
.dim__top { display: flex; justify-content: space-between; align-items: center; }
.dim__icon { width: 28px; height: 28px; color: var(--ink); transition: color .25s ease; }
.dim:hover .dim__icon { color: var(--accent); }
.dim__num { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.dim__title { margin-top: 18px; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
.dim__text { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.dim__proof { margin-top: auto; padding-top: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* ---------- Expériences ---------- */
.xp { display: flex; flex-wrap: wrap; gap: 16px 48px; padding: 44px 0; border-top: 1px solid var(--line-2); }
.xp:last-child { border-bottom: 1px solid var(--line-2); }
.xp__meta { flex: 1 1 200px; max-width: 300px; display: flex; flex-direction: column; gap: 6px; }
.xp__years { font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
.xp__place { font-size: 14px; color: var(--ink-3); }
.xp__body { flex: 999 1 560px; min-width: 0; }
.xp__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.xp__role { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.xp__company { font-size: 18px; font-weight: 600; color: var(--accent); }
.xp__line { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 15px; color: var(--ink-2); }
.result-pill {
  margin-top: 16px; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  padding: 12px 16px; border-radius: 12px; background: var(--accent-tint); font-size: 15px;
}
.result-pill strong { font-weight: 700; }
.subprojects { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.subproject { padding: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.subproject__title { margin-top: 10px; font-size: 19px; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; }
.subproject__desc { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

.tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 5px 10px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); font-size: 13px; color: var(--ink-2);
  transition: border-color .2s ease, color .2s ease;
}
.subproject .tag { background: var(--paper); }
.tag:hover { border-color: var(--accent); color: var(--accent); }

.toggle {
  appearance: none; border: 0; background: transparent; padding: 0; margin-top: 12px;
  min-height: 44px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; transition: color .2s ease;
}
.toggle:hover { color: var(--accent); }
.toggle__count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.toggle svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.resp-list {
  margin-top: 4px; padding-top: 16px; max-width: 760px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.55; color: var(--ink-body);
}
.subproject .resp-list { border-top-color: var(--line-soft); }
.resp-list li { display: flex; gap: 12px; }
.resp-list li::before {
  content: ""; flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: 1px; background: var(--accent);
}

/* ---------- Projets ---------- */
.pcard {
  display: flex; flex-wrap: wrap; gap: 32px 48px; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  transition: transform .4s var(--ease), box-shadow .4s ease, border-color .25s ease;
}
.pcard:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--ink); }
.pcard--wide { padding: clamp(24px, 3.4vw, 44px); }
.pcard--stack { flex-direction: column; flex-wrap: nowrap; gap: 0; overflow: hidden; height: 100%; }
.pcard__content { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; }
.pcard--stack .pcard__content { flex: 1; padding: clamp(22px, 2.6vw, 32px); }
.pcard__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.pcard__num { font-size: clamp(56px, 6vw, 88px); line-height: .9; letter-spacing: -.06em; font-weight: 500; color: var(--accent); }
.pcard--stack .pcard__num { font-size: 56px; }
.pcard__meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); text-align: right; line-height: 1.6; }
.pcard__kicker { margin-top: 26px; }
.pcard__title { margin-top: 8px; font-size: clamp(26px, 2.8vw, 40px); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
.pcard--stack .pcard__title { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; letter-spacing: -.03em; }
.pcard__desc { margin-top: 16px; font-size: 16px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.pcard .tags { margin-top: 22px; }
.pcard .tag { background: transparent; }
.pcard__cta {
  margin-top: auto; padding-top: 28px; display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; transition: color .2s ease;
}
.pcard__cta svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.pcard:hover .pcard__cta { color: var(--accent); }
.pcard:hover .pcard__cta svg { transform: translateX(5px); }

.facts {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 16px;
}
.fact dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.fact dd { margin-top: 6px; font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.facts-note { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }

.viz {
  display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--r);
  background: var(--paper); transition: background-color .3s ease;
}
.pcard--wide .viz { flex: 1 1 460px; min-width: 0; justify-content: center; align-self: center; }
.pcard--stack .viz { margin: 12px 12px 0; padding: 18px; border-radius: 14px; }
.pcard:hover .viz { background: var(--accent-soft); }
.viz svg { width: 100%; height: auto; }
.viz figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.viz .flow { stroke: var(--accent); }
.svg-accent-fill { fill: var(--accent); }
.svg-accent-stroke { stroke: var(--accent); }
@keyframes flow { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }

.projects-next { margin-top: 16px; }
.projects-pair { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 16px; }

/* ---------- Compétences ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  appearance: none; cursor: pointer; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  font-size: 15px; font-weight: 500;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); border-top: 1px solid var(--line-2); }
.skill-cat { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); transition: opacity .35s ease; }
.skill-cat.is-dimmed { opacity: .25; }
.skill-cat__title { margin: 10px 0 18px; font-size: 22px; letter-spacing: -.02em; font-weight: 600; }
.skill-cat .tags { margin-top: 0; gap: 8px; }
.skill-cat .tag { padding: 7px 12px; border-color: var(--line-2); background: transparent; font-size: 14px; color: var(--ink); }
.skill-cat .tag--mono { border-radius: 8px; font-family: var(--font-mono); font-size: 13px; }
.langs { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; font-size: 15px; color: var(--ink-2); }
.langs strong { color: var(--ink); font-weight: 600; }

/* ---------- Formation & certifications ---------- */
.section--flush-top { padding-top: 0; }
.edu { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 16px; }
.card { padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.edu__row { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.edu__title { font-size: 26px; line-height: 1.15; letter-spacing: -.025em; font-weight: 600; }
.edu__school { margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.certs__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend .is-done { background: var(--ink); }
.legend .is-progress { border: 1.5px dashed var(--ink-3); }
.cert { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.certs__list { margin-top: 18px; }
.certs__list .cert:last-child { padding-bottom: 0; }
.cert__name { font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
.cert__org { margin-top: 2px; font-size: 14px; color: var(--ink-3); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; }
.badge svg { width: 14px; height: 14px; }
.badge--done { background: var(--ink); color: #FFFFFF; }
.badge--progress { padding: 5px 12px; border: 1.5px dashed var(--ink-3); color: var(--ink-body); }

/* ---------- Contact / pied de page ---------- */
.contact { background: var(--ink); color: var(--on-dark); padding: clamp(80px, 10vw, 152px) 0 40px; }
.contact .label { color: var(--on-dark-3); }
.contact .label .rule { background: var(--line-dark-2); }
.contact .label--accent, .contact__index { color: var(--accent-on-dark); }
.contact__kicker { display: flex; align-items: center; gap: 12px; }
.contact__kicker .rule { width: 32px; height: 1px; background: var(--line-dark-2); }
.contact__title {
  margin-top: 28px; max-width: 1100px; font-size: clamp(46px, 8vw, 124px); line-height: .94;
  letter-spacing: -.055em; font-weight: 600; text-wrap: balance;
}
.contact__title-mark { background: var(--accent-on-dark); }
.contact__text { margin-top: 32px; max-width: 560px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--on-dark-2); }
.contact__actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.contact__email { margin-top: 20px; font-family: var(--font-mono); font-size: 14px; color: var(--on-dark-3); }
.contact__email a { color: inherit; text-decoration: none; }
.contact__email a:hover { color: #FFFFFF; }
.footer-bar {
  margin-top: clamp(72px, 9vw, 128px); padding-top: 24px; border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px;
  font-size: 14px; color: var(--on-dark-3);
}
.footer-bar .mono { font-size: 12px; }
.footer-bar .link-quiet { color: var(--on-dark); }
.footer-bar .link-quiet:hover { color: var(--accent-on-dark); }

/* ==========================================================================
   Pages projet (études de cas)
   ========================================================================== */
.case-header { border-bottom: 1px solid var(--line); }
.case-header__bar { min-height: var(--header-h); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.case-header__pager { display: flex; align-items: center; gap: 16px; }
.case-header__pager .count { font-family: var(--font-mono); font-size: 13px; }
.case-header__pager .count span { color: var(--muted); }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink); transition: color .2s ease; }
.icon-link svg { width: 18px; height: 18px; }
.icon-link:hover { color: var(--accent); }

.case-hero { padding: clamp(56px, 7vw, 104px) 0 clamp(48px, 5vw, 72px); }
.case-hero__grid { display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: flex-start; }
.case-hero__num { flex: none; font-size: clamp(88px, 13vw, 200px); line-height: .8; letter-spacing: -.07em; font-weight: 500; color: var(--accent); }
.case-hero__body { flex: 999 1 560px; min-width: 0; }
.case-hero__title { margin-top: 16px; font-size: clamp(40px, 5.6vw, 84px); line-height: .98; letter-spacing: -.045em; font-weight: 600; text-wrap: balance; }
.case-hero__intro { margin-top: 28px; max-width: 720px; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.case-meta { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); border-top: 1px solid var(--ink); }
.case-meta > div { padding: 18px 20px 0 0; }
.case-meta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.case-meta dd { margin-top: 8px; font-size: 17px; font-weight: 600; }
.case-meta .is-accent { color: var(--accent); }

.case-body { display: flex; flex-wrap: wrap; gap: 40px 64px; padding-bottom: clamp(72px, 8vw, 112px); }
.case-aside { flex: 1 1 220px; max-width: 280px; position: sticky; top: 32px; align-self: flex-start; }
.case-aside .label { display: block; margin: 0 0 12px 14px; }
.steps { display: flex; flex-direction: column; gap: 4px; }
.step {
  display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: background-color .2s ease, color .2s ease;
}
.step:hover { background: var(--surface); color: var(--ink); }
.step__n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.step[aria-current="step"] { background: var(--ink); color: #FFFFFF; }
.step[aria-current="step"] .step__n { color: var(--accent-on-dark); }
@media (max-width: 980px) {
  .case-aside { position: static; max-width: none; }
  .steps { flex-direction: row; flex-wrap: wrap; }
}
.case-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: clamp(64px, 7vw, 104px); }
.case-section .h3 { margin-top: 14px; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
.case-subhead { margin-top: 40px; font-size: clamp(22px, 2vw, 28px); line-height: 1.15; letter-spacing: -.025em; font-weight: 600; text-wrap: balance; }
.case-subhead + .lead { margin-top: 16px; }
.case-split { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-end; }
.case-split .h3 { flex: 999 1 360px; margin-top: 0; }
.case-split--center { align-items: center; }
.case-split__text { flex: 1 1 300px; min-width: 0; }
.case-split__text .h3 { margin-top: 0; }
.stat-card { flex: 1 1 220px; padding: 24px 28px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.stat { font-size: clamp(44px, 4.4vw, 64px); line-height: 1; letter-spacing: -.05em; font-weight: 600; }
.stat--md { font-size: clamp(36px, 3.6vw, 52px); letter-spacing: -.045em; }
.stat-label { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.ctx-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.ctx-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.ctx-card__stats { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ctx-card__stats .stat-label { margin-top: 8px; font-size: 14px; line-height: 1.45; }
.ctx-card__note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.ctx-footnote { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

.stakes { margin-top: 20px; border-top: 1px solid var(--line-2); }
.stakes__row { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.stakes__key { flex: 1 1 120px; max-width: 160px; font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.stakes__text { flex: 999 1 400px; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.35; letter-spacing: -.02em; font-weight: 500; text-wrap: pretty; }

.matrix { margin-top: 32px; border-top: 1px solid var(--ink); }
.matrix__head { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.matrix__row { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 22px 16px; border-bottom: 1px solid var(--line); border-radius: 4px; transition: background-color .25s ease; }
.matrix__row:hover { background: var(--surface); }
.matrix__key { flex: 1 1 140px; max-width: 180px; font-size: 17px; font-weight: 600; }
.matrix__cell { flex: 1 1 260px; font-size: 15.5px; line-height: 1.55; color: var(--ink-body); }
.matrix__cell--wide { flex: 999 1 380px; font-size: 16px; }
.matrix__cell .label { display: none; margin-bottom: 6px; }
@media (max-width: 760px) {
  .matrix__head { display: none; }
  .matrix__cell .label { display: block; }
}

.method-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.method-tags .tag { padding: 7px 12px; border-color: var(--line-2); background: transparent; font-size: 14px; color: var(--ink); }
.method-tags .tag--mono { border-radius: 8px; font-family: var(--font-mono); font-size: 13px; }
.diagram { flex: 1 1 340px; min-width: 0; padding: 24px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.diagram svg { width: 100%; height: auto; }
.diagram figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }

.results-intro { margin-top: 16px; max-width: 640px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.results-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.slot {
  min-height: 180px; padding: 24px; border: 1.5px dashed var(--box); border-radius: var(--r);
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.slot--short { min-height: 150px; }
.slot__value { font-size: 36px; font-weight: 600; letter-spacing: -.04em; color: var(--muted); }
.slot__hint { font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.slot svg { width: 32px; height: 32px; color: var(--muted); }
.deliverable { min-height: 180px; padding: 24px; border-radius: var(--r); background: var(--ink); color: #FFFFFF; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.deliverable .label { color: var(--on-dark-3); }
.deliverable__value { font-size: 52px; line-height: 1; font-weight: 600; letter-spacing: -.05em; }
.deliverable__text { font-size: 14px; line-height: 1.5; color: var(--on-dark-2); }

.result-hero { margin-top: 20px; padding: clamp(28px, 4vw, 48px); border-radius: var(--r-lg); background: var(--ink); color: #FFFFFF; }
.result-hero__top { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: flex-end; }
.result-hero__value { flex: 1 1 260px; font-size: clamp(88px, 11vw, 168px); line-height: .85; letter-spacing: -.07em; font-weight: 600; }
.result-hero__value span { color: var(--accent-on-dark); }
.result-hero__text { flex: 999 1 280px; max-width: 420px; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.35; letter-spacing: -.015em; color: #E3E6EF; }
.bars { margin-top: 40px; display: flex; flex-direction: column; gap: 14px; }
.bars__row { display: flex; align-items: center; gap: 16px; }
.bars__key { flex: none; width: 64px; font-family: var(--font-mono); font-size: 11px; color: var(--on-dark-3); }
.bars__key--accent { color: var(--accent-on-dark); }
.bars__track { flex: 1; display: flex; }
.bars__fill { height: 14px; border-radius: 4px; }
.bars__fill--before { width: 100%; background: var(--line-dark); }
.bars__fill--after { width: 70%; background: var(--accent); transform-origin: left; }
.result-hero__note { margin-top: 24px; font-family: var(--font-mono); font-size: 11px; color: var(--on-dark-3); }

.next-case { display: block; background: var(--ink); color: #FFFFFF; text-decoration: none; transition: background-color .3s ease; }
.next-case:hover { background: var(--ink-raised); color: #FFFFFF; }
.next-case__inner { padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; }
.next-case .label { color: var(--on-dark-3); }
.next-case__title { margin-top: 14px; font-size: clamp(36px, 5vw, 72px); line-height: 1; letter-spacing: -.045em; font-weight: 600; }
.next-case svg { width: 56px; height: 56px; color: var(--accent-on-dark); transition: transform .3s var(--ease); }
.next-case:hover svg { transform: translateX(6px); }

/* Page 404 */
.notfound { min-height: 100vh; display: flex; align-items: center; }
.notfound__code { font-size: clamp(120px, 22vw, 280px); line-height: .8; letter-spacing: -.07em; font-weight: 600; color: var(--accent); }
.notfound__title { margin-top: 24px; font-size: clamp(32px, 4vw, 56px); line-height: 1.05; letter-spacing: -.04em; font-weight: 600; }
.notfound .btn { margin-top: 32px; }

/* ==========================================================================
   Mouvement — toujours désactivé si l'utilisateur réduit les animations
   ========================================================================== */
@keyframes rise { from { transform: translateY(22px); } to { transform: none; } }
@keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(1.43); } to { transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 1s var(--ease) both; }
  .rise-2 { animation-delay: .08s; }
  .rise-3 { animation-delay: .16s; }
  .rise-4 { animation-delay: .24s; }
  .pcard:hover .flow { animation: flow 1.2s linear infinite; }

  /* Apparition au défilement : CSS natif (Chrome, Edge, Safari récents)… */
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
  /* …sinon repli JavaScript (classe ajoutée par main.js) */
  .reveal-pending { opacity: 0; transform: translateY(28px); }
  .reveal-pending.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Impression : une version lisible du CV */
@media print {
  .site-header, .hero__dots, .story, .filters, .toggle, .hero__actions, .contact__actions, .next-case { display: none !important; }
  .resp-list[hidden] { display: flex !important; }
  .section, .contact { padding: 32px 0; }
  .contact { background: none; color: var(--ink); }
  .pcard { break-inside: avoid; }
}

/* ---------- Icônes (sprite SVG inline en haut de chaque page) ---------- */
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico--thin { stroke-width: 1.4; }
.ico--bold { stroke-width: 2.4; }
.ico--heavy { stroke-width: 3; }
.ico--lg { width: 28px; height: 28px; }
.ico--sm { width: 15px; height: 15px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.matrix__head .matrix__key, .matrix__head .matrix__cell { font: inherit; color: inherit; letter-spacing: inherit; }

/* ---------- Ajustements petits écrans ---------- */
@media (max-width: 720px) {
  .case-header__bar > .label { display: none; }
}
@media (max-width: 520px) {
  .hero__eyebrow .rule { display: none; }
  .hero__actions .btn, .contact__actions .btn { flex: 1 1 100%; }
  .trail .link-quiet { margin-left: 0; }
}
/* Carte projet sans page de détail : pas d'effet de survol */
.pcard--static:hover { transform: none; box-shadow: none; border-color: var(--line); }
.pcard--static:hover .viz { background: var(--paper); }
.stat--sm { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -.03em; }

/* Liens dans le texte et dans les métadonnées d'étude de cas */
.inline-link { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color .2s ease; }
.inline-link:hover { color: var(--accent); }
.meta-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; }
.meta-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 4px; }
/* Logo d'entreprise à la place du nom (frise Expériences) */
.xp__logo { display: block; width: auto; align-self: center; }
.xp__logo--mh { height: 44px; }
.xp__logo--audiens { height: 32px; }
.xp__logo--henner { height: 56px; }

/* Captures d'écran (carte projet 01 et étude de cas Cœur Industrie) */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; aspect-ratio: 1.45 / 1; min-height: 0; overflow: hidden; }
.shots > .shot { min-height: 0; height: 100%; }
.shot { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); background: #FFFFFF; box-shadow: 0 12px 24px -16px rgba(10, 20, 51, .35); }
.shot--main { grid-row: span 2; }
.shot--single { height: auto; aspect-ratio: 1400 / 965; }
.gallery { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.gallery > img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.gallery__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.shot-pan { height: 520px; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: #FFFFFF; }
.shot-pan img { width: 100%; height: auto; transform: translateY(0); transition: transform 6s ease-in-out; }
.gallery figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .shot-pan:hover img { transform: translateY(calc(-100% + 520px)); }
}

/* Objectifs de la refonte Cœur Industrie */
.objectives { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.objective { padding: 24px 28px; border-radius: var(--r-md); background: var(--ink); color: #FFFFFF; }
.objective .label { color: var(--accent-on-dark); }
.objective__title { margin-top: 10px; font-size: 26px; line-height: 1.15; letter-spacing: -.025em; font-weight: 600; }
