:root {
  --ink: #12100e;
  --paper: #e8dfd0;
  --muted: #9a8f7d;
  --line: rgba(232, 223, 208, 0.14);
  --amber: #e2a34a;
  --amber-dim: #b8792a;
  --row-hover: rgba(226, 163, 74, 0.12);
  --surface: rgba(232, 223, 208, 0.04);
  --surface-2: rgba(232, 223, 208, 0.07);
  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.2);
  --elev-2: 0 4px 8px rgba(0, 0, 0, 0.32), 0 2px 4px rgba(0, 0, 0, 0.22);
  --elev-3: 0 12px 28px rgba(0, 0, 0, 0.45), 0 4px 10px rgba(0, 0, 0, 0.28);
  --touch: 48px;
  --radius: 4px;
  --font-display: "Archivo Black", Impact, sans-serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --font-horreur: "Rubik Wet Paint", "Archivo Black", sans-serif;
  --font-action: "Black Ops One", "Archivo Black", sans-serif;
  --font-comedie: "Fredoka", "DM Sans", sans-serif;
  --font-thriller: "Playfair Display", Georgia, serif;
  --font-scifi: "Orbitron", "Archivo Black", sans-serif;
  --font-drame: "Playfair Display", Georgia, serif;
  --font-fantastique: "Cinzel", Georgia, serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--paper);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(226, 163, 74, 0.22), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(90, 40, 20, 0.35), transparent 50%),
    linear-gradient(165deg, #1c1712 0%, var(--ink) 45%, #0a0908 100%);
  background-attachment: fixed;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.billboard,
.panel,
.foot,
.detail {
  position: relative;
  z-index: 1;
}

/* Hero plein écran — style carrousel type Netflix */
.billboard {
  width: 100%;
  margin: 0 0 0.25rem;
}

.billboard-frame {
  position: relative;
  width: 100%;
  min-height: clamp(22rem, 72vh, 44rem);
  overflow: hidden;
  background: #0a0908;
}

.billboard-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  opacity: 0;
  transition: opacity 1s ease;
  will-change: opacity;
}

.billboard-img.is-front {
  opacity: 1;
}

.billboard-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 6, 4, 0.94) 0%, rgba(8, 6, 4, 0.72) 38%, rgba(8, 6, 4, 0.28) 62%, rgba(8, 6, 4, 0.08) 100%),
    linear-gradient(0deg, rgba(8, 6, 4, 0.96) 0%, rgba(8, 6, 4, 0.35) 38%, transparent 62%),
    linear-gradient(180deg, rgba(8, 6, 4, 0.82) 0%, transparent 42%);
}

.billboard-top {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: clamp(1rem, 3vw, 1.75rem) clamp(1.25rem, 5vw, 4rem) 0;
}

.billboard-top .brand-row {
  margin-bottom: 0;
}

.billboard-top .brand {
  font-size: clamp(1.6rem, 5.5vw, 3.25rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

.billboard-season {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber, #e2a34a);
  text-shadow: 0 0 20px rgba(226, 163, 74, 0.35);
}

.billboard-copy {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  max-width: min(40rem, 92vw);
  padding: 0 clamp(1.25rem, 5vw, 4rem) clamp(5.5rem, 12vw, 7rem);
}

.billboard-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a227;
}

.billboard-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5.5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.75);
}

.billboard-meta {
  margin: 0.55rem 0 0;
  color: rgba(232, 223, 208, 0.78);
  font-size: 0.92rem;
  font-weight: 500;
}

.billboard-plot {
  margin: 0.85rem 0 0;
  max-width: 38ch;
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
  line-height: 1.45;
  color: rgba(232, 223, 208, 0.92);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.billboard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.billboard-trailer {
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  font-size: 0.95rem;
  border-color: rgba(232, 223, 208, 0.35);
}

.billboard-play {
  min-height: 44px;
  padding: 0.55rem 1.35rem;
  font-size: 0.95rem;
  box-shadow: var(--elev-2);
}

.billboard-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  border: 1px solid rgba(232, 223, 208, 0.22);
  background: rgba(8, 6, 4, 0.45);
  color: var(--paper);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.billboard-arrow:hover {
  background: rgba(226, 163, 74, 0.22);
  border-color: rgba(226, 163, 74, 0.55);
}

.billboard-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.billboard-prev {
  left: clamp(0.5rem, 2vw, 1.25rem);
}

.billboard-next {
  right: clamp(0.5rem, 2vw, 1.25rem);
}

.ico-flip {
  transform: scaleX(-1);
}

.billboard-rail {
  position: absolute;
  z-index: 3;
  left: clamp(1.25rem, 5vw, 4rem);
  right: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(0.85rem, 2.5vw, 1.35rem);
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.billboard-dot {
  appearance: none;
  flex: 0 0 auto;
  width: 3.1rem;
  height: 0.22rem;
  border: 0;
  border-radius: 999px;
  background: rgba(232, 223, 208, 0.28);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
}

.billboard-dot:hover {
  background: rgba(232, 223, 208, 0.5);
}

.billboard-dot.has-thumb {
  width: 2.65rem;
  height: 3.75rem;
  border-radius: 4px;
  background-size: cover;
  background-position: center top;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.billboard-dot.has-thumb.is-active {
  outline: 2px solid var(--amber, #e2a34a);
  outline-offset: 2px;
}

.billboard-dot.is-active {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(226, 163, 74, 0.55);
  transform: scaleY(1.35);
}

.panel-intro {
  margin: 0 0 1rem;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  animation: brand-in 0.9s ease-out both;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: var(--elev-1);
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 12vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--amber);
  text-shadow: 0 0 40px rgba(226, 163, 74, 0.25);
}

.brand-sm {
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 0.5rem;
}

.panel {
  margin: 0 auto 3rem;
  padding-left: clamp(1.25rem, 5vw, 4rem);
  padding-right: clamp(1.25rem, 5vw, 4rem);
  max-width: 72rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  animation: rise 0.8s 0.35s ease-out both;
}

.panel.library {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 2rem;
}

.panel.library .panel-intro,
.panel.library .toolbar {
  margin-left: clamp(1.25rem, 5vw, 4rem);
  margin-right: clamp(1.25rem, 5vw, 4rem);
}

.list.is-legacy {
  display: none;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.elevation-1 {
  box-shadow: var(--elev-1);
}
.elevation-2 {
  box-shadow: var(--elev-2);
}
.elevation-3 {
  box-shadow: var(--elev-3);
}

.ico {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.2em;
}

.toolbar {
  display: grid;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .toolbar {
    grid-template-columns: auto 1fr auto;
  }
}

.tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  min-height: var(--touch);
  padding: 0 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.tab:hover {
  color: var(--paper);
  border-color: rgba(226, 163, 74, 0.45);
  background: var(--surface-2);
}

.tab:active {
  transform: scale(0.98);
}

.tab.is-active {
  color: var(--ink);
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: var(--elev-1);
}

.search {
  position: relative;
  display: block;
}

.search-ico {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--paper);
  font: inherit;
  min-height: var(--touch);
  padding: 0.55rem 0.85rem 0.55rem 2.5rem;
  outline: none;
  border-radius: var(--radius);
}

.search input:focus {
  border-color: var(--amber-dim);
  box-shadow: 0 0 0 2px rgba(226, 163, 74, 0.25);
}

.search input::placeholder {
  color: var(--muted);
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

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

.row {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 0.75rem 0.5rem;
  min-height: 4.75rem;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.row:hover {
  background: var(--row-hover);
}

.row:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.row:active {
  background: rgba(226, 163, 74, 0.16);
}

.thumb {
  width: 4.5rem;
  height: 6.5rem;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  display: block;
}

.thumb-ph {
  width: 4.5rem;
  height: 6.5rem;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.65rem;
  text-align: center;
  padding: 0.25rem;
}

.row-main {
  min-width: 0;
}

.title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plot-line {
  margin: 0.35rem 0 0;
  color: var(--paper);
  opacity: 0.72;
  font-size: 0.88rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kind {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.45rem;
  color: var(--amber);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}

.kind .ico {
  width: 0.9rem;
  height: 0.9rem;
}

.scores-inline {
  color: var(--amber);
  font-weight: 600;
  font-size: 0.82rem;
}

.actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn {
  appearance: none;
  border: 1px solid var(--amber-dim);
  background: transparent;
  color: var(--amber);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

.btn:hover {
  background: var(--amber);
  color: var(--ink);
  box-shadow: var(--elev-1);
}

.btn:active {
  transform: scale(0.97);
}

.btn-filled {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
  box-shadow: var(--elev-1);
}

.btn-filled:hover {
  background: #ebb35c;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: var(--paper);
  background: var(--surface-2);
  color: var(--paper);
  box-shadow: none;
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  color: var(--amber);
  border-color: var(--amber-dim);
  background: var(--row-hover);
}

.empty {
  color: var(--muted);
  padding: 2rem 0.35rem;
}

.hidden {
  display: none !important;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 clamp(1.25rem, 5vw, 4rem) 2.5rem;
  max-width: 72rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Detail */
.detail {
  position: relative;
  margin: 0;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  animation: rise 0.5s ease-out both;
}

.detail-world {
  position: relative;
  min-height: 100vh;
  background: #120c08;
}

.detail-backdrop {
  position: absolute;
  inset: -8%;
  z-index: 0;
  background-size: cover;
  background-position: center 22%;
  filter: blur(28px) saturate(1.15) brightness(0.35);
  transform: scale(1.08);
  opacity: 0.85;
}

.detail-shelf-bg {
  position: absolute;
  inset: -4%;
  z-index: 0;
  pointer-events: none;
  filter: blur(8px) saturate(0.7) brightness(0.42);
  transform: scale(1.06);
}

.detail-shelf-bg .shelf-track {
  overflow: hidden;
  justify-content: center;
}

.detail-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 6, 4, 0.92) 0%, rgba(8, 6, 4, 0.72) 42%, rgba(8, 6, 4, 0.35) 68%, rgba(8, 6, 4, 0.15) 100%),
    linear-gradient(180deg, rgba(8, 6, 4, 0.65) 0%, transparent 22%, rgba(8, 6, 4, 0.75) 100%);
}

.detail .back {
  position: relative;
  z-index: 3;
  margin: clamp(1rem, 3vw, 1.75rem) clamp(1.25rem, 5vw, 4rem) 0;
}

.detail-stage {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1.75rem;
  padding: 1rem clamp(1.25rem, 5vw, 4rem) 3.5rem;
  align-items: center;
}

@media (max-width: 859px) {
  .detail-stage {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-bottom: 4.5rem;
  }

  .detail-hero {
    min-height: 16rem;
    order: 0;
  }

  .detail-sheet {
    order: 1;
  }

  .detail .back {
    margin-bottom: 0.25rem;
  }
}

body.is-fiche .foot {
  position: relative;
  z-index: 2;
}

@media (min-width: 860px) {
  .detail-stage {
    grid-template-columns: minmax(15rem, 26rem) minmax(20rem, 36rem);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    min-height: calc(100vh - 5rem);
    max-width: 72rem;
    margin: 0 auto;
  }
}

.detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: min(28rem, 52vh);
  order: 0;
}

.detail-lead-poster {
  width: min(11.5rem, 58vw);
  max-height: min(18rem, 38vh);
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(232, 223, 208, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.detail-tape-mount {
  display: grid;
  place-items: center;
  width: 100%;
}

.detail-plot.is-missing {
  color: var(--muted);
  font-style: italic;
}

@media (min-width: 860px) {
  .detail-lead-poster {
    display: none;
  }
}

.detail-sheet {
  order: 2;
  background: rgba(10, 7, 5, 0.72);
  border: 1px solid rgba(232, 223, 208, 0.14);
  border-radius: 6px;
  padding: clamp(1.15rem, 3vw, 1.65rem) clamp(1.2rem, 3.5vw, 1.85rem) clamp(1.35rem, 4vw, 2rem);
  backdrop-filter: blur(14px);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 236, 200, 0.06);
}

.detail-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber, #e2a34a);
}

.detail-sheet h2 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.85rem);
  line-height: 1.02;
  font-weight: 400;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
}

.detail-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.detail-genre-pill {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(226, 163, 74, 0.45);
  color: rgba(232, 223, 208, 0.92);
  background: rgba(226, 163, 74, 0.08);
  border-radius: 999px;
}

.detail-facts {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.detail-facts li {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 4.5rem;
}

.detail-fact-k {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-fact-v {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--paper);
}

.detail-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.detail-scores[hidden] {
  display: none !important;
}

.detail-score-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 5.5rem;
  padding: 0.45rem 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(226, 163, 74, 0.25);
  border-radius: 4px;
}

.detail-score-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-score-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--amber, #e2a34a);
  line-height: 1;
}

.detail-score-value small {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(232, 223, 208, 0.55);
  margin-left: 0.12rem;
}

.detail-plot-wrap {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(232, 223, 208, 0.1);
}

.detail-plot-title {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-plot {
  margin: 0;
  max-width: none;
  line-height: 1.6;
  color: rgba(232, 223, 208, 0.92);
  font-size: clamp(0.95rem, 2.1vw, 1.05rem);
}

.detail-sheet .detail-plot {
  white-space: pre-wrap;
  overflow: visible;
  display: block;
  max-height: none;
  -webkit-line-clamp: unset;
}

.detail-actions-primary {
  margin-top: 1.35rem;
}

.detail-actions-links {
  margin-top: 0.65rem;
}

.detail-filetech {
  margin: 1.15rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(232, 223, 208, 0.38);
  word-break: break-all;
}

.btn-sm {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.detail-body {
  background: rgba(12, 9, 7, 0.55);
  border: 1px solid rgba(232, 223, 208, 0.12);
  padding: 1.25rem 1.35rem 1.5rem;
  backdrop-filter: blur(8px);
}

.detail-poster {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  display: block;
}

.detail-body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.05;
  font-weight: 400;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.scores {
  margin: 0.85rem 0 0;
  color: var(--amber);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.detail-sub {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes brand-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .billboard-frame {
    min-height: clamp(20rem, 62vh, 36rem);
  }

  .billboard-arrow {
    display: none;
  }

  .billboard-copy {
    padding-bottom: clamp(4.75rem, 14vw, 6rem);
  }

  .billboard-plot {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 640px) {
  .row {
    grid-template-columns: 3.6rem 1fr;
  }
  .actions {
    grid-column: 2;
  }
  .thumb,
  .thumb-ph {
    width: 3.6rem;
    height: 5.2rem;
  }
  .btn-label {
    display: none;
  }
  .btn {
    min-width: 40px;
    padding: 0.45rem 0.65rem;
  }
}

/* Serie panel — drawer desktop / bottom sheet mobile */
body.serie-open {
  overflow: hidden;
}

.serie-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}

.serie-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 6, 4, 0.62);
  cursor: pointer;
  animation: fade-in 0.25s ease-out both;
}

.serie-panel {
  position: relative;
  z-index: 1;
  width: min(42rem, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1c1712 0%, #12100e 55%, #0a0908 100%);
  border-left: 1px solid var(--line);
  animation: slide-in 0.35s ease-out both;
}

.serie-appbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 16, 14, 0.92);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.serie-appbar-title {
  margin: 0;
  font-weight: 600;
  color: var(--paper);
}

.serie-scroll {
  overflow: auto;
  padding: 1.25rem clamp(1rem, 3vw, 1.75rem) calc(2rem + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.serie-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 560px) {
  .serie-head {
    grid-template-columns: 8.5rem 1fr;
    gap: 1.25rem;
    align-items: start;
  }
}

.serie-poster {
  width: 100%;
  max-width: 8.5rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius);
}

.serie-head-text h2 {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 400;
  line-height: 1.05;
}

.serie-head-text .detail-plot {
  max-width: none;
  -webkit-line-clamp: 4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.season-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  margin: 0.5rem 0 1rem;
  padding: 0.85rem 0 0.25rem;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.season-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.season-tab:hover {
  color: var(--paper);
  border-color: rgba(226, 163, 74, 0.45);
}

.season-tab.is-active {
  color: var(--ink);
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: var(--elev-1);
}

.episode-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.episode-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.35rem;
  min-height: var(--touch);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
}

.episode-row:hover {
  background: var(--row-hover);
}

.episode-row .title {
  font-size: 0.95rem;
}

.episode-row .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .serie-overlay {
    align-items: flex-end;
    justify-content: stretch;
  }

  .serie-panel {
    width: 100%;
    height: min(92vh, 100%);
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    animation: sheet-up 0.35s ease-out both;
  }

  .serie-appbar {
    justify-content: center;
    position: relative;
  }

  .serie-appbar::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    left: 50%;
    width: 2.5rem;
    height: 0.28rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(232, 223, 208, 0.28);
  }

  .serie-appbar .icon-btn {
    position: absolute;
    left: 0.65rem;
  }
}

/* Bibliothèque : étagères bois + boîtiers 3D */
.shelves {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.5rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.shelf {
  --wood: #5a3a22;
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8, 5, 3, 0.55) 0%, rgba(8, 5, 3, 0.12) 28%, rgba(8, 5, 3, 0.08) 70%, rgba(8, 5, 3, 0.6) 100%),
    repeating-linear-gradient(
      88deg,
      #3a2416 0 2px,
      #5a3a24 2px 5px,
      #2e1c12 5px 7px,
      #6b4528 7px 11px,
      #4a301c 11px 14px,
      #7a5230 14px 16px,
      #3a2416 16px 19px
    );
  box-shadow: inset 0 22px 32px rgba(0, 0, 0, 0.35);
}

.shelf-plank {
  position: relative;
  z-index: 2;
  height: 3rem;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 224, 176, 0.18), transparent 40%),
    repeating-linear-gradient(90deg, #6a4528 0 3px, #4a301c 3px 6px, #7a5230 6px 8px),
    linear-gradient(180deg, #8a5a32 0%, #5a3a22 52%, #2e1a10 100%);
  border-top: 1px solid rgba(255, 220, 160, 0.28);
  border-bottom: 3px solid #140c08;
  box-shadow:
    0 12px 20px rgba(0, 0, 0, 0.5),
    inset 0 -8px 10px rgba(0, 0, 0, 0.35);
}

.shelf-label {
  margin: 0;
  font-size: clamp(1.2rem, 2.7vw, 2rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(180deg, #efe0b8 0%, #c9a56a 42%, #6a4520 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(255, 236, 200, 0.35))
    drop-shadow(0 -1px 0 rgba(20, 8, 2, 0.85))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

.shelf-label[data-cat="horreur"] {
  font-family: var(--font-horreur);
  letter-spacing: 0.14em;
}
.shelf-label[data-cat="action"] {
  font-family: var(--font-action);
  letter-spacing: 0.16em;
}
.shelf-label[data-cat="comedie"] {
  font-family: var(--font-comedie);
  letter-spacing: 0.18em;
}
.shelf-label[data-cat="thriller"] {
  font-family: var(--font-thriller);
  font-style: italic;
}
.shelf-label[data-cat="scifi"] {
  font-family: var(--font-scifi);
  letter-spacing: 0.28em;
}
.shelf-label[data-cat="drame"] {
  font-family: var(--font-drame);
}
.shelf-label[data-cat="fantastique"] {
  font-family: var(--font-fantastique);
  letter-spacing: 0.2em;
}
.shelf-label[data-cat="aventure"],
.shelf-label[data-cat="polar"],
.shelf-label[data-cat="animation"],
.shelf-label[data-cat="autres"] {
  font-family: var(--font-display);
  letter-spacing: 0.16em;
}

.shelf-bay {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.shelf-track {
  display: flex;
  align-items: flex-end;
  gap: 1.35rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1.6rem clamp(1.25rem, 5vw, 4rem) 0.35rem;
  perspective: 980px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.shelf-ledge {
  height: 1.05rem;
  background:
    linear-gradient(180deg, #7a5640 0%, #3a2418 38%, #140c08 100%);
  box-shadow:
    0 -10px 16px rgba(0, 0, 0, 0.45),
    inset 0 2px 0 rgba(255, 210, 150, 0.16);
  border-top: 1px solid rgba(255, 210, 150, 0.2);
}

.tape {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  flex: 0 0 auto;
  width: 8.4rem;
  margin: 0;
  padding: 0;
  cursor: pointer;
  text-align: center;
  position: relative;
  transform-origin: 50% 100%;
}

.tape-serie {
  width: 9.6rem;
  z-index: 1;
}

.tape-scene {
  display: block;
  position: relative;
  perspective: 760px;
  height: 13.2rem;
}

.tape-3d {
  --w: 7.1rem;
  --h: 11.2rem;
  --d: 1.35rem;
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  width: var(--w);
  height: var(--h);
  margin-left: calc(var(--w) / -2);
  transform-style: preserve-3d;
  transform: rotateY(-32deg) rotateX(8deg);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.tape-serie .tape-3d {
  --w: 7.6rem;
  --d: 2.05rem;
}

.tape.is-lead .tape-3d {
  transform: translateY(-0.35rem) translateZ(18px) rotateY(-22deg) rotateX(6deg) scale(1.06);
}

.tape:hover .tape-3d,
.tape:focus-visible .tape-3d {
  transform: translateY(-1.05rem) translateZ(42px) rotateY(-12deg) rotateX(4deg) scale(1.1);
}

.tape-face {
  position: absolute;
  top: 0;
  left: 0;
}

.tape-front {
  width: var(--w);
  height: var(--h);
  overflow: hidden;
  background: #1a120c;
  border: 2px solid #4a3220;
  transform: translateZ(calc(var(--d) / 2));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.5);
}

.tape-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tape-ph {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 0.4rem;
  font-size: 0.72rem;
  color: var(--paper);
  text-align: center;
}

.tape-spine {
  width: var(--d);
  height: var(--h);
  left: 0;
  transform-origin: left center;
  transform: rotateY(-90deg) translateZ(0);
  background:
    linear-gradient(90deg, #1a0e08 0%, #6a4530 22%, #3a2418 100%);
  color: #f0e2c8;
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  overflow: hidden;
  padding: 0.45rem 0.12rem;
  box-shadow: inset -2px 0 0 rgba(0, 0, 0, 0.35);
}

.tape-window {
  position: absolute;
  writing-mode: horizontal-tb;
  left: 16%;
  right: 16%;
  top: 16%;
  height: 1.55rem;
  margin: 0;
  background: linear-gradient(90deg, #0a0604, #2a2018 40%, #0a0604);
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.7);
}

.tape-serie .tape-spine {
  background: linear-gradient(90deg, #1a0e08 0%, #8a5a32 28%, #3a2418 100%);
}

.tape-top {
  width: var(--w);
  height: var(--d);
  top: 0;
  transform-origin: top center;
  transform: rotateX(90deg);
  background: linear-gradient(#8a6248, #4a3020);
}

.tape-side {
  width: var(--d);
  height: var(--h);
  left: auto;
  right: 0;
  transform-origin: right center;
  transform: rotateY(90deg);
  background: #1c120c;
}

.tape-badge {
  position: absolute;
  z-index: 3;
  top: 0.35rem;
  right: -0.15rem;
  background: #c9a15a;
  color: #1a1008;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.32rem;
  transform: rotate(8deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.tape-range {
  position: absolute;
  z-index: 3;
  left: 0.2rem;
  right: 0.2rem;
  bottom: 1.15rem;
  background: rgba(18, 10, 6, 0.78);
  color: #f3e6cc;
  font-size: 0.58rem;
  padding: 0.12rem 0.2rem;
}

.tape-pills {
  position: absolute;
  z-index: 3;
  left: 0.15rem;
  right: 0.15rem;
  bottom: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
  justify-content: center;
}

.tape-pill {
  font-size: 0.48rem;
  font-weight: 700;
  color: #1a1008;
  background: #e2a34a;
  padding: 0.05rem 0.18rem;
  letter-spacing: 0.02em;
}

.tape-caption {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.tape-hero {
  width: min(18rem, 72vw);
  cursor: default;
}

.tape-hero .tape-scene {
  height: min(28rem, 68vh);
}

.tape-hero .tape-3d {
  --w: 14.2rem;
  --h: 22.2rem;
  --d: 2.35rem;
  transform: rotateY(-26deg) rotateX(8deg);
  animation: tape-idle 8s ease-in-out infinite;
}

@media (max-width: 700px) {
  .tape-hero .tape-3d {
    --w: 11.2rem;
    --h: 17.4rem;
    --d: 1.85rem;
  }
}

.tape-decor {
  cursor: default;
  pointer-events: none;
}

.tape-fan {
  display: none;
  position: absolute;
  left: 8.6rem;
  top: 0.4rem;
  z-index: 5;
  gap: 0.22rem;
}

.tape-fan-item {
  appearance: none;
  border: 1px solid #3d2818;
  width: 2.15rem;
  height: 8.4rem;
  background:
    linear-gradient(90deg, #3a2418, #6a4530 18%, #1a120c 22%, #1a120c);
  color: #f0e2c8;
  font-size: 0.62rem;
  font-weight: 700;
  writing-mode: vertical-rl;
  cursor: pointer;
  transform: rotateY(-18deg) rotateZ(calc(var(--fan-i, 0) * -2deg));
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

@media (hover: hover) {
  .tape-serie:hover,
  .tape-serie:focus-within {
    width: 20rem;
    z-index: 8;
  }

  .tape-serie:hover .tape-fan,
  .tape-serie:focus-within .tape-fan {
    display: flex;
  }
}

.tape:focus-visible {
  outline: none;
}

.tape:focus-visible .tape-3d {
  box-shadow: 0 0 0 2px var(--amber);
}

@keyframes tape-idle {
  0%,
  100% {
    transform: rotateY(-26deg) rotateX(8deg);
  }
  50% {
    transform: rotateY(-14deg) rotateX(5deg) translateZ(16px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .tape-3d,
  .tape.is-lead .tape-3d,
  .tape:hover .tape-3d,
  .tape:focus-visible .tape-3d,
  .tape-hero .tape-3d {
    transform: rotateY(-18deg);
    animation: none;
  }

  .tape-fan {
    display: none !important;
  }
}
