/*
 * Version classique du portfolio (index.html) : fond gris clair et grain,
 * une colonne de texte vertical qui accompagne toute la visite. L'accueil :
 * un trousseau suspendu, dont chaque porte-clé mène à une page.
 * Une seule couleur vive (corail) en touches.
 */
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/Cinzel-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --fond: #c9c9c7;
  --panneau: #d6d6d4;
  --blanc: #f4f4f2;
  --noir: #161616;
  --gris: #55534f;            /* 4,6:1 sur le fond : lisible en petit */
  --accent: #ff4a3d;
  --accent-texte: #a30b00;    /* corail foncé, pour le texte en petit (4,8:1) */
  --trait: rgba(22, 22, 22, 0.16);
  --marge: clamp(16px, 4vw, 56px);
  --titre: "Cinzel", "Times New Roman", serif;
  --large: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --courbe: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
/* tout se passe sur une seule page, sans défilement : À propos et Contact
   sont des volets par-dessus l'accueil */
html, body { height: 100%; overflow: hidden; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--noir);
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

/* Grain sur toute la page, plus marqué que sur du blanc */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 50; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.11;
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, -2%); }
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--noir); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.evitement {
  position: fixed; left: var(--marge); top: -100px; z-index: 70;
  background: var(--noir); color: var(--blanc); padding: 8px 14px;
}
.evitement:focus { top: 12px; }

/* Petites capitales espacées, pour toutes les étiquettes */
.projet-cat, .projet-infos dt, .nav-verticale a {
  font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em;
}

.bouton {
  border: 1px solid currentColor; background: none; color: inherit; font: inherit; font-size: 0.82rem;
  border-radius: 999px; padding: 8px 20px; min-height: 44px; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.bouton:hover { background: var(--noir); border-color: var(--noir); color: var(--blanc); }

/* ---------- En-tête ----------
   Sur la vue d'un projet, le menu prend l'encre du projet (js/express.js
   règle --encre-fixe) ; sur fond sombre, le petit logo passe en négatif. */
.entete {
  position: fixed; left: var(--marge); top: 18px; z-index: 40;
  color: var(--encre-fixe, var(--noir)); transition: color 0.4s;
}
.entete a { text-decoration: none; }
/* Ses yeux à la place du monogramme : frange, eye-liner, pupilles qui
   suivent la souris (js/express.js) et clignement de temps en temps */
.yeux { display: block; line-height: 0; perspective: 300px; text-decoration: none; transition: opacity 0.2s; }
.yeux svg { width: 68px; height: auto; overflow: visible; display: block; }
/* Au survol, la carte pivote et montre son nom au dos. Les deux
   faces s'échangent aussi en fondu à mi-tour : jamais superposées, même
   si le navigateur ignore backface-visibility */
.yeux-carte { display: block; position: relative; transform-style: preserve-3d; transition: transform 0.9s var(--courbe); }
.yeux:hover .yeux-carte, .yeux:focus-visible .yeux-carte { transform: rotateY(180deg); }
.yeux-face { display: block; -webkit-backface-visibility: hidden; backface-visibility: hidden; transition: opacity 0.05s linear 0.12s; }
.yeux:hover .yeux-recto, .yeux:focus-visible .yeux-recto { opacity: 0; }
.yeux-nom {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  transform: rotateY(180deg); opacity: 0;
  /* même lettre que la colonne en dessous (Archivo large) */
  font-family: var(--large); font-weight: 500; font-stretch: 112%; font-size: 0.78rem; line-height: 1.15;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.yeux:hover .yeux-nom, .yeux:focus-visible .yeux-nom { opacity: 1; }
.oeil { transform-box: fill-box; transform-origin: center; }
.yeux.cligne .oeil { animation: cligner 0.18s ease-in-out; }
@keyframes cligner { 50% { transform: scaleY(0.08); } }
/* Navigation verticale en bas à gauche, sous la colonne ; au survol, le mot roule (sa copie,
   juste à côté, prend sa place) */
.nav-verticale { position: fixed; left: var(--marge); bottom: 24px; z-index: 40; }
.nav-verticale ul {
  display: flex; flex-direction: column; gap: 14px;
  list-style: none; margin: 0; padding: 0;
}
/* le lien déborde de 13px tout autour (zone de clic de 44px), le mot
   roule à l'intérieur de .roule, seule partie qui coupe */
.nav-verticale a { display: inline-block; padding: 13px; margin: -13px; white-space: nowrap; }
.roule { display: block; overflow: hidden; }
.roule > span { display: block; position: relative; transition: transform 0.45s var(--courbe); }
.roule > span::after {
  content: attr(data-texte); position: absolute; inset-block-start: 100%; inset-inline-start: 0;
}
.nav-verticale a:hover .roule > span { transform: translateY(-100%); }
.nav-verticale { color: var(--encre-fixe, var(--noir)); transition: color 0.4s, opacity 0.6s ease; }

/* ---------- L'intro (js/express-intro.js) ----------
   Ses yeux en grand au milieu, sur le fond ; le logo, la colonne et le
   menu attendent cachés, puis apparaissent quand les yeux les rejoignent. */
.intro {
  position: fixed; inset: 0; z-index: 45; display: grid; place-items: center;
  background: var(--fond); pointer-events: none;
}
.intro svg { width: min(52vw, 320px); height: auto; overflow: visible; transform-origin: 50% 50%; animation: intro-arrivee 0.5s var(--courbe) both; }
.intro .iris { transition: transform 0.35s var(--courbe); }
.intro .oeil { transform-box: fill-box; transform-origin: center; }
.intro.cligne .oeil { animation: cligner 0.18s ease-in-out; }
@keyframes intro-arrivee { from { transform: scale(0.6) translateY(12px); } }
.intro-en-cours { overflow: hidden; }
.intro-en-cours .yeux, .intro-en-cours .colonne, .intro-en-cours .nav-verticale { opacity: 0; }

/* ---------- La colonne : ses mots, à l'horizontale, sous le logo ----------
   Nom, puis métier (une ligne par mot) ; elle accompagne la visite et
   change de mots selon la section (js/express.js). */
.colonne {
  position: fixed; left: var(--marge); top: 84px; z-index: 30; pointer-events: none;
  display: flex; flex-direction: column; gap: 0.15em;
  font-family: var(--large); font-weight: 500; font-stretch: 112%;
  font-size: clamp(0.8rem, 1.9vh, 1.15rem); line-height: 1.25;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  color: var(--blanc);
  transition: color 0.4s, opacity 0.6s ease 0.1s;
}
.colonne-mot { display: block; transition: opacity 0.22s ease, transform 0.22s ease; }
.colonne-mot:empty { display: none; }
/* ordre de lecture : c (nom), b, d (métier) */
.colonne-mot[data-place="c"] { order: 1; }
.colonne-mot[data-place="b"] { order: 2; }
.colonne-mot[data-place="d"] { order: 3; }
.colonne-mot[data-place="a"], .colonne-mot[data-place="e"] { order: 4; }
.colonne-mot.change { opacity: 0; transform: translateY(0.4em); }

/* ---------- Accueil : le trousseau ----------
   Le crochet est vissé au mur, l'anneau y pend, les porte-clés pendent à
   l'anneau (js/express-trousseau.js place et fait balancer le tout ; --u =
   1 % de la hauteur de la scène). Sous le trousseau : la légende du
   porte-clé survolé, et le sommaire des projets. */
.trousseau { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.trousseau-scene { position: absolute; inset: 0 0 13% 0; }
.trousseau-crochet {
  position: absolute; z-index: 1; height: calc(var(--u) * 11); width: auto; pointer-events: none;
  /* point d'appui : le fond du creux, derrière la pointe (images/porte-cles/crochet.webp, vu de face) */
  transform: translate(-50.6%, -88.5%);
  filter: drop-shadow(2px 5px 4px rgba(0, 0, 0, 0.25));
}
/* la pointe (crochet-devant.webp : la même image, pointe seule), par-dessus l'anneau */
.trousseau-crochet.devant { z-index: 41; filter: drop-shadow(1px 3px 2px rgba(0, 0, 0, 0.3)); }
.trousseau-chaines, .trousseau-tours { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.trousseau-tours { z-index: 40; } /* les tours de fil, devant l'anneau (placés après lui) */
.trousseau-anneau { position: absolute; left: 0; top: 0; z-index: 40; will-change: transform; pointer-events: none; }
.anneau-metal {
  position: absolute; pointer-events: none; height: auto;
  filter: drop-shadow(2px 5px 4px rgba(0, 0, 0, 0.2));
}
.breloques { list-style: none; margin: 0; padding: 0; }
.breloque { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.breloque.tenue { z-index: 50 !important; } /* celui qu'on tient passe devant l'anneau */
.breloque-objet {
  position: absolute; left: 0; top: 0; display: block; padding: 0; border: 0; background: none;
  transform-origin: 0 0; will-change: transform; cursor: grab; touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.breloque.tenue .breloque-objet { cursor: grabbing; }
.breloque-tours { position: absolute; pointer-events: none; } /* les tours de fil autour du piton */
.breloque-objet img {
  display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(calc(var(--u) * 0.6) calc(var(--u) * 1.6) calc(var(--u) * 1.2) rgba(40, 36, 30, 0.28));
  transform-origin: 50% 0; transition: transform 0.6s var(--courbe), filter 0.6s;
}
.breloque-objet:hover img, .breloque-objet:focus-visible img {
  transform: scale(1.025);
  filter: drop-shadow(calc(var(--u) * 0.75) calc(var(--u) * 2) calc(var(--u) * 1.4) rgba(40, 36, 30, 0.29)) brightness(1.02);
}
.breloque-objet:focus-visible { outline: 2px dashed var(--noir); outline-offset: 6px; border-radius: 12px; }

/* ses yeux fermés, le temps d'un clignement : sans ombre (elle est déjà sur
   l'image), et grossit avec elle au survol (transform-origin posé en JS) */
.breloque-objet .breloque-paupieres { position: absolute; opacity: 0; pointer-events: none; filter: none; }
.breloque-objet:hover .breloque-paupieres, .breloque-objet:focus-visible .breloque-paupieres { filter: none; }
.breloque-objet .breloque-bouche { transition: opacity 0.05s; } /* sa bouche quand elle parle */

/* sa bulle quand elle parle (js/express.js, parler) : en lin brodé comme
   l'enveloppe (coudreBulle : forme, lin et couture en SVG derrière le
   texte), posée en JS à côté de sa tête, la pointe vers elle.
   z-index 44 : devant l'anneau, ses tours de fil et la pointe du crochet
   (40-41 ; au téléphone elle les chevauche) ; elle disparaît au premier
   clic, donc jamais en même temps qu'un volet. */
.bulle {
  position: fixed; left: 0; top: 0; z-index: 44; margin: 0; width: 14rem; isolation: isolate;
  padding: 0.95rem 1.15rem 1rem; color: #2b1d17; font-size: 0.9rem; line-height: 1.35;
  pointer-events: none; filter: drop-shadow(0 5px 7px rgba(40, 36, 30, 0.22));
  opacity: 0; scale: 0.85; transform-origin: 0 100%; transition: opacity 0.3s, scale 0.35s var(--courbe);
}
.bulle.a-gauche { transform-origin: 100% 100%; }
.bulle.visible { opacity: 1; scale: 1; }
.bulle-fond { position: absolute; left: 0; top: 0; z-index: -1; overflow: visible; }
.bulle.a-gauche .bulle-fond { transform: scaleX(-1); } /* la pointe passe à droite */
.bulle-nom {
  display: block; margin-bottom: 0.2rem; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: #6e1f30;
}
.bulle-texte { display: block; }
/* la bulle photographiée : le texte dans la toile, entre les points de
   couture (zone mesurée sur bulle.webp), imprimé (multiply : la trame passe) */
/* texte centré dans le corps de la bulle (au-dessus de la pointe, qui
   occupe le bas : ~23 % de la hauteur) */
.bulle.tissu {
  width: 15.5rem; aspect-ratio: 640 / 514; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0.9rem 1.8rem 3.4rem 1.9rem; font-size: 0.98rem;
  /* plus de profondeur : une ombre proche et nette, une autre large et douce,
     comme les porte-clés (lumière venant du haut à gauche) */
  filter: drop-shadow(3px 7px 4px rgba(35, 25, 20, 0.45)) drop-shadow(12px 26px 16px rgba(35, 25, 20, 0.4));
} /* (pas de % : en position fixed, il vaudrait celui de l'écran) */
.bulle.tissu .bulle-fond { width: 100%; height: 100%; }
.bulle.tissu .bulle-nom, .bulle.tissu .bulle-texte { mix-blend-mode: multiply; }
.bulle.tissu .bulle-texte { color: #3d1520; font-weight: 500; }
.bulle.tissu.a-gauche { transform-origin: 100% 100%; }
.bulle-reste { color: transparent; }
/* au téléphone : plus petite, à côté de sa tête sans sortir de l'écran */
@media (max-width: 760px) {
  .bulle.tissu { width: 10.5rem; padding: 0.6rem 1.2rem 2.3rem 1.3rem; font-size: 0.78rem; line-height: 1.3; }
  .bulle.tissu .bulle-nom { font-size: 0.56rem; margin-bottom: 0.1rem; }
}

/* la légende : où mène le porte-clé survolé */
.trousseau-legende {
  position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); margin: 0;
  width: min(90vw, 900px); text-align: center; pointer-events: none;
}
.legende-sur {
  display: block; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gris);
}
.legende-titre {
  display: block; min-height: 1em;
  font-family: var(--large); font-weight: 800; font-stretch: 125%; text-transform: uppercase;
  font-size: clamp(1.6rem, 4.6vw, 3.6rem); line-height: 1; color: var(--noir);
}
.legende-titre:not(:empty) { animation: legende 0.45s var(--courbe); }
@keyframes legende { from { opacity: 0; transform: translateY(0.25em); } }

/* les projets : le porte-clé dossier grandit (js/express.js, sortirFiches)
   et ses fiches en remontent, en éventail. Le dossier est fait de deux
   calques de la même image : son dos, puis son rabat avant (découpé) ; les
   fiches sont glissées entre les deux. --hd : hauteur du grand dossier. */
.trousseau-sommaire { position: absolute; inset: 0; z-index: 45; pointer-events: none; visibility: hidden; }
.trousseau-sommaire.ouvert { visibility: visible; }
.trousseau-sommaire-titre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.grand-dossier {
  --hd: min(54vh, 520px);
  position: absolute; left: calc(50% - var(--hd) * 0.566); top: calc(50% - var(--hd) * 0.22);
  height: var(--hd); aspect-ratio: 1019 / 900; will-change: transform;
}
.dossier-dos, .dossier-dos img, .dossier-devant, .dossier-devant img { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.dossier-dos { filter: drop-shadow(0 calc(var(--hd) * 0.03) calc(var(--hd) * 0.035) rgba(40, 36, 30, 0.28)); }
.dossier-devant { z-index: 3; pointer-events: none; filter: drop-shadow(0 calc(var(--hd) * -0.006) calc(var(--hd) * 0.012) rgba(40, 36, 30, 0.3)); }
/* le rabat avant, détouré dans l'image (images/porte-cles/dossier.webp) */
.dossier-devant img { clip-path: polygon(2.6% 34.5%, 4.7% 32.2%, 31.8% 32.2%, 34.2% 28.6%, 36.8% 27.2%, 94% 26.8%, 95.6% 28.6%, 96% 96%, 94% 98.6%, 4.2% 98.6%, 2.5% 96%); }
/* son nom, comme gaufré sur le rabat */
.dossier-etiquette {
  position: absolute; z-index: 4; left: 12%; bottom: 13%; pointer-events: none;
  font-family: var(--large); font-weight: 800; font-stretch: 125%; text-transform: uppercase;
  font-size: calc(var(--hd) * 0.062); letter-spacing: 0.02em; line-height: 1;
  color: rgba(120, 88, 34, 0.5); text-shadow: 0 1px 0 rgba(255, 246, 220, 0.5), 0 -1px 0 rgba(90, 62, 20, 0.25);
}
/* les fiches : des intercalaires rangés dans le dossier, dont seuls les
   onglets (avec le nom du projet) dépassent, côte à côte. On attrape un
   onglet et on tire la fiche vers le haut (js/express.js, tirerFiche). */
.grand-dossier ol {
  position: absolute; inset: 0; z-index: 2; list-style: none; margin: 0; padding: 0;
  /* rien ne dépasse sur les côtés ni sous le dossier */
  clip-path: inset(-300% 5% 2% 3.2%);
}
/* --x (place de l'onglet) et top (sa rangée) : posés par js/express.js */
.grand-dossier li { --x: 0%; position: absolute; left: 5.2%; width: 88%; top: 27.5%; height: 66%; pointer-events: none; will-change: transform; }
.grand-dossier li.tiree { z-index: 5; }
.grand-dossier button {
  position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 3px;
  background: var(--blanc); color: var(--noir); font: inherit; text-align: left; cursor: grab; pointer-events: auto;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05), 0 -3px 10px rgba(40, 36, 30, 0.1);
  touch-action: none; -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s var(--courbe);
}
.grand-dossier li.tiree button { cursor: grabbing; }
/* l'onglet, qui dépasse en haut de la fiche */
.sommaire-nom {
  position: absolute; bottom: calc(100% - 1px); left: var(--x); width: 32%; height: calc(var(--hd) * 0.13);
  padding: calc(var(--hd) * 0.022) calc(var(--hd) * 0.02) 0; border-radius: calc(var(--hd) * 0.016) calc(var(--hd) * 0.016) 0 0;
  background: var(--blanc); box-shadow: 0 -3px 8px rgba(40, 36, 30, 0.1);
  font-family: var(--large); font-weight: 800; text-transform: uppercase;
  font-size: calc(var(--hd) * 0.024); line-height: 1.15; transition: color 0.3s;
}
/* au survol, la fiche remonte un peu : elle invite à la tirer */
.grand-dossier li:not(.tiree) button:hover, .grand-dossier button:focus-visible { transform: translateY(-4%); }
.grand-dossier button:hover .sommaire-nom, .grand-dossier li.tiree .sommaire-nom { color: var(--accent); }
.grand-dossier button:focus { outline: none; }
.grand-dossier button:focus-visible .sommaire-nom { outline: 2px dashed var(--accent); outline-offset: 3px; }
/* la consigne, sous le dossier */
.dossier-aide {
  position: absolute; left: 0; right: 0; top: calc(100% + 14px); text-align: center; pointer-events: none;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gris);
}
.dossier-aide.appel { animation: aide 0.9s var(--courbe); }
@keyframes aide { 30% { color: var(--accent); transform: translateY(-3px); } }
/* les autres porte-clés sont tombés ; le petit dossier, devenu grand, est caché */
.breloque.en-grand { visibility: hidden; }
/* et le crochet, l'anneau et les chaînes s'effacent : il ne reste que le dossier */
.fiches-ouvertes .trousseau-scene { opacity: 0; pointer-events: none; transition: opacity 0.5s 0.2s; }
.fiches-ouvertes .trousseau-legende { opacity: 0; }
.trousseau-legende { transition: opacity 0.3s; }
/* tout en bas, au milieu : sa signature */
.signature {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0;
  font-family: var(--large); font-weight: 500; font-stretch: 112%; font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: var(--gris);
  pointer-events: none; transition: opacity 0.3s;
}
.fiches-ouvertes .signature, .volet-ouvert .signature { opacity: 0; }
/* au téléphone : la signature tout en bas, le bouton « Secoue ton téléphone » juste au-dessus */
@media (max-width: 760px) {
  .signature { font-size: 0.58rem; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  body .secousse-bouton { bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Les volets (À propos, Contact) ----------
   Fixés par-dessus l'accueil, sous le logo, la colonne et le menu ; si le
   contenu dépasse (petit écran), il défile à l'intérieur du volet. */
.volet {
  position: fixed; inset: 0; z-index: 25; overflow-y: auto; overscroll-behavior: contain;
  background: var(--fond);
  opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: opacity 0.35s ease, transform 0.45s var(--courbe), visibility 0s 0.45s;
}
.volet:focus { outline: none; } /* l'arrivée par #ancre le cible : pas de cadre */
.volet.ouvert { opacity: 1; visibility: visible; transform: none; transition: opacity 0.35s ease, transform 0.45s var(--courbe); }
.volet-fermer {
  position: fixed; top: 18px; right: var(--marge); z-index: 2;
  width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer;
  font-size: 1.3rem; line-height: 1; transition: color 0.2s, transform 0.3s var(--courbe);
}
.volet-fermer:hover { color: var(--accent); transform: rotate(90deg); }

/* Volet ouvert : il ne reste que le logo (qui ramène à l'accueil) ; le nom,
   le métier et le menu s'effacent vers la gauche */
.colonne, .nav-verticale { transition: color 0.4s, opacity 0.45s ease, transform 0.55s var(--courbe), visibility 0s; }
.volet-ouvert .colonne, .volet-ouvert .nav-verticale {
  opacity: 0; visibility: hidden; transform: translateX(-24px);
  transition: color 0.4s, opacity 0.3s ease, transform 0.45s var(--courbe), visibility 0s 0.45s;
}

/* Volet de côté (GitHub) : il prend la droite, le trousseau (ce qu'il en
   reste) se range à gauche */
.volet-cote { left: 44vw; transform: translateX(40px); background: transparent; }
/* fond transparent : le porte-clé qui se balance passe sous le texte sans
   être coupé ; le volet laisse passer la souris, seul son contenu la prend */
@media (min-width: 761px) {
  .volet-cote { pointer-events: none; }
  .volet-cote.ouvert > * { pointer-events: auto; }
}
.volet-cote.ouvert { transform: none; }
.trousseau-scene { transition: transform 0.9s var(--courbe), opacity 0.5s; }
.trousseau-de-cote .trousseau-scene { transform: translateX(-28vw); } /* centré dans la place laissée à gauche du volet (0 à 44vw) */
.trousseau-de-cote .trousseau-legende, .trousseau-de-cote .trousseau-sommaire { opacity: 0; visibility: hidden; }
.breloque.decroche { pointer-events: none; }
/* À propos : le trousseau s'efface, son coin est seul au milieu */
.trousseau-cache .trousseau-scene { opacity: 0; visibility: hidden; transition: transform 0.9s var(--courbe), opacity 0.4s, visibility 0s 0.4s; }
.volet-cote.apropos { left: 0; }
.breloque.partie { visibility: hidden; }

/* ---------- GitHub ---------- */
.github { padding: clamp(60px, 10vh, 120px) calc(var(--marge) + 50px) 48px 0; }
.github h2 {
  margin: 0; font-family: var(--large); font-weight: 800; font-stretch: 125%;
  font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1; text-transform: uppercase;
}
/* le titre, et à côté le nombre de dépôts et de langages */
.github-tete { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px clamp(28px, 4vw, 56px); }
.github-intro { margin: 14px 0 0; color: var(--gris); white-space: nowrap; }
.github-chiffres { display: flex; gap: 32px; margin: 0 0 4px; }
.github-chiffres div { display: flex; flex-direction: column-reverse; }
.github-chiffres dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--gris); }
.github-chiffres dd { margin: 0; font-family: var(--large); font-weight: 700; font-stretch: 115%; font-size: 1.8rem; line-height: 1.1; }
/* les langages : nom en lettres larges, pointillés, part (le premier en corail) */
.github-langages ol { list-style: none; margin: 26px 0 0; padding: 0; max-width: 520px; }
.github-langages li {
  display: flex; align-items: baseline; gap: 10px; padding: 3px 0;
  font-family: var(--large); font-weight: 600; font-stretch: 118%;
  font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.github-langages li:first-child { color: var(--accent); }
.github-langages .points { flex: 1; border-bottom: 1.5px dotted currentColor; opacity: 0.45; transform: translateY(-4px); }
.github-langages .part { font-variant-numeric: tabular-nums; }
.github-depots { list-style: none; margin: 34px 0 0; padding: 0; border-top: 1px solid var(--trait); }
.github-depots a {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 14px 0;
  border-bottom: 1px solid var(--trait); text-decoration: none;
}
.github-depots .nom { font-weight: 600; font-size: 1.05rem; transition: color 0.2s; }
.github-depots .techno { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gris); align-self: center; }
.github-depots .resume { grid-column: 1 / -1; font-size: 0.9rem; color: var(--gris); }
.github-depots a:hover .nom { color: var(--accent); }
.github-depots a:hover .nom::after { content: " ↗"; }
.github-tout {
  display: inline-block; margin-top: 28px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.16em;
  text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
}
.github-tout:hover { color: var(--accent); }

/* ---------- CV (mise en page du CV lui-même : css/cv.css) ---------- */
.cv { padding: clamp(60px, 10vh, 120px) calc(var(--marge) + 50px) 48px 0; font-size: 0.95rem; }
.cv-entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 34px; }
.cv h2 {
  margin: 0; font-family: var(--large); font-weight: 800; font-stretch: 125%;
  font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1; text-transform: uppercase;
}
.cv-sous-titre { margin: 12px 0 0; color: var(--gris); }
.cv-telecharger { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }

/* ---------- À propos : son coin (volet de côté) ----------
   Un tableau en liège et une étagère en laiton (images/atelier/) ; chaque
   objet est un bouton qui vient en grand avec son texte (js/express.js).
   La scène garde ses proportions (--l : sa largeur) ; tout y est en %. */
.apropos {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(28px, 5vh, 60px) var(--marge) clamp(50px, 10vh, 110px);
}
.apropos h2 {
  margin: 0; font-family: var(--large); font-weight: 800; font-stretch: 125%;
  font-size: clamp(1.6rem, 3.2vw, 2.8rem); line-height: 1; text-transform: uppercase;
}
.atelier-consigne { margin: 8px 0 0; color: var(--gris); font-size: 0.85rem; }
.cache-visuel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.atelier {
  --l: min(100%, 880px, calc((100vh - 230px) / 0.7));
  position: relative; width: var(--l); aspect-ratio: 100 / 70; margin-top: clamp(14px, 3vh, 30px);
  container-type: inline-size; /* (cqw : punaises et mots, à l'échelle de la scène) */
}
.atelier-tableau {
  position: absolute; left: 7%; top: 0; width: 86%; aspect-ratio: 1100 / 773;
  /* (plus de tableau en liège : tout est punaisé au mur, sur le gris de la
     page ; l'image images/atelier/tableau.webp reste si on y revient) */
}
.atelier-etagere {
  position: absolute; left: 0; top: 72.9%; width: 100%; height: auto; pointer-events: none; user-select: none;
  /* son ombre portée sur le mur, sous la planche et les consoles */
  filter: drop-shadow(0 6px 4px rgba(25, 15, 10, 0.55)) drop-shadow(8px 36px 22px rgba(25, 15, 10, 0.55));
}
/* un objet : posé sur l'étagère (bas sur la planche) ou punaisé au tableau
   (centre à x, y) ; --r : son inclinaison */
.atelier-objet {
  --r: 0deg; --leve: 0%;
  position: absolute; display: block; padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-50%, var(--ty, -50%)) translateY(var(--leve)) rotate(var(--r));
  transition: transform 0.35s var(--courbe), filter 0.35s;
  filter: drop-shadow(2px 5px 4px rgba(40, 30, 24, 0.3));
  -webkit-tap-highlight-color: transparent;
}
.atelier-objet img.atelier-image { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.atelier-objet.etagere { --ty: -100%; } /* son bas sur la planche */
/* posés sur la planche : une ombre serrée au contact, une plus douce derrière */
.atelier-objet.etagere { filter: drop-shadow(0 2px 1px rgba(20, 10, 5, 0.8)) drop-shadow(2px 4px 3px rgba(20, 10, 5, 0.55)) drop-shadow(6px 10px 10px rgba(20, 10, 5, 0.3)); }
.atelier-objet.etagere:hover, .atelier-objet.etagere:focus-visible { filter: drop-shadow(0 6px 4px rgba(25, 15, 10, 0.35)) drop-shadow(5px 16px 12px rgba(25, 15, 10, 0.3)); }
.atelier-objet:hover, .atelier-objet:focus-visible {
  --leve: -4%; filter: drop-shadow(5px 14px 10px rgba(40, 30, 24, 0.32));
}
.atelier-objet.tableau:hover, .atelier-objet.tableau:focus-visible { --leve: -2%; --r: 0deg; }
.atelier-objet:focus-visible { outline: 2px dashed var(--noir); outline-offset: 6px; border-radius: 8px; }
.atelier-objet.en-grand { visibility: hidden; }
/* sur l'étagère : on peut les attraper (touch-action : le doigt les déplace au lieu de faire défiler) */
.atelier-objet.etagere { cursor: grab; touch-action: none; }
.atelier-objet.etagere.tenu {
  --leve: 0%; z-index: 2; cursor: grabbing; transition: transform 0.15s, filter 0.2s;
  filter: drop-shadow(4px 18px 10px rgba(25, 15, 10, 0.3)) drop-shadow(10px 34px 22px rgba(25, 15, 10, 0.22));
}
.atelier-objet.etagere.tenu::after { display: none; } /* (sa copie est dans la fiche) */
/* la punaise, plantée dans l'objet ; son ombre tombe sur lui */
.atelier-punaise {
  position: absolute; width: 4.2cqw; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: url("../images/atelier/punaise.webp") center / contain no-repeat; pointer-events: none;
  filter: drop-shadow(1px 3px 2px rgba(30, 20, 15, 0.45));
}
/* ce qui est écrit dessus (badge, carte, étiquette), imprimé */
.atelier-mot {
  position: absolute; transform: translate(-50%, -50%); width: 86%; text-align: center; pointer-events: none;
  font-family: var(--large); font-weight: 800; font-stretch: 118%; text-transform: uppercase; letter-spacing: 0.04em;
  color: #2b1d17; mix-blend-mode: multiply; line-height: 1;
}
.atelier-objet.accent .atelier-mot { color: #3d0f08; }

/* en grand : l'objet au premier plan, sa carte en lin à côté */
.atelier-detail {
  position: fixed; inset: 0; z-index: 32; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center; gap: clamp(16px, 3vw, 44px); padding: 8vh max(var(--marge), 12vw);
  background: rgba(201, 201, 199, 0.86); backdrop-filter: blur(3px);
}
.atelier-detail[hidden] { display: none; }
.atelier-detail-image {
  justify-self: center; max-width: 100%; max-height: 62vh; width: auto; height: auto;
  filter: drop-shadow(6px 18px 16px rgba(40, 30, 24, 0.35));
}
.atelier-carte {
  position: relative; padding: 30px 34px 32px; border-radius: 14px; color: #2b1d17; text-align: left; max-width: 30rem;
  background: url("../images/porte-cles/lin.webp") 0 0 / 120px 200px;
  outline: 2px dashed #6e1f30; outline-offset: -10px;
  box-shadow: 0 2px 3px rgba(40, 30, 24, 0.25), 6px 18px 26px rgba(40, 30, 24, 0.3);
}
.atelier-carte-sur { margin: 0 0 6px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #6e1f30; }
.atelier-carte h3 {
  margin: 0; font-family: var(--large); font-weight: 800; font-stretch: 120%; text-transform: uppercase;
  font-size: clamp(1.3rem, 2.2vw, 2rem); line-height: 1.05;
}
.atelier-carte-texte { margin: 14px 0 0; font-size: clamp(0.95rem, 1.15vw, 1.08rem); line-height: 1.6; }
.atelier-carte-texte small { display: block; margin-bottom: 8px; color: #6e1f30; font-size: 0.85em; font-weight: 600; }
.atelier-detail-fermer {
  position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; background: none;
  font: inherit; font-size: 1rem; color: #2b1d17; cursor: pointer;
}
.atelier-detail.accent .atelier-carte-sur { color: var(--accent-texte); }

/* ---------- Un projet : volet de côté, comme GitHub et le CV ---------- */
.projet { padding: clamp(60px, 10vh, 120px) calc(var(--marge) + 50px) 48px 0; }
/* les projets, en haut : le courant en corail */
.projet-nav ol { display: flex; flex-wrap: wrap; gap: 6px 26px; list-style: none; margin: 0 0 clamp(26px, 5vh, 48px); padding: 0; }
.projet-nav button {
  display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border: 0; background: none; color: var(--gris); cursor: pointer;
  font: inherit; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: color 0.2s, background-size 0.3s;
}
.projet-nav .num { font-variant-numeric: tabular-nums; opacity: 0.6; }
.projet-nav button:hover { color: var(--noir); background-size: 100% 1px; }
.projet-nav button[aria-current] { color: var(--accent); background-size: 100% 1px; }
.projet-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px clamp(20px, 3vw, 40px); }
.projet h2 {
  margin: 0; font-family: var(--large); font-weight: 800; font-stretch: 125%;
  font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1; text-transform: uppercase; overflow-wrap: anywhere;
}
.projet-cat { margin: 0; color: var(--gris); }
.projet-resume { margin: 14px 0 0; color: var(--gris); }
.projet-texte { margin-top: 26px; max-width: 62ch; }
.projet-texte p { margin: 0 0 14px; font-size: clamp(1rem, 1.25vw, 1.12rem); line-height: 1.6; }
.projet-bloc h3 {
  margin: 0 0 4px; font-family: var(--large); font-weight: 700; font-stretch: 118%;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.projet-bloc + .projet-bloc { margin-top: 18px; }
/* le parcours : les écrans côte à côte, numérotés, légende dessous */
.projet-parcours {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 14px;
  list-style: none; margin: 18px 0 0; padding: 0;
}
.projet-parcours img { display: block; width: 100%; height: auto; border-radius: 14px; }
.projet-parcours .legende { margin-top: 10px; }
.projet-parcours .num { display: block; font-size: 0.72rem; letter-spacing: 0.16em; color: var(--accent); }
.projet-parcours strong {
  display: block; margin: 2px 0 4px; font-family: var(--large); font-weight: 700; font-stretch: 118%;
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.projet-parcours p { margin: 0; font-size: 0.85rem; line-height: 1.45; color: var(--gris); }
/* rôle … valeur, en pointillés comme les langages de GitHub */
.projet-infos { margin: 18px 0 0; max-width: 560px; }
.projet-infos div { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; }
.projet-infos dt { flex: none; font-size: 0.72rem; letter-spacing: 0.16em; color: var(--gris); }
.projet-infos .points { flex: 1; min-width: 20px; border-bottom: 1.5px dotted currentColor; opacity: 0.45; transform: translateY(-4px); }
.projet-infos dd { margin: 0; text-align: right; font-weight: 600; }
.projet-liens { margin: 18px 0 0; }
.projet-liens a { margin-right: 18px; font-weight: 600; color: var(--accent-texte); }
.projet-ecrans { display: grid; gap: 14px; margin: 18px 0 0; }
.projet-ecrans img { display: block; width: 100%; height: auto; }
/* deux par ligne (le grand, en tête, prend toute la largeur) ; un clic les ouvre en grand */
.projet-ecrans:not(.telephones) { grid-template-columns: 1fr 1fr; gap: 12px; }
.projet-ecran {
  display: block; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden;
  transition: transform 0.3s var(--courbe), box-shadow 0.3s;
}
.projet-ecran.grand { grid-column: 1 / -1; }
.projet-ecran.telephone { justify-self: center; }
.projet-ecran:hover, .projet-ecran:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18); }
.projet-ecran:focus-visible { outline: 2px dashed var(--noir); outline-offset: 4px; }

/* la loupe : une maquette en grand, par-dessus tout */
.loupe {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: 6vh 9vw; background: rgba(24, 20, 18, 0.9);
}
.loupe[hidden] { display: none; }
.loupe-image { max-width: 100%; max-height: 86vh; width: auto; height: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); user-select: none; }
.loupe-fermer, .loupe-fleche {
  position: absolute; border: 0; background: none; color: #f3f1ed; font: inherit; cursor: pointer;
  width: 48px; height: 48px; font-size: 1.3rem; border-radius: 50%; transition: background 0.2s;
}
.loupe-fermer:hover, .loupe-fleche:hover { background: rgba(255, 255, 255, 0.12); }
.loupe-fermer:focus-visible, .loupe-fleche:focus-visible { outline: 2px dashed #f3f1ed; outline-offset: 2px; }
.loupe-fermer { top: 18px; right: 22px; }
.loupe-fleche { top: 50%; transform: translateY(-50%); font-size: 1.6rem; }
.loupe-prec { left: 2vw; }
.loupe-suiv { right: 2vw; }
.loupe-compte { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center; color: #c9c4bc; font-size: 0.8rem; letter-spacing: 0.12em; }
.projet-ecrans img.est-telephone { width: min(60%, 280px); justify-self: center; }
.projet-ecrans.telephones { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.projet-ecrans.telephones img.est-telephone { width: 100%; border-radius: 14px; }
.projet-suivant {
  display: flex; flex-direction: column; gap: 4px; margin: 40px 0 0; padding: 16px 0 0; width: 100%;
  border: 0; border-top: 1px solid var(--trait); background: none; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.projet-suivant span { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gris); }
.projet-suivant strong {
  font-family: var(--large); font-weight: 800; font-stretch: 118%; font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  text-transform: uppercase; transition: color 0.2s;
}
.projet-suivant:hover strong { color: var(--accent); }

/* ---------- Contact ---------- */
.contact {
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px calc(var(--marge) + 70px) 0; text-align: center;
}
.contact h2 {
  margin: 0;
  font-family: var(--large); font-weight: 800; font-stretch: 125%;
  font-size: clamp(2.2rem, 7vw, 6.5rem); line-height: 0.95; text-transform: uppercase;
}
.contact h2 em { font-style: normal; display: block; }
.contact-ligne { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 22px; margin-top: 44px; }
.email {
  display: inline-block;
  font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 600; text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--noir), var(--noir)) left bottom / 100% 2px no-repeat;
  transition: color 0.25s;
}
.email:hover { color: var(--accent); }
.copie-ok { font-size: 0.85rem; color: var(--gris); }
.liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; list-style: none; margin: 36px 0 0; padding: 0; }
.liens a {
  text-decoration: none; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.3s;
}
.liens a:hover { background-size: 100% 1px; }

/* ---------- Pied ---------- */
.pied {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; align-items: center;
  margin-top: auto; padding: 60px 0 24px; font-size: 0.8rem; color: var(--gris);
}
.contact .liens { margin-bottom: 0; }
.contact h2 { margin-top: auto; }
.pied a:hover { color: var(--accent); }

/* Hors Halloween, la version jeu est cachée : plus de lien vers elle
   (js/saison.js pose la classe sur <html>) */
.saison-fermee .lien-jeu { display: none; }

/* ---------- Petits écrans ---------- */
@media (max-width: 760px) {
  /* trop étroit pour une colonne fixe : nom et menu restent sur l'accueil */
  .colonne { position: absolute; font-size: 0.72rem; top: 70px; }
  /* pas de menu au téléphone (son choix) : les porte-clés y mènent */
  .nav-verticale { display: none; }
  .contact { padding-left: var(--marge); padding-right: var(--marge); }
  /* au téléphone, le volet couvre tout (nom et menu compris) */
  .volet { z-index: 42; }
  .volet-cote { left: 0; background: var(--fond); }
  .github { padding: 70px var(--marge) 40px; }
  .github-intro { white-space: normal; }
  .cv { padding: 70px var(--marge) 40px; }
  .apropos { padding: 70px var(--marge) 40px; }
  /* le titre et la consigne restent en haut (comme les autres volets),
     le coin est centré dessous (marges auto : si ça dépasse, rien n'est coupé) */
  .apropos .atelier { margin-top: auto; margin-bottom: auto; }
  .atelier { --l: 100%; }
  .atelier-detail { inset: 0; grid-template-columns: 1fr; align-content: center; padding: 70px var(--marge) 30px; }
  .atelier-detail-image { max-height: 34vh; }
  .projet { padding: 70px var(--marge) 40px; }
  .projet-ecrans.telephones { grid-template-columns: repeat(2, 1fr); }
  .projet-parcours { grid-template-columns: repeat(2, 1fr); }
  .faire { grid-template-columns: 1fr; gap: 16px; }
  .trousseau-de-cote .trousseau-scene { transform: none; }
  /* trousseau : le sommaire passe sous la légende */
  .trousseau-scene { bottom: 22%; }
  .trousseau-legende { bottom: 13%; }
  /* au téléphone : le grand dossier se pose au milieu, au-dessus du menu
     (100svh - 150px) */
  .grand-dossier { --hd: min(44svh, 82vw); right: auto; top: auto; left: calc(50% - var(--hd) * 0.566); bottom: 165px; }
}



/* iPhone : le bouton qui demande l'accès aux mouvements (js/express-secousse.js) */
.secousse-bouton {
  position: fixed; z-index: 20;
  right: var(--marge); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  padding: 9px 14px; border: 1px solid var(--trait); border-radius: 999px;
  background: var(--blanc); color: var(--noir);
  font: 500 0.72rem/1 var(--police); letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; transition: opacity 0.4s;
}
.secousse-bouton span { color: var(--accent); margin-left: 4px; }
.volet-ouvert .secousse-bouton { opacity: 0; pointer-events: none; }
