/* Podcast platform — surcharge locale (sur xilrian.net/styles.css) */

/* Cover image dans la card épisode (rendu image réelle, pas icon fallback) */
.podcast-image {
  position: relative;
}
.podcast-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.podcast-image i {
  z-index: 0;
}

/* Page épisode : grosse card avec cover full + player */
.episode-page {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 2rem;
}

.episode-page-cover {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.episode-page-body {
  padding: 2rem;
}

.episode-page-body h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.episode-page-meta {
  font-size: 0.95rem;
  color: var(--light-text);
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.episode-page-meta i {
  margin-right: 0.3rem;
}

.episode-player {
  background: #f5f5f5;
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.episode-player audio {
  width: 100%;
}

.episode-content {
  font-size: 1rem;
  line-height: 1.7;
}

.episode-content p { margin-bottom: 1rem; }
.episode-content ul { margin: 1rem 0 1rem 1.5rem; }
.episode-content li { margin-bottom: 0.4rem; }
.episode-content a { color: var(--primary-color); text-decoration: none; }
.episode-content a:hover { text-decoration: underline; }

.episode-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.episode-nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  flex: 1;
}

.episode-nav a:hover { text-decoration: underline; }
.episode-nav .next { text-align: right; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}
.back-link:hover { text-decoration: underline; }

/* Hero image en haut de l'index */
.podcast-hero {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.podcast-hero img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--border-radius);
  flex-shrink: 0;
}

.podcast-hero h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.podcast-hero p {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.podcast-hero .rss-link {
  color: var(--accent-color);
  font-weight: 500;
  text-decoration: none;
}
.podcast-hero .rss-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .podcast-hero {
    flex-direction: column;
    text-align: center;
  }
  .podcast-hero img { width: 140px; height: 140px; }
}

/* ─── T3 listening tracking (localStorage MVP) ─────────────────────────── */

.listening-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
}

.listening-status .counter {
  font-size: 0.95rem;
  color: var(--light-text);
  font-weight: 500;
}

.listening-status .filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.listening-status button {
  background: white;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-color);
  transition: all 0.15s;
  font-family: inherit;
}

.listening-status button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.listening-status button.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Card "listened" badge — overlaid on cover image */
.podcast-card { position: relative; }

.podcast-card .listened-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 500;
  z-index: 2;
  display: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.podcast-card.is-listened .listened-badge { display: block; }

.podcast-card.is-listened .podcast-image img { opacity: 0.6; }

/* Filter modes hide cards */
body.filter-played .podcast-card:not(.is-listened) { display: none; }
body.filter-unplayed .podcast-card.is-listened { display: none; }

/* Episode page : "mark as listened" toggle */
.listening-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1.5px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: var(--border-radius);
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: all 0.15s;
  font-family: inherit;
}

.listening-toggle:hover {
  background: var(--primary-color);
  color: white;
}

.listening-toggle.is-listened {
  background: var(--primary-color);
  color: white;
}

.listening-toggle.is-listened::before {
  content: '✓';
  font-weight: 700;
}
