/* ═══════════════════════════════════════════════════════════════════════
   STREAMLOG — Fiches (série / film / personne)
   Design éditorial : serif pour les titres, mono pour les micro-labels,
   filets fins plutôt que blocs colorés. Hérite des tokens de streamlog.css.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Réinitialisation du wrapper ──────────────────────────────────────── */
.stl-fiche {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 64px;
  color: var(--stl-text);
  font-family: var(--stl-sans);
}

/* ── Micro-label mono ─────────────────────────────────────────────────── */
.stl-kicker {
  font-family: var(--stl-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stl-text-muted);
  margin: 0;
}
.stl-kicker em { font-style: normal; color: var(--stl-primary); }

/* ═══ 1. BANDEAU / HERO ═══════════════════════════════════════════════ */
.stl-fiche-banner {
  position: relative;
  height: clamp(180px, 26vw, 340px);
  margin: 0 -16px 0;
  background-size: cover;
  background-position: center 25%;
  overflow: hidden;
}
.stl-fiche-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      color-mix(in srgb, var(--stl-paper) 20%, transparent) 0%,
      color-mix(in srgb, var(--stl-paper) 55%, transparent) 55%,
      var(--stl-paper) 100%),
    linear-gradient(to right,
      var(--stl-paper) 0%,
      transparent 18%,
      transparent 82%,
      var(--stl-paper) 100%);
}

/* ── En-tête : affiche + identité ─────────────────────────────────────── */
.stl-fiche-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding-top: 40px;
}
/* Avec bandeau, l'identité s'aligne sur le bas de l'affiche (cadrage cinéma) ;
   sans bandeau on aligne en haut, sinon une fiche peu remplie laisse un trou. */
.stl-fiche--has-banner .stl-fiche-head {
  margin-top: -110px;
  padding-top: 0;
  align-items: end;
}

.stl-fiche-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: var(--stl-radius);
  overflow: hidden;
  background: var(--stl-surface-2);
  border: 1px solid var(--stl-border);
  box-shadow: var(--stl-shadow-lg);
}
.stl-fiche-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stl-fiche-poster-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 54px; opacity: .35;
}

.stl-fiche-identity { padding-bottom: 6px; min-width: 0; }

.stl-fiche-title {
  font-family: var(--stl-serif);
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 10px 0 0;
  color: var(--stl-text);
}
.stl-fiche-orig {
  font-family: var(--stl-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--stl-text-muted);
  margin: 6px 0 0;
}

/* Ligne de faits : 2022–… · HBO · 3 saisons · 26 épisodes */
.stl-factline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--stl-text-dim);
}
.stl-factline li { display: flex; align-items: center; gap: 10px; }
.stl-factline li + li::before {
  content: '';
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--stl-border-hover);
}
.stl-factline b { font-weight: 600; color: var(--stl-text); }

/* Pastille d'état de série */
.stl-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--stl-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.stl-state::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.stl-state-ongoing   { color: var(--stl-green); }
.stl-state-ended     { color: var(--stl-text-muted); }
.stl-state-cancelled { color: var(--stl-red); }
.stl-state-hiatus    { color: var(--stl-gold); }
/* Bleu et non l'accent du thème : « Prochainement » ne doit pas se confondre
   avec « Annulée », qui est rouge comme l'accent par défaut. */
.stl-state-soon      { color: var(--stl-blue); }

/* Note globale */
.stl-score {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--stl-serif);
  font-weight: 600;
  color: var(--stl-gold);
}
.stl-score-value { font-size: 19px; line-height: 1; }
.stl-score-max   { font-size: 12px; opacity: .65; }

/* Genres */
.stl-fiche .stl-genres-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
}
.stl-fiche .stl-genre-tag {
  padding: 4px 11px;
  border: 1px solid var(--stl-border);
  border-radius: 999px;
  background: transparent;
  color: var(--stl-text-dim);
  font-family: var(--stl-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: all var(--stl-transition);
}
.stl-fiche .stl-genre-tag:hover {
  border-color: var(--stl-primary);
  color: var(--stl-primary);
}

/* ═══ 2. CORPS : colonne latérale + contenu ═══════════════════════════ */
.stl-fiche-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 44px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--stl-border);
}
.stl-fiche-aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
  position: sticky;
  top: calc(var(--h-navbar, 68px) + 20px);
}
.stl-fiche-main { min-width: 0; display: flex; flex-direction: column; gap: 48px; }

/* ── Panneau (encadré léger) ──────────────────────────────────────────── */
.stl-panel {
  border: 1px solid var(--stl-border);
  border-radius: var(--stl-radius);
  background: var(--stl-surface);
  padding: 18px;
}
.stl-panel + .stl-panel { margin-top: 0; }
.stl-panel-title {
  font-family: var(--stl-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stl-text-muted);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stl-border);
}

/* ── Anneau de progression ────────────────────────────────────────────── */
.stl-progress-ring {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.stl-ring {
  --p: 0;
  position: relative;
  flex: 0 0 58px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: conic-gradient(var(--stl-primary) calc(var(--p) * 1%), var(--stl-border) 0);
  display: grid;
  place-items: center;
}
.stl-ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--stl-surface);
}
.stl-ring-value {
  position: relative;
  font-family: var(--stl-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--stl-text);
}
.stl-ring.is-complete { background: conic-gradient(var(--stl-green) 100%, var(--stl-green) 0); }
.stl-ring.is-complete .stl-ring-value { color: var(--stl-green); }

.stl-progress-legend { min-width: 0; }
.stl-progress-legend strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--stl-text);
}
.stl-progress-legend span {
  font-size: 12px;
  color: var(--stl-text-muted);
}

/* ── Boutons de la colonne ────────────────────────────────────────────── */
.stl-actions { display: flex; flex-direction: column; gap: 8px; }

.stl-fiche .stl-btn,
.stl-fiche .stl-btn-wl,
.stl-fiche .stl-btn-watched-lg,
.stl-fiche .stl-btn-series-mark {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--stl-radius);
  border: 1px solid var(--stl-border-hover);
  background: transparent;
  color: var(--stl-text);
  font-family: var(--stl-sans);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--stl-transition);
}
.stl-fiche .stl-btn:hover,
.stl-fiche .stl-btn-wl:hover,
.stl-fiche .stl-btn-watched-lg:hover,
.stl-fiche .stl-btn-series-mark:hover {
  border-color: var(--stl-text);
  background: var(--stl-text);
  color: var(--stl-paper);
}
.stl-fiche .stl-btn-primary {
  border-color: var(--stl-primary);
  background: var(--stl-primary);
  color: #fff;
}
.stl-fiche .stl-btn-primary:hover {
  background: var(--stl-primary-hover);
  border-color: var(--stl-primary-hover);
  color: #fff;
}
.stl-fiche .stl-btn-wl.in-list,
.stl-fiche .stl-btn-watched-lg.is-watched,
.stl-fiche .stl-btn-series-mark.all-watched {
  border-color: var(--stl-green);
  background: var(--stl-green-dim);
  color: var(--stl-green);
}
.stl-fiche .stl-btn-wl.in-list:hover,
.stl-fiche .stl-btn-watched-lg.is-watched:hover,
.stl-fiche .stl-btn-series-mark.all-watched:hover {
  background: var(--stl-green);
  border-color: var(--stl-green);
  color: var(--stl-paper);
}
.stl-fiche .stl-btn-trailer,
.stl-fiche .stl-btn-imdb {
  background: transparent;
  color: var(--stl-text);
  border-color: var(--stl-border-hover);
}

/* ── Fiche technique ──────────────────────────────────────────────────── */
.stl-specs { margin: 0; }
.stl-specs div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--stl-border);
}
.stl-specs div:last-child { border-bottom: none; padding-bottom: 0; }
.stl-specs dt {
  font-family: var(--stl-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stl-text-muted);
  white-space: nowrap;
}
.stl-specs dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--stl-text);
  text-align: right;
}
/* Les liens restent en encre + soulignement : l'accent du thème peut être
   un jaune ou un pastel, insuffisant pour du texte. Il sert au survol. */
.stl-specs dd a {
  color: var(--stl-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--stl-border-hover);
}
.stl-specs dd a:hover { color: var(--stl-primary); text-decoration-color: currentColor; }

/* ── Notation personnelle ─────────────────────────────────────────────── */
.stl-fiche .stl-rating-widget {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.stl-fiche .stl-rating-widget > span:first-child {
  font-family: var(--stl-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stl-text-muted);
  margin-right: 6px;
}
.stl-fiche .stl-star {
  background: none;
  border: none;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--stl-border-hover);
  transition: color var(--stl-transition), transform var(--stl-transition);
}
.stl-fiche .stl-star:hover { transform: scale(1.15); }
.stl-fiche .stl-star:hover,
.stl-fiche .stl-star.active { color: var(--stl-gold); }

/* ═══ 3. BLOCS DE CONTENU ════════════════════════════════════════════ */
.stl-block { min-width: 0; }
.stl-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--stl-text);
}
.stl-block-title {
  font-family: var(--stl-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stl-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.stl-block-count {
  font-family: var(--stl-mono);
  font-size: 10.5px;
  color: var(--stl-text-muted);
  border: 1px solid var(--stl-border);
  border-radius: 999px;
  padding: 1px 8px;
}

/* Synopsis */
.stl-synopsis-text {
  font-family: var(--stl-serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--stl-text-dim);
  max-width: 68ch;
  margin: 0;
}
.stl-synopsis-text::first-letter { /* pas de lettrine par défaut */ }

/* ═══ 4. SAISONS & ÉPISODES ═════════════════════════════════════════ */
.stl-fiche .stl-seasons-wrap { margin-top: 0; }
.stl-fiche .stl-season-block {
  border: 1px solid var(--stl-border);
  border-radius: var(--stl-radius);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--stl-surface);
  transition: border-color var(--stl-transition);
}
.stl-fiche .stl-season-block:hover { border-color: var(--stl-border-hover); }
.stl-fiche .stl-season-block.open { border-color: var(--stl-text); }

.stl-season-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 0 0;
}
.stl-fiche .stl-season-header {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: transparent;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}
.stl-fiche .stl-season-header:hover { background: transparent; }
.stl-fiche .stl-season-block.open .stl-season-header { background: transparent; }

.stl-fiche .stl-season-toggle {
  font-size: 9px;
  color: var(--stl-text-muted);
  transition: transform var(--stl-transition);
  flex-shrink: 0;
}
.stl-fiche .stl-season-block.open .stl-season-toggle { transform: rotate(90deg); }

.stl-fiche .stl-season-title {
  margin: 0;
  font-family: var(--stl-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stl-fiche .stl-season-count {
  font-family: var(--stl-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--stl-text-muted);
  white-space: nowrap;
}

.stl-fiche .stl-btn-season-mark {
  flex-shrink: 0;
  padding: 5px 12px;
  border: 1px solid var(--stl-border);
  border-radius: 999px;
  background: transparent;
  color: var(--stl-text-muted);
  font-family: var(--stl-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  margin: 0;
  transition: all var(--stl-transition);
}
.stl-fiche .stl-btn-season-mark:hover { border-color: var(--stl-text); color: var(--stl-text); }
.stl-fiche .stl-btn-season-mark.all-watched {
  border-color: var(--stl-green);
  color: var(--stl-green);
  background: var(--stl-green-dim);
}

/* Barre de progression de saison */
.stl-season-progress {
  height: 2px;
  background: var(--stl-border);
  overflow: hidden;
}
.stl-season-progress i {
  display: block;
  height: 100%;
  background: var(--stl-primary);
  transition: width .4s ease;
}

/* Tableau des épisodes — défile horizontalement plutôt que d'élargir la page */
.stl-fiche .stl-season-episodes { border-top: 1px solid var(--stl-border); overflow-x: auto; }
.stl-fiche .stl-episodes-table { width: 100%; border-collapse: collapse; }
.stl-fiche .stl-episodes-table th {
  padding: 9px 16px;
  text-align: left;
  background: var(--stl-surface-2);
  font-family: var(--stl-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stl-text-muted);
  border-bottom: 1px solid var(--stl-border);
}
.stl-fiche .stl-episodes-table td {
  padding: 10px 16px;
  border-top: 1px solid var(--stl-border);
  font-size: 14px;
  vertical-align: middle;
  color: var(--stl-text-dim);
}
.stl-fiche .stl-episodes-table tbody tr:first-child td { border-top: none; }
.stl-fiche .stl-ep-row { transition: background var(--stl-transition); }
.stl-fiche .stl-ep-row:hover { background: var(--stl-surface-2); }
.stl-fiche .stl-ep-row.ep-watched td { opacity: 1; color: var(--stl-text-muted); }
.stl-fiche .stl-ep-row.ep-watched .stl-ep-title { color: var(--stl-text-muted); }

.stl-fiche .stl-ep-num {
  font-family: var(--stl-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--stl-text-muted);
  width: 52px;
  white-space: nowrap;
}
.stl-fiche .stl-ep-title { color: var(--stl-text); font-weight: 500; }
.stl-fiche .stl-ep-title em { color: var(--stl-text-muted); font-weight: 400; }
.stl-fiche .stl-ep-date,
.stl-fiche .stl-ep-dur {
  font-family: var(--stl-mono);
  font-size: 11.5px;
  color: var(--stl-text-muted);
  white-space: nowrap;
}

.stl-fiche .stl-ep-watch-btn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--stl-border-hover);
  background: transparent;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: all var(--stl-transition);
}
.stl-fiche .stl-ep-watch-btn:hover { border-color: var(--stl-green); }
.stl-fiche .stl-ep-watch-btn.watched {
  border-color: var(--stl-green);
  background: var(--stl-green-dim);
}

/* ═══ 5. CASTING ════════════════════════════════════════════════════ */
.stl-fiche .stl-cast-section { margin-top: 0; }
.stl-cast-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 18px 16px;
}
.stl-fiche .stl-cast-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: none;
  padding: 0;
  background: none;
  border-radius: 0;
}
.stl-fiche .stl-cast-card-link:hover { background: none; }

.stl-cast-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--stl-radius);
  overflow: hidden;
  background: var(--stl-surface-2);
  border: 1px solid var(--stl-border);
  margin-bottom: 9px;
}
.stl-cast-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  transition: transform .4s var(--ease, ease), filter var(--stl-transition);
  filter: grayscale(.15);
}
.stl-cast-card-link:hover .stl-cast-photo img { transform: scale(1.04); filter: grayscale(0); }
.stl-cast-card-link:hover .stl-cast-photo { border-color: var(--stl-text); }
.stl-cast-photo-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 30px; opacity: .3;
}

.stl-fiche .stl-cast-info { margin: 0; text-align: left; }
.stl-fiche .stl-cast-name {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--stl-text);
  margin-bottom: 2px;
}
.stl-cast-card-link:hover .stl-cast-name { color: var(--stl-primary); }
.stl-fiche .stl-cast-char {
  display: block;
  font-family: var(--stl-serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.35;
  color: var(--stl-text-muted);
}
.stl-fiche .stl-cast-role-tag {
  display: inline-block;
  margin-top: 5px;
  padding: 0;
  background: none;
  color: var(--stl-text-muted);
  font-family: var(--stl-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ═══ 6. SPECTATEURS ════════════════════════════════════════════════ */
.stl-fiche .stl-watchers-section { margin-top: 0; }
.stl-fiche .stl-watchers-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.stl-fiche .stl-watcher-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  background: var(--stl-surface);
  border: 1px solid var(--stl-border);
  border-radius: var(--stl-radius);
}
.stl-fiche .stl-watcher-item:hover { border-color: var(--stl-border-hover); }
.stl-fiche .stl-watcher-avatar img {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--stl-border);
}
.stl-fiche .stl-watcher-info { min-width: 0; flex: 1; }
.stl-fiche .stl-watcher-name {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--stl-text);
  text-decoration: none;
}
.stl-fiche .stl-watcher-name:hover { color: var(--stl-primary); }
.stl-fiche .stl-watcher-status {
  font-family: var(--stl-mono);
  font-size: 11px;
  letter-spacing: .04em;
}
.stl-fiche .stl-watcher-status.completed   { color: var(--stl-green); }
.stl-fiche .stl-watcher-status.in-progress { color: var(--stl-text-dim); }
.stl-fiche .stl-watcher-date {
  display: block;
  font-size: 11px;
  color: var(--stl-text-muted);
}
.stl-fiche .stl-watcher-rating { color: var(--stl-gold); font-size: 12px; letter-spacing: 1px; }

/* ═══ 7. PAGE PERSONNE ══════════════════════════════════════════════ */
.stl-person-wrap.stl-person {
  max-width: 1180px;
  padding: 0 16px 64px;
}
.stl-person-hero {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--stl-border);
}
.stl-person-portrait {
  aspect-ratio: 3 / 4;
  border-radius: var(--stl-radius);
  overflow: hidden;
  border: 1px solid var(--stl-border);
  background: var(--stl-surface-2);
  box-shadow: var(--stl-shadow);
}
.stl-person-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}
.stl-person-portrait-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 54px; opacity: .3;
}

.stl-person-name {
  font-family: var(--stl-serif);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin: 8px 0 0;
}
.stl-person-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.stl-person-role {
  padding: 3px 10px;
  border: 1px solid var(--stl-border);
  border-radius: 999px;
  font-family: var(--stl-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stl-text-dim);
}
.stl-person-bio {
  font-family: var(--stl-serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--stl-text-dim);
  max-width: 68ch;
  margin-top: 18px;
}
.stl-person-bio p { margin: 0 0 12px; }
.stl-person-bio p:last-child { margin-bottom: 0; }

.stl-person-stats {
  display: flex;
  gap: 28px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dotted var(--stl-border);
}
.stl-person-stat strong {
  display: block;
  font-family: var(--stl-serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--stl-text);
}
.stl-person-stat span {
  font-family: var(--stl-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stl-text-muted);
}

.stl-person-credits { margin-top: 48px; }

/* Cartes de filmographie */
.stl-credit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 24px 18px;
}
.stl-credit-card { text-decoration: none; color: inherit; display: block; min-width: 0; }
.stl-credit-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--stl-radius);
  overflow: hidden;
  border: 1px solid var(--stl-border);
  background: var(--stl-surface-2);
  margin-bottom: 10px;
}
.stl-credit-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.stl-credit-card:hover .stl-credit-poster img { transform: scale(1.04); }
.stl-credit-card:hover .stl-credit-poster { border-color: var(--stl-text); }
.stl-credit-poster-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 34px; opacity: .3;
}
.stl-credit-score {
  position: absolute;
  top: 8px; right: 8px;
  padding: 2px 7px;
  border-radius: var(--stl-radius-sm);
  background: color-mix(in srgb, var(--stl-ink) 82%, transparent);
  color: #fff;
  font-family: var(--stl-mono);
  font-size: 10.5px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}
.stl-credit-title {
  font-family: var(--stl-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 3px;
  color: var(--stl-text);
}
.stl-credit-card:hover .stl-credit-title { color: var(--stl-primary); }
.stl-credit-year {
  display: block;
  font-family: var(--stl-mono);
  font-size: 11px;
  color: var(--stl-text-muted);
}
.stl-credit-char {
  display: block;
  font-family: var(--stl-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--stl-text-dim);
  margin-top: 4px;
}
.stl-credit-role {
  display: block;
  font-family: var(--stl-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stl-text-muted);
  margin-top: 4px;
}

/* ═══ 8. FORMULAIRES INLINE (ajout saison / épisode) ═════════════════ */
.stl-fiche .stl-inline-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--stl-surface-2);
  border: 1px dashed var(--stl-border-hover);
  border-radius: var(--stl-radius);
}
.stl-fiche .stl-inline-form-row input {
  background: var(--stl-paper);
  border: 1px solid var(--stl-border);
  border-radius: var(--stl-radius-sm);
  padding: 8px 11px;
  color: var(--stl-text);
  font-size: 13px;
  outline: none;
}
.stl-fiche .stl-inline-form-row input:focus { border-color: var(--stl-text); }
.stl-fiche .stl-inline-form-row input::placeholder { color: var(--stl-text-muted); }
.stl-fiche .stl-btn-sm-action {
  width: auto;
  padding: 8px 16px;
  border-radius: var(--stl-radius-sm);
  border: 1px solid var(--stl-primary);
  background: var(--stl-primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.stl-fiche .stl-btn-sm-action:hover { background: var(--stl-primary-hover); }
.stl-fiche .stl-btn-link {
  width: auto;
  background: none;
  border: none;
  padding: 4px 2px;
  color: var(--stl-text-muted);
  font-family: var(--stl-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--stl-border-hover);
  cursor: pointer;
}
.stl-fiche .stl-btn-link:hover { color: var(--stl-text); border-bottom-color: var(--stl-text); }
.stl-fiche .stl-add-episode-section { padding: 12px 16px 14px; }

/* Confirmation « épisodes précédents » */
.stl-fiche .stl-prev-ep-confirm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 16px;
  padding: 12px 14px;
  background: var(--stl-gold-dim);
  border: 1px solid color-mix(in srgb, var(--stl-gold) 35%, transparent);
  border-radius: var(--stl-radius);
  font-size: 13px;
}
.stl-fiche .stl-prev-ep-text { flex: 1; color: var(--stl-text); }
.stl-fiche .stl-prev-yes-btn,
.stl-fiche .stl-prev-no-btn {
  padding: 7px 14px;
  border-radius: var(--stl-radius-sm);
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.stl-fiche .stl-prev-yes-btn { background: var(--stl-green); color: var(--stl-paper); }
.stl-fiche .stl-prev-no-btn {
  background: transparent;
  border-color: var(--stl-border-hover);
  color: var(--stl-text-dim);
}
.stl-fiche .stl-prev-no-btn:hover { border-color: var(--stl-text); color: var(--stl-text); }

/* Bouton « épisode final » */
.stl-fiche .stl-ep-finale-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 5px;
  border-radius: var(--stl-radius-sm);
  color: var(--stl-text-muted);
  transition: all var(--stl-transition);
}
.stl-fiche .stl-ep-finale-btn:hover { color: var(--stl-gold); background: var(--stl-gold-dim); }
.stl-fiche .stl-ep-finale-btn.is-finale { color: var(--stl-gold); }
.stl-fiche .finale-locked { opacity: .4; cursor: not-allowed !important; }

/* ═══ 9. BOUTON RETOUR ══════════════════════════════════════════════ */
.stl-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0 0 3px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--stl-border-hover);
  border-radius: 0;
  color: var(--stl-text-muted);
  font-family: var(--stl-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--stl-transition);
}
.stl-back-btn:hover {
  color: var(--stl-text);
  border-bottom-color: var(--stl-text);
  background: none;
}

/* ═══ 10. RESPONSIVE ════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  /* minmax(0,1fr) et non 1fr : sinon le contenu large (tableau d'épisodes)
     impose sa min-content à la piste et fait déborder la page. */
  .stl-fiche-body { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .stl-fiche-aside { position: static; }
  .stl-fiche-aside .stl-panel { padding: 16px; }
}

@media (max-width: 760px) {
  .stl-fiche-head {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
  .stl-fiche--has-banner .stl-fiche-head { margin-top: -60px; }
  .stl-fiche-banner { height: 150px; }
  .stl-fiche-identity { padding-bottom: 0; }
  .stl-fiche-title { font-size: 26px; margin-top: 6px; }
  .stl-fiche-orig { font-size: 14px; }
  .stl-factline { font-size: 12.5px; margin-top: 12px; }

  .stl-person-hero { grid-template-columns: 130px minmax(0, 1fr); gap: 20px; }
  .stl-person-name { font-size: 26px; }
  .stl-person-bio { font-size: 15px; }
  .stl-person-stats { gap: 20px; }

  .stl-cast-rail { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; }
  .stl-credit-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 18px 12px; }

  .stl-season-row { flex-wrap: wrap; padding: 0 12px 10px 0; }
  .stl-fiche .stl-season-header { padding: 12px; }
  .stl-fiche .stl-btn-season-mark { margin-left: 34px; }
  .stl-fiche .stl-episodes-table td,
  .stl-fiche .stl-episodes-table th { padding: 9px 10px; }
  .stl-fiche .stl-episodes-table th:nth-child(3),
  .stl-fiche .stl-episodes-table td:nth-child(3) { display: none; }
  .stl-fiche .stl-watchers-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stl-fiche-head { grid-template-columns: 108px minmax(0, 1fr); }
  .stl-synopsis-text { font-size: 16px; }
}

/* ═══ 8. ARTICLES LIÉS ══════════════════════════════════════════════ */
.stl-articles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px 16px;
}
.stl-fiche .stl-article-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: none;
  padding: 0;
  background: none;
}
.stl-fiche .stl-article-card:hover { background: none; }

.stl-article-thumb {
  aspect-ratio: 16 / 9;
  border-radius: var(--stl-radius);
  overflow: hidden;
  background: var(--stl-surface-2);
  border: 1px solid var(--stl-border);
  margin-bottom: 10px;
}
.stl-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.stl-fiche .stl-article-card:hover .stl-article-thumb img { transform: scale(1.04); }
.stl-article-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  opacity: .35;
}
.stl-article-info { display: flex; flex-direction: column; gap: 4px; }
.stl-article-date {
  font-family: var(--stl-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stl-text-muted);
}
.stl-article-title {
  font-family: var(--stl-serif);
  font-size: 16px;
  line-height: 1.3;
  color: var(--stl-text);
}
.stl-fiche .stl-article-card:hover .stl-article-title { text-decoration: underline; }
.stl-article-excerpt {
  font-size: 13px;
  line-height: 1.5;
  color: var(--stl-text-muted);
}

@media (max-width: 600px) {
  .stl-articles-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

/* ═══ 12. PAGE DE SAISON ════════════════════════════════════════════ */
/* Réutilise le gabarit de la fiche série ; seuls trois éléments lui sont
   propres : le sommaire des saisons, le résumé d'épisode en ligne et le
   chaînage saison précédente / suivante. */

.stl-fiche .stl-season-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stl-fiche .stl-season-nav .stl-chip.is-active {
  border-color: var(--stl-text);
  color: var(--stl-text);
  font-weight: 600;
}

/* Résumé sous le titre d'épisode : présent pour le lecteur comme pour
   l'indexation, mais il ne doit pas concurrencer le titre. */
.stl-fiche .stl-ep-syn {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--stl-text-muted);
  max-width: 60ch;
}

.stl-fiche .stl-season-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
/* Une seule saison voisine : elle reste de son côté plutôt que de se
   centrer, pour que « précédent » et « suivant » gardent leur place. */
.stl-fiche .stl-season-pager > a:only-child:last-child { margin-left: auto; }

/* Lien vers la page de saison, dans la liste des saisons d'une série. */
.stl-fiche .stl-season-permalink {
  flex-shrink: 0;
  font-family: var(--stl-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
