/* ↔ Theme (LecteurAnimeApp.swift) + styles des vues tvOS.
   1rem ≈ 16 px sur un écran 1920 px de large : les tailles suivent celles de l'app Apple TV ÷ 1,25 environ. */

:root {
  --accent: #c8b273; /* Pantone 16-0836 TCX Rich Gold */
  --accent-hi: #dccb94;
  --bg: #000;
  --bar: #23252b;
  --surface: #141519;
  --surface-2: #23252b;
  --surface-3: #2e3038;
  --text: #fff;
  --text-2: #dadada;
  --dim: #a0a0a0;
  --line: #4a4e58;
  --focus: #fff;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: 3.5rem;
  --rail: 6rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: clamp(11px, 0.833vw, 24px); overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Lato, -apple-system, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.playing { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
:focus { outline: none; }
[hidden] { display: none !important; }
img { display: block; }

h1, h2, h3 { margin: 0; }
h2 { font-size: 1.75rem; font-weight: 900; margin-bottom: 1.3rem; letter-spacing: -0.01em; }
h2 .count { font-size: 1.05rem; font-weight: 400; color: var(--dim); margin-left: 0.6rem; }
.dim { color: var(--dim); font-size: 1.15rem; }
.page { padding: 2rem var(--gutter) 6rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.big-icon { width: 5rem; height: 5rem; }

/* MARK: Barre latérale façon TV (TabView .sidebarAdaptable) */

body { padding-left: var(--rail); }
body[data-view="profiles"] { padding-left: 0; }
body[data-view="profiles"] .rail { display: none; }
.rail {
  position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: var(--rail);
  display: flex; flex-direction: column; gap: 0.5rem; padding: 2rem 0.9rem;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.45) 75%, transparent);
  overflow: hidden; transition: width 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
}
/* Elle s'élargit et affiche les libellés quand on y entre (focus télécommande ou souris). */
.rail:focus-within, .rail:hover {
  width: 18rem;
  background: rgba(0, 0, 0, 0.97);
  box-shadow: 3rem 0 6rem 1rem rgba(0, 0, 0, 0.85);
}
.rail-logo { display: flex; align-items: center; gap: 1rem; height: 4.2rem; padding-left: 0.7rem; margin-bottom: 2.6rem; color: var(--accent); text-decoration: none; white-space: nowrap; }
.rail-logo img { width: 2.8rem; height: 2.8rem; object-fit: contain; flex: none; }
.rail-brand { font-size: 1.6rem; font-weight: 900; letter-spacing: -0.01em; color: var(--text); opacity: 0; transition: opacity 0.2s; }
.rail-brand b { color: var(--accent); font-weight: 900; }
.rail:focus-within .rail-brand, .rail:hover .rail-brand { opacity: 1; }
.rail .tab {
  display: flex; align-items: center; gap: 1.4rem; height: 4.2rem; padding: 0 1.1rem; border-radius: 0.7rem;
  color: var(--dim); font-size: 1.25rem; font-weight: 700; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.rail .tab .icon { width: 2rem; height: 2rem; flex: none; }
.rail .tab > span:not(.rail-avatar) { opacity: 0; transition: opacity 0.2s; }
.rail:focus-within .tab > span, .rail:hover .tab > span { opacity: 1; }
.rail .tab.active { color: var(--text); }
.rail .tab.active .icon { color: var(--accent); }
.rail .tab:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.rail .tab:focus { background: var(--text); color: #000; }
.rail .tab:focus .icon { color: #000; }
.rail-spacer { flex: 1; }
.rail-avatar { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; }
.rail-avatar .avatar { width: 2.3rem; height: 2.3rem; font-size: 1.1rem; }

/* MARK: Boutons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  height: 3rem; padding: 0 1.4rem;
  font-size: 1.05rem; font-weight: 900; letter-spacing: 0.03em; white-space: nowrap;
  background: var(--surface-3); color: var(--text);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s var(--ease);
}
.btn:hover { background: var(--line); }
.btn.primary { background: var(--accent); color: #000; }
.btn.primary:hover { background: var(--accent-hi); }
.btn.outline { background: transparent; box-shadow: inset 0 0 0 0.15rem var(--accent); color: var(--accent); }
.btn.outline:hover { background: rgba(200, 178, 115, 0.12); }
.btn.ghost { background: transparent; color: var(--text-2); font-weight: 700; padding: 0 0.8rem; height: 2.4rem; }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.btn:focus { box-shadow: 0 0 0 0.2rem var(--bg), 0 0 0 0.4rem var(--focus); transform: scale(1.04); }
.btn:disabled { opacity: 0.4; cursor: default; }

.link-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.95rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); padding: 0.35rem 0.2rem;
}
.link-btn:hover { color: var(--accent-hi); }
.link-btn:focus { box-shadow: 0 0.18rem 0 var(--focus); color: var(--text); }
.link-btn.tool { color: var(--text-2); }

.segmented { display: inline-flex; background: var(--surface-2); padding: 0.25rem; gap: 0.25rem; }
.segmented button { min-width: 6.5rem; padding: 0.55rem 1.1rem; font-size: 1rem; font-weight: 700; color: var(--dim); text-align: center; transition: background 0.15s, color 0.15s; }
.segmented button.on { background: var(--surface-3); color: var(--text); }
.segmented button:hover { color: var(--text); }
.segmented button:focus { background: var(--text); color: #000; }

.toggle { width: 4.2rem; height: 2.3rem; border-radius: 2rem; background: var(--surface-3); position: relative; transition: background 0.2s; }
.toggle span { position: absolute; top: 0.25rem; left: 0.25rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.toggle.on { background: var(--accent); }
.toggle.on span { transform: translateX(1.9rem); }
.toggle:focus { box-shadow: 0 0 0 0.2rem var(--bg), 0 0 0 0.4rem var(--focus); }

/* Drapeau de version (VOSTFR = Japon, VF = France) */
.flag { width: 1.5em; height: 1em; flex: none; vertical-align: -0.12em; border-radius: 0.12em; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }

.chip { display: inline-block; padding: 0.1rem 0.45rem; background: var(--surface-3); color: var(--text-2); font-size: 0.9rem; font-weight: 700; font-style: italic; }
.dot { color: var(--dim); margin: 0 0.45rem; }

/* MARK: Bannière (HeroCarousel) et en-tête de fiche */

.hero, .detail-hero { position: relative; overflow: hidden; background: var(--bg); }
.hero { height: max(40rem, 100vh); margin-left: calc(var(--rail) * -1); }
.hero-skeleton { background: linear-gradient(100deg, #0b0c0f 30%, #15171c 50%, #0b0c0f 70%) 0 0 / 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; }
.hero-slide.active { opacity: 1; }
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
/* Aperçu muet (preview.js) : au-dessus de l'image, sous les dégradés (::after) ; fondu à l'arrivée. */
.hero-bg .preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.hero-bg .preview.on { opacity: 1; }
.hero-bg .fill { filter: blur(32px) brightness(0.55) saturate(1.25); transform: scale(1.2); }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 22%, rgba(0, 0, 0, 0.18) 52%, transparent 72%),
    linear-gradient(0deg, var(--bg) 3%, rgba(0, 0, 0, 0.55) 32%, transparent 58%);
}
/* Accueil : bas de l'image plus sombre (les rangées passent dessus ; certaines bandes-annonces ont des sous-titres incrustés). */
.hero .hero-bg::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 22%, rgba(0, 0, 0, 0.18) 52%, transparent 72%),
    linear-gradient(0deg, var(--bg) 20%, rgba(0, 0, 0, 0.92) 34%, rgba(0, 0, 0, 0.6) 50%, transparent 70%);
}
.hero.spotlight .hero-dots, .hero.spotlight .hero-arrow { display: none; }
.hero-slide.active .hero-bg .cover { animation: kenburns 12s ease-out both; }
/* Le texte de la diapo sortante disparaît vite, celui de la nouvelle arrive ensuite : pas de superposition. */
.hero-slide .hero-content { opacity: 0; transform: translateY(0.8rem); transition: opacity 0.25s, transform 0.25s; }
.hero-slide.active .hero-content { opacity: 1; transform: none; transition: opacity 0.5s 0.35s, transform 0.5s 0.35s var(--ease); }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1); } }

.hero-content {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 1.1rem;
  width: min(50rem, 55%); padding: 10vh 0 0 calc(var(--rail) + var(--gutter));
}
.hero-title {
  font-size: clamp(2.4rem, 3.2vw, 3.8rem); font-weight: 900; line-height: 1.08; letter-spacing: -0.01em;
  text-shadow: 0 0.2rem 2rem rgba(0, 0, 0, 0.6);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; font-size: 1.05rem; color: var(--text-2); }
.hero-synopsis { margin: 0; font-size: 1.15rem; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 1rem; margin-top: 0.6rem; flex-wrap: wrap; }

.hero-arrow {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 3.4rem; height: 6rem; display: grid; place-items: center;
  color: var(--text); opacity: 0; transition: opacity 0.2s;
}
.hero:hover .hero-arrow { opacity: 0.7; }
.hero-arrow:hover { opacity: 1 !important; }
.hero-arrow .icon { width: 2.4rem; height: 2.4rem; }
.hero-arrow.prev { left: calc(var(--rail) + 0.6rem); top: 30%; }
.hero-arrow.next { right: 0.6rem; top: 30%; }
.hero-dots { position: absolute; z-index: 2; left: calc(var(--rail) + var(--gutter)); top: 52vh; display: flex; gap: 0.5rem; }
.hero-dots button { width: 2rem; height: 0.42rem; border-radius: 1rem; background: rgba(255, 255, 255, 0.35); transition: width 0.3s var(--ease), background 0.3s; }
.hero-dots button.on { width: 4rem; background: var(--accent); }

.under-hero { margin-top: -42vh; position: relative; z-index: 1; }
.home-rows .row h2 { font-size: 1.5rem; margin-bottom: 0.9rem; text-shadow: 0 0.1rem 0.8rem rgba(0, 0, 0, 0.6); }

/* Boutons de la bannière, façon TV */
.btn.tv { height: 3.5rem; padding: 0 2.3rem; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.05em; border-radius: 0.2rem; }
.btn.outline-white { background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 0.14rem rgba(255, 255, 255, 0.9); color: #fff; }
.btn.outline-white:hover { background: rgba(255, 255, 255, 0.12); }

/* Vignettes paysage 16:9 des rangées */
.shelf > .land-card { flex: 0 0 21rem; }
.land-card {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0.35rem;
  background: var(--surface-2); transition: transform 0.22s var(--ease), box-shadow 0.22s;
}
.land-img, .land-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.land-img img { transition: transform 0.35s var(--ease); }
.land-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.4rem 0.9rem 0.7rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88)); font-size: 1.05rem; font-weight: 900; line-height: 1.2;
  text-align: left; text-shadow: 0 0.1rem 0.5rem rgba(0, 0, 0, 0.8);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.land-card:hover .land-img img { transform: scale(1.05); }
.land-card:focus { transform: scale(1.07); box-shadow: 0 0 0 0.25rem var(--focus), 0 1.2rem 2.4rem rgba(0, 0, 0, 0.7); z-index: 2; }
.shelf:has(.land-card) { padding-top: 1rem; padding-bottom: 1.4rem; }
.land-title small { display: block; margin-top: 0.2rem; font-size: 0.8rem; font-weight: 700; color: rgba(255, 255, 255, 0.75); }

/* Pastille « Nouvel épisode » (vignettes et jaquettes) */
.new-badge {
  position: absolute; top: 0.6rem; left: 0.6rem; z-index: 1; padding: 0.25rem 0.55rem; border-radius: 0.2rem;
  background: var(--accent); color: #1a1408; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.06em;
  text-transform: uppercase; box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.5);
}

/* MARK: Rangées et jaquettes (PosterCard) */

.row { margin-bottom: 3.4rem; }
.shelf-wrap { position: relative; margin: 0 calc(var(--gutter) * -1); }
.shelf {
  display: flex; gap: 1.6rem;
  overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
  padding: 0.6rem var(--gutter) 1rem;
  scroll-padding-inline: var(--gutter);
}
.shelf::-webkit-scrollbar { display: none; }
.shelf > .poster-card { flex: 0 0 14.2rem; }
.shelf > .ep-card { flex: 0 0 22rem; }
.shelf-arrow {
  position: absolute; top: 0; bottom: 3.6rem; z-index: 3; width: var(--gutter);
  display: grid; place-items: center; color: #fff; opacity: 0; transition: opacity 0.2s;
}
.shelf-arrow .icon { width: 2.4rem; height: 2.4rem; }
.shelf-arrow.left { left: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), transparent); }
.shelf-arrow.right { right: 0; background: linear-gradient(-90deg, rgba(0, 0, 0, 0.9), transparent); }
.shelf-wrap:hover .shelf-arrow { opacity: 1; }

.grid { display: grid; gap: 2.4rem 1.6rem; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }

.poster-card { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.poster { position: relative; display: block; aspect-ratio: 2 / 3; background: var(--surface-2); overflow: hidden; }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s var(--ease), filter 0.25s; }
.poster-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster-sub { font-size: 0.92rem; color: var(--dim); }
.poster-card:hover .poster img { transform: scale(1.05); filter: brightness(1.1); }
.poster-card:focus .poster { box-shadow: 0 0 0 0.25rem var(--focus); }
.poster-card:focus .poster img { transform: scale(1.05); }
.poster-card:focus .poster-title { color: var(--accent); }

/* MARK: Cartes d'épisode */

.episodes { display: grid; gap: 2.2rem 1.6rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.ep-card { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.ep-card:disabled { opacity: 0.4; cursor: default; }
.ep-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; margin-bottom: 0.55rem; }
.ep-thumb > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s var(--ease), filter 0.25s; }
.ep-fallback { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
/* Reprendre / historique : image 16:9 de l'anime sous la miniature (visible si l'épisode n'en a pas ou si elle ne charge pas). */
.ep-art { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; }
.ep-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Pas de miniature : un cadrage différent de la bannière par épisode, à peine flouté, et le numéro en grand. */
.ep-fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50%) 30%; filter: blur(1.5px) brightness(0.5) saturate(1.1); transform: scale(1.04); }
.ep-fallback::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(200, 178, 115, 0.18), transparent 60%); }
.ep-fallback b { position: absolute; left: 1rem; bottom: 0.5rem; z-index: 1; font-size: 3.6rem; font-weight: 900; line-height: 1; color: rgba(255, 255, 255, 0.92); text-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.6); }
.ep-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 3.6rem; height: 3.6rem; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.45); color: #fff; transition: background 0.2s, transform 0.2s var(--ease);
}
.ep-play .icon { width: 1.7rem; height: 1.7rem; margin-left: 0.2rem; }
.ep-badge { position: absolute; right: 0.5rem; bottom: 0.55rem; padding: 0.15rem 0.45rem; background: rgba(0, 0, 0, 0.75); font-size: 0.92rem; font-weight: 700; }
.ep-thumb .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 0.32rem; background: rgba(255, 255, 255, 0.25); }
.ep-thumb .progress span { display: block; height: 100%; background: var(--accent); }
.ep-series { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-title { font-size: 1.1rem; font-weight: 900; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-sub { font-size: 0.92rem; color: var(--dim); }
.ep-card:not(:disabled):hover .ep-thumb > img { transform: scale(1.05); filter: brightness(1.1); }
.ep-card:not(:disabled):hover .ep-play { background: var(--accent); }
.ep-card:focus .ep-thumb { box-shadow: 0 0 0 0.25rem var(--focus); }
.ep-card:focus .ep-play { background: var(--accent); transform: translate(-50%, -50%) scale(1.12); }
.ep-card:focus .ep-title { color: var(--accent); }
.ep-card.pending .ep-play { background: var(--accent); }

/* MARK: États (StatusView, ProgressView) */

.status { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.3rem; text-align: center; padding: 2rem; }
.status-icon { color: var(--dim); }
.status-title { font-size: 1.7rem; font-weight: 900; }
.status-msg { font-size: 1.15rem; color: var(--dim); max-width: 60rem; white-space: pre-line; }
.loading { display: flex; align-items: center; gap: 1rem; color: var(--dim); font-size: 1.1rem; padding: 0.6rem 0 1.4rem; }
.spinner { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 0.2rem solid rgba(255, 255, 255, 0.2); border-top-color: var(--text); animation: spin 0.8s linear infinite; flex: none; }
.spinner.small { width: 1.1rem; height: 1.1rem; border-width: 0.16rem; border-color: rgba(0, 0, 0, 0.25); border-top-color: #000; }
@keyframes spin { to { transform: rotate(360deg); } }

/* MARK: Fiche (AnimeDetailView) */

.detail-hero { height: max(38rem, 82vh); margin-left: calc(var(--rail) * -1); }
.detail-hero .hero-content { padding-left: calc(var(--rail) + var(--gutter)); width: min(54rem, 60%); }
.detail-hero .hero-content { justify-content: flex-end; padding-bottom: 3rem; gap: 1.1rem; }
.detail-hero .back { position: absolute; top: 1.6rem; left: calc(var(--rail) + var(--gutter) - 0.8rem); }
.detail-hero.no-banner .hero-bg { inset: 0; }

.stars { display: flex; align-items: center; gap: 0.2rem; font-size: 1.05rem; color: var(--text-2); }
.stars span { margin-left: 0.8rem; padding-left: 0.8rem; border-left: 1px solid var(--line); }
.star { width: 1.5rem; height: 1.5rem; fill: none; stroke: var(--dim); stroke-width: 1.5; }
.star.full { fill: var(--text-2); stroke: var(--text-2); }
.star.half { fill: url(#half-star); stroke: var(--text-2); }

.detail-body { padding-top: 1rem; }
.about { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 3rem; padding-bottom: 2rem; margin-bottom: 2.4rem; border-bottom: 1px solid var(--line); }
.synopsis { margin: 0 0 0.6rem; font-size: 1.15rem; line-height: 1.6; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.about.open .synopsis { -webkit-line-clamp: unset; }
.about-side { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1rem; font-size: 1rem; align-content: start; }
.about-side dt { color: var(--text); font-weight: 700; }
.about-side dd { margin: 0; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.season-bar { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.season-menu { position: relative; }
.season-current { display: flex; align-items: center; gap: 0.6rem; font-size: 1.5rem; font-weight: 900; padding: 0.4rem 0.6rem 0.4rem 0.2rem; }
.season-current .icon { transition: transform 0.2s; }
.season-current[aria-expanded="true"] .icon { transform: rotate(180deg); }
.season-current:hover, .season-current:focus { color: var(--accent); }
.season-current:focus { box-shadow: 0 0.18rem 0 var(--focus); }
.season-menu-list {
  position: absolute; z-index: 10; top: calc(100% + 0.4rem); left: 0; min-width: 26rem; max-height: 60vh; overflow-y: auto;
  background: var(--surface-2); box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.7); padding: 0.4rem 0;
}
.season-menu-list button { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; width: 100%; padding: 0.9rem 1.3rem; font-size: 1.1rem; color: var(--dim); }
.season-menu-list button.on { color: var(--text); }
.season-menu-list button small { font-size: 0.9rem; color: var(--dim); }
.season-menu-list button.off span { text-decoration: line-through; opacity: 0.6; }
.segmented button:disabled { opacity: 0.35; cursor: default; }
.segmented.flags button { min-width: 4.6rem; display: inline-flex; justify-content: center; align-items: center; }
.segmented.flags .flag { width: 1.9rem; height: 1.27rem; }
.segmented button.on .flag, .segmented button:focus .flag { opacity: 1; }
.segmented.flags button:not(.on) .flag { opacity: 0.55; }
.season-menu-list button:hover { background: var(--surface-3); color: var(--text); }
.season-menu-list button:focus { background: var(--text); color: #000; }
.season-menu-list button:focus small { color: #333; }
.season-tools { display: flex; align-items: center; gap: 1.6rem; }

/* Bande-annonce (trailer.js) : la vidéo YouTube est recouverte d'un calque, l'interface est la nôtre. */
.trailer { position: fixed; inset: 0; z-index: 95; background: #000; display: flex; align-items: center; justify-content: center; }
.trailer-frame { position: relative; width: min(100vw, 177.78vh); aspect-ratio: 16 / 9; }
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.trailer-shield { position: absolute; inset: 0; cursor: pointer; display: grid; place-items: center; transition: background 0.25s; }
.trailer-big { width: 6rem; height: 6rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #000; opacity: 0; transform: scale(0.9); transition: opacity 0.2s, transform 0.2s var(--ease); }
.trailer-big .icon { width: 2.8rem; height: 2.8rem; margin-left: 0.3rem; }
.trailer.paused .trailer-shield { background: rgba(0, 0, 0, 0.82); } /* cache le panneau « pause » de YouTube */
.trailer.paused .trailer-big { opacity: 1; transform: none; }
.trailer-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 1rem;
  padding: 2rem var(--gutter); background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  opacity: 0; transition: opacity 0.3s;
}
.trailer.ui .trailer-bar, .trailer.paused .trailer-bar, .trailer:focus-within .trailer-bar:has(:focus) { opacity: 1; }
.trailer:not(.ui):not(.paused) { cursor: none; }
.trailer-hint { flex: 1; text-align: center; font-size: 0.95rem; color: var(--dim); }

/* MARK: Profils (ProfilesView) */

.avatar {
  --c: #9aa0a6;
  display: inline-grid; place-items: center; flex: none;
  width: 2.2rem; height: 2.2rem; border-radius: 0.5rem;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c) 100%, #fff 18%), color-mix(in srgb, var(--c) 100%, #000 30%));
  color: #fff; font-weight: 900; font-size: 1.1rem; text-shadow: 0 0.1rem 0.4rem rgba(0, 0, 0, 0.3);
}
.avatar.sm { width: 1.9rem; height: 1.9rem; font-size: 0.95rem; }
.avatar.md { width: 3rem; height: 3rem; font-size: 1.4rem; }
.avatar.xl { width: 10rem; height: 10rem; border-radius: 1.2rem; font-size: 4.6rem; }
.avatar.add { background: var(--surface-2); color: var(--dim); }
.avatar.add .icon { width: 4rem; height: 4rem; }

.profiles { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem; padding: 3rem var(--gutter); }
.profiles-title, .profiles h1 { font-size: 3rem; font-weight: 900; text-align: center; }
.profile-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.4rem; }
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 11rem; color: var(--dim); transition: color 0.15s; }
.profile-card .avatar { transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.profile-card:hover, .profile-card:focus { color: var(--text); }
.profile-card:hover .avatar, .profile-card:focus .avatar { transform: scale(1.06); box-shadow: 0 0 0 0.3rem var(--bg), 0 0 0 0.55rem var(--focus); }
.profile-name { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 1.3rem; font-weight: 700; text-align: center; }
.profile-name .icon { width: 1rem; height: 1rem; }

.pin-box, .create-box { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; width: min(30rem, 100%); }
.pin-box .dim { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; }
.pin-dots { display: flex; gap: 1rem; margin: 0.6rem 0; }
.pin-dots span { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 0.15rem solid var(--dim); transition: background 0.15s, border-color 0.15s; }
.pin-dots span.on { background: var(--text); border-color: var(--text); }
.pin-dots.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-0.6rem); } 40%, 80% { transform: translateX(0.6rem); } }
.keypad { display: grid; grid-template-columns: repeat(3, 5.5rem); gap: 0.9rem; }
.keypad button { height: 5.5rem; border-radius: 50%; background: var(--surface-2); font-size: 2rem; font-weight: 700; display: grid; place-items: center; transition: background 0.15s, transform 0.15s var(--ease); }
.keypad button.small { font-size: 0.95rem; }
.keypad button .icon { width: 1.8rem; height: 1.8rem; }
.keypad button:hover { background: var(--surface-3); }
.keypad button:focus { background: var(--text); color: #000; transform: scale(1.08); }

.create-box { align-items: stretch; }
.create-box h1 { font-size: 2.2rem; }
.create-preview { display: flex; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 0.5rem; font-size: 1.05rem; font-weight: 700; color: var(--text-2); }
.field small { font-weight: 400; color: var(--dim); }
.field input { padding: 0.9rem 1rem; background: var(--surface-2); border: 0.15rem solid transparent; font-size: 1.2rem; }
.field input:focus { border-color: var(--focus); }
.swatches { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.swatch { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--c); transition: transform 0.15s var(--ease), box-shadow 0.15s; }
.swatch.on { box-shadow: 0 0 0 0.2rem var(--bg), 0 0 0 0.4rem var(--c); }
.swatch:focus { transform: scale(1.15); box-shadow: 0 0 0 0.2rem var(--bg), 0 0 0 0.4rem var(--focus); }
.create-actions { display: flex; gap: 1rem; margin-top: 0.6rem; }
.form-error { margin: 0; color: #ff7b7b; font-size: 1.05rem; text-align: center; }
.footer.ok { color: #6fdc9a; }
.loading.center { justify-content: center; }


/* MARK: Ma liste (MyListView) */

.mylist h1 { font-size: 2.6rem; font-weight: 900; margin: 1rem 0 1.6rem; }
.list-tabs { display: flex; gap: 0.4rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.list-tab { padding: 0.9rem 1.3rem; font-size: 1.15rem; font-weight: 700; color: var(--dim); border-bottom: 0.2rem solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; }
.list-tab small { margin-left: 0.4rem; font-size: 0.9rem; color: var(--dim); font-weight: 400; }
.list-tab.on { color: var(--text); border-color: var(--accent); }
.list-tab:hover, .list-tab:focus { color: var(--text); }
.list-tab:focus { background: rgba(255, 255, 255, 0.08); }
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.hint { margin: 0 0 1.4rem; font-size: 0.95rem; }

/* MARK: Ma note + bouton Ma liste (fiche) */

.btn.outline.on { background: rgba(200, 178, 115, 0.15); }
.my-rating { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.my-rating-label { font-size: 0.95rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.my-rating-value { font-size: 1.05rem; color: var(--text-2); font-weight: 700; }
.rate-stars { display: flex; gap: 0.15rem; }
.rate-star { position: relative; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; color: var(--dim); border-radius: 0.4rem; transition: transform 0.15s var(--ease), color 0.15s; }
.rate-star .icon { width: 1.8rem; height: 1.8rem; stroke-width: 1.6; }
.rate-star.full { color: var(--accent); }
.rate-star.full .icon { fill: var(--accent); }
.rate-star.half .icon { fill: url(#half-accent); color: var(--accent); }
.rate-star:hover, .rate-star:focus { transform: scale(1.18); color: var(--accent); }
.rate-star:focus { box-shadow: 0 0 0 0.15rem var(--focus); }

.form-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn.danger { color: #ff7b7b; }
.profile-row input { flex: 1; }

/* MARK: Catalogue (BrowseView) */

.browse h1 { font-size: 2.6rem; font-weight: 900; margin: 1rem 0 1.4rem; }
.browse h1 .count { font-size: 1.1rem; font-weight: 400; color: var(--dim); margin-left: 0.6rem; }
.genres { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.2rem; }
.genres button { height: 2.7rem; padding: 0 1.1rem; border-radius: 1.35rem; background: var(--surface-2); color: var(--dim); font-weight: 700; font-size: 1.05rem; text-align: center; transition: background 0.15s, color 0.15s; }
.genres button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 0.12rem var(--accent); }
.genres button:hover { color: var(--text); }
.genres button:focus { background: var(--text); color: #000; }

/* MARK: Recherche */

.search-bar { display: flex; justify-content: center; margin: 1rem 0 3rem; }
.search-bar input {
  width: min(56rem, 100%); padding: 1rem 0; background: transparent;
  border: 0; border-bottom: 0.18rem solid var(--line); font-size: 2rem; font-weight: 700;
  transition: border-color 0.2s;
}
.search-bar input::placeholder { color: var(--line); }
.search-bar input:focus { border-color: var(--accent); }

/* MARK: Réglages (SettingsView) */

.settings { max-width: 62rem; margin: 0 auto; display: flex; flex-direction: column; gap: 2.4rem; }
.settings h1 { font-size: 2.4rem; font-weight: 900; }
.form-section { display: flex; flex-direction: column; gap: 0.8rem; }
.form-section h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); font-weight: 700; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem 1.3rem; background: var(--surface); font-size: 1.15rem; }
.form-row .value { color: var(--dim); text-align: right; }
.form-row input { flex: 1; min-width: 0; padding: 0.75rem 1rem; background: var(--surface-2); border: 0.15rem solid transparent; font-size: 1.1rem; }
.form-row input:focus { border-color: var(--focus); }
.form-section > .btn { align-self: flex-start; }
.footer { margin: 0; font-size: 1rem; color: var(--dim); }

/* MARK: Lecteur (PlayerView / AVPlayerViewController) */

#player { position: fixed; inset: 0; z-index: 100; background: #000; }
#player video { width: 100%; height: 100%; object-fit: contain; }
.player-ui {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 2.4rem var(--gutter); opacity: 0; transition: opacity 0.35s;
  background: linear-gradient(rgba(0, 0, 0, 0.7), transparent 22%, transparent 60%, rgba(0, 0, 0, 0.85));
}
.player-ui.visible { opacity: 1; }
.player-top { text-shadow: 0 0.1rem 0.8rem rgba(0, 0, 0, 0.8); }
.player-title { font-size: 1.15rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; }
.player-sub { font-size: 1.9rem; font-weight: 900; margin-top: 0.3rem; }
.player-error { align-self: center; padding: 1rem 1.6rem; background: rgba(180, 30, 30, 0.9); font-size: 1.2rem; }
.player-bottom { display: flex; flex-direction: column; gap: 1rem; }
.player-actions { display: flex; justify-content: flex-end; }
.next-card {
  display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1.4rem; font-size: 1.1rem;
  background: rgba(35, 37, 43, 0.92); max-width: 30rem; transition: box-shadow 0.15s, background 0.15s;
}
.next-card b { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-card .icon { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.next-card:hover { background: var(--surface-3); }
.next-card:focus { box-shadow: 0 0 0 0.25rem var(--focus); }
.player-bar { height: 0.4rem; background: rgba(255, 255, 255, 0.25); cursor: pointer; }
.player-bar-fill { height: 100%; width: 0; background: var(--accent); }
.player-times { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.player-hint { font-size: 0.9rem; opacity: 0.6; }

/* Écran de pause (↔ PauseScreen) : vidéo assombrie, image de l'anime à droite, titre et résumé à gauche, sous les contrôles. */
.pause-screen { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.88); opacity: 0; pointer-events: none; transition: opacity 0.8s ease; }
#player.paused-long .pause-screen { opacity: 1; }
.pause-bg { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0.5;
  -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 65%); mask-image: linear-gradient(90deg, transparent 15%, #000 65%); }
.pause-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent 50%); }
.pause-info { position: absolute; z-index: 1; left: 6rem; bottom: 8rem; width: min(52rem, 70vw); display: flex; flex-direction: column; gap: 1rem; }
.pause-info small { font-size: 1rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.pause-title { font-size: 3.4rem; font-weight: 900; line-height: 1.05; }
.pause-episode { font-size: 1.4rem; font-weight: 700; color: var(--text-2); }
.pause-synopsis { margin: 0.4rem 0 0; font-size: 1.2rem; line-height: 1.45; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* MARK: Statistiques (StatsView) */

.stats { display: flex; flex-direction: column; gap: 2rem; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.stat-tile { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.3rem 1.4rem; background: var(--surface); border-radius: 0.5rem; }
.stat-label { font-size: 0.95rem; color: var(--dim); }
.stat-value { font-size: 2.2rem; font-weight: 700; line-height: 1.1; }
.stat-tile.featured .stat-value { font-size: 3.2rem; color: var(--text); }
.stat-sub { font-size: 0.9rem; color: var(--dim); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr)); gap: 1.2rem; }
.stat-card { padding: 1.4rem 1.5rem 1.5rem; background: var(--surface); border-radius: 0.5rem; display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.stat-card header { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.stat-card h3 { font-size: 1.25rem; font-weight: 900; }
.stat-card header span { font-size: 0.95rem; color: var(--dim); }

.heatmap { display: grid; grid-template-rows: repeat(7, 1.35rem); grid-auto-flow: column; grid-auto-columns: 1.35rem; gap: 0.3rem; }
.hm-cell { border-radius: 0.25rem; background: var(--surface-2); }
.hm-cell.pad { background: transparent; }
.hm-legend { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--dim); }
.hm-legend i { width: 1rem; height: 1rem; border-radius: 0.2rem; }
.hm-legend b { margin-left: auto; font-weight: 700; color: var(--text-2); }

.cols { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 11rem auto; column-gap: 0.6rem; }
.cols-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.8rem; color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; transform: translateY(0.5em); }
.cols-plot { position: relative; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); }
.grid-line { position: absolute; left: 0; right: 0; height: 1px; background: rgba(255, 255, 255, 0.07); }
.col { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.col-bar { width: min(100%, 24px); min-height: 0; background: var(--accent); border-radius: 4px 4px 0 0; }
.col-value { position: absolute; top: -0.2rem; font-size: 0.8rem; color: var(--text-2); white-space: nowrap; transform: translateY(-100%); }
.col-value.small { position: static; transform: none; margin-bottom: 0.2rem; }
.cols-labels { grid-column: 2; display: flex; gap: 2px; padding-top: 0.4rem; font-size: 0.8rem; color: var(--dim); }
.cols-labels span { flex: 1; text-align: center; }
.rating-cols { display: flex; align-items: flex-end; gap: 2px; height: 9rem; border-bottom: 1px solid var(--line); }
.cols-labels.rating { padding-left: 0; }
.data-table summary { cursor: pointer; font-size: 0.85rem; color: var(--dim); }
.data-table table { margin-top: 0.6rem; font-size: 0.9rem; border-collapse: collapse; }
.data-table td { padding: 0.15rem 1.2rem 0.15rem 0; color: var(--text-2); font-variant-numeric: tabular-nums; }

.hbars { display: flex; flex-direction: column; gap: 0.7rem; }
.hbar { display: grid; grid-template-columns: 9rem 1fr auto; align-items: center; gap: 0.8rem; font-size: 0.95rem; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.hbar-track { display: block; height: 0.6rem; background: var(--surface-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.hbar-value { color: var(--text-2); font-variant-numeric: tabular-nums; }

.top-animes { display: grid; grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr)); gap: 0.8rem 1.6rem; }
.top-anime { display: flex; align-items: center; gap: 1rem; padding: 0.5rem; border-radius: 0.4rem; text-align: left; transition: background 0.15s; }
.top-anime:hover, .top-anime:focus { background: var(--surface-2); }
.top-anime:focus { box-shadow: 0 0 0 0.15rem var(--focus); }
.top-rank { width: 1.8rem; font-size: 1.4rem; font-weight: 900; color: var(--dim); text-align: center; }
.top-poster { flex: 0 0 3.4rem; aspect-ratio: 2 / 3; background: var(--surface-2); overflow: hidden; border-radius: 0.25rem; }
.top-poster img { width: 100%; height: 100%; object-fit: cover; }
.top-info { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.top-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-info small { color: var(--dim); font-size: 0.85rem; }

.recap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; padding: 2rem; border-radius: 0.6rem;
  background: linear-gradient(120deg, rgba(200, 178, 115, 0.22), rgba(200, 178, 115, 0.04) 60%), var(--surface); box-shadow: inset 0 0 0 1px rgba(200, 178, 115, 0.35); }
.recap-head { display: flex; flex-direction: column; gap: 0.4rem; justify-content: center; }
.recap-kicker { font-size: 0.95rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.recap-hero { font-size: 3.4rem; font-weight: 700; line-height: 1.05; }
.recap-sub { color: var(--text-2); }
.recap-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; counter-reset: rank; }
.recap-list button { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; text-align: left; }
.recap-list img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 0.3rem; background: var(--surface-2); }
.recap-list b { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recap-list small { color: var(--dim); }
.recap-list button:focus img { box-shadow: 0 0 0 0.2rem var(--focus); }

.chart-tip { position: fixed; z-index: 120; left: 0; top: 0; pointer-events: none; padding: 0.4rem 0.7rem; border-radius: 0.3rem;
  background: #fff; color: #000; font-size: 0.9rem; font-weight: 700; white-space: nowrap; box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.5); }

/* MARK: Génériques : « Passer l'intro », « Épisode suivant dans 10 s » */

.skip-btn {
  position: absolute; z-index: 3; right: var(--gutter); bottom: 9.5rem;
  display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1.6rem;
  background: rgba(20, 21, 25, 0.82); box-shadow: inset 0 0 0 0.12rem rgba(255, 255, 255, 0.75);
  font-size: 1.2rem; font-weight: 900; letter-spacing: 0.02em; border-radius: 0.3rem;
  transition: background 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.skip-btn .icon { width: 1.3rem; height: 1.3rem; }
.skip-btn:hover { background: rgba(40, 42, 48, 0.9); }
.skip-btn:focus { background: var(--text); color: #000; transform: scale(1.04); }
.up-next {
  position: absolute; z-index: 3; right: var(--gutter); bottom: 9.5rem; width: min(40rem, 90vw);
  display: flex; gap: 1.2rem; padding: 1rem; overflow: hidden;
  background: rgba(20, 21, 25, 0.94); box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.6); border-radius: 0.4rem;
}
.up-next-thumb { flex: 0 0 13rem; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.up-next-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-next-info { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.up-next-count { font-size: 0.9rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.up-next-title { font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-next-actions { display: flex; gap: 0.6rem; margin-top: auto; }
.up-next-actions .btn { height: 2.6rem; padding: 0 1.1rem; font-size: 1rem; }
.up-next-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 0.25rem; background: rgba(255, 255, 255, 0.15); }
.up-next-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s linear; }

/* MARK: Petits écrans (le design vise la TV / le PC, mais reste utilisable) */

@media (max-width: 800px) {
  :root { --gutter: 16px; --rail: 0px; }
  html { font-size: 11px; }
  body { padding-bottom: 5rem; }
  .rail, .rail:hover, .rail:focus-within {
    top: auto; right: 0; width: auto; height: 5rem; flex-direction: row; justify-content: space-around;
    padding: 0 0.5rem; background: rgba(0, 0, 0, 0.96); box-shadow: none;
  }
  .rail-logo, .rail-spacer, .rail .tab > span:not(.rail-avatar) { display: none; }
  .rail .tab { padding: 0 1rem; }
  .hero, .detail-hero { height: auto; min-height: 40rem; }
  .hero-bg::after { background: linear-gradient(0deg, var(--bg) 15%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.3)); }
  .hero-content, .detail-hero .hero-content { width: 100%; justify-content: flex-end; padding: 6rem var(--gutter) 6rem; }
  .hero-dots { top: auto; bottom: 2rem; }
  .under-hero { margin-top: 0; }
  .hero-arrow { display: none; }
  .about { grid-template-columns: 1fr; gap: 1.5rem; }
  .season-menu-list { min-width: 80vw; }
  .shelf > .ep-card { flex-basis: 24rem; }
  .shelf > .land-card { flex-basis: 24rem; }
  .player-hint { display: none; }
}

