/* Portfolio Tom Maucotel · feuille de style du site.
   Valeurs : docs/marque/tokens.css (généré depuis tokens.json). Règle : aucune couleur, police, rayon ou ombre
   en dur ici, uniquement des var(--tm-…). Vérifié par tests/test_marque.py. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--tm-fond);
  color: var(--tm-texte);
  font-family: var(--tm-police-texte);
  font-size: var(--tm-taille-base);
  line-height: var(--tm-interligne-texte);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; }
a { color: var(--tm-lien); text-underline-offset: 3px; }
a:hover { color: var(--tm-marque-survol); }
button { font: inherit; color: inherit; }
code, pre { font-family: var(--tm-police-mono); }
::selection { background: var(--tm-marque-fond); color: var(--tm-marque-texte); }

:focus-visible {
  outline: 2px solid var(--tm-focus);
  outline-offset: 2px;
  border-radius: var(--tm-rayon-sm);
}

.icone {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lien-evitement {
  position: absolute; left: var(--tm-espace-4); top: -100px; z-index: 100;
  padding: var(--tm-espace-2) var(--tm-espace-4); border-radius: var(--tm-rayon-md);
  background: var(--tm-marque); color: var(--tm-sur-marque); font-weight: var(--tm-graisse-forte);
}
.lien-evitement:focus { top: var(--tm-espace-3); color: var(--tm-sur-marque); }

.conteneur { max-width: var(--tm-mise-en-page-largeur); margin: 0 auto; padding: 0 var(--tm-espace-5); }

/* ---------- Symbole de marque (couches pilotées par le thème) ---------- */
.symbole .c1 { fill: var(--tm-couche-1); }
.symbole .c2 { fill: var(--tm-couche-2); }
.symbole .c3 { fill: var(--tm-couche-3); }

/* ---------- Barre de navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--tm-fond) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--tm-bordure);
  transition: background-color 0.35s var(--tm-mouvement-courbe), border-color 0.35s var(--tm-mouvement-courbe);
}
/* Sur la scène d'ouverture, la barre s'efface : le script la rend pleine dès que la scène est passée. */
.js .nav:not(.hors-scene) {
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.nav-progression {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--tm-marque); transform: scaleX(0); transform-origin: 0 50%;
}
.nav:not(.hors-scene) .nav-progression { visibility: hidden; }
.nav-interieur {
  display: flex; align-items: center; justify-content: space-between; gap: var(--tm-espace-4);
  height: 64px;
}
.nav-marque {
  display: inline-flex; align-items: center; gap: var(--tm-espace-3);
  color: var(--tm-texte); text-decoration: none;
  font-weight: var(--tm-graisse-forte); font-size: var(--tm-taille-md); letter-spacing: -0.01em;
}
.nav-marque:hover { color: var(--tm-texte); }
.nav-marque .symbole { width: 28px; height: 24px; }
.nav-liens { display: flex; align-items: center; gap: var(--tm-espace-1); }
.nav-liens a:not(.bouton) {
  color: var(--tm-texte-doux); text-decoration: none; font-size: var(--tm-taille-sm);
  padding: var(--tm-espace-2) var(--tm-espace-3); border-radius: var(--tm-rayon-md);
}
.nav-liens a:not(.bouton):hover { color: var(--tm-texte); background: var(--tm-surface-2); }
.nav-liens a[aria-current] { color: var(--tm-texte); background: var(--tm-surface-2); }
.nav-liens .bouton { margin-left: var(--tm-espace-2); }
.nav-outils { display: flex; align-items: center; gap: var(--tm-espace-1); }
.bouton-icone {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--tm-rayon-md);
  background: transparent; border: 1px solid transparent; color: var(--tm-texte-doux); cursor: pointer;
}
.bouton-icone:hover { color: var(--tm-texte); background: var(--tm-surface-2); }
.bouton-menu { display: none; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; gap: var(--tm-espace-2);
  min-height: 44px; padding: 0 var(--tm-espace-4);
  border-radius: var(--tm-rayon-md); border: 1px solid var(--tm-bordure);
  background: var(--tm-surface); color: var(--tm-texte);
  font-size: var(--tm-taille-sm); font-weight: var(--tm-graisse-forte); text-decoration: none; cursor: pointer;
  transition: background var(--tm-mouvement-rapide) var(--tm-mouvement-courbe),
              border-color var(--tm-mouvement-rapide) var(--tm-mouvement-courbe),
              transform var(--tm-mouvement-rapide) var(--tm-mouvement-courbe);
}
.bouton:hover { border-color: var(--tm-bordure-forte); color: var(--tm-texte); }
.bouton:active { transform: scale(0.97); }
.bouton .icone { transition: transform var(--tm-mouvement-normal) var(--tm-mouvement-sortie); }
.bouton:hover .icone { transform: translateY(-2px); }
.bouton.principal { background: var(--tm-marque); border-color: var(--tm-marque); color: var(--tm-sur-marque); }
.bouton.principal:hover { background: var(--tm-marque-survol); border-color: var(--tm-marque-survol); color: var(--tm-sur-marque); }
.bouton.compact { min-height: 36px; padding: 0 var(--tm-espace-3); }
.bouton.discret { background: transparent; border-color: transparent; color: var(--tm-lien); padding: 0 var(--tm-espace-2); }
.bouton.discret:hover { background: var(--tm-marque-fond); color: var(--tm-marque-texte); }

/* ---------- Scène d'ouverture : ciel, titre, massif, premier plan ----------
   Trois plans photographiques produits par scripts/hero_images.py. Le titre est rangé entre le ciel et le massif :
   au défilement il descend derrière les crêtes pendant que les reliefs montent (script en bas de index.html).
   Sans script ou en mouvement réduit, la scène tient en un écran et reste une image fixe. */
.scene {
  position: relative; padding: 0; border: 0;
  margin-top: -65px; /* glisse sous la barre de navigation */
  height: 100svh; min-height: 520px;
  background: var(--tm-scene-ciel); color: var(--tm-scene-encre);
}
.scene-cadre {
  position: relative; height: 100svh; min-height: 520px; overflow: hidden; contain: layout paint;
  /* Largeur commune des reliefs : couvre l'écran sans descendre sous 1,5 fois sa hauteur, pour garder le massif grand. */
  --l: max(100vw, 150svh);
  --plan-l: var(--l);
  --sommet: 48%; /* hauteur du sommet dans le cadre */
}
@media (max-aspect-ratio: 1/1) {
  /* Écran portrait : recadrage central des mêmes plans (part --scene-part de la largeur). */
  .scene-cadre {
    --l: max(calc(100vw / var(--scene-part)), 150svh);
    --plan-l: calc(var(--l) * var(--scene-part));
    --sommet: 50%;
  }
}
/* Épinglée dès que le script est là : le titre ne bouge que sous l'action du défilement. */
.js .scene { height: 240svh; }
.js .scene-cadre { position: sticky; top: 0; }
.scene-ciel, .scene-ciel img, .scene-heure, .scene-reliefs { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-ciel img { max-width: none; }
.scene-heure { background: linear-gradient(180deg, var(--tm-scene-heure-haut) 0%, var(--tm-scene-heure-bas) 80%); }
.scene-reliefs { pointer-events: none; }
.scene-plan {
  position: absolute; left: 50%; top: calc(var(--sommet) - var(--l) / var(--scene-ratio) * var(--scene-sommet));
  width: var(--plan-l); height: calc(var(--l) / var(--scene-ratio)); margin-left: calc(var(--plan-l) / -2);
  transform-origin: 50% 62%; filter: var(--tm-scene-relief);
}
.scene-plan img { width: 100%; height: 100%; max-width: none; }

.scene-titre {
  position: absolute; left: 0; right: 0; top: 0; padding-top: max(84px, 11svh);
  display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none;
  /* Corps du nom : la largeur commande, la hauteur plafonne pour que les deux lignes tiennent dans le ciel. */
  --corps: min(13.7vw, 25svh);
}
.scene-nom, .scene-metier {
  font-family: var(--tm-police-titre); font-weight: var(--tm-graisse-titre);
  text-transform: uppercase; line-height: 0.86; letter-spacing: -0.01em; white-space: nowrap;
}
.scene-nom { font-size: var(--corps); }
.scene-metier {
  font-size: calc(var(--corps) * 0.955);
  color: transparent; -webkit-text-stroke: 0.014em var(--tm-scene-accent);
}
.scene-mot { display: inline-block; }

.scene-brume {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 24%; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--tm-fond) 82%);
  transform-origin: 50% 100%;
}
.scene-pied {
  position: absolute; left: 0; right: 0; bottom: var(--tm-espace-4);
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--tm-espace-4);
  font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--tm-texte-doux);
}
.scene-legende { display: grid; gap: 2px; }
.scene-legende a { color: inherit; }
.scene-suite {
  display: inline-flex; flex-direction: column; align-items: center; gap: var(--tm-espace-2);
  color: var(--tm-texte); text-decoration: none; min-width: 44px;
}
.scene-suite-trait { width: 1px; height: 40px; background: currentColor; transform-origin: 50% 0; }

@media (prefers-reduced-motion: no-preference) {
  .scene.est-active .scene-plan, .scene.est-active .scene-nom, .scene.est-active .scene-metier { will-change: transform; }
  /* Entrée : les mots montent, les reliefs se posent. Déclenchée par .est-prete (photo et police prêtes). */
  .js .scene-mot { clip-path: inset(0 0 100% 0); transform: translate3d(0, 0.4em, 0); }
  .js .scene-reliefs { opacity: 0; transform: translate3d(0, 5%, 0) scale(1.03); }
  .js .scene-pied { opacity: 0; }
  .js .scene.est-prete .scene-mot {
    clip-path: inset(-12% -4% -12% -4%); transform: none;
    transition: clip-path 1.1s var(--tm-mouvement-sortie) var(--retard, 0.15s), transform 1.1s var(--tm-mouvement-sortie) var(--retard, 0.15s);
  }
  .js .scene.est-prete .scene-nom .scene-mot + .scene-mot { --retard: 0.25s; }
  .js .scene.est-prete .scene-metier .scene-mot { --retard: 0.4s; }
  .js .scene.est-prete .scene-reliefs { opacity: 1; transform: none; transition: opacity 0.9s ease-out, transform 1.6s var(--tm-mouvement-sortie); }
  .js .scene.est-prete .scene-pied { opacity: 1; transition: opacity 0.8s ease-out 0.9s; }
  .scene-suite-trait { animation: scene-suite 2.2s var(--tm-mouvement-sortie) infinite; }
}
@keyframes scene-suite {
  0% { transform: scaleY(0); }
  55% { transform: scaleY(1); }
  100% { transform: scaleY(1) translateY(40px); opacity: 0; }
}

/* ---------- Profil (sous la scène) ---------- */
.hero {
  position: relative;
  padding: var(--tm-espace-8) 0 var(--tm-espace-7);
}
.hero-identite { display: flex; align-items: center; gap: var(--tm-espace-5); margin-bottom: var(--tm-espace-5); }
.hero-photo {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none;
  border: 1px solid var(--tm-bordure); background: var(--tm-surface-2);
}
.statut {
  display: inline-flex; align-items: center; gap: var(--tm-espace-2);
  font-size: var(--tm-taille-sm); color: var(--tm-succes);
  background: var(--tm-succes-fond); border-radius: var(--tm-rayon-rond);
  padding: var(--tm-espace-1) var(--tm-espace-3); margin-bottom: var(--tm-espace-3);
}
.statut::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.hero-role {
  margin-top: var(--tm-espace-2);
  font-family: var(--tm-police-mono); font-weight: var(--tm-graisse-moyenne);
  font-size: var(--tm-taille-md); color: var(--tm-marque-texte);
}
.chapo {
  max-width: 30em;
  font-size: clamp(1.25rem, 1rem + 1.3vw, 1.875rem); line-height: 1.32; letter-spacing: -0.01em;
  color: var(--tm-texte); margin-bottom: var(--tm-espace-6); text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--tm-espace-3); margin-bottom: var(--tm-espace-7); }

.chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--tm-espace-4); list-style: none; }
.chiffre {
  position: relative; overflow: hidden;
  background: var(--tm-surface); border: 1px solid var(--tm-bordure); border-radius: var(--tm-rayon-lg);
  padding: var(--tm-espace-5);
  transition: border-color var(--tm-mouvement-normal) var(--tm-mouvement-courbe);
}
.chiffre-lien { display: block; text-decoration: none; color: inherit; }
.chiffre-lien:hover .chiffre-valeur,
.chiffre-lien:focus .chiffre-valeur { color: var(--tm-marque-texte); }
.chiffre-lien:hover .chiffre-libelle,
.chiffre-lien:focus .chiffre-libelle { color: var(--tm-texte); text-decoration: underline; }
.chiffre-valeur {
  display: block; font-family: var(--tm-police-titre); font-weight: var(--tm-graisse-titre);
  font-size: clamp(2.5rem, 1.9rem + 2.4vw, 4rem); line-height: 1; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  transition: color var(--tm-mouvement-normal) var(--tm-mouvement-courbe);
}
.chiffre-libelle { display: block; margin-top: var(--tm-espace-2); color: var(--tm-texte-doux); font-size: var(--tm-taille-sm); }

.trente-secondes {
  margin: var(--tm-espace-6) 0;
  padding: var(--tm-espace-5);
  background: var(--tm-surface);
  border: 1px solid var(--tm-bordure);
  border-left: 4px solid var(--tm-marque);
  border-radius: var(--tm-rayon-md);
}
.titre-30s {
  font-size: var(--tm-taille-lg);
  font-weight: var(--tm-graisse-forte);
  margin-bottom: var(--tm-espace-3);
  color: var(--tm-texte);
}
.trente-secondes-grille {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--tm-espace-3);
}
.trente-secondes-col {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tm-espace-2) var(--tm-espace-4);
  font-size: var(--tm-taille-sm);
  color: var(--tm-texte-doux);
}
.trente-secondes-meta strong { color: var(--tm-texte); }
.trente-secondes-faits {
  margin: 0;
  padding-left: var(--tm-espace-4);
  display: flex;
  flex-direction: column;
  gap: var(--tm-espace-2);
  font-size: var(--tm-taille-sm);
  color: var(--tm-texte);
}

/* ---------- Sections ---------- */
main { counter-reset: section; }
section { padding: var(--tm-espace-8) 0 var(--tm-espace-7); border-top: 1px solid var(--tm-bordure); }
.section-entete {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--tm-espace-4);
  flex-wrap: wrap; margin-bottom: var(--tm-espace-3);
}
.section-titre {
  font-family: var(--tm-police-titre); font-weight: var(--tm-graisse-titre);
  font-size: var(--tm-taille-4xl); line-height: 1; letter-spacing: -0.01em; text-wrap: balance;
  counter-increment: section;
}
/* Numéro d'ordre, compté en CSS : aucun chiffre à tenir à jour dans le gabarit. */
.section-titre::before {
  content: counter(section, decimal-leading-zero);
  content: counter(section, decimal-leading-zero) / "";
  display: block; margin-bottom: var(--tm-espace-3);
  font-family: var(--tm-police-mono); font-weight: var(--tm-graisse-moyenne); font-size: var(--tm-taille-sm);
  letter-spacing: 0.08em; color: var(--tm-marque-texte);
}
.etiquette {
  display: inline-flex; align-items: center; gap: var(--tm-espace-1);
  font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); color: var(--tm-texte-doux);
  border: 1px solid var(--tm-bordure); border-radius: var(--tm-rayon-rond);
  padding: 2px var(--tm-espace-2); white-space: nowrap;
}
.etiquette.marque { color: var(--tm-marque-texte); background: var(--tm-marque-fond); border-color: transparent; }
.section-note { max-width: var(--tm-mise-en-page-largeur-texte); color: var(--tm-texte-doux); margin-bottom: var(--tm-espace-5); }
.sous-titre {
  font-size: var(--tm-taille-sm); font-family: var(--tm-police-mono); font-weight: var(--tm-graisse-moyenne);
  color: var(--tm-texte-doux); text-transform: uppercase; letter-spacing: 0.06em;
  margin: var(--tm-espace-6) 0 var(--tm-espace-3);
}

/* ---------- Filtres ---------- */
.filtres {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--tm-espace-2);
  margin-bottom: var(--tm-espace-6);
}
.filtres-libelle { font-size: var(--tm-taille-sm); color: var(--tm-texte-doux); margin-right: var(--tm-espace-2); }
.filtre {
  min-height: 36px; padding: 0 var(--tm-espace-3); border-radius: var(--tm-rayon-rond);
  border: 1px solid var(--tm-bordure); background: var(--tm-surface); color: var(--tm-texte-doux);
  font-size: var(--tm-taille-sm); cursor: pointer;
}
.filtre:hover { color: var(--tm-texte); border-color: var(--tm-bordure-forte); }
.filtre[aria-pressed="true"] { background: var(--tm-marque-fond); color: var(--tm-marque-texte); border-color: var(--tm-marque); font-weight: var(--tm-graisse-forte); }
.filtre-nombre { font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); }

.etat-vide {
  display: flex; align-items: center; gap: var(--tm-espace-3);
  padding: var(--tm-espace-5); border: 1px dashed var(--tm-bordure-forte); border-radius: var(--tm-rayon-lg);
  color: var(--tm-texte-doux);
}
.etat-vide[hidden] { display: none; }

/* ---------- Cartes projet ---------- */
.grille-projets { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tm-espace-5); align-items: stretch; }
.card-project {
  position: relative; display: flex; flex-direction: column;
  background: var(--tm-surface); border: 1px solid var(--tm-bordure); border-radius: var(--tm-rayon-lg);
  overflow: hidden; box-shadow: var(--tm-ombre-1);
  transition: border-color var(--tm-mouvement-normal) var(--tm-mouvement-courbe),
              box-shadow var(--tm-mouvement-normal) var(--tm-mouvement-courbe),
              transform var(--tm-mouvement-normal) var(--tm-mouvement-courbe);
  cursor: pointer;
}
.card-project:hover {
  border-color: var(--tm-marque);
  box-shadow: var(--tm-ombre-2);
  transform: translateY(-2px);
}
.card-project.est-ouvert {
  transform: none;
  cursor: default;
}
.carte-visuel {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0;
  border-bottom: 1px solid var(--tm-bordure); background: var(--tm-surface-2); cursor: zoom-in; overflow: hidden;
}
.carte-visuel img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: var(--tm-espace-3);
  transition: transform 0.6s var(--tm-mouvement-sortie);
}
.card-project:not(.est-ouvert):hover .carte-visuel img { transform: scale(1.04); }
/* Halo qui suit le pointeur (--mx, --my posés par le script). Souris seulement. */
.card-project::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--tm-marque) 13%, transparent), transparent 70%);
  transition: opacity 0.4s var(--tm-mouvement-courbe);
}
@media (hover: hover) and (pointer: fine) {
  .card-project:not(.est-ouvert):hover::after { opacity: 1; }
}
/* Révélations d'entrée : classes posées par le script (jamais sans lui, jamais en mouvement réduit). */
.a-reveler { opacity: 0; translate: 0 28px; }
.a-reveler.est-revele {
  opacity: 1; translate: 0 0;
  transition: opacity 0.8s var(--tm-mouvement-sortie) var(--retard, 0ms), translate 0.8s var(--tm-mouvement-sortie) var(--retard, 0ms);
}
.carte-visuel .loupe {
  position: absolute; right: var(--tm-espace-2); bottom: var(--tm-espace-2);
  display: inline-flex; padding: 6px; border-radius: var(--tm-rayon-md);
  background: var(--tm-surface); color: var(--tm-texte-doux); border: 1px solid var(--tm-bordure);
}
.card-project.est-ouvert .carte-visuel { aspect-ratio: auto; height: clamp(200px, 32vw, 360px); }
.carte-corps { display: flex; flex-direction: column; gap: var(--tm-espace-3); padding: var(--tm-espace-5); flex: 1; }
.carte-meta { display: flex; flex-wrap: wrap; gap: var(--tm-espace-2); }
.card-project h3 { font-size: var(--tm-taille-lg); font-weight: var(--tm-graisse-forte); line-height: var(--tm-interligne-titre); }
.card-project h3 a { color: var(--tm-texte); text-decoration: none; }
.card-project h3 a:hover { color: var(--tm-lien); text-decoration: underline; }
.carte-desc { color: var(--tm-texte-doux); font-size: var(--tm-taille-sm); }
.carte-actions {
  display: flex; align-items: center; justify-content: space-between; gap: var(--tm-espace-2);
  padding: var(--tm-espace-3) var(--tm-espace-5); border-top: 1px solid var(--tm-bordure);
}
.btn-toggle-expand .icone { transition: transform var(--tm-mouvement-normal) var(--tm-mouvement-courbe); }
.btn-toggle-expand[aria-expanded="true"] .icone { transform: rotate(180deg); }

.project-drawer { border-top: 1px solid var(--tm-bordure); background: var(--tm-fond); }
.project-drawer[hidden] { display: none; }
.tiroir {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tm-espace-6);
  padding: var(--tm-espace-6) var(--tm-espace-5);
}
.tiroir-bloc h4 {
  display: flex; align-items: center; gap: var(--tm-espace-2);
  font-size: var(--tm-taille-sm); font-weight: var(--tm-graisse-forte); margin-bottom: var(--tm-espace-3);
}
.tiroir-bloc h4 .icone { color: var(--tm-marque); }
.tiroir-bloc p { color: var(--tm-texte-doux); }
.tiroir-bloc.large { grid-column: 1 / -1; }
.mesures { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--tm-espace-3); list-style: none; }
.mesure { background: var(--tm-surface); border: 1px solid var(--tm-bordure); border-radius: var(--tm-rayon-md); padding: var(--tm-espace-3) var(--tm-espace-4); }
.mesure-valeur { display: block; font-size: var(--tm-taille-xl); font-weight: var(--tm-graisse-forte); font-variant-numeric: tabular-nums; }
.mesure-libelle { display: block; font-size: var(--tm-taille-xs); color: var(--tm-texte-doux); }
.extrait {
  margin: 0; padding: var(--tm-espace-4); border-radius: var(--tm-rayon-md);
  background: var(--tm-code-fond); color: var(--tm-code-texte); border: 1px solid var(--tm-bordure);
  font-size: var(--tm-taille-sm); line-height: 1.55; overflow-x: auto; tab-size: 4;
}
.liste-fiches { list-style: none; display: grid; gap: var(--tm-espace-1); }
.liste-fiches a { display: inline-flex; align-items: center; gap: var(--tm-espace-2); }
.tiroir-stack-bloc {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--tm-espace-2);
  font-size: var(--tm-taille-sm);
}
.tiroir-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tm-espace-1);
}

.tiroir-pied {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tm-espace-4);
  padding-top: var(--tm-espace-4); border-top: 1px solid var(--tm-bordure);
}
.pile { font-size: var(--tm-taille-sm); color: var(--tm-texte-doux); }
.pile strong { color: var(--tm-texte); font-weight: var(--tm-graisse-forte); }
.tiroir-boutons { display: flex; flex-wrap: wrap; gap: var(--tm-espace-2); }

/* ---------- Listes de documents ---------- */
.liste-docs { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--tm-espace-2); }
.liste-docs a {
  display: flex; align-items: center; gap: var(--tm-espace-3);
  min-height: 52px; padding: var(--tm-espace-3) var(--tm-espace-4);
  background: var(--tm-surface); border: 1px solid var(--tm-bordure); border-radius: var(--tm-rayon-md);
  color: var(--tm-texte); text-decoration: none;
}
.liste-docs a:hover { border-color: var(--tm-marque); color: var(--tm-texte); }
.liste-docs a:hover .icone { color: var(--tm-marque); transform: translateX(2px); }
.liste-docs .num {
  flex: none; min-width: 3.2em; font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs);
  font-weight: var(--tm-graisse-moyenne); color: var(--tm-marque-texte);
}
.liste-docs .libelle { flex: 1; font-size: var(--tm-taille-sm); }
.liste-docs .icone { color: var(--tm-texte-faible); transition: transform var(--tm-mouvement-rapide) var(--tm-mouvement-courbe); }

.encadre {
  display: flex; gap: var(--tm-espace-3); margin-top: var(--tm-espace-6);
  padding: var(--tm-espace-5); border-radius: var(--tm-rayon-lg);
  background: var(--tm-info-fond); color: var(--tm-texte);
}
.encadre > .icone { color: var(--tm-info); margin-top: 2px; }
.encadre p + p { margin-top: var(--tm-espace-2); color: var(--tm-texte-doux); }

/* ---------- Contact ---------- */
.contact-liens { display: flex; flex-wrap: wrap; gap: var(--tm-espace-3); }

/* Rangée d'icônes sociales cliquables */
.reseaux-sociaux {
  display: flex;
  align-items: center;
  gap: var(--tm-espace-3);
  margin-top: var(--tm-espace-4);
}
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--tm-rayon-md);
  background: var(--tm-surface);
  border: 1px solid var(--tm-bordure);
  color: var(--tm-texte-doux);
  transition: color var(--tm-mouvement-rapide) var(--tm-mouvement-courbe),
              border-color var(--tm-mouvement-rapide) var(--tm-mouvement-courbe),
              background var(--tm-mouvement-rapide) var(--tm-mouvement-courbe),
              transform var(--tm-mouvement-rapide) var(--tm-mouvement-courbe);
}
.social-btn:hover {
  color: var(--tm-marque);
  border-color: var(--tm-marque);
  background: var(--tm-surface-2);
  transform: translateY(-2px);
}
.social-btn .icone-reseau {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.pied-haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tm-espace-4);
  margin-bottom: var(--tm-espace-4);
  width: 100%;
}
.pied-reseaux {
  display: flex;
  align-items: center;
  gap: var(--tm-espace-2);
}

/* ---------- Pied de page ---------- */
.pied {
  display: flex; flex-wrap: wrap; gap: var(--tm-espace-5); justify-content: space-between; align-items: flex-start;
  padding: var(--tm-espace-7) 0 var(--tm-espace-8); border-top: 1px solid var(--tm-bordure);
  color: var(--tm-texte-doux); font-size: var(--tm-taille-sm);
}
.pied .symbole { width: 28px; height: 24px; }
.pied-texte { max-width: 64ch; display: grid; gap: var(--tm-espace-2); }

/* ---------- Fenêtres (fiche Markdown, visuel agrandi) ---------- */
dialog { color: var(--tm-texte); }
dialog::backdrop { background: var(--tm-voile); }
.doc-modal {
  width: min(880px, 94vw); max-height: 88vh; padding: 0; display: none; flex-direction: column;
  background: var(--tm-surface); border: 1px solid var(--tm-bordure); border-radius: var(--tm-rayon-lg);
  box-shadow: var(--tm-ombre-3);
}
.doc-modal[open] { display: flex; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: var(--tm-espace-3);
  padding: var(--tm-espace-3) var(--tm-espace-3) var(--tm-espace-3) var(--tm-espace-5);
  border-bottom: 1px solid var(--tm-bordure);
}
.modal-title {
  font-family: var(--tm-police-mono); font-size: var(--tm-taille-sm); color: var(--tm-texte-doux);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal-actions { display: flex; align-items: center; gap: var(--tm-espace-1); flex: none; }
.modal-body { padding: var(--tm-espace-6); overflow-y: auto; line-height: var(--tm-interligne-texte); }
.modal-body h1 { font-size: var(--tm-taille-xl); line-height: var(--tm-interligne-titre); margin: 0 0 var(--tm-espace-4); padding-bottom: var(--tm-espace-3); border-bottom: 1px solid var(--tm-bordure); }
.modal-body h2 { font-size: var(--tm-taille-lg); margin: var(--tm-espace-6) 0 var(--tm-espace-3); }
.modal-body h3 { font-size: var(--tm-taille-base); margin: var(--tm-espace-5) 0 var(--tm-espace-2); }
.modal-body p { margin-bottom: var(--tm-espace-4); }
.modal-body ul { margin: 0 0 var(--tm-espace-4) var(--tm-espace-5); }
.modal-body li { margin-bottom: var(--tm-espace-1); }
.modal-body pre { background: var(--tm-code-fond); color: var(--tm-code-texte); border-radius: var(--tm-rayon-md); padding: var(--tm-espace-4); overflow-x: auto; margin-bottom: var(--tm-espace-4); font-size: var(--tm-taille-sm); }
.modal-body code { font-size: 0.9em; background: var(--tm-surface-2); padding: 1px 6px; border-radius: var(--tm-rayon-sm); }
.modal-body pre code { background: none; padding: 0; color: inherit; }
.modal-body blockquote { border-left: 3px solid var(--tm-marque); padding-left: var(--tm-espace-4); color: var(--tm-texte-doux); margin: var(--tm-espace-4) 0; }
.modal-body table { width: 100%; border-collapse: collapse; margin: var(--tm-espace-4) 0; font-size: var(--tm-taille-sm); display: block; overflow-x: auto; }
.modal-body th, .modal-body td { border: 1px solid var(--tm-bordure); padding: var(--tm-espace-2) var(--tm-espace-3); text-align: left; vertical-align: top; }
.modal-body th { background: var(--tm-surface-2); font-weight: var(--tm-graisse-forte); }
.modal-body a { color: var(--tm-lien); }
.modal-body hr { border: 0; border-top: 1px solid var(--tm-bordure); margin: var(--tm-espace-6) 0; }
.modal-body:focus { outline: none; }

.chargement { display: grid; gap: var(--tm-espace-3); }
.chargement span { display: block; height: 14px; border-radius: var(--tm-rayon-sm); background: var(--tm-surface-2); animation: pulsation 1.2s ease-in-out infinite; }
.chargement span:nth-child(1) { width: 45%; height: 22px; }
.chargement span:nth-child(3) { width: 85%; }
.chargement span:nth-child(4) { width: 70%; }
@keyframes pulsation { 50% { opacity: 0.45; } }
.etat-erreur {
  display: flex; gap: var(--tm-espace-3); padding: var(--tm-espace-5); border-radius: var(--tm-rayon-md);
  background: var(--tm-erreur-fond); color: var(--tm-texte);
}
.etat-erreur > .icone { color: var(--tm-erreur); margin-top: 2px; }
.etat-erreur strong { color: var(--tm-erreur); }
.etat-erreur p { margin-top: var(--tm-espace-2); color: var(--tm-texte-doux); }

.img-lightbox {
  padding: 0; border: 0; background: transparent; max-width: 94vw; max-height: 92vh; overflow: visible;
}
.lightbox-wrap { position: relative; }
.lightbox-wrap img {
  max-width: 94vw; max-height: 88vh; border-radius: var(--tm-rayon-lg);
  background: var(--tm-surface); padding: var(--tm-espace-3); box-shadow: var(--tm-ombre-3);
}
.lightbox-close {
  position: absolute; top: var(--tm-espace-2); right: var(--tm-espace-2);
  background: var(--tm-surface); border-color: var(--tm-bordure);
}

.notification {
  position: fixed; left: 50%; bottom: var(--tm-espace-5); transform: translateX(-50%); z-index: 200;
  display: inline-flex; align-items: center; gap: var(--tm-espace-2);
  padding: var(--tm-espace-2) var(--tm-espace-4); border-radius: var(--tm-rayon-md);
  background: var(--tm-surface); border: 1px solid var(--tm-bordure); box-shadow: var(--tm-ombre-3);
  font-size: var(--tm-taille-sm);
}
.notification[hidden] { display: none; }
.notification .icone { color: var(--tm-succes); }

/* ---------- Adaptations ---------- */
@media (max-width: 1024px) {
  .grille-projets { grid-template-columns: repeat(2, 1fr); }
  .chiffres { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .bouton-menu { display: inline-flex; }
  .nav-liens {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--tm-espace-2) var(--tm-espace-4) var(--tm-espace-4);
    background: var(--tm-fond); border-bottom: 1px solid var(--tm-bordure); box-shadow: var(--tm-ombre-2);
  }
  .nav-liens.est-ouvert { display: flex; }
  .nav-liens a:not(.bouton) { padding: var(--tm-espace-3); font-size: var(--tm-taille-base); }
  .nav-liens .bouton { margin: var(--tm-espace-2) 0 0; justify-content: center; }
  .tiroir { grid-template-columns: minmax(0, 1fr); }
  .liste-docs { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .conteneur { padding: 0 var(--tm-espace-4); }
  .hero { padding: var(--tm-espace-6) 0 var(--tm-espace-6); }
  .hero-identite { flex-direction: column; align-items: flex-start; gap: var(--tm-espace-4); }
  .hero-photo { width: 72px; height: 72px; }
  .hero-actions .bouton { flex: 1 1 100%; justify-content: center; }
  .grille-projets { grid-template-columns: minmax(0, 1fr); }
  .chiffre { padding: var(--tm-espace-4); }
  .tiroir { padding: var(--tm-espace-5) var(--tm-espace-4); }
  .carte-corps { padding: var(--tm-espace-4); }
  .carte-actions { padding: var(--tm-espace-2) var(--tm-espace-4); }
  .modal-body { padding: var(--tm-espace-4); }
  .doc-modal { width: 100vw; max-height: 100dvh; height: 100dvh; max-width: 100vw; border-radius: 0; }
  .modal-actions .texte-bouton { display: none; }
  .scene-titre { --corps: 19.8vw; padding-top: max(88px, 12svh); }
  .scene-nom { white-space: normal; }
  .scene-nom .scene-mot { display: block; }
  .scene-metier { font-size: 13.1vw; margin-top: 0.12em; }
  .scene-legende span + span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  body:has(#doc-modal[open]) > *:not(#doc-modal) { display: none !important; }
  #doc-modal[open] {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
  }
  #doc-modal[open] .modal-header { display: none !important; }
  #doc-modal[open] .modal-body {
    padding: 0 !important;
    overflow: visible !important;
    max-height: none !important;
  }
  .nav, .scene, .hero-actions, .filtres, .carte-actions, .lien-evitement { display: none; }
  .a-reveler { opacity: 1; translate: none; }
  .card-project { break-inside: avoid; box-shadow: none; }
}

/* Lecteur audio personnalisé */
.audio-player-card {
  border-radius: var(--tm-rayon-md);
  padding: var(--tm-espace-4);
  background: var(--tm-surface-2);
  border: 1px solid var(--tm-bordure);
  display: flex;
  flex-direction: column;
  gap: var(--tm-espace-3);
  margin-top: var(--tm-espace-2);
}
.audio-source {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.audio-player-top {
  display: flex;
  align-items: center;
  gap: var(--tm-espace-4);
}
.audio-play-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--tm-rayon-plein);
  background: var(--tm-marque);
  color: var(--tm-sur-marque);
  border: none;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  transition: transform var(--tm-mouvement-rapide) var(--tm-mouvement-courbe), opacity var(--tm-mouvement-rapide) var(--tm-mouvement-courbe);
}
.audio-play-btn:hover {
  transform: scale(1.05);
  opacity: 0.95;
}
.audio-play-btn:active {
  transform: scale(0.96);
}
.audio-btn-icon {
  width: 24px;
  height: 24px;
}
.audio-btn-icon[hidden] {
  display: none !important;
}
.audio-btn-icon.icon-play {
  margin-left: 2px;
}
.audio-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 0%;
  width: 100%;
  height: 40px;
  min-width: 0;
}
.waveform-bar {
  flex: 1 1 0%;
  min-width: 1px;
  max-width: none;
  border-radius: var(--tm-rayon-plein);
  background: var(--tm-bordure);
  transition: background var(--tm-mouvement-rapide) var(--tm-mouvement-courbe);
}
.waveform-bar.is-active {
  background: var(--tm-marque);
}
.audio-player-bottom {
  display: flex;
  align-items: center;
  gap: var(--tm-espace-3);
  font-family: var(--tm-police-mono);
  font-size: var(--tm-taille-xs);
  color: var(--tm-texte-faible);
}
.audio-time {
  min-width: 40px;
  font-variant-numeric: tabular-nums;
}
.audio-time.audio-duration {
  text-align: right;
}
.audio-progress-rail {
  position: relative;
  flex: 1;
  height: 6px;
  background: var(--tm-bordure);
  border-radius: var(--tm-rayon-plein);
  cursor: pointer;
  outline: none;
}
.audio-progress-rail:focus-visible {
  outline: 2px solid var(--tm-focus);
  outline-offset: 2px;
}
.audio-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--tm-marque);
  border-radius: var(--tm-rayon-plein);
  pointer-events: none;
}
.audio-progress-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: var(--tm-rayon-plein);
  background: var(--tm-marque);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: var(--tm-ombre-1);
}

/* ---------- Profil : composition éditoriale ---------- */
@media (min-width: 1025px) {
  .hero {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    column-gap: var(--tm-espace-8); align-items: start;
  }
  .hero > .hero-identite, .hero > .chapo, .hero > .hero-actions { grid-column: 1; }
  .hero > .trente-secondes { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
  .hero > .chiffres { grid-column: 1 / -1; }
}
.trente-secondes {
  background: transparent; border: 0; border-left: 2px solid var(--tm-marque); border-radius: 0;
  padding: var(--tm-espace-2) 0 var(--tm-espace-2) var(--tm-espace-5);
}
.titre-30s {
  font-family: var(--tm-police-mono); font-weight: var(--tm-graisse-moyenne); font-size: var(--tm-taille-sm);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--tm-marque-texte);
}
.trente-secondes-col { flex-direction: column; gap: var(--tm-espace-1); padding-bottom: var(--tm-espace-3); border-bottom: 1px solid var(--tm-bordure); }
.trente-secondes-faits { list-style: none; padding: 0; gap: var(--tm-espace-3); color: var(--tm-texte-doux); }
.trente-secondes-faits strong { display: block; color: var(--tm-texte); }

/* Chiffres clés : une ligne de grands chiffres séparés par des filets, sans boîtes. */
.chiffres { gap: 0; border-top: 1px solid var(--tm-bordure); border-bottom: 1px solid var(--tm-bordure); margin-top: var(--tm-espace-6); }
.chiffre { background: transparent; border: 0; border-radius: 0; padding: var(--tm-espace-6) var(--tm-espace-5); }
.chiffre + .chiffre { border-left: 1px solid var(--tm-bordure); }
.chiffre:first-child { padding-left: 0; }
.chiffre-valeur { font-size: clamp(2.75rem, 1.6rem + 3.4vw, 4.75rem); line-height: 0.9; white-space: nowrap; }
.chiffre-libelle { margin-top: var(--tm-espace-3); max-width: 18ch; }
.chiffre-lien:hover .chiffre-libelle, .chiffre-lien:focus .chiffre-libelle { text-decoration: none; }
@media (max-width: 1024px) {
  .chiffre { padding: var(--tm-espace-5) var(--tm-espace-4); }
  .chiffre:nth-child(odd) { padding-left: 0; border-left: 0; }
  .chiffre:nth-child(n + 3) { border-top: 1px solid var(--tm-bordure); }
}

/* ---------- Cartes projet : numéro, photo plein cadre, carte en vedette ---------- */
.grille-projets { counter-reset: carte; }
.card-project { counter-increment: carte; }
.carte-corps::before {
  content: counter(carte, decimal-leading-zero);
  content: counter(carte, decimal-leading-zero) / "";
  font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); letter-spacing: 0.08em; color: var(--tm-texte-faible);
}
.carte-visuel picture { display: contents; }
.carte-visuel img[src$=".jpg"], .card-project[data-id="deux-minutes"] .carte-visuel img { object-fit: cover; padding: 0; }
.card-project.est-ouvert .carte-visuel img { object-fit: contain; }
/* ---------- Dossier carrière : lignes éditoriales ---------- */
.liste-docs { gap: 0; grid-template-columns: 1fr; border-top: 1px solid var(--tm-bordure); }
.liste-docs a {
  min-height: 76px; padding: var(--tm-espace-4) var(--tm-espace-2); background: transparent; border: 0; border-radius: 0;
  border-bottom: 1px solid var(--tm-bordure);
  transition: padding var(--tm-mouvement-normal) var(--tm-mouvement-sortie), background var(--tm-mouvement-normal) var(--tm-mouvement-courbe);
}
.liste-docs a:hover { padding-left: var(--tm-espace-4); background: var(--tm-surface); }
.liste-docs .libelle { font-size: var(--tm-taille-lg); font-weight: var(--tm-graisse-forte); letter-spacing: -0.01em; }
.liste-docs .num { font-size: var(--tm-taille-sm); min-width: 4em; }
.liste-docs a:hover .icone { transform: translateX(6px); }

/* ---------- Final : contact devant l'Ossau au coucher du soleil (photo de Tom) ----------
   Même sandwich qu'à l'ouverture : ciel, titre, relief détouré. La photo est sombre : texte clair dans les deux thèmes. */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  width: 100vw; margin-left: calc(50% - 50vw); border-top: 0;
  min-height: max(680px, 100svh); padding: var(--tm-espace-9) var(--tm-espace-5) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--tm-final-fond); color: var(--tm-final-encre);
}
.final-decor { position: static; pointer-events: none; }
.final-ciel, .final-relief { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 42%; }
.final-ciel { z-index: -4; }
.final-relief { z-index: -1; }
.final-brume { position: absolute; left: 0; right: 0; bottom: 0; height: 18%; z-index: -1; background: linear-gradient(180deg, transparent, var(--tm-fond) 92%); }
.contact .section-titre {
  position: relative; z-index: -2; /* entre le ciel et le relief, comme le titre d'ouverture */
  font-size: clamp(3.5rem, 13.5vw, 13rem); line-height: 0.86; text-transform: uppercase;
}
.contact .section-titre::before { color: var(--tm-scene-accent); }
.contact .section-note { margin: var(--tm-espace-4) auto var(--tm-espace-5); color: inherit; }
.contact-liens, .contact .reseaux-sociaux { justify-content: center; }
/* --v (0 à 1) est posé par le script pendant que le bloc traverse l'écran ; sans script, l'état final. */
.final-relief { transform: translate3d(0, calc((1 - var(--v, 1)) * 6%), 0) scale(calc(1.06 - var(--v, 1) * 0.06)); transform-origin: 50% 100%; }
.final-ciel { transform: scale(calc(1.06 - var(--v, 1) * 0.06)); }
/* Le titre part de derrière le relief et monte dans le ciel : l'inverse de la scène d'ouverture. */
.contact .section-titre { transform: translate3d(0, calc((1 - var(--v, 1)) * 44svh), 0); }
.contact .section-note, .contact-liens, .contact .reseaux-sociaux { opacity: calc(var(--v, 1) * 3 - 2); }
.pied { border-top: 0; }

.carte-actions .bouton { white-space: nowrap; }

/* ---------- Carrousels de projets ----------
   Piste horizontale pleine largeur, alignée à gauche sur la colonne de texte et ouverte à droite jusqu'au bord de
   l'écran. Défilement natif à crans ; le script ajoute le glisser à la souris, les flèches et la progression. */
html { overflow-x: clip; }
.grille-projets {
  --marge: max(var(--tm-espace-5), calc((100vw - var(--tm-mise-en-page-largeur)) / 2 + var(--tm-espace-5)));
  display: flex; grid-template-columns: none; gap: var(--tm-espace-5); align-items: stretch;
  width: 100vw; margin-left: calc(50% - 50vw); padding: var(--tm-espace-3) var(--marge) var(--tm-espace-5);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--marge);
  scrollbar-width: none; cursor: grab;
}
.grille-projets::-webkit-scrollbar { display: none; }
.grille-projets.est-glissee { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.grille-projets.est-glissee .card-project { pointer-events: none; }
.grille-projets:has(.est-ouvert) { align-items: flex-start; }
.card-project { flex: 0 0 clamp(280px, 29vw, 372px); scroll-snap-align: start; }
.card-project.est-ouvert { flex-basis: min(calc(100vw - 2 * var(--marge)), calc(var(--tm-mise-en-page-largeur) - 2 * var(--tm-espace-5))); }
.card-project[hidden] { display: none; }
@media (max-width: 640px) {
  .grille-projets { --marge: var(--tm-espace-4); gap: var(--tm-espace-4); }
  .card-project { flex-basis: 84vw; }
}
.defile-outils { display: flex; align-items: center; gap: var(--tm-espace-4); margin-top: var(--tm-espace-2); }
.defile-outils .bouton-icone { border-color: var(--tm-bordure); width: 44px; height: 44px; border-radius: var(--tm-rayon-rond); transition: border-color var(--tm-mouvement-normal) var(--tm-mouvement-courbe), transform var(--tm-mouvement-normal) var(--tm-mouvement-sortie); }
.defile-outils .bouton-icone:hover:not(:disabled) { border-color: var(--tm-marque); color: var(--tm-marque); transform: scale(1.08); }
.defile-outils .bouton-icone:disabled { opacity: 0.35; cursor: default; }
.defile-prec .icone { transform: rotate(180deg); }
.profil { flex: 1; height: 44px; overflow: visible; }
.profil polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.profil-fond { stroke: var(--tm-bordure); stroke-width: 1.5; }
.profil-trace { stroke: var(--tm-marque); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.defile-compte { font-family: var(--tm-police-mono); font-size: var(--tm-taille-sm); color: var(--tm-texte-doux); font-variant-numeric: tabular-nums; min-width: 7ch; text-align: right; }

/* ---------- Survols ---------- */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  /* La carte s'incline vers le pointeur (--ix, --iy posés par le script, de -1 à 1). */
  .card-project:not(.est-ouvert):hover {
    transform: perspective(900px) rotateX(calc(var(--iy, 0) * -2.5deg)) rotateY(calc(var(--ix, 0) * 3deg)) translateY(-4px);
  }
}
.card-project h3 a, .nav-marque span {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.45s var(--tm-mouvement-sortie), color var(--tm-mouvement-normal) var(--tm-mouvement-courbe);
}
.card-project h3 a:hover, .nav-marque:hover span { background-size: 100% 2px; text-decoration: none; }
.etiquette { transition: border-color var(--tm-mouvement-normal) var(--tm-mouvement-courbe), color var(--tm-mouvement-normal) var(--tm-mouvement-courbe); }
.card-project:hover .etiquette:not(.marque) { border-color: var(--tm-bordure-forte); color: var(--tm-texte); }
.chiffre-lien .chiffre-valeur { background: linear-gradient(var(--tm-marque), var(--tm-marque)) 0 100% / 0 3px no-repeat; transition: background-size 0.5s var(--tm-mouvement-sortie), color var(--tm-mouvement-normal) var(--tm-mouvement-courbe); width: max-content; padding-bottom: var(--tm-espace-2); }
.chiffre-lien:hover .chiffre-valeur, .chiffre-lien:focus-visible .chiffre-valeur { background-size: 100% 3px; }
.social-btn { transition: transform var(--tm-mouvement-normal) var(--tm-mouvement-sortie), color var(--tm-mouvement-normal), border-color var(--tm-mouvement-normal); }
/* Les étiquettes tiennent sur une ou deux lignes selon la carte : hauteur réservée, pour que les titres s'alignent. */
.card-project:not(.est-ouvert) .carte-meta { min-height: 58px; align-content: flex-start; }
.card-project:not(.est-ouvert) h3 { min-height: 2.6em; }
.profil { min-width: 0; width: 0; }
.section-entete .etiquette { white-space: normal; }

/* ---------- Cartes projet, seconde passe : une affiche plutôt qu'une boîte ----------
   Visuel haut, numéro en dossard posé sur l'image, titre en caractères de titre, un chiffre clé en pied de texte
   (la première métrique de la fiche), barre d'actions sans cloison. */
.card-project { border-radius: var(--tm-rayon-lg); background: var(--tm-surface); box-shadow: none; }
.card-project:hover { box-shadow: var(--tm-ombre-3); }
.carte-visuel { aspect-ratio: 4 / 3; border-bottom: 0; }
.carte-visuel::after { /* fondu du visuel dans la carte */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--tm-surface));
}
.card-project.est-ouvert .carte-visuel::after { display: none; }
.carte-visuel img { padding: var(--tm-espace-5) var(--tm-espace-4) var(--tm-espace-6); }
.carte-visuel .loupe {
  right: var(--tm-espace-3); bottom: auto; top: var(--tm-espace-3); z-index: 1; border-radius: var(--tm-rayon-rond);
  opacity: 0; transform: scale(0.8); transition: opacity var(--tm-mouvement-normal) var(--tm-mouvement-courbe), transform var(--tm-mouvement-normal) var(--tm-mouvement-sortie);
}
.card-project:hover .loupe, .carte-visuel:focus-visible .loupe { opacity: 1; transform: none; }
@media (hover: none) { .carte-visuel .loupe { opacity: 1; transform: none; } }

.carte-corps { position: static; gap: var(--tm-espace-3); padding: 0 var(--tm-espace-5) var(--tm-espace-5); margin-top: calc(-1 * var(--tm-espace-5)); z-index: 1; }
.carte-corps::before { /* dossard */
  position: absolute; left: var(--tm-espace-3); top: var(--tm-espace-3);
  padding: 2px var(--tm-espace-2); border-radius: var(--tm-rayon-sm);
  background: var(--tm-fond); color: var(--tm-texte); border: 1px solid var(--tm-bordure);
  font-weight: var(--tm-graisse-moyenne); font-size: var(--tm-taille-sm);
}
.card-project h3 {
  font-family: var(--tm-police-titre); font-weight: var(--tm-graisse-titre);
  font-size: var(--tm-taille-xl); line-height: 1.08; letter-spacing: 0; text-wrap: balance;
}
.card-project:not(.est-ouvert) h3 { min-height: 2.16em; }
.carte-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.card-project.est-ouvert .carte-desc { display: block; }
.carte-chiffre {
  margin-top: auto; padding-top: var(--tm-espace-4); border-top: 1px solid var(--tm-bordure);
  display: flex; align-items: baseline; gap: var(--tm-espace-3);
}
.carte-chiffre strong {
  font-family: var(--tm-police-titre); font-weight: var(--tm-graisse-titre); font-size: var(--tm-taille-2xl); line-height: 1;
  color: var(--tm-marque-texte); white-space: nowrap;
}
.carte-chiffre span { font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); color: var(--tm-texte-doux); text-transform: uppercase; letter-spacing: 0.05em; }
.card-project.est-ouvert .carte-chiffre { display: none; } /* le tiroir liste toutes les métriques */

.carte-actions { border-top: 0; padding: 0 var(--tm-espace-5) var(--tm-espace-5); }
.carte-actions .btn-toggle-expand { flex: 1; justify-content: space-between; background: var(--tm-surface-2); border-color: transparent; }
.card-project:hover .btn-toggle-expand { background: var(--tm-marque); color: var(--tm-sur-marque); }
.card-project.est-ouvert .btn-toggle-expand { flex: none; background: var(--tm-surface-2); color: var(--tm-texte); }
.card-project.est-ouvert .carte-corps { margin-top: 0; padding-top: var(--tm-espace-5); }
.card-project.est-ouvert .carte-corps::before { position: static; align-self: flex-start; }

/* ---------- En-têtes de section : titre monumental, compteur mono à droite ---------- */
.section-entete { align-items: flex-end; }
.section-entete .etiquette {
  border: 0; padding: 0 0 0.9em; border-radius: 0; font-size: var(--tm-taille-xs);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--tm-texte-doux);
}

/* ---------- Frise de crête entre les sections ---------- */
.frise { width: 100vw; margin: var(--tm-espace-8) 0 0 calc(50% - 50vw); border-top: 1px solid var(--tm-bordure); border-bottom: 1px solid var(--tm-bordure); }
.frise svg { display: block; width: 100%; height: 72px; }
.frise polyline { fill: none; stroke: var(--tm-marque); stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.frise polyline + polyline { stroke: var(--tm-bordure-forte); opacity: 0.7; }
.frise polyline + polyline + polyline { opacity: 0.35; }
.frise-legende {
  max-width: var(--tm-mise-en-page-largeur); margin: 0 auto; padding: var(--tm-espace-2) var(--tm-espace-5);
  border-top: 1px solid var(--tm-bordure);
  font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--tm-texte-faible);
}
.frise + section { border-top: 0; padding-top: var(--tm-espace-7); }
.section-parcours { margin-top: 0; }

/* ---------- Boîte à outils ---------- */
.outils { margin: var(--tm-espace-6) 0 0; border-top: 1px solid var(--tm-bordure); }
.outils-ligne {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--tm-espace-5); align-items: baseline;
  padding: var(--tm-espace-4) 0; border-bottom: 1px solid var(--tm-bordure);
}
.outils dt { font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--tm-texte-doux); }
.outils dd { margin: 0; display: flex; flex-wrap: wrap; gap: var(--tm-espace-2); }
.outil {
  display: inline-flex; align-items: center; gap: var(--tm-espace-2); min-height: 40px; padding: 0 var(--tm-espace-3);
  border: 1px solid var(--tm-bordure); border-radius: var(--tm-rayon-md); background: var(--tm-surface); color: var(--tm-texte);
  font-size: var(--tm-taille-sm); font-weight: var(--tm-graisse-forte);
  transition: border-color var(--tm-mouvement-normal) var(--tm-mouvement-courbe), background var(--tm-mouvement-normal) var(--tm-mouvement-courbe),
              color var(--tm-mouvement-normal) var(--tm-mouvement-courbe), transform var(--tm-mouvement-normal) var(--tm-mouvement-sortie);
}
button.outil { cursor: pointer; }
button.outil:hover { border-color: var(--tm-marque); transform: translateY(-2px); }
.outil[aria-pressed="true"] { background: var(--tm-marque); border-color: var(--tm-marque); color: var(--tm-sur-marque); }
.outil-nombre {
  font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); font-weight: var(--tm-graisse-moyenne);
  padding: 1px 6px; border-radius: var(--tm-rayon-rond); background: var(--tm-marque-fond); color: var(--tm-marque-texte);
}
.outil[aria-pressed="true"] .outil-nombre { background: var(--tm-sur-marque); color: var(--tm-marque); }
.outil-entreprise { font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); font-weight: var(--tm-graisse-normale); text-transform: uppercase; letter-spacing: 0.06em; color: var(--tm-texte-faible); }
.outil[aria-pressed="true"] .outil-entreprise { color: inherit; }
.card-project.est-cite { border-color: var(--tm-marque); box-shadow: var(--tm-ombre-3); }
.card-project.est-cite .carte-corps::before { background: var(--tm-marque); color: var(--tm-sur-marque); border-color: var(--tm-marque); }

/* ---------- Parcours en registres ---------- */
.registre { margin-top: var(--tm-espace-7); --colonnes: 3.5rem minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.8fr) 2.5rem; }
.registre-titre { display: flex; align-items: baseline; justify-content: space-between; gap: var(--tm-espace-4); margin-bottom: var(--tm-espace-4); }
.registre-titre h3 { font-family: var(--tm-police-titre); font-weight: var(--tm-graisse-titre); font-size: var(--tm-taille-2xl); line-height: 1.1; }
.registre-compte, .registre-entete, .r-num, .r-periode, .r-cadre {
  font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--tm-texte-doux);
}
.registre-entete, .registre-ligne summary { display: grid; grid-template-columns: var(--colonnes); column-gap: var(--tm-espace-4); align-items: center; }
.registre-entete { padding: var(--tm-espace-2) var(--tm-espace-3); border-bottom: 1px solid var(--tm-bordure-forte); color: var(--tm-texte-faible); }
.registre-ligne { border-bottom: 1px solid var(--tm-bordure); transition: background var(--tm-mouvement-normal) var(--tm-mouvement-courbe); }
.registre-ligne:hover, .registre-ligne[open] { background: var(--tm-surface); }
.registre-ligne summary { list-style: none; cursor: pointer; padding: var(--tm-espace-4) var(--tm-espace-3); min-height: 76px; }
.registre-ligne summary::-webkit-details-marker { display: none; }
.r-structure { font-family: var(--tm-police-titre); font-weight: var(--tm-graisse-titre); font-size: var(--tm-taille-lg); line-height: 1.15; text-transform: uppercase; }
.r-role { font-weight: var(--tm-graisse-forte); }
.r-num { color: var(--tm-marque-texte); }
.r-plus { position: relative; width: 32px; height: 32px; border: 1px solid var(--tm-bordure); border-radius: var(--tm-rayon-sm); justify-self: end; transition: border-color var(--tm-mouvement-normal), transform 0.5s var(--tm-mouvement-sortie); }
.r-plus::before, .r-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; background: currentColor; transition: transform 0.5s var(--tm-mouvement-sortie); }
.r-plus::after { transform: rotate(90deg); }
.registre-ligne:hover .r-plus { border-color: var(--tm-marque); color: var(--tm-marque); }
.registre-ligne[open] .r-plus::after { transform: rotate(0deg); }
.registre-detail {
  display: grid; grid-template-columns: var(--colonnes); column-gap: var(--tm-espace-4);
  padding: 0 var(--tm-espace-3) var(--tm-espace-5);
}
.registre-detail > * { grid-column: 2 / 6; }
.registre-contexte { color: var(--tm-texte-doux); margin-bottom: var(--tm-espace-3); }
.registre-liste { list-style: none; display: grid; gap: var(--tm-espace-3); margin-bottom: var(--tm-espace-4); max-width: 72ch; }
.registre-liste li { position: relative; padding-left: var(--tm-espace-4); font-size: var(--tm-taille-sm); }
.registre-liste li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--tm-marque); }
.registre-mots { display: flex; flex-wrap: wrap; gap: var(--tm-espace-2); }
@media (prefers-reduced-motion: no-preference) {
  .registre-ligne[open] .registre-detail { animation: registre-ouvre 0.5s var(--tm-mouvement-sortie); }
}
@keyframes registre-ouvre { from { opacity: 0; transform: translate3d(0, -8px, 0); } }
@media (max-width: 860px) {
  .outils-ligne { grid-template-columns: 1fr; gap: var(--tm-espace-3); }
  .registre-entete { display: none; }
  .registre-ligne summary { grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem; row-gap: var(--tm-espace-1); align-items: start; }
  .r-num { grid-row: 1 / span 4; padding-top: 4px; }
  .r-structure, .r-role, .r-periode, .r-cadre { grid-column: 2; }
  .r-plus { grid-column: 3; grid-row: 1 / span 4; }
  .registre-detail { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .registre-detail > * { grid-column: 2; }
}

/* ---------- Côté montagne (section personnelle) et familles de projets ---------- */
.montagne-texte { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: var(--tm-espace-8); align-items: start; margin-top: var(--tm-espace-5); }
.montagne-texte .chapo { margin-bottom: 0; }
.montagne-texte p + p { color: var(--tm-texte-doux); border-left: 2px solid var(--tm-marque); padding-left: var(--tm-espace-5); }
#montagne .chiffre-valeur { white-space: nowrap; }
.famille { margin-top: var(--tm-espace-7); }
.famille-entete { display: flex; align-items: baseline; gap: var(--tm-espace-4); flex-wrap: wrap; margin-bottom: var(--tm-espace-2); padding-bottom: var(--tm-espace-3); border-bottom: 1px solid var(--tm-bordure); }
.famille-entete h3 { font-family: var(--tm-police-titre); font-weight: var(--tm-graisse-titre); font-size: var(--tm-taille-2xl); line-height: 1.1; }
.famille-entete p { font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--tm-texte-doux); }
@media (max-width: 860px) { .montagne-texte { grid-template-columns: 1fr; gap: var(--tm-espace-5); } }

.montagne-courses { margin-top: var(--tm-espace-4); color: var(--tm-texte-doux); font-size: var(--tm-taille-sm); }
.montagne-courses span { margin-right: var(--tm-espace-3); font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--tm-marque-texte); }

/* ---------- Photos personnelles : portrait, ouverture, selfie, triptyque, carnet ---------- */
.hero-identite { align-items: flex-end; }
.hero-photo {
  width: clamp(120px, 14vw, 176px); height: auto; aspect-ratio: 4 / 5; border-radius: var(--tm-rayon-lg);
  object-fit: cover; object-position: 50% 20%;
}
@media (max-width: 640px) { .hero-photo { width: 120px; height: auto; } }

#montagne figure { margin: 0; }
.montagne-ouverture { position: relative; overflow: hidden; border-radius: var(--tm-rayon-lg); aspect-ratio: 21 / 9; margin-top: var(--tm-espace-5); background: var(--tm-surface-2); }
.montagne-ouverture img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; max-width: none; object-fit: cover; }
.montagne-texte { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.5fr); align-items: center; margin-top: var(--tm-espace-7); }
.montagne-texte .chapo { margin-bottom: var(--tm-espace-5); }
.montagne-selfie {
  position: relative; justify-self: end; width: min(100%, 260px); rotate: 3deg; margin-top: calc(-1 * var(--tm-espace-9)) !important;
  border: 6px solid var(--tm-surface); border-radius: var(--tm-rayon-md); box-shadow: var(--tm-ombre-3); background: var(--tm-surface);
  transition: rotate 0.6s var(--tm-mouvement-sortie), scale 0.6s var(--tm-mouvement-sortie);
}
.montagne-selfie:hover { rotate: 0deg; scale: 1.04; }
.montagne-selfie img { aspect-ratio: 3 / 4; object-fit: cover; object-position: 60% 30%; border-radius: var(--tm-rayon-sm); }
.montagne-selfie figcaption, .carnet-photo figcaption {
  padding: var(--tm-espace-2) var(--tm-espace-1) 0; font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs);
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--tm-texte-doux);
}

/* Triptyque nager, rouler, courir : le volet survolé s'élargit, les autres se resserrent. */
.triptyque { display: flex; gap: var(--tm-espace-3); height: clamp(360px, 46vw, 560px); margin-top: var(--tm-espace-7); }
.volet { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: var(--tm-rayon-lg); background: var(--tm-surface-2); transition: flex-grow 0.7s var(--tm-mouvement-sortie); }
.volet img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 0.9s var(--tm-mouvement-sortie); }
.volet figcaption {
  position: absolute; left: var(--tm-espace-3); bottom: var(--tm-espace-3); display: inline-flex; align-items: baseline; gap: var(--tm-espace-2);
  padding: var(--tm-espace-1) var(--tm-espace-3); border-radius: var(--tm-rayon-sm); background: var(--tm-fond); color: var(--tm-texte);
  font-family: var(--tm-police-titre); font-weight: var(--tm-graisse-titre); font-size: var(--tm-taille-lg); text-transform: uppercase;
}
.volet figcaption span { font-family: var(--tm-police-mono); font-weight: var(--tm-graisse-moyenne); font-size: var(--tm-taille-xs); color: var(--tm-marque-texte); }
@media (hover: hover) and (pointer: fine) {
  .triptyque:hover .volet { flex-grow: 0.7; }
  .triptyque .volet:hover { flex-grow: 2.2; }
  .volet:hover img { transform: scale(1.04); }
}
@media (max-width: 640px) {
  .triptyque { flex-direction: column; height: auto; }
  .volet { aspect-ratio: 4 / 3; flex: none; }
  .montagne-ouverture { aspect-ratio: 4 / 3; }
  .montagne-selfie { justify-self: start; margin-top: 0 !important; width: 200px; }
}

/* Carnet de sorties : même piste horizontale que les projets. */
.carnet { margin-top: var(--tm-espace-7); }
.carnet-piste {
  --marge: max(var(--tm-espace-5), calc((100vw - var(--tm-mise-en-page-largeur)) / 2 + var(--tm-espace-5)));
  display: flex; gap: var(--tm-espace-5); width: 100vw; margin-left: calc(50% - 50vw); padding: var(--tm-espace-3) var(--marge) var(--tm-espace-5);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--marge); scrollbar-width: none; cursor: grab;
}
.carnet-piste::-webkit-scrollbar { display: none; }
.carnet-piste.est-glissee { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.carnet-photo { flex: 0 0 clamp(240px, 26vw, 340px); scroll-snap-align: start; }
.carnet-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--tm-rayon-lg); transition: transform 0.7s var(--tm-mouvement-sortie); }
.carnet-photo picture { display: block; overflow: hidden; border-radius: var(--tm-rayon-lg); }
.carnet-photo:hover img { transform: scale(1.05); }
@media (max-width: 640px) { .carnet-piste { --marge: var(--tm-espace-4); } .carnet-photo { flex-basis: 72vw; } }
/* Correctifs de mise en page des photos : un élément flex ou grille ne doit pas s'élargir à la taille native de l'image. */
.carnet-photo, .montagne-selfie { min-width: 0; }
.montagne-selfie { margin-top: 0 !important; align-self: start; }
.montagne-selfie img { width: 100%; height: auto; }
.montagne-texte { align-items: start; }
@media (max-width: 640px) { .hero-identite { align-items: flex-start; } }
.carnet-photo img { height: auto; } /* l'attribut height du HTML ne doit pas l'emporter sur le format 3/4 */
@media (max-width: 860px) {
  .montagne-texte { grid-template-columns: 1fr; }
  .montagne-selfie { justify-self: start; width: 200px; }
}
.volet figcaption small { font-family: var(--tm-police-mono); font-weight: var(--tm-graisse-normale); font-size: var(--tm-taille-xs); text-transform: none; letter-spacing: 0; color: var(--tm-texte-doux); }
.volet figcaption { flex-wrap: wrap; max-width: calc(100% - 2 * var(--tm-espace-3)); }
/* overflow: hidden ferait de ces blocs des conteneurs de défilement, et view() suivrait alors le bloc au lieu de la page. */
.contact, .montagne-ouverture { overflow: clip; }

/* ---------- Barre de navigation : absente sur la scène d'ouverture, elle descend une fois la scène passée ---------- */
.nav { transition: transform 0.5s var(--tm-mouvement-sortie), background-color 0.35s var(--tm-mouvement-courbe), border-color 0.35s var(--tm-mouvement-courbe); }
.js .nav:not(.hors-scene):not(:focus-within) { transform: translate3d(0, -100%, 0); }

/* ---------- Rideau d'entrée : le symbole, puis le rideau se lève sur la scène ---------- */
.rideau { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .rideau {
    position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--tm-espace-4);
    background: var(--tm-fond); color: var(--tm-texte);
    font-family: var(--tm-police-mono); font-size: var(--tm-taille-xs); text-transform: uppercase; letter-spacing: 0.3em;
    transition: transform 1s var(--tm-mouvement-sortie) 0.15s;
    /* filet de sécurité : si le script n'arrive jamais à « prêt », le rideau s'efface seul */
    animation: rideau-secours 0.4s linear 3s forwards;
  }
  .js .rideau .symbole { width: 72px; height: 62px; animation: rideau-symbole 0.9s var(--tm-mouvement-sortie) both; }
  .js .rideau span { animation: rideau-symbole 0.9s var(--tm-mouvement-sortie) 0.12s both; }
  .js.est-entre .rideau { transform: translate3d(0, -101%, 0); }
  /* La scène se met en place pendant que le rideau se lève. */
  .js .scene-reliefs { transform: translate3d(0, 12%, 0) scale(1.08); }
  .js .scene.est-prete .scene-reliefs { transition: opacity 0.6s ease-out 0.3s, transform 1.8s var(--tm-mouvement-sortie) 0.3s; }
  .js .scene.est-prete .scene-mot { --retard: 0.55s; }
  .js .scene.est-prete .scene-nom .scene-mot + .scene-mot { --retard: 0.68s; }
  .js .scene.est-prete .scene-metier .scene-mot { --retard: 0.85s; }
}
@keyframes rideau-symbole { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.92); } }
@keyframes rideau-secours { to { opacity: 0; visibility: hidden; } }

/* Portrait : un léger rapprochement, seulement quand le pointeur est sur la photo elle-même. */
.hero-photo { transition: transform 0.9s var(--tm-mouvement-sortie), box-shadow 0.9s var(--tm-mouvement-sortie); }
@media (hover: hover) and (pointer: fine) { .hero-photo:hover { transform: scale(1.035); box-shadow: var(--tm-ombre-3); } }

/* Documents sous le portrait : le CV sur toute la largeur, les deux autres à parts égales en dessous. */
.hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 680px; }
.hero-actions .bouton { white-space: nowrap; }
.hero-actions .bouton { justify-content: center; text-align: center; }
.hero-actions .bouton.principal { grid-column: 1 / -1; }
@media (max-width: 640px) { .hero-actions { grid-template-columns: 1fr; max-width: none; } }

/* ---------- Côté montagne, version sobre : une ligne de chiffres, un triptyque bas ---------- */
.montagne-texte { margin-top: var(--tm-espace-5); }
.montagne-chiffres { margin-top: var(--tm-espace-4); border-left: 0 !important; padding-left: 0 !important; font-family: var(--tm-police-mono); font-size: var(--tm-taille-sm); color: var(--tm-texte-doux); }
.montagne-chiffres span { display: block; margin-bottom: var(--tm-espace-1); font-size: var(--tm-taille-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--tm-marque-texte); }
.triptyque { height: clamp(220px, 26vw, 320px); margin-top: var(--tm-espace-6); }
#montagne { padding-bottom: var(--tm-espace-8); }
@media (max-width: 640px) {
  /* Sur mobile, les trois vignettes restent côte à côte, petites, au lieu de trois grandes photos empilées. */
  .triptyque { flex-direction: row; height: 190px; gap: var(--tm-espace-2); }
  .volet { aspect-ratio: auto; flex: 1 1 0; }
  .volet figcaption { left: var(--tm-espace-2); bottom: var(--tm-espace-2); padding: 2px var(--tm-espace-2); font-size: var(--tm-taille-sm); }
  .volet figcaption small, .volet figcaption span { display: none; }
}
.montagne-texte { grid-template-columns: minmax(0, 1fr); } /* plus de selfie à côté : le texte occupe la ligne */
.montagne-texte > div { max-width: 62ch; }
