/* NightFall — le catalogue de la table, dans la grammaire d'une plateforme de streaming. */

@font-face { font-family: "League Gothic"; src: url("polices/league-gothic.woff2") format("woff2"); font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Inter"; src: url("polices/inter.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("polices/cinzel.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Michroma"; src: url("polices/michroma.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IM Fell English SC"; src: url("polices/imfell.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "UnifrakturCook"; src: url("polices/unifraktur.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Rye"; src: url("polices/rye.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Pirata One"; src: url("polices/pirata.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Yuji Syuku"; src: url("polices/yuji-syuku.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Yuji Syuku"; src: url("polices/yuji-syuku-ext.woff2") format("woff2"); font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Rubik Dirt"; src: url("polices/rubik-dirt.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik Dirt"; src: url("polices/rubik-dirt-ext.woff2") format("woff2"); font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  --fond: #141414;
  --fond-modal: #181818;
  --fond-carte: #232323;
  --fond-ligne: #2f2f2f;
  --texte: #ffffff;
  --texte-doux: #e5e5e5;
  --texte-gris: #a3a3a3;
  --texte-sourd: #808080;
  --rouge: #e50914;
  --rouge-vif: #f6121d;
  --bouton-gris: rgba(109, 109, 110, 0.7);
  --bouton-gris-survol: rgba(109, 109, 110, 0.4);
  --marge: 4%;
  --rayon: 4px;
  --ombre-carte: 0 3px 10px rgba(0, 0, 0, 0.75);
  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
  --police: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--fond); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.modal-ouverte { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--rouge); color: #fff; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
[hidden] { display: none !important; }

.passer {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: #fff; color: #000; padding: 10px 16px; border-radius: var(--rayon); font-weight: 700;
}
.passer:focus { left: 8px; }

.icone { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icone.pleine { fill: currentColor; stroke: none; }

/* ------------------------------------------------------------------ */
/* Marque                                                              */
/* ------------------------------------------------------------------ */

.marque {
  font-family: "League Gothic", Impact, sans-serif;
  text-transform: uppercase;
  color: var(--rouge);
  font-size: 2.15rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  transform: scaleY(1.12);
  transform-origin: left center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}
.pastille-n {
  font-family: "League Gothic", Impact, sans-serif;
  text-transform: uppercase;
  color: var(--rouge);
  font-size: 1.35em;
  line-height: 0.8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------------------ */
/* En-tête                                                             */
/* ------------------------------------------------------------------ */

.entete {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: 68px;
  display: flex; align-items: center; gap: 2.4rem;
  padding: 0 var(--marge);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 10%, transparent);
  transition: background-color 0.4s;
}
.entete.solide { background-color: var(--fond); }
.nav { display: flex; gap: 1.25rem; font-size: 0.875rem; }
.nav a { color: var(--texte-doux); text-decoration: none; transition: color 0.3s; }
.nav a:hover { color: var(--texte-gris); }
.nav a[aria-current="page"] { color: #fff; font-weight: 700; cursor: default; }
.nav-parcourir { display: none; }
.outils { margin-left: auto; display: flex; align-items: center; gap: 1.1rem; }

.recherche { position: relative; display: flex; align-items: center; }
/* Le champ garde sa taille : il se découvre de droite à gauche, sans relancer la mise en page. */
.recherche-champ {
  position: absolute; right: 100%; top: 50%; margin-top: -17px;
  display: flex; align-items: center;
  width: 260px; height: 34px; padding: 0 0.6rem;
  background: rgba(0, 0, 0, 0.75); border: 1px solid #fff;
  clip-path: inset(0 0 0 100%);
  visibility: hidden;
  transition: clip-path 0.35s var(--sortie), visibility 0s linear 0.35s;
}
.recherche.ouverte .recherche-champ { clip-path: inset(0); visibility: visible; transition: clip-path 0.35s var(--sortie); }
.recherche input {
  flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; font: inherit; font-size: 0.875rem;
  caret-color: var(--rouge);
}
.recherche input::placeholder { color: var(--texte-sourd); }
.recherche input:focus { outline: none; }
.bouton-icone { display: grid; place-items: center; width: 34px; height: 34px; font-size: 1.3rem; border-radius: var(--rayon); }

.profil { position: relative; }
.profil-bouton { display: flex; align-items: center; gap: 0.5rem; }
.avatar {
  width: 32px; height: 32px; border-radius: var(--rayon); object-fit: cover;
  background: #0071eb; display: grid; place-items: center; font-weight: 800; font-size: 0.95rem;
}
.profil-bouton .icone { font-size: 0.8rem; transition: transform 0.3s; }
.profil.ouvert .profil-bouton .icone { transform: rotate(180deg); }
.profil-menu {
  position: absolute; right: 0; top: calc(100% + 14px);
  min-width: 220px; padding: 0.4rem 0;
  background: rgba(0, 0, 0, 0.9); border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8125rem;
}
.profil-menu p { margin: 0; padding: 0.6rem 1rem; color: var(--texte-gris); border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.profil-menu strong { color: #fff; }
.profil-menu a { display: block; padding: 0.7rem 1rem; text-decoration: none; }
.profil-menu a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ */
/* Traitements de titre : chaque aventure a son « logo »               */
/* ------------------------------------------------------------------ */

.titre-logo {
  margin: 0;
  line-height: 0.98;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: manual;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.8);
}
.police-cinzel { font-family: "Cinzel", serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #f3ead8; }
.police-michroma { font-family: "Michroma", sans-serif; text-transform: uppercase; letter-spacing: 0.1em; color: #eaf3ff; line-height: 1.1; }
.police-imfell { font-family: "IM Fell English SC", serif; color: #eee3cc; letter-spacing: 0.01em; }
.police-unifraktur { font-family: "UnifrakturCook", serif; font-weight: 700; color: #efe3cf; letter-spacing: 0.01em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.9); }
.police-rye { font-family: "Rye", serif; color: #f2d3a0; letter-spacing: 0.02em; }
.police-pirata { font-family: "Pirata One", serif; color: #f5ede0; letter-spacing: 0.02em; }
/* Polices déclarées par un pack (`pack.police`, 09/10) : Blood and Honor au pinceau, Degenesis rongé. */
.police-yuji { font-family: "Yuji Syuku", serif; color: #f5eede; letter-spacing: 0.03em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75); }
.police-rubikdirt { font-family: "Rubik Dirt", sans-serif; color: #ecd6b0; letter-spacing: 0.02em; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); }

/* ------------------------------------------------------------------ */
/* Affiche principale                                                  */
/* ------------------------------------------------------------------ */

.affiche {
  position: relative;
  height: 56.25vw; min-height: 520px; max-height: 92vh;
  overflow: hidden;
  background: #000;
}
.diapo {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1.2s ease, visibility 0s linear 1.2s;
}
.diapo.active { opacity: 1; visibility: visible; transition: opacity 1.2s ease, visibility 0s; }
.diapo-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.diapo.active .diapo-image { animation: derive 14s linear both; }
@keyframes derive { from { transform: scale(1.06) translate3d(0, 0, 0); } to { transform: scale(1) translate3d(-1%, 0, 0); } }
.diapo::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(77deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.25) 45%, transparent 75%);
}
.diapo::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 14.7vw; z-index: 1;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0) 0%, rgba(20, 20, 20, 0.15) 15%, rgba(20, 20, 20, 0.6) 50%, var(--fond) 88%);
}
.diapo-info {
  position: absolute; z-index: 2;
  left: var(--marge); bottom: 33%;
  width: min(40%, 620px);
}
.diapo-marque { display: block; margin-bottom: 0.7rem; font-size: 2.1rem; }
.diapo .titre-logo { font-size: clamp(2.2rem, 4.6vw, 5.2rem); margin-bottom: 1.1rem; }
.diapo .titre-logo.police-michroma { font-size: clamp(1.6rem, 3.2vw, 3.7rem); }
.diapo-statut { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 0.9rem; font-size: clamp(0.95rem, 1.35vw, 1.4rem); font-weight: 700; }
.pastille-live {
  display: inline-grid; place-items: center; flex: none;
  min-width: 2.4em; height: 1.55em; padding: 0 0.4em; border-radius: 2px;
  background: var(--rouge); color: #fff; font-size: 0.62em; font-weight: 800; letter-spacing: 0.06em; line-height: 1;
}
.diapo-pitch {
  margin: 0 0 1.4rem;
  font-size: clamp(0.95rem, 1.2vw, 1.3rem);
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem;
  padding: 0.55em 1.9em 0.55em 1.5em;
  border-radius: var(--rayon);
  font-size: clamp(0.95rem, 1.25vw, 1.35rem); font-weight: 700; line-height: 1.5;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.2s;
}
.bouton .icone { font-size: 1.45em; }
.bouton:active { transform: scale(0.97); }
a.bouton { text-decoration: none; }
.bouton-blanc { background: #fff; color: #000; }
.bouton-blanc:hover { background: rgba(255, 255, 255, 0.75); }
.bouton-gris { background: var(--bouton-gris); color: #fff; }
.bouton-gris:hover { background: var(--bouton-gris-survol); }

.diapo-cote {
  position: absolute; z-index: 2; right: 0; bottom: 35%;
  display: flex; align-items: center; gap: 1rem;
}
.diapo-niveau {
  padding: 0.45rem 3.2rem 0.45rem 0.8rem;
  border-left: 3px solid #dcdcdc;
  background: rgba(51, 51, 51, 0.6);
  font-size: clamp(0.85rem, 1.1vw, 1.1rem);
}
.defilement {
  position: absolute; z-index: 3; right: var(--marge); bottom: 22%;
  display: flex; gap: 6px;
}
.defilement button {
  position: relative; width: 38px; height: 4px; border-radius: 2px; overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
}
.defilement button::after { content: ""; position: absolute; inset: -10px 0; }
.defilement span { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.defilement button.vu span { transform: scaleX(1); }
.defilement button.en-cours span { animation: remplir var(--duree-diapo, 10s) linear forwards; }
.affiche.pause .defilement button.en-cours span { animation-play-state: paused; }
@keyframes remplir { to { transform: scaleX(1); } }

/* ------------------------------------------------------------------ */
/* Rangées                                                             */
/* ------------------------------------------------------------------ */

.rangees { position: relative; z-index: 5; margin-top: -9vw; padding-bottom: 4rem; }
.page-sans-affiche .rangees { margin-top: 0; padding-top: 110px; }
.rangee { margin: 0 0 3vw; }
.rangee h2 {
  margin: 0 var(--marge) 0.55em;
  font-size: clamp(1rem, 1.4vw, 1.5rem);
  font-weight: 700;
  color: var(--texte-doux);
}
.rangee h2 small { font-weight: 400; color: var(--texte-sourd); font-size: 0.75em; margin-left: 0.5em; }
.rail { position: relative; }
.piste {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--marge) - 5 * 0.4vw) / 6);
  gap: 0.4vw;
  padding: 0 var(--marge);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--marge);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.piste::-webkit-scrollbar { display: none; }
.fleche {
  position: absolute; top: 0; bottom: 0; z-index: 6;
  width: var(--marge);
  display: grid; place-items: center;
  background: rgba(20, 20, 20, 0.5);
  font-size: 2.4rem; color: #fff;
  opacity: 0; transition: opacity 0.2s, background-color 0.2s;
}
.fleche.gauche { left: 0; border-radius: 0 var(--rayon) var(--rayon) 0; }
.fleche.droite { right: 0; border-radius: var(--rayon) 0 0 var(--rayon); }
.rail:hover .fleche:not(:disabled), .fleche:focus-visible { opacity: 1; }
.fleche:hover { background: rgba(20, 20, 20, 0.7); }
.fleche:hover .icone { transform: scale(1.25); }
.fleche .icone { transition: transform 0.2s; }
.fleche:disabled { visibility: hidden; }

/* ------------------------------------------------------------------ */
/* Cartes                                                              */
/* ------------------------------------------------------------------ */

.carte {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--rayon);
  overflow: hidden;
  background: var(--fond-carte);
  scroll-snap-align: start;
  text-align: left;
}
.carte img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carte::after {
  content: ""; position: absolute; inset: 35% 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.88));
}
.carte-titre {
  position: absolute; z-index: 1; left: 7%; right: 7%; bottom: 8%;
  font-size: clamp(0.8rem, 1.25vw, 1.3rem);
}
.carte-titre.police-michroma { font-size: clamp(0.72rem, 1.02vw, 1.05rem); letter-spacing: 0.06em; -webkit-text-stroke: 0.3px currentColor; }
.carte-type { position: absolute; z-index: 1; top: 7%; left: 5%; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.carte-exemple {
  position: absolute; z-index: 1; top: 7%; right: 5%;
  padding: 0.12rem 0.35rem; border-radius: 2px;
  background: rgba(0, 0, 0, 0.62); color: var(--texte-doux);
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em;
}
.sous-carte { margin: 0.45rem 0.1rem 0; font-size: 0.8rem; color: var(--texte-gris); }
.sous-carte strong { color: var(--texte-doux); }
.carte.sans-image, .apercu-image.sans-image, .modal-image.sans-image, .diapo.sans-image {
  background:
    radial-gradient(120% 90% at 80% 10%, rgba(229, 9, 20, 0.18), transparent 60%),
    var(--fond-carte);
}
.carte.sans-image img, .sans-image > img { display: none; }

/* Aperçu survolé : la carte grandit et montre ses actions. */
.apercu {
  position: absolute; z-index: 30;
  width: 300px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--fond-modal);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.8), 0 2px 6px rgba(0, 0, 0, 0.5);
  transform-origin: center;
  opacity: 0; transform: scale(0.667);
  transition: opacity 0.18s ease, transform 0.3s var(--sortie);
  pointer-events: none;
}
.apercu.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.apercu.origine-gauche { transform-origin: left center; }
.apercu.origine-droite { transform-origin: right center; }
.apercu-image { position: relative; aspect-ratio: 16 / 9; }
.apercu-image img { width: 100%; height: 100%; object-fit: cover; }
.apercu-image .carte-titre { font-size: 1.15rem; }
.apercu-corps { padding: 0.9rem 1rem 1.05rem; }
.apercu-boutons { display: flex; gap: 0.45rem; margin-bottom: 0.85rem; }
.rond {
  display: grid; place-items: center; flex: none;
  width: 2.35rem; height: 2.35rem; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(42, 42, 42, 0.6);
  font-size: 1.05rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.rond:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
.rond.plein { background: #fff; color: #000; border-color: #fff; }
.rond.plein:hover { background: rgba(255, 255, 255, 0.8); }
.rond.pousse { margin-left: auto; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.55rem; font-size: 0.85rem; color: var(--texte-gris); }
.meta .etat { color: #46d369; font-weight: 700; }
.meta .etat.rouge { color: var(--rouge-vif); }
.boite {
  padding: 0 0.4em; border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--texte-doux); font-size: 0.8em; line-height: 1.5; white-space: nowrap;
}
.etiquettes { display: flex; flex-wrap: wrap; gap: 0.25rem 0; margin: 0.6rem 0 0; padding: 0; list-style: none; font-size: 0.85rem; color: var(--texte-doux); }
.etiquettes li + li::before { content: "•"; color: #646464; margin: 0 0.45rem; }

/* ------------------------------------------------------------------ */
/* Grilles (recherche, Ma liste)                                       */
/* ------------------------------------------------------------------ */

.grille-page { padding: 120px var(--marge) 4rem; min-height: 70vh; }
.grille-page h1 { margin: 0 0 1.6rem; font-size: clamp(1.6rem, 2.4vw, 2.4rem); font-weight: 700; }
.grille-page h1 span { color: var(--texte-sourd); font-weight: 400; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 3.2vw 0.5vw; }
.vide { max-width: 34rem; color: var(--texte-gris); font-size: 1.05rem; }
.vide strong { color: #fff; display: block; font-size: 1.35rem; margin-bottom: 0.4rem; }

.entete-page {
  position: absolute; z-index: 4; top: 84px; left: var(--marge); right: var(--marge);
  display: flex; align-items: center; gap: 1.8rem;
}
.entete-page h1 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.7rem); font-weight: 700; }
.choix-genre {
  appearance: none; -webkit-appearance: none;
  padding: 0.3rem 2.2rem 0.3rem 0.7rem;
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23fff'/%3E%3C/svg%3E") no-repeat right 0.7rem center;
  border: 1px solid #fff; color: #fff; font: inherit; font-size: 0.9rem; font-weight: 700;
  cursor: pointer;
}
.choix-genre:hover { background-color: rgba(255, 255, 255, 0.1); }

/* ------------------------------------------------------------------ */
/* Fiche (modale)                                                      */
/* ------------------------------------------------------------------ */

.voile {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.7);
  overflow-y: auto;
  opacity: 0; transition: opacity 0.25s;
}
.voile.visible { opacity: 1; }
.modal {
  position: relative;
  width: min(92vw, 850px);
  margin: 2rem auto 3rem;
  border-radius: 6px;
  overflow: hidden;
  background: var(--fond-modal);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 3px 10px rgba(0, 0, 0, 0.5);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.4s var(--sortie);
}
.voile.visible .modal { transform: none; }
.modal-fermer {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--fond-modal); font-size: 1.25rem;
}
.modal-image { position: relative; aspect-ratio: 16 / 9; }
.modal-image > img { width: 100%; height: 100%; object-fit: cover; }
.modal-image::after {
  content: ""; position: absolute; inset: 40% 0 -1px 0;
  background: linear-gradient(180deg, transparent, var(--fond-modal));
}
.modal-titre { position: absolute; z-index: 2; left: 3rem; right: 3rem; bottom: 12%; }
.modal-titre .titre-logo { font-size: clamp(2rem, 5.2vw, 3.6rem); margin-bottom: 1.3rem; max-width: 80%; }
.modal-titre .titre-logo.police-michroma { font-size: clamp(1.4rem, 3.4vw, 2.5rem); }
.modal-titre .bouton { font-size: 1.05rem; }
.modal-titre .rond { width: 2.6rem; height: 2.6rem; font-size: 1.2rem; }
.modal-corps { padding: 0.4rem 3rem 3rem; }
.modal-grille { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; }
.modal-grille .meta { font-size: 1rem; margin-bottom: 1.1rem; }
.modal-accroche { margin: 0 0 0.8rem; font-size: 1.15rem; font-weight: 700; }
.modal-pitch { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--texte-doux); max-width: 65ch; }
.infos { margin: 0; font-size: 0.875rem; line-height: 1.5; }
.infos div { margin-bottom: 0.8rem; }
.infos dt { display: inline; color: #777; }
.infos dd { display: inline; margin: 0; color: var(--texte-doux); }
.section { margin-top: 3rem; }
.section-entete { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section h3 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.section-entete span { color: var(--texte-doux); font-size: 1.05rem; }

.seances { list-style: none; margin: 0; padding: 0; border-top: 1px solid #404040; }
.seance {
  display: grid; grid-template-columns: 3rem 9.5rem minmax(0, 1fr); align-items: center; gap: 1.2rem;
  padding: 1.5rem 1.2rem; border-bottom: 1px solid #404040; border-radius: var(--rayon);
}
.seance.courante { background: #333; border-bottom-color: transparent; }
.seance-numero { font-size: 1.5rem; color: #d2d2d2; text-align: center; }
.seance-vignette { position: relative; aspect-ratio: 16 / 9; border-radius: var(--rayon); overflow: hidden; background: var(--fond-carte); }
.seance-vignette img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.seance-chiffre {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: "Cinzel", serif; font-weight: 700; font-size: 2.6rem; color: #4a4a4a;
  border: 1px solid #3a3a3a; border-radius: var(--rayon);
}
.seance-vignette .pastille-live { z-index: 2; }
.seance-vignette .pastille-live { position: absolute; left: 6px; bottom: 6px; font-size: 0.62rem; }
.seance-titre { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; font-weight: 700; }
.seance-titre span { font-weight: 400; color: var(--texte-doux); white-space: nowrap; }
.seance p { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--texte-gris); }
.seance-verbatim { display: inline-block; margin-top: 0.45rem; font-size: 0.8rem; color: var(--texte-doux); text-underline-offset: 3px; }
.seance-verbatim:hover { color: #fff; }
.seance-roman { display: inline-block; margin: 0 0 1rem; font-size: 0.9rem; font-weight: 700; color: var(--texte); text-underline-offset: 3px; }
.seance-roman:hover { color: var(--texte-doux); }

.distribution { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.pj { display: block; width: 100%; height: 100%; border-radius: var(--rayon); overflow: hidden; background: #2f2f2f; text-align: left; cursor: pointer; transition: background-color 0.2s; }
.pj:hover { background: #3a3a3a; }
.pj-portrait { position: relative; aspect-ratio: 3 / 4; background: var(--fond-carte); }
.pj-portrait img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.pj-initiale { position: absolute; inset: 0; display: grid; place-items: center; font-family: "Cinzel", serif; font-weight: 700; font-size: 3rem; color: #4a4a4a; }
.pj-texte { padding: 0.7rem 0.8rem 0.9rem; font-size: 0.8rem; color: var(--texte-gris); line-height: 1.4; }
.pj-texte strong { display: block; color: #fff; font-size: 0.95rem; margin-bottom: 0.15rem; }
.pj.membre, .pj.membre:hover { cursor: default; background: #2f2f2f; }
.pj-role { display: block; margin-bottom: 0.35rem; color: var(--texte-doux); font-size: 0.78rem; }
/* La distribution en groupes : rôles, prétirés en scène (plus larges, au format de la
   scène), personnages du scénario. */
.distribution-groupe { margin: 1.6rem 0 0.75rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texte-doux); }
.section-entete + .distribution-groupe { margin-top: 0; }
.distribution-pretires { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pj-portrait.en-scene { aspect-ratio: 4 / 3; }
.pj-portrait.en-scene img { object-position: center; }

.journal-recent { list-style: none; margin: 0; padding: 0; }
.journal-recent li { padding: 1rem 0; border-bottom: 1px solid #404040; font-size: 0.95rem; line-height: 1.55; color: var(--texte-doux); }
.journal-recent time { display: block; margin-bottom: 0.25rem; font-size: 0.78rem; color: var(--texte-sourd); font-variant-numeric: tabular-nums; }

.similaires { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.similaire { border-radius: var(--rayon); overflow: hidden; background: #2f2f2f; text-align: left; transition: background-color 0.2s; }
.similaire:hover { background: #3a3a3a; }
.similaire .carte { border-radius: 0; }
.similaire-texte { padding: 0.9rem 1rem 1.1rem; }
.similaire-texte .meta { font-size: 0.8rem; margin-bottom: 0.5rem; }
.similaire-texte p { margin: 0; font-size: 0.85rem; color: var(--texte-gris); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.apropos { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #404040; }
.apropos h3 { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 400; }
.apropos h3 strong { font-weight: 700; }
.apropos .infos div { margin-bottom: 0.5rem; }

/* ------------------------------------------------------------------ */
/* Notification                                                        */
/* ------------------------------------------------------------------ */

.toast {
  position: fixed; z-index: 80; left: 50%; bottom: 2rem;
  max-width: min(92vw, 34rem);
  padding: 0.9rem 1.2rem;
  border-radius: var(--rayon);
  background: #fff; color: #141414;
  font-size: 0.92rem; font-weight: 600; line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, calc(100% + 3rem));
  visibility: hidden;
  transition: transform 0.45s var(--sortie), visibility 0s linear 0.45s;
}
.toast.visible { transform: translate(-50%, 0); visibility: visible; transition: transform 0.45s var(--sortie); }

/* ------------------------------------------------------------------ */
/* Pied de page                                                        */
/* ------------------------------------------------------------------ */

.pied { max-width: 980px; margin: 0 auto; padding: 2rem var(--marge) 3rem; color: var(--texte-sourd); font-size: 0.8125rem; }
.pied ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.9rem; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.pied a { text-decoration: none; }
.pied a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pied p { margin: 0; }
.credits-liste { margin: 1.2rem 0 0; padding: 0; list-style: none; line-height: 1.7; }

/* ------------------------------------------------------------------ */
/* Chargement et erreur                                                */
/* ------------------------------------------------------------------ */

.chargement { display: grid; place-items: center; min-height: 100vh; }
.chargement .marque { font-size: 4.5rem; animation: pouls 1.4s ease-in-out infinite; }
@keyframes pouls { 50% { opacity: 0.35; } }
.erreur-page { display: grid; place-items: center; min-height: 100vh; padding: 2rem; text-align: center; }
.erreur-page h1 { font-size: 2rem; margin: 0 0 0.8rem; }
.erreur-page p { color: var(--texte-gris); margin: 0 0 1.6rem; }

/* ------------------------------------------------------------------ */
/* Tablette                                                            */
/* ------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .piste { grid-auto-columns: calc((100% - 2 * var(--marge) - 3 * 0.8vw) / 4); gap: 0.8vw; }
  .diapo-info { width: 55%; }
  .modal-corps { padding: 0.4rem 2rem 2.5rem; }
  .modal-titre { left: 2rem; right: 2rem; }
}

/* ------------------------------------------------------------------ */
/* Téléphone                                                           */
/* ------------------------------------------------------------------ */

@media (max-width: 740px) {
  :root { --marge: 16px; }
  .entete { height: 56px; gap: 1rem; background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent); }
  .entete.solide { background: rgba(20, 20, 20, 0.96); }
  .marque { font-size: 1.75rem; }
  .nav { display: none; }
  .nav-parcourir {
    display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none;
    position: fixed; top: 56px; left: 0; right: 0; z-index: 39;
    padding: 0.4rem var(--marge) 0.7rem;
    transition: transform 0.3s var(--sortie), background-color 0.3s;
  }
  .nav-parcourir::-webkit-scrollbar { display: none; }
  .entete.solide + .nav-parcourir { background: rgba(20, 20, 20, 0.96); }
  .nav-parcourir a {
    flex: none; padding: 0.35rem 0.9rem; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 999px;
    font-size: 0.85rem; font-weight: 600; text-decoration: none; color: #fff; background: rgba(20, 20, 20, 0.35);
  }
  .nav-parcourir a[aria-current="page"] { background: #fff; color: #000; border-color: #fff; }
  .recherche-champ { width: calc(100vw - 150px); }

  .affiche { height: auto; min-height: 0; max-height: none; padding: 112px var(--marge) 1.5rem; background: transparent; }
  .affiche-cadre {
    position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.6);
  }
  .diapo::before { background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85) 100%); }
  .diapo::after { display: none; }
  .diapo-image { object-position: center; }
  .diapo-info { left: 0; right: 0; bottom: 0; width: auto; padding: 0 1.1rem 1.2rem; text-align: center; }
  .diapo-marque { margin-bottom: 0.3rem; font-size: 1.7rem; }
  .diapo .titre-logo { font-size: 2.3rem; margin-bottom: 0.6rem; }
  .diapo .titre-logo.police-michroma { font-size: 1.35rem; }
  .diapo-statut { justify-content: center; font-size: 0.85rem; margin-bottom: 0.9rem; }
  .diapo-pitch, .diapo-cote { display: none; }
  .diapo .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .diapo .bouton { font-size: 1rem; padding: 0.55em 0.8em; }
  .defilement { position: static; justify-content: center; margin-top: 0.9rem; }
  .defilement button { width: 26px; background: rgba(255, 255, 255, 0.28); }
  .diapo-etiquettes { display: flex; justify-content: center; margin: 0 0 0.9rem; font-size: 0.8rem; }

  .rangees { margin-top: 0; }
  .page-sans-affiche .rangees { padding-top: 116px; }
  .rangee { margin-bottom: 1.6rem; }
  .rangee h2 { font-size: 1.05rem; }
  .piste { grid-auto-columns: 30vw; gap: 8px; scroll-snap-type: x proximity; }
  .rangee.continuer .piste { grid-auto-columns: 42vw; }
  .rangee:not(.continuer) .carte { aspect-ratio: 2 / 3; }
  .rangee:not(.continuer) .carte-titre { font-size: 0.82rem; left: 6%; right: 6%; text-align: center; }
  .rangee:not(.continuer) .carte-titre.police-cinzel { font-size: 0.74rem; letter-spacing: 0.01em; }
  .rangee:not(.continuer) .carte-titre.police-michroma { font-size: 0.7rem; letter-spacing: 0.03em; }
  .fleche { display: none; }
  .carte-exemple { font-size: 0.52rem; }

  .grille-page { padding-top: 116px; }
  .grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 8px; }
  .entete-page { position: static; padding: 112px var(--marge) 0; flex-wrap: wrap; gap: 0.8rem; }
  .page-format .affiche { padding-top: 1rem; }

  .voile { background: var(--fond-modal); }
  .modal { width: 100%; margin: 0; border-radius: 0; min-height: 100%; box-shadow: none; transform: translateY(40px); }
  .modal-titre { left: var(--marge); right: var(--marge); bottom: 8%; }
  .modal-titre .titre-logo { max-width: 100%; margin-bottom: 0.9rem; }
  .modal-corps { padding: 0.2rem var(--marge) 2.5rem; }
  .modal-grille { grid-template-columns: 1fr; gap: 1.2rem; }
  .seance { grid-template-columns: 7.5rem minmax(0, 1fr); padding: 1rem 0.6rem; gap: 0.9rem; }
  .seance-numero { display: none; }
  .similaires { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .similaire-texte p { display: none; }
  .distribution { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .distribution-pretires { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 741px) {
  .affiche-cadre { position: absolute; inset: 0; }
  .diapo-etiquettes { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .diapo.active .diapo-image { animation: none; }
}
