/* Styles partagés de la maquette.
   Typo : Helvetica Now Display (machine de Kélit) — licence webfont à acheter
   au lancement (~120 $ sur MyFonts, Light+Regular+Bold) ; Inter en repli libre.
   Thème : sombre par défaut (noir pur), bouton lune/soleil dans le header. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&display=swap');

:root {
  --bg: #ffffff;
  --bg-thumb: #f4f4f4;
  --text: #111111;
  --text-dim: #9a9a9a;
  --line: #e6e6e6;
  --tag: #1e33f5;
  --logo-invert: 1; /* le K est blanc : on l'inverse en mode clair */
  --stage-bg: #ffffff;
  --dot: #d4d4d4;
  --font: "Helvetica Now Display", "Helvetica Now Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-thumb: #161616;
    --text: #eaeaea; --text-dim: #8d8d8d;
    --line: #242424; --tag: #7d8bff;
    --logo-invert: 0;
    --stage-bg: #000000; --dot: rgba(255, 255, 255, .75);
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-thumb: #161616;
  --text: #eaeaea; --text-dim: #8d8d8d;
  --line: #242424; --tag: #7d8bff;
  --logo-invert: 0;
  --stage-bg: #000000; --dot: rgba(255, 255, 255, .75);
}

/* Langue : les blocs .fr / .en s'affichent selon la langue active. */
html[data-lang="en"] .fr { display: none !important; }
html:not([data-lang="en"]) .en { display: none !important; }

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font); }
a { color: inherit; }

/* Titres de projets : plus de tiret long — client en gras, projet en fin. */
.tlight { font-weight: 300; }

/* ---------- Entrée de page : fondu « liquid glass » (flou → net).
   L'animation n'est posée QUE par common.js quand l'onglet est visible :
   sans ça, un onglet masqué gèle l'animation sur son état initial
   (opacité 0) et la page reste blanche/vide. ---------- */
main.page-in { animation: pageIn .65s ease-out both; }
@keyframes pageIn {
  from { opacity: 0; filter: blur(16px); transform: scale(1.012); }
  to   { opacity: 1; filter: blur(0);   transform: none; }
}
/* Sortie de page : fondu doux AVANT la navigation (common.js intercepte les
   liens internes), pour éviter toute coupure radicale entre les pages. */
main.page-out { animation: pageOut .2s ease both; }
@keyframes pageOut {
  to { opacity: 0; filter: blur(12px); }
}

/* Bascule clair/sombre en douceur : la classe est posée 600 ms le temps de
   la transition, pour ne pas ralentir les survols en temps normal. */
html.theme-anim, html.theme-anim * {
  transition: background-color .5s ease, color .5s ease, border-color .5s ease !important;
}

/* ---------- Header : bloc flottant, fondu progressif vers le bas ---------- */
header.site {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 40px 46px;
  margin-bottom: -30px;
  /* La zone de fondu (transparente) ne doit PAS intercepter les clics :
     seuls les éléments interactifs du header sont cliquables — sinon les
     filtres juste dessous étaient inatteignables sur leur moitié haute. */
  pointer-events: none;
  /* Voile dégradé : opaque en haut derrière le nom, fondu doux et continu
     (courbe d'atténuation, sans palier) vers le bas — pas de ligne visible. */
  background: linear-gradient(to bottom,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 92%, transparent) 34%,
    color-mix(in srgb, var(--bg) 68%, transparent) 58%,
    color-mix(in srgb, var(--bg) 32%, transparent) 78%,
    transparent 100%);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  mask-image: linear-gradient(to bottom,
    #000 0%, #000 34%,
    rgba(0,0,0,.88) 50%, rgba(0,0,0,.62) 66%,
    rgba(0,0,0,.32) 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%, #000 34%,
    rgba(0,0,0,.88) 50%, rgba(0,0,0,.62) 66%,
    rgba(0,0,0,.32) 82%, transparent 100%);
}
header.site .logo {
  height: 32px; width: auto; display: block;
  filter: invert(var(--logo-invert));
}
header.site .id, header.site .hviews, header.site .hnav, header.site .hctl { pointer-events: auto; }
header.site .id { text-decoration: none; display: flex; align-items: center; gap: 16px; }
.wordmark {
  font-size: 21px; font-weight: 700; letter-spacing: .015em;
  text-transform: uppercase; line-height: 1;
  /* Transition de couleur PERMANENTE : quand la classe globale de bascule de
     thème se retire, le nom ne « saute » plus d'une frame. */
  transition: color .5s ease;
}
/* Texte du header un cran plus contrasté que --text-dim : il doit rester
   lisible quand des images passent dessous (surtout en mode clair). */
.role { font-size: 13px; color: color-mix(in srgb, var(--text) 42%, var(--text-dim)); font-weight: 300; text-transform: lowercase; }
/* Navigation du header : Index/Graphe/Filtres (vues) au CENTRE, pages à droite. */
header.site { --hcol: color-mix(in srgb, var(--text) 42%, var(--text-dim)); }
.hviews, .hnav { display: flex; align-items: baseline; gap: 20px; }
.hviews a, .hviews button, .hnav a, .hnav button {
  color: var(--hcol); text-decoration: none; font-size: 13px;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--font); transition: color .15s; white-space: nowrap;
}
.hviews a:hover, .hviews button:hover, .hnav a:hover, .hnav a.active { color: var(--text); }
.hviews .hview.on { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }
#filter-toggle.on { color: var(--text); }
#filter-toggle.filtering { color: var(--tag); }
.hnav { margin-left: auto; }
.hctl { display: flex; align-items: center; gap: 16px; margin-left: 22px; }
.hbreak { display: none; }
/* Desktop large : les vues flottent au centre exact du header, alignées sur
   la ligne du nom (le header n'a qu'une ligne de contenu + le fondu dessous). */
@media (min-width: 981px) {
  .hviews { position: absolute; left: 50%; transform: translateX(-50%); top: 25px; }
}
#theme-btn, #lang-btn {
  background: none; border: none; cursor: pointer;
  font-size: 12px; font-weight: 300;
  color: color-mix(in srgb, var(--text) 42%, var(--text-dim));
  padding: 0; transition: color .15s;
}
#theme-btn { font-size: 15px; line-height: 1; }
#theme-btn:hover, #lang-btn:hover { color: var(--text); }

/* Panneau de filtres : replié par défaut, se déploie sous le header en fondu. */
#filter-panel {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  padding: 72px 40px 40px;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 92%, transparent) 55%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  opacity: 0; pointer-events: none; transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease;
}
#filter-panel.open { opacity: 1; pointer-events: auto; transform: none; }
.chip {
  font-size: 12px; font-weight: 400;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); padding: 6px 10px;
  transition: color .15s;
}
.chip:hover { color: var(--text); }
.chip.on { color: var(--tag); }
.count { font-size: 12px; color: var(--text-dim); margin-left: 18px; }

main { padding: 0 40px 110px; }
.view { display: none; transition: opacity .18s ease; }
.view.on { display: block; animation: viewIn .35s ease; }
.view.fading { opacity: 0; }
@keyframes viewIn { from { opacity: 0; } }

/* ---------- Cartes : l'image parle, le titre n'apparaît qu'au survol ---------- */
.card {
  cursor: pointer; display: block; text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
  transform-style: preserve-3d;
}
.card:hover { z-index: 5; } /* la carte inclinée passe au-dessus des voisines */
.card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-thumb); }
.card img, .card video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card .meta {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%);
  opacity: 0; transition: opacity .2s ease;
}
.card:hover .meta, .card:focus-visible .meta { opacity: 1; }
/* Tailles fluides : lisible du téléphone au 2K (le vw suit l'écran). */
.card .title { font-size: clamp(13px, 1.35vw, 28px); font-weight: 300; flex: 1; line-height: 1.3; color: #fff; }
.card .title b { font-weight: 700; }
.card .year { font-size: clamp(12px, .95vw, 20px); color: rgba(255,255,255,.65); font-weight: 300; }
.card.hidden { display: none; }
@media (hover: none) {
  .card .meta { opacity: 1; }
}

/* ---------- Vue INDEX : grille serrée, apparition organique au scroll ---------- */
#grid .wrap {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding-top: 26px;
}
@media (max-width: 640px) {
  #grid .wrap { grid-template-columns: 1fr; }
}
/* Chaque carte se révèle en entrant dans l'écran : flou → net, léger lift. */
.card.reveal { opacity: 0; transform: translateY(18px); filter: blur(10px); }
.card.reveal.in {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity .65s ease, transform .65s ease, filter .65s ease;
}

/* ---------- Vue GRAPHE (référence : sub.global) ---------- */
#graph .stage {
  position: relative; height: calc(100vh - 150px); min-height: 560px;
  overflow: hidden; margin-top: 10px;
  background-color: var(--stage-bg);
  cursor: grab;
  touch-action: none; /* on gère nous-mêmes pan/pinch au doigt */
}
#graph .stage.panning { cursor: grabbing; }
/* Vue graphe : plein écran SOUS l'interface (header et footer flottants). */
body.graph-mode #graph .stage {
  position: fixed; inset: 0; height: 100vh; margin: 0; z-index: 0;
}
#graph .dots {
  position: absolute; inset: -12%;
  background-image: radial-gradient(var(--dot) .5px, transparent .9px);
  background-size: 24px 24px;
  opacity: .85; /* constante — plus de variation par frame, plus de clignotement */
  pointer-events: none;
}
#graph .field {
  position: absolute; transform-origin: 0 0; will-change: transform;
  animation: fieldIn .9s ease-out;
}
@keyframes fieldIn { from { opacity: 0; } to { opacity: 1; } }
#graph svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#graph path {
  stroke: var(--text-dim); stroke-width: 1; fill: none;
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
#graph path.show { opacity: .8; }

/* Carte-node : coins arrondis, ombre portée, barre « liquid glass » sur l'image.
   Le titre COMPLET est visible (retour à la ligne, jamais tronqué). */
.node {
  position: absolute; left: 0; top: 0; width: 150px;
  transform: translate(-50%, -50%);
  cursor: pointer; user-select: none;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .36);
  transition: opacity .3s, border-color .2s, width .3s ease, box-shadow .2s;
}
/* Promotion en calque GPU : SEULEMENT sur desktop (pour la parallaxe fluide).
   Sur tactile, les nodes ne sont PAS des calques séparés → déplacer le fond
   ne bouge qu'UN calque (le champ entier), au lieu de 36 → plus de saccade. */
@media (hover: hover) { .node { will-change: transform; } }
/* Le node activement attrapé est promu le temps du déplacement (partout). */
.node.grabbed { will-change: transform; }
/* Barre de titre : dégradé sombre SOLIDE (plus de flou d'arrière-plan → aucun
   coût par frame, aucun clignotement au mouvement, lisible sur toute image). */
.node .nbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 8px 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .74), rgba(0, 0, 0, 0));
}
.node .nbar .ntitle {
  flex: 1; font-size: 9.5px; font-weight: 300; color: rgba(255, 255, 255, .85);
  line-height: 1.35;
  /* Une seule ligne, jamais de retour : la largeur de la carte s'adapte au
     titre (JS), l'ellipse ne sert que d'ultime garde-fou. */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
.node .nbar .ntitle b { font-weight: 700; }
.node .nbar .nclose {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 11px; line-height: 1.2; color: rgba(255, 255, 255, .7); padding: 0 2px;
}
.node .nbar .nclose:hover { color: #fff; }
.node .nimg {
  width: 100%; height: auto; display: block;
  pointer-events: none; background: var(--bg-thumb);
}
.node:hover { z-index: 40; border-color: var(--text-dim); box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
.node:hover .ntitle { color: #fff; }
.node.sel { z-index: 45; border-color: var(--text); width: clamp(240px, 16vw, 330px) !important; }
.node.sel .ntitle { color: #fff; }
.node.dim { opacity: .13; pointer-events: none; } /* fond figé quand un node est ouvert */

/* Aperçu au 1er clic ; au 2e clic le node S'OUVRE et grossit sur place —
   le projet se lit dans le node lui-même (pensé pour le mobile aussi). */
.node .ninfo { display: none; padding: 9px 10px 11px; }
.node.sel .ninfo, .node.open .ninfo { display: block; }
.node .ninfo .nmeta { font-size: 10.5px; font-weight: 300; color: var(--text-dim); line-height: 1.6; }
.node .ninfo .nmeta b { font-weight: 400; color: var(--text); }
.node .ninfo .nmore { display: inline-block; margin-top: 8px; font-size: 10.5px; color: var(--tag); }
.node.open {
  width: clamp(440px, 30vw, 560px) !important; max-width: 88vw; z-index: 60;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.node.open .nclose { display: block; }
.node.open .nmore { display: none; }
.node .nopen { display: none; }
.node.open .nopen { display: block; padding: 0 12px 14px; }
.node .nopen .ndesc {
  font-size: 11.5px; font-weight: 300; line-height: 1.6; color: var(--text-dim);
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px;
  max-height: 32vh; overflow: auto;
}
.node .nopen .ndesc p + p { margin-top: 8px; }
.node .nopen .ntags { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 10px; }
.node .nopen .ntags .ptag { font-size: 10.5px; }
.node .nopen .npage {
  display: inline-block; margin-top: 12px; font-size: 11px;
  color: var(--tag); text-decoration: none;
}
.node.open .ninfo { padding-bottom: 4px; }

.ptag { font-size: 12px; color: var(--tag); }
.pdesc {
  margin-top: 24px; font-size: 13px; font-weight: 300; line-height: 1.6; color: var(--text-dim);
  border-top: 1px solid var(--line); padding-top: 20px;
}
.pdesc p + p { margin-top: 10px; }
.pdesc .lang-note { font-style: italic; opacity: .7; }
.rel-title {
  margin-top: 38px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- Page projet dédiée ----------
   Desktop : héros PLEIN ÉCRAN (bord à bord) avec le titre superposé, puis le
   contenu sur une largeur généreuse. Mobile : même logique, plus compact. */
.project-page { max-width: 1560px; margin: 0 auto; padding-top: 26px; }
.project-page .back { font-size: 12px; color: var(--text-dim); text-decoration: none; }
.project-page .back:hover { color: var(--text); }
/* Héros : VRAI bord à bord de la fenêtre (même quand la page est plus
   étroite que l'écran — 2K compris), titre par-dessus. */
html, body { overflow-x: clip; } /* absorbe le débordement du breakout 100vw */
.phero {
  position: relative;
  width: 100vw; margin: 16px 0 0 calc(50% - 50vw);
}
.phero img, .phero video {
  width: 100%; height: min(78vh, 980px); object-fit: cover; display: block;
  background: var(--bg-thumb);
}
.phero .phead {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: clamp(22px, 4vw, 56px) clamp(18px, 3vw, 48px) clamp(18px, 2.6vw, 40px);
  /* Se termine en noir PLEIN : aucune couture visible avec la page. */
  background: linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 45%, transparent 100%);
}
.phero h1, .phero .tlight { color: var(--text); } /* suit le thème, comme son dégradé */
.phero .pyear { color: var(--text-dim); }
/* En-tête hors héros (repli si le projet n'a pas d'image de tête). */
.project-page .phead { margin: 26px 0 22px; }
.project-page h1 { font-size: clamp(24px, 2.6vw, 46px); font-weight: 300; line-height: 1.12; }
.project-page h1 b { font-weight: 700; }
.project-page .pmeta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-top: 12px; }
.project-page .pyear { font-size: 13px; color: var(--text-dim); font-weight: 300; }
.project-page .ptags { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }

/* Corps : suite de blocs — image pleine largeur, texte, grille, vidéo. */
.project-page .pbody { display: flex; flex-direction: column; gap: 12px; }
.project-page .pfull {
  width: 100%; height: auto; display: block; background: var(--bg-thumb);
}
.project-page .pbody { margin-top: 14px; }
.project-page .ptext {
  max-width: 800px; margin: 22px 0 12px;
  font-size: clamp(14px, .95vw, 16px); font-weight: 300; line-height: 1.75; color: var(--text-dim);
}
.project-page .ptext p + p { margin-top: 12px; }
.project-page .ptext a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
/* Grille justifiée : rangées calées à la largeur, hauteurs posées en JS. */
.project-page .pgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.project-page .pgrid img { display: block; background: var(--bg-thumb); object-fit: cover; }
.project-page .pvid { aspect-ratio: 16/9; background: var(--bg-thumb); }
.project-page .pvid iframe { width: 100%; height: 100%; border: 0; display: block; }

.project-page .pfull, .project-page .pgrid img,
.phero img, .phero video { cursor: zoom-in; }
.project-page .rel-title { margin-top: 56px; }
.project-page .rel {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px; margin-top: 16px;
}

/* ---------- Visionneuse plein écran (clic sur une image) ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: color-mix(in srgb, #000 92%, transparent);
  display: flex; flex-direction: column; align-items: center;
  padding-top: 16px;
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
  cursor: zoom-out;
}
#lightbox.open { opacity: 1; pointer-events: auto; }
#lightbox .lb-stage {
  flex: 1; min-height: 0; width: 100%;
  display: flex; align-items: center; justify-content: center;
}
#lightbox .lb-stage img, #lightbox .lb-stage video {
  max-width: 94vw; max-height: 100%; object-fit: contain; display: block;
  box-shadow: 0 20px 80px rgba(0,0,0,.6); cursor: default;
}
#lightbox .lb-nav {
  position: absolute; top: 44%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: #fff; opacity: .55; font-size: 40px; padding: 20px;
  transition: opacity .15s; user-select: none; z-index: 2;
}
#lightbox .lb-nav:hover { opacity: 1; }
#lightbox .lb-prev { left: 8px; }
#lightbox .lb-next { right: 8px; }
#lightbox .lb-close {
  position: absolute; top: 16px; right: 22px; z-index: 2;
  background: none; border: none; cursor: pointer;
  color: #fff; opacity: .6; font-size: 22px;
}
#lightbox .lb-close:hover { opacity: 1; }
/* Bande de miniatures de tout le projet, sous l'image. */
#lightbox .lb-strip {
  flex-shrink: 0; width: 100%;
  display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden;
  padding: 12px 16px 16px; justify-content: safe center;
  scrollbar-width: thin;
}
#lightbox .lb-strip img {
  height: 52px; width: auto; aspect-ratio: 3/2; object-fit: cover;
  display: block; cursor: pointer; opacity: .45;
  border: 1px solid transparent; border-radius: 2px;
  transition: opacity .15s, border-color .15s; flex-shrink: 0;
}
#lightbox .lb-strip img:hover { opacity: .8; }
#lightbox .lb-strip img.on { opacity: 1; border-color: #fff; }
@media (hover: none) { #lightbox .lb-nav { display: none; } } /* mobile : la bande suffit */

/* ---------- Pages Bio / Ressources ---------- */
.page { max-width: 860px; margin: 0 auto; padding-top: 56px; }
.page h1 { font-size: 15px; font-weight: 700; }
.bio-text { font-size: 15px; font-weight: 300; line-height: 1.75; max-width: 640px; margin-top: 40px; }
.bio-text p + p { margin-top: 18px; }
.bio-contact { margin-top: 34px; font-size: 13px; }
.bio-contact a { color: var(--text-dim); text-decoration: none; }
.bio-contact a:hover { color: var(--text); }
.bio-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.bio-links a {
  font-size: 12px; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); padding: 9px 16px;
  transition: border-color .15s;
}
.bio-links a:hover { border-color: var(--text-dim); }
.skills { margin-top: 64px; }
.skills h2 {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 400;
}
.skills .lead { font-size: 15px; font-weight: 400; margin-top: 22px; }
.skill { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.skill h3 { font-size: 13px; font-weight: 700; }
.skill ul { margin: 10px 0 0 16px; }
.skill li, .skill p { font-size: 13px; font-weight: 300; line-height: 1.7; color: var(--text-dim); margin-top: 4px; }

.res-intro { margin-top: 14px; font-size: 13px; font-weight: 300; color: var(--text-dim); line-height: 1.6; max-width: 560px; }
.resource {
  border-top: 1px solid var(--line); margin-top: 44px; padding-top: 30px;
  display: grid; grid-template-columns: 1fr 220px; gap: 40px;
}
.resource h2 { font-size: 19px; font-weight: 700; }
.resource .rtags { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; }
.resource .rdesc { font-size: 13px; font-weight: 300; line-height: 1.7; margin-top: 18px; color: var(--text); }
.resource ul { margin: 14px 0 0 16px; font-size: 13px; font-weight: 300; line-height: 1.8; color: var(--text-dim); }
.resource aside { font-size: 12px; font-weight: 300; color: var(--text-dim); line-height: 1.8; }
.resource aside .soon {
  display: inline-block; margin-top: 14px; border: 1px solid var(--line);
  padding: 8px 14px; color: var(--text-dim);
}

/* ---------- Footer : ancré en bas, même fondu que le header ---------- */
footer.site {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
  padding: 46px 40px 16px;
  font-size: 12px; font-weight: 300; color: var(--text-dim);
  display: flex; gap: 22px;
  background: linear-gradient(to top,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 92%, transparent) 34%,
    color-mix(in srgb, var(--bg) 68%, transparent) 58%,
    color-mix(in srgb, var(--bg) 32%, transparent) 78%,
    transparent 100%);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  mask-image: linear-gradient(to top,
    #000 0%, #000 34%,
    rgba(0,0,0,.88) 50%, rgba(0,0,0,.62) 66%,
    rgba(0,0,0,.32) 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top,
    #000 0%, #000 34%,
    rgba(0,0,0,.88) 50%, rgba(0,0,0,.62) 66%,
    rgba(0,0,0,.32) 82%, transparent 100%);
}
footer.site { pointer-events: none; } /* le fondu n'avale pas les clics du contenu */
footer.site a, footer.site span { pointer-events: auto; }
footer.site .spacer { flex: 1; }
footer.site a { color: inherit; text-decoration: none; }
footer.site a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .role { display: none; }      /* le sous-titre cède la place en premier */
  .hviews { margin-left: 26px; } /* en flux, entre le nom et les pages */
  .hviews, .hnav { gap: 16px; }
  .hctl { margin-left: 16px; }
}
/* Mobile : header sur 2 lignes nettes — ligne 1 : nom + réglages ;
   ligne 2 : vues (Index/Graphe/Filtres) à gauche, pages à droite. */
@media (max-width: 640px) {
  header.site, footer.site, #filter-panel { padding-left: 18px; padding-right: 18px; }
  main { padding: 0 18px 90px; }
  header.site { flex-wrap: wrap; padding-bottom: 30px; row-gap: 12px; gap: 12px; }
  header.site .logo { height: 26px; }
  .wordmark { font-size: 17px; }
  .id { order: 1; }
  .hctl { order: 2; margin-left: auto; }   /* ligne 1, à droite */
  .hbreak { display: block; order: 3; flex-basis: 100%; height: 0; }
  .hviews { order: 4; margin-left: 0; }    /* ligne 2, à gauche */
  .hnav { order: 5; margin-left: auto; }   /* ligne 2, à droite */
  #filter-panel { padding-top: 104px; }
  .resource { grid-template-columns: 1fr; }
  .phero { margin-left: -18px; margin-right: -18px; }
  .phero img, .phero video { height: min(52vh, 480px); }
  .project-page h1 { font-size: 21px; }
  .page { padding-top: 34px; }
  .node.open { width: 88vw !important; }
  footer.site { gap: 16px; font-size: 11px; padding-bottom: 12px; }
  body.graph-mode #graph .stage { height: 100dvh; } /* barres mobiles */
}
@media (max-width: 400px) {
  .hviews, .hnav { gap: 13px; }
  .hviews a, .hviews button, .hnav a { font-size: 12px; }
}
