/* ==========================================================================
   ROFLIX - systeme de design
   Identite : obsidienne profonde + lumiere de projection doree.
   ========================================================================== */

/* Les polices sont chargees par <link> dans le HTML : en @import ici,
   elles n-etaient decouvertes qu-apres lecture de cette feuille, ce qui
   retardait le premier texte affiche d-un aller-retour entier. */

:root {
  /* Noir reel, pas un gris fonce : les affiches ressortent nettement plus. */
  --bg:          #000000;
  --bg-2:        #0c0c0e;
  --surface:     #121215;
  --surface-2:   #17171b;
  --surface-3:   #1f1f25;

  /* Surfaces translucides : elles prennent la couleur de ce qu-il y a dessous. */
  --veil:        rgba(255, 255, 255, .045);
  --veil-hover:  rgba(255, 255, 255, .09);

  /* Texte en opacites plutot qu-en gris fixes : meilleur rendu sur image. */
  --text:        #f7f7f8;
  --text-soft:   rgba(247, 247, 248, .80);
  --muted:       rgba(247, 247, 248, .52);
  --faint:       rgba(247, 247, 248, .34);

  /* Rouge ROFLIX */
  --accent:        #e5232f;
  --accent-2:      #e8c66a;   /* dore popcorn, repris du logo */
  --cream:         #f5edd8;   /* creme des rayures du logo */
  --cream-soft:    rgba(245, 237, 216, .72);
  --accent-bright: #f0343f;
  --accent-deep:   #1a0306;   /* remplissage des gros chiffres */
  --accent-press:  #c91b26;
  --accent-glow:   rgba(229, 35, 47, .55);
  --accent-haze:   rgba(229, 35, 47, .24);
  --accent-soft:   rgba(229, 35, 47, .12);
  --aurora:        linear-gradient(120deg, #f0343f 0%, #e5232f 52%, #8e0718 100%);

  /* Largeur d-affiche fluide : des vignettes serrees sur mobile,
     des affiches genereuses sur grand ecran. */
  --poster-w: clamp(136px, 13.2vw, 228px);

  --danger:      #ff6b6b;
  --ok:          #4ade80;
  --warn:        #fbbf24;

  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Rayons */
  --r-sm: 6px;
  --r-poster: 16px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Ombres */
  --sh-1: 0 16px 34px -14px rgba(0, 0, 0, .95);
  --sh-2: 0 8px 24px rgba(0, 0, 0, .5);
  --sh-3: 0 22px 44px -16px rgba(0, 0, 0, 1);
  --sh-gold: 0 10px 34px rgba(224, 16, 48, .26);

  /* Mouvement */
  --ease: cubic-bezier(.33, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .18s;
  --t:      .32s;
  --t-slow: .55s;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1680px;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Halo chaud discret en haut de page */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  background: radial-gradient(90% 60% at 50% -10%, rgba(224, 16, 48, .08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4 {
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0;
  line-height: 1.15;
}

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

img { display: block; max-width: 100%; }

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

::selection { background: var(--accent); color: #ffffff; }

/* Barre de defilement */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: #333a46; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

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

.hidden { display: none !important; }

/* ==========================================================================
   EN-TETE
   ========================================================================== */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease),
              backdrop-filter var(--t) var(--ease);
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(7, 7, 10, .85), transparent);
}

.header.scrolled {
  background: rgba(8, 8, 12, .82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 36px);
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo .mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 14px rgba(224, 16, 48, .45));
  transition: transform var(--t) var(--ease), filter var(--t) var(--ease);
}

.logo:hover .mark {
  transform: rotate(-4deg) scale(1.06);
  filter: drop-shadow(0 0 20px rgba(224, 16, 48, .7));
}

.logo .word {
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.04em;
  color: var(--cream);
  line-height: 1;
  text-transform: uppercase;
}

.logo .word em {
  font-style: normal;
  background: var(--aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 460px) {
  .logo .word { display: none; }
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.nav a {
  position: relative;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

.nav a.active {
  color: #0a0a0a;
  background: #fff;
  border-radius: var(--r-pill);
  font-weight: 600;
}

.nav a.active:hover { background: #fff; color: #0a0a0a; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text-soft);
  transition: all var(--t-fast) var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .09);
}

.icon-btn svg { width: 18px; height: 18px; }

/* Menu mobile */
.burger { display: none; }

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px var(--gutter) 22px;
    background: rgba(8, 8, 12, .97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--t) var(--ease);
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 12px 14px; font-size: 15px; }
  .nav a.active::after { display: none; }
  .burger { display: grid; }
}

/* ==========================================================================
   RECHERCHE (superposition)
   ========================================================================== */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 5, 8, .9);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease);
  padding-top: 11vh;
}

.search-overlay.open { opacity: 1; pointer-events: auto; }

.search-box { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 4px 6px 4px 18px;
  box-shadow: var(--sh-3);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.search-field:focus-within {
  border-color: var(--accent-deep);
  box-shadow: var(--sh-3), 0 0 0 3px var(--accent-glow);
}

.search-field svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }

.search-field input {
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  padding: 16px 0;
  font-size: 17px;
}

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

.suggestions {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-height: 58vh;
  overflow-y: auto;
  box-shadow: var(--sh-3);
}

.suggestions:empty { display: none; }

.sug {
  display: flex;
  gap: 13px;
  padding: 10px 14px;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-fast) var(--ease);
}

.sug:last-child { border-bottom: 0; }
.sug:hover, .sug.sel { background: rgba(224, 16, 48, .12); }

.sug img, .sug .ph {
  width: 42px; height: 63px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  flex-shrink: 0;
}

.sug-title { font-weight: 600; font-size: 14.5px; }
.sug-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  min-height: min(94vh, 880px);
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(46px, 9vh, 120px);
  isolation: isolate;
  overflow: hidden;
}

/* .hero est en flex : sans largeur explicite, le .wrap se reduisait a la
   taille de son contenu et "margin: 0 auto" le centrait. Le texte se
   retrouvait au milieu de l-ecran au lieu d-etre cale a gauche. */
.hero > .wrap { width: 100%; }

/* Les couches d-image se superposent pour un fondu enchaine propre. */
.hero-bg { position: absolute; inset: 0; z-index: -3; background: var(--bg); }

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 16%;
  opacity: 0;
  transform: scale(1.09);
  transition: opacity 1.3s var(--ease-out);
  will-change: opacity, transform;
}

/* Lent travelling avant : la scene respire au lieu d-etre figee. */
.hero-bg img.in {
  opacity: 1;
  animation: kenburns 22s var(--ease-out) forwards;
}

@keyframes kenburns {
  from { transform: scale(1.09) translateY(0); }
  to   { transform: scale(1.0) translateY(-1.2%); }
}

/* Triple voile : bas opaque pour le texte, gauche pour la colonne,
   haut leger pour que l-en-tete reste lisible. */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(to top, var(--bg) 1%, rgba(4,4,4,.6) 38%, rgba(4,4,4,0) 70%),
    linear-gradient(to right, rgba(4,4,4,.95) 0%, rgba(4,4,4,.78) 38%, rgba(4,4,4,.35) 66%, rgba(4,4,4,0) 88%);
}

/* Halo chaud remontant du bas, facon lumiere de salle. */
.hero-glow {
  position: absolute;
  left: 0; right: 0; bottom: -18%;
  height: 56%;
  z-index: -2;
  background: radial-gradient(56% 100% at 20% 100%, var(--accent-haze), transparent 72%);
  pointer-events: none;
}

.hero-inner {
  max-width: 680px;
  animation: heroRise .9s var(--ease-out) both;
}

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

.hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  margin-bottom: 20px;
}

.hero .kicker b {
  color: var(--accent-2);
  font-weight: 700;
}

/* Logo du titre : la piece maitresse du hero. */
.hero-logo {
  max-width: min(560px, 92%);
  margin-bottom: 20px;
  min-height: 90px;
  display: flex;
  align-items: flex-end;
}

.hero-logo img {
  width: auto;
  max-width: 100%;
  max-height: 168px;
  object-fit: contain;
  object-position: left bottom;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity .8s var(--ease-out) .12s, transform .8s var(--ease-out) .12s;
  filter: drop-shadow(0 10px 36px rgba(0,0,0,.85));
}

.hero-logo img.in { opacity: 1; transform: none; }

.hero h1 {
  font-size: clamp(36px, 6.4vw, 82px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: .98;
  margin-bottom: 18px;
  text-shadow: 0 6px 40px rgba(0,0,0,.8);
}

.hero .overview {
  color: rgba(255,255,255,.82);
  font-size: clamp(14.5px, 1.15vw, 17px);
  line-height: 1.62;
  max-width: 560px;
  margin-bottom: 30px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
  font-size: 13.5px;
  color: rgba(255,255,255,.86);
}

.meta-sep { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.4); }

.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--accent-2);
}

.rating svg { width: 15px; height: 15px; }

.chip {
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.chip.solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.chip.hd {
  font-weight: 700;
  letter-spacing: .08em;
  border-color: rgba(255,255,255,.34);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }

/* Vignettes de selection, avec barre de progression sur l-active. */
.hero-thumbs {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(46px, 9vh, 120px);
  display: flex;
  gap: 11px;
  z-index: 3;
}

.hero-thumb {
  position: relative;
  width: 64px;
  aspect-ratio: 2/3;
  border-radius: 10px;
  overflow: hidden;
  border: 0;
  cursor: pointer;
  opacity: .42;
  padding: 0;
  background: var(--surface-2);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

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

.hero-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: border-color var(--t) var(--ease);
}

.hero-thumb:hover { opacity: .8; transform: translateY(-4px); }

.hero-thumb.on {
  opacity: 1;
  transform: translateY(-7px);
  box-shadow: 0 14px 38px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.1);
}

.hero-thumb.on::after { border-color: #fff; }

.hero-thumb .bar {
  position: absolute;
  left: 0; bottom: 0; height: 3px;
  width: 0;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-glow);
}

.hero-thumb.on .bar { animation: thumbBar 9s linear forwards; }

@keyframes thumbBar { from { width: 0; } to { width: 100%; } }

@media (max-width: 1000px) { .hero-thumbs { display: none; } }

@media (max-width: 700px) {
  .hero { min-height: 82vh; padding-bottom: 40px; }
  .hero-logo { min-height: 64px; }
  .hero-logo img { max-height: 110px; }
  .hero-scrim {
    background: linear-gradient(to top, var(--bg) 2%, rgba(5,5,6,.9) 24%, rgba(5,5,6,.4) 62%, rgba(5,5,6,.2) 100%);
  }
}

/* ==========================================================================
   BOUTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease),
              background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.btn svg { width: 17px; height: 17px; }

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

.btn-primary {
  background: linear-gradient(145deg, var(--accent-bright), var(--accent));
  color: #ffffff;
  box-shadow: var(--sh-gold);
}

.btn-primary:hover {
  box-shadow: 0 14px 42px rgba(224, 16, 48, .44);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--veil);
  border-color: var(--line);
  color: var(--text);
  backdrop-filter: blur(14px);
  font-weight: 600;
}

.btn-ghost:hover {
  background: var(--veil-hover);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.btn-sm { padding: 8px 15px; font-size: 13px; border-radius: var(--r-sm); }

.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ==========================================================================
   RANGEES
   ========================================================================== */

.row { margin: clamp(38px, 6.5vh, 74px) 0; position: relative; }

.row-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin-inline: auto;
}

.row-head h2 {
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 700;
  letter-spacing: -.028em;
}

.row-head .sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.row-head .more {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--t-fast) var(--ease), gap var(--t-fast) var(--ease);
}

.row-head .more:hover { color: var(--accent); gap: 9px; }

.rail-wrap { position: relative; }

.rail {
  display: flex;
  gap: clamp(10px, 1vw, 18px);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding: 16px var(--gutter) 34px;
  max-width: var(--max);
  margin-inline: auto;
  scrollbar-width: none;
}

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

.rail > * { scroll-snap-align: start; flex: 0 0 auto; }

.rail-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-58%);
  width: 42px; height: 72px;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 14, .82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transition: opacity var(--t) var(--ease), background var(--t-fast) var(--ease);
  color: var(--text);
}

.rail-wrap:hover .rail-btn { opacity: 1; }
.rail-btn:hover { background: rgba(224, 16, 48, .92); color: #ffffff; }
.rail-btn.left { left: calc(var(--gutter) - 14px); }
.rail-btn.right { right: calc(var(--gutter) - 14px); }
.rail-btn[hidden] { display: none; }
.rail-btn svg { width: 19px; height: 19px; }

@media (hover: none) { .rail-btn { display: none; } }

/* ==========================================================================
   CARTES
   ========================================================================== */

.card {
  width: var(--card-w, var(--poster-w));
  display: block;
  position: relative;
  cursor: pointer;
}

.card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-poster);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--sh-1);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.card-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.01);
  transition: opacity .7s var(--ease), transform .7s var(--ease-out);
}

.card-poster img.in { opacity: 1; }

/* Liseré lumineux au survol, dessine par-dessus l-affiche. */
.card-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-poster);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: border-color .5s var(--ease);
  pointer-events: none;
}

.card:hover .card-poster {
  transform: scale(1.05);
  box-shadow: var(--sh-3);
}

.card:hover .card-poster::after { border-color: rgba(255, 255, 255, .16); }
.card:hover .card-poster img { transform: scale(1.04); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4,4,4,.92) 0%, rgba(4,4,4,.35) 42%, transparent 70%);
  opacity: 0;
  transition: opacity .5s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 13px;
  gap: 8px;
}

.card:hover .card-overlay { opacity: 1; }

.card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -34%) scale(.78);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  color: #09090b;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: all .42s var(--ease-out);
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
}

.card:hover .card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card-play svg { width: 21px; height: 21px; margin-left: 2px; }

.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  background: rgba(5,5,6,.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
}

.card-score {
  position: absolute;
  top: 10px; right: 10px;
  padding: 4px 9px;
  border-radius: var(--r-sm);
  background: rgba(5,5,6,.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(-6px);
  transition: all .42s var(--ease-out);
}

.card:hover .card-score { opacity: 1; transform: none; }
.card-score svg { width: 11px; height: 11px; }

.card-info { padding: 11px 2px 0; }

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-fast) var(--ease);
}

.card:hover .card-title { color: #fff; }

.card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Rangee numerotee facon classement */
.card.ranked {
  width: var(--card-w, var(--poster-w));
  display: block;
  position: relative;
  /* De la place sous l-affiche pour le chiffre. */
  padding-bottom: calc(var(--poster-w) * .14);
}

.card.ranked .rank {
  position: absolute;
  left: -2px;
  top: calc(var(--poster-w) * 1.5 - 4px);
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-weight: 800;
  font-size: calc(var(--poster-w) * .30);
  line-height: .8;
  letter-spacing: -.06em;
  color: var(--accent-deep);
  -webkit-text-stroke: 2px var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow)) drop-shadow(0 0 20px var(--accent-haze));
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 3;
  transition: transform .5s var(--ease);
}

.card.ranked:hover .rank { transform: translateY(-3px); }

/* Le titre descend sous le chiffre pour ne pas le chevaucher. */
.card.ranked .card-info { padding-left: calc(var(--poster-w) * .20); }

/* ==========================================================================
   GRILLE
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 13vw, 200px), 1fr));
  gap: clamp(18px, 2vw, 30px) clamp(10px, 1vw, 18px);
}

.grid .card { width: 100%; }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
}

/* ==========================================================================
   SQUELETTES
   ========================================================================== */

.skel {
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 48%, var(--surface-2) 66%);
  background-size: 300% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--r);
}

@keyframes shimmer {
  from { background-position: 150% 0; }
  to   { background-position: -150% 0; }
}

.skel-poster { aspect-ratio: 2 / 3; width: 100%; }
.skel-line { height: 11px; margin-top: 9px; border-radius: 4px; }
.skel-line.short { width: 55%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   PAGE CATALOGUE
   ========================================================================== */

.page-head {
  padding-top: calc(var(--header-h) + clamp(28px, 5vh, 52px));
  padding-bottom: 8px;
}

.page-head h1 {
  font-size: clamp(27px, 3.6vw, 44px);
  margin-bottom: 8px;
}

.page-head .lede { color: var(--muted); font-size: 15px; max-width: 620px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 24px 0 8px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.field label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

select, .input {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 13px;
  font-size: 13.5px;
  cursor: pointer;
  min-width: 140px;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

select:hover { border-color: var(--line-strong); }

select:focus, .input:focus {
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-reset { margin-left: auto; }

.count { color: var(--muted); font-size: 13.5px; margin: 18px 0 14px; }

.count b { color: var(--text); font-weight: 600; }

/* Segmenteur VF / VO et autres */
.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 3px;
}

.seg button {
  border: 0;
  background: none;
  padding: 7px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all var(--t-fast) var(--ease);
}

.seg button:hover { color: var(--text); }

.seg button.on {
  background: var(--accent);
  color: #ffffff;
}

/* ==========================================================================
   FICHE
   ========================================================================== */

.title-hero {
  position: relative;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 36px;
  isolation: isolate;
  overflow: hidden;
}

.title-hero .bd {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.title-hero .bd img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;
  opacity: 0;
  transition: opacity 1s var(--ease);
}

.title-hero .bd img.in { opacity: .5; }

.title-hero .bd::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 3%, rgba(7, 7, 10, .82) 42%, rgba(7, 7, 10, .62) 100%),
    linear-gradient(to right, rgba(7, 7, 10, .9), transparent 70%);
}

.title-main { display: flex; gap: clamp(20px, 3.4vw, 46px); align-items: flex-start; }

.title-poster {
  width: clamp(160px, 20vw, 268px);
  flex-shrink: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-3);
  border: 1px solid var(--line);
  aspect-ratio: 2/3;
  background: var(--surface-2);
}

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

.title-body { flex: 1; min-width: 0; }

.title-body h1 { font-size: clamp(26px, 3.8vw, 50px); margin-bottom: 10px; }

.tagline {
  color: var(--accent);
  font-style: italic;
  font-size: 15px;
  margin-bottom: 16px;
  opacity: .9;
}

.synopsis {
  color: var(--text-soft);
  max-width: 760px;
  margin-bottom: 24px;
  font-size: 15px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px 26px;
  margin: 26px 0;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: 860px;
}

.fact dt {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 5px;
}

.fact dd { margin: 0; font-size: 14.5px; color: var(--text); }

/* MOBILE : surtout pas align-items:center.
   Dans une colonne flex, centrer les enfants leur donne la largeur de leur
   contenu : le titre, lui, fait la largeur de son texte. Resultat mesure au
   navigateur : "INCEPTION" debordait des deux cotes de l-ecran et le
   synopsis etait coupe a gauche comme a droite. Les enfants s-etirent donc
   sur toute la largeur, et seule l-affiche est centree. */
@media (max-width: 780px) {
  .title-main {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 18px;
  }
  .title-poster { width: 148px; align-self: flex-start; }
  .title-body { width: 100%; min-width: 0; }
  .title-body h1 { font-size: clamp(27px, 8.4vw, 40px); line-height: 1.04; }
  .synopsis, .facts { text-align: left; }
  .hero-actions { justify-content: flex-start; }
  .meta-row, .chip-row { justify-content: flex-start; }
}

/* Casting */
.cast-rail { display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 16px; scrollbar-width: none; }
.cast-rail::-webkit-scrollbar { display: none; }

.cast {
  width: 112px;
  flex: 0 0 auto;
  text-align: center;
}

.cast img, .cast .ph {
  width: 112px; height: 112px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 9px;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}

.cast:hover img { border-color: var(--accent); transform: scale(1.05); }
.cast-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.cast-role { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Saisons et episodes */
.season-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.episodes { display: grid; gap: 10px; }

.ep {
  display: flex;
  gap: 15px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  text-align: left;
  width: 100%;
  align-items: center;
}

.ep:hover {
  background: var(--surface-2);
  border-color: rgba(224, 16, 48, .5);
  transform: translateX(4px);
}

.ep-still {
  width: 148px;
  aspect-ratio: 16/9;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
}

.ep-n {
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--faint);
  width: 34px;
  text-align: center;
  flex-shrink: 0;
}

.ep:hover .ep-n { color: var(--accent); }

.ep-body { flex: 1; min-width: 0; }
.ep-title { font-weight: 600; font-size: 14.5px; }
.ep-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-meta { font-size: 11.5px; color: var(--faint); margin-top: 5px; }

@media (max-width: 620px) {
  .ep-still { width: 104px; }
  .ep-n { display: none; }
}

/* ==========================================================================
   LECTEUR
   ========================================================================== */

.watch-top {
  padding-top: calc(var(--header-h) + 22px);
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.watch-top h1 { font-size: clamp(18px, 2.2vw, 27px); }

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
}

.player-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 28px;
  background: linear-gradient(150deg, #0d0f14, #07070a);
  z-index: 2;
}

.player-state .ico { font-size: 34px; }
.player-state h3 { font-size: 17px; }
.player-state p { color: var(--muted); font-size: 13.5px; max-width: 420px; margin: 0; }

.spinner {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .13);
  border-top-color: var(--accent);
  animation: spin .85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.avail-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r);
  font-size: 13.5px;
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
}

.avail-note .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--muted);
}

.avail-note.ok .dot { background: var(--ok); box-shadow: 0 0 10px rgba(74, 222, 128, .5); }
.avail-note.warn .dot { background: var(--warn); box-shadow: 0 0 10px rgba(251, 191, 36, .5); }
.avail-note.bad .dot { background: var(--danger); box-shadow: 0 0 10px rgba(255, 107, 107, .5); }

.watch-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

/* ==========================================================================
   NOUVEAUTES
   ========================================================================== */

.news-item {
  display: flex;
  gap: 15px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  align-items: center;
  transition: all var(--t-fast) var(--ease);
}

.news-item:hover { border-color: rgba(224, 16, 48, .5); transform: translateY(-2px); }

.news-item .poster {
  width: 56px; height: 84px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
}

.news-body { flex: 1; min-width: 0; }
.news-title { font-weight: 600; font-size: 14.5px; }
.news-meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

.tag {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
}

.tag.vf { color: var(--accent); border-color: rgba(224, 16, 48,.55); }
.tag.vo { color: #8ab4f8; border-color: rgba(138,180,248,.4); }

/* ==========================================================================
   DIVERS
   ========================================================================== */

.notice {
  padding: 13px 16px;
  border-radius: var(--r);
  background: rgba(224, 16, 48, .08);
  border: 1px solid rgba(224, 16, 48, .26);
  color: var(--text-soft);
  font-size: 13px;
  margin: 16px 0;
}

.empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
}

.empty .big { font-size: 42px; margin-bottom: 14px; opacity: .55; }
.empty h3 { font-size: 19px; margin-bottom: 8px; color: var(--text); }

.error-box {
  padding: 15px 18px;
  border-radius: var(--r);
  background: rgba(255, 107, 107, .09);
  border: 1px solid rgba(255, 107, 107, .3);
  color: #ffc9c9;
  font-size: 14px;
  margin: 16px 0;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 13px;
}

.genre-tile {
  position: relative;
  padding: 24px 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  transition: all var(--t) var(--ease);
}

.genre-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(224, 16, 48, .18), transparent 62%);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}

.genre-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 16, 48, .55);
  box-shadow: var(--sh-2);
}

.genre-tile:hover::after { opacity: 1; }

.footer {
  margin-top: 72px;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12.5px;
}

.footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }

/* Apparition au defilement */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}

.reveal.in { opacity: 1; transform: none; }

.sentinel { height: 1px; }

.loading-more { text-align: center; padding: 26px; color: var(--muted); font-size: 13.5px; }


/* ==========================================================================
   MARQUE ROFLIX
   ========================================================================== */

.aurora-text {
  background: var(--aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline-brand {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Liseré aurore sur les en-têtes de rangée */
.row-head h2 {
  position: relative;
  padding-left: 14px;
}

.row-head h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1.05em;
  border-radius: 3px;
  background: var(--aurora);
}

/* ==========================================================================
   FICHE PERSONNE : biographie et filmographie
   ========================================================================== */

.person-head {
  display: flex;
  gap: clamp(20px, 3.4vw, 46px);
  align-items: flex-start;
  padding-top: calc(var(--header-h) + clamp(28px, 5vh, 56px));
}

.person-photo {
  width: clamp(150px, 19vw, 240px);
  flex-shrink: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
}

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

.person-body { flex: 1; min-width: 0; }
.person-body h1 { font-size: clamp(26px, 3.4vw, 46px); margin-bottom: 10px; }

.bio {
  color: var(--text-soft);
  max-width: 820px;
  white-space: pre-line;
  font-size: 15px;
  line-height: 1.7;
}

.bio-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bio-toggle {
  margin-top: 10px;
  background: none;
  border: 0;
  color: var(--accent-bright);
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  padding: 0;
}

.bio-toggle:hover { text-decoration: underline; }

@media (max-width: 780px) {
  .person-head { flex-direction: column; align-items: center; text-align: center; }
  .person-photo { width: 170px; }
  .bio { text-align: left; }
}

/* La carte casting devient cliquable */
.cast { cursor: pointer; }
.cast:hover .cast-name { color: var(--accent-bright); }
.cast-name { transition: color var(--t-fast) var(--ease); }


/* ==========================================================================
   AMELIORATIONS - logo de titre, chips, vignettes de hero
   ========================================================================== */

/* Logo du titre a la place du texte sur la fiche */
.title-logo {
  max-width: min(460px, 78%);
  margin-bottom: 18px;
}

.title-logo img {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  object-position: left bottom;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  filter: drop-shadow(0 6px 26px rgba(0, 0, 0, .7));
}

.title-logo img.in { opacity: 1; transform: none; }

@media (max-width: 780px) {
  .title-logo { max-width: 100%; margin-inline: 0; }
  .title-logo img { object-position: left bottom; max-height: 108px; }
}

/* Rangee de chips facon fiche premium */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.chip-row .chip {
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--text-soft);
}

.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-2) !important;
  font-weight: 700 !important;
}

.rating-chip svg { width: 13px; height: 13px; }

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-left: 5px !important;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.person-chip:not(.static):hover {
  background: rgba(255, 255, 255, .13);
  border-color: var(--line-strong);
}

.person-chip .avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.person-chip .avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Boutons ronds d-action sur la fiche */
.icon-action {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .09);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  color: var(--text);
  transition: all var(--t-fast) var(--ease);
}

.icon-action:hover {
  background: rgba(255, 255, 255, .17);
  transform: translateY(-2px);
}

.icon-action svg { width: 19px; height: 19px; }
.icon-action.on { background: var(--accent); border-color: var(--accent); }

/* Vignettes de selection du hero (remplacent les points) */
.hero-thumbs {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(30px, 6vh, 64px);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-thumb {
  width: 58px;
  aspect-ratio: 2/3;
  border-radius: 9px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: .5;
  padding: 0;
  background: var(--surface-2);
  transition: all var(--t) var(--ease);
}

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

.hero-thumb:hover { opacity: .85; transform: translateY(-3px); }

.hero-thumb.on {
  opacity: 1;
  border-color: var(--accent-2);
  box-shadow: 0 8px 26px rgba(224, 16, 48, .5);
  transform: translateY(-5px);
}

@media (max-width: 900px) { .hero-thumbs { display: none; } }

/* Champ de recherche integre a l-en-tete */
.header-search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  min-width: 280px;
  cursor: text;
  transition: all var(--t-fast) var(--ease);
}

.header-search:hover { background: rgba(255, 255, 255, .1); border-color: var(--line-strong); }
.header-search svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.header-search span { font-size: 13.5px; color: var(--faint); white-space: nowrap; flex: 1; }

.header-search kbd {
  flex-shrink: 0;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.05);
  font-family: inherit;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) { .header-search { display: none; } }

/* Pastille de disponibilite sur les cartes */
.card-avail {
  position: absolute;
  bottom: 9px; left: 9px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(5, 5, 8, .84);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}

.card:hover .card-avail { opacity: 1; }
.card-avail.ok { color: #4ade80; border-color: rgba(74, 222, 128, .4); }
.card-avail.unknown { color: var(--warn); border-color: rgba(251, 191, 36, .4); }


/* ==========================================================================
   AMBIANCE CINEMA : grain et vignetage
   ========================================================================== */

/* Les references ne mettent ni grain ni vignetage : le noir pur et les
   affiches suffisent. On garde donc la surface propre. */

@media (prefers-reduced-motion: reduce) {
  .hero-bg img.in { animation: none; transform: scale(1); }
  .hero-thumb.on .bar { animation: none; width: 100%; }
  .hero-inner { animation: none; }
}

/* ==========================================================================
   COMPOSANTS INSPIRES DES REFERENCES
   Pilules de saison, grille d-episodes, onglets, synopsis depliable.
   ========================================================================== */

/* --- Pilules de saison : defilement horizontal, active en plein ---------- */

.season-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.season-pills::-webkit-scrollbar { display: none; }

.season-pill {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 20px;
  border: 1.5px solid rgba(255, 255, 255, .28);
  border-radius: var(--r-pill);
  background: transparent;
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  color: #fff;
  cursor: pointer;
  scroll-snap-align: start;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}

.season-pill:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .07); }

.season-pill.on {
  background: #fff;
  border-color: #fff;
  color: #0a0a0a;
}

/* --- Onglets de fiche : soulignement rouge + compteur -------------------- */

.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tab {
  position: relative;
  padding: 14px 0 16px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  transition: color .2s var(--ease);
}

.tab:hover { color: var(--text-soft); }
.tab.on { color: #fff; }

.tab.on::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.tab .n { font-size: 12.5px; font-weight: 500; color: var(--faint); }
.tab.on .n { color: var(--muted); }

.tab-panel { animation: panelIn .35s var(--ease) both; }

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

/* --- Grille d-episodes sur deux colonnes --------------------------------- */

.season-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.season-head h3 { font-size: 17px; font-weight: 700; }
.season-head .n { font-size: 13px; color: var(--muted); }

.episodes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 0 44px;
}

.ep {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: none;
  transition: background .2s var(--ease);
}

.ep:hover { background: rgba(255, 255, 255, .035); }

.ep-still {
  width: 88px;
  aspect-ratio: 16/10;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
}

.ep-body { flex: 1; min-width: 0; }

.ep-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 3px;
}

.ep-meta { font-size: 12.5px; color: var(--muted); }

.ep-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-play {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .34);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  transition: all .2s var(--ease);
}

.ep:hover .ep-play {
  background: #fff;
  border-color: #fff;
  color: #0a0a0a;
  transform: scale(1.06);
}

.ep-play svg { width: 16px; height: 16px; margin-left: 2px; }

@media (max-width: 860px) {
  .episodes { grid-template-columns: 1fr; gap: 0; }
  .ep-still { width: 72px; }
}

/* --- Synopsis depliable --------------------------------------------------- */

.synopsis-wrap { max-width: 760px; margin-bottom: 24px; }

.synopsis {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.synopsis.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding: 2px 0;
  border: 0;
  background: none;
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.more-btn .chev {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: transform .3s var(--ease), background .2s var(--ease);
}

.more-btn:hover .chev { background: var(--veil-hover); }
.more-btn.open .chev { transform: rotate(180deg); }
.more-btn svg { width: 14px; height: 14px; }

/* --- Ligne d-etat sous les boutons --------------------------------------- */

.avail-line {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.avail-line .sep { opacity: .5; }

/* --- Recherche : grille de tendances -------------------------------------- */

.search-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin: 20px 2px 14px;
}

.search-section-title::before {
  content: '';
  width: 3px; height: 15px;
  border-radius: 2px;
  background: var(--accent);
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 16px 12px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 2px;
}

.search-tile { display: block; color: inherit; }

.search-tile .ph, .search-tile img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-3);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.search-tile:hover img { transform: scale(1.05); box-shadow: var(--sh-3); }

.search-tile .t {
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   NOTIFICATION DISCRETE
   Une source meilleure devient disponible pendant la lecture : on la propose
   sans interrompre, au lieu d-imposer un ecran d-attente.
   ========================================================================== */

.toast {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vh, 32px);
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(18, 18, 20, .96);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .8);
  backdrop-filter: blur(20px);
  transform: translateY(24px);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .45s var(--ease);
}

.toast.in { transform: none; opacity: 1; }

.toast .ic {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
}

.toast .ic svg { width: 19px; height: 19px; }

.toast .tx { flex: 1; min-width: 0; }
.toast .tt { font-weight: 700; font-size: 14px; }
.toast .ds { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.toast .close {
  background: none;
  border: 0;
  color: var(--faint);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 2px 4px;
}

.toast .close:hover { color: var(--text); }

@media (max-width: 560px) {
  .toast { left: 16px; right: 16px; max-width: none; }
}

/* Bandeau de preparation, pose SUR la video en cours : informatif, non bloquant. */
.prep-strip {
  position: absolute;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: rgba(10, 10, 12, .84);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  font-size: 13px;
  color: var(--text-soft);
  pointer-events: none;
  animation: panelIn .4s var(--ease) both;
}

.prep-strip .dot3 {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .2);
  border-top-color: var(--accent);
  animation: spin .9s linear infinite;
  flex-shrink: 0;
}

/* ==========================================================================
   ACCUEIL PERSONNEL
   ========================================================================== */

.greeting {
  padding: calc(var(--header-h) + clamp(22px, 4vh, 44px)) 0 0;
}

.greeting h2 {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 6px;
}

.greeting p { color: var(--muted); font-size: 15px; }

/* Carte de reprise : vignette large + barre de progression */
.resume-card {
  width: clamp(240px, 24vw, 340px);
  flex: 0 0 auto;
  display: block;
  cursor: pointer;
}

.resume-still {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--r-poster);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--sh-1);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.resume-still img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease); }
.resume-still img.in { opacity: 1; }

.resume-card:hover .resume-still { transform: scale(1.04); box-shadow: var(--sh-3); }

.resume-still::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4,4,4,.88), transparent 58%);
}

.resume-play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%) scale(.85);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: #090909;
  display: grid; place-items: center;
  opacity: 0;
  transition: all .4s var(--ease-out);
  z-index: 2;
}

.resume-card:hover .resume-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.resume-play svg { width: 22px; height: 22px; margin-left: 2px; }

.resume-bar {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,.25);
  z-index: 2;
}

.resume-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

.resume-meta { padding: 10px 2px 0; }
.resume-title { font-size: 14px; font-weight: 600; }
.resume-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.resume-x {
  position: absolute;
  top: 9px; right: 9px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(4,4,4,.78);
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0;
  z-index: 3;
  transition: opacity .3s var(--ease), background .2s var(--ease);
}

.resume-card:hover .resume-x { opacity: 1; }
.resume-x:hover { background: var(--accent); }

/* Sélecteur de profil dans l-en-tête */
.profile-btn {
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  display: grid;
  place-items: center;
  transition: transform var(--t-fast) var(--ease);
}

.profile-btn:hover { transform: scale(1.07); }

.menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 230px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(18,18,20,.98);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0,0,0,.8);
  backdrop-filter: blur(20px);
  z-index: 300;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: all .25s var(--ease);
}

.menu.open { opacity: 1; transform: none; pointer-events: auto; }

.menu a, .menu button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: none;
  border-radius: 9px;
  color: var(--text-soft);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.menu a:hover, .menu button:hover { background: var(--veil-hover); color: #fff; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu .lbl { padding: 8px 12px 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }

.menu .dot-col { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; }

.header-actions { position: relative; }

/* ==========================================================================
   DENSITE VISUELLE
   Les references remplissent l-espace sous chaque affiche : note, annee,
   type. C-est ce qui distingue une grille vivante d-une suite d-images.
   ========================================================================== */

/* Ligne d-informations toujours visible, plus seulement au survol. */
.card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.card-meta .star {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-2);
  font-weight: 600;
}

.card-meta .star svg { width: 11px; height: 11px; }
.card-meta .sep { opacity: .45; }

/* Variante paysage : casse la monotonie des rangees d-affiches. */
.card.wide { width: clamp(230px, 23vw, 330px); }

.card.wide .card-poster {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-poster);
}

.card.wide .card-overlay {
  opacity: 1;
  background: linear-gradient(to top, rgba(4,4,4,.94) 2%, rgba(4,4,4,.45) 46%, transparent 78%);
  justify-content: flex-end;
  padding: 14px 16px;
}

.card.wide .wide-title {
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
}

.card.wide .wide-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255,255,255,.8);
}

.card.wide .card-info { display: none; }
.card.wide .card-badge { opacity: 0; transition: opacity .4s var(--ease); }
.card.wide:hover .card-badge { opacity: 1; }

/* Pastille d-episode neuf, comme sur les references. */
.card-flag {
  position: absolute;
  left: 10px; bottom: 10px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .03em;
  z-index: 2;
  box-shadow: 0 4px 14px rgba(229,35,47,.45);
}

/* ==========================================================================
   MATIERE DE FOND
   Le noir plat donnait une impression de page inachevee. On ajoute des
   nappes lumineuses tres diffuses, fixes, qui donnent de la profondeur
   sans attirer l-oeil.
   ========================================================================== */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}

.ambient i:nth-child(1) {
  width: 46vw; height: 46vw;
  top: 18%; left: -14%;
  background: radial-gradient(circle, rgba(229,35,47,.16), transparent 68%);
}

.ambient i:nth-child(2) {
  width: 40vw; height: 40vw;
  top: 52%; right: -12%;
  background: radial-gradient(circle, rgba(229,35,47,.11), transparent 68%);
}

.ambient i:nth-child(3) {
  width: 52vw; height: 52vw;
  bottom: -18%; left: 28%;
  background: radial-gradient(circle, rgba(246,195,92,.07), transparent 70%);
}

/* Separation discrete entre les grands blocs de contenu. */
.row + .row .row-head { position: relative; }

.row-head::before {
  content: '';
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  top: -26px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line) 12%, var(--line) 88%, transparent);
  opacity: 0;
}

.row + .row .row-head::before { opacity: 1; }

/* Bandeau de date, comme sur les references. */
.day-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin: 40px auto 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
}

.day-strip::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line), transparent);
}

/* Boutons : plus de presence, et un reflet au survol. */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .75s var(--ease);
}

.btn-primary:hover::after { transform: translateX(120%); }

.btn-ghost { border-width: 1px; }

/* Pastille VIP doree, reprise des references. */
.nav a.vip {
  border: 1px solid rgba(246,195,92,.5);
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav a.vip:hover { background: rgba(246,195,92,.12); color: var(--accent-2); }

/* ==========================================================================
   CHARGEMENT
   Un mince cercle qui tourne sur un grand rectangle noir donne
   l-impression que rien ne se passe. On montre plutot l-affiche du titre,
   floutee, avec une progression qui avance.
   ========================================================================== */

.player-state {
  overflow: hidden;
}

/* Affiche du titre en cours, floutee : le lecteur n-est plus un trou noir. */
.state-bg {
  position: absolute;
  inset: -40px;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(42px) saturate(1.3);
  opacity: .32;
  transform: scale(1.06);
  animation: stateBreathe 9s ease-in-out infinite alternate;
}

@keyframes stateBreathe {
  from { transform: scale(1.06); }
  to   { transform: scale(1.14); }
}

.state-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(4,4,4,.5), rgba(4,4,4,.88));
}

.player-state > *:not(.state-bg) { position: relative; z-index: 1; }

/* Marque ROFLIX qui pulse doucement : identite + signe de vie. */
.state-mark {
  width: 76px; height: 76px;
  animation: markPulse 2.4s var(--ease) infinite;
  filter: drop-shadow(0 4px 24px rgba(229,35,47,.5));
}

.state-mark img { width: 100%; height: 100%; object-fit: contain; }

@keyframes markPulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50%      { transform: scale(1.09); opacity: 1; }
}

/* Barre de progression indeterminee : un balayage qui avance vraiment. */
.state-bar {
  width: min(280px, 60%);
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
  position: relative;
}

.state-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-bright), transparent);
  animation: barSweep 1.5s var(--ease) infinite;
}

@keyframes barSweep {
  from { transform: translateX(-100%); }
  to   { transform: translateX(300%); }
}

/* Etapes du chargement : on dit ou on en est. */
.state-steps {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--faint);
}

.state-steps span { transition: color .4s var(--ease); }
.state-steps span.on { color: var(--text); }
.state-steps span.done { color: var(--ok); }

/* Squelettes : balayage plus doux et plus lent. */
.skel {
  background: linear-gradient(100deg,
    rgba(255,255,255,.035) 28%,
    rgba(255,255,255,.085) 46%,
    rgba(255,255,255,.035) 64%);
  background-size: 300% 100%;
  animation: shimmer 1.9s ease-in-out infinite;
}

/* Apparition en cascade des cartes d-une rangee. */
.rail > .card {
  animation: cardIn .55s var(--ease-out) both;
}

.rail > .card:nth-child(1) { animation-delay: .02s; }
.rail > .card:nth-child(2) { animation-delay: .06s; }
.rail > .card:nth-child(3) { animation-delay: .10s; }
.rail > .card:nth-child(4) { animation-delay: .14s; }
.rail > .card:nth-child(5) { animation-delay: .18s; }
.rail > .card:nth-child(6) { animation-delay: .22s; }
.rail > .card:nth-child(n+7) { animation-delay: .26s; }

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

/* ==========================================================================
   BARRE DE NAVIGATION
   ========================================================================== */

.header {
  height: 72px;
  background: linear-gradient(to bottom, rgba(4,4,4,.92) 0%, rgba(4,4,4,.55) 55%, transparent 100%);
}

.header.scrolled {
  background: rgba(8, 8, 10, .86);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}

.nav a {
  font-size: 14.5px;
  font-weight: 500;
  transition: color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}

.nav a:not(.active):hover {
  background: var(--veil-hover);
  color: #fff;
  transform: translateY(-1px);
}

.nav a.active {
  box-shadow: 0 4px 18px rgba(255,255,255,.18);
}

.logo .word { font-size: 23px; }

.header-search {
  border-radius: 11px;
  padding: 9px 14px;
  background: rgba(255,255,255,.055);
}

.header-search:focus-within,
.header-search:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--line-strong);
}

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 11px;
}

.profile-btn { border-radius: 11px; box-shadow: 0 4px 16px rgba(0,0,0,.45); }

:root { --header-h: 72px; }

/* ==========================================================================
   FINITIONS
   ========================================================================== */

/* Entree de page : evite le "saut" brutal a chaque navigation. */
main {
  animation: pageIn .5s var(--ease-out) both;
}

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

/* Barre de progression de navigation, en haut de l-ecran. */
.navloader {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 9999;
  background: transparent;
  pointer-events: none;
}

.navloader i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width .3s var(--ease), opacity .4s var(--ease);
}

/* Retour en haut : apparait seulement quand il sert. */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vh, 32px);
  z-index: 800;
  width: 46px; height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(18,18,20,.92);
  backdrop-filter: blur(16px);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: all .4s var(--ease);
}

.to-top.in { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.to-top svg { width: 19px; height: 19px; }

/* Les liens prennent le focus clavier proprement. */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Mode sobre, pilote depuis les Reglages. */
.no-motion *, .no-motion *::before, .no-motion *::after {
  animation-duration: .01ms !important;
  transition-duration: .01ms !important;
}

/* Les affiches gardent leur place pendant le chargement : pas de saut. */
.card-poster, .resume-still { contain: paint; }

/* ==========================================================================
   BARRE DE LECTURE SUR MESURE
   Un flux reconditionne annonce une duree de 0 : les controles natifs sont
   alors inutilisables. On dessine notre propre barre a partir de la duree
   reelle obtenue par ffprobe.
   ========================================================================== */

.ctl {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  padding: 44px 20px 16px;
  background: linear-gradient(to top, rgba(4,4,4,.94), rgba(4,4,4,.6) 55%, transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  pointer-events: none;
}

.player-shell:hover .ctl,
.ctl.show { opacity: 1; transform: none; pointer-events: auto; }

.ctl-track {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
}

.ctl-rail {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,.22);
  overflow: hidden;
  transition: height .18s var(--ease);
}

.ctl-track:hover .ctl-rail { height: 6px; }

.ctl-buf { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.3); }
.ctl-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); }

.ctl-knob {
  position: absolute;
  top: 50%;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .18s var(--ease);
  box-shadow: 0 2px 8px rgba(0,0,0,.6);
  pointer-events: none;
}

.ctl-track:hover .ctl-knob { transform: translate(-50%, -50%) scale(1); }

.ctl-row { display: flex; align-items: center; gap: 14px; }

.ctl-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .18s var(--ease), transform .18s var(--ease);
}

.ctl-btn:hover { background: rgba(255,255,255,.22); transform: scale(1.06); }
.ctl-btn svg { width: 17px; height: 17px; }
.ctl-btn.big { width: 46px; height: 46px; background: #fff; color: #090909; }
.ctl-btn.big:hover { background: var(--light-hover, #dcdce0); }
.ctl-btn.big svg { width: 20px; height: 20px; }

.ctl-time { font-size: 13px; color: rgba(255,255,255,.88); font-variant-numeric: tabular-nums; }
.ctl-spacer { flex: 1; }

.ctl-label {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
}

/* Infobulle de position au survol de la barre. */
.ctl-tip {
  position: absolute;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(4,4,4,.94);
  border: 1px solid var(--line);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s var(--ease);
}

.ctl-track:hover .ctl-tip { opacity: 1; }

/* ==========================================================================
   ARRONDIS COHERENTS
   Un rayon unique par famille de composant, plutot que des rectangles.
   ========================================================================== */

:root {
  --r-sm:     8px;
  --r:        12px;
  --r-lg:     16px;
  --r-poster: 14px;
  --r-xl:     22px;
}

.player-shell,
.filters,
.news-item,
.genre-tile,
.search-field,
.suggestions,
.ep,
.error-box,
.notice,
.avail-note { border-radius: var(--r-lg); }

select, .input, .btn-sm { border-radius: var(--r-sm); }
.btn { border-radius: var(--r-pill); }
.icon-btn, .profile-btn { border-radius: var(--r); }
.card-poster, .resume-still, .search-tile img, .ep-still { border-radius: var(--r-poster); }
.modal, .menu, .toast { border-radius: var(--r-xl); }
.title-poster, .person-photo { border-radius: var(--r-lg); }

/* Bordures discretes plutot que des traits marques. */
.filters, .news-item, .ep {
  border-color: rgba(255, 255, 255, .055);
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.012));
}

/* ==========================================================================
   EPISODE SUIVANT
   ========================================================================== */

.next-ep {
  margin-top: 26px;
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(135deg, rgba(229,35,47,.09), rgba(255,255,255,.02));
  display: flex;
  gap: 18px;
  align-items: center;
}

.next-ep .still {
  width: clamp(140px, 18vw, 210px);
  aspect-ratio: 16/9;
  border-radius: var(--r);
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
}

.next-ep .body { flex: 1; min-width: 0; }

.next-ep .kick {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}

.next-ep h4 {
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 5px;
}

.next-ep .desc {
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.next-ep .meta { font-size: 12.5px; color: var(--faint); margin-top: 6px; }

@media (max-width: 680px) {
  .next-ep { flex-direction: column; align-items: stretch; }
  .next-ep .still { width: 100%; }
}

/* Compte a rebours de fin d-episode, pose sur la video. */
.countdown {
  position: absolute;
  right: 20px; bottom: 20px;
  z-index: 6;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  background: rgba(10,10,12,.95);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0,0,0,.75);
  animation: panelIn .4s var(--ease) both;
  max-width: min(400px, calc(100% - 40px));
}

.countdown .ring {
  position: relative;
  width: 42px; height: 42px;
  flex-shrink: 0;
}

.countdown .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown .ring circle { fill: none; stroke-width: 3; }
.countdown .ring .bg { stroke: rgba(255,255,255,.15); }
.countdown .ring .fg { stroke: var(--accent); transition: stroke-dashoffset 1s linear; }

.countdown .ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}

.countdown .tx { flex: 1; min-width: 0; }
.countdown .tt { font-weight: 600; font-size: 14px; }
.countdown .sb { font-size: 12.5px; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   PASSE DE FINITION
   Le rouge seul rendait l-ensemble froid. Le creme et le dore du logo
   apportent la chaleur demandee, sans surcharger.
   ========================================================================== */

/* Le fond respire : une nappe creme tres diffuse rechauffe le noir. */
.ambient i:nth-child(3) {
  background: radial-gradient(circle, rgba(232, 198, 106, .09), transparent 70%);
}

/* ---- En-tetes de section : plus de presence ---- */

.row-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-head h2::before {
  content: '';
  width: 4px;
  height: 1.1em;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  position: static;
  transform: none;
  box-shadow: 0 0 14px rgba(232, 198, 106, .3);
}

.row-head .sub {
  font-size: 13.5px;
  color: var(--cream-soft);
  font-weight: 400;
  opacity: .72;
}

.row-head .more {
  color: var(--cream-soft);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: all var(--t-fast) var(--ease);
}

.row-head .more:hover {
  color: var(--cream);
  background: rgba(245, 237, 216, .08);
  border-color: rgba(245, 237, 216, .18);
  gap: 9px;
}

/* ---- Cartes : actions rapides au survol ---- */

.card-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: all .4s var(--ease-out);
}

.card:hover .card-actions { opacity: 1; transform: none; }

.card-act {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.4);
  background: rgba(10,10,12,.7);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .2s var(--ease);
}

.card-act:hover { background: #fff; color: #0a0a0a; border-color: #fff; transform: scale(1.1); }
.card-act.on { background: var(--accent); border-color: var(--accent); }
.card-act svg { width: 15px; height: 15px; }

/* Le bouton de lecture central devient creme : plus chaleureux. */
.card-play {
  background: var(--cream);
  color: #1a0f0a;
}

/* Lueur chaude sous l-affiche au survol. */
.card:hover .card-poster {
  box-shadow:
    var(--sh-3),
    0 0 50px -12px rgba(232, 198, 106, .32);
}

/* La note en dore, deja ; le reste en creme attenue. */
.card-meta { color: var(--cream-soft); opacity: .62; }
.card:hover .card-meta { opacity: .9; }
.card-title { color: var(--cream); }

/* ---- Boutons ---- */

.btn-primary {
  background: var(--cream);
  color: #1a0f0a;
  font-weight: 700;
  letter-spacing: -.01em;
}

.btn-primary:hover { background: #fff; }

.chip { border-color: rgba(245, 237, 216, .18); color: var(--cream-soft); }
.chip.solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.rating, .card-score, .rating-chip { color: var(--accent-2) !important; }

/* ---- Hero : davantage de matiere ---- */

.hero-glow {
  background:
    radial-gradient(56% 100% at 20% 100%, rgba(229, 35, 47, .22), transparent 70%),
    radial-gradient(40% 80% at 72% 100%, rgba(232, 198, 106, .10), transparent 72%);
}

.hero .kicker { color: var(--cream); }
.hero .kicker b { color: var(--accent-2); }
.hero .overview { color: var(--cream-soft); }

/* ---- Grille et rangees : plus d-air ---- */

.row { margin: clamp(42px, 7vh, 82px) 0; }
.row-head { margin-bottom: 20px; }

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

.footer {
  margin-top: 90px;
  padding: 44px 0 56px;
  background: linear-gradient(to bottom, transparent, rgba(229, 35, 47, .04));
}

.footer .mark { width: 30px; height: 30px; object-fit: contain; }
.footer strong { color: var(--cream); font-size: 15px; letter-spacing: -.02em; }
.tagline-brand { color: rgba(232, 198, 106, .55); }

/* ---- Squelettes plus doux ---- */

.skel { border-radius: var(--r-poster); }
.skel-line { border-radius: 5px; }

/* ---- Defilement plus agreable ---- */

::-webkit-scrollbar-thumb {
  background: rgba(245, 237, 216, .14);
  border-radius: var(--r-pill);
}

::-webkit-scrollbar-thumb:hover { background: rgba(245, 237, 216, .26); }

/* ==========================================================================
   CATALOGUE AVEC BARRE LATERALE
   Une colonne de genres a gauche remplit la page et rend la navigation
   immediate, au lieu d-un menu deroulant qui cache tout.
   ========================================================================== */

.catalog-body {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin-top: 26px;
}

@media (max-width: 1000px) {
  .catalog-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .side { position: static !important; }
  .side-list { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 8px; }
  .side-list::-webkit-scrollbar { display: none; }
  .side-item { flex: 0 0 auto; }
  .side-item .n { display: none; }
}

.side {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.055);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  padding: 14px;
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}

.side-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Schibsted Grotesk', Inter, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--cream);
  padding: 2px 6px 12px;
}

.side-title::before {
  content: '';
  width: 3px; height: 15px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
}

.side-list { display: grid; gap: 3px; }

.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--cream-soft);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.side-item:hover { background: rgba(245,237,216,.07); color: var(--cream); }

.side-item.on {
  background: var(--cream);
  color: #1a0f0a;
  font-weight: 600;
}

.side-item .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item .n { font-size: 12px; opacity: .5; font-variant-numeric: tabular-nums; }
.side-item.on .n { opacity: .6; }

/* ==========================================================================
   DENSITE
   Les references utilisent des espacements de 8 a 12 px. Les miens, deux a
   trois fois plus larges, donnaient cette impression de page vide.
   ========================================================================== */

.grid {
  grid-template-columns: repeat(auto-fill, minmax(clamp(118px, 11vw, 176px), 1fr));
  gap: 20px 12px;
}

.rail { gap: 12px; }
:root { --poster-w: clamp(124px, 11.5vw, 196px); }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 16px 10px; }
}

/* ==========================================================================
   FLUIDITE
   Sur une page de plusieurs centaines d-affiches, le navigateur recalcule
   tout a chaque defilement. On lui dit de sauter ce qui est hors champ.
   ========================================================================== */

.row, .grid > .card {
  content-visibility: auto;
}

.row { contain-intrinsic-size: auto 420px; }
.grid > .card { contain-intrinsic-size: auto 280px; }

/* On ne promeut une couche GPU que pendant l-animation, pas en permanence :
   un will-change laisse en place consomme de la memoire pour rien. */
.card-poster { will-change: auto; }
.card:hover .card-poster { will-change: transform; }

/* Le defilement horizontal reste fluide au doigt comme a la souris. */
.rail {
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

/* Les images reservent leur place : aucun saut de mise en page. */
.card-poster img, .resume-still img, .ep-still { content-visibility: auto; }

/* ==========================================================================
   AMBIANCE COLOREE
   L-image du titre mis en avant, floutee et masquee, teinte le haut de la
   page. C-est ce qui remplit le fond sans rien ajouter a charger : la
   couleur change avec le film affiche.
   ========================================================================== */

.ambient-art {
  position: absolute;
  inset: 0 0 auto;
  height: min(1200px, 130vh);
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 38%, transparent);
  mask-image: linear-gradient(to bottom, #000 38%, transparent);
}

.ambient-art img {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(70px) saturate(1.35) brightness(.48);
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

.ambient-art img.in { opacity: .52; }

/* Trainees lumineuses obliques : la touche qui structure le fond. */
.streaks {
  position: absolute;
  inset: 0 0 auto;
  height: min(1100px, 120vh);
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.streaks i {
  position: absolute;
  height: 2px;
  border-radius: 2px;
  transform-origin: left center;
  transform: rotate(-8deg);
  background: linear-gradient(90deg, transparent, rgba(229, 35, 47, .55), transparent);
  filter: blur(1px);
}

.streaks i:nth-child(1) { top: 16%; left: -8%; width: 56%; opacity: .5; }
.streaks i:nth-child(2) { top: 24%; left: 28%; width: 48%; opacity: .32; height: 1px; }
.streaks i:nth-child(3) { top: 40%; left: -4%; width: 38%; opacity: .22; }
.streaks i:nth-child(4) { top: 58%; left: 46%; width: 54%; opacity: .26; height: 1px; }

/* Voile rouge diffus qui descend derriere les premieres rangees. */
.streaks::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 50% at 12% 22%, rgba(229, 35, 47, .14), transparent 68%),
    radial-gradient(60% 45% at 88% 38%, rgba(229, 35, 47, .09), transparent 70%);
}

/* ==========================================================================
   TITRES DE SECTION
   Les references montent a 43 px et jouent sur deux tons. Les miens
   plafonnaient a 27 px d-un seul gris : d-ou le manque de presence.
   ========================================================================== */

.row-head { flex-wrap: wrap; align-items: flex-start; }

.row-head .head-text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.row-head h2 {
  font-size: clamp(24px, 2.9vw, 40px);
  font-weight: 800;
  letter-spacing: -.042em;
  line-height: 1.05;
  gap: 11px;
}

/* Deuxieme ton du titre : "Top 10" en blanc, "de la semaine" en gris. */
.row-head h2 .soft {
  color: var(--muted);
  font-weight: 700;
}

.row-head h2::before {
  width: 4px;
  height: .78em;
  align-self: center;
}

.row-head .sub {
  font-size: 14px;
  color: var(--muted);
  padding-left: 15px;
  opacity: .85;
}

.row-head .more { align-self: center; margin-left: auto; }

/* Fleches de defilement rondes, comme sur les references. */
.rail-btn {
  /* Petit disque centre sur le bord de la rangee, comme sur les grandes
     plateformes : discret au repos, evident au survol. */
  width: 46px;
  height: 46px;
  border-radius: 50%;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%) scale(.85);
  background: rgba(10, 10, 12, .74);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .6);
  transition: opacity .28s var(--ease), transform .28s var(--ease),
              background .2s var(--ease);
}

.rail-btn.left { left: 10px; right: auto; }
.rail-btn.right { right: 10px; left: auto; }

.rail-wrap:hover .rail-btn { opacity: 1; transform: translateY(-50%) scale(1); }

.rail-btn:hover {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
  transform: translateY(-50%) scale(1.08);
}

.rail-btn svg { width: 20px; height: 20px; }

/* La rangee se decale legerement du bord pour loger les disques. */
.rail-wrap { padding-inline: 0; }

@media (max-width: 760px) { .rail-btn { display: none; } }

/* ==========================================================================
   AFFICHES : anneau lumineux
   ========================================================================== */

.card-poster {
  box-shadow:
    var(--sh-1),
    0 0 0 1px rgba(255, 255, 255, .05);
}

.card:hover .card-poster {
  box-shadow:
    var(--sh-3),
    0 0 0 1px rgba(229, 35, 47, .5),
    0 0 44px -10px rgba(229, 35, 47, .55);
}

/* Les chiffres du classement passent sous l-affiche, en rouge detoure. */
.card.ranked .rank {
  -webkit-text-stroke: 2.5px rgba(229, 35, 47, .9);
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(229, 35, 47, .5));
}

/* ==========================================================================
   PLATEFORMES ET STUDIOS
   Une rangee de logos casse la succession d-affiches et donne du corps
   a la page, comme sur les references.
   ========================================================================== */

.studios {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px var(--gutter) 18px;
  max-width: var(--max);
  margin-inline: auto;
  scrollbar-width: none;
}

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

.studio {
  flex: 0 0 auto;
  width: clamp(130px, 13vw, 176px);
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
  display: grid;
  place-items: center;
  padding: 18px;
  transition: all .35s var(--ease);
}

.studio img {
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .62;
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}

.studio:hover {
  border-color: rgba(229, 35, 47, .4);
  background: linear-gradient(145deg, rgba(229,35,47,.1), rgba(255,255,255,.02));
  transform: translateY(-4px);
}

.studio:hover img { opacity: 1; transform: scale(1.06); }

/* ==========================================================================
   PLEINE LARGEUR
   Les rangees s-arretaient a 1680 px, laissant deux bandes noires sur un
   ecran large. Les references laissent les affiches filer jusqu-au bord :
   c-est ce qui donne l-impression d-un catalogue sans fin.
   ========================================================================== */

.rail {
  max-width: none;
  margin-inline: 0;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  scroll-padding-left: var(--gutter);
}

.row-head,
.studios,
.day-strip {
  max-width: none;
  margin-inline: 0;
}

/* Les fleches suivent le bord de l-ecran. */
.rail-btn.right { right: var(--gutter); }
.rail-btn.left { right: calc(var(--gutter) + 56px); left: auto; }

/* Les affiches retrouvent une taille genereuse : les reduire avait rendu
   la page moins impressionnante, pas plus dense. */
:root { --poster-w: clamp(150px, 13vw, 232px); }

.grid {
  grid-template-columns: repeat(auto-fill, minmax(clamp(142px, 12.5vw, 206px), 1fr));
  gap: 26px 14px;
}

.rail { gap: 14px; }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 18px 10px; }
}

/* La grille du catalogue reste dans sa colonne, elle. */
.catalog-body { max-width: var(--max); margin-inline: auto; }

/* ==========================================================================
   CARTES PAYSAGE ENRICHIES
   Comme la rangee "Films populaires" des references : grande vignette
   16/9, titre et informations dessous, pas en surimpression.
   ========================================================================== */

.card.wide { width: clamp(280px, 26vw, 400px); }

.card.wide .card-overlay {
  opacity: 0;
  background: linear-gradient(to top, rgba(4,4,4,.9) 0%, rgba(4,4,4,.25) 50%, transparent 75%);
  justify-content: center;
  align-items: center;
  padding: 0;
}

.card.wide:hover .card-overlay { opacity: 1; }
.card.wide .wide-title, .card.wide .wide-meta { display: none; }
.card.wide .card-info { display: block; padding-top: 12px; }

.card.wide .card-title {
  font-size: 15.5px;
  font-weight: 600;
  -webkit-line-clamp: 1;
}

.card.wide .card-meta { font-size: 13px; }

/* ==========================================================================
   RANGEES PLUS SERREES VERTICALEMENT
   Plus de contenu visible sans defiler.
   ========================================================================== */

.row { margin: clamp(30px, 4.4vh, 54px) 0; }
.row-head { margin-bottom: 16px; }
.rail { padding-top: 10px; padding-bottom: 26px; }

/* ==========================================================================
   FOND HABITE
   Les nappes diffuses ne suffisaient pas : elles s-effacaient derriere le
   contenu. On pose une mosaique d-affiches tres assombrie, qui occupe
   vraiment la surface sans jamais concurrencer la lecture.
   ========================================================================== */

.mosaic {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  padding: 10px;
  transform: rotate(-8deg) scale(1.3);
  transform-origin: center;
  opacity: 0;
  transition: opacity 2s var(--ease);
}

.mosaic.in { opacity: .30; }

.mosaic img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  filter: grayscale(.25) brightness(.78) saturate(1.15);
}

/* Voile par-dessus : la mosaique reste une texture, jamais un motif lisible. */
.mosaic::after {
  content: '';
  position: absolute;
  inset: -20%;
  /* Voile allege : la mosaique doit rester perceptible. Avec le voile
     precedent (97 % de noir) et 13 % d-opacite, elle etait invisible. */
  background:
    radial-gradient(75% 60% at 50% 40%, rgba(4,4,4,.42), rgba(4,4,4,.78) 76%),
    linear-gradient(to bottom, rgba(4,4,4,.62), rgba(4,4,4,.38) 45%, rgba(4,4,4,.8));
}

/* Les nappes et trainees passent par-dessus la mosaique. */
.ambient, .streaks, .ambient-art { z-index: -1; }

/* Plus de presence pour la teinte issue de l-affiche. */
.ambient-art { height: min(1500px, 150vh); }
.ambient-art img.in { opacity: .62; }

.streaks i:nth-child(1) { opacity: .7; height: 3px; }
.streaks i:nth-child(2) { opacity: .45; }

/* Lueur ancree en bas d-ecran : le pied de page n-est plus un trou noir. */
body::before {
  background:
    radial-gradient(90% 60% at 50% -10%, rgba(229, 35, 47, .16), transparent 72%),
    radial-gradient(70% 40% at 50% 108%, rgba(229, 35, 47, .09), transparent 70%);
  height: 100%;
}

@media (prefers-reduced-motion: reduce), (max-width: 760px) {
  .mosaic { display: none; }
}


/* ==========================================================================
   FOND NOIR UNI
   La decoration d-arriere-plan (mosaique, trainees, teintes) a ete
   desactivee : elle encombrait sans rien apporter. Comme sur les grandes
   plateformes, c-est la densite des rangees qui remplit la page.
   ========================================================================== */

.mosaic,
.streaks,
.ambient,
.ambient-art { display: none !important; }

body::before,
body::after { display: none; }

body { background: #000; }

.hero-glow { display: none; }

/* Le voile du hero se fond directement dans le noir. */
.hero-scrim {
  background:
    linear-gradient(to top, #000 0%, rgba(0,0,0,.65) 34%, rgba(0,0,0,0) 72%),
    linear-gradient(to right, rgba(0,0,0,.94) 0%, rgba(0,0,0,.74) 36%, rgba(0,0,0,.3) 64%, rgba(0,0,0,0) 88%);
}

/* Surfaces : un gris a peine percevable, pas un gris bleute. */
:root {
  --surface:   #101010;
  --surface-2: #161616;
  --surface-3: #202020;
}

/* Les cartes gardent leur relief par l-ombre, pas par un fond colore. */
.card-poster { background: #121212; }

.filters, .news-item, .ep, .side {
  background: rgba(255, 255, 255, .025);
  border-color: rgba(255, 255, 255, .06);
}

/* En-tete : noir au defilement, sans teinte. */
.header { background: linear-gradient(to bottom, rgba(0,0,0,.95), rgba(0,0,0,.6) 55%, transparent); }
.header.scrolled { background: rgba(0, 0, 0, .9); }

.footer { background: none; border-top-color: rgba(255,255,255,.07); }

/* ==========================================================================
   AUTHENTIFICATION
   Composition cinematographique : une affiche floutee en fond, un panneau
   sobre au premier plan. Le compte reste facultatif, l-ecran le dit.
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 40px) var(--gutter) 60px;
  position: relative;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.auth-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.4s var(--ease-out), transform 12s var(--ease-out);
  filter: brightness(.42) saturate(1.1);
}

.auth-bg img.in { opacity: 1; transform: scale(1); }

.auth-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(0,0,0,.55), rgba(0,0,0,.88) 75%),
    linear-gradient(to bottom, rgba(0,0,0,.75), rgba(0,0,0,.45) 40%, rgba(0,0,0,.92));
}

.auth-card {
  width: min(440px, 100%);
  padding: clamp(26px, 4vw, 44px);
  border-radius: var(--r-xl);
  background: rgba(16, 16, 16, .88);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 32px 90px rgba(0,0,0,.8);
  animation: authIn .6s var(--ease-out) both;
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.auth-card .brand {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.auth-card .brand img { width: 62px; height: 62px; object-fit: contain; }

.auth-card h1 {
  font-size: 26px;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -.03em;
}

.auth-card .lede {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
  line-height: 1.55;
}

.field-group { margin-bottom: 16px; }

.field-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cream-soft);
  margin-bottom: 7px;
}

.field-wrap { position: relative; display: flex; align-items: center; }

.field-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease),
              box-shadow .2s var(--ease);
}

.field-input::placeholder { color: var(--faint); }

.field-input:focus {
  border-color: rgba(229,35,47,.6);
  background: rgba(255,255,255,.065);
  box-shadow: 0 0 0 3px rgba(229,35,47,.14);
}

.field-input.invalid {
  border-color: rgba(255,107,107,.65);
  box-shadow: 0 0 0 3px rgba(255,107,107,.12);
}

.field-toggle {
  position: absolute;
  right: 10px;
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.field-toggle:hover { color: var(--text); background: rgba(255,255,255,.07); }
.field-toggle svg { width: 18px; height: 18px; }

.field-error {
  font-size: 12.5px;
  color: #ff9b9b;
  margin-top: 6px;
  min-height: 16px;
}

.auth-submit { width: 100%; justify-content: center; margin-top: 8px; }

.auth-alt {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.07);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.auth-alt a { color: var(--cream); font-weight: 600; }
.auth-alt a:hover { color: var(--accent-bright); }

.auth-note {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: var(--r);
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.06);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-skip {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--faint);
}

.auth-skip:hover { color: var(--cream); }

/* Jauge de robustesse du mot de passe. */
.pw-meter { display: flex; gap: 4px; margin-top: 8px; }

.pw-meter i {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,.12);
  transition: background .3s var(--ease);
}

.pw-meter.w1 i:nth-child(1) { background: #ff6b6b; }
.pw-meter.w2 i:nth-child(-n+2) { background: #fbbf24; }
.pw-meter.w3 i:nth-child(-n+3) { background: #a3e635; }
.pw-meter.w4 i { background: #4ade80; }

.pw-hint { font-size: 12px; color: var(--faint); margin-top: 6px; }

/* ==========================================================================
   SYSTEME DE DESIGN — REFONTE
   Etabli apres analyse du CSS reel des references. Trois enseignements
   ont change ma copie :
     1. pas de blanc pur : un ton papier chaud (#f4f1ea) ;
     2. pas de bordures : un lisere INTERIEUR, invisible mais structurant ;
     3. un second accent chaud (sable) a cote du rouge, pour la chaleur.
   ========================================================================== */

:root {
  /* Encre : cinq paliers, du noir au gris de surface. */
  --ink-0: #050506;
  --ink-1: #0a0a0c;
  --ink-2: #111114;
  --ink-3: #18181c;
  --ink-4: #212126;

  /* Papier : un blanc chaud, jamais #fff. C-est ce qui rend l-ecran
     confortable sur une longue soiree. */
  --paper:   #f4f1ea;
  --paper-2: #d5d0c6;
  --paper-3: #9d988e;
  --paper-4: #6f6b64;

  /* Liserés derives du papier, a tres faible opacite. */
  --hair:   rgba(244, 241, 234, .07);
  --hair-2: rgba(244, 241, 234, .13);
  --hair-3: rgba(244, 241, 234, .22);
  --veil:   rgba(244, 241, 234, .045);
  --veil-2: rgba(244, 241, 234, .085);

  /* Verre depoli des panneaux. */
  --glass-bg: rgba(16, 16, 19, .82);
  --glass-blur: blur(22px) saturate(150%);

  /* Rouge ROFLIX, et sable cinema pour rechauffer. */
  --signal:      #e4202c;
  --signal-hi:   #f2343f;
  --signal-deep: #9b0f19;
  --film:        #e3b26b;
  --film-soft:   rgba(227, 178, 107, .18);
  --film-line:   rgba(227, 178, 107, .45);

  /* Le lisere interieur remplace les bordures : aucune arete dure. */
  --rim:     inset 0 0 0 1px var(--hair-2);
  --rim-top: inset 0 1px 0 rgba(244, 241, 234, .12);

  --ease:     cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Rayons : une echelle, pas des valeurs au hasard. */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Reaffectation des anciens noms, pour ne rien casser. */
  --bg:          var(--ink-0);
  --bg-2:        var(--ink-1);
  --surface:     var(--ink-2);
  --surface-2:   var(--ink-3);
  --surface-3:   var(--ink-4);
  --text:        var(--paper);
  --text-soft:   var(--paper-2);
  --muted:       var(--paper-3);
  --faint:       var(--paper-4);
  --cream:       var(--paper);
  --cream-soft:  var(--paper-2);
  --accent:        var(--signal);
  --accent-bright: var(--signal-hi);
  --accent-deep:   var(--signal-deep);
  --accent-2:      var(--film);
  --line:        var(--hair);
  --line-strong: var(--hair-2);

  --r-sm:     var(--radius-sm);
  --r:        var(--radius-md);
  --r-lg:     var(--radius-lg);
  --r-xl:     var(--radius-xl);
  --r-poster: var(--radius-md);

  /* Profondeur par l-ombre, jamais par un trait. */
  --sh-1: 0 2px 10px rgba(0,0,0,.5), var(--rim);
  --sh-2: 0 10px 30px rgba(0,0,0,.6), var(--rim);
  --sh-3: 0 24px 60px -12px rgba(0,0,0,.85), var(--rim);

  /* Echelle typographique : les titres montent beaucoup plus haut. */
  --fs-h1: clamp(2.4rem, 4.6vw, 4.2rem);
  --fs-h2: clamp(1.7rem, 2.6vw, 2.4rem);

  /* Affiches plus petites : on en voit bien davantage d-un coup d-oeil. */
  --poster-w: clamp(124px, 10.5vw, 172px);
}

/* Typographie : condensee pour les titres, humaniste pour le texte.
   L-import se trouve en tete de fichier, comme l-exige CSS. */

body { font-family: Geist, Inter, system-ui, sans-serif; }

h1, h2, h3, h4,
.logo .word,
.row-head h2,
.hero h1,
.card.ranked .rank,
.season-pill,
.tab {
  font-family: 'Big Shoulders Display', 'Schibsted Grotesk', Inter, sans-serif;
}

/* La condensee demande un poids plus franc pour tenir. */
.row-head h2 { font-weight: 800; letter-spacing: -.01em; }
.hero h1 { font-weight: 800; letter-spacing: -.01em; }

/* ---- Bordures remplacees par des liseres interieurs ---- */

.card-poster,
.filters,
.news-item,
.ep,
.side,
.genre-tile,
.search-field,
.suggestions,
.menu,
.toast,
.player-shell,
.auth-card,
.next-ep,
.studio,
.title-poster,
.person-photo {
  border: 0;
  box-shadow: var(--sh-1);
}

.menu, .toast, .auth-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 28px 70px rgba(0,0,0,.8), var(--rim), var(--rim-top);
}

.card:hover .card-poster {
  box-shadow:
    0 28px 64px -14px rgba(0,0,0,.9),
    inset 0 0 0 1px var(--film-line),
    0 0 40px -14px var(--film-soft);
}

/* ---- Surfaces secondaires : un voile, pas un bloc ---- */

.filters, .news-item, .ep, .side {
  background: var(--veil);
}

.filters:hover, .news-item:hover, .ep:hover { background: var(--veil-2); }

/* ---- Boutons ---- */

.btn-primary {
  background: var(--paper);
  color: var(--ink-0);
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
}

.btn-primary:hover { background: #fff; }

.btn-ghost {
  background: var(--veil-2);
  border: 0;
  box-shadow: var(--rim);
  color: var(--paper);
}

.btn-ghost:hover { background: var(--veil-3, rgba(244,241,234,.13)); }

/* ---- Chips ---- */

.chip, .chip-row .chip {
  border: 0;
  box-shadow: var(--rim);
  background: var(--veil);
  color: var(--paper-2);
}

.chip.solid { background: var(--signal); color: #fff; box-shadow: none; }

/* ---- Notes et etoiles en sable ---- */

.rating, .card-score, .rating-chip, .card-meta .star { color: var(--film) !important; }

/* ---- Hero : voile plus doux, titre plus grand ---- */

.hero h1 { font-size: clamp(42px, 7vw, 108px); line-height: .92; }

.hero-scrim {
  background:
    linear-gradient(to top, var(--ink-0) 0%, rgba(5,5,6,.6) 36%, rgba(5,5,6,0) 74%),
    linear-gradient(to right, rgba(5,5,6,.92) 0%, rgba(5,5,6,.7) 38%, rgba(5,5,6,.2) 66%, rgba(5,5,6,0) 88%);
}

/* ---- Le classement reprend le sable ---- */

.card.ranked .rank {
  -webkit-text-stroke: 2px var(--film-line);
  filter: drop-shadow(0 0 12px var(--film-soft));
}

.card.ranked:hover .rank { -webkit-text-stroke-color: var(--film); }

/* ---- Barre laterale ---- */

.side-item.on { background: var(--paper); color: var(--ink-0); }
.side-item:hover { background: var(--veil-2); color: var(--paper); }

/* ---- Navigation ---- */

.nav a.active { background: var(--paper); color: var(--ink-0); box-shadow: none; }
.header.scrolled { background: var(--glass-bg); backdrop-filter: var(--glass-blur); }
.header-search { background: var(--veil); border: 0; box-shadow: var(--rim); }
.header-search:hover { background: var(--veil-2); }
.icon-btn { background: var(--veil); border: 0; box-shadow: var(--rim); }
.icon-btn:hover { background: var(--veil-2); }

/* ---- Champs ---- */

.field-input, select, .input {
  border: 0;
  box-shadow: var(--rim);
  background: var(--veil);
}

.field-input:focus, select:focus, .input:focus {
  background: var(--veil-2);
  box-shadow: inset 0 0 0 1px var(--film-line), 0 0 0 3px var(--film-soft);
}

/* ---- Squelettes ---- */

.skel {
  background: linear-gradient(100deg,
    rgba(244,241,234,.035) 30%,
    rgba(244,241,234,.075) 48%,
    rgba(244,241,234,.035) 66%);
  background-size: 300% 100%;
}

/* ---- Defilement ---- */

::-webkit-scrollbar-thumb { background: var(--hair-2); }
::-webkit-scrollbar-thumb:hover { background: var(--hair-3); }
::selection { background: var(--signal); color: #fff; }

/* ==========================================================================
   SOUS LE LECTEUR : A SUIVRE, PUIS TOUS LES EPISODES
   Objectif : on ne revient jamais sur la fiche de la serie pour trouver
   l-episode suivant. Tout est la, avec vignette et progression reelle.
   ========================================================================== */

.wsec { margin-top: clamp(34px, 5vw, 62px); }

.wsec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 26px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.wsec-title h2 {
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 800;
  letter-spacing: .005em;
  text-transform: uppercase;
  line-height: 1;
}

.wsec-title p {
  margin-top: 7px;
  font-size: 13.5px;
  color: var(--muted);
}

.wsec-sub {
  margin: -8px 0 18px;
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}

.wsec .season-pills { margin: 0; flex: 0 1 auto; }

/* ---------------------------------------------------------- A suivre */

.upnext-card {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: clamp(18px, 2.4vw, 32px);
  align-items: center;
  padding: clamp(14px, 1.4vw, 20px);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(118deg, rgba(228, 32, 44, .10) 0%, rgba(228, 32, 44, 0) 46%),
    var(--ink-2);
  box-shadow: var(--sh-2), var(--rim-top);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease), background .4s var(--ease);
}

.upnext-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 70px -18px rgba(0, 0, 0, .9), inset 0 0 0 1px var(--film-line);
  background:
    linear-gradient(118deg, rgba(228, 32, 44, .16) 0%, rgba(228, 32, 44, 0) 48%),
    var(--ink-3);
}

.upnext-body { min-width: 0; padding-right: 6px; }

.upnext-kick {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--film);
}

.upnext-body h3 {
  margin-top: 8px;
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.005em;
}

.upnext-meta {
  margin-top: 9px;
  font-size: 12.5px;
  color: var(--paper-3);
}

.upnext-desc {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.upnext-actions { margin-top: 18px; }
.upnext-card .btn { pointer-events: none; }

/* ------------------------------------------------- vignette d-episode */

.epx-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--ink-3);
  box-shadow: var(--rim);
}

.epx-thumb.big { border-radius: var(--radius-md); }

.epx-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.01);
  transition: opacity .55s var(--ease), transform .7s var(--ease-out);
}

.epx-thumb img.in { opacity: 1; }
.epx:hover .epx-thumb img,
.upnext-card:hover .epx-thumb img { transform: scale(1.055); }

/* Sans visuel d-episode, on compose avec l-image de la serie. */
.epx-fallback {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
}

.epx-fallback::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 6, .9), rgba(5, 5, 6, .55));
}

.epx-fallback span {
  position: relative;
  z-index: 1;
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 800;
  color: var(--paper-2);
  letter-spacing: .02em;
}

.epx-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(5, 5, 6, .5) 0%, rgba(5, 5, 6, .18) 60%, transparent 100%);
  transition: opacity .3s var(--ease);
}

.epx-play svg {
  width: 20px;
  height: 20px;
  padding: 13px;
  border-radius: 50%;
  color: var(--ink-0);
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .6);
  transform: scale(.82);
  transition: transform .34s var(--ease-out);
}

.epx:hover .epx-play,
.upnext-card:hover .epx-play { opacity: 1; }
.epx:hover .epx-play svg,
.upnext-card:hover .epx-play svg { transform: scale(1); }

.epx-num,
.epx-dur {
  position: absolute;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 4px 7px;
  border-radius: var(--radius-xs);
  background: rgba(5, 5, 6, .74);
  backdrop-filter: blur(8px);
  color: var(--paper);
}

.epx-num { top: 8px; left: 8px; }
.epx-dur { bottom: 8px; right: 8px; letter-spacing: .04em; }

.epx-thumb.big .epx-num,
.epx-thumb.big .epx-dur { font-size: 11.5px; padding: 5px 9px; }

/* Progression reellement enregistree pour cet episode. */
.epx-prog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 3px;
  background: rgba(244, 241, 234, .22);
}

.epx-prog i {
  display: block;
  height: 100%;
  background: var(--signal);
  box-shadow: 0 0 10px rgba(228, 32, 44, .7);
}

/* ------------------------------------------------- grille des episodes */

.epx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 26px 20px;
}

.epx {
  display: block;
  color: inherit;
  text-decoration: none;
  content-visibility: auto;
  contain-intrinsic-size: 230px;
}

.epx-body { padding: 11px 2px 0; }

.epx-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.epx-t {
  font-weight: 650;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--cream);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.epx-badge {
  flex: none;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--signal);
  color: #fff;
}

.epx-d {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.epx-d.dim { color: var(--faint); }

.epx.now { cursor: default; }
.epx.now .epx-thumb { box-shadow: inset 0 0 0 2px var(--signal); }
.epx.now .epx-play { display: none; }
.epx.now .epx-t { color: var(--paper); }

.epx-skel {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background: linear-gradient(100deg,
    rgba(244, 241, 234, .035) 30%,
    rgba(244, 241, 234, .075) 48%,
    rgba(244, 241, 234, .035) 66%);
  background-size: 300% 100%;
  animation: shimmer 1.5s linear infinite;
}

@media (max-width: 680px) {
  .upnext-card { grid-template-columns: 1fr; gap: 14px; }
  .upnext-body { padding: 0 4px 4px; }
  .upnext-desc { -webkit-line-clamp: 4; }
  .upnext-card .btn { pointer-events: auto; width: 100%; justify-content: center; }
  .epx-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 20px 14px; }
  .epx-d { -webkit-line-clamp: 2; font-size: 12px; }
  .wsec-head { align-items: flex-start; flex-direction: column; }
}

/* ==========================================================================
   NAVIGATION MOBILE : BARRE D-ONGLETS
   Un menu de bureau comprime dans un tiroir n-est pas une experience
   mobile. Les destinations principales passent en bas, a portee de pouce.
   ========================================================================== */

.tabbar {
  display: none;
  position: fixed;
  z-index: 180;
  left: 0;
  right: 0;
  bottom: 0;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: stretch;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(5, 5, 6, .98), rgba(10, 10, 12, .9));
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 var(--hair-2), 0 -18px 40px rgba(0, 0, 0, .6);
  transform: translateY(0);
  transition: transform .34s var(--ease-out);
}

.tabbar.down { transform: translateY(112%); }

.tab-item {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 7px 2px 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--paper-4);
  font: inherit;
  font-size: 10px;
  letter-spacing: .04em;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .22s var(--ease);
}

.tab-item svg { width: 22px; height: 22px; }
.tab-item span { font-weight: 600; }
.tab-item:active { background: var(--veil); }
.tab-item.on { color: var(--paper); }

/* Le repere de l-onglet actif : un trait court au-dessus de l-icone. */
.tab-item.on::before {
  content: '';
  position: absolute;
  top: 0;
  width: 26px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--signal);
  box-shadow: 0 0 12px rgba(228, 32, 44, .8);
}


/* Feuille « Explorer » : le reste du catalogue, sans quitter la page. */
.tab-sheet {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(5, 5, 6, .66);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease);
}

.tab-sheet.in { opacity: 1; pointer-events: auto; }

.tab-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 18px calc(84px + env(safe-area-inset-bottom));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--ink-1);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .7), var(--rim-top);
  transform: translateY(16px);
  transition: transform .34s var(--ease-out);
}

.tab-sheet.in .tab-sheet-panel { transform: translateY(0); }

.tab-sheet-panel .grip {
  width: 42px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--hair-3);
}

.tab-sheet-panel h3 {
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}

.tab-sheet-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tab-sheet-links a {
  padding: 14px 15px;
  border-radius: var(--radius-md);
  background: var(--veil);
  box-shadow: var(--rim);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
}

.tab-sheet-links a.on { background: var(--paper); color: var(--ink-0); box-shadow: none; }
.tab-sheet-links a:active { background: var(--veil-2); }

@media (max-width: 760px) {
  .tabbar { display: grid; }
  .burger { display: none; }

  /* La barre ne doit recouvrir ni le pied de page ni le bouton de retour. */
  .has-tabbar body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .to-top { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }

  /* Le tiroir du bureau n-a plus de raison d-exister ici. */
  .nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tabbar, .tab-sheet-panel { transition: none; }
}

/* ==========================================================================
   AFFINAGES MOBILES
   Pas un bureau retreci : des reglages voulus, ecran par ecran.
   ========================================================================== */

@media (max-width: 760px) {
  .watch-top { gap: 10px; }
  .watch-top h1 { font-size: 17px; line-height: 1.25; }
  .watch-bar { gap: 8px; }
  .watch-bar .btn { flex: 1 1 auto; justify-content: center; }

  /* Le lecteur occupe toute la largeur : les marges volent de la surface. */
  .player-shell { border-radius: var(--radius-sm); }

  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 12px 16px; }

  .row-head h2 { font-size: 19px; }
  .footer-grid { gap: 26px; }
}

/* ==========================================================================
   RECHERCHES RECENTES
   Celles de ce navigateur. Aucune liste de "recherches populaires" n-est
   affichee : on n-a pas la donnee, et on n-invente pas de chiffre.
   ========================================================================== */

.search-recent.hidden { display: none; }

.search-recent .search-section-title { justify-content: space-between; }
.search-recent .search-section-title span { flex: 1; }

.search-wipe {
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--faint);
  font: inherit;
  font-size: 12px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .2s var(--ease);
}

.search-wipe:hover { color: var(--signal); }

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-chip {
  padding: 9px 15px;
  border: 0;
  border-radius: 999px;
  background: var(--veil);
  box-shadow: var(--rim);
  color: var(--text-soft);
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease-out);
}

.search-chip:hover {
  background: var(--paper);
  color: var(--ink-0);
  transform: translateY(-1px);
  box-shadow: none;
}

/* ==========================================================================
   PAGE INTROUVABLE
   Une adresse fautive n-est pas un cul-de-sac : on propose une sortie.
   ========================================================================== */

.lost { padding-top: clamp(40px, 9vh, 110px); }

.lost-head { max-width: 680px; }

.lost-code {
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  font-size: clamp(76px, 15vw, 190px);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: 2px var(--hair-3);
  user-select: none;
}

.lost-head h1 {
  margin-top: clamp(8px, 1.6vw, 20px);
  font-size: clamp(28px, 4.2vw, 56px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.01em;
}

.lost-head p {
  margin-top: 16px;
  font-size: 15.5px;
  line-height: 1.68;
  color: var(--text-soft);
  max-width: 54ch;
}

.lost-head .hero-actions { margin-top: 26px; flex-wrap: wrap; }

.lost .row { margin-top: clamp(40px, 6vw, 72px); }

@media (max-width: 560px) {
  .lost-head .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ==========================================================================
   LA LUMIERE DU FILM
   --------------------------------------------------------------------------
   Le fond reste noir : c’est ce qu’il faut pour regarder, et c’est ce qui a
   ete demande. Ce sont les REPERES qui changent de couleur, pas le decor.
   --film-live recoit la teinte dominante de l’affiche a l’ecran (js/light.js)
   et alimente halos, liseres au survol, numeros du classement et barres de
   rangee. La salle change de lumiere a chaque titre sans charger une seule
   image de decor.
   ========================================================================== */

@property --film-live {
  syntax: '<color>';
  inherits: true;
  initial-value: #e3b26b;
}

:root {
  --film-live: #e3b26b;
  /* Couleur propre a une carte, posee au survol par js/light.js ; sans elle
     la carte emprunte la lumiere de la salle. */
  --glow: var(--film-live);
}

/* La transition est portee par @property : d’un film a l’autre, la lumiere
   glisse au lieu de sauter. */
html { transition: --film-live 1.1s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { transition: none; }
}

/* ---- Halo du hero : la lumiere vient de l’affiche, derriere le titre ---- */

.hero-glow {
  display: block;
  position: absolute;
  left: -14%;
  bottom: -26%;
  width: min(1180px, 86vw);
  height: min(840px, 92vh);
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side,
      color-mix(in srgb, var(--film-live) 26%, transparent) 0%,
      color-mix(in srgb, var(--film-live) 9%, transparent) 46%,
      transparent 78%);
  filter: blur(14px);
  opacity: .9;
}

/* Un second foyer, plus serre, juste sous les boutons : c’est lui qui donne
   l’impression d’un projecteur plutot que d’une tache. */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(to right,
    color-mix(in srgb, var(--film-live) 70%, transparent) 0%,
    color-mix(in srgb, var(--film-live) 14%, transparent) 38%,
    transparent 72%);
}

/* ---- Cartes : au survol, l’affiche s’eclaire de SA propre couleur ---- */

.card:hover .card-poster {
  box-shadow:
    var(--sh-3),
    0 0 0 1px color-mix(in srgb, var(--glow) 62%, transparent),
    0 14px 48px -12px color-mix(in srgb, var(--glow) 55%, transparent);
}

.card:hover .card-poster::after {
  border-color: color-mix(in srgb, var(--glow) 45%, transparent);
}

.card-play {
  background: color-mix(in srgb, var(--glow) 26%, rgba(10, 10, 12, .74));
  backdrop-filter: blur(6px);
}

.card:hover .card-title { color: #fff; }

.card-act.on {
  background: var(--glow);
  border-color: var(--glow);
  color: #0a0a0c;
}

/* ---- Barre de rangee et titres ---- */

.row-head h2::before {
  background: linear-gradient(to bottom, var(--film-live), var(--signal));
  box-shadow: 0 0 16px color-mix(in srgb, var(--film-live) 50%, transparent);
}

.row-head .more:hover { color: var(--film-live); }

/* ---- Classement : le chiffre passe A COTE de l’affiche, pas dessous ----
   Pose sous l’affiche, il etait coupe par la carte suivante et le titre
   devait s’ecarter. Place a gauche, en chiffre geant detoure, il tient le
   role qu’il a sur les grandes plateformes : un repere qu’on lit de loin. */

.row .card.ranked {
  --card-w: var(--poster-w);
  width: calc(var(--poster-w) + var(--poster-w) * .42);
  padding-bottom: 0;
  padding-left: calc(var(--poster-w) * .42);
}

.card.ranked .card-body { position: relative; z-index: 1; }

.card.ranked .rank {
  position: absolute;
  left: calc(var(--poster-w) * -.03);
  top: 50%;
  transform: translateY(-54%);
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  font-size: calc(var(--poster-w) * 1.08);
  font-weight: 900;
  line-height: .72;
  letter-spacing: -.07em;
  color: var(--ink-0);
  -webkit-text-stroke: 2.5px color-mix(in srgb, var(--film-live) 72%, transparent);
  filter: none;
  z-index: 0;
}

.card.ranked:hover .rank {
  transform: translateY(-54%) translateX(-3px);
  -webkit-text-stroke-color: var(--glow);
}

.card.ranked .card-info { padding-left: 2px; }

/* Au-dela de 9, le chiffre prend deux fois plus de large : on le resserre. */
.card.ranked:nth-child(n+10) {
  width: calc(var(--poster-w) + var(--poster-w) * .66);
  padding-left: calc(var(--poster-w) * .66);
}

.card.ranked:nth-child(n+10) .rank {
  font-size: calc(var(--poster-w) * .92);
  left: calc(var(--poster-w) * -.06);
}

/* ---- Affiche manquante : un degrade, jamais un rectangle vide ---- */

.card-poster.no-art {
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--film-live) 16%, var(--ink-3)) 0%,
      var(--ink-1) 72%);
}

.card-poster.no-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg,
      rgba(244, 241, 234, .035) 0 2px,
      transparent 2px 9px);
}

/* ==========================================================================
   RYTHME VERTICAL
   Les rangees respiraient trop : entre deux, on traversait un ecran de noir.
   La densite est ce qui donne envie de continuer a descendre.
   ========================================================================== */

.row { margin: clamp(26px, 3.4vh, 46px) 0; }
.row-head { margin-bottom: 14px; }
.row + .row { margin-top: clamp(22px, 3vh, 40px); }

/* Le bloc d’accueil tenait un ecran entier pour trois lignes. */
.greeting { padding: clamp(20px, 3vh, 38px) 0 0; }
.greeting h2 { margin-bottom: 4px; }
.day-strip { margin: 14px 0 0; }

/* ==========================================================================
   BANDEAU EDITORIAL
   Un seul titre, en grand, pose au milieu des rangees. Il prend la lumiere
   de SA propre affiche : deux visites de suite ne donnent pas la meme page.
   ========================================================================== */

.spot {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 3vw, 48px);
  margin: clamp(34px, 5vh, 68px) 0;
  padding: clamp(18px, 2vw, 28px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 140% at 8% 50%,
      color-mix(in srgb, var(--glow) 13%, transparent) 0%,
      transparent 62%),
    var(--ink-1);
  box-shadow: var(--rim), var(--rim-top);
  overflow: hidden;
}

/* Un trait de lumiere a gauche : c’est lui qui signe le bloc. */
.spot::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14%;
  bottom: 14%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(to bottom, transparent, var(--glow), transparent);
}

.spot-art {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-3);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .9), var(--rim);
}

.spot-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .8s var(--ease), transform 1s var(--ease-out);
}

.spot-art img.in { opacity: 1; }
.spot-art:hover img { transform: scale(1.055); }

.spot-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.9);
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(10, 10, 12, .55);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 55%, transparent);
  opacity: 0;
  transition: opacity .3s var(--ease), transform .4s var(--ease-out);
}

.spot-art:hover .spot-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.spot-play svg { width: 24px; height: 24px; margin-left: 3px; color: var(--paper); }

.spot-body { min-width: 0; padding: 6px clamp(4px, 1vw, 18px) 6px 0; }

.spot-kick {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--glow);
}

.spot-body h2 {
  margin-top: 12px;
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  font-size: clamp(30px, 4vw, 62px);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.012em;
  color: var(--paper);
}

.spot-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--paper-3);
}

.spot-meta .rating { display: inline-flex; align-items: center; gap: 5px; color: var(--film); }
.spot-meta .rating svg { width: 13px; height: 13px; }
.spot-meta .sep { opacity: .4; }

.spot-desc {
  margin-top: 16px;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--text-soft);
  max-width: 56ch;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spot-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .spot { grid-template-columns: 1fr; gap: 18px; }
  .spot-body { padding: 0 4px 6px; }
  .spot-desc { -webkit-line-clamp: 3; }
  .spot-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ==========================================================================
   GRILLE DE GENRES
   Une grille, pas un rail : le format change, donc l’oeil se reveille.
   Les affiches viennent du meme appel que les comptes - aucune requete de
   plus, et le chiffre affiche est celui de TMDB.
   ========================================================================== */

.gband-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.gtile {
  position: relative;
  display: block;
  height: 132px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink-2);
  box-shadow: var(--rim);
  text-decoration: none;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease);
}

.gtile:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .9),
    inset 0 0 0 1px color-mix(in srgb, var(--film-live) 50%, transparent);
}

/* Trois affiches inclinees : on lit le genre sans lire le mot. */
.gtile-art {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 0 0 38%;
  transform: rotate(-8deg) scale(1.3) translateX(6%);
  transform-origin: right center;
  opacity: .58;
  transition: opacity .4s var(--ease), transform .6s var(--ease-out);
}

.gtile:hover .gtile-art { opacity: .78; transform: rotate(-8deg) scale(1.36) translateX(4%); }

.gtile-art img {
  width: 33%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .6s var(--ease);
}

.gtile-art img.in { opacity: 1; }

.gtile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    var(--ink-1) 0%,
    rgba(10, 10, 12, .9) 42%,
    rgba(10, 10, 12, .35) 74%,
    rgba(10, 10, 12, .1) 100%);
}

.gtile-txt {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
}

.gtile-txt strong {
  display: block;
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .005em;
  line-height: 1;
  color: var(--paper);
}

.gtile-txt span {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  letter-spacing: .08em;
  color: var(--paper-4);
}

@media (max-width: 560px) {
  .gband-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .gtile { height: 104px; }
  .gtile-txt { left: 12px; bottom: 11px; }
  .gtile-txt strong { font-size: 19px; }
  .gtile-txt span { font-size: 10.5px; margin-top: 4px; }
}

/* ==========================================================================
   DETAILS QUI MANQUAIENT
   ========================================================================== */

/* "Tout explorer" passait a la ligne au milieu du mot. */
.row-head .more { white-space: nowrap; }

/* Les titres de cartes sur deux lignes decalaient la ligne de meta de la
   carte voisine : la rangee perdait son alignement. On reserve donc DEUX
   lignes a tous les titres, qu-ils en occupent une ou deux. */
.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2em * var(--card-title-lh, 1.3));
  line-height: var(--card-title-lh, 1.3);
}

.card.wide .card-info { min-height: 0; }

/* ==========================================================================
   ECRAN DE TRANSITION
   L-image du titre, floutee, son nom, et un trait qui avance. L-attente
   entre deux pages devient une mise en scene.
   ========================================================================== */

.pageout {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  background: var(--ink-0);
  opacity: 0;
  pointer-events: none;
  transition: opacity .34s var(--ease);
}

.pageout.in { opacity: 1; pointer-events: auto; }

.pageout-bg {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  filter: blur(32px) saturate(1.3) brightness(.52);
  transform: scale(1.06);
  animation: pageoutZoom 4s var(--ease-out) forwards;
}

@keyframes pageoutZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1.14); }
}

.pageout-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
    rgba(5, 5, 6, .22) 0%, rgba(5, 5, 6, .72) 72%, var(--ink-0) 100%);
}

.pageout-mid {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  max-width: 760px;
  animation: pageoutRise .5s var(--ease-out) both;
}

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

.pageout-brand {
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--signal);
}

.pageout-title {
  margin-top: 14px;
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  font-size: clamp(34px, 6.4vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.012em;
  color: var(--paper);
  text-shadow: 0 6px 40px rgba(0, 0, 0, .7);
}

.pageout-bar {
  width: min(220px, 46vw);
  height: 2px;
  margin: 30px auto 0;
  border-radius: 2px;
  background: rgba(244, 241, 234, .16);
  overflow: hidden;
}

.pageout-bar i {
  display: block;
  height: 100%;
  width: 36%;
  border-radius: 2px;
  background: var(--paper);
  animation: pageoutSlide 1.15s var(--ease) infinite;
}

@keyframes pageoutSlide {
  from { transform: translateX(-110%); }
  to   { transform: translateX(300%); }
}

@media (prefers-reduced-motion: reduce) {
  .pageout, .pageout-bg, .pageout-mid, .pageout-bar i { animation: none; transition: none; }
}

/* ==========================================================================
   LECTEUR SUR TELEPHONE
   Le lecteur occupait 358x201 px sur un ecran de 390 : un quart de la
   surface pour la seule chose qu-on est venu faire. Il passe donc
   bord a bord, et les commandes se rangent dessous.
   ========================================================================== */

@media (max-width: 760px) {
  .watch-top {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
  }

  .watch-top h1 {
    font-size: 15.5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Bord a bord : on annule la gouttiere de .wrap. */
  .player-shell {
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    width: calc(100% + var(--gutter) * 2);
    border-radius: 0;
    box-shadow: none;
  }

  .watch-bar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 8px;
    margin-top: 14px;
  }

  .watch-bar .btn {
    justify-content: center;
    padding: 12px 10px;
    font-size: 13px;
  }

  .watch-bar .btn span { display: none; }
  .watch-bar .btn svg { margin: 0; }
}

/* Sur un telephone tenu a l-horizontale, le lecteur prend tout. */
@media (max-width: 920px) and (orientation: landscape) {
  .header, .tabbar, .watch-top, .watch-bar, .footer { display: none !important; }
  .wrap { padding: 0 !important; }
  .player-shell {
    margin: 0 !important;
    width: 100% !important;
    height: 100vh;
    border-radius: 0;
  }
  body { padding-bottom: 0 !important; }
}

/* ==========================================================================
   NAVIGATION : UNE CAPSULE, PAS UNE BARRE
   --------------------------------------------------------------------------
   Une barre pleine largeur colle l-interface au sommet de l-ecran et coupe
   l-image du hero d-un trait net. Une capsule posee par-dessus laisse
   l-affiche respirer en dessous : on voit tout de suite qu-il y a une image
   derriere, et l-interface a l-air posee sur le film plutot que vissee a la
   fenetre.
   ========================================================================== */

.header {
  background: transparent;
  border-bottom: 0;
  padding-top: 12px;
  transition: padding-top .35s var(--ease), background .35s var(--ease);
}

.header .wrap {
  position: relative;
  gap: 14px;
  padding-left: clamp(12px, 2.4vw, 28px);
  padding-right: clamp(12px, 2.4vw, 28px);
}

/* La capsule : logo + liens, sur un verre sombre. */
.header .wrap > .logo,
.header .nav {
  position: relative;
  z-index: 1;
}

.header .wrap::before {
  content: '';
  position: absolute;
  left: clamp(12px, 2.4vw, 28px);
  right: clamp(12px, 2.4vw, 28px);
  top: 50%;
  height: 56px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(12, 12, 15, .64);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--rim), 0 12px 34px -14px rgba(0, 0, 0, .9);
  opacity: 0;
  transition: opacity .35s var(--ease), background .35s var(--ease);
  pointer-events: none;
}

/* Au repos, en haut de page : aucun fond, juste un degrade qui garantit la
   lisibilite du texte sur l-image. */
.header::before {
  content: '';
  position: absolute;
  inset: 0 0 -28px;
  background: linear-gradient(to bottom, rgba(5, 5, 6, .86), rgba(5, 5, 6, 0));
  pointer-events: none;
  transition: opacity .35s var(--ease);
}

/* Des qu-on defile, la capsule apparait et le degrade s-efface. */
.header.scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  padding-top: 8px;
}

.header.scrolled .wrap::before { opacity: 1; }
.header.scrolled::before { opacity: 0; }

/* ---- Liens : la couleur ne fait plus le travail, la lumiere si ---- */

.nav { position: relative; }

.nav a {
  padding: 9px 15px;
  font-weight: 550;
  letter-spacing: .005em;
  color: var(--paper-3);
  background: none !important;
}

.nav a:hover { color: var(--paper); background: none !important; }

.nav a.active {
  color: var(--paper);
  background: none !important;
  font-weight: 700;
}

.nav a.active:hover { color: var(--paper); }

/* Le trait de lumiere, pose par js/core.js sous le lien actif ou survole. */
.nav-light {
  position: absolute;
  left: 0;
  bottom: 2px;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--signal);
  box-shadow: 0 0 14px color-mix(in srgb, var(--signal) 85%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: transform .34s var(--ease-out), width .34s var(--ease-out), opacity .25s var(--ease);
}

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

/* ---- Le logo retrouve sa place ---- */

.logo .word {
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  font-size: 25px;
  letter-spacing: .012em;
}

@media (max-width: 460px) {
  .logo .word { display: block; font-size: 21px; }
}

@media (max-width: 760px) {
  .header .wrap::before { height: 50px; border-radius: 16px; }
  .header { padding-top: 8px; }
}

/* ==========================================================================
   LE FOND N-EST PLUS UN TROU NOIR
   --------------------------------------------------------------------------
   Le noir uni avait ete demande, et il reste la base. Mais un noir
   absolument plat, sur 5 000 pixels de hauteur, donne une page morte entre
   les rangees. On ajoute donc DEUX choses, et rien de plus :
     1. deux faisceaux obliques tres faibles, comme la lumiere d-un
        projecteur dans une salle - ils prennent la couleur du titre affiche ;
     2. un grain tres fin, qui empeche les degrades de se figer en bandes.
   Aucune image n-est chargee : tout est en CSS, et tout s-efface si le
   visiteur demande moins d-animation.
   ========================================================================== */

body::before {
  content: '';
  display: block;
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  /* UNE SEULE couche, et non deux : chaque couche fixe plein ecran est
     repeinte a chaque image pendant le defilement. Faisceaux de projection
     + halo + grain tiennent ici ensemble. */
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 3px),
    linear-gradient(118deg,
      transparent 18%,
      color-mix(in srgb, var(--film-live) 7%, transparent) 30%,
      transparent 44%),
    linear-gradient(282deg,
      transparent 52%,
      color-mix(in srgb, var(--signal) 5%, transparent) 64%,
      transparent 74%),
    radial-gradient(120% 70% at 50% -10%,
      color-mix(in srgb, var(--film-live) 6%, transparent) 0%,
      transparent 60%);
}

body::after { display: none; }

/* Les anciennes nappes restent desactivees : elles faisaient de la
   decoration, pas de la lumiere. */
.mosaic,
.streaks,
.ambient,
.ambient-art { display: none !important; }

/* ==========================================================================
   BARRE DU LECTEUR
   --------------------------------------------------------------------------
   Une rangee de gros boutons gris sous la video faisait panneau de reglages.
   Ici : une reglette sombre collee au lecteur, des icones, et le texte
   seulement quand il apporte quelque chose. Le plein ecran est a droite,
   la ou on le cherche.
   ========================================================================== */

.watch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-md);
  background: var(--ink-1);
  box-shadow: var(--rim);
}

.wb-left,
.wb-right { display: flex; align-items: center; gap: 4px; min-width: 0; }

.wb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--paper-3);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}

.wb-btn svg { width: 18px; height: 18px; flex: none; }
.wb-btn:hover { background: var(--veil-2); color: var(--paper); }
.wb-btn:active { transform: scale(.97); }

.wb-btn.on { color: var(--signal); }

/* Sur telephone, seules les icones : la largeur est precieuse. */
@media (max-width: 620px) {
  .watch-bar { margin-top: 8px; padding: 6px; }
  .wb-btn { padding: 0 12px; }
  .wb-btn.wide span { display: none; }
}

/* La reglette suit le lecteur quand il passe bord a bord. */
@media (max-width: 760px) {
  .watch-bar {
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    width: calc(100% + var(--gutter) * 2);
    border-radius: 0;
    margin-top: 0;
  }
}

/* ==========================================================================
   FLUIDITE
   --------------------------------------------------------------------------
   Trois reglages mesurables, aucun effet decoratif :
     1. le navigateur ne peint que ce qui est a l-ecran ;
     2. il connait la place a reserver, donc la barre de defilement ne saute
        pas pendant le chargement ;
     3. les animations ne portent que sur transform et opacity, les deux
        seules proprietes que le compositeur sait traiter sans recalculer
        la mise en page.
   ========================================================================== */

.row,
.spot,
.wsec,
.epx,
.gband-grid { content-visibility: auto; }

.row { contain-intrinsic-size: auto 430px; }
.spot { contain-intrinsic-size: auto 360px; }
.wsec { contain-intrinsic-size: auto 500px; }
.gband-grid { contain-intrinsic-size: auto 290px; }

/* Les rails defilent au doigt sans a-coups, et s-arretent sur une carte. */
.rail {
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* will-change coute de la memoire : on ne l-arme qu-au survol du rail,
   pas sur les centaines de cartes de la page. */
.card-poster { will-change: auto; }
.rail:hover .card:hover .card-poster { will-change: transform; }

/* Les images gardent leur place avant d-arriver : plus de saut de page. */
.card-poster,
.epx-thumb,
.spot-art { contain: layout paint; }

/* Miniature du hero : quelques kilo-octets affiches tout de suite, etires
   et floutes. La grande image prend ensuite le relais par-dessus. */
.hero-tiny {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(26px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0;
  transition: opacity .45s var(--ease);
}

.hero-tiny.in { opacity: 1; }

/* ==========================================================================
   ACCUEIL : ON ARRIVE SUR DES FILMS, PAS SUR UN MESSAGE
   --------------------------------------------------------------------------
   La salutation, la phrase d-ambiance et la date occupaient trois blocs
   empiles, soit pres de 200 px avant la premiere affiche. Tout tient
   maintenant sur une ligne.
   ========================================================================== */

.greeting { padding: clamp(18px, 2.6vh, 32px) 0 0; }

.greet-line {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.greet-line h2 {
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 800;
  letter-spacing: .005em;
  line-height: 1;
  color: var(--paper);
  margin: 0;
}

.greet-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--film-live);
  align-self: center;
}

.greet-sub {
  font-size: 14px;
  color: var(--paper-3);
}

.greet-date {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--paper-4);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .greet-sep, .greet-date { display: none; }
  .greet-line { gap: 6px; }
  .greet-sub { font-size: 13px; }
}

/* ==========================================================================
   HERO : COMPTEUR ET TIRETS DE PROGRESSION
   Sans eux, rien ne dit que le hero defile, ni combien de titres restent.
   ========================================================================== */

.hero-nav {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(26px, 4vh, 48px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-count {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: 'Big Shoulders Display', Inter, sans-serif;
  letter-spacing: .04em;
}

.hero-count b {
  font-size: 22px;
  font-weight: 800;
  color: var(--paper);
  line-height: 1;
}

.hero-count span {
  font-size: 13px;
  font-weight: 700;
  color: var(--paper-4);
}

.hero-dashes { display: flex; align-items: center; gap: 7px; }

.hero-dash {
  position: relative;
  width: 34px;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(244, 241, 234, .22);
  cursor: pointer;
  overflow: hidden;
  transition: width .4s var(--ease-out), background .3s var(--ease);
}

.hero-dash:hover { background: rgba(244, 241, 234, .4); }
.hero-dash.on { width: 60px; background: rgba(244, 241, 234, .18); }

.hero-dash i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--signal);
  box-shadow: 0 0 10px color-mix(in srgb, var(--signal) 80%, transparent);
}

/* Le remplissage dure exactement le temps avant le titre suivant (9 s),
   et le noeud est reinsere a chaque changement pour rejouer l-animation. */
.hero-dash.on i { animation: heroDash 9s linear forwards; }

@keyframes heroDash {
  from { width: 0; }
  to   { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-dash.on i { animation: none; width: 100%; }
}

/* Sur un ecran etroit, les vignettes disparaissent deja : les tirets
   prennent le relais, centres sous les boutons. */
@media (max-width: 1000px) {
  .hero-nav {
    position: static;
    margin-top: 22px;
    padding: 0;
  }
}

@media (max-width: 560px) {
  .hero-dash { width: 22px; }
  .hero-dash.on { width: 40px; }
}

/* ==========================================================================
   "TOUT EXPLORER" : UN VRAI BOUTON
   Le lien flottait a droite, sans forme, et son chevron avait disparu.
   ========================================================================== */

.row-head .more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--veil);
  box-shadow: var(--rim);
  color: var(--paper-3);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), gap .25s var(--ease);
}

.row-head .more svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.row-head .more:hover {
  background: var(--paper);
  color: var(--ink-0);
  box-shadow: none;
  gap: 11px;
}

/* ==========================================================================
   LE PASSAGE DU HERO AUX RANGEES
   La coupure etait nette : une arete horizontale en travers de l-ecran.
   ========================================================================== */

.hero { margin-bottom: 0; }

.hero::after {
  height: 1px;
  background: linear-gradient(to right,
    color-mix(in srgb, var(--film-live) 55%, transparent) 0%,
    color-mix(in srgb, var(--film-live) 10%, transparent) 42%,
    transparent 78%);
}

/* ==========================================================================
   MENU "LECTEUR" DE LA BARRE DE LECTURE
   La meilleure source est choisie automatiquement. Ce menu sert au cas que
   AUCUN test ne peut detecter : une source qui repond normalement mais
   n-affiche rien, le lecteur etant dans une iframe d-un autre domaine.
   ========================================================================== */

.wb-menu-wrap { position: relative; }

.wb-menu-btn svg { transition: transform .25s var(--ease); }
.wb-menu-wrap.open .wb-menu-btn svg { transform: rotate(180deg); }
.wb-menu-wrap.open .wb-menu-btn { background: var(--veil-2); color: var(--paper); }

.wb-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 40;
  min-width: 176px;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--ink-2);
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, .9), var(--rim), var(--rim-top);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .24s var(--ease-out);
}

.wb-menu-wrap.open .wb-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.wb-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--paper-3);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.wb-menu-item:hover { background: var(--veil-2); color: var(--paper); }
.wb-menu-item.on { color: var(--paper); }

.wb-menu-label { flex: 1; }

.wb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--hair-3);
}

.wb-menu-item.on .wb-dot {
  background: var(--signal);
  box-shadow: 0 0 9px color-mix(in srgb, var(--signal) 75%, transparent);
}

.wb-check { display: flex; color: var(--signal); }
.wb-check svg { width: 15px; height: 15px; }

@media (max-width: 620px) {
  .wb-menu-btn.wide span { display: inline; }
  .wb-menu { min-width: 150px; }
}
