.retour {
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  padding: 10px 18px;
  border-radius: 999px;
  transition: .2s;
}
.retour:hover { background: var(--accent); }

.detail { max-width: 1100px; margin: 0 auto; }
.empty a { color: var(--accent); }

.hero { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 30px; }
.affiche {
  width: 300px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.affiche img, .affiche video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.hero-info { flex: 1; min-width: 260px; }
.hero-info h2 { font-size: 2rem; margin: 10px 0 6px; }
.meta-line { color: var(--muted); margin-bottom: 6px; }
.themes-line { color: var(--accent); font-size: .9rem; margin-bottom: 14px; }
.desc { line-height: 1.6; margin-bottom: 20px; max-width: 65ch; }

.btn-lecture, .btn-fav {
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .2s;
  margin: 0 8px 8px 0;
}
.btn-lecture { border: none; background: var(--accent); color: #fff; }
.btn-lecture:hover { transform: scale(1.05); }
.btn-fav { border: 2px solid #2c3040; background: transparent; color: var(--text); }
.btn-fav:hover { border-color: #ff4d6d; }
.btn-fav.actif { border-color: #ff4d6d; color: #ff4d6d; }

.lecteur { background: var(--card); border-radius: 14px; padding: 18px; margin-bottom: 30px; }
.lecteur h3 { margin-bottom: 12px; }
.lecteur video { width: 100%; max-height: 72vh; border-radius: 10px; background: #000; }

.saisons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.saison-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: .2s;
}
.saison-btn:hover { color: var(--text); }
.saison-btn.active { background: var(--accent); color: #fff; }

.liste-episodes { list-style: none; display: grid; gap: 12px; }
.episode {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px;
  background: var(--card);
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: .2s;
}
.episode:hover { transform: translateX(4px); }
.episode.actif { border-color: var(--accent); }
.ep-num { font-size: 1.3rem; font-weight: bold; color: var(--muted); width: 32px; text-align: center; }
.ep-thumb {
  width: 160px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.ep-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ep-titre { font-weight: 600; }

/* Cartes de l'accueil */
a.card { display: block; color: inherit; text-decoration: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 2e rangée d'onglets : thèmes */
.tabs.themes { padding-top: 12px; }
.tabs.themes .tab {
  padding: 7px 16px;
  font-size: .9rem;
  background: transparent;
  border: 1px solid #2c3040;
}
.tabs.themes .tab:hover { border-color: var(--accent); }
.tabs.themes .tab.active { background: var(--accent); border-color: var(--accent); }

/* Cœur favori sur les cartes */
.fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform .2s;
}
.fav:hover { transform: scale(1.15); }
.fav.actif { color: #ff4d6d; }

/* Bouton "Vider l'historique" */
.actions { margin-bottom: 18px; }
.btn-vider {
  padding: 8px 18px;
  border: 1px solid #2c3040;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.btn-vider:hover { border-color: var(--accent); color: var(--text); }

@media (max-width: 560px) {
  .ep-thumb { width: 110px; }
  .affiche { width: 100%; }
}