/* Nallium Pixa — salle obscure, lumière de projecteur.
 * Encre bleu nuit (pas de noir pur), accent « projecteur » orangé pour l'action principale,
 * violet Nallium en second. Les affiches sans image sont des compositions générées à partir
 * de la couleur du titre. */
:root {
  --ink: #0c0f1d;
  --ink-2: #121629;
  --surface: #181d33;
  --surface-2: #222844;
  --line: rgb(255 255 255 / 10%);
  --text: #f3f1ec;
  --muted: #9aa3c0;
  --beam: #ff7a45;
  --beam-2: #ffb36b;
  --violet: #7c6cff;
  --radius: 10px;
  --font: -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica Neue", "Arial", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--beam-2);
  outline-offset: 2px;
}

.logo {
  background: linear-gradient(100deg, var(--beam) 0%, var(--beam-2) 55%, #fff 100%);
  background-clip: text;
  color: transparent;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-transform: lowercase;
}

.logo.big {
  font-size: 3.4rem;
}

.btn {
  align-items: center;
  background: rgb(255 255 255 / 14%);
  border: 0;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 6px;
  padding: 11px 22px;
}

.btn:hover {
  background: rgb(255 255 255 / 22%);
}

.btn.primary {
  background: var(--text);
  color: var(--ink);
}

.btn.primary:hover {
  background: var(--beam-2);
}

.btn.ghost {
  background: transparent;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 35%);
}

.btn.danger {
  background: #c2353b;
}

.btn.small {
  padding: 6px 12px;
}

.muted,
.hint {
  color: var(--muted);
}

.err {
  color: #ff9a9a;
  min-height: 1.2em;
}

/* ---------------------------------------------------------------- connexion, profils */
.gate,
.who {
  align-items: center;
  background: radial-gradient(ellipse at 50% -10%, rgb(255 122 69 / 22%), transparent 60%), var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
  text-align: center;
}

.gate-card {
  max-width: 460px;
}

.gate-card h1 {
  font-size: 1.6rem;
  margin: 18px 0 8px;
}

.gate-card p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.who h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 24px 0 32px;
}

.who-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}

.who-item {
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 140px;
}

.who-item small {
  color: var(--muted);
  font-size: 0.75rem;
}

.who-avatar {
  align-items: center;
  aspect-ratio: 1;
  background: linear-gradient(145deg, var(--c, #555) 0%, color-mix(in srgb, var(--c, #555) 55%, #000) 100%);
  border-radius: 14px;
  display: flex;
  font-size: 3rem;
  font-weight: 900;
  justify-content: center;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}

.who-item:hover .who-avatar {
  box-shadow: 0 0 0 4px var(--text);
  transform: translateY(-3px);
}

.who-item.add .who-avatar {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--line);
  color: var(--muted);
}

.lock {
  bottom: 6px;
  font-size: 1rem;
  position: absolute;
  right: 8px;
}

.age-note {
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--muted);
  line-height: 1.5;
  margin-top: 40px;
  max-width: 560px;
  padding: 16px 20px;
  text-align: left;
}

.age-note label {
  color: var(--text);
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-right: 10px;
}

.age-note input {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px;
}

/* ---------------------------------------------------------------- barre du haut */
.top {
  align-items: center;
  background: linear-gradient(180deg, rgb(12 15 29 / 95%) 0%, rgb(12 15 29 / 0%) 100%);
  display: flex;
  gap: 28px;
  left: 0;
  padding: 14px 4vw;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.top nav {
  display: flex;
  gap: 20px;
}

.top nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.top nav a.on,
.top nav a:hover {
  color: var(--text);
}

.search {
  margin-left: auto;
}

.search input {
  background: rgb(0 0 0 / 35%);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  padding: 8px 14px;
  width: 200px;
}

.me {
  background: var(--c, #e50914);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  height: 36px;
  width: 36px;
}

.me-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  position: absolute;
  right: 4vw;
  top: 60px;
  width: 240px;
}

.me-menu[hidden] {
  display: none;
}

.me-menu small {
  color: var(--muted);
  margin-bottom: 6px;
}

.me-menu button {
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.me-menu button:hover {
  background: var(--surface-2);
}

/* ---------------------------------------------------------------- à la une */
.page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.hero {
  background-position: center;
  background-size: cover;
  display: flex;
  min-height: 78vh;
  position: relative;
}

.hero::after {
  background: linear-gradient(90deg, var(--ink) 0%, rgb(12 15 29 / 75%) 38%, rgb(12 15 29 / 0%) 70%), linear-gradient(0deg, var(--ink) 0%, rgb(12 15 29 / 0%) 35%);
  content: "";
  inset: 0;
  position: absolute;
}

/* sans image : faisceau de projecteur dans la couleur du titre */
.hero.gen {
  background: radial-gradient(ellipse 60% 90% at 78% 30%, color-mix(in srgb, var(--c) 80%, #fff 10%) 0%, transparent 70%), conic-gradient(from 200deg at 100% 0%, transparent 0deg, rgb(255 179 107 / 18%) 12deg, transparent 26deg), var(--ink-2);
}

.hero-in {
  align-self: flex-end;
  max-width: 620px;
  padding: 0 4vw 16vh;
  position: relative;
  z-index: 1;
}

.kicker {
  color: var(--beam-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0 0 16px;
}

.meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
}

.syn {
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 22px;
  max-width: 54ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------------------------------------------------------- signalétique */
.rating {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  color: #111;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.rating.big {
  font-size: 0.82rem;
  height: 32px;
  width: 32px;
}

.rating.rTP {
  background: #1f9d55;
  border-radius: 6px;
  color: #fff;
  width: 30px;
}

.rating.r10 {
  box-shadow: inset 0 0 0 3px #1f6fd1;
}

.rating.r12 {
  box-shadow: inset 0 0 0 3px #d97706;
}

.rating.r16 {
  box-shadow: inset 0 0 0 3px #dc2626;
}

.rating.r18 {
  background: #111;
  box-shadow: inset 0 0 0 3px #dc2626;
  color: #fff;
}

/* ---------------------------------------------------------------- rangées */
.rows {
  margin-top: -8vh;
  position: relative;
  z-index: 2;
}

.row {
  margin: 0 0 28px;
}

.row h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 4vw 10px;
}

.rail-wrap {
  position: relative;
}

.rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 4vw 14px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail-btn {
  background: rgb(12 15 29 / 70%);
  border: 0;
  bottom: 14px;
  color: var(--text);
  cursor: pointer;
  font-size: 2rem;
  opacity: 0;
  position: absolute;
  top: 6px;
  transition: opacity 0.2s;
  width: 4vw;
  z-index: 3;
}

.rail-btn.prev {
  left: 0;
}

.rail-btn.next {
  right: 0;
}

.rail-wrap:hover .rail-btn {
  opacity: 1;
}

.card {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 6px;
  position: relative;
  scroll-snap-align: start;
  width: clamp(130px, 13vw, 190px);
}

.card b {
  font-size: 0.85rem;
  font-weight: 600;
}

.card .ep {
  color: var(--muted);
  font-size: 0.75rem;
}

.poster {
  aspect-ratio: 2 / 3;
  background: var(--surface);
  border-radius: 8px;
  display: block;
  overflow: hidden;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover .poster,
.card:focus-visible .poster {
  box-shadow: 0 14px 30px rgb(0 0 0 / 55%);
  transform: scale(1.05);
}

.poster img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.poster .art {
  inset: 0;
  position: absolute;
}

.art.a0 {
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 70%, #fff 30%) 0 18%, transparent 19%), linear-gradient(170deg, var(--c), color-mix(in srgb, var(--c) 40%, #000) 90%);
}

.art.a1 {
  background: repeating-linear-gradient(115deg, rgb(255 255 255 / 7%) 0 10px, transparent 10px 26px), linear-gradient(200deg, color-mix(in srgb, var(--c) 85%, #fff 15%), color-mix(in srgb, var(--c) 30%, #000) 85%);
}

.art.a2 {
  background: conic-gradient(from 160deg at 70% 35%, color-mix(in srgb, var(--c) 60%, #fff 40%), var(--c) 25%, color-mix(in srgb, var(--c) 35%, #000) 60%, var(--c));
}

.art.a3 {
  background: radial-gradient(ellipse 120% 60% at 50% 110%, color-mix(in srgb, var(--c) 60%, #ffb36b 40%) 0 40%, transparent 41%), linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, #000), var(--c));
}

.ptitle {
  bottom: 12px;
  font-size: 1.05rem;
  font-weight: 900;
  left: 12px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  position: absolute;
  right: 12px;
  text-shadow: 0 2px 10px rgb(0 0 0 / 50%);
}

.pr {
  position: absolute;
  right: 8px;
  top: 8px;
}

.bar {
  background: rgb(255 255 255 / 25%);
  border-radius: 2px;
  display: block;
  height: 3px;
  overflow: hidden;
}

.bar i {
  background: var(--beam);
  display: block;
  height: 100%;
}

.foot,
.loading,
.empty {
  color: var(--muted);
  padding: 0 4vw;
}

.loading,
.empty {
  padding-top: 120px;
}

.empty h2 {
  color: var(--text);
}

/* ---------------------------------------------------------------- grilles */
.grid-page {
  padding: 96px 4vw 40px;
}

.grid {
  display: grid;
  gap: 18px 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.grid .card {
  width: auto;
}

/* ---------------------------------------------------------------- fenêtres */
.dialog-back {
  align-items: flex-start;
  background: rgb(4 6 14 / 72%);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow-y: auto;
  padding: 6vh 16px;
  position: fixed;
  z-index: 50;
}

.dialog {
  background: var(--surface);
  border-radius: 14px;
  max-width: 440px;
  padding: 24px;
  width: 100%;
}

.dialog.wide {
  max-width: 860px;
  padding: 0;
}

.dialog.wide > h2,
.dialog.wide > p,
.dialog.wide > form {
  margin-left: 24px;
  margin-right: 24px;
}

.dialog.wide > h2 {
  margin-top: 24px;
}

.dialog.wide > form {
  margin-bottom: 24px;
}

.dialog input:not([type="checkbox"], [type="color"]),
.dialog select,
.dialog textarea {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 10px;
  width: 100%;
}

#pin {
  font-size: 1.6rem;
  letter-spacing: 0.6em;
  margin-bottom: 12px;
  text-align: center;
}

.form {
  display: grid;
  gap: 12px;
}

.form.two {
  grid-template-columns: 1fr 1fr;
}

.form .full {
  grid-column: 1 / -1;
}

.form label {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  gap: 5px;
}

.form label.check,
.form .chip {
  align-items: center;
  color: var(--text);
  flex-direction: row;
}

.form fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.form legend {
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-hero {
  background-position: center;
  background-size: cover;
  border-radius: 14px 14px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 340px;
  padding: 24px 32px;
  position: relative;
}

.detail-hero.gen {
  background: radial-gradient(ellipse 70% 100% at 80% 20%, var(--c) 0%, transparent 70%), var(--ink-2);
}

.detail-hero::after {
  background: linear-gradient(0deg, var(--surface) 0%, transparent 70%);
  content: "";
  inset: 0;
  position: absolute;
}

.detail-hero > * {
  position: relative;
  z-index: 1;
}

.detail-hero h1 {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.close {
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  height: 36px;
  position: absolute !important;
  right: 16px;
  top: 16px;
  width: 36px;
}

.detail-body {
  line-height: 1.55;
  padding: 8px 32px 32px;
}

.descr {
  color: var(--beam-2);
  font-size: 0.85rem;
}

.seasons select {
  max-width: 260px;
}

.episodes {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.episodes a {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px 14px;
  grid-template-columns: 32px 1fr auto;
  padding: 14px 6px;
}

.episodes a:hover {
  background: var(--surface-2);
}

.episodes .n {
  color: var(--muted);
  font-size: 1.4rem;
  grid-row: span 2;
}

.episodes small {
  color: var(--muted);
}

.episodes p {
  color: var(--muted);
  font-size: 0.85rem;
  grid-column: 2 / -1;
  margin: 0;
}

/* ---------------------------------------------------------------- lecteur */
.player {
  background: #000;
  height: 100vh;
  position: relative;
}

.player video {
  height: 100%;
  width: 100%;
}

.player .back {
  background: rgb(0 0 0 / 55%);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  height: 44px;
  left: 20px;
  position: absolute;
  top: 18px;
  width: 44px;
  z-index: 2;
}

.player .now {
  color: #ddd;
  left: 76px;
  margin: 0;
  position: absolute;
  top: 28px;
  z-index: 2;
}

.novideo {
  align-items: center;
  color: var(--muted);
  display: flex;
  height: 100%;
  justify-content: center;
}

/* ---------------------------------------------------------------- catalogue (admin) */
.admin {
  padding: 96px 4vw 40px;
}

.admin-bar {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.admin-table {
  border-collapse: collapse;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.pill {
  background: rgb(255 122 69 / 20%);
  border-radius: 999px;
  color: var(--beam-2);
  font-size: 0.72rem;
  padding: 2px 8px;
}

#toast {
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  left: 50%;
  position: fixed;
  transform: translateX(-50%);
  z-index: 80;
}

#toast div {
  background: var(--text);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  padding: 10px 18px;
}

@media (max-width: 760px) {
  .top {
    gap: 12px;
  }

  .top nav {
    gap: 12px;
    overflow-x: auto;
  }

  .search input {
    width: 120px;
  }

  .form.two {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Sources des informations (25/11/2026) */
.credits {
  font-size: 0.78rem;
  opacity: 0.65;
}

.credits a {
  color: inherit;
}

/* ---------------------------------------------------------------- lecteur (js/player.js) */
.pl {
  --scrim: rgb(5 7 16 / 78%);
  --cue-size: clamp(1.1rem, 2.6vw, 2.1rem);
  --cue-color: #fff;

  background: #000;
  color: #fff;
  height: 100vh;
  outline: none;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.pl:not(.pl-awake) {
  cursor: none;
}

.pl-video {
  display: block;
  height: 100%;
  width: 100%;
}

.pl-top,
.pl-bar {
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  transition: opacity 0.25s ease;
  z-index: 3;
}

.pl-awake .pl-top,
.pl-awake .pl-bar {
  opacity: 1;
}

.pl-top {
  align-items: center;
  background: linear-gradient(var(--scrim), transparent);
  display: flex;
  gap: 14px;
  padding: 18px 24px 48px;
  top: 0;
}

.pl-name b {
  display: block;
  font-size: 1.15rem;
  font-weight: 650;
}

.pl-name span {
  color: #c9cde0;
  display: block;
  font-size: 0.92rem;
  margin-top: 2px;
}

.pl-bar {
  background: linear-gradient(transparent, var(--scrim) 55%);
  bottom: 0;
  padding: 56px 24px 14px;
}

.pl-row {
  align-items: center;
  display: flex;
  gap: 4px;
}

.pl-gap {
  flex: 1;
}

.pl-btn {
  align-items: center;
  background: none;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: 8px;
  height: 44px;
  justify-content: center;
  min-width: 44px;
  padding: 0 8px;
}

.pl-btn svg {
  fill: currentcolor;
  height: 26px;
  width: 26px;
}

.pl-btn:hover {
  background: rgb(255 255 255 / 12%);
}

.pl-btn:focus-visible,
.pl-opt:focus-visible,
.pl-chip:focus-visible,
.pl-seek:focus-visible,
.pl-ep:focus-visible,
.pl-upnext button:focus-visible {
  outline: 2px solid var(--beam-2);
  outline-offset: 2px;
}

.pl-txt span {
  font-size: 0.9rem;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-rate {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  min-width: 52px;
}

.pl-time {
  color: #d9dcea;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  margin-left: 8px;
  white-space: nowrap;
}

.pl-vol {
  align-items: center;
  display: flex;
}

.pl-volr {
  accent-color: var(--beam);
  margin: 0;
  opacity: 0;
  transition: opacity 0.2s, width 0.2s;
  width: 0;
}

.pl-vol:hover .pl-volr,
.pl-vol:focus-within .pl-volr {
  opacity: 1;
  width: 90px;
}

/* barre de lecture : fine au repos, épaisse sous le pointeur */
.pl-seek {
  cursor: pointer;
  height: 18px;
  margin-bottom: 6px;
  position: relative;
  touch-action: none;
}

.pl-seek::before,
.pl-buf,
.pl-done {
  border-radius: 3px;
  height: 4px;
  left: 0;
  position: absolute;
  top: 7px;
  transition: height 0.15s, top 0.15s;
}

.pl-seek::before {
  background: rgb(255 255 255 / 22%);
  content: "";
  right: 0;
}

.pl-buf {
  background: rgb(255 255 255 / 38%);
}

.pl-done {
  background: var(--beam);
}

.pl-seek:hover::before,
.pl-seek:hover .pl-buf,
.pl-seek:hover .pl-done {
  height: 7px;
  top: 5.5px;
}

.pl-knob {
  background: var(--beam);
  border-radius: 50%;
  height: 15px;
  position: absolute;
  top: 1.5px;
  transform: translateX(-50%) scale(0);
  transition: transform 0.15s;
  width: 15px;
}

.pl-seek:hover .pl-knob,
.pl-seek:focus-visible .pl-knob {
  transform: translateX(-50%) scale(1);
}

.pl-tip {
  background: var(--ink-2);
  border-radius: 6px;
  bottom: 22px;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  padding: 4px 7px;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%);
}

.pl-seek:hover .pl-tip {
  opacity: 1;
}

/* sous-titres dessinés par Pixa : remontent au-dessus des commandes */
.pl-cues {
  align-items: center;
  bottom: 7vh;
  display: flex;
  flex-direction: column;
  gap: 2px;
  left: 8%;
  pointer-events: none;
  position: absolute;
  right: 8%;
  text-align: center;
  transition: bottom 0.25s ease;
  z-index: 2;
}

.pl-awake .pl-cues {
  bottom: 128px;
}

.pl-cue {
  color: var(--cue-color);
  font-size: var(--cue-size);
  font-weight: 600;
  line-height: 1.3;
  padding: 0 0.35em;
  text-shadow: 0 0 4px #000, 0 2px 3px #000, 0 0 1px #000;
  white-space: pre-line;
}

.pl[data-size="s"] {
  --cue-size: clamp(0.95rem, 2vw, 1.6rem);
}

.pl[data-size="l"] {
  --cue-size: clamp(1.4rem, 3.4vw, 2.8rem);
}

.pl[data-color="yellow"] {
  --cue-color: #ffe36e;
}

.pl[data-back="band"] .pl-cue {
  background: rgb(0 0 0 / 72%);
  border-radius: 4px;
  box-decoration-break: clone;
  text-shadow: none;
}

.pl[data-back="box"] .pl-cues .pl-cue:first-child {
  border-radius: 6px 6px 0 0;
}

.pl[data-back="box"] .pl-cue {
  background: #000;
  padding: 0.1em 0.6em;
  text-shadow: none;
}

/* retour visuel au centre (lecture, pause, ±10 s, langue choisie) */
.pl-flash {
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.pl-flash svg {
  background: rgb(0 0 0 / 45%);
  border-radius: 50%;
  fill: #fff;
  height: 76px;
  padding: 16px;
  width: 76px;
}

.pl-say {
  background: rgb(0 0 0 / 70%);
  border-radius: 8px;
  display: block;
  font-size: 1.05rem;
  padding: 10px 16px;
  white-space: nowrap;
}

.pl-flash.on {
  animation: pl-flash 0.7s ease-out;
}

@keyframes pl-flash {
  0% {
    opacity: 1;
  }

  60% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.pl-spin {
  animation: pl-spin 0.9s linear infinite;
  border: 4px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  border-top-color: var(--beam);
  display: none;
  height: 54px;
  left: calc(50% - 27px);
  position: absolute;
  top: calc(50% - 27px);
  width: 54px;
}

.pl-wait .pl-spin {
  display: block;
}

@keyframes pl-spin {
  to {
    transform: rotate(1turn);
  }
}

/* panneaux : audio et sous-titres, épisodes */
.pl-panel {
  backdrop-filter: blur(14px);
  background: rgb(18 22 41 / 94%);
  border: 1px solid var(--line);
  border-radius: 14px;
  bottom: 96px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 55%);
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding: 18px 18px 14px;
  position: absolute;
  right: 24px;
  width: min(620px, calc(100vw - 48px));
  z-index: 4;
}

.pl-panel h3 {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 8px 10px;
}

.pl-cols {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.pl-opt {
  align-items: baseline;
  background: none;
  border: 0;
  border-radius: 8px;
  color: #e9eaf2;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  font: inherit;
  font-size: 1rem;
  gap: 2px 10px;
  padding: 9px 10px 9px 34px;
  position: relative;
  text-align: left;
  width: 100%;
}

.pl-opt:hover {
  background: rgb(255 255 255 / 7%);
}

.pl-opt[aria-checked="true"] {
  color: #fff;
  font-weight: 650;
}

.pl-opt[aria-checked="true"]::before {
  color: var(--beam);
  content: "✓";
  font-weight: 700;
  left: 12px;
  position: absolute;
}

.pl-opt small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

.pl-none {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 6px 10px;
}

.pl-look {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 10px;
}

.pl-look summary {
  color: #d9dcea;
  cursor: pointer;
  font-size: 0.92rem;
  padding: 6px 10px;
}

.pl-looks {
  align-items: center;
  display: grid;
  gap: 8px 14px;
  grid-template-columns: max-content 1fr;
  padding: 8px 10px 4px;
}

.pl-looks > span {
  color: var(--muted);
  font-size: 0.85rem;
}

.pl-looks > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pl-chip {
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 999px;
  color: #e9eaf2;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
}

.pl-chip[aria-checked="true"] {
  background: rgb(255 122 69 / 16%);
  border-color: var(--beam);
  color: #fff;
}

.pl-sample {
  align-items: center;
  background: linear-gradient(135deg, #2c3557, #4a3b2f);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  margin: 10px 10px 4px;
  min-height: 78px;
}

.pl-sample .pl-cue {
  font-size: calc(var(--cue-size) * 0.7);
}

.pl-eps {
  width: min(420px, calc(100vw - 48px));
}

.pl-eps ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pl-ep {
  border-radius: 8px;
  color: #e9eaf2;
  display: block;
  padding: 9px 10px;
}

.pl-ep:hover {
  background: rgb(255 255 255 / 7%);
}

.pl-ep b {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-right: 6px;
}

.pl-ep.on {
  background: rgb(255 122 69 / 14%);
  color: #fff;
}

/* épisode suivant à la fin */
.pl-upnext {
  background: rgb(18 22 41 / 95%);
  border: 1px solid var(--line);
  border-radius: 14px;
  bottom: 110px;
  padding: 16px 18px;
  position: absolute;
  right: 24px;
  width: min(360px, calc(100vw - 48px));
  z-index: 5;
}

.pl-upnext p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 4px;
}

.pl-upnext b {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.pl-upnext div {
  display: flex;
  gap: 8px;
}

.pl-upnext button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 9px 14px;
}

.pl-go {
  background: var(--beam);
  color: #1a0d05;
}

.pl-stay {
  background: var(--surface-2);
  color: #fff;
}

.pl-upnext span {
  color: var(--muted);
  display: block;
  font-size: 0.8rem;
  margin-top: 10px;
}

@media (width <= 720px) {
  .pl-top,
  .pl-bar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .pl-txt span,
  .pl-vol .pl-volr,
  [data-skip] {
    display: none;
  }

  .pl-cols {
    grid-template-columns: 1fr;
  }

  .pl-panel,
  .pl-upnext {
    bottom: 86px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .pl-awake .pl-cues {
    bottom: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pl-top,
  .pl-bar,
  .pl-cues,
  .pl-volr {
    transition: none;
  }

  .pl-flash.on {
    animation: none;
  }
}

/* ---------------------------------------------------------------- catégories */
.row-more {
  align-items: baseline;
  display: inline-flex;
  gap: 10px;
}

.row-more span {
  color: var(--beam-2);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s, transform 0.18s;
}

.row-more:hover span,
.row-more:focus-visible span {
  opacity: 1;
  transform: none;
}

.cats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.cat {
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 70%, var(--ink)) 0%, var(--ink-2) 75%);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 2px;
  grid-template-rows: 172px auto auto;
  overflow: hidden;
  padding: 0 18px 16px;
  transition: border-color 0.18s, transform 0.18s;
}

.cat:hover,
.cat:focus-visible {
  border-color: color-mix(in srgb, var(--c) 60%, #fff 25%);
  transform: translateY(-3px);
}

.cat b {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cat small {
  color: var(--muted);
  font-size: 0.85rem;
}

/* trois affiches en éventail, comme sorties d'un présentoir */
.cat-stack {
  position: relative;
}

.cat-p {
  bottom: 14px;
  position: absolute;
  width: 78px;
}

.cat-p .poster {
  box-shadow: 0 10px 24px rgb(0 0 0 / 50%);
}

.cat-p .ptitle {
  font-size: 0.6rem;
  left: 6px;
  right: 6px;
}

.cat-p .pr {
  display: none;
}

.cat-p.p0 {
  left: 0;
  transform: rotate(-7deg);
  z-index: 1;
}

.cat-p.p1 {
  left: 62px;
  transform: translateY(-10px);
  z-index: 2;
}

.cat-p.p2 {
  left: 124px;
  transform: rotate(7deg);
  z-index: 1;
}

.cat-page h1 {
  margin: 4px 0 14px;
}

.crumb {
  font-size: 0.9rem;
  margin: 0;
}

.crumb a {
  color: var(--muted);
}

.crumb a:hover {
  color: var(--text);
}

.cat-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 14px;
}

.seg {
  background: var(--surface);
  border-radius: 999px;
  display: inline-flex;
  padding: 3px;
}

.seg button {
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  padding: 7px 16px;
}

.seg button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

.sort {
  color: var(--muted);
  font-size: 0.9rem;
}

.sort select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  margin-left: 6px;
  padding: 6px 10px;
}

.cat-others {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.cat-others a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d9dcea;
  flex: 0 0 auto;
  font-size: 0.88rem;
  padding: 6px 14px;
}

.cat-others a:hover {
  border-color: color-mix(in srgb, var(--c) 70%, #fff 20%);
}

.cat-others a[aria-current="page"] {
  background: color-mix(in srgb, var(--c) 55%, var(--ink));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.count {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.genres a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d9dcea;
  font-size: 0.82rem;
  padding: 4px 12px;
}

.genres a:hover {
  border-color: var(--beam-2);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .cat,
  .row-more span {
    transition: none;
  }
}

/* ---------------------------------------------------------------- extrait en boucle, image tirée de la vidéo */
.hero > .bg-clip,
.detail-hero > .bg-clip {
  border-radius: inherit;
  height: 100%;
  inset: 0;
  object-fit: cover;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 0;
}

.poster.still::after {
  background: linear-gradient(0deg, rgb(8 10 20 / 88%) 0%, rgb(8 10 20 / 0%) 55%);
  content: "";
  inset: 0;
  position: absolute;
}

.poster.still .ptitle {
  z-index: 1;
}

.poster.still .pr {
  z-index: 2;
}

/* ---------------------------------------------------------------- listes : images du titre (16:9) */
.shot-pic {
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border-radius: 8px;
  display: block;
  overflow: hidden;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.shot-pic img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.shot-pic .art {
  inset: 0;
  position: absolute;
}

.shot-pic::after {
  background: linear-gradient(0deg, rgb(8 10 20 / 85%) 0%, rgb(8 10 20 / 0%) 55%);
  content: "";
  inset: 0;
  position: absolute;
}

.shot-t {
  bottom: 10px;
  font-size: 1rem;
  font-weight: 800;
  left: 12px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  position: absolute;
  right: 12px;
  z-index: 1;
}

.shot-pic .pr {
  z-index: 1;
}

.shot {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shot small {
  color: var(--muted);
  font-size: 0.8rem;
}

.shot:hover .shot-pic,
.shot:focus-visible .shot-pic,
.card.wide:hover .shot-pic,
.card.wide:focus-visible .shot-pic {
  box-shadow: 0 14px 30px rgb(0 0 0 / 55%);
  transform: scale(1.04);
}

.shots {
  display: grid;
  gap: 22px 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card.wide {
  width: clamp(220px, 21vw, 320px);
}

.list-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.list-head h1 {
  margin: 0;
}

.group {
  margin-bottom: 34px;
}

.group h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 12px;
}

.group h2 a:hover {
  color: var(--beam-2);
}

.group h2 small {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .shot-pic {
    transition: none;
  }
}

/* ---------------------------------------------------------------- recommandations de la fiche */
.similar {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}

.similar h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 12px;
}

.similar .shots {
  gap: 16px 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* son de la scène jouée à l'ouverture de la fiche */
.detail-hero > .scene-sound {
  backdrop-filter: blur(8px);
  background: rgb(8 10 20 / 55%);
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 999px;
  bottom: 18px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  left: auto;
  padding: 7px 14px;
  position: absolute;
  right: 18px;
  z-index: 2;
}

.detail-hero > .scene-sound[hidden] {
  display: none;
}

.detail-hero > .scene-sound:focus-visible {
  outline: 2px solid var(--beam-2);
  outline-offset: 2px;
}
