/* ---------- Réglages ---------- */
:root {
  --wall: #eeeeec;
  --ink: #2a2a28;
  --muted: #7a7a74;
  --pencil: #66665f;
  --paper: #fbfaf6;
  --tape: rgba(255, 138, 40, .82);   /* scotch orange de l'atelier */
  --line: rgba(0, 0, 0, .1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* typo provisoire */
  --hand: "Segoe Print", "Bradley Hand", "Caveat", cursive;                       /* remplacée par l'écriture scannée */
  --ease: cubic-bezier(.65, 0, .35, 1);
  --t: .9s;
}
@media (prefers-reduced-motion: reduce) { :root { --t: .25s; } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }   /* le navigateur ne grossit pas lui-même certains textes (colonnes, blocs larges) */
body {
  background: var(--wall);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body.mode-list { overflow: auto; height: auto; }
body.about-open { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.hand { font-family: var(--hand); color: var(--pencil); }

/* ---------- Barre ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
  background: linear-gradient(var(--wall) 55%, transparent);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.brand { background: none; border: 0; padding: 0; font-weight: 700; letter-spacing: .06em; white-space: nowrap; text-transform: uppercase; }
/* l'espace où l'on est (Travaux / Atelier), en gras comme le nom, tout près ; c'est aussi le lien vers l'autre espace */
.space-name { margin-left: -16px; padding: 0; border: 0; background: none; font: inherit; font-weight: 400; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; cursor: pointer; transition: color .2s; }
.space-name:hover { color: var(--ink); }
.tools { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.tools-items { display: contents; }   /* ordinateur : les réglages dans le bandeau */
.link { background: none; border: 0; padding: 4px 0; color: var(--muted); }
.link:hover { color: var(--ink); }
.link[aria-current="true"] { color: #c8621a; }   /* rubrique affichée */
.chip {
  border: 1px solid var(--line); background: rgba(255,255,255,.55);
  border-radius: 999px; padding: 5px 13px; font-size: 13px;
  transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { background: #fff; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--wall); }
.chip.round { width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; font-size: 17px; }
.icon-btn {
  position: relative; width: 26px; height: 26px; padding: 0; display: inline-grid; place-items: center;
  border: 0; background: none; color: var(--muted);
  transition: color .2s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: var(--ink); }
.tools .menu-btn { display: none; }   /* bouton menu : téléphone seulement */
a.icon-btn[hidden] { display: none; }

/* ---------- Filtres (dans le bouton picto) ---------- */
.filter-wrap { position: relative; }
.badge {   /* simple point quand un filtre est actif */
  position: absolute; top: 2px; right: 1px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink); font-size: 0;
}
.badge[hidden] { display: none; }
.filter-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 320px;
  padding: 18px 18px 14px; background: var(--paper); border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 30px -12px rgba(0,0,0,.28);
  animation: drop .25s var(--ease);
}
.filter-panel[hidden] { display: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.filter-panel h4 { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.filter-panel .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filter-panel .chip { padding: 4px 11px; }
.filter-panel .reset { background: none; border: 0; padding: 0; font-size: 13px; color: var(--muted); text-decoration: underline; }
.filter-panel .reset:disabled { opacity: .4; cursor: default; }

/* ---------- Mur ---------- */
.viewport { position: fixed; inset: 0; overflow: hidden; cursor: grab; touch-action: none; }
.viewport, .viewport * { -webkit-user-select: none; user-select: none; }   /* glisser le mur ne sélectionne pas les textes */
/* écrans tactiles : pas de surbrillance ni de menu d'image au toucher (le « point » qui apparaissait sur iPad) */
.viewport, .viewport *, .peek-dots, .peek-dots *, .peek-btn, .desk-toggle, .space-name { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.peek-half:focus, .peek-dots button:focus { outline: none; }
.viewport.dragging { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.world.moving { will-change: transform; }

/* ---------- Atelier : un second espace sous les Travaux, on y passe par un glissement ----------
   ordinateur : le mur monte, la table arrive par en dessous ; téléphone : elle arrive par la droite.
   Le glissement est piloté par le site (voir setDesk) ; ensuite, le contenu de l'atelier prend la place du mur. */
:root { --desk: #e7e2d8; }
.scene3d { position: fixed; inset: 0; overflow: hidden; }
.hinge { position: absolute; inset: 0; }
.desk { position: absolute; left: 0; top: 100%; width: 100%; height: 100%; background: var(--desk); pointer-events: none; overflow: hidden; }
/* copie figée de l'espace qu'on quitte (le temps du glissement) ; l'espace qui arrive se prépare dans l'autre case */
.ghost-top { position: absolute; inset: 0; background: var(--wall); pointer-events: none; overflow: hidden; }
.ghost-top:empty { display: none; }
.viewport.slot-b { top: 100%; bottom: -100%; z-index: 2; }   /* l'espace qui arrive passe devant la table unie */
.desk:empty { display: none; }   /* la table unie ne sert qu'à porter la copie figée de l'atelier (au retour) */
body.atelier .viewport { background: var(--desk); }
/* atelier en construction : un mot d'attente au milieu de l'espace (visiteurs) */
.atelier-wip { display: none; position: absolute; inset: 0; z-index: 3; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; text-align: center; pointer-events: none; }
body.atelier .atelier-wip { display: flex; }
.atelier-wip strong { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.atelier-wip span { max-width: 420px; color: var(--muted); line-height: 1.5; }
/* pendant le glissement : l'ombre du mur et les commandes s'effacent ; en partant de l'atelier, ses éléments d'abord */
.amb-layer, .dock, .hint, .peek-btn, .peek-arrow, .peek-dots { transition: opacity .3s; }
body.desk-moving .amb-layer, body.desk-moving .dock, body.desk-moving .hint, body.desk-moving .peek-btn,
body.desk-moving .peek-arrow, body.desk-moving .peek-dots { opacity: 0; pointer-events: none; }
body.desk-moving .viewport { pointer-events: none; }
/* le bandeau prend le fond de l'espace (le mur, ou la table de l'atelier) */
.bar { transition: background .6s; }
body.desk-moving .bar { background: transparent; }
body.atelier .bar { background: linear-gradient(var(--desk) 55%, transparent); }
/* passage Travaux / Atelier : un lien discret, toujours au même endroit, en bas à gauche */
.desk-toggle { position: fixed; left: 24px; bottom: 20px; z-index: 25; padding: 2px 0; border: 0; background: none;
  font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; transition: color .2s, opacity .4s; }
.desk-toggle:hover { color: var(--ink); }
body.is-open .desk-toggle { opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  .desk-toggle { left: 16px; bottom: 14px; } .hint { max-width: calc(100vw - 130px); }
}

/* ---------- Éléments de l'atelier : post-it et vidéo ---------- */
.work.postit { background: var(--pi, #f7e36b) !important; padding: 0; border: 0; box-shadow: 0 1px 1px rgba(0,0,0,.1), 0 10px 12px -8px rgba(0,0,0,.32); }
/* post-it : texte simple (en attendant une typographie dessinée), dessin éventuel par-dessus le papier */
.work.postit .note { position: absolute; inset: 0; padding: 11% 10%; overflow: hidden; color: #2f2b22; line-height: 1.35;
  font-family: inherit; font-weight: 500; font-size: .92em; letter-spacing: .01em; white-space: normal; }
.work.postit .drawing { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; mix-blend-mode: multiply; pointer-events: none; }
/* texte posé directement sur la table, sans papier */
.work.postit.plain { background: transparent !important; box-shadow: none !important; }
.work.postit.plain .note { padding: 0; color: var(--ink); font-weight: 400; }
.work.video { background: #1d1d1b; }
.work.video .play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; pointer-events: none;
  color: rgba(255,255,255,.9); font-size: 2.4em; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.work.video img { opacity: .9; }
.work.video .player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 4; background: #000; }
.work.video.playing .play { display: none; }

/* ---------- Tri du mur : noms des grappes (ou chapitres sur téléphone), frise des années ---------- */
.sort-decor { position: absolute; left: 0; top: 0; pointer-events: none; }
.sd-chap { position: absolute; white-space: nowrap; font-size: 30px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  transform: scale(var(--cs, 1)); transform-origin: 0 0; }
.sd-chap::after { content: ""; display: block; width: 40px; height: 2px; margin-top: 6px; background: var(--ink); opacity: .5; }
.sd-frise { position: absolute; height: calc(var(--cs, 1) * 2px); background: var(--muted); opacity: .6; }
.sd-tick { position: absolute; padding: 10px 0 0 8px; border-left: 2px solid var(--muted); font-size: 22px; color: var(--muted);
  white-space: nowrap; transform: scale(var(--cs, 1)); transform-origin: 0 0; }
/* écran tactile : pas d'ombres d'ambiance, pas de flou derrière le dock, scotch sans fusion (moins de calculs à l'image) */
.touch .amb-layer { display: none; }
.touch .dock { backdrop-filter: none; background: rgba(255,255,255,.94); }
.touch .tape { mix-blend-mode: normal; }
/* écran tactile : les séries et les œuvres changent de place sans glisser (sinon tout le mur est redessiné à chaque
   image pendant le trajet de la caméra) ; séries estompées sans filtre gris ; ombres plus simples ; pas d'effet de survol */
.touch .world { will-change: transform; }   /* couche permanente (préparée une fois), redessinée nette à l'arrêt */
.touch .group { transition: opacity .4s; }
/* tablette tactile (iPad) : titres et infos des cartels un peu plus petits */
@media (min-width: 761px) {
  .touch .cartel strong { font-size: 24px; }
  .touch .cartel .sub { font-size: 17px; }
  .touch .cartel .meta { font-size: 15px; }
}
.touch .work, .touch .work.tucked { transition: opacity .3s; }
.touch .is-open:not(.open-single) .group:not(.open) { filter: none; opacity: .22; }
.touch .work { box-shadow: 0 1px 2px rgba(0,0,0,.16), 0 8px 12px -8px rgba(0,0,0,.28); }
.touch .work.framed { box-shadow: inset 0 3px 5px -3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.16), 0 8px 12px -8px rgba(0,0,0,.28); }
.touch .group:not(.open):hover .work { translate: none; }

.group {
  position: absolute; left: 0; top: 0; transform-origin: 0 0;   /* (échelle propre à chaque série sur téléphone) */
  transition: transform var(--t) var(--ease), translate .45s var(--ease), opacity .6s, filter .6s;   /* (translate : glissement d'un élément de groupe sous un cartel) */
  outline: none;
}
.group.out { opacity: 0; pointer-events: none; }
.is-open:not(.open-single) .group:not(.open) { opacity: .16; filter: grayscale(1); }
.group:not(.open) .works { cursor: zoom-in; }
.group:focus-visible .cartel strong { text-decoration: underline; }

.work {
  position: absolute; margin: 0;
  background: var(--paper);
  box-shadow: 0 1px 1.5px rgba(0,0,0,.14), 0 10px 18px -10px rgba(0,0,0,.28);
  transition: box-shadow .35s, translate .35s, left var(--t) var(--ease), top var(--t) var(--ease), width var(--t) var(--ease), height var(--t) var(--ease), padding var(--t), border-width var(--t), opacity .5s .25s;
}
/* œuvre non accrochée d'office : apparaît quand la série s'ouvre */
.work.tucked { opacity: 0; pointer-events: none; transition: left var(--t) var(--ease), top var(--t) var(--ease), opacity .25s; }
.work img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }   /* jamais recadrée */
.work { background: #fff; }
/* PNG détouré : ni papier ni ombre carrée ; l'ombre suit le dessin */
.work.cutout:not(.framed), .work.cutout:not(.framed):hover, .group:not(.open):hover .work.cutout:not(.framed) { background: transparent !important; box-shadow: none !important; padding: 0 !important; border-color: transparent !important; }
.work.cutout:not(.framed) img { filter: drop-shadow(0 1px 1px rgba(0,0,0,.12)) drop-shadow(0 8px 9px rgba(0,0,0,.16)); }
.group:not(.open):hover .work:not(.framed) { translate: 0 -3px; box-shadow: 0 2px 3px rgba(0,0,0,.12), 0 18px 26px -12px rgba(0,0,0,.3); }
.open .work { cursor: zoom-in; }
.open .work.focus { cursor: default; }

/* Cadres (en attendant les scans 9-slice) : la fixation (scotch, épingles, pince) disparaît quand l'œuvre est encadrée */
.work.framed .fix { display: none; }
.work.framed {   /* cadre blanc, comme les rendus de l'atelier */
  padding: 12px; background: #fff;
  border: 10px solid #f6f6f4;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), inset 0 2px 4px rgba(0,0,0,.12),
              0 0 0 1px rgba(0,0,0,.05), 0 2px 3px rgba(0,0,0,.14), 0 18px 26px -12px rgba(0,0,0,.3);
}

/* Scotch de masquage : papier crêpé translucide, bords longs nets, extrémités déchirées, fibres et léger reflet */
.tape {
  --tc: var(--tape);
  position: absolute; width: 48px; height: 16px; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 40%, rgba(0,0,0,.06)),
    linear-gradient(103deg, transparent 30%, rgba(255,255,255,.14) 36%, transparent 44%, transparent 70%, rgba(0,0,0,.04) 76%, transparent 82%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.035) 0 1px, transparent 1px 2.5px),
    var(--tc);
  clip-path: polygon(3% 0, 97% 0, 99% 14%, 96% 31%, 100% 47%, 97.5% 63%, 99.5% 81%, 96.5% 100%, 3.5% 100%, .5% 84%, 3% 67%, 0 50%, 2.5% 33%, .5% 15%);
  mix-blend-mode: multiply;
}

.mini {
  position: absolute; left: 0; top: 100%; margin-top: 10px; width: max-content; max-width: 240px;
  font-size: 10.5px; line-height: 1.4; color: var(--muted);
  opacity: 0; transition: opacity .5s .25s;
}
.work.framed .mini { margin-top: 20px; }
.mini b { color: var(--ink); font-weight: 600; }
/* titre des œuvres : seulement au survol (ou quand l'œuvre est cadrée, au toucher) */
.open .work:hover .mini, .open .work.focus .mini { opacity: 1; transition-delay: 0s; }
.nominis .mini { opacity: 0 !important; }
.group.single .mini { display: none; }   /* œuvre isolée : son cartel dit déjà tout */
/* titre et infos masqués sur le mur (réglage de la série ou de l'œuvre) ; ils reviennent à l'ouverture */
.group.no-cartel:not(.open) .cartel { opacity: 0; visibility: hidden; }

/* Cartel de série : sobre, comme un cartel d'expo */
.cartel { position: absolute; left: 0; font-size: 17px; line-height: 1.4; }
.cartel strong { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.cartel .meta { display: block; color: var(--muted); }
.cartel .sub { display: block; margin: 2px 0 4px; font-size: 20px; line-height: 1.3; }   /* sous-titre : va avec le titre */
.cartel .desc {
  margin: 14px 0 0; max-width: 460px; font-size: 16px; line-height: 1.55; color: var(--ink);
  opacity: 0; transform: translateY(-6px); transition: opacity .5s .3s, transform .6s .3s var(--ease);
}
.open .cartel .desc { opacity: 1; transform: none; }
/* sur le mur (série fermée) : le texte sous le titre, six lignes au plus */
.group:not(.open) .cartel .desc { opacity: 1; transform: none; margin-top: 10px; font-size: 18px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
/* série ouverte, texte long : sur deux colonnes, plus large */
.open .cartel.long .desc { max-width: 960px; column-count: 2; column-gap: 40px; }
.cartel { width: calc(var(--gw, 320px) / var(--cs, 1)); }   /* à l'écran, jamais plus large que la série */

/* Cartels : taille plafonnée de près, effacés de loin (--cs / --ms calculés selon le zoom) */
.cartel { transform: scale(var(--cs, 1)); transform-origin: 0 0; transition: opacity .35s; }
/* frise, rangée du haut : le cartel au-dessus des œuvres (son bas à 30 px d'elles, il grandit vers le haut) */
.group.cup:not(.open) .cartel { top: auto !important; bottom: 30px; transform-origin: 0 100%; }
.mini { transform: scale(var(--ms, 1)); transform-origin: 0 0; }
/* vue d'ensemble : on garde les titres (ils structurent le mur), sans la ligne de détail */
/* importantes : titre, infos et texte dès la vue d'ensemble ; les autres : rien de loin, titre à mi-distance, tout de près */
.far .group:not(.open):not(.imp) .cartel { opacity: 0; }
/* (masqués sans garder leur place : un cartel réduit au titre reste collé à l'œuvre, au-dessus comme en dessous) */
.mid .group:not(.open):not(.imp):not(.peeked) .cartel .meta, .mid .group:not(.open):not(.imp):not(.peeked) .cartel .desc { display: none; }

/* ---------- À propos : sur le mur, invisible tant qu'on ne l'appelle pas ---------- */
.panel { position: absolute; left: 0; top: 0; }
.about { width: 620px; font-size: 17px; }
.panel.about { opacity: 0; visibility: hidden; transition: opacity .6s .3s, visibility 0s .9s; cursor: auto; }
.panel.about.on { opacity: 1; visibility: visible; transition: opacity .7s .35s, visibility 0s; }
.about-close {
  position: absolute; right: 0; top: 6px; display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 4px 0; font-size: 13px; color: var(--muted);
}
.about-close:hover { color: var(--ink); }
/* portraits : carrousel au-dessus du texte (écran étroit), ou grappe à gauche du texte (fenêtre large) ;
   chaque photo est accrochée comme une œuvre (cadre, fixation), voir layoutPortraits */
.portraits { position: relative; display: flex; overflow: hidden; margin: 0 0 24px; touch-action: pan-y; width: 100%; }
.p-slide { position: relative; flex: 0 0 100%; display: grid; place-items: center; transform: translateX(calc(var(--i, 0) * -100%)); transition: transform .5s var(--ease); }
.p-slide > .work { position: relative; }
.portraits .mini { display: none; }
.panel.about.on .portraits .work { cursor: zoom-in; }
.panel.about.on .portraits .work.zoomed { cursor: zoom-out; }
.portraits.cluster { position: absolute; left: 0; display: block; overflow: visible; margin: 0; }
.portraits.cluster .p-slide { position: absolute; display: block; transform: none; }
.portraits.cluster .p-slide > .work { position: absolute; }
.p-dots { display: flex; justify-content: center; gap: 8px; margin: -20px 0 28px; }
.p-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; }
.p-dots button.on { background: var(--ink); }
.portraits.cluster + .p-dots { display: none; }
.about:has(> .portraits:not(.cluster)) { padding-top: 40px; }   /* carrousel : le bouton « fermer » au-dessus des photos */
.about:has(.portraits.cluster) { box-sizing: content-box; }
.about h2 { margin: 0 0 16px; font-size: 40px; font-weight: 600; letter-spacing: -.01em; }
.about h3 { margin: 44px 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.about p { margin: 0; }
.about ul { margin: 0; padding: 0; list-style: none; }
.about li { display: flex; gap: 20px; padding: 6px 0; border-top: 1px solid var(--line); }
.about li > span:first-child { width: 64px; color: var(--muted); flex: none; }
.about .news li { display: block; }
.about .news b { display: block; }
.about a { color: inherit; }
.about .mail { font-size: 24px; text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- Dock (projet ouvert) ---------- */
.dock {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20;
  display: flex; gap: 18px; align-items: center;
  padding: 6px 8px 6px 6px; border-radius: 999px;
  background: rgba(255,255,255,.75); backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.25);
}
.dock .chip { background: #fff; white-space: nowrap; }
/* aperçu d'une œuvre sur le mur : 1er clic = zoom (curseur loupe), 2e clic ou bouton = ouvrir la série (curseur main) */
.group:not(.open):not(.single) .work { cursor: zoom-in; }
.group.peeked:not(.open), .group.peeked:not(.open) .work { cursor: default; }   /* carrousel : seul le bouton ouvre la série */
/* pendant l'aperçu : les infos de la série seules (titre, infos, texte de présentation en entier), pas celles de l'œuvre */
.group.peeked:not(.open) .cartel, .group.peeked:not(.open) .cartel .meta, .group.peeked:not(.open) .cartel .desc { opacity: 1 !important; }
.group.peeked:not(.open) .cartel .desc { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.group.peeked:not(.open) .mini { opacity: 0 !important; }
/* dans une série ouverte : une autre série se ravive au survol, un clic y mène directement */
.is-open:not(.open-single) .group:not(.open) { cursor: pointer; }
.is-open .group:not(.open) .work { cursor: pointer; }
.is-open:not(.open-single) .group:not(.open):hover { opacity: .8; filter: none; }
/* carrousel de l'aperçu : il prend la place des œuvres de la série ; flèches, repères et bouton posés par le site
   au bord de l'image (voir placePeekUI) */
.peek-stage { position: absolute; left: 0; top: 0; }
.peek-stage .work { position: absolute; animation: peek-in .35s ease; cursor: default; }
/* au zoom, pas de scintillement : le carrousel ne remplace les œuvres du mur qu'une fois son image prête
   (même image, même place : rien ne bouge) ; au retour, les œuvres reviennent d'un coup, sans fondu */
.peek-stage .work.first { animation: none; }
.peek-stage .work.pending { visibility: hidden; animation: none; }   /* image suivante en préparation */
.group.peeked:not(.peek-ready) .peek-stage { visibility: hidden; }
@keyframes peek-in { from { opacity: 0; } to { opacity: 1; } }
.group.peeked.peek-ready:not(.open) .works { opacity: 0; pointer-events: none; transition: opacity .25s; }
/* moitiés cliquables du carrousel : gauche = image précédente, droite = suivante */
.peek-half { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 5; }
.peek-half.l { left: 0; cursor: pointer; } .peek-half.r { right: 0; cursor: pointer; }
/* zoom sur une série (aperçu) ou une œuvre isolée ouverte : un texte long défile dans sa case (environ 6 lignes),
   l'image garde sa taille */
.group.peeked:not(.open) .cartel .desc, .group.single.open .cartel .desc {
  max-height: 9.6em; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: none; }
.group.peeked:not(.open) .cartel .desc::-webkit-scrollbar, .group.single.open .cartel .desc::-webkit-scrollbar { display: none; }
/* sans barre : le bas du texte s'estompe tant qu'il reste à lire */
.cartel .desc.more:not(.at-end) { -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
/* points de repère : une rangée qui défile (9 points visibles au plus), l'image affichée en pastille plus large */
.peek-dots { position: fixed; z-index: 20; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px 0;
  max-width: 136px; overflow-x: auto; scrollbar-width: none; overscroll-behavior: contain; }
.peek-dots::-webkit-scrollbar { display: none; }
.peek-dots { opacity: 0; transition: opacity 1s ease; pointer-events: none; }   /* après le zoom, en fondu (comme le bouton) */
.peek-dots.in { opacity: 1; pointer-events: auto; }
.peek-dots button { flex: none; width: 7px; height: 7px; padding: 0; border: 0; border-radius: 4px; background: rgba(0,0,0,.2); cursor: pointer;
  transition: width .25s ease, background .25s; }
.peek-dots button.on { width: 18px; touch-action: none; }
/* zoom sur une série (aperçu) ou une œuvre isolée : les autres s'estompent un peu (moins de couleur, un peu
   transparentes), et reprennent leur aspect au survol */
.peeking .group:not(.peeked), .is-open.open-single .group:not(.open) {
  opacity: .68; filter: saturate(.55); transition: opacity .4s, filter .4s; }
.peeking .group:not(.peeked):hover, .is-open.open-single .group:not(.open):hover { opacity: 1; filter: none; }
.touch .peeking .group:not(.peeked), .touch .is-open.open-single .group:not(.open) { filter: none; opacity: .55; }   /* tactile : sans filtre (plus fluide) */
.peek-dots button.on { background: var(--ink); }
.peek-dots[hidden] { display: none; }
.peek-arrow { position: fixed; z-index: 20; background: #fff; box-shadow: 0 6px 20px -8px rgba(0,0,0,.25); transform: translate(-100%, -50%); }
.peek-arrow + .peek-arrow { transform: translate(0, -50%); }
.peek-arrow[hidden] { display: none; }
.peek-btn { position: fixed; transform: translateX(-100%); z-index: 20; background: #fff; white-space: nowrap;
  box-shadow: 0 6px 20px -8px rgba(0,0,0,.25); max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.peek-btn[hidden] { display: none; }
/* image décorative : du décor, sans clic ni zoom (le mur se déplace à travers elle) */
.group.deco { pointer-events: none; }
.group.nocap .cartel { display: none !important; }
/* titre d'un groupe (atelier), au-dessus de ses éléments */
/* édition directe : contour des groupes ; choix des éléments d'un groupe sur la page */
.sd-gbox { display: none; position: absolute; pointer-events: none; z-index: -1; }
.sd-gbox.pub { display: block; border: 1.5px dashed rgba(42, 42, 40, .28); border-radius: 10px; }   /* contour montré sur le site (au choix) */
.editing .sd-gbox { display: block; border: calc(1.5px * var(--inv, 1)) dashed rgba(42, 42, 40, .4); border-radius: calc(10px * var(--inv, 1)); pointer-events: auto; cursor: pointer; }
.editing .sd-gbox:hover { border-color: rgba(42, 42, 40, .75); }
.sd-gbox .rz { display: none; }
.editing .sd-gbox .rz { display: block; position: absolute; right: 0; bottom: 0; z-index: 6; width: calc(11px * var(--inv, 1)); height: calc(11px * var(--inv, 1));
  transform: translate(50%, 50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 calc(1.5px * var(--inv, 1)) #2a2a28; cursor: nwse-resize; touch-action: none; }
.picking .group, .picking .group .work { cursor: copy !important; }
.picking .group.deco { pointer-events: auto; }
.picking .group.picked .work { outline: calc(2.5px * var(--inv, 1)) solid #e0602a; outline-offset: calc(5px * var(--inv, 1)); }
.picking .group:not(.picked):hover .work { outline: calc(1.5px * var(--inv, 1)) dashed #e0602a; outline-offset: calc(5px * var(--inv, 1)); }
/* titre et infos d'un groupe : comme le cartel d'une série (sous le groupe, calé à gauche) */
.sd-gtitle { position: absolute; width: calc(var(--gw, 320px) / var(--cs, 1)); font-size: 17px; line-height: 1.4; transform: scale(var(--cs, 1)); transform-origin: 0 0; transition: opacity .35s; }
.sd-gtitle strong { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.sd-gtitle .sub { display: block; margin: 2px 0 4px; font-size: 20px; line-height: 1.3; }
.sd-gtitle .meta { display: block; color: var(--muted); }
.sd-gtitle .desc { margin: 10px 0 0; max-width: 460px; font-size: 18px; line-height: 1.5; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.editing .sd-gtitle { cursor: pointer; }
.is-open .sd-gtitle, .peeking .sd-gtitle { opacity: .16; }
/* légende simple (atelier) : sous l'image, calée à droite, à la place du cartel */
.group.has-legend .cartel { display: none !important; }
/* éléments d'un groupe : leurs cartels et légendes n'apparaissent qu'en s'approchant (de loin : le titre du groupe) */
.far .group.in-pack:not(.open):not(.peeked):not(.zg):not(.ptitles) .cartel, .mid .group.in-pack:not(.open):not(.peeked):not(.zg):not(.ptitles) .cartel,
.far .group.in-pack:not(.open):not(.peeked):not(.zg):not(.ptitles) .legend, .mid .group.in-pack:not(.open):not(.peeked):not(.zg):not(.ptitles) .legend { opacity: 0 !important; }
/* option « titres des éléments visibles de loin » : de loin, le titre seul (infos et texte en s'approchant) */
.far .group.ptitles:not(.open):not(.peeked):not(.zg) .cartel :is(.sub, .meta, .desc), .mid .group.ptitles:not(.open):not(.peeked):not(.zg) .cartel :is(.sub, .meta, .desc) { display: none; }
.group.cup:not(.open) .cartel { bottom: min(30px, calc(14px * var(--inv, 1))); }
/* carrousel : sous les images, la rangée de points ; le cartel descend d'autant (30 px à l'écran) pour ne pas la toucher */
.group.peeked:not(.open):not(.cup) .cartel { margin-top: calc(30px * var(--inv, 1)); }
.group.peeked:not(.open):not(.cup) .legend { margin-top: calc(30px * var(--inv, 1)); }
.group.cup:not(.open) .legend { top: auto !important; bottom: 8px; transform-origin: 0 100%; }   /* frise, rangée du haut : la légende au-dessus */
.legend { position: absolute; left: 0; width: calc(var(--gw, 320px) / var(--cs, 1)); transform: scale(var(--cs, 1)); transform-origin: 0 0;
  text-align: right; font-size: 13px; line-height: 1.4; color: var(--muted); transition: opacity .35s; pointer-events: none;
  white-space: nowrap; display: flex; justify-content: flex-end; }   /* une seule ligne, calée à droite (elle peut déborder vers la gauche) */
.legend b { color: var(--ink); font-weight: 600; }
.legend .lg-desc { color: var(--muted); }
.far .group:not(.open) .legend { opacity: 0; }   /* post-it, texte : jamais de cartel */
.work.postit .note p, .work.postit .note div { margin: 0; }
/* texte plus long que son bloc : il défile (sans barre), avec un fondu en bas tant qu'il reste à lire */
.work.postit .note { overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.work.postit .note::-webkit-scrollbar { display: none; }
.work.postit .note.more:not(.at-end) { -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
/* édition directe : poignée pour régler la taille d'un bloc texte ou d'un post-it (coin bas droit) */
.work .rz, .group > .rz { display: none; }
.editing .group:not(.open):not(.peeked) > .rz.grz { display: block; position: absolute; z-index: 6; width: calc(11px * var(--inv, 1)); height: calc(11px * var(--inv, 1));
  transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 calc(1.5px * var(--inv, 1)) #2a2a28; cursor: nwse-resize; touch-action: none; pointer-events: auto; }
.editing .work.postit .rz { display: block; position: absolute; right: 0; bottom: 0; z-index: 6; width: calc(11px * var(--inv, 1)); height: calc(11px * var(--inv, 1));
  transform: translate(50%, 50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 calc(1.5px * var(--inv, 1)) #2a2a28; cursor: nwse-resize; touch-action: none; }
.work.postit .note ul, .work.postit .note ol { margin: 0; padding-left: 1.2em; }
.peek-btn { opacity: 0; transition: opacity 1s ease; pointer-events: none; }   /* apparaît en fondu, une fois le zoom fini */
.peek-btn.in { opacity: 1; pointer-events: auto; }
.peek-dots.tight { gap: 5px; } .peek-dots.tight button { width: 5px; height: 5px; } .peek-dots.tight button.on { width: 14px; }
.dock[hidden] { display: none; }
.pager { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pager span { min-width: 44px; text-align: center; }

.hint {
  position: fixed; right: 24px; bottom: 22px; z-index: 15; text-align: right;   /* en bas à droite (le lien de l'atelier à gauche) */
  font-size: 12px; color: var(--muted); transition: opacity 1s;
}
.hint.gone { opacity: 0; }

/* ---------- Vue liste (mobile) ---------- */
.mode-list .viewport, .mode-list .hint, .mode-list .dock { display: none !important; }
.mode-list .bar { position: sticky; background: var(--wall); padding: 12px 16px; gap: 12px; }
.mode-list .tools { gap: 12px; }

.list { padding: 8px 16px 80px; max-width: 760px; margin: 0 auto; }
.l-project { padding: 30px 0 10px; scroll-margin-top: 50px; }
.l-project.out { display: none; }
.l-item { position: relative; }
.l-item:nth-child(3n+2) { margin-top: 18px; }
.l-project.open .l-item { margin-top: 0; }
.l-project:not(.open) .l-item.extra { display: none; }
.l-project.open .l-item.cover { display: none; }   /* image de couverture : seulement sur le mur */
/* l'œuvre principale de la série en grand, encadrée ; les autres plus petites dessous */
.l-project:not(.open) .l-item.main { grid-column: 1 / -1; margin-top: 0; }
.l-project:not(.open) .mini { display: none; }
.l-project:not(.open) .l-item.main .work { padding: 10px; background: #fff; border: 8px solid #f6f6f4; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.05), 0 14px 22px -12px rgba(0,0,0,.3); }
.l-project:not(.open) .l-item.main .tape { display: none; }
.l-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; background: none; border: 0; width: 100%; padding: 0; text-align: left; }
.l-head strong { font-size: 19px; font-weight: 600; }
.l-head span { color: var(--muted); font-size: 13px; }
.l-works { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 18px; align-items: start; }
.l-works .work { position: relative; }
.l-project.open .l-works { grid-template-columns: 1fr; gap: 44px; }
.l-works .mini { position: static; display: block; margin-top: 10px; opacity: 0; max-width: none; }
.l-project.open .mini { opacity: 1; }
.l-text { display: none; margin: -4px 0 26px; }
.l-project.open .l-text { display: block; }
.l-text p { margin: 0; }
.l-more { margin-top: 18px; }

/* zoom en place (vue liste) */
.zoombox { overflow: hidden; position: relative; touch-action: pan-y; }
.zoombox.zoomed { touch-action: none; cursor: grab; }
.zoombox img { transform-origin: 0 0; transition: transform .35s var(--ease); }
.zoombox.live img { transition: none; }

.l-about { display: none; width: auto; padding: 30px 0 40px; font-size: 16px; scroll-margin-top: 60px; border-bottom: 1px solid var(--line); }
.l-about.on { display: block; animation: fadein .5s var(--ease); }
.l-about h2 { font-size: 28px; }
@keyframes fadein { from { opacity: 0; } }

@media (max-width: 760px) {
  .bar { padding: 12px 16px; gap: 12px; }
  .bar .link, .space-name { white-space: nowrap; } .space-name { margin-left: -6px; }   /* bandeau sur une ligne */
  .peeking .sort-decor, .is-open .sort-decor { opacity: 0; transition: opacity .3s; }   /* en zoom : pas de frise */
  /* téléphone : cartels lisibles (infos, sous-titre et texte plus grands), texte en pleine largeur de la colonne */
  .cartel strong { font-size: 18px; }
  .cartel .meta { font-size: 16px; line-height: 1.45; }
  .cartel .sub { font-size: 16px; }
  .far .group:not(.open):not(.peeked) .cartel .sub, .mid .group:not(.open):not(.peeked) .cartel .sub { display: none; }   /* vue large : sans sous-titre */
  .mini { font-size: 9px; }
  .cartel .desc { max-width: none; }
  /* sur le mur : titre, sous-titre et infos (le texte s'affiche à l'ouverture, ou dans le carrousel) */
  .group:not(.open):not(.peeked) .cartel .desc { display: none; }
  .mid .group:not(.open):not(.imp) .cartel .meta { display: block; }
  /* carrousel d'une série : son cartel en entier, les autres séries estompées */
  .group.peeked:not(.open) .cartel { display: block; }
  .group.peeked:not(.open) .cartel .desc { font-size: 19px; line-height: 1.5; }
  .peeking .group:not(.peeked), .touch .peeking .group:not(.peeked),
  .is-open .group:not(.open), .touch .is-open .group:not(.open) { opacity: 0 !important; pointer-events: none; }   /* téléphone : la série (ou l'œuvre isolée) seule */
  body.peeking .desk-toggle { opacity: 0; pointer-events: none; }
  /* « Voir la série » : centré en bas de l'écran */
  .peek-btn { left: 50% !important; top: auto !important; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
  .amb-layer { display: none; }                         /* pas d'ombres de fenêtre, voilage ni feuillage sur téléphone */
  .open .cartel .desc, .open .cartel.long .desc { font-size: 19px; line-height: 1.55; max-width: none; column-count: 1; }
  /* téléphone : tri et filtres sous le menu, sur tout le reste de l'écran, fond voilé et flou (un toucher sur le fond le ferme) */
  .filter-panel { position: fixed; left: 0; right: 0; top: 121px; bottom: 0; width: auto; overflow: auto; padding: 18px 16px 30px;
    border-radius: 0; box-shadow: none; background: color-mix(in srgb, var(--wall) 74%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  body.atelier .filter-panel { background: color-mix(in srgb, var(--desk) 74%, transparent); }
  /* téléphone : recherche, filtres, à propos, langue, Instagram rassemblés derrière un bouton menu */
  .tools .menu-btn { display: inline-grid; }
  .brand, .space-name { font-size: 13px; } .sn-more { display: none; }
  .tools-items { display: none; position: fixed; top: 40px; left: 0; right: 0; z-index: 31; align-items: center; gap: 2px;
    padding: 0 10px 4px 12px; background: var(--wall); border-bottom: 1px solid var(--line); }
  body.atelier .tools-items { background: var(--desk); }
  .bar.menu-open { background: var(--wall); }
  body.atelier .bar.menu-open { background: var(--desk); }
  .bar.menu-open .tools-items { display: flex; animation: menu-in .22s var(--ease); }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
  .bar.menu-open .menu-btn { color: var(--ink); }
  /* la recherche prend la place libre, toujours ouverte ; puis filtres | à propos, langue, Instagram */
  .tools-items .search-wrap { flex: 1; min-width: 0; }
  .tools-items #searchBtn { pointer-events: none; padding: 0 2px 0 6px; }
  .tools-items .search-input, .tools-items .search-wrap.open .search-input { flex: 1; width: auto; min-width: 0; opacity: 1; border: 0;
    padding: 4px 6px; margin: 0; background: transparent; font-size: 16px; }
  .tools-items .filter-wrap { padding-right: 8px; margin-right: 6px; border-right: 1px solid var(--line); }
  .tools-items .icon-btn, .tools-items .link { min-width: 34px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
  .tools-items .link { font-size: 14px; }
}

/* tuiles de zoom, posées sur l'image détaillée */
.tiles { position: absolute; overflow: hidden; pointer-events: none; }
.tile { position: absolute; display: block; opacity: 0; transition: opacity .3s; }
.tile.on { opacity: 1; }

/* ---------- Styles de cadres ---------- */
.work.frame-noir { border-color: #1f1f1d; box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 2px 3px rgba(0,0,0,.18), 0 18px 26px -12px rgba(0,0,0,.35); }
.work.frame-bois { border-color: #c9a678; box-shadow: inset 0 0 0 1px rgba(90,60,25,.25), 0 0 0 1px rgba(90,60,25,.3), 0 2px 3px rgba(0,0,0,.15), 0 18px 26px -12px rgba(0,0,0,.3); }
.work.frame-bois-fonce { border-color: #5b3d27; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.3), 0 2px 3px rgba(0,0,0,.18), 0 18px 26px -12px rgba(0,0,0,.35); }
.work.frame-caisse { padding: 7px; border: 3px solid #1d1d1b; box-shadow: 0 2px 3px rgba(0,0,0,.2), 0 18px 26px -12px rgba(0,0,0,.35); }

/* ---------- Fixations ---------- */
.tape.scotch-kraft { --tc: rgba(206, 176, 122, .88); }
.tape.scotch-blanc { --tc: rgba(250, 249, 245, .7); mix-blend-mode: normal; }
/* pointes et pinces : images rendues en 3D, ombre portée comprise (outils/generer_fixations.py, à 3× pour les écrans
   haute définition) ; le point d'accroche (pointe, bord du papier) est calé sur l'œuvre */
.pin { position: absolute; top: calc(7px - 12px); width: 40px; height: 40px; pointer-events: none; transform-origin: 12px 12px;
  background: url("fixations/pointe-alu.png") 0 0 / 40px 40px no-repeat; }
.pin.epingles-blanc { background-image: url("fixations/pointe-blanc.png"); }
.pin.epingles-noir { background-image: url("fixations/pointe-noir.png"); }
.pin.epingles-jaune { background-image: url("fixations/pointe-jaune.png"); }
/* double clip (type Ariane) ; l'ancienne « pince à linge » s'affiche comme le double clip noir */
.pince, .pince-jaune, .pince-bois { position: absolute; left: 50%; top: -54px; width: 72px; height: 75px; pointer-events: none;
  background: url("fixations/pince.png") 0 0 / 72px 75px no-repeat; }
.pince-jaune { background-image: url("fixations/pince-jaune.png"); }

/* ---------- Recherche ---------- */
.search-wrap { display: flex; align-items: center; }
.search-input { width: 0; padding: 0; border: 0; opacity: 0; transition: width .3s, opacity .2s, padding .3s;
  font: inherit; font-size: 13px; color: var(--ink); background: rgba(255,255,255,.7); border-radius: 999px; outline: none; }
.search-wrap.open .search-input { width: 180px; padding: 5px 12px; opacity: 1; border: 1px solid var(--line); margin-right: 4px; }
.icon-btn.on { color: #c8621a; }
@media (max-width: 760px) { .search-wrap.open .search-input { width: 120px; } }

/* ---------- Détails des cadres : ombre portée sur le mur, ombre intérieure, biseau du passe-partout ---------- */
/* ombre sur le mur (lumière venant d'en haut) + ombre du cadre sur le passe-partout (« inset ») */
.work.framed {
  box-shadow:
    inset 0 2px 4px -1px rgba(0,0,0,.22), inset 0 1px 1px rgba(0,0,0,.14),
    0 0 0 1px rgba(0,0,0,.10), 0 1px 1px rgba(0,0,0,.20), 0 6px 10px -3px rgba(0,0,0,.18), 0 24px 32px -16px rgba(0,0,0,.38);
}
.work.frame-blanc { border-color: #f4f4f1; }
.work.frame-noir { border-color: #1f1f1d; }
.work.frame-bois { border-color: #c9a678; }
.work.frame-bois-fonce { border-color: #5b3d27; }
/* creux du passe-partout : l'œuvre est en retrait, la découpe biseautée laisse voir l'âme blanche du carton */
/* biseau à 45° de la découpe : âme blanche du carton, face haute et gauche un peu dans l'ombre, face basse et droite
   dans la lumière ; aucune ombre ne tombe sur l'œuvre */
.work.has-mat img {
  box-shadow: 0 -3px 0 0 #ecebe6, -3px 0 0 0 #f1f0eb, 3px 0 0 0 #fdfdfb, 0 3px 0 0 #fff, 0 0 0 3px #f7f6f2;
  /* biseau dans la teinte du passe-partout (plus de liseré blanc autour d'un passe-partout coloré) :
     le haut et la gauche un peu dans l'ombre, la droite et le bas dans la lumière */
  box-shadow: 0 -3px 0 0 color-mix(in srgb, var(--matc, #fff) 86%, #000), -3px 0 0 0 color-mix(in srgb, var(--matc, #fff) 91%, #000),
    3px 0 0 0 color-mix(in srgb, var(--matc, #fff) 88%, #fff), 0 3px 0 0 color-mix(in srgb, var(--matc, #fff) 80%, #fff),
    0 0 0 3px color-mix(in srgb, var(--matc, #fff) 95%, #000);
}
/* caisse américaine : baguette fine ou épaisse, l'œuvre flotte dans le vide sombre, ombre en profondeur */
.work.frame-caisse {
  border-color: #1b1b1a;
  box-shadow:
    inset 0 7px 9px -6px rgba(0,0,0,.45), inset 5px 0 8px -6px rgba(0,0,0,.25),   /* ombre du cadre sur le fond (lumière d'en haut à gauche) */
    0 0 0 1px rgba(0,0,0,.18), 0 1px 1px rgba(0,0,0,.25), 0 8px 12px -4px rgba(0,0,0,.25), 0 26px 34px -16px rgba(0,0,0,.42);
}
.work.frame-caisse img { box-shadow: none; }   /* fond plat : aucune ombre autour de l'œuvre */

.group:not(.open):hover .work.framed { translate: 0 -3px; }
/* en zoom (carrousel, œuvre ouverte) : rien ne bouge au survol */
.peeking .group:hover .work, .is-open .group:hover .work { translate: none !important; }



/* légère ombre intérieure sur l'œuvre encadrée (la baguette, ou la découpe du passe-partout, la surplombe un peu) */
.work.framed::after {
  content: ""; position: absolute; inset: var(--mat, 0); pointer-events: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.20), inset 0 0 1px rgba(0,0,0,.12);
}
.work.frame-caisse::after { box-shadow: none; }   /* caisse américaine : l'œuvre flotte, elle porte son ombre au fond */

/* passe-partout à découpe droite (plat) : simple arête, sans biseau */
.work.mat-plat img { box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
/* passe-partout plein (sans découpe) : le dessin est posé sur le carton et y porte une petite ombre */
.work.mat-plein img { box-shadow: 0 1px 1px rgba(0,0,0,.14), 0 3px 6px -2px rgba(0,0,0,.22); }
.work.mat-plein::after { box-shadow: none !important; }
/* passe-partout seul (sans cadre) : le carton porte une ombre douce, comme une œuvre posée */
.work.framed.frame-passe { border: 0; box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 8px 14px -8px rgba(0,0,0,.28); }

/* ---------- Baguettes texturées, montant par montant, coupes d'onglet à 45° ---------- */
.fa { position: absolute; inset: calc(-1 * var(--bw, 0px)); pointer-events: none; z-index: 0; }
.fa > i { position: absolute; background-size: 320px 320px; }
.fa-t { left: 0; right: 0; top: 0; height: var(--bw); clip-path: polygon(0 0, 100% 0, calc(100% - var(--bw)) 100%, var(--bw) 100%); }
.fa-b { left: 0; right: 0; bottom: 0; height: var(--bw); clip-path: polygon(var(--bw) 0, calc(100% - var(--bw)) 0, 100% 100%, 0 100%); }
.fa-l { top: 0; bottom: 0; left: 0; width: var(--bw); clip-path: polygon(0 0, 100% var(--bw), 100% calc(100% - var(--bw)), 0 100%); }
.fa-r { top: 0; bottom: 0; right: 0; width: var(--bw); clip-path: polygon(0 var(--bw), 100% 0, 100% 100%, 0 calc(100% - var(--bw))); }
.work .fa ~ img { position: relative; z-index: 1; }
.work .fa ~ .tiles { z-index: 1; }
.work:not(.framed) .fa { display: none; }

/* ombre portée par la baguette sur le passe-partout (ou sur l'œuvre sans passe-partout) : lumière venant d'en haut à
   gauche, l'ombre tombe en haut et à gauche de l'intérieur du cadre ; le cadre lui-même reste plat */
.work.framed {
  box-shadow:
    inset 0 7px 9px -5px rgba(0,0,0,.30), inset 7px 0 9px -5px rgba(0,0,0,.20), inset 0 0 0 1px rgba(0,0,0,.08),
    0 0 0 1px rgba(0,0,0,.10), 0 1px 1px rgba(0,0,0,.18), 0 6px 10px -3px rgba(0,0,0,.16), 0 24px 32px -16px rgba(0,0,0,.34);
}
.work.framed:not(.has-mat):not(.mat-plat)::after { box-shadow: inset 0 5px 7px -4px rgba(0,0,0,.28), inset 5px 0 7px -4px rgba(0,0,0,.18); }
.work.has-mat::after, .work.mat-plat::after { box-shadow: inset 0 2px 3px -1px rgba(0,0,0,.14); }   /* l'œuvre, un peu en retrait */

.work.framed::after { z-index: 2; }   /* au-dessus de l'image (qui passe devant la baguette) */
/* caisse américaine (après les règles générales, qui l'écrasaient) : seule l'ombre du cadre sur le fond, rien sur l'œuvre */
.work.framed.frame-caisse {
  box-shadow:
    inset 0 7px 9px -6px rgba(0,0,0,.45), inset 5px 0 8px -6px rgba(0,0,0,.25),
    0 0 0 1px rgba(0,0,0,.18), 0 1px 1px rgba(0,0,0,.25), 0 8px 12px -4px rgba(0,0,0,.25), 0 26px 34px -16px rgba(0,0,0,.42);
}
.work.framed.frame-caisse::after { content: none; }

/* ---------- Ambiance : ombres de fenêtre, de feuillage et de voilage, accrochées au mur ----------
   calques de la taille de l'écran ; les images y sont recadrées par le site à chaque mouvement */
.amb-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; transition: opacity .6s ease; }
.amb-back { position: absolute; z-index: 0; }              /* dans le mur, sous les œuvres */
.viewport > .world { z-index: 1; }
.ambiance { position: absolute; inset: 0; opacity: var(--amb, .1); }
.ambiance > i { position: absolute; inset: 0; background-repeat: no-repeat; }
.amb-fenetre { background-image: url("ambiance/fenetre.webp"); }
.amb-rideau { background-image: url("ambiance/rideau.webp"); animation: amb-rideau 12s ease-in-out infinite alternate; }
.amb-feuillage { background-image: url("ambiance/feuillage.webp"); animation: amb-feuilles 9s ease-in-out infinite alternate; }
@keyframes amb-rideau { from { transform: translate3d(-4px, 0, 0); } to { transform: translate3d(4px, 0, 0); } }
@keyframes amb-feuilles { from { transform: translate3d(-8px, -2px, 0); } to { transform: translate3d(8px, 4px, 0); } }
.amb-layer.amb-near { opacity: 0; }
.ambiance.still > i { animation: none; }
@media (prefers-reduced-motion: reduce) { .ambiance > i { animation: none; } }
@media (max-width: 760px) { .ambiance > i { animation: none; } }
.mode-list .amb-layer { display: none; }
.editing .group.deco { pointer-events: auto; }
/* série ouverte : les autres travaux disparaissent (seuls restent ceux de son groupe, s'il en a un) ; un clic dans le vide
   referme la série */
.is-open:not(.open-single) .group:not(.open):not(.peer), .touch .is-open:not(.open-single) .group:not(.open):not(.peer) { opacity: 0 !important; pointer-events: none; }
.is-open:not(.open-single) .sort-decor { opacity: 0; transition: opacity .3s; }
.peeking .group.peer, .touch .peeking .group.peer, .is-open .group.peer, .touch .is-open .group.peer,
.is-open:not(.open-single) .group.peer:not(.open), .peeking .group.peer:not(.peeked) { opacity: 1 !important; filter: none !important; pointer-events: auto; }
/* poignées de taille : une en bas à droite, une en haut à gauche */
.editing .work.postit .rz.tl, .editing .sd-gbox .rz.tl { right: auto; bottom: auto; left: 0; top: 0; transform: translate(-50%, -50%); }
/* image recadrée (à l'affichage) : une fenêtre sur l'image entière */
.work .crop { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; }
.work .crop img { position: absolute; max-width: none; object-fit: fill; }
.work .fa ~ .crop { z-index: 1; }
.work.has-mat .crop { box-shadow: 0 -3px 0 0 color-mix(in srgb, var(--matc, #fff) 86%, #000), -3px 0 0 0 color-mix(in srgb, var(--matc, #fff) 91%, #000),
  3px 0 0 0 color-mix(in srgb, var(--matc, #fff) 88%, #fff), 0 3px 0 0 color-mix(in srgb, var(--matc, #fff) 80%, #fff), 0 0 0 3px color-mix(in srgb, var(--matc, #fff) 95%, #000); }
.work.has-mat .crop img { box-shadow: none; }
.work.cutout:not(.framed) .crop { overflow: visible; clip-path: inset(0); }
/* édition : poignées de recadrage (milieu de chaque côté de l'image), sur l'élément choisi */
.work .ch { display: none; }
/* série ouverte, en édition : l'image choisie (zoomée) a ses poignées de recadrage et de taille */
.editing .group.open .work.focus .rz.wrz { display: block; position: absolute; right: 0; bottom: 0; z-index: 7; width: calc(11px * var(--inv, 1)); height: calc(11px * var(--inv, 1));
  transform: translate(50%, 50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 calc(1.5px * var(--inv, 1)) #2a2a28; cursor: nwse-resize; touch-action: none; }
.editing .group.open .work.focus .rz.wrz.tl { right: auto; bottom: auto; left: 0; top: 0; transform: translate(-50%, -50%); }
.editing .group.open .work.focus .ch,
.editing .group.sel:not(.open):not(.peeked) .work:not(.tucked) .ch { display: block; position: absolute; z-index: 7; background: #fff; box-shadow: 0 0 0 calc(1.5px * var(--inv, 1)) #2a2a28;
  border-radius: calc(2px * var(--inv, 1)); touch-action: none; }
.editing .work .ch-t, .editing .work .ch-b { left: 50%; width: calc(18px * var(--inv, 1)); height: calc(5px * var(--inv, 1)); cursor: ns-resize; }
.editing .work .ch-l, .editing .work .ch-r { top: 50%; width: calc(5px * var(--inv, 1)); height: calc(18px * var(--inv, 1)); cursor: ew-resize; }
.editing .work .ch-t { top: var(--mat, 0px); transform: translate(-50%, -50%); }
.editing .work .ch-b { bottom: var(--mat, 0px); transform: translate(-50%, 50%); }
.editing .work .ch-l { left: var(--mat, 0px); transform: translate(-50%, -50%); }
.editing .work .ch-r { right: var(--mat, 0px); transform: translate(50%, -50%); }
.crop-frame { position: absolute; z-index: 8; pointer-events: none; outline: calc(1.5px * var(--inv, 1)) solid #e0602a; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .28); }
.editing .group.size-match .work { outline: calc(1.5px * var(--inv, 1)) dashed #e0602a; outline-offset: calc(3px * var(--inv, 1)); }   /* même largeur / hauteur */
/* édition : poignée de déplacement d'un élément dans son groupe (coin bas gauche) ; repères d'alignement */
.group > .mv { display: none; }
.editing .group.sel:not(.open) .work { outline: calc(1.5px * var(--inv, 1)) solid rgba(224, 96, 42, .7); outline-offset: calc(4px * var(--inv, 1)); }   /* élément choisi */
.editing .group.in-pack.sel:not(.open):not(.peeked) > .mv { display: grid; place-items: center; position: absolute; z-index: 6;
  width: calc(26px * var(--inv, 1)); height: calc(26px * var(--inv, 1)); transform: translate(-50%, -50%); border-radius: 50%;
  background: #2a2a28; color: #fff; cursor: move; touch-action: none; pointer-events: auto; box-shadow: 0 0 0 calc(2px * var(--inv, 1)) #fff; }
.editing .group > .mv svg { width: 62%; height: 62%; }
.guide { position: absolute; z-index: 50; pointer-events: none; background: #e0602a; }
.guide.v { width: calc(1px * var(--inv, 1)); }
.guide.h { height: calc(1px * var(--inv, 1)); }

/* profondeur du cadre (--d : plate 0,35, normale 1, profonde 1,7, très profonde 2,6) : l'ombre portée sur le mur et
   l'ombre de la baguette à l'intérieur du cadre s'étendent avec elle */
.work.framed, .touch .work.framed {
  box-shadow:
    inset 0 calc(7px * var(--d, 1)) calc(9px * var(--d, 1)) -5px rgba(0,0,0,.30), inset calc(7px * var(--d, 1)) 0 calc(9px * var(--d, 1)) -5px rgba(0,0,0,.20), inset 0 0 0 1px rgba(0,0,0,.08),
    0 0 0 1px rgba(0,0,0,.10), 0 1px 1px rgba(0,0,0,.18), 0 calc(6px * var(--d, 1)) calc(10px * var(--d, 1)) -3px rgba(0,0,0,.16),
    0 calc(24px * var(--d, 1)) calc(32px * var(--d, 1)) calc(-16px * var(--d, 1)) rgba(0,0,0,.34);
}
.work.framed:not(.has-mat):not(.mat-plat)::after { box-shadow: inset 0 calc(5px * var(--d, 1)) calc(7px * var(--d, 1)) -4px rgba(0,0,0,.28), inset calc(5px * var(--d, 1)) 0 calc(7px * var(--d, 1)) -4px rgba(0,0,0,.18); }
.work.has-mat::after, .work.mat-plat::after { box-shadow: inset 0 calc(2px * var(--d, 1)) calc(3px * var(--d, 1)) -1px rgba(0,0,0,.14); }
.work.framed.frame-caisse, .touch .work.framed.frame-caisse {
  box-shadow:
    inset 0 calc(7px * var(--d, 1)) calc(9px * var(--d, 1)) -6px rgba(0,0,0,.45), inset calc(5px * var(--d, 1)) 0 calc(8px * var(--d, 1)) -6px rgba(0,0,0,.25),
    0 0 0 1px rgba(0,0,0,.18), 0 1px 1px rgba(0,0,0,.25), 0 calc(8px * var(--d, 1)) calc(12px * var(--d, 1)) -4px rgba(0,0,0,.25),
    0 calc(26px * var(--d, 1)) calc(34px * var(--d, 1)) calc(-16px * var(--d, 1)) rgba(0,0,0,.42);
}
.work.framed.frame-passe, .touch .work.framed.frame-passe { box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 calc(8px * var(--d, 1)) calc(14px * var(--d, 1)) calc(-8px * var(--d, 1)) rgba(0,0,0,.28); }   /* édition directe : un décor se choisit et se déplace aussi */

/* bandeau : pictos regroupés (recherche, tri et filtres, Instagram, langue), puis À PROPOS, ATELIER (TRAVAUX), SHOP */
.tool-icons { display: flex; align-items: center; gap: 12px; }
.nav-links { display: flex; align-items: center; gap: 18px; margin-left: 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.nav-link { text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; color: var(--ink); }
.nav-link:hover { color: var(--muted); }
.desk-toggle { display: none !important; }   /* (remplacé par ATELIER / TRAVAUX dans le bandeau) */
.hint.notice { opacity: 1; color: var(--ink); }
@media (max-width: 760px) {
  /* menu du téléphone : les pictos et la recherche sur une ligne, À PROPOS · ATELIER · SHOP dessous */
  .tools-items { flex-wrap: wrap; row-gap: 2px; }
  .tools-items .tool-icons { flex: 1 0 100%; gap: 2px; }
  .tools-items .nav-links { flex: 1 0 100%; margin: 0; padding: 6px 4px 2px; border-left: 0; border-top: 1px solid var(--line); justify-content: space-around; gap: 6px; }
  .tools-items .nav-link { font-size: 13px; }
}
