/* Ondes Web — thème sombre façon streaming, une couleur par média. */
:root {
  --bg: #141414; --card: #262626; --card2: #333; --line: #2c2c2c; --txt: #fff; --gray: #b3b3b3; --gray2: #808080;
  --red: #E50914; --sun: #FFC83D;
  --m0: #B28CFF; --m1: #FF6E5A; --m2: #5AB0FF;               /* podcast · vidéo · presse */
  --d0: #241A3A; --d1: #3A1A15; --d2: #0F2438;
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  --tabs: calc(58px + var(--bot)); --mini: 0px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--txt); }
body { font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--tabs) + var(--mini) + 16px); overscroll-behavior-y: none; -webkit-font-smoothing: antialiased; }
body.has-mini { --mini: 62px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: var(--txt); }
h1, h2, h3, p { margin: 0; }
img { display: block; }
.ic { flex: none; }
.flex { flex: 1; min-width: 0; }
.center { text-align: center; justify-content: center; }
.muted { color: var(--gray); }
.small { font-size: 13px; }
.pad { padding: 14px 16px; }
.pad-x { padding-left: 16px; padding-right: 16px; }
.foot { color: var(--gray2); font-size: 12px; padding: 20px 16px 8px; }
.section-title { font-size: 18px; font-weight: 700; margin: 18px 0 10px; }
.block { display: block; }

/* ---- barre du haut */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(var(--top) + 8px) 12px 8px 16px; background: linear-gradient(#141414f2, #141414d9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar.overlay { position: absolute; left: 0; right: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding-left: 10px; }
.logo { color: var(--red); font-weight: 900; font-size: 24px; letter-spacing: 1px; }
.topbar-title { flex: 1; font-weight: 800; font-size: 20px; }
.icbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; gap: 2px; flex-direction: column; }
.icbtn small { font-size: 10px; color: var(--gray); margin-top: -4px; }
.icbtn.round { border-radius: 20px; background: #0000008c; }
.topbar:not(.overlay) .icbtn.round { background: none; }

/* ---- pastilles */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar, .rail::-webkit-scrollbar { display: none; }
.chips.center { justify-content: center; flex-wrap: wrap; padding-top: 12px; }
.chip { flex: none; padding: 7px 14px; border-radius: 18px; border: 1.2px solid #ffffff59; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.on { background: #fff; color: #000; border-color: #fff; }
.chip.pos { border-color: var(--sun); color: var(--sun); }
.chip.pos.on { background: var(--sun); color: #000; }
.fchip.m0 { color: var(--m0); border-color: var(--m0); } .fchip.m1 { color: var(--m1); border-color: var(--m1); } .fchip.m2 { color: var(--m2); border-color: var(--m2); }
.fchip.m0.on { background: var(--m0); color: #000; } .fchip.m1.on { background: var(--m1); color: #000; } .fchip.m2.on { background: var(--m2); color: #000; }

/* ---- couleurs de média */
.mtag { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mtag.m0 { color: var(--m0); } .mtag.m1 { color: var(--m1); } .mtag.m2 { color: var(--m2); }
.strip { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.strip.m0, .bar.m0 { background: var(--m0); } .strip.m1, .bar.m1 { background: var(--m1); } .strip.m2, .bar.m2 { background: var(--m2); }
.mbg0 { background: linear-gradient(135deg, var(--d0), #1e1e1e); } .mbg1 { background: linear-gradient(135deg, var(--d1), #1e1e1e); }
.mbg2 { background: linear-gradient(135deg, var(--d2), #1e1e1e); }

/* ---- bannière */
.hero { position: relative; height: min(118vw, 560px); margin-bottom: 4px; overflow: hidden; background: #1c1c1c; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(#0000 35%, #141414cc 72%, var(--bg)); }
.hero-txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; text-align: center; }
.hero-txt h1 { font-size: 26px; font-weight: 900; line-height: 1.15; margin: 6px 0 4px; text-shadow: 0 2px 12px #000; }
.hero-txt p { color: var(--gray); font-size: 14px; }
.hero-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

/* ---- boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 6px; font-weight: 700; font-size: 15px; }
.btn.white { background: #fff; color: #000; }
.btn.gray { background: #6d6d6eb3; color: #fff; }
.btn.primary { background: var(--red); color: #fff; margin-top: 12px; }
.btn.ghost { border: 1.2px solid #ffffff59; }
.btn.wide { width: 100%; margin-top: 10px; padding: 12px; }
.btn:disabled { opacity: .5; }
.pill { padding: 8px 14px; border-radius: 18px; background: var(--card2); font-size: 13px; font-weight: 600; }
.pill.primary { background: #fff; color: #000; }
.link { color: var(--gray); font-size: 13px; padding: 12px 0; display: block; }
.link-like { cursor: pointer; }

/* ---- rangées */
.row { padding-top: 18px; }
.row-head { display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; }
.row-head h2 { font-size: 18px; font-weight: 700; }
.row-head p { font-size: 12px; color: var(--gray2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { width: 4px; align-self: stretch; min-height: 20px; border-radius: 2px; flex: none; }
.rail { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px; scroll-padding: 0 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.rail::after { content: ''; flex: none; width: 6px; }
.rail > * { scroll-snap-align: start; }
.sk { flex: none; background: #1f1f1f; border-radius: 4px; animation: pulse 1.2s infinite alternate; }
.sk-wide { width: 220px; height: 124px; } .sk-sq { width: 118px; height: 118px; } .sk-line { height: 54px; margin: 8px 16px; }
@keyframes pulse { to { opacity: .45; } }

/* ---- cartes */
.card { flex: none; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.card .art, .card .pic { position: relative; overflow: hidden; border-radius: 4px; background: #1f1f1f; }
.card.pod { width: 118px; } .card.pod .art { width: 118px; height: 118px; }
.card.ep { width: 140px; } .card.ep .art { width: 140px; height: 140px; }
.card.art16 { width: 220px; } .card.art16 .pic { width: 220px; height: 124px; }
.card .art img, .card .pic img { width: 100%; height: 100%; object-fit: cover; }
.pic-src { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center; font-weight: 900; color: #ffffff99; font-size: 15px; }
.playmark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%;
  background: #0009; border: 1.5px solid #fff; display: flex; align-items: center; justify-content: center; padding-left: 2px; }
.progress { position: absolute; left: 0; bottom: 3px; height: 3px; background: var(--red); }
.sun { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 11px; background: var(--sun); color: #000; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.t2, .t3 { font-size: 12.5px; font-weight: 600; margin-top: 6px; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.t2 { -webkit-line-clamp: 2; } .t3 { -webkit-line-clamp: 3; font-size: 13px; }
.cap { font-size: 11px; color: var(--gray2); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card.ranked { display: flex; align-items: flex-end; width: 168px; position: relative; }
.card.ranked .rank { font-size: 92px; font-weight: 900; line-height: .8; color: var(--bg); -webkit-text-stroke: 2px #888; width: 52px; flex: none; letter-spacing: -6px; }
.card.ranked .art { flex: none; } .card.ranked .t2 { display: none; }
.card.person { width: 100px; }
.avatar { position: relative; width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 26px; background: #4A3A78; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.xl { width: 124px; height: 124px; font-size: 40px; border: 3px solid #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; padding: 4px 16px; }
.grid .card.pod, .grid .card.pod .art { width: 100%; } .grid .card.pod .art { height: auto; aspect-ratio: 1; }

/* ---- recherche */
.searchbar { display: flex; align-items: center; gap: 8px; background: #2b2b2b; border-radius: 8px; padding: 0 12px; margin: 8px 0; }
.pad-x.searchbar { margin: 8px 16px; }
.search { flex: 1; border: 0; background: none; padding: 12px 0; outline: none; min-width: 0; font-size: 16px; }
.hub-link { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 8px;
  background: linear-gradient(90deg, var(--d0), var(--d2)); border: 1px solid #ffffff1f; text-align: left; }
.hub-link small { color: var(--gray); }
.area, .field { width: 100%; background: #2b2b2b; border: 1px solid transparent; border-radius: 8px; padding: 12px; outline: none; font-size: 16px; }
.field { margin: 4px 16px; width: calc(100% - 32px); display: block; }
.area:focus, .field:focus { border-color: #ffffff59; }
.pick { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-art { width: 76px; height: 76px; border-radius: 4px; flex: none; object-fit: cover; }
.pick b { display: block; } .pick p { font-size: 13px; margin-top: 4px; }

/* ---- Ma liste */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 16px; }
.stats div { background: var(--card); border-radius: 8px; padding: 12px 6px; text-align: center; }
.stats b { display: block; font-size: 20px; } .stats small { color: var(--gray); font-size: 11px; }

/* ---- émission */
.pod-banner { position: relative; height: min(92vw, 480px); overflow: hidden; cursor: pointer; background: #1c1c1c; }
.pod-banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-hint { position: absolute; right: 14px; bottom: 14px; width: 34px; height: 34px; border-radius: 17px; background: #0009; display: flex; align-items: center; justify-content: center; }
.pod-title { font-size: 26px; font-weight: 900; line-height: 1.15; }
.meta { color: #46D369; font-weight: 700; font-size: 13px; margin: 6px 0 4px; }
.desc, .extract { color: #e0e0e0; font-size: 14px; margin-top: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.desc.open, .extract.open, .ep-desc.open { -webkit-line-clamp: unset; display: block; }
.ep-row { position: relative; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ep-top { display: flex; gap: 12px; align-items: flex-start; }
.ep-top b { display: block; font-size: 14px; } .ep-top small { font-size: 12px; }
.ep-play { width: 38px; height: 38px; border-radius: 19px; border: 1.5px solid #fff; display: flex; align-items: center; justify-content: center; flex: none; padding-left: 2px; }
.ep-prog { position: absolute; left: 16px; bottom: 0; height: 2px; background: var(--red); max-width: calc(100% - 32px); }
.ep-desc { color: var(--gray); font-size: 13px; margin: 8px 0 0 50px; display: none; white-space: pre-line; }

/* ---- fiche « Tout sur… » */
.person-head { padding: calc(var(--top) + 64px) 18px 8px; text-align: center; background: linear-gradient(#2B2440, var(--bg)); }
.person-head h1 { font-size: 28px; font-weight: 900; margin-top: 10px; }
.person-head .muted { margin-top: 4px; }
.person-head .fp-row { margin-top: 14px; }
.extract { text-align: left; }
.ai-box { margin: 14px 16px 0; padding: 12px 14px; border-radius: 8px; background: linear-gradient(90deg, var(--d0), #1e1e1e); font-size: 14px; }
.spinner { width: 34px; height: 34px; margin: 16px auto; border-radius: 50%; border: 3px solid #ffffff33; border-top-color: var(--red); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- feuilles */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: #0000; display: flex; align-items: flex-end; transition: background .25s; }
.sheet-bg.on { background: #000a; }
.sheet { width: 100%; max-width: 680px; margin: 0 auto; max-height: 82vh; overflow-y: auto; background: #1f1f1f; border-radius: 16px 16px 0 0;
  padding: 6px 0 calc(16px + var(--bot)); transform: translateY(100%); transition: transform .25s; -webkit-overflow-scrolling: touch; }
.sheet.tall { max-height: 94vh; }
.sheet-bg.on .sheet { transform: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: #555; margin: 6px auto 8px; }
.sheet-title { font-weight: 800; font-size: 17px; padding: 6px 18px 10px; }
.sheet-opt { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 13px 18px; text-align: left; border-top: 1px solid var(--line); }
.sheet-opt small { color: var(--gray2); font-size: 12px; margin-top: 2px; }
.sheet-opt.sel span::before { content: '✓ '; color: var(--red); }
.sheet .btn.primary { margin: 14px 16px 0; width: calc(100% - 32px); }
.sheet form .btn.primary { margin-top: 14px; }
.checks { padding: 0 18px; } .checks.scroll { max-height: 60vh; overflow-y: auto; }
.check { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--red); flex: none; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + var(--mini) + 14px); transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: #333; padding: 10px 16px; border-radius: 8px; font-size: 14px; transition: .25s; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- lecteur */
#mini { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabs) + 6px); z-index: 30; height: 56px; border-radius: 8px; background: #2a2a2a;
  display: flex; align-items: center; gap: 10px; padding: 0 8px; overflow: hidden; box-shadow: 0 6px 24px #000a; }
#mini[hidden] { display: none; }
.mini-prog { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--red); }
.mini-art { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }
.mini-txt { flex: 1; min-width: 0; cursor: pointer; }
.mini-txt b, .mini-txt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-txt b { font-size: 13px; } .mini-txt small { color: var(--gray); font-size: 11px; }
.fp { padding: 8px 20px 10px; text-align: center; }
.fp-art { width: min(72vw, 340px); aspect-ratio: 1; margin: 8px auto 18px; border-radius: 8px; overflow: hidden; background: #2a2a2a; box-shadow: 0 10px 40px #000; }
.fp-art img { width: 100%; height: 100%; object-fit: cover; }
.fp h2 { font-size: 19px; font-weight: 800; }
.fp-range { width: 100%; margin: 18px 0 2px; accent-color: var(--red); }
.fp-time { color: var(--gray); font-size: 12px; font-variant-numeric: tabular-nums; }
.fp-ctrl { display: flex; justify-content: center; align-items: center; gap: 34px; margin: 10px 0; }
.fp-play { width: 70px; height: 70px; border-radius: 35px; background: #fff; color: #000; display: flex; align-items: center; justify-content: center; }
.fp-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.fp-row.center, .fp .fp-row { justify-content: center; }
.fp-desc { text-align: left; color: var(--gray); font-size: 13px; margin-top: 16px; white-space: pre-line; }

/* ---- lecteur d'article */
.reader { padding: 0 18px 10px; }
.reader-img { margin: 4px -18px 14px; max-height: 260px; overflow: hidden; } .reader-img img { width: 100%; object-fit: cover; }
.reader-meta { font-size: 12px; color: var(--gray); margin-bottom: 6px; }
.reader h1 { font-size: 22px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; }
.reader p { font-size: 16px; line-height: 1.6; margin: 12px 0; color: #e6e6e6; }

/* ---- réglages */
.set-h { font-size: 13px; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: .06em; padding: 22px 16px 6px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.set-row > small { color: var(--gray2); font-size: 13px; text-align: right; max-width: 55%; }
.set-row span small { color: var(--gray2); font-size: 12px; margin-top: 2px; }
.set-note { color: var(--gray2); font-size: 12.5px; padding: 6px 16px 8px; white-space: pre-line; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 14px; background: #555; transition: .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--red); } .switch input:checked + i::after { left: 21px; }

/* ---- onglets */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--tabs); padding-bottom: var(--bot); display: flex;
  background: #121212f2; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid #222; }
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--gray2); font-size: 10.5px; }
#tabs button.on { color: #fff; }

@media (min-width: 900px) {
  #view { max-width: 1200px; margin: 0 auto; }
  .hero { height: 520px; }
  .card.art16 { width: 280px; } .card.art16 .pic { width: 280px; height: 158px; }
}
