/* ==========================================================================
   thomasmarcos.com — feuille unique (DA « bento léger », inspirée d'Apple)
   Police système : SF Pro sur Apple, Inter (auto-hébergée) ailleurs.

   1. Socle (police, variables, reset, utilitaires)    9. Parcours (frise + formation)
   2. Boutons & liens                                  10. Filmographie (rail + liste)
   3. En-tête & menu                                   11. Services (accordéon)
   4. Accroche (hero)                                  12. À propos (bento)
   5. Sections, tuiles & bento                         13. Contact
   6. Points forts (bento compact)                     14. Pied de page & bande-démo
   7. Projets (mosaïque)                               15. Page projet
   8. Avant / Après (comparateurs)                     16. Mentions légales
                                                       17. Apparitions & mouvement réduit
                                                       18. Contraste forcé

   Points de rupture (liste fermée, ARB-27 / CODE-27) — max-width uniquement :
     400 px   petits téléphones (chiffres clés, légendes)
     734 px   mobile (référence)
     820 px   menu replié ; synchronisé avec le seuil 821 px de main.js (bloc « menu mobile »)
     860 px   3ᵉ tuile de tiers pleine largeur (= largeur de .narrow)
     900 px   intro collante des services désactivée
     1068 px  tablette (référence)
   Hauteur : (max-height: 500px) pour l'intro collante (A11Y-39). Pointeur : (pointer: coarse) pour les cibles (UX-15).

   Contrat avec main.js (ARB-05) : le script en ligne pose « js » sur <html> ; main.js pose « js-ready »
   en DERNIÈRE instruction. Rien n'est masqué sous « js » seul sans filet « tm-failsafe » de 3 s ; les
   apparitions ne masquent que « .js-ready [data-reveal]:not(.is-in) ».
   ========================================================================== */

/* ---------------------------------------------------------------- 1. socle */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter.woff2?v=d03be3d7") format("woff2"); font-weight: 400 700; font-display: swap; }

/* Palette fermée (ARB-13) : seules ces teintes servent au texte, aux contours de contrôle et aux états.
   Fonds neutres admis en dur : #fff, #f5f5f7, #e8e8ed, #dcdce1 ; #fff en texte seulement sur bleu ou image assombrie. */
:root {
  --bg: #fff;
  --gray: #f5f5f7;
  --line: #d2d2d7;            /* filets décoratifs uniquement, jamais sur un composant interactif */
  --text: #1d1d1f;
  --muted-strong: #424245;    /* texte sur fond teinté (#e8e8ed) ou translucide */
  --muted: #6e6e73;           /* texte secondaire sur #fff et #f5f5f7 uniquement */
  --faint: #86868b;           /* texte ≥ 24 px (≥ 18,66 px gras) et éléments non textuels */
  --control-border: var(--faint); /* bordure des champs : 3,62:1 sur #fff, 3,33:1 sur #f5f5f7 */
  --blue: #0071e3;            /* boutons */
  --blue-hover: #0068d1;      /* survol des boutons : 5,38:1 avec le blanc */
  --link: #0066cc;
  --error: #d70015;           /* erreurs de formulaire : 5,38:1 sur #fff, 4,94:1 sur #f5f5f7 */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --gap: 20px;
  --r: 28px;
  --r-sm: 18px;
  --pad: clamp(24px, 3vw, 40px);
  --header-h: 52px;
  --ease: cubic-bezier(.25, .1, .25, 1);
  color-scheme: light;
}
@media (max-width: 734px) {
  :root { --gap: 12px; --r: 22px; --pad: 22px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.47 var(--font); letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(0, 113, 227, .18); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
figcaption { margin-top: 12px; font-size: .88rem; color: var(--muted); text-align: center; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(860px + 2 * var(--gutter)); }
.center { text-align: center; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 10px 16px; background: var(--blue); color: #fff; border-radius: 10px; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* Liens dans une phrase : soulignés en permanence (A11Y-46). Sélecteur ciblé, jamais « p a » ; la liste des
   conteneurs est reprise par la règle QA « A11Y-46 » (tools/qa.py, CONTENEURS_SOULIGNES). */
.prose a, .footer-note a, .form-note a, .reel-note a, .highlights .hl-stat a, .story p a, .chapter-text p a, .form .form-fallback a { text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Filets de sécurité ARB-05 : rétablissent en 3 s un état pré-JS si main.js n'a pas posé « js-ready ».
   L'état pré-JS masque par « height: 0 ; visibility: hidden » et non par « display: none » : une animation
   ne démarre pas sur un élément en display: none. */
@keyframes tm-failsafe { to { width: 100%; height: auto; visibility: visible; } }
@keyframes tm-failsafe-hide { to { display: none; } }

/* ---------------------------------------------------------------- 2. boutons & liens */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: 0 22px; border-radius: 980px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 1rem; text-align: center;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: var(--blue-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
/* Envoi du formulaire : désactivé dans le HTML, activé par main.js (ARB-06). */
.btn:disabled { opacity: .45; cursor: default; }
.btn:disabled:hover { background: var(--blue); }
.btn:disabled:active { transform: none; }
.btn-sm { min-height: 30px; padding: 0 14px; font-size: .82rem; }
.btn-lg { min-height: 50px; padding: 0 28px; font-size: 1.06rem; }
.link {
  display: inline-flex; align-items: center; gap: .2em; color: var(--link);
  background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit;
}
.link:hover { text-decoration: underline; }
/* Cible ≥ 24 px (A11Y-37) par padding invisible : la marge négative annule l'effet sur la mise en page. */
a.link, button.link { padding-block: 2px; margin-block: -2px; }
.link-lg { font-size: 1.12rem; }
/* Au doigt, zone de clic ≥ 44 px sans changer le dessin (UX-15). */
@media (pointer: coarse) {
  .btn-sm { position: relative; }
  .btn-sm::after { content: ""; position: absolute; inset: -7px; }
}
.chev { width: .78em; height: .78em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; margin-top: .12em; }
/* Indice visuel du nouvel onglet (A11Y-38, ARB-16) : liens autonomes du contact et des réseaux seulement. */
.ext-icon { display: inline-block; width: .62em; height: .62em; margin-left: .3em; vertical-align: .08em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.icon { width: 1.2em; height: 1.2em; flex: none; }

/* ---------------------------------------------------------------- 3. en-tête & menu */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .8); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.header.is-scrolled { border-bottom-color: rgba(0, 0, 0, .08); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; color: var(--text); padding: 6px 0; }
.logo-mark {
  display: block; width: 124px; aspect-ratio: 2958 / 515; background: currentColor;
  -webkit-mask: url("/icons/logo.svg?v=14cee43c") center / contain no-repeat; mask: url("/icons/logo.svg?v=14cee43c") center / contain no-repeat;
}
/* Le logo pousse le reste à droite : nav puis pilule « Contact » (.header-cta, hors du menu replié, UX-40).
   DOM : logo, pilule, bouton de menu, nav (ordre de tabulation mobile d'UX-23) ; en desktop, la pilule est
   replacée après la nav par « order » pour garder le rendu validé. */
.logo { margin-right: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { display: flex; gap: 26px; }
/* padding-block : cible ≥ 24 px sans changer la police ni la hauteur de l'en-tête (A11Y-37). */
.nav ul a { display: inline-block; padding-block: 8px; color: var(--text); font-size: .8rem; opacity: .8; transition: opacity .2s; }
.nav ul a:hover { opacity: 1; text-decoration: none; }
.header-cta { order: 1; margin-left: 4px; } /* 24 + 4 = 28 px entre les liens et la pilule, comme avant */
.nav-toggle { display: none; }

/* 820 px : nav + logo + bouton + 2 gouttières ; valeur croisée avec le seuil 821 px de main.js (menu mobile). */
@media (max-width: 820px) {
  /* Sans JS, ou si main.js échoue : la navigation reste une liste dans le flux, sous le logo (A11Y-27, CODE-35). */
  .header { height: auto; min-height: var(--header-h); }
  .header-inner { min-height: calc(var(--header-h) - 1px); flex-wrap: wrap; column-gap: 16px; row-gap: 0; } /* - filet bas */
  .nav { display: block; width: 100%; }
  .nav ul { flex-wrap: wrap; gap: 0 18px; }
  .header-cta { order: 0; margin: 0; } /* ≤ 820 px : pilule à côté du logo, avant le bouton de menu (UX-23) */
  html:not(.js) .header { position: relative; } /* sans JS, l'en-tête plus haut ne reste pas collé */

  /* Avec JS : bouton de menu et calque plein écran. Avant « js-ready », le calque est masqué ;
     filet de 3 s qui rend la liste si main.js n'aboutit pas (ARB-05). */
  .js .nav-toggle {
    display: grid; place-content: center; gap: 7px; width: 44px; height: 44px; margin-right: -12px;
    background: none; border: 0; cursor: pointer;
  }
  .js:not(.js-ready) .nav { width: 0; height: 0; visibility: hidden; animation: tm-failsafe 0s 3s forwards; }
  .js:not(.js-ready) .nav-toggle { animation: tm-failsafe-hide 0s 3s forwards; }
  .nav-toggle span { display: block; width: 17px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .js-ready .header { height: var(--header-h); }
  /* Bouton de menu visuellement dernier (la nav est en position fixe) : il garde son alignement optique (-12 px). */
  .js-ready .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; width: auto; height: calc(100dvh - var(--header-h));
    display: flex; flex-direction: column; align-items: stretch; gap: 24px; padding: 16px calc(var(--gutter) + 8px) 40px;
    background: #fff; overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s;
  }
  .js-ready .nav.is-open { opacity: 1; visibility: visible; }
  .js-ready .nav ul { flex-direction: column; gap: 0; }
  .js-ready .nav ul a { display: block; padding: 10px 0; font: 600 1.75rem/1.2 var(--display); letter-spacing: -.02em; opacity: 1; }
  .js-ready .nav .btn { min-height: 50px; font-size: 1.06rem; }
  .menu-open .header { background: #fff; }
  .menu-open { overflow: hidden; }
}

/* ---------------------------------------------------------------- 4. accroche */
/* Exception documentée au rythme .section / .section-tight (UX-05) : l'accroche garde l'espacement propre de la DA
   validée (plus d'air au-dessus du titre qu'en dessous). */
.hero { padding: clamp(64px, 11vw, 140px) 0 clamp(56px, 8vw, 96px); }
/* Styles portés par les classes, pas par la balise (SEO-13, ARB-24) : la ligne d'accroche est le <h1 class="hero-eyebrow">,
   le slogan un <p class="hero-title"> ; le rendu ne dépend pas de la balise. */
.hero-eyebrow { font-family: var(--font); font-size: clamp(1rem, 1.4vw, 1.2rem); font-weight: 600; color: var(--muted); margin-bottom: 16px; }
.hero-title { font-family: var(--display); font-weight: 600; text-wrap: balance; font-size: clamp(2.6rem, 7.2vw, 5.6rem); line-height: 1.03; letter-spacing: -.04em; }
.hero-title span { display: block; color: var(--faint); } /* grand texte : --faint admis */
.hero-lead { max-width: 660px; margin: 28px auto 0; font-size: clamp(1.12rem, 1.6vw, 1.35rem); line-height: 1.45; color: var(--muted); }
/* Information préalable à la bande-démo (ARB-07) : une ligne sobre en --muted, ≥ 12 px. */
.reel-note { margin-top: 14px; font-size: .78rem; color: var(--muted); }
.highlights .hl-reel .reel-note { display: block; margin-top: 8px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 32px; margin-top: 36px; }

/* ---------------------------------------------------------------- 5. sections, tuiles & bento */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-tight { padding: clamp(56px, 7vw, 96px) 0; }
.gray { background: var(--gray); }
.head { max-width: 780px; margin: 0 auto clamp(36px, 5vw, 64px); text-align: center; }
.head h2 { font-size: clamp(2.1rem, 5vw, 3.75rem); line-height: 1.06; letter-spacing: -.035em; }
.head p { margin-top: 16px; font-size: clamp(1.06rem, 1.5vw, 1.25rem); color: var(--muted); }
.head .t-label { margin-bottom: 10px; }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.tile {
  position: relative; min-width: 0; display: flex; flex-direction: column;
  background: #fff; border-radius: var(--r); padding: var(--pad); overflow: hidden; color: var(--text);
}
a.tile { text-decoration: none; transition: transform .4s var(--ease); }
a.tile:hover { transform: scale(1.01); text-decoration: none; }
a.tile:focus-visible { outline-offset: 4px; border-radius: var(--r); }
.t-label { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.t-title-sm { font-size: clamp(1.2rem, 1.7vw, 1.4rem); line-height: 1.18; letter-spacing: -.02em; margin-top: 8px; font-family: var(--display); font-weight: 600; }
.t-text { margin-top: 10px; color: var(--muted); }
.t-num {
  display: block; font-family: var(--display); font-weight: 600; line-height: .95; letter-spacing: -.045em;
  font-size: clamp(3rem, 5.4vw, 4.75rem); color: var(--text);
}
.t-num small { font-size: .45em; letter-spacing: -.02em; }
.t-num-blue { color: var(--blue); }
.t-end { display: flex; flex-direction: column; align-items: flex-start; margin-top: auto; padding-top: 22px; }
.b-third { grid-column: span 4; }
.b-half { grid-column: span 6; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.chips li { padding: 4px 10px; border-radius: 980px; background: #fff; font-size: .78rem; color: var(--muted); }
.tile .chips li { background: var(--gray); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 980px; background: var(--blue); color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: 0; vertical-align: middle; }
.play {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: var(--gray); color: var(--text); transition: background .2s var(--ease), color .2s var(--ease); /* ≤ 200 ms (A11Y-22) */
}
.play svg { width: 20px; height: 20px; margin-left: 3px; fill: currentColor; }

/* carte média (mosaïque projets, cartes précédent / suivant) */
.card-media { position: relative; aspect-ratio: 16 / 9; background: #e8e8ed; overflow: hidden; }
.card-media img, .card-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media video { opacity: 0; transition: opacity .4s var(--ease); }
.card-media video.is-playing { opacity: 1; }
.card-media .badge { position: absolute; top: 14px; left: 14px; z-index: 1; }

@media (max-width: 1068px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .b-half { grid-column: span 6; }
  .b-third { grid-column: span 2; }
}
/* 860 px : la 3ᵉ tuile de tiers passe en pleine largeur (pas de rangée à trou, UX-08). */
@media (max-width: 860px) {
  .b-third { grid-column: span 3; }
  .b-third:nth-child(3) { grid-column: span 6; }
}
@media (max-width: 734px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-half, .b-third:nth-child(3) { grid-column: span 2; }
  .b-third { grid-column: span 1; }
  .t-num { font-size: clamp(2.3rem, 11vw, 3.2rem); }
}
/* 400 px : petits téléphones, chiffres et légendes resserrés. */
@media (max-width: 400px) {
  .t-num { font-size: 2.2rem; }
}

/* ---------------------------------------------------------------- 6. points forts (bento compact 4×2) */
.highlights .hl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: clamp(24px, 3vw, 36px); }
.highlights .hl-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.08; letter-spacing: -.035em; }
.highlights .hl-head p { color: var(--muted); font-size: 1.06rem; }
.highlights .hl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.highlights .hl-tile { --pad: clamp(18px, 2vw, 24px); border-radius: var(--r-sm); min-height: 172px; }
.highlights .hl-wide { grid-column: span 2; }
.highlights .hl-stat { display: flex; flex-direction: column; align-items: flex-start; margin-top: auto; padding-top: 16px; }
.highlights .hl-stat > span:not(.play):not(.link) { display: block; margin-top: 8px; font-size: .9rem; line-height: 1.35; color: var(--muted); }
.highlights .hl-num { display: block; font: 600 clamp(2.4rem, 3.6vw, 3.25rem)/.95 var(--display); letter-spacing: -.045em; color: var(--text); }
.highlights .hl-num small { font-size: .45em; letter-spacing: -.02em; }
.highlights .hl-num.is-blue { color: var(--blue); }
.highlights .hl-word { font-size: clamp(2rem, 3vw, 2.6rem); }
.highlights .hl-wide-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: auto; }
.highlights .hl-wide .hl-num { font-size: clamp(3rem, 5vw, 4.4rem); }
.mini-posters { display: flex; flex: none; }
.mini-posters img { width: 52px; aspect-ratio: 360 / 486; height: auto; object-fit: cover; border-radius: 7px; border: 2px solid #fff; margin-left: -14px; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.mini-posters img:first-child { margin-left: 0; }
.highlights .hl-wide .mini-posters img { width: 46px; }

/* Tuile bande-démo : le <button> occupe la tuile (pseudo-élément sur toute la surface) ; l'information YouTube et son
   lien vers les cookies sont SOUS le bouton, hors de son nom accessible (SEC-27, ARB-07). */
.highlights .hl-reel { cursor: pointer; }
.highlights .hl-reel-btn {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer;
}
.highlights .hl-reel-btn::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.highlights .hl-reel .reel-note { position: relative; z-index: 1; }
.highlights .hl-reel .play { width: 44px; height: 44px; margin-bottom: 10px; }
.highlights .hl-reel .play svg { width: 17px; height: 17px; }
.highlights .hl-reel:hover .play { background: var(--blue); color: #fff; }
.highlights .hl-reel:hover .link { text-decoration: underline; }
.highlights .hl-reel-btn:focus-visible { outline-offset: 4px; }

.highlights .hl-shader { color: #fff; background: #e8e8ed; }
.highlights .hl-shader img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.highlights .hl-shader > span { position: relative; z-index: 1; }
/* Voile sous le texte (UX-39, A11Y-08) : le bloc de texte porte lui-même un voile noir à .6 sur toute sa hauteur
   (blanc sur nuage blanc voilé : ≥ 5:1 au pire pixel, ≥ 4,9:1 pour le texte à .9), avec un fondu de 48 px au-dessus ;
   l'image reste dégagée en haut de la tuile comme dans la DA validée. */
.highlights .hl-shader .hl-stat {
  margin: auto calc(var(--pad) * -1) calc(var(--pad) * -1); padding: 48px var(--pad) var(--pad);
  background: linear-gradient(to top, rgba(0, 0, 0, .6) calc(100% - 48px), rgba(0, 0, 0, 0));
}
/* Pastille après le titre dans le DOM (nom accessible, A11Y-21), affichée en tête de tuile. */
.highlights .hl-shader .t-label { order: -1; align-self: flex-start; padding: 3px 10px; border-radius: 980px; background: rgba(255, 255, 255, .88); color: var(--text); font-size: .76rem; }
.highlights .hl-shader-title { display: block; font: 600 1.15rem/1.2 var(--display); letter-spacing: -.02em; color: #fff; }
.highlights .hl-shader .hl-stat > span:not(.play):not(.link) { color: rgba(255, 255, 255, .9); }

@media (max-width: 1068px) {
  .highlights .hl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 734px) {
  .highlights .hl-grid { gap: 10px; }
  .highlights .hl-tile { min-height: 150px; }
  .highlights .hl-wide-body { flex-direction: column; align-items: flex-start; }
  .highlights .hl-wide .mini-posters img { width: 38px; margin-left: -10px; }
  .highlights .hl-wide .mini-posters img:first-child { margin-left: 0; }
  .highlights .hl-num { font-size: clamp(2rem, 10vw, 2.6rem); }
  .highlights .hl-word { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .highlights .hl-shader { grid-column: span 2; }
}
/* 400 px : petits téléphones, chiffres et légendes resserrés. */
@media (max-width: 400px) {
  .highlights .hl-stat > span:not(.play):not(.link) { font-size: .84rem; }
}

/* ---------------------------------------------------------------- 7. projets (mosaïque, Largo en vedette) */
/* Espacement : classe .section-tight posée par build.py (UX-05), pas de padding propre. */
.projects-mosaic .mosaic-head { margin-bottom: clamp(28px, 4vw, 44px); }
.projects-mosaic .mosaic-head h2, .projects-mosaic .mosaic-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
/* Page /projects/ (Q-23) : même mosaïque que l'accueil ; titre de page plus grand, fil d'Ariane au-dessus. */
.projects-page .mosaic-head h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -.04em; }
.projects-mosaic .mosaic-all { margin-top: 22px; text-align: right; }
.projects-mosaic .mosaic-head p { margin-top: 12px; font-size: clamp(1rem, 1.3vw, 1.12rem); }
.projects-mosaic .mosaic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.projects-mosaic .mosaic-grid > li { display: flex; min-width: 0; }
.projects-mosaic .mosaic-lead { grid-column: 1 / 3; grid-row: 1 / 3; }
.projects-mosaic .mosaic-end { grid-column: span 2; }
.projects-mosaic .mosaic-tile { position: relative; flex: 1; display: flex; min-width: 0; border-radius: var(--r-sm); overflow: hidden; color: var(--text); text-decoration: none; isolation: isolate; }
.projects-mosaic .mosaic-tile:hover { text-decoration: none; }
.projects-mosaic .mosaic-tile:focus-visible { outline-offset: 4px; border-radius: var(--r-sm); }
.projects-mosaic .mosaic-tile .card-media { flex: 1; }
.projects-mosaic .mosaic-lead .card-media { aspect-ratio: auto; }
.projects-mosaic .card-media img { transition: transform .7s var(--ease); }
.projects-mosaic .mosaic-tile:hover .card-media img { transform: scale(1.04); }
.projects-mosaic .card-media .badge { top: 10px; left: auto; right: 10px; }
/* Titre avant la méta dans le DOM (nom accessible qui commence par le titre, A11Y-21) ; méta affichée au-dessus. */
.projects-mosaic .mosaic-cap {
  display: flex; flex-direction: column; align-items: flex-start;
  position: absolute; left: 10px; bottom: 10px; z-index: 2; max-width: calc(100% - 20px);
  padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .84);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.projects-mosaic .mosaic-meta { order: -1; font-size: .78rem; font-weight: 600; color: var(--muted-strong); } /* fond translucide : --muted-strong (A11Y-08) */
.projects-mosaic .mosaic-cap h3, .projects-mosaic .mosaic-cap h2 { font-size: .9rem; line-height: 1.22; letter-spacing: -.015em; }
.projects-mosaic .mosaic-lead .mosaic-cap { left: 16px; bottom: 16px; max-width: min(400px, calc(100% - 32px)); padding: 16px 20px; border-radius: 16px; }
.projects-mosaic .mosaic-lead .mosaic-meta { font-size: .8rem; }
.projects-mosaic .mosaic-lead .mosaic-cap h3, .projects-mosaic .mosaic-lead .mosaic-cap h2 { margin-top: 2px; font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.15; letter-spacing: -.025em; }
.projects-mosaic .mosaic-tag { margin-top: 4px; font-size: .9rem; color: var(--muted-strong); }
.projects-mosaic .mosaic-lead .link { margin-top: 6px; font-size: .9rem; }
.projects-mosaic .mosaic-tile:hover .link { text-decoration: underline; }
.projects-mosaic .mosaic-cta {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center;
  padding: 20px; border-radius: var(--r-sm); background: var(--gray); color: var(--text); text-decoration: none;
}
.projects-mosaic .mosaic-cta:hover { text-decoration: none; }
.projects-mosaic .mosaic-cta h3, .projects-mosaic .mosaic-cta h2 { font-size: clamp(1.1rem, 1.7vw, 1.4rem); letter-spacing: -.025em; line-height: 1.15; }
.projects-mosaic .mosaic-cta:hover .link { text-decoration: underline; }

@media (max-width: 1068px) {
  .projects-mosaic .mosaic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-mosaic .mosaic-lead { grid-column: 1 / -1; grid-row: auto; }
  .projects-mosaic .mosaic-lead .card-media { aspect-ratio: 16 / 9; }
  .projects-mosaic .mosaic-end { grid-column: 1 / -1; }
}
@media (max-width: 734px) {
  .projects-mosaic .mosaic-grid { gap: 12px; }
  .projects-mosaic .mosaic-item .mosaic-tile { flex-direction: column; overflow: visible; border-radius: 0; }
  .projects-mosaic .mosaic-item .card-media { flex: none; border-radius: 14px; }
  .projects-mosaic .mosaic-item .mosaic-cap { position: static; max-width: none; padding: 8px 2px 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .projects-mosaic .mosaic-lead .mosaic-cap { position: static; max-width: none; padding: 12px 2px 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .projects-mosaic .mosaic-lead .mosaic-tile { flex-direction: column; overflow: visible; border-radius: 0; }
  .projects-mosaic .mosaic-lead .card-media { flex: none; border-radius: var(--r-sm); }
}

/* ---------------------------------------------------------------- 8. avant / après */
.ba { max-width: 1000px; margin: 0 auto; }
.seg-wrap { display: flex; justify-content: center; margin-bottom: 24px; }
.seg { position: relative; min-width: 0; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; border-radius: 980px; background: #e8e8ed; max-width: 100%; }
/* Onglet inactif en --muted-strong (8,2:1 sur #e8e8ed) ; actif en --text ET en graisse 600 (A11Y-06). */
.seg button {
  position: relative; min-height: 36px; padding: 0 18px; border: 0; border-radius: 980px; background: transparent; cursor: pointer;
  font-size: .88rem; color: var(--muted-strong); transition: background .2s, color .2s;
}
/* Largeur réservée à la graisse 600 : la pilule ne bouge pas à la sélection (data-label posé par build.py). */
.seg button::after { content: attr(data-label); display: block; height: 0; overflow: hidden; visibility: hidden; font-weight: 600; }
.seg button[aria-selected="true"] { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.ba-panel[hidden] { display: none; }
/* Panneaux 2 à 4 : générés visibles, masqués avant le premier rendu si JS, rendus en 3 s si main.js échoue (ARB-05). */
.js:not(.js-ready) .ba-panel ~ .ba-panel { height: 0; visibility: hidden; animation: tm-failsafe 0s 3s forwards; }
.ba-caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; margin-top: 16px; font-size: .94rem; color: var(--muted); }

.compare {
  --pos: 50%;
  position: relative; overflow: hidden; border-radius: var(--r-sm); background: #e8e8ed; isolation: isolate;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .c-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
/* Trait déplacé par transform (composition seule, PERF-35) : calque pleine largeur décalé de --pos ; le trait est son
   ::before au bord gauche, la poignée centrée sur ce bord. */
.c-line { position: absolute; inset: 0; transform: translateX(var(--pos)); pointer-events: none; z-index: 2; }
.c-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; }
.c-knob {
  position: absolute; top: 50%; left: 0; width: 40px; height: 40px; border-radius: 50%; transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); color: var(--text);
}
.c-knob svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-tag { position: absolute; top: 12px; z-index: 2; padding: 4px 10px; border-radius: 980px; font-size: .78rem; font-weight: 600; background: rgba(255, 255, 255, .88); color: var(--text); pointer-events: none; }
.c-tag.is-before { left: 12px; }
.c-tag.is-after { right: 12px; }
.c-range { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent; }
/* Focus sur un média : double anneau blanc + bleu, doublé d'un contour transparent pour le contraste forcé (A11Y-12). */
.c-range:focus-visible + .c-line .c-knob { outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue), 0 2px 10px rgba(0, 0, 0, .18); }

@media (pointer: coarse) {
  .seg button::before { content: ""; position: absolute; inset: -4px 0; }
}
@media (max-width: 734px) {
  .seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  /* Indice de débordement (A11Y-15) : fondu à droite quand la rangée défile (data-overflow posé par main.js). */
  .seg[data-overflow="true"] { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
  .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: none; padding: 0 12px; font-size: .8rem; white-space: nowrap; }
}

/* ---------------------------------------------------------------- 9. parcours (frise horizontale + formation) */
/* Une colonne par poste, quel que soit leur nombre (CODE-06) : flux en colonnes, aucune valeur figée. */
.timeline { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0 18px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--line); }
.tl-item { position: relative; min-width: 0; padding-top: 34px; }
.tl-dot { position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.tl-item.is-now .tl-dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, .15); }
.tl-period { font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: -.005em; }
.tl-item.is-now .tl-period { color: var(--blue); }
.tl-item h3 { margin-top: 6px; font-size: 1.06rem; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: break-word; hyphens: auto; }
.tl-where { margin-top: 3px; font-size: .88rem; color: var(--text); }
.tl-text { margin-top: 8px; font-size: .84rem; line-height: 1.42; color: var(--muted); }
.edu { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 20px var(--gap); margin-top: clamp(56px, 7vw, 88px); padding-top: 28px; border-top: 1px solid var(--line); }
.edu-title { font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -.025em; }
.edu-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px var(--gap); }
.edu-name { margin-top: 4px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }

@media (max-width: 1068px) {
  .timeline { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); max-width: 620px; margin: 0 auto; gap: 0; }
  .timeline::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 1px; height: auto; }
  .tl-item { padding: 0 0 32px 40px; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-dot { top: 2px; }
  .tl-item h3 { margin-top: 4px; font-size: 1.2rem; }
  .tl-text { font-size: .92rem; }
  .edu { grid-template-columns: minmax(0, 1fr); max-width: 620px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 734px) {
  .edu-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- 10. filmographie (rail d'affiches + liste repliable) */
.filmography .films-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 44px); }
.filmography .films-intro { min-width: 0; max-width: 720px; }
.filmography .films-intro h2 { font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.06; letter-spacing: -.035em; }
.filmography .films-intro p { margin-top: 12px; font-size: clamp(1.06rem, 1.5vw, 1.25rem); color: var(--muted); }
.filmography .films-nav { display: flex; gap: 10px; flex: none; }
.filmography .films-arrow { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: #e8e8ed; color: var(--text); transition: background .2s, opacity .2s; }
.filmography .films-arrow:hover { background: #dcdce1; }
/* En bout de rail : aria-disabled (pas disabled, qui ferait perdre le focus — A11Y-20). */
.filmography .films-arrow[aria-disabled="true"] { opacity: .4; cursor: default; }
.filmography .films-arrow[aria-disabled="true"]:hover { background: #e8e8ed; }
@media (pointer: coarse) {
  .filmography .films-arrow { position: relative; }
  .filmography .films-arrow::after { content: ""; position: absolute; inset: -2px; }
}
.filmography .films-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.filmography .poster-rail {
  position: relative; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(132px, 16vw, 196px);
  gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 2px 10px; scrollbar-width: none;
}
.filmography .poster-rail::-webkit-scrollbar { display: none; }
.filmography .poster-rail:focus-visible { outline-offset: 6px; }
.filmography .poster-rail li { scroll-snap-align: start; min-width: 0; }
.filmography .poster-rail a { display: block; color: var(--text); font-size: .84rem; line-height: 1.3; }
.filmography .poster-rail a:hover { text-decoration: none; }
.filmography .poster-rail img { width: 100%; aspect-ratio: 360 / 486; height: auto; object-fit: cover; border-radius: 14px; background: #e8e8ed; transition: transform .4s var(--ease); }
.filmography .poster-rail a:hover img { transform: scale(1.02); }
.filmography .poster-title { display: block; margin-top: 10px; overflow-wrap: break-word; }
.filmography .poster-rail small { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; }

.filmography .films-more { margin-top: clamp(32px, 4vw, 48px); }
.filmography .films-more summary {
  display: flex; width: max-content; max-width: 100%; margin: 0 auto; align-items: center; gap: .35em; min-height: 44px; padding: 0 22px;
  border-radius: 980px; background: #fff; color: var(--link); cursor: pointer; list-style: none; font-size: 1rem;
}
.filmography .films-more summary::-webkit-details-marker { display: none; }
.filmography .films-more summary:hover { text-decoration: underline; }
.filmography .films-more summary .chev { transition: transform .3s var(--ease); margin-top: 0; }
.filmography .films-more[open] summary .chev { transform: rotate(180deg); }
.filmography .films-sum-open, .filmography .films-more[open] .films-sum-closed { display: none; }
.filmography .films-more[open] .films-sum-open { display: inline; }
.filmography .films-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--gap); margin-top: clamp(28px, 4vw, 44px); padding: var(--pad); background: #fff; border-radius: var(--r); }
.filmography .films-col { min-width: 0; }
.filmography .films-period { font-size: .8rem; font-weight: 600; color: var(--muted); }
.filmography .films-col h3 { margin-top: 4px; font-size: 1.06rem; line-height: 1.2; letter-spacing: -.02em; }
.filmography .films-meta { margin-top: 3px; font-size: .84rem; color: var(--muted); }
.filmography .films-col ul { margin-top: 12px; }
.filmography .films-col li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(0, 0, 0, .06); font-size: .86rem; line-height: 1.32; }
.filmography .films-col li > :first-child { min-width: 0; overflow-wrap: break-word; }
.filmography .films-col a { padding-block: 4px; margin-block: -4px; color: var(--text); text-decoration: underline 1px var(--faint); text-underline-offset: 3px; } /* cible ≥ 24 px sans décalage (A11Y-37) */
.filmography .films-col a:hover { color: var(--link); text-decoration-color: currentColor; }
.filmography .film-imdb { margin-right: auto; font-size: .78rem; color: var(--muted); }
.filmography .film-year { flex: none; color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.filmography .films-imdb { margin-top: 22px; text-align: center; }

@media (max-width: 1068px) {
  .filmography .films-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 734px) {
  .filmography .films-nav { display: none; }
  .filmography .poster-rail { grid-auto-columns: 42%; }
  .filmography .films-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- 11. services (accordéon, intro collante) */
.services-accordion .acc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
.services-accordion .acc-intro { position: sticky; top: calc(var(--header-h) + 32px); min-width: 0; }
.services-accordion .acc-intro h2 { margin-top: 10px; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.06; letter-spacing: -.035em; }
.services-accordion .acc-intro > p:not(.t-label) { margin-top: 16px; font-size: clamp(1.04rem, 1.4vw, 1.2rem); color: var(--muted); }
.services-accordion .acc-intro .link { margin-top: 18px; }
.services-accordion .acc-list { min-width: 0; border-top: 1px solid var(--line); }
.services-accordion .acc-item { border-bottom: 1px solid var(--line); }
.services-accordion .acc-item summary {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 32px; align-items: center; gap: 18px;
  padding: 22px 0; cursor: pointer; list-style: none;
}
.services-accordion .acc-item summary::-webkit-details-marker { display: none; }
.services-accordion .acc-item summary:focus-visible { outline-offset: 4px; }
.services-accordion .acc-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gray); display: grid; place-items: center; color: var(--text); }
.services-accordion .acc-head { min-width: 0; }
.services-accordion .acc-title { display: block; font: 600 clamp(1.2rem, 1.8vw, 1.45rem)/1.2 var(--display); letter-spacing: -.022em; color: var(--text); }
.services-accordion .acc-for { display: block; margin-top: 3px; font-size: .88rem; color: var(--muted); }
.services-accordion .acc-plus { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--gray); transition: transform .3s var(--ease), background .2s; }
.services-accordion .acc-plus::before, .services-accordion .acc-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.6px; margin: -.8px 0 0 -6px; border-radius: 2px; background: var(--text); }
.services-accordion .acc-plus::after { transform: rotate(90deg); }
.services-accordion .acc-item summary:hover .acc-plus { background: #e8e8ed; }
.services-accordion .acc-item[open] .acc-plus { transform: rotate(45deg); }
.services-accordion .acc-body { padding: 0 50px 28px 62px; }
.services-accordion .acc-body > p:first-child { color: var(--muted); }
.services-accordion .chips li { background: var(--gray); }
.services-accordion .acc-cta { margin-top: 22px; }
.services-accordion .acc-item[open] .acc-body { animation: acc-in .4s var(--ease); }
@keyframes acc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 900 px : l'intro collante n'a plus la place d'une colonne ; passage en une colonne. */
@media (max-width: 900px) {
  .services-accordion .acc-grid { grid-template-columns: minmax(0, 1fr); max-width: 680px; margin: 0 auto; }
  .services-accordion .acc-intro { position: static; }
}
/* Fenêtre basse (paysage mobile) : l'intro collante réduirait trop la zone utile (A11Y-39). */
@media (max-height: 500px) {
  .services-accordion .acc-intro { position: static; }
}
@media (max-width: 734px) {
  .services-accordion .acc-item summary { grid-template-columns: 40px minmax(0, 1fr) 28px; gap: 14px; }
  .services-accordion .acc-icon { width: 40px; height: 40px; }
  .services-accordion .acc-plus { width: 28px; height: 28px; }
  .services-accordion .acc-body { padding: 0 0 24px; }
}

/* ---------------------------------------------------------------- 12. à propos (bento léger) */
.about .about-bio { grid-column: span 7; }
.about .about-skills { grid-column: span 5; }
.about .about-tools { grid-column: span 12; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); align-items: center; gap: 24px var(--pad); }
.about .about-lead { margin-top: 14px; font-size: clamp(1.12rem, 1.7vw, 1.42rem); line-height: 1.45; letter-spacing: -.012em; color: var(--text); }
.about .about-skills ul { margin-top: 8px; }
.about .about-skills li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid rgba(0, 0, 0, .06); }
.about .about-skills li:first-child { border-top: 0; }
.about .skill-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--gray); display: grid; place-items: center; color: var(--text); }
.about .about-skills h3 { font-size: 1rem; line-height: 1.25; letter-spacing: -.018em; }
.about .about-skills p { margin-top: 3px; font-size: .86rem; line-height: 1.4; color: var(--muted); }
.about .about-tools .t-title-sm { margin-top: 0; }
.about .tool-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 16px 8px; }
.about .tool-row li { min-width: 0; }
.about .tool-row a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: .75rem; line-height: 1.25; color: var(--muted); overflow-wrap: anywhere; }
.about .tool-row a:hover { color: var(--text); text-decoration: none; }
.about .tool-row img { width: 40px; height: 40px; object-fit: contain; }

@media (max-width: 1068px) {
  .about .about-bio, .about .about-skills, .about .about-tools { grid-column: span 6; }
  .about .about-tools { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .about .tool-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 734px) {
  .about .about-bio, .about .about-skills, .about .about-tools { grid-column: span 2; }
  .about .tool-row { gap: 14px 4px; }
  .about .tool-row img { width: 34px; height: 34px; }
}

/* ---------------------------------------------------------------- 13. contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); }
.panel { background: var(--gray); border-radius: var(--r); padding: var(--pad); min-width: 0; }
.info-panel { display: flex; flex-direction: column; gap: 32px; }
.info { display: flex; flex-direction: column; gap: 26px; }
.info li span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); }
.info a, .info strong { font: 600 clamp(1.2rem, 2vw, 1.5rem)/1.25 var(--display); letter-spacing: -.02em; color: var(--text); overflow-wrap: anywhere; }
.info a { padding-block: 2px; } /* lien en ligne : le padding agrandit la cible sans toucher la mise en page */
.info a:hover { color: var(--link); text-decoration: none; }
.socials { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 8px; font-size: .94rem; }
.socials a { padding: 2px 8px; margin: -2px -8px; } /* cible ≥ 24×24 px, mise en page inchangée (A11Y-37) */
.form { display: grid; gap: 16px; align-content: start; }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
/* Limite des champs ≥ 3:1 (A11Y-09) : --control-border, réservé à .field. */
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--control-border); background: #fff;
  font-size: 1rem; transition: border-color .2s;
}
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 12px no-repeat;
}
.field textarea { resize: vertical; min-height: 140px; }
/* Focus des champs : bordure bleue + anneau plein de 2 px ; le contour n'est jamais supprimé (A11Y-12). */
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-note { font-size: .8rem; color: var(--muted); text-align: center; }
.form-note:empty { display: none; }
/* Erreurs par champ, en texte (A11Y-34) ; la bordure n'est qu'un indice supplémentaire. */
.form [aria-invalid="true"] { border-color: var(--error); }
.field-err { margin-top: 6px; font-size: .84rem; color: var(--error); }
.field-err:empty { display: none; }
.field-count { margin-top: 6px; font-size: .78rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.form-required { font-size: .84rem; color: var(--muted); } /* « Nom et message obligatoires. » (A11Y-33) */
/* Statut (role=status) et repli du mailto, affichés par main.js après l'envoi (ARB-06). */
.form-status { font-size: .84rem; color: var(--text); text-align: center; }
.form-status:empty { display: none; }
.form-status a { text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.form-fallback[hidden] { display: none; }
.form-copy { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; font-size: .9rem; }

@media (max-width: 1068px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 734px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- 14. pied de page & bande-démo */
.footer { border-top: 1px solid var(--line); background: var(--gray); color: var(--muted); font-size: .78rem; line-height: 1.5; padding: 22px 0 28px; }
.footer a { color: var(--text); opacity: .85; }
.footer-note { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 20px 0; }
/* Titres de colonnes : .footer-h (UX-55, ARB-33) ; « .footer-cols h2 » couvre le gabarit actuel. */
.footer-cols h2, .footer-h { font-size: .78rem; font-weight: 600; color: var(--text); margin-bottom: 8px; letter-spacing: -.01em; }
.footer-cols li + li { margin-top: 6px; }
/* Cible ≥ 24 px (A11Y-37) : padding invisible compensé par une marge négative, pas de liste inchangé. */
.footer-cols a { display: inline-block; min-width: 24px; padding-block: 3px; margin-block: -3px; overflow-wrap: anywhere; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.footer-legal { display: inline-flex; flex-wrap: wrap; gap: 0 16px; }
.footer-bottom a { display: inline-block; padding-block: 3px; margin-block: -3px; } /* cible ≥ 24 px (A11Y-37) */

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--gutter); }
.modal[hidden] { display: none; }
/* Si la fenêtre devient un <dialog> (showModal, A11Y-18) : neutraliser le style navigateur. */
dialog.modal { width: auto; height: auto; max-width: none; max-height: none; margin: 0; border: 0; background: transparent; color: inherit; }
dialog.modal:not([open]) { display: none; }
dialog.modal::backdrop { background: transparent; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(255, 255, 255, .86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
/* Bouton Fermer dans le flux, au-dessus du cadre ; cadre limité par la hauteur : tout reste visible
   sans défilement en 568×320 et 800×360 (A11Y-19, UX-53). */
.modal-dialog {
  position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  width: min(1100px, 100%, (100vh - 2 * var(--gutter) - 96px) * 16 / 9);
  width: min(1100px, 100%, (100dvh - 2 * var(--gutter) - 96px) * 16 / 9); /* 96 = Fermer + lien YouTube + espaces */
}
.modal-frame { align-self: stretch; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: #e8e8ed; box-shadow: 0 20px 60px rgba(0, 0, 0, .15); }
.modal-out { align-self: center; font-size: .84rem; } /* issue de secours « Ouvrir sur YouTube » (SEC-27) */
.modal-out a { display: inline-block; padding-block: 3px; }
.modal-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: var(--gray); color: var(--text); display: grid; place-items: center; }
.modal-close:hover { background: #e8e8ed; }

@media (max-width: 734px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- 15. page projet */
.crumbs { margin-bottom: 22px; font-size: .94rem; }
.crumbs .chev { transform: rotate(180deg); margin-top: 0; }
/* Fil d'Ariane en liste (<ol>) : une ligne, séparateur décoratif non lu (texte alternatif vide). */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.center .crumbs ol { justify-content: center; }
.crumbs li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs li + li::before { content: "›"; content: "›" / ""; color: var(--muted); }
.crumbs a { padding-block: 3px; margin-block: -3px; } /* cible ≥ 24 px (A11Y-37) */
.crumbs [aria-current] { color: var(--muted); }
.project-hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -.04em; }
.project-film { margin-top: clamp(40px, 6vw, 72px); }
.frame { position: relative; border-radius: var(--r); overflow: hidden; background: #e8e8ed; }
/* Ratio natif de chaque vidéo (PERF-24) : posé par build.py (width/height ou style aspect-ratio). Repli 16:9
   tant que la vidéo ne porte aucune dimension, pour éviter un saut de mise en page. */
.frame video { width: 100%; height: auto; background: #e8e8ed; }
/* Façade de la vidéo de tête (PERF-47) : poster en <img srcset>, remplacé par la <video> au clic (main.js). */
.video-facade { position: relative; display: block; color: var(--text); }
.video-facade-img { width: 100%; height: auto; }
.video-facade-play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; border-radius: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; background: rgba(255, 255, 255, .88); color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); transition: background .2s var(--ease);
}
.video-facade-play svg { width: 26px; height: 26px; margin-left: 4px; fill: currentColor; }
.video-facade:hover .video-facade-play { background: #fff; }
.video-facade:focus-visible { outline-offset: 4px; border-radius: var(--r); }
@media (max-width: 734px) {
  .video-facade-play { width: 56px; height: 56px; }
  .video-facade-play svg { width: 22px; height: 22px; }
}
.frame video:not([width]):not([style]) { aspect-ratio: 16 / 9; object-fit: cover; }

/* Contrôle Pause/Lecture des vidéos en lecture automatique (A11Y-25), créé par main.js. */
.video-toggle {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .88); color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.video-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.video-toggle:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.facts-tools { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.facts-tools li { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text); }
.facts-tools img { width: 28px; height: 28px; }

.story { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }
.story article { min-width: 0; padding-top: 22px; border-top: 1px solid var(--line); }
.story h3 { margin-top: 8px; font-size: clamp(1.4rem, 2vw, 1.75rem); letter-spacing: -.03em; line-height: 1.1; }
.story p:not(.t-label) { margin-top: 12px; color: var(--muted); }

.chapters { display: grid; gap: clamp(56px, 8vw, 96px); max-width: 1000px; margin: 0 auto; }
.chapter { min-width: 0; }
.chapter-text { max-width: 720px; padding-top: 22px; border-top: 1px solid var(--line); }
.chapter-text h3 { margin-top: 8px; font-size: clamp(1.4rem, 2vw, 1.75rem); letter-spacing: -.03em; line-height: 1.1; }
.chapter-text p:not(.t-label) { margin-top: 12px; color: var(--muted); }
.chapter figure { margin-top: clamp(24px, 3vw, 36px); }

.gallery { display: grid; gap: clamp(40px, 6vw, 72px); }
.cta-tile { text-align: center; padding: clamp(40px, 6vw, 72px) var(--pad); background: var(--gray); border-radius: var(--r); }
.cta-tile h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.035em; line-height: 1.07; }
.cta-tile p { margin: 14px auto 26px; max-width: 520px; color: var(--muted); font-size: 1.1rem; }

.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.card {
  flex: 1; display: flex; flex-direction: column; min-width: 0; border-radius: var(--r); overflow: hidden;
  background: var(--gray); color: var(--text); text-decoration: none; transition: transform .4s var(--ease);
}
.card:hover { text-decoration: none; transform: translateY(-2px); }
.card:hover .link { text-decoration: underline; }
.card:focus-visible { outline-offset: 4px; border-radius: var(--r); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 22px; }
.card-body h3 { font-size: 1.2rem; line-height: 1.15; letter-spacing: -.025em; margin-top: 6px; }
/* Libellé « Projet précédent / suivant » après le titre dans le DOM (A11Y-21), affiché au-dessus. */
.card-body small { order: -1; display: block; font-size: .82rem; font-weight: 600; color: var(--muted); }
.card-body .link { margin-top: auto; padding-top: 16px; }
.pager .is-next { text-align: right; }
.pager .is-next .link { align-self: flex-end; }
.gray .cta-tile, .gray .card { background: #fff; }

@media (max-width: 1068px) {
  .story { grid-template-columns: minmax(0, 1fr); max-width: 680px; margin: 0 auto; }
}
@media (max-width: 734px) {
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .is-next { text-align: left; }
  .pager .is-next .link { align-self: flex-start; }
}

/* ---------------------------------------------------------------- 16. mentions légales */
.legal-hero { padding-bottom: clamp(32px, 5vw, 56px); }
.legal-hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -.04em; }
.prose { max-width: 720px; }
.prose h2 { margin-top: 36px; font-size: clamp(1.2rem, 1.7vw, 1.4rem); letter-spacing: -.02em; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-top: 10px; color: var(--muted); overflow-wrap: anywhere; }
.prose li a { display: inline-block; } /* lien seul dans un élément de liste : cible = hauteur de ligne ≥ 24 px */

/* ---------------------------------------------------------------- 17. apparitions & mouvement réduit */
/* Transitions hors transform/opacity (PERF-54), conservées et justifiées : fonds et couleurs des boutons, onglets,
   flèches, pastilles et de l'accordéon (survol, sélection : peinture seule, aucune mise en page, ≤ 250 ms), filet de
   l'en-tête (border-color) et visibilité du menu mobile (visibility, couplée au fondu d'opacité pour retirer le calque
   du parcours clavier). Aucune transition sur une propriété de mise en page (width, height, top, left, margin). */
/* Apparitions (ARB-05) : seul « .js-ready [data-reveal]:not(.is-in) » est masqué. main.js marque d'abord « is-in »
   sur les blocs déjà visibles, puis pose « js-ready » en dernière instruction : si main.js échoue, rien n'est masqué.
   @media screen : l'impression montre tout. */
@media screen {
  .js-ready [data-reveal] { transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js-ready [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(20px); }
  /* Un élément qui reçoit le focus pendant son apparition est pleinement visible (A11Y-13). */
  .js-ready [data-reveal]:not(.is-in):focus-within { opacity: 1; transform: none; }
}

/* Mouvement réduit (ARB-15, A11Y-22) : aucun déplacement ni zoom, aucun défilement fluide ni animation de hauteur ;
   les fondus d'opacité et de couleur ≤ 200 ms restent. Liste ciblée, pas de neutralisation globale (E-09).
   Aucune position finale ne dépend d'une animation (rail aligné, apparitions visibles). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .filmography .poster-rail { scroll-behavior: auto; }
  .js-ready [data-reveal] { transition: opacity .2s linear; }
  .js-ready [data-reveal]:not(.is-in) { transform: none; }
  .btn:active, a.tile:hover, .card:hover,
  .filmography .poster-rail a:hover img, .projects-mosaic .mosaic-tile:hover .card-media img { transform: none; }
  a.tile, .card, .filmography .poster-rail img, .projects-mosaic .card-media img,
  .nav-toggle span, .filmography .films-more summary .chev { transition: none; }
  .btn { transition: background .2s var(--ease); }
  .header { transition-duration: .2s; }
  .js-ready .nav { transition-duration: .2s; }
  .card-media video { transition-duration: .2s; }
  .services-accordion .acc-plus { transition: background .2s; }
  .services-accordion .acc-item[open] .acc-body { animation: none; }
}

/* ---------------------------------------------------------------- 18. contraste forcé */
/* Éléments dessinés en « background » qui disparaîtraient en contraste forcé (A11Y-11). */
@media (forced-colors: active) {
  .logo-mark, .nav-toggle span, .c-line::before,
  .services-accordion .acc-plus::before, .services-accordion .acc-plus::after { forced-color-adjust: none; background: CanvasText; }
  .c-knob, .video-toggle, .video-facade-play { border: 1px solid CanvasText; }
  .seg button[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
}
