/* ============================================================
   Portfolio — Anis Mezdari · feuille de style unique
   Contrat de performance (voir CLAUDE.md à la racine du projet) :
   - page au repos = zéro animation en cours, zéro boucle rAF ;
   - on n'anime que transform et opacity (1 exception ponctuelle :
     flou de 6 px du sous-titre du hero, une seule fois) ;
   - UN SEUL backdrop-filter : la barre de navigation (blur 12px) ;
   - aucun filtre SVG ; fond = calque fixe statique + grain statique ;
   - survols réservés à (hover: hover) and (pointer: fine) ;
   - prefers-reduced-motion respecté partout (section 18, en dernier).
   Blocs repris de design/board.css (vérifiés) : numéro d'origine entre crochets.
   ============================================================ */

/* ── 0. Typographie [board §0, tel quel] ── */
:root {
  --font-display: 'Hubot Sans', 'Mona Sans', system-ui, sans-serif;
  --font-body: 'Mona Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --font-card: var(--font-body);
  --display-stretch: 112%;
  --hero-size: clamp(52px, 9.5vw, 124px);
  --hero-w1: 400;
  --hero-w2: 800;
  --hero-track: -.025em;
  --hero-lh: .95;
  --h2-size: clamp(32px, 3.3vw, 46px);
  --h2-w: 700;
  --h2-track: -.01em;
  --sub-w: 600;
  --sub-track: .08em;
  --card-w: 600;
  --mono-track: .1em;
  --body-size: 16.5px;
}

/* ── 1. Palette [board §1] ── */
:root {
  color-scheme: dark;
  --bg: #07090D;
  --surface-1: rgba(20, 25, 36, .46);
  --surface-2: rgba(20, 25, 36, .72);
  --text-1: #F2F5FA;
  --text-2: rgba(242, 245, 250, .68);
  --text-3: rgba(242, 245, 250, .58);   /* cartes uniquement (4,8:1 au pire cas) */
  --text-4: rgba(242, 245, 250, .28);   /* décoratif uniquement, jamais du texte */
  --border: rgba(255, 255, 255, .08);
  --border-hover: rgba(255, 255, 255, .16);
  --accent: #5EBFD5;  --accent-rgb: 94 191 213;   /* point cyan du logo Thales */
  --navy: #2C2F72;    --navy-rgb: 44 47 114;      /* marine Thales : lumière de fond seulement */
  --done: #3FCF8E;    --done-rgb: 63 207 142;
  --wip: #F2A93B;     --wip-rgb: 242 169 59;
  --tip-bg: #11151C;                              /* surface-2 rendue opaque (infobulles, menu) */
  --dlg-bg: #0E1219;                              /* dialogues : surface opaque, pas de flou dessous */

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --radius: 18px;
  --gutter: 16px;
}
@media (min-width: 640px) { :root { --gutter: 24px; } }

/* ── 2. Base [board §2] ── */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  scroll-padding-top: 92px;
  scrollbar-gutter: stable;             /* verrouillage des dialogues sans décalage */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.is-locked { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }     /* défilement natif */
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
a { color: var(--accent); text-underline-offset: .2em; }
button { font: inherit; color: inherit; }
code { font-family: var(--font-mono); font-size: .92em; }
::selection { background: rgb(var(--accent-rgb) / .32); color: #fff; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }        /* « 2025-2027 » jamais coupé au trait d'union */
/* Chiffres dans un titre en Hubot Sans : son zéro est barré (« 2θ12 »), aucune option
   OpenType ne l'enlève → les chiffres passent en Mona Sans. */
.num { font-family: var(--font-body); font-stretch: normal; font-weight: 600; }

.skip {
  position: absolute;
  top: 8px; left: 16px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text-1);
  color: #0A0D12;
  font: 600 14px/1 var(--font-body);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s var(--ease-soft);
}
.skip:focus-visible { transform: none; }

/* Sans JS : ni filtre ni bouton copier (le lien mailto suffit). */
html:not(.js) [data-filter],
html:not(.js) .copy { display: none; }

/* ── 3. Fond : UN calque fixe statique (z -2) + grain statique (z -1) [board §3, fond A] ── */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: #05070B url("../assets/bg/a-1280.webp") center / cover no-repeat;
}
/* 2560 dès que l'écran physique dépasse ~1400 px (T14 1920×1080 à 125 % = 1536 px CSS) */
@media (min-width: 1100px), (min-width: 700px) and (min-resolution: 1.5dppx) {
  .bg { background-image: url("../assets/bg/a-2560.webp"); }
}
/* Grain : alpha simple, pas de mix-blend-mode, pas d'animation. */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("../assets/bg/grain-256.png") 0 0 / 256px 256px repeat;
  opacity: .05;
}

/* ── 4. Barre de navigation : le SEUL backdrop-filter de la page [board §4] ── */
.nav {
  position: fixed;
  top: 12px;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 50;
  max-width: 1200px;
  margin-inline: auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 18px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 32px -16px rgba(0, 0, 0, .7);
  backdrop-filter: blur(12px);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  color: var(--text-1);
  font: var(--sub-w) 15px/1 var(--font-display);
  font-stretch: var(--display-stretch);
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
}
.nav__brand .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .14); flex: none; }

/* Liens (≥ 900 px). Couleur changée SANS transition. */
.nav__links { position: relative; display: flex; align-items: center; align-self: stretch; gap: 2px; }
.nav__links a,
.nav__panel a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-2);
  font: var(--sub-w) 12.5px/1 var(--font-display);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--sub-track);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav__links a[aria-current],
.nav__panel a[aria-current] { color: var(--text-1); }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover, .nav__panel a:hover { color: var(--text-1); }
}
/* Indicateur de section : le « point Thales », taille fixe, ne fait que translater. */
.nav__ind {
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgb(var(--accent-rgb) / .8);
  opacity: 0;
  pointer-events: none;
  transition: transform .38s var(--ease-out), opacity .2s ease;
}
.nav__ind.is-on { opacity: 1; }
.nav__ind.no-tr { transition: none; }

/* Menu mobile (< 900 px) : motif « disclosure », pas une modale. */
.nav__menu {
  position: relative;
  display: none;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav__bar {
  position: absolute;
  left: 11px;
  top: calc(50% - .75px);
  width: 16px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--text-1);
  transition: transform .25s var(--ease-out);
}
.nav__bar:first-child { transform: translateY(-3px); }
.nav__bar:last-child  { transform: translateY(3px); }
.nav__menu[aria-expanded="true"] .nav__bar:first-child { transform: rotate(45deg); }
.nav__menu[aria-expanded="true"] .nav__bar:last-child  { transform: rotate(-45deg); }
/* Contraste élevé Windows : les fonds sont forcés à Canvas → barres dessinées en CanvasText. */
@media (forced-colors: active) {
  .nav__bar { forced-color-adjust: none; background: CanvasText; }
}
.nav__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 16px;
  background: var(--tip-bg);             /* opaque, sans backdrop-filter */
  border: 1px solid var(--border-hover);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .85);
}
.nav__panel a { position: relative; display: flex; min-height: 48px; padding: 0 16px 0 30px; font-size: 13px; }
.nav__panel a[aria-current]::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgb(var(--accent-rgb) / .8);
}
@media (max-width: 899px) {
  .nav__links { display: none; }
  .nav__menu { display: block; }
}
@media (max-width: 599px) {
  .nav { padding-left: 14px; gap: 8px; }
  .nav__brand { font-size: 14px; gap: 7px; }
}
@media (max-width: 419px) {
  .nav__brand .last { display: none; }  /* « Anis » seul ; le lien garde son aria-label */
}
@media (max-width: 359px) {
  .nav__brand .dot { display: none; }
}
/* Infobulles : jamais de défilement horizontal (posé sur <main>, pas sur <html>). */
main { display: block; overflow-x: clip; }
main:focus { outline: none; }

/* ── 5. Grille bento 4 / 2 / 1 colonnes [board §5 + spec §4] ── */
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section {
  --section-pad: clamp(72px, 9vw, 120px);
  padding-top: var(--section-pad);
  scroll-margin-top: calc(-1 * var(--section-pad));   /* une ancre pose le TITRE sous la barre, pas le vide au-dessus */
}
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  grid-auto-rows: minmax(168px, auto);
}
.span-2 { grid-column: span 2; }
.span-4 { grid-column: 1 / -1; }
.row-2  { grid-row: span 2; }
@media (max-width: 1023px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; grid-auto-rows: minmax(150px, auto); }
}
@media (max-width: 639px) {
  .bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .span-2, .row-2 { grid-column: auto; grid-row: auto; }
}

/* ── 6. Cartes et titres [board §5-§6] ── */
/* Carte « verre sombre » SANS backdrop-filter : voile + reflet haut statiques. */
.card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(18px, 2.2vw, 24px);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 42%),
    var(--surface-1);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.card-kicker {
  display: block;
  margin-bottom: 10px;
  font: 500 11px/1.3 var(--font-mono);
  letter-spacing: var(--mono-track);
  text-transform: uppercase;
  color: var(--text-3);
}
.muted { color: var(--text-2); }
.small { font-size: 14px; line-height: 1.55; color: var(--text-2); }

/* Titres de section : capitales, « point Thales » devant, PAS de point final. */
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 28px;
}
.section__head > div { max-width: 720px; }
.section-title {
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-size: var(--h2-size);
  font-weight: var(--h2-w);
  letter-spacing: var(--h2-track);
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-1);
}
.section-title:focus { outline: none; }  /* cible de focus de repli (tabindex -1), pas un contrôle */
.section-title::before {
  content: "";
  display: inline-block;
  width: .17em;
  height: .17em;
  margin-right: .32em;
  vertical-align: .3em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 .07em rgb(var(--accent-rgb) / .16);
}
.section__lede { margin-top: 14px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.sub-head {
  margin-bottom: 14px;
  font: var(--sub-w) 12.5px/1.2 var(--font-display);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--sub-track);
  text-transform: uppercase;
  color: var(--text-2);
}

/* Marqueur « [à compléter] » : visible tant qu'Anis n'a pas fourni l'information.
   Bordure pointillée ambrée (repère « à faire »), texte --text-2 : il ne se confond
   pas avec la pastille pleine « En cours ». */
.ph {
  display: inline;
  padding: 1px 6px;
  border: 1px dashed rgb(var(--wip-rgb) / .62);
  border-radius: 5px;
  font: 500 11.5px/1.7 var(--font-mono);
  letter-spacing: .02em;
  color: var(--text-2);
  background: rgb(var(--wip-rgb) / .05);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Puces statiques en losange cyan [board .note-card li::before] */
.bul { display: grid; gap: 8px; }
.bul li { position: relative; padding-left: 16px; }
.bul li::before {
  content: "";
  position: absolute;
  left: 2px; top: .62em;
  width: 5px; height: 5px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* Pastilles texte (tags) : statiques, non interactives. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .035);
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-2);
}

/* ── 7. Hero [board §7, sans bandeau de planche ni rejeu] ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 112px var(--gutter) 96px;
  text-align: center;
}
.hero-name {
  --pad: .04em .07em .12em;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 26px;
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-size: var(--hero-size);
  line-height: var(--hero-lh);
  letter-spacing: var(--hero-track);
  transition: transform .45s var(--ease-out);
}
/* Nappe d'ombre statique (peinte une fois). */
.hero-name::before {
  content: "";
  position: absolute;
  inset: -18% -10%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .5), rgba(0, 0, 0, .22) 55%, transparent);
}
.hero-name__line { display: block; overflow: hidden; }
.hero-name__line--first { font-weight: var(--hero-w1); }
.hero-name__line--last  { font-weight: var(--hero-w2); }
.hero-name__rise { position: relative; display: block; padding: var(--pad); white-space: nowrap; }

/* Texte « chrome » : dégradé statique à reflet bleu glacier. */
.chrome {
  color: transparent;
  background: linear-gradient(160deg,
    #fff 0%,
    rgba(255, 255, 255, .55) 22%,
    rgba(200, 232, 242, .18) 44%,
    rgba(232, 248, 252, .92) 56%,
    rgba(255, 255, 255, .32) 76%,
    #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
/* Reflet : la fenêtre .shine glisse à droite pendant que son texte glisse d'autant
   à gauche → le texte reste immobile, seule la bande avance (2 transform, compositeur). */
.shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  transform: translateX(-100%);
  -webkit-mask: linear-gradient(105deg, transparent 36%, #000 47%, #000 53%, transparent 64%) 0 0 / 100% 100% no-repeat;
          mask: linear-gradient(105deg, transparent 36%, #000 47%, #000 53%, transparent 64%) 0 0 / 100% 100% no-repeat;
}
.shine__text {
  position: absolute;
  inset: 0;
  padding: var(--pad);
  color: #fff;
  text-shadow: 0 0 .14em rgb(var(--accent-rgb) / .75), 0 0 .04em rgba(255, 255, 255, .9);
  transform: translateX(100%);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-name:hover { transform: scale(1.03); }
}

.hero-tagline {
  max-width: 34em;
  margin: 0 0 22px;
  font: 400 clamp(15px, 1.35vw, 19px)/1.55 var(--font-body);
  color: var(--text-2);
  text-wrap: balance;
}
.hero-tagline .w { display: inline-block; }
/* Groupes insécables, le « · » en fin de groupe, collé au mot qui le précède par une espace
   insécable : une ligne ne commence jamais par « · » et « Alternance Thales » ne se coupe pas.
   Le sous-titre reste UN bloc de texte (pas de display: block par groupe) : son candidat
   LCP est peint au FCP. */
.hero-tagline .tg { white-space: nowrap; }

/* Mots qui tournent : fondu enchaîné de deux <span> superposés. */
.focus-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin: 0 0 34px;
}
.focus-line__lead {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: var(--mono-track);
  text-transform: uppercase;
  color: var(--text-2);
}
.focus-line__lead::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-left: 12px;
  vertical-align: .3em;
  background: var(--text-4);
}
.rot {
  display: inline-grid;
  justify-items: start;
  font: 600 clamp(18px, 1.7vw, 23px)/1.3 var(--font-display);
  font-stretch: var(--display-stretch);
  letter-spacing: -.01em;
  color: var(--text-1);
  text-align: left;
}
/* Chaque mot = ::after net + ::before « flou » (texte transparent + text-shadow peint
   une fois par mot). Le flou est un fondu enchaîné : AUCUN filter animé. */
.rot__w { grid-area: 1 / 1; display: inline-grid; white-space: nowrap; }
.rot__w::before,
.rot__w::after { content: attr(data-w); grid-area: 1 / 1; opacity: 0; }
.rot__w::before { color: transparent; text-shadow: 0 0 .2em rgb(242 245 250 / .85); }
.rot__w.is-on::after { opacity: 1; }
.rot__w.in          { animation: rot-rise-in  .6s var(--ease-out) .08s backwards; }
.rot__w.in::after   { animation: rot-sharp-in .6s var(--ease-out) .08s backwards; }
.rot__w.in::before  { animation: rot-ghost-in .6s ease-out .08s backwards; }
.rot__w.out         { animation: rot-rise-out  .45s cubic-bezier(.4, 0, 1, 1); }
.rot__w.out::after  { animation: rot-sharp-out .45s cubic-bezier(.4, 0, 1, 1); }
.rot__w.out::before { animation: rot-ghost-out .45s ease-in; }
.rot__probe { position: absolute; visibility: hidden; white-space: nowrap; pointer-events: none; }
@keyframes rot-rise-in   { from { transform: translateY(.5em); } }
@keyframes rot-rise-out  { to   { transform: translateY(-.5em); } }
@keyframes rot-sharp-in  { 0%, 30% { opacity: 0; } 100% { opacity: 1; } }
@keyframes rot-ghost-in  { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rot-sharp-out { 0% { opacity: 1; } 65%, 100% { opacity: 0; } }
@keyframes rot-ghost-out { 0% { opacity: 0; } 40% { opacity: .85; } 90%, 100% { opacity: 0; } }

/* Entrée du hero (.is-playing posé en dur dans le HTML, jouée une fois) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero.is-playing .hero-name__rise { animation: name-rise 1s var(--ease-out) .15s backwards; }
  .js .hero.is-playing .hero-name__line--last .hero-name__rise { animation-delay: .27s; }
  /* Exception assumée : flou ponctuel de 6 px sur UNE ligne (~20 px de haut), une seule fois. */
  .js .hero.is-playing .hero-tagline .w {
    animation: word-in .55s var(--ease-out) backwards;
    animation-delay: calc(.8s + var(--i, 0) * 55ms);
  }
  .js .hero.is-playing .hero-after { animation: fade-up .6s var(--ease-out) 1.45s backwards; }
}
@keyframes name-rise { from { transform: translateY(102%); } }
@keyframes word-in   { from { opacity: 0; transform: translateY(6px); filter: blur(6px); } }
@keyframes fade-up   { from { opacity: 0; transform: translateY(12px); } }

/* ── 8. Boutons, filtre, « Lire la fiche » [board §7 boutons, §4 .seg] ── */
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font: 500 15px/1 var(--font-body);
  letter-spacing: .005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .25s var(--ease-soft);
}
.btn::after {                           /* halo / liseré pré-peints, fondus en opacité */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.btn__icon { width: 17px; height: 17px; flex: none; transition: transform .25s var(--ease-soft); }
.btn--primary { background: var(--text-1); color: #0A0D12; border: 1px solid var(--text-1); }
.btn--primary::after { box-shadow: 0 10px 30px -8px rgb(var(--accent-rgb) / .6), 0 0 0 1px rgba(255, 255, 255, .9); }
.btn--glass {
  overflow: hidden;
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, .12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)),
    rgba(14, 18, 26, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 -1px 0 rgba(0, 0, 0, .25);
}
.btn--glass::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.btn--glass::before {                   /* reflet balayé UNE fois par survol */
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .14) 42%, rgba(255, 255, 255, .26) 50%, rgba(255, 255, 255, .14) 58%, transparent);
  transform: translateX(-120%);
  pointer-events: none;
}
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn:active { transform: translateY(0) scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:hover::after { opacity: 1; }
  .btn:hover .btn__icon { transform: translateX(3px); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn--glass:hover::before { animation: sheen .8s var(--ease-soft) 1; }
}
@keyframes sheen { to { transform: translateX(220%); } }

/* Interrupteur segmenté. Colonnes égales → le curseur ne fait QUE translater. */
.seg {
  --pad: 3px;
  --gap: 2px;
  --n: 3;
  --i: 0;
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: var(--gap);
  padding: var(--pad);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border);
}
.seg__thumb {
  position: absolute;
  top: var(--pad);
  bottom: var(--pad);
  left: var(--pad);
  width: calc((100% - 2 * var(--pad) - (var(--n) - 1) * var(--gap)) / var(--n));
  border-radius: 8px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid var(--border-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 8px rgba(0, 0, 0, .35);
  transform: translateX(calc(var(--i) * (100% + var(--gap))));
  transition: transform .38s var(--ease-out);
  pointer-events: none;
}
.seg__thumb::after {                    /* « point Thales » sous l'option choisie (statique) */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgb(var(--accent-rgb) / .8);
}
.seg__opt {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px 2px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font: 500 13px/1 var(--font-mono);
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.seg__opt[aria-pressed="true"] { color: var(--text-1); }
.seg__opt:focus-visible { outline-offset: 1px; }
.seg__n { font-size: 11.5px; color: var(--text-2); }   /* sur le fond nu : jamais d'alpha < .68 (4,5:1) */
@media (hover: hover) and (pointer: fine) {
  .seg__opt:hover { color: var(--text-1); }
}
.proj-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 639px) {
  .proj-bar .seg { display: grid; width: 100%; }
  .proj-bar .btn { width: 100%; }
  .seg__opt { padding: 0 8px 2px; }
}

/* Bouton « Lire la fiche » : seul élément interactif d'une tuile. */
.read {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .04);
  color: var(--text-1);
  font: 500 14px/1 var(--font-body);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.read svg { width: 16px; height: 16px; flex: none; transition: transform .25s var(--ease-soft); }
.read::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, .32);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .read:hover::after { opacity: 1; }
  .read:hover svg { transform: translateX(3px); }
}

/* ── 9. À propos ── */
.tile { display: flex; flex-direction: column; gap: 12px; }
.tile > .card-kicker { margin-bottom: 0; }
.tile-title { font: var(--card-w) 19px/1.3 var(--font-card); letter-spacing: -.005em; color: var(--text-1); }
.tile-note { margin-top: auto; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.inline-label {
  margin-right: 6px;
  font: 500 11px/1.3 var(--font-mono);
  letter-spacing: var(--mono-track);
  text-transform: uppercase;
  color: var(--text-3);
}
/* Profil : lumière marine statique, seul usage de --navy, peinte une fois. */
.tile-profile {
  background:
    radial-gradient(80% 60% at 0% 0%, rgb(var(--navy-rgb) / .22), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 42%),
    var(--surface-1);
}
.tile-profile__lead {
  font: 400 clamp(18px, 1.7vw, 21px)/1.5 var(--font-body);
  color: var(--text-1);
  text-wrap: pretty;
}
.tile-profile__text { font-size: 16px; color: var(--text-2); }
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.facts dt, .langs dd, .stats dt {
  font: 500 11px/1.3 var(--font-mono);
  letter-spacing: var(--mono-track);
  text-transform: uppercase;
  color: var(--text-3);
}
.facts dd { margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--text-1); }
@media (max-width: 639px) { .facts { grid-template-columns: minmax(0, 1fr); } }

.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile-top .card-kicker { margin: 0; }
.tile-top img { width: 118px; height: 14px; flex: none; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 30px; margin-top: 4px; }
.stats > div { display: flex; flex-direction: column-reverse; gap: 4px; }
/* Chiffres en Mona Sans : le zéro de Hubot Sans est barré (« 81 θθθ »). */
.stats dd { font: 600 22px/1 var(--font-body); font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--text-1); }

.now { display: grid; gap: 12px; }
.now li { position: relative; padding-left: 18px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.now b { font-weight: 600; color: var(--text-1); }
.st {                                   /* point de statut, doublé d'un texte .sr-only */
  position: absolute;
  left: 1px;
  top: .5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.st--wip  { background: var(--wip);  box-shadow: 0 0 0 3px rgb(var(--wip-rgb) / .14); }
.st--done { background: var(--done); box-shadow: 0 0 0 3px rgb(var(--done-rgb) / .14); }

.langs { display: grid; gap: 0; }
.langs > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.langs > div:first-child { padding-top: 2px; }
.langs > div:last-child { border-bottom: 0; }
.langs dt { font-size: 15.5px; color: var(--text-1); }

/* ── 10. Compétences : composant « Outils » de la planche [board §11] ── */
.skills { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 20px; }
@media (max-width: 1023px) { .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 359px)  { .skills { grid-template-columns: minmax(0, 1fr); } }
.skills__col { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--border); }
.skills__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1.2 var(--font-mono);
  letter-spacing: var(--mono-track);
  text-transform: uppercase;
  color: var(--text-3);
}
.skills__label svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.tools { display: flex; flex-wrap: wrap; gap: 10px; }

.tool {
  --ink: var(--text-1);
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--border);
  transition: transform .22s var(--ease-soft);
  cursor: default;
}
.tool__ico { grid-area: 1 / 1; width: 26px; height: 26px; object-fit: contain; transition: opacity .2s ease; }
.tool--wide .tool__ico { width: 36px; height: 36px; }
.tool__ico--rest { color: var(--text-2); }
.tool__ico--hot  { color: var(--ink); opacity: 0; }
.tool__ico--gray { filter: grayscale(1) brightness(1.25); }   /* statique, 26 px, jamais animé */
.tool__ico--ring { border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
/* Halo pré-peint : bordure + lueur de marque, seule l'opacité est animée. */
.tool::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid rgb(var(--brand) / .7);
  background: radial-gradient(90% 90% at 50% 115%, rgb(var(--brand) / .2), transparent 70%);
  box-shadow: 0 6px 22px -6px rgb(var(--brand) / .65);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
/* Infobulle opaque (pas de backdrop-filter), pastille couleur de marque. */
.tool__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 8px;
  border-radius: 8px;
  background: var(--tip-bg);
  border: 1px solid var(--border-hover);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .7);
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: .02em;
  color: var(--text-1);
  white-space: nowrap;
  opacity: 0;
  transform: translate(calc(-50% + var(--tip-dx, 0px)), 4px);   /* --tip-dx : recadrage près des bords (JS) */
  transition: opacity .16s ease, transform .18s var(--ease-soft);
  pointer-events: none;
}
.tool__tip::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: rgb(var(--brand));
}
/* Pont invisible de 10 px entre la tuile et sa bulle : la souris peut monter sur la bulle
   sans quitter .tool:hover (WCAG 1.4.13, contenu « survolable »). */
.tool__tip::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
@media (hover: hover) and (pointer: fine) {
  .tool:hover { transform: translateY(-2px); }
  .tool:hover::before { opacity: 1; }
  .tool:hover .tool__tip { opacity: 1; transform: translate(calc(-50% + var(--tip-dx, 0px)), 0); pointer-events: auto; }
  .tool:hover .tool__ico--hot  { opacity: 1; }
  .tool:hover .tool__ico--rest { opacity: 0; }
}
.tool:focus-visible { outline-offset: 4px; border-radius: 13px; }
.tool:focus-visible::before { opacity: 1; }
.tool:focus-visible .tool__tip { opacity: 1; transform: translate(calc(-50% + var(--tip-dx, 0px)), 0); }
.tool:focus-visible .tool__ico--hot  { opacity: 1; }
.tool:focus-visible .tool__ico--rest { opacity: 0; }
@media (hover: none) {                  /* tactile : un tap donne le focus → nom affiché */
  .tool:focus::before { opacity: 1; }
  .tool:focus .tool__tip { opacity: 1; transform: translate(calc(-50% + var(--tip-dx, 0px)), 0); }
  .tool:focus .tool__ico--hot  { opacity: 1; }
  .tool:focus .tool__ico--rest { opacity: 0; }
}
/* Échap masque l'infobulle (WCAG 1.4.13) ; retiré au blur / pointerleave. */
.tool.tip-off .tool__tip { opacity: 0 !important; pointer-events: none !important; }
/* Logo manquant : tuile en pointillés, clairement marquée. */
.tool--missing { border-style: dashed; border-color: rgba(242, 245, 250, .26); background: transparent; }
.tool__ph { font: 600 10px/1 var(--font-mono); letter-spacing: .04em; color: var(--text-3); }

/* ── 11. Parcours [board §10] ── */
.stack-groups { display: flex; flex-direction: column; gap: 36px; }
.group { min-width: 0; display: flex; flex-direction: column; }
.bento--2, .bento--3 { grid-auto-rows: auto; }
.bento--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bento--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023px) {
  .bento--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .bento--2, .bento--3 { grid-template-columns: minmax(0, 1fr); }
}

/* Survol des cartes : bordure claire et ombre pré-peintes, seule leur opacité change ;
   liseré cyan qui se déploie en scale. */
.card--hover::before,
.card--hover::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.card--hover::before { inset: -1px; border: 1px solid var(--border-hover); }
.card--hover::after  { inset: 0; z-index: -1; box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .65); }
.card__edge {
  position: absolute;
  pointer-events: none;
  border-radius: 2px;
  background: var(--accent);
  transition: transform .35s var(--ease-out);
}
.tl-card .card__edge { left: -1px; top: 18px; bottom: 18px; width: 2px; transform: scaleY(0); }
.cert-card .card__edge,
.proj .card__edge,
.contact-link .card__edge,
.tile-btn .card__edge { top: -1px; left: 18px; right: 18px; height: 1px; transform: scaleX(0); transform-origin: left; }
@media (hover: hover) and (pointer: fine) {
  .tl-card, .cert-card, .proj, .contact-link, .tile-btn { transition: transform .3s var(--ease-soft); }
  .tl-card:hover { transform: translateX(4px); }
  .cert-card:hover, .proj:hover, .contact-link:hover, .tile-btn:hover { transform: translateY(-3px); }
  .card--hover:hover::before, .card--hover:hover::after { opacity: 1; }
  .card--hover:hover .card__edge { transform: none; }
}
.card--hover:focus-within::before { opacity: 1; }
.card--hover:focus-within .card__edge { transform: none; }

/* Frise : rail dégradé + nœud en losange. */
.tl { position: relative; padding-left: 30px; display: flex; flex-direction: column; }
.tl::before {
  content: "";
  position: absolute;
  left: 6px; top: 10px; bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, rgb(var(--accent-rgb) / .6), var(--border) 45%, transparent);
}
.tl__item { position: relative; display: flex; }
.tl__item > .card { flex: 1; }
.tl__node {
  position: absolute;
  left: -30px; top: 24px;
  width: 14px; height: 14px;
  display: grid; place-items: center;
}
.tl__node::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 2px;
  border: 2px solid var(--accent);
  background: var(--bg);
  transform: rotate(45deg);
}
.tl__item.is-current .tl__node::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg), 0 0 10px rgb(var(--accent-rgb) / .7);   /* statique */
}
.tl__node::after {                      /* « ping » : un passage par survol, jamais en boucle */
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 2px;
  border: 1px solid var(--accent);
  opacity: 0;
  transform: rotate(45deg);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tl__item:hover .tl__node::after { animation: node-ping .8s var(--ease-out) 1; }
}
@keyframes node-ping {
  from { opacity: .9; transform: rotate(45deg) scale(1); }
  to   { opacity: 0;  transform: rotate(45deg) scale(2.6); }
}

.tl-card { display: flex; flex-direction: column; }
.tl-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.tl-card__role { font: var(--card-w) 19px/1.3 var(--font-card); color: var(--text-1); }
.tl-card__date { margin-left: auto; font: 500 12px/1.4 var(--font-mono); letter-spacing: .04em; color: var(--text-3); white-space: nowrap; }
.tl-card__org { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; font-size: 15px; color: var(--text-2); }
.tl-card__org img { width: 101px; height: 12px; }
.tl-card__desc { color: var(--text-2); font-size: 16px; }
.more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 8px;
  font: 500 14.5px/1 var(--font-body);
  color: var(--accent);
  text-decoration: none;
}
.more svg { width: 16px; height: 16px; transition: transform .25s var(--ease-soft); }
@media (hover: hover) and (pointer: fine) {
  .more:hover { text-decoration: underline; }
  .more:hover svg { transform: translateX(3px); }
}

.cert-card { display: flex; flex-direction: column; gap: 8px; }
.cert-card__top  { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cert-card__name { font: var(--card-w) 17px/1.3 var(--font-card); color: var(--text-1); }
.cert-card__org  { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.cert-card__org img { width: 26px; height: 26px; flex: none; }
.cert-card__sub  { font-size: 14px; line-height: 1.5; color: var(--text-3); }
.cert-card__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin-top: auto; padding-top: 4px; font-size: 13.5px; color: var(--text-3); }
.cert-card__year { margin-left: auto; font: 500 12.5px/1.5 var(--font-mono); color: var(--text-3); }

/* Pastilles de statut : mono en capitales. */
.pill {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 8px;
  border-radius: 999px;
  border: 1px solid;
  font: 500 10.5px/1.3 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.pill--wip  { color: var(--wip);    background: rgb(var(--wip-rgb) / .10);  border-color: rgb(var(--wip-rgb) / .28); }
.pill--done { color: var(--done);   background: rgb(var(--done-rgb) / .10); border-color: rgb(var(--done-rgb) / .26); }
.pill--soon { color: var(--text-3); background: rgba(255, 255, 255, .05);  border-color: rgba(255, 255, 255, .12); }
/* « Obtenu(e) » / « Terminé » : le point cède la place à une coche (clip-path statique). */
.pill--done::after {
  content: "";
  position: absolute;
  left: 6px; top: 50%;
  width: 10px; height: 10px;
  margin-top: -5px;
  background: currentColor;
  clip-path: polygon(39% 60%, 22% 44%, 13% 53%, 39% 78%, 87% 30%, 78% 21%);
  opacity: 0;
  transform: scale(0);
  transition: transform .3s var(--ease-back), opacity .2s ease;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover .pill--done::before { opacity: 0; transform: scale(0); }
  .card:hover .pill--done::after  { opacity: 1; transform: scale(1); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  /* « En cours » : deux battements au survol puis arrêt. */
  .card:hover .pill--wip::before { animation: pill-beat 1.1s ease-in-out 2; }
}
@keyframes pill-beat { 50% { opacity: .45; transform: scale(.6); } }

/* ── 12. Réalisations : tuiles projet, jalons ── */
.proj { display: flex; flex-direction: column; gap: 12px; }
.proj__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.proj__top .card-kicker { margin: 0; }
.proj__title { font: 600 19px/1.3 var(--font-card); letter-spacing: -.005em; color: var(--text-1); }
.proj--lg .proj__title { font-size: 22px; }
.proj__code { margin-top: -6px; font: 500 12.5px/1.3 var(--font-mono); letter-spacing: .08em; color: var(--text-2); }
.proj__lede { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.proj__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-top: auto;
  padding-top: 6px;
}
.proj__foot .read, .actions .read { margin-left: auto; }   /* renvoyé à la ligne, il reste à droite */
.proj__when { font: 500 12px/1.4 var(--font-mono); letter-spacing: .04em; color: var(--text-3); }
/* Filtre qui ne laisse qu'une tuile (Formation) : elle prend toute la ligne. */
.proj-grid[data-count="1"] > .proj:not([hidden]) { grid-column: 1 / -1; grid-row: auto; }

.jalons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.jalon { display: grid; gap: 6px; }
.jalon__bar { position: relative; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, .10); }
.jalon__bar::after { content: ""; position: absolute; inset: 0; transform-origin: left; background: var(--c, transparent); }
.jalon[data-state="done"] { --c: var(--done); }
.jalon[data-state="wip"]  { --c: var(--wip); }
.jalon__n { font: 500 10.5px/1 var(--font-mono); letter-spacing: .06em; color: var(--text-3); }
.jalon[data-state="done"] .jalon__n,
.jalon[data-state="wip"] .jalon__n { color: var(--text-1); }
.jalons__sum { font: 500 12px/1.4 var(--font-mono); letter-spacing: .04em; color: var(--text-2); }
@media (prefers-reduced-motion: no-preference) {
  .proj-grid.is-in:not(.is-done) .jalon__bar::after { animation: jalon-fill .6s var(--ease-out) backwards; animation-delay: calc(.35s + var(--j, 0) * 90ms); }
}
@keyframes jalon-fill { from { transform: scaleX(0); } }

/* ── 13. Veille ── */
/* Grille fixe de 4 colonnes : jamais 3 + 1 (flex-wrap cassait la chaîne entre 1024 et 1100 px). */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 22px; }   /* 22 px : « feedparser » tient dans sa case vers 1024 px */
.flow__node {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-hover);
  background: rgba(255, 255, 255, .03);
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--text-1);
}
.flow__node svg { width: 16px; height: 16px; color: var(--accent); }
.flow__node small { font: 500 11px/1.4 var(--font-mono); color: var(--text-3); }
.flow__node + .flow__node::before {     /* chevron CSS statique entre deux étapes */
  content: "";
  position: absolute;
  left: -15px;                          /* centré dans l’espace de 22 px */
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-top: 1px solid var(--text-4);
  border-right: 1px solid var(--text-4);
  transform: rotate(45deg);
}
@media (max-width: 639px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .flow__node + .flow__node::before { left: 50%; top: -15px; margin: 0 0 0 -4px; transform: rotate(135deg); }
}
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: auto; padding-top: 4px; }
.axes { color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.tile-sub { margin-top: -6px; font-size: 14px; line-height: 1.45; color: var(--text-3); }
.clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.src { font: 500 11.5px/1.5 var(--font-mono); letter-spacing: .02em; color: var(--text-3); }

/* Tuile-bouton « Toutes les fiches » */
.tile-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.tile-btn:focus-visible { border-radius: var(--radius); }
.tile-btn__n { font: 800 44px/1 var(--font-display); font-stretch: var(--display-stretch); color: var(--text-1); }
.tile-btn__cap { font-size: 15px; color: var(--text-2); }
.tile-btn__go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; font: 500 14.5px/1 var(--font-body); color: var(--text-1); }
.tile-btn__go svg { width: 16px; height: 16px; transition: transform .25s var(--ease-soft); }
@media (hover: hover) and (pointer: fine) {
  .tile-btn:hover .tile-btn__go svg { transform: translateX(3px); }
}

/* ── 14. Contact ── */
.contact-grid { grid-auto-rows: auto; }
.contact-mail { display: flex; flex-direction: column; gap: 10px; }
.contact-mail .card-kicker { margin: 0; }
.contact-mail__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.contact-mail__addr {
  min-width: 0;
  font: 600 clamp(18px, 2vw, 22px)/1.3 var(--font-body);
  color: var(--text-1);
  text-decoration: underline;
  text-decoration-color: rgb(var(--accent-rgb) / .5);
  text-underline-offset: .22em;
  overflow-wrap: anywhere;
}
/* Sans JS : l'adresse reste en clair « … (arobase) … », sans lien mailto (site.js l'ajoute). */
.contact-mail__addr:not([href]) { text-decoration: none; }
.copy-fail { font-size: 13.5px; color: var(--wip); }

/* Bouton copier : courrier → copier → coche. Libellés superposés : largeur fixe. */
.copy {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .035);
  color: var(--text-1);
  font: 500 14px/1 var(--font-body);
  cursor: pointer;
}
.copy__icons, .copy__labels { display: inline-grid; }
.copy__i { grid-area: 1 / 1; width: 20px; height: 20px; transition: opacity .18s ease, transform .25s var(--ease-back); }
.copy__i--copy { opacity: 0; transform: scale(.6); }
.copy__i--done { opacity: 0; transform: scale(.6) rotate(-20deg); color: var(--done); }
.copy__t { grid-area: 1 / 1; white-space: nowrap; transition: opacity .18s ease; }
.copy__t--2 { opacity: 0; color: var(--done); }
@media (hover: hover) and (pointer: fine) {
  .copy:hover .copy__i--mail { opacity: 0; transform: scale(.6); }
  .copy:hover .copy__i--copy { opacity: 1; transform: none; }
}
.copy:focus-visible .copy__i--mail { opacity: 0; transform: scale(.6); }
.copy:focus-visible .copy__i--copy { opacity: 1; transform: none; }
.copy.is-copied .copy__i--mail,
.copy.is-copied .copy__i--copy { opacity: 0; transform: scale(.6); }
.copy.is-copied .copy__i--done { opacity: 1; transform: none; }
.copy.is-copied .copy__t--1 { opacity: 0; }
.copy.is-copied .copy__t--2 { opacity: 1; }

.contact-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  color: var(--text-1);
  text-decoration: none;
}
.contact-link:focus-visible { border-radius: var(--radius); outline-offset: 3px; }
.contact-link__logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .035); }
.contact-link__logo > * { grid-area: 1 / 1; width: 22px; height: 22px; transition: opacity .2s ease; }
.contact-link__logo .hot { opacity: 0; }
.contact-link__logo svg.rest { color: var(--text-2); }
.contact-link__logo svg.hot { color: var(--text-1); }
.contact-link__txt { display: flex; flex-direction: column; min-width: 0; }
.contact-link__txt .card-kicker { margin-bottom: 4px; }
.contact-link__val { font: 600 17px/1.3 var(--font-card); overflow-wrap: anywhere; }
.contact-link__go { width: 18px; height: 18px; color: var(--text-2); transition: transform .25s var(--ease-soft); }
@media (hover: hover) and (pointer: fine) {
  .contact-link:hover .contact-link__logo .hot { opacity: 1; }
  .contact-link:hover .contact-link__logo .rest { opacity: 0; }
  .contact-link:hover .contact-link__go { transform: translate(2px, -2px); }
}
.contact-link:focus-visible .contact-link__logo .hot { opacity: 1; }
.contact-link:focus-visible .contact-link__logo .rest { opacity: 0; }

/* ── 15. Pied de page [board §14] ── */
.foot {
  padding: 72px 0 40px;
  font: 500 12px/1.5 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 22px; }
.foot__btn {
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--text-4);
  text-underline-offset: .3em;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .foot__btn:hover { color: var(--text-1); }
}
.noscript { margin-top: 12px; font-size: 14px; color: var(--wip); }

/* ── 16. Dialogues (fiches) : showModal natif, fond rgba SANS flou ── */
.dlg {
  width: min(760px, 100% - 2 * var(--gutter));
  max-width: none;
  max-height: min(88svh, 920px);
  padding: 0;
  margin: auto;
  border: 1px solid var(--border-hover);
  border-radius: 20px;
  background: var(--dlg-bg);
  color: var(--text-1);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  overflow: hidden;
}
.dlg--wide { width: min(1120px, 100% - 2 * var(--gutter)); }
.dlg[open] { display: flex; }
.dlg::backdrop { background: rgba(3, 5, 9, .72); }            /* PAS de backdrop-filter, PAS de filter */
@media (prefers-reduced-motion: no-preference) {
  .dlg[open]::backdrop { animation: backdrop-in .2s ease backwards; }
}
@keyframes backdrop-in { from { opacity: 0; } }
/* Une seule zone de défilement : .dlg__inner, qui contient l'en-tête (collant) ET le corps.
   Le titre, qui reçoit le focus à l'ouverture, est donc DANS la zone qui défile :
   flèches, Page suivante et Espace font défiler la fiche nativement. Le bouton Fermer
   étant dans la même zone, elle ne devient pas un arrêt de tabulation de plus. */
.dlg__inner { display: flex; flex-direction: column; width: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dlg__head {
  position: sticky;
  top: 0;
  z-index: 2;                           /* au-dessus de la 1re colonne collante du tableau E5 (z 1) */
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--dlg-bg);
}
.dlg__head > div { min-width: 0; }
.dlg__head .card-kicker { margin-bottom: 8px; }
.dlg__title { font: 700 clamp(21px, 2.4vw, 28px)/1.15 var(--font-display); font-stretch: var(--display-stretch); letter-spacing: -.01em; overflow-wrap: break-word; }
.dlg__title:focus { outline: none; }    /* cible de focus programmatique, pas un contrôle */
.dlg__sub { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.dlg__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; font: 500 12px/1.4 var(--font-mono); letter-spacing: .04em; color: var(--text-2); }
.dlg__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
  color: var(--text-1);
  font: 500 14px/1 var(--font-body);
  cursor: pointer;
}
.dlg__close svg { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) {
  .dlg__close:hover { border-color: var(--border-hover); background: rgba(255, 255, 255, .08); }
}
.dlg__body { flex: 1 0 auto; padding: 20px 24px 28px; }
.dlg__body > h3 {
  margin: 30px 0 12px;
  font: var(--sub-w) 12.5px/1.2 var(--font-display);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--sub-track);
  text-transform: uppercase;
  color: var(--text-1);
}
.dlg__body > h3::before {              /* petit point cyan, comme les titres de section */
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  vertical-align: .18em;
  border-radius: 50%;
  background: var(--accent);
}
.dlg__body > h3:first-child { margin-top: 4px; }
.dlg__body p,
.dlg__body li,
.dlg__body dd { font-size: 15.5px; line-height: 1.62; color: var(--text-2); }
.dlg__body p + p,
.dlg__body p + ul,
.dlg__body ul + p,
.dlg__body .tbl-wrap + p { margin-top: 10px; }
.dlg__body ol + p { margin-top: 14px; }   /* « Difficultés rencontrées » après les étapes */
/* Pastilles dans une fiche : même taille que sur les tuiles (sinon .dlg__body li l'emporte). */
.dlg__body .chips li { font-size: 13px; line-height: 1.35; }
.dlg__body strong, .dlg__body b { font-weight: 600; color: var(--text-1); }
.dlg__body code { color: var(--text-1); }
.dlg__body .bul { margin-top: 8px; }
.dlg__body .bul .bul { margin-top: 8px; }
.dlg__body h4 { margin: 22px 0 6px; font: 600 16px/1.35 var(--font-card); color: var(--text-1); }
.dlg__body h4 + p { margin-top: 0; }
.dlg__body .src { margin-top: 6px; font-size: 12.5px; line-height: 1.55; color: var(--text-3); }   /* sinon .dlg__body p l’emporte (15,5 px) */

.dfacts { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .025); }
.dfacts > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 2px 14px; }
.dfacts dt { padding-top: .25em; font: 500 11px/1.4 var(--font-mono); letter-spacing: var(--mono-track); text-transform: uppercase; color: var(--text-3); }
.dfacts dd { font-size: 15px; }
@media (max-width: 639px) { .dfacts > div { grid-template-columns: minmax(0, 1fr); } }

.steps { counter-reset: step; display: grid; gap: 14px; }
.steps > li { position: relative; padding-left: 36px; counter-increment: step; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: .3em;
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: .04em;
  color: var(--accent);
}
.conf {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.conf svg { width: 16px; height: 16px; flex: none; margin-top: .3em; color: var(--text-3); }
.dlg__body .conf p { font-size: 14px; color: var(--text-3); }

/* Tableaux : défilent dans leur propre conteneur, jamais la page. */
.tbl-wrap { margin-top: 12px; overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--border); border-radius: 12px; }
.tbl { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.tbl caption { padding: 12px; text-align: left; font: 500 11px/1.3 var(--font-mono); letter-spacing: var(--mono-track); text-transform: uppercase; color: var(--text-2); }
.tbl th, .tbl td { padding: 10px 12px; border-top: 1px solid var(--border); text-align: left; vertical-align: top; line-height: 1.5; }
.tbl thead th { font: 500 11px/1.35 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: rgba(255, 255, 255, .02); }
.tbl tbody th { font-weight: 600; color: var(--text-1); }
.tbl td { color: var(--text-2); }

/* 284 + 144 + 6 × 106 = 1064 px : tient sans défiler dans le dialogue large (1 068 px utiles).
   106 px = le mot le plus long d'un intitulé (« développement », 89 px en Mona Sans 12 px) + 16 px.
   144 px (120 utiles) : le début insécable d'un marqueur, « [à compléter : » (114 px), tient sur une ligne. */
.tbl--e5 { min-width: 1064px; table-layout: fixed; font-size: 13.5px; }
.tbl--e5 .c-real { width: 284px; }
.tbl--e5 .c-per  { width: 144px; }
.tbl--e5 .c-comp { width: 106px; }
.tbl--e5 thead th { vertical-align: bottom; text-transform: none; letter-spacing: .01em; font-size: 11.5px; }
/* Intitulés des compétences en Mona Sans (plus étroite que la mono) : chaque mot tient dans sa colonne. */
.tbl--e5 thead th.c { padding-inline: 8px; font: 500 12px/1.35 var(--font-body); letter-spacing: 0; hyphens: manual; }
.tbl--e5 th:first-child { position: sticky; left: 0; z-index: 1; background: var(--dlg-bg); box-shadow: 1px 0 0 var(--border); }
.tbl--e5 thead th:first-child { background: #12161E; }
.tbl--e5 tbody th { font-weight: 400; color: var(--text-2); }
.tbl--e5 tbody th b { display: block; margin-bottom: 4px; font-weight: 600; color: var(--text-1); }
.tbl--e5 tbody th small { display: block; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.tbl--e5 .grp th {
  position: sticky;
  left: 0;
  padding-top: 14px;
  font: 500 11px/1.35 var(--font-mono);
  letter-spacing: var(--mono-track);
  text-transform: uppercase;
  color: var(--accent);
  background: var(--dlg-bg);
}
.tbl--e5 td.c { text-align: center; }
.tbl--e5 td.per { font: 500 12px/1.5 var(--font-mono); color: var(--text-2); }
.chk { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgb(var(--done-rgb) / .12); color: var(--done); }
.chk svg { width: 15px; height: 15px; }
/* L'indication « faites-le glisser » s'affiche dès que le tableau défile : dialogue plus étroit
   que 1 116 px (fenêtre < ~1 164 px, + 17 px de barre de défilement classique sous Windows). */
.hint { display: none; margin-top: 12px; font-size: 13.5px; color: var(--text-3); }
@media (min-width: 640px) and (max-width: 1179px) { .hint { display: block; } }

/* Téléphone : les tableaux ne défilent plus de côté, chaque ligne devient un bloc.
   L'en-tête reste lisible par les lecteurs d'écran (masqué visuellement seulement). */
@media (max-width: 639px) {
  .tbl--e5, .tbl--stack { min-width: 0; table-layout: auto; }
  .tbl--e5 thead, .tbl--stack thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  .tbl--e5, .tbl--e5 tbody, .tbl--e5 tr, .tbl--e5 th, .tbl--e5 td,
  .tbl--stack, .tbl--stack caption, .tbl--stack tbody, .tbl--stack tr, .tbl--stack th, .tbl--stack td { display: block; }
  .tbl--e5 colgroup { display: none; }

  /* Phases du projet Louvre : titre, contenu, puis l'état, empilés. */
  .tbl--stack tbody tr { padding: 12px; border-top: 1px solid var(--border); }
  .tbl--stack tbody th, .tbl--stack tbody td { padding: 0; border: 0; }
  .tbl--stack tbody td { margin-top: 6px; }

  /* Tableau E5 : intitulé, période, puis une pastille par compétence cochée (nommée en clair). */
  .tbl--e5 th:first-child { position: static; background: none; box-shadow: none; }
  .tbl--e5 .grp th { position: static; padding: 16px 12px 6px; }
  .tbl--e5 tbody tr:not(.grp) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px; border-top: 1px solid var(--border); }
  .tbl--e5 tbody tr:not(.grp) > * { padding: 0; border: 0; }
  .tbl--e5 tbody th, .tbl--e5 td.per { flex: 1 0 100%; }
  .tbl--e5 td.per { margin-bottom: 2px; }
  .tbl--e5 td.c:empty { display: none; }
  .tbl--e5 td.c {
    display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
    padding: 3px 10px 3px 3px; border-radius: 9px; border: 1px solid rgb(var(--done-rgb) / .22);
    font-size: 12.5px; line-height: 1.35; text-align: left; color: var(--text-1);
  }
  .tbl--e5 td.c .chk { flex: none; width: 22px; height: 22px; border-radius: 6px; }
  .tbl--e5 td.c:nth-child(3)::after { content: "Gérer le patrimoine informatique"; }
  .tbl--e5 td.c:nth-child(4)::after { content: "Répondre aux incidents et aux demandes d'assistance et d'évolution"; }
  .tbl--e5 td.c:nth-child(5)::after { content: "Développer la présence en ligne de l'organisation"; }
  .tbl--e5 td.c:nth-child(6)::after { content: "Travailler en mode projet"; }
  .tbl--e5 td.c:nth-child(7)::after { content: "Mettre à disposition des utilisateurs un service informatique"; }
  .tbl--e5 td.c:nth-child(8)::after { content: "Organiser son développement professionnel"; }
}
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-top: 8px; }
.legend dt { font: 600 14.5px/1.4 var(--font-card); color: var(--text-1); }
.dlg__body .legend dd { margin-top: 4px; font-size: 13.5px; line-height: 1.55; color: var(--text-3); }
@media (max-width: 639px) { .legend { grid-template-columns: minmax(0, 1fr); } }
.opt-box { font-family: var(--font-mono); }

/* Schémas SVG des fiches (Louvre, M01 à M05) : couleurs de la palette, texte réel. */
.schema-fig { margin-top: 12px; padding: 18px 16px 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255, 255, 255, .02); }
.schema { width: 100%; max-width: 440px; height: auto; margin-inline: auto; overflow: visible; }
.schema-fig figcaption { margin-top: 12px; text-align: center; font: 500 11.5px/1.5 var(--font-mono); letter-spacing: .02em; color: var(--text-3); }
/* Téléphone : le schéma récupère la largeur des marges, libellés un cran plus grands (ils ont la place). */
@media (max-width: 639px) {
  .schema-fig { margin-inline: -8px; padding: 12px 2px 10px; }
}
.sc-box--ok  { fill: rgb(var(--accent-rgb) / .08); stroke: rgb(var(--accent-rgb) / .55); stroke-width: 1; }
.sc-box--off { fill: rgba(255, 255, 255, .025); stroke: rgba(255, 255, 255, .2); stroke-width: 1; stroke-dasharray: 4 3; }
.sc-host { fill: rgba(255, 255, 255, .015); stroke: rgba(242, 245, 250, .28); stroke-width: 1; stroke-dasharray: 5 4; }
.sc-vm   { fill: rgba(255, 255, 255, .045); stroke: rgba(255, 255, 255, .18); stroke-width: 1; }
.sc-chip { fill: rgba(255, 255, 255, .04); stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.sc-flow { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.sc-flow--off { stroke: rgba(242, 245, 250, .45); stroke-dasharray: 4 3; }
.sc-head { fill: var(--accent); }
.sc-stop { fill: none; stroke: rgba(242, 245, 250, .7); stroke-width: 2.4; stroke-linecap: round; }
.sc-t     { fill: var(--text-1); font: 500 13px var(--font-body); }
.sc-t--mute { fill: var(--text-2); }
.sc-title { fill: var(--text-1); font: 600 14px var(--font-body); }
.sc-lbl   { fill: var(--text-2); font: 500 11px var(--font-mono); }
.sc-lbl--ok { fill: var(--accent); }
.sc-lbl--host { fill: var(--text-3); }
.sc-chipt { fill: var(--text-1); font: 500 12px var(--font-mono); }
@media (max-width: 639px) {
  .sc-lbl { font-size: 12px; }
  .sc-chipt { font-size: 13px; }
}

/* Téléphone : seul le TITRE reste collé en haut de la fiche (barre de 56 à 84 px à 375 px,
   au lieu de 150 à 190 px pour l'en-tête entier). L'en-tête et son <div> passent en
   display: contents : surtitre, titre et sous-titre deviennent des enfants directs de
   .dlg__inner, la zone qui défile, et le titre colle donc sur toute la hauteur de la fiche.
   Le surtitre et le sous-titre (ou la ligne de méta) défilent avec le contenu, sans être
   masqués. Le bouton Fermer se place par rapport au <dialog> (position: fixed dans le top
   layer), hors de la zone qui défile : toujours visible, ordre du DOM et de tabulation inchangé. */
@media (max-width: 639px) {
  .dlg { width: calc(100% - 16px); max-height: calc(100svh - 16px); border-radius: 16px; }
  .dlg__head, .dlg__head > div { display: contents; }
  .dlg__head .card-kicker { flex: none; margin: 0; padding: 14px 64px 2px 18px; }
  .dlg__title {
    position: sticky;
    top: 0;
    z-index: 2;                           /* au-dessus de la 1re colonne collante du tableau E5 (z 1) */
    flex: none;
    min-height: 56px;                     /* une fois collé, contient le bouton Fermer (10 + 40 px) */
    padding: 8px 64px 10px 18px;          /* 64 px à droite : la place du bouton Fermer */
    border-bottom: 1px solid var(--border);
    background: var(--dlg-bg);
    font-size: 18px;
    line-height: 1.2;
  }
  .dlg__head > div > .dlg__title:first-child { padding-top: 16px; }   /* fiche sans surtitre */
  .dlg__sub, .dlg__meta { flex: none; margin: 0; padding: 12px 18px 0; }
  .dlg__body { padding: 16px 18px 24px; }
  .dlg__close { position: absolute; top: 10px; right: 10px; z-index: 3; padding: 0 10px; }
  .dlg__close span { display: none; }  /* le bouton garde son aria-label « Fermer » */
}
/* Écran bas (téléphone à l'horizontale) ou très étroit : l'en-tête (au téléphone, le titre)
   n'est plus collant, il défile avec la fiche pour laisser toute la hauteur à la lecture. */
@media (max-height: 520px), (max-width: 359px) {
  .dlg { max-height: calc(100svh - 16px); }
  .dlg__head { position: static; padding: 12px 14px 12px 16px; }
  .dlg__title { position: static; }
}

/* ── 17. Apparition au défilement : une seule fois, en cascade plafonnée, puis .is-done ──
   fill-mode « backwards » : une fois finie, l'animation n'écrase pas le transform du survol ;
   .is-done empêche un élément ré-affiché (filtre) de rejouer l'entrée. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not(.is-in) > :not(dialog) { opacity: 0; }
  [data-reveal].is-in:not(.is-done) > :not(dialog) {
    animation: rise-in .6s var(--ease-out) backwards;
    animation-delay: calc(min(var(--i, 0), 8) * 70ms);
  }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } }

/* ── 18. Mouvement réduit (EN DERNIER) : les fondus restent, les déplacements partent ── */
@media (prefers-reduced-motion: reduce) {
  .tool:hover, .tl-card:hover, .cert-card:hover, .proj:hover, .contact-link:hover, .tile-btn:hover,
  .btn:hover, .btn:active, .hero-name:hover { transform: none; }
  .btn:hover .btn__icon, .read:hover svg, .more:hover svg,
  .tile-btn:hover .tile-btn__go svg, .contact-link:hover .contact-link__go { transform: none; }
  .seg__thumb, .card__edge, .skip, .tool, .tool__tip, .nav__ind, .nav__bar { transition: none; }
  /* Pastilles, bouton copier : fondus d'opacité seulement, sans changement d'échelle. */
  .pill::before, .pill--done::after { transition: opacity .2s ease; }
  .pill--done::after, .card:hover .pill--done::before { transform: none; }
  .copy__i { transition: opacity .18s ease; }
  .copy__i--copy, .copy__i--done, .copy:hover .copy__i--mail, .copy:focus-visible .copy__i--mail,
  .copy.is-copied .copy__i--mail, .copy.is-copied .copy__i--copy { transform: none; }
}
