/* Page Bio : un passeport imaginaire sur le même mur blanc que l'accueil.
   - À gauche, la photo du passeport (ChatGPT, 1024 × 1536) ; pages, tampons et feuillet qui tourne sont
     posés par-dessus en code (assets/js/bio/bio.js), en pixels de l'image.
   - À droite, le texte de la bio, un chapitre par double page. */

.page-bio {
  --wall: #efedf0;
  --ink: #1c1c1e;
  --ink-dim: #6e6e73;
  --accent: #b02a22;
  background: var(--wall);
  color: var(--ink);
  color-scheme: light;
}
.bio [hidden] { display: none !important; }

/* ---------- Mise en page : passeport à gauche (fixe), texte à droite ---------- */
.bio {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  min-height: calc(100dvh - var(--head));
}
.bio-machine {
  position: sticky; top: 0;
  height: calc(100vh - var(--head));
  height: calc(100dvh - var(--head));
  min-height: 520px;
  display: flex; flex-direction: column;
}
.bio-machine .pstage { position: relative; inset: auto; flex: 1; min-height: 0; }
.page-bio .pstage::before, .page-bio .pstage::after { display: none; }
.page-bio .pstage { --reserve-top: 8px; --reserve-bottom: 0px; --reserve-x: 12px; }
.page-bio .pframe {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent), linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent), linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}

/* pages : encre en multiply sur le papier de la photo */
.bio-page { position: absolute; cursor: pointer; }
.bio-page > canvas { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; pointer-events: none; }
.bio-stamps { position: absolute; inset: 0; }
.bio-stamp {
  position: absolute; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 8px; mix-blend-mode: multiply; opacity: .88;
  transition: opacity .15s;
}
.bio-stamp canvas { width: 100%; height: 100%; display: block; }
.bio-stamp:hover, .bio-stamp:focus-visible { opacity: 1; }
.bio-stamp:focus-visible { outline: 2px dashed rgba(176, 42, 34, .55); outline-offset: 2px; }
/* coup de tampon : arrive de haut, s'écrase, l'encre se dépose */
.bio-stamp.is-pressing { animation: bio-press .42s cubic-bezier(.3, .7, .4, 1) both; }
@keyframes bio-press {
  0% { opacity: 0; scale: 1.35; filter: blur(2px); }
  55% { opacity: .5; scale: 1.02; filter: blur(0); }
  70% { opacity: .95; scale: .97; }
  100% { opacity: .88; scale: 1; }
}

.bio-cover { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.bio-cover:focus-visible { outline: 2px dashed rgba(176, 42, 34, .55); outline-offset: 4px; }

/* feuillet qui tourne : deux faces (papier recopié de la photo + encre), ombrage selon l'angle */
.bio-leaf { position: absolute; transform-style: preserve-3d; pointer-events: none; z-index: 3; }
.bio-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 3px; overflow: hidden; }
.bio-face.back { transform: rotateY(180deg); }
.bio-face canvas { width: 100%; height: 100%; display: block; }
.bio-face i { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.bio-face.front i { background: linear-gradient(to right, rgba(40, 25, 15, .55), rgba(40, 25, 15, .1) 60%, rgba(255, 255, 255, .15)); }
.bio-face.back i { background: linear-gradient(to left, rgba(40, 25, 15, .55), rgba(40, 25, 15, .1) 60%, rgba(255, 255, 255, .15)); }

/* commandes et cartel (étiquette de musée) sous le passeport */
.bio-controls {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font: 400 12.5px/1 var(--font-titres); letter-spacing: .16em; text-transform: uppercase;
}
.bio-controls button {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .16);
  background: rgba(255, 255, 255, .55); color: var(--ink); font-size: 17px; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.bio-controls button:hover:not(:disabled) { background: #fff; }
.bio-controls button:disabled { opacity: .3; cursor: default; }
#bio-folio { min-width: 11em; text-align: center; padding-top: 3px; }
.bio-cartel {
  margin: 14px auto 22px; width: min(440px, calc(100% - 32px)); min-height: 5.6em;
  padding: 12px 16px; border-radius: 3px;
  background: #fbfaf8; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 6px 14px -8px rgba(0, 0, 0, .2);
  font-size: 13.5px; line-height: 1.45; color: #3a3a3e;
}
.bio-cartel b { display: block; font: 600 12px/1.3 var(--font-titres); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-bottom: 4px; }
.bio-cartel span { display: block; }
.bio-cartel q { display: block; margin-top: 6px; font-style: italic; quotes: "« " " »"; }
.bio-cartel q:lang(en) { quotes: "“" "”"; }   /* guillemets de la langue de la page (27/11/2026) */
.bio-cartel q:lang(de) { quotes: "„" "“"; }
.bio-cartel cite { display: block; font-style: normal; font-size: 12px; color: var(--ink-dim); }
/* liens du tampon vers le reste du site : disque (lecture), news, année de la Scène, OST, presse */
.bio-links { display: flex !important; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.bio-links a {
  display: inline-block; padding: 6px 11px 5px; border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .14); background: #fff; color: var(--ink); text-decoration: none;
  font: 400 11.5px/1.1 var(--font-titres); letter-spacing: .1em; text-transform: uppercase;
  transition: background .15s, color .15s, border-color .15s;
}
.bio-links a:hover, .bio-links a:focus-visible { background: var(--ink); color: #fff; border-color: var(--ink); }
.bio-links a.is-disque { background: var(--accent); border-color: var(--accent); color: #fff; }
.bio-links a.is-disque:hover { background: #8a1d17; border-color: #8a1d17; }
.bio-links a.is-news::before { content: attr(data-pre) " · "; color: var(--ink-dim); }   /* data-pre = « News », traduit par bio.js */
.bio-links a.is-news:hover::before { color: inherit; }

/* ---------- Le texte ---------- */
.bio-text { padding: 40px clamp(20px, 4vw, 64px) 30vh clamp(8px, 2vw, 24px); max-width: 620px; }
.bio-title { margin: 0 0 18px; font: 300 clamp(44px, 7vw, 88px)/.95 var(--font-titres); letter-spacing: .02em; text-transform: uppercase; }
.bio-chapter { padding: 26px 0 30px; border-top: 1px solid rgba(0, 0, 0, .1); transition: opacity .3s; }
.bio-chapter--intro { border-top: 0; padding-top: 0; }
.bio-chapter p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.6; }
.bio-chapter .bio-lede { font-size: 20px; line-height: 1.5; }
.bio-years { margin: 0 0 4px !important; font: 400 12.5px/1.2 var(--font-titres) !important; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.bio-chapter h2 { margin: 0 0 14px; font: 600 15px/1.3 var(--font-titres); letter-spacing: .12em; text-transform: uppercase; }
@media (min-width: 900px) {
  .bio-chapter:not(.is-active) { opacity: .5; }
  .bio-chapter:not(.is-active):hover { opacity: .8; }
}

/* ---------- Écran étroit : passeport en haut, puis le texte ---------- */
@media (max-width: 899px) {
  .bio { grid-template-columns: 1fr; min-height: 0; }
  .bio-machine { position: relative; top: 0; height: auto; min-height: 0; }
  /* hauteur = largeur × proportions du cadrage focusMobile (bio.js : 920 × 630) */
  .bio-machine .pstage { flex: none; height: calc((100vw - 16px) * 630 / 920 + 8px); }
  .page-bio .pstage { --reserve-x: 8px; --reserve-top: 4px; }
  .bio-cartel { margin-bottom: 10px; }
  .bio-text { max-width: none; padding: 20px 20px 56px; }
  .bio-title { font-size: 44px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .bio { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .bio-machine { position: sticky; top: 0; height: calc(100dvh - var(--head)); }
  .bio-machine .pstage { flex: 1; height: auto; }
  .bio-cartel { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bio-stamp.is-pressing { animation: none; }
}
