/* ── Variables – thème sombre (défaut) ──────────────────── */
:root, [data-theme="dark"] {
  --bg:          #0e0e10;
  --surface:     #16161a;
  --surface-2:   #1e1e24;
  --line:        #25252d;
  --header-bg:   rgba(14,14,16,.92);
  --txt:         #d4d4d8;
  --muted:       #6b6b75;
  --faint:       #303038;
  --heading:     #f4f4f5;
  --accent:      #818cf8;
  --accent2:     #38bdf8;
  --grad:        linear-gradient(90deg, #818cf8, #c084fc 50%, #38bdf8);
  --rss:         #f97316;
  --green:       #4ade80;
  --danger:      #ef4444;
  --mono:        'JetBrains Mono', 'Fira Mono', monospace;
  --sans:        'Inter', system-ui, -apple-system, sans-serif;
  --hires:       #f59e0b;
}

/* ── Variables – thème clair ────────────────────────────── */
[data-theme="light"] {
  --bg:          #fafafa;
  --surface:     #ffffff;
  --surface-2:   #f2f2f9;
  --line:        #e2e2ef;
  --header-bg:   rgba(250,250,252,.92);
  --txt:         #27272a;
  --muted:       #71717a;
  --faint:       #eaeaf6;
  --heading:     #09090b;
  --accent:      #6366f1;
  --accent2:     #0891b2;
  --grad:        linear-gradient(90deg, #6366f1, #9333ea 50%, #0891b2);
  --rss:         #ea580c;
  --green:       #16a34a;
  --danger:      #dc2626;
}

/* ── DCI-P3 wide gamut ──────────────────────────────────── */
@media (color-gamut: p3) {
  :root, [data-theme="dark"] {
    --accent:  color(display-p3 0.48 0.52 0.98);
    --accent2: color(display-p3 0.13 0.73 0.98);
    --green:   color(display-p3 0.20 0.85 0.38);
    --danger:  color(display-p3 0.95 0.22 0.22);
  }
  [data-theme="light"] {
    --accent:  color(display-p3 0.37 0.39 0.96);
    --accent2: color(display-p3 0.03 0.56 0.70);
    --green:   color(display-p3 0.08 0.62 0.27);
    --danger:  color(display-p3 0.85 0.14 0.22);
  }
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--txt);
  line-height: 1.65;
  min-height: 100vh;
  font-size: .95rem;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.25rem;
  /* Safe area iPhone notch */
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

/* ── Animations – déclenché par JS uniquement ───────────── */
/* Sans JS : tout visible par défaut */
.js .anim-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s ease, transform .4s ease;
}
.anim-item.in-view {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Header ─────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 1rem;
}

.brand {
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}
.brand:hover { opacity: .8; }

.site-nav { display: flex; align-items: center; gap: .15rem; }

.site-nav a {
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
  padding: .3rem .6rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--txt); background: var(--surface-2); }
.site-nav a.active { color: var(--accent); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.hero .wrap { display: flex; gap: 2rem; align-items: flex-start; }

.cover {
  width: 148px;
  height: 148px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  transition: box-shadow .25s ease;
}

.hero-info h1 {
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.2;
  margin-bottom: .4rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .85rem;
}

.hero-desc {
  font-size: .88rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.badge-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  padding: .35rem .75rem;
  min-height: 36px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  transition: border-color .15s, color .15s;
}
.badge-link:hover { border-color: var(--accent); color: var(--accent); }
.badge-link.rss { color: var(--rss); border-color: color-mix(in srgb, var(--rss) 30%, transparent); }
.badge-link.rss:hover { border-color: var(--rss); }

/* ── Main ───────────────────────────────────────────────── */
main { padding-bottom: 4rem; }

/* ── Section head ───────────────────────────────────────── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 0;
}

.section-label {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head a {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
}
.section-head a:hover { color: var(--accent); }

/* ── Episode list – style blog ──────────────────────────── */
.list { list-style: none; }

.list li {
  position: relative;
  cursor: pointer;
  padding: 1.5rem 0 1.5rem 1.25rem;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
  /* transition hover uniquement — PAS de transition-delay ici */
  transition: border-left-color .2s ease, padding-left .2s ease;
}
.list li:first-child { border-top: 1px solid var(--line); }
.list li:hover { border-left-color: var(--accent); padding-left: 2rem; }

/* Délai cascade animation entrée seulement */
.js .list li:nth-child(1)  { transition-delay: 0ms; }
.js .list li:nth-child(2)  { transition-delay: 40ms; }
.js .list li:nth-child(3)  { transition-delay: 80ms; }
.js .list li:nth-child(4)  { transition-delay: 120ms; }
.js .list li:nth-child(5)  { transition-delay: 160ms; }
.js .list li:nth-child(6)  { transition-delay: 200ms; }
.js .list li:nth-child(7)  { transition-delay: 240ms; }
.js .list li:nth-child(n+8){ transition-delay: 280ms; }
/* Reset delay au hover pour ne pas ralentir l'effet */
.list li:hover { transition-delay: 0ms !important; }

.list time {
  display: block;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: .3rem;
}

.list h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin-bottom: .35rem;
}
.list h2 a { color: var(--txt); }
.list h2 a:hover { color: var(--accent); }
.list h2 a::after { content: ''; position: absolute; inset: 0; z-index: 1; }

.list p { font-size: .875rem; color: var(--muted); margin-bottom: .55rem; }

/* ── Meta & tags ────────────────────────────────────────── */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  position: relative;
  z-index: 2;
  margin-bottom: .85rem;
}

.tag {
  --tag-hue: 240;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  color: hsl(var(--tag-hue), 70%, 72%);
  background: hsl(var(--tag-hue), 55%, 11%);
  border: 1px solid hsl(var(--tag-hue), 45%, 22%);
  border-radius: 4px;
  padding: .1rem .45rem;
  position: relative;
  z-index: 2;
  transition: background .15s, border-color .15s, color .15s;
  line-height: 1.6;
}
a.tag:hover {
  background: hsl(var(--tag-hue), 55%, 18%);
  border-color: hsl(var(--tag-hue), 45%, 36%);
  color: hsl(var(--tag-hue), 70%, 80%);
}

.reading {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  margin-left: auto;
}

.ep-player {
  width: 100%;
  height: 34px;
  accent-color: var(--accent);
  position: relative;
  z-index: 2;
}

/* ── Page épisode ───────────────────────────────────────── */
.ep-header-bar {
  border-bottom: 1px solid var(--line);
  padding: .85rem 0;
}
.back-link {
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.back-link:hover { color: var(--accent); }

.ep-single .ep-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
}

.ep-single h1 {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -.02em;
  line-height: 1.25;
  margin-bottom: .5rem;
}

.ep-subtitle-text {
  font-size: .92rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.ep-player-large {
  width: 100%;
  margin-bottom: 1.5rem;
  accent-color: var(--accent);
}

.ep-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 2rem; }

.ep-body { font-size: .95rem; line-height: 1.8; color: var(--txt); max-width: 680px; }
.ep-body p { margin-bottom: 1rem; }

/* ── Page tags ──────────────────────────────────────────── */
.tags-page { padding: 2.5rem 0 4rem; }
.tags-page h2 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 1.25rem;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 3rem; }
.tag-cloud a { display: inline-flex; align-items: center; gap: .35rem; }

.tag-active {
  font-weight: 700;
  box-shadow: 0 0 0 2px hsl(var(--tag-hue), 65%, 60%);
}
[data-theme="light"] .tag-active {
  box-shadow: 0 0 0 2px hsl(var(--tag-hue), 55%, 45%);
}

.tag-count {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 3px;
  padding: 0 .3rem;
  transition: background .15s, color .15s;
}

/* ── Empty ──────────────────────────────────────────────── */
.empty {
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--muted);
  padding: 2rem 0;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  font-size: .72rem;
  color: var(--muted);
  font-family: var(--mono);
}
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }
footer nav { display: flex; gap: 1rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 2rem 0 1.75rem; }
  .hero .wrap { flex-direction: column; gap: 1.25rem; }
  .cover { width: 88px; height: 88px; border-radius: 10px; }
  .hero-info h1 { font-size: 1.35rem; }
  .site-nav a span { display: none; }
  .list li { padding: 1.25rem 0 1.25rem 1rem; }
  .list h2 { font-size: 1rem; }
  .ep-single h1 { font-size: 1.4rem; }
  .badge-link { padding: .3rem .6rem; font-size: .7rem; }
}

@media (max-width: 400px) {
  .hero-badges { gap: .35rem; }
  .badge-link { font-size: .68rem; padding: .25rem .5rem; }
}

/* ── Lecteur audio custom ───────────────────────────────── */
.pod-player {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .42rem .65rem;
  width: 100%;
  position: relative;
  z-index: 2;
  user-select: none;
}

.pod-play {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: opacity .15s, transform .1s, background-color .25s ease;
}
.pod-play:hover   { opacity: .82; transform: scale(1.07); }
.pod-play:active  { transform: scale(.95); }

.pod-play .icon-pause { display: none; }
.pod-play.playing .icon-play  { display: none; }
.pod-play.playing .icon-pause { display: block; }

.pod-skip {
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: var(--muted);
  font-family: var(--mono); font-size: .62rem; font-weight: 600;
  padding: .28rem .35rem; border-radius: 5px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.pod-skip:hover { color: var(--txt); background: var(--surface-2); }

.pod-seek {
  flex: 1; min-width: 30px;
  height: 4px; background: var(--faint); border-radius: 2px;
  cursor: pointer; position: relative;
  transition: height .1s;
}
.pod-seek:hover { height: 6px; }
.pod-fill {
  position: absolute; left: 0; top: 0;
  height: 100%; width: 0%;
  background: var(--accent); border-radius: 2px;
  pointer-events: none;
  transition: none;
}

.pod-time {
  flex-shrink: 0;
  font-family: var(--mono); font-size: .63rem; color: var(--muted);
  white-space: nowrap;
}

.pod-speed {
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono); font-size: .63rem;
  padding: .2rem .3rem; border-radius: 4px;
  cursor: pointer; appearance: none; width: auto;
}
.pod-speed:focus { outline: none; border-color: var(--accent); color: var(--txt); }

/* Grand player (page épisode) */
.pod-player-lg { padding: .6rem .85rem; border-radius: 10px; gap: .55rem; }
.pod-player-lg .pod-play { width: 38px; height: 38px; }
.pod-player-lg .pod-play svg { width: 17px; height: 17px; }
.pod-player-lg .pod-skip { font-size: .7rem; padding: .35rem .45rem; }
.pod-player-lg .pod-time  { font-size: .7rem; }
.pod-player-lg .pod-speed { font-size: .7rem; padding: .28rem .4rem; }

/* Actions épisode (télécharger / partager) */
.ep-actions {
  display: flex; gap: .55rem; margin-top: .85rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.btn-action {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--mono); font-size: .72rem;
  padding: .35rem .8rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer;
  transition: border-color .15s, color .15s;
  text-decoration: none;
}
.btn-action:hover { border-color: var(--accent); color: var(--accent); }
.btn-action.copied { border-color: var(--green); color: var(--green); }

/* Responsive player */
@media (max-width: 480px) {
  .pod-time { display: none; }
  .pod-skip { font-size: .58rem; padding: .22rem .25rem; }
}

/* État chargement */
.pod-player.pod-loading .pod-play {
  animation: pod-pulse .9s ease-in-out infinite alternate;
}
@keyframes pod-pulse {
  from { opacity: .7; }
  to   { opacity: .3; }
}

/* État erreur */
.pod-player.pod-error .pod-play {
  background: var(--muted);
  cursor: not-allowed;
}
.pod-player.pod-error .pod-skip,
.pod-player.pod-error .pod-seek,
.pod-player.pod-error .pod-speed { opacity: .35; pointer-events: none; }

/* ── Bouton thème ───────────────────────────────────────── */
.theme-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted);
  padding: .3rem .45rem;
  min-height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.theme-btn:hover { color: var(--txt); background: var(--surface-2); }

.icon-sun  { display: block; }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ── Overrides thème clair ──────────────────────────────── */
/* Ombre cover réduite sur fond blanc */
[data-theme="light"] .cover {
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

/* Tags – couleurs inversées sur fond clair */
[data-theme="light"] .tag {
  color: hsl(var(--tag-hue), 62%, 36%);
  background: hsl(var(--tag-hue), 55%, 94%);
  border-color: hsl(var(--tag-hue), 45%, 82%);
}
[data-theme="light"] a.tag:hover {
  background: hsl(var(--tag-hue), 55%, 87%);
  border-color: hsl(var(--tag-hue), 45%, 68%);
  color: hsl(var(--tag-hue), 62%, 28%);
}

/* Tag-count sur fond clair */
[data-theme="light"] .tag-count {
  background: hsl(var(--tag-hue), 40%, 86%);
  color: hsl(var(--tag-hue), 55%, 40%);
}

/* Transition douce lors du changement de thème */
body, header, footer, .list li, .hero, .pod-player, .badge-link,
main, section, .ep-body, .ep-meta, .ep-tags {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

/* ── Logo dans l'en-tête ────────────────────────────────── */
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}
/* Désactive le dégradé-texte quand le brand contient un logo */
.brand:has(.brand-logo) {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
}

/* ── Image épisode (bannière) ───────────────────────────── */
.ep-banner {
  width: 100%;
  max-height: 420px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.ep-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Thumbnail dans la liste ────────────────────────────── */
.list-title-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .35rem;
}
.list-title-row h2 { margin-bottom: 0; }
.ep-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
}

/* ── Badges Hi-Res / Lossless ───────────────────────────── */
.badge-hires,
.badge-lossless {
  display: inline-block;
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: .15rem .45rem;
  border-radius: 4px;
  vertical-align: middle;
  line-height: 1.6;
}
.badge-hires {
  background: color-mix(in srgb, var(--hires) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--hires) 35%, transparent);
  color: var(--hires);
}
.badge-lossless {
  background: color-mix(in srgb, var(--accent2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent2) 35%, transparent);
  color: var(--accent2);
}

/* ── Recherche ──────────────────────────────────────────── */
.search-bar { margin-top: 2rem; margin-bottom: 1.5rem; }

.search-form {
  display: flex;
  gap: .5rem;
}
.search-form input[type="search"] {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--txt);
  padding: .5rem .8rem;
  border-radius: 7px;
  font-size: .88rem;
  font-family: var(--sans);
  transition: border-color .15s;
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--accent); }
.search-form button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: .5rem .75rem;
  border-radius: 7px;
  cursor: pointer;
  display: flex; align-items: center;
  transition: color .15s, border-color .15s;
}
.search-form button:hover { color: var(--accent); border-color: var(--accent); }

.search-info {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--muted);
  margin-top: .5rem;
}
.search-info a { color: var(--muted); text-decoration: underline; margin-left: .5rem; }
.search-info a:hover { color: var(--danger); }


/* ── Chapitres (épisode) ─────────────────────────────────── */
.chapters-list {
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.chapters-title {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .75rem 1rem;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.chapters-list ol {
  list-style: none;
  margin: 0; padding: 0;
}
.chapters-list li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 1rem;
  font-size: .88rem;
  color: var(--txt);
  border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.chapters-list li:last-child { border-bottom: none; }
.chapters-list li:hover { background: var(--surface-2); }
.chapter-btn {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 4px;
  padding: .15rem .45rem;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
}
.chapter-btn:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }

/* ── Transcription ──────────────────────────────────────── */
.transcript-details {
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.transcript-details summary {
  padding: .85rem 1rem;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: color .12s, background .12s;
  user-select: none;
}
.transcript-details summary::-webkit-details-marker { display: none; }
.transcript-details summary::before {
  content: '▶';
  font-size: .6rem;
  transition: transform .2s;
}
.transcript-details[open] summary::before { transform: rotate(90deg); }
.transcript-details summary:hover { color: var(--txt); background: var(--surface-2); }
.transcript-body {
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  line-height: 1.8;
  color: var(--txt);
  max-height: 500px;
  overflow-y: auto;
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}
.page-btn {
  display: inline-block;
  padding: .5rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--txt);
  font-size: .85rem;
  font-family: var(--sans);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn--disabled { opacity: .35; cursor: default; pointer-events: none; }
.page-info { font-family: var(--mono); font-size: .78rem; color: var(--muted); }

/* ── Navigation épisode précédent / suivant ─────────────── */
.ep-nav {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem 0;
}
.ep-nav-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.ep-nav-link {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-width: 45%;
  text-decoration: none;
  padding: .85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: border-color .15s, background .15s;
}
.ep-nav-link:hover { border-color: var(--accent); background: var(--surface-2); }
.ep-nav-link--next { text-align: right; margin-left: auto; }
.ep-nav-dir {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ep-nav-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.4;
}
@media (max-width: 600px) {
  .ep-nav-inner { flex-direction: column; }
  .ep-nav-link { max-width: 100%; }
  .ep-nav-link--next { text-align: left; margin-left: 0; }
}

/* ── Mini-player (lecteur sticky bas de page) ───────────── */
.mini-player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 28px rgba(0,0,0,.28);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(calc(100% + 2px));
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  user-select: none;
}
.mini-player--visible { transform: translateY(0); }

.mini-prog {
  height: 3px; background: var(--faint); cursor: pointer;
  transition: height .1s;
}
.mini-prog:hover { height: 5px; }
.mini-prog-fill {
  height: 100%; width: 0%;
  background: var(--accent); border-radius: 0;
  pointer-events: none;
}

.mini-body {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem 1rem;
  min-height: 50px;
}
.mini-title {
  flex: 1; min-width: 0;
  font-size: .82rem; font-weight: 600;
  color: var(--heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-ctrls {
  display: flex; align-items: center; gap: .35rem; flex-shrink: 0;
}
.mini-play { width: 32px; height: 32px; }
.mini-play svg { width: 14px; height: 14px; }
.mini-time { font-family: var(--mono); font-size: .62rem; color: var(--muted); white-space: nowrap; }
.mini-close {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: .88rem;
  padding: .3rem .45rem; border-radius: 5px;
  transition: color .15s, background .15s;
  line-height: 1;
}
.mini-close:hover { color: var(--txt); background: var(--surface-2); }

@media (max-width: 480px) {
  .mini-title { display: none; }
  .mini-body  { gap: .4rem; padding: .4rem .75rem; }
}

/* ── No JS / réduit ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .js .anim-item { transition: none; opacity: 1 !important; transform: none !important; }
  .list li { transition: none !important; }
}
