/* Corenix Radio — feuille de style
   Couleurs Corenix : modifier --brand et --brand-dark pour ajuster. */
:root {
  --brand: #a3196b;        /* rose Corenix */
  --brand-dark: #4a1238;   /* prune Corenix */
  --brand-soft: #fbeef5;
  --brand-line: #f1d3e4;
  --ink: #1b1320;
  --ink-2: #4b4252;
  --muted: #857a8c;
  --bg: #ffffff;
  --bg-alt: #faf7fa;
  --line: #ece6ee;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(40, 10, 30, .05), 0 8px 28px rgba(40, 10, 30, .07);
  --dock-h: 72px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: var(--dock-h);
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; word-break: break-all; }

/* ---------- Barre du haut ---------- */
.topbar { background: var(--brand-dark); color: #f3dbe8; font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 16px; }
.topbar a { color: #f3dbe8; }
.topbar-status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; margin-right: 8px; vertical-align: 1px; }
.topbar-links { display: flex; gap: 20px; }
@media (max-width: 760px) { .topbar-links a:not(:last-child) { display: none; } }

/* ---------- En-tête ---------- */
.header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; height: 70px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none !important; }
.brand-logo { height: 30px; width: auto; }
.brand-sep { width: 1px; height: 24px; background: var(--line); }
.brand-radio { font-weight: 800; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); font-weight: 500; font-size: 15px; padding: 8px 14px; border-radius: 8px; }
.nav a:hover { background: var(--bg-alt); color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--brand); background: var(--brand-soft); }
.nav a.nav-cta { background: var(--brand-dark); color: #fff; margin-left: 8px; }
.nav a.nav-cta:hover { background: var(--brand); }
.burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
@media (max-width: 900px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 70px; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 16px 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-open .nav { display: flex; }
  .nav a.nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { border-color: #fff; }
.when-playing { display: none; }
.is-playing .when-playing { display: inline; }
.is-playing .when-paused { display: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(163, 25, 107, .13), transparent 70%),
    radial-gradient(700px 380px at 0% 100%, rgba(74, 18, 56, .08), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  padding: 64px 0 72px;
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--brand-dark); background: #fff; border: 1px solid var(--brand-line); padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
.dot.off { background: #ef4444; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.hero h1 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 800; letter-spacing: -.025em; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 600px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 36px; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 26px; font-weight: 800; color: var(--brand-dark); }
.hero-stats span { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 40px 0 48px; } }

/* ---------- Carte lecteur ---------- */
.player-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pc-art-wrap { position: relative; aspect-ratio: 16 / 10; background: var(--brand-dark); overflow: hidden; }
.pc-art { width: 100%; height: 100%; object-fit: cover; }
.live-badge { position: absolute; top: 14px; left: 14px; background: #e11d48; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 5px 10px; border-radius: 6px; }
.pc-body { padding: 22px 24px 24px; }
.pc-kicker { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.pc-title { font-size: 22px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pc-artist { color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-controls { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.pc-next { min-width: 0; font-size: 13px; }
.pc-next span { color: var(--muted); display: block; }
.pc-next strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.progress { margin-top: 16px; }
.progress-bar { height: 5px; background: var(--brand-soft); border-radius: 5px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 5px; transition: width 1s linear; }
.progress.no-dur .progress-bar span { background: linear-gradient(90deg, var(--brand-soft), var(--brand), var(--brand-soft)); background-size: 200% 100%; animation: livebar 2.4s linear infinite; }
@keyframes livebar { from { background-position: 200% 0; } to { background-position: 0 0; } }
.progress-times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* Bouton lecture */
.play-btn { position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform .15s, background .15s; box-shadow: 0 6px 18px rgba(163,25,107,.35); }
.play-btn:hover { background: var(--brand-dark); transform: scale(1.04); }
.play-btn svg { width: 26px; height: 26px; fill: currentColor; grid-area: 1 / 1; }
.play-btn.small { width: 44px; height: 44px; box-shadow: none; }
.play-btn.small svg { width: 20px; height: 20px; }
.play-btn .i-pause, .play-btn .spinner { display: none; }
.is-playing .play-btn .i-play { display: none; }
.is-playing .play-btn .i-pause { display: block; }
.is-loading .play-btn .i-play, .is-loading .play-btn .i-pause { display: none; }
.is-loading .play-btn .spinner { display: block; }
.spinner { grid-area: 1 / 1; width: 22px; height: 22px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Égaliseur animé */
.eq { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 3px; align-items: flex-end; height: 22px; opacity: 0; transition: opacity .3s; }
.eq i { width: 4px; background: #fff; border-radius: 2px; height: 30%; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.6s; } .eq i:nth-child(3) { animation-delay: -.3s; } .eq i:nth-child(4) { animation-delay: -.8s; } .eq i:nth-child(5) { animation-delay: -.45s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.is-playing .eq { opacity: .9; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow-plain { display: block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.section-title { font-size: clamp(26px, 3vw, 34px); font-weight: 800; margin-bottom: 32px; }
.page-head { padding: 56px 0 8px; background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%); }
.page-head h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.page-head + .section { padding-top: 32px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 20px; font-weight: 700; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.link-more { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Liste de titres */
.track-list { list-style: none; margin: 0; padding: 0; }
.track-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.track-list li:last-child { border-bottom: 0; }
.track-list img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; background: var(--brand-soft); }
.track-list.big img { width: 56px; height: 56px; }
.tl-meta { min-width: 0; flex: 1; }
.tl-meta strong, .tl-meta span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-meta strong { font-weight: 600; font-size: 15px; }
.tl-meta span { color: var(--muted); font-size: 14px; }
.track-list time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.now-row { display: flex; align-items: center; gap: 16px; padding: 4px 0 18px; margin-bottom: 8px; border-bottom: 2px solid var(--brand-soft); }
.now-row img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex: none; }
.now-row > div { min-width: 0; flex: 1; }
.now-row strong { display: block; font-size: 18px; }

/* Émissions (aperçu) */
.show-list { list-style: none; margin: 0; padding: 0; }
.show-list li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.show-list li:last-child { border-bottom: 0; }
.show-list li.now { background: var(--brand-soft); margin: 0 -12px; padding: 12px; border-radius: var(--radius-sm); border-bottom-color: transparent; }
.sl-when { flex: none; width: 92px; }
.sl-when span { display: block; font-size: 12px; color: var(--muted); }
.sl-when strong { font-size: 18px; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.sl-meta { min-width: 0; }
.sl-meta strong { font-weight: 600; }
.sl-meta > span { display: block; color: var(--ink-2); font-size: 14px; }
.tag-now, .tag-live { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; margin-left: 6px; vertical-align: 2px; }
.tag-now { background: var(--brand); color: #fff; }
.tag-live { background: #fee2e2; color: #b91c1c; }

/* Programme complet */
.sched-day { margin-bottom: 36px; }
.sched-day h2 { font-size: 20px; font-weight: 700; padding-bottom: 10px; border-bottom: 2px solid var(--brand-soft); }
.sched-items { display: grid; gap: 12px; margin-top: 14px; }
.sched-item { display: flex; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.sched-item.now { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.si-time { flex: none; width: 70px; font-weight: 800; font-size: 20px; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.si-time span { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }
.si-body h3 { font-size: 17px; margin-bottom: 4px; }
.si-body p { margin: 0; color: var(--ink-2); }
.panel.empty { text-align: center; padding: 48px 24px; }

/* Caractéristiques */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature-ico { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; background: var(--brand-soft); border-radius: 10px; margin-bottom: 14px; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--ink-2); font-size: 15px; margin: 0; }

/* CTA */
.cta-box { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; border-radius: var(--radius); padding: 36px 40px; }
.cta-box h2 { font-size: 24px; font-weight: 800; }
.cta-box p { margin: 0; opacity: .85; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) { .cta-box { padding: 28px 22px; } }

/* Page Écouter */
.listen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .listen-grid { grid-template-columns: 1fr; } }
.listen-grid p { color: var(--ink-2); }
.link-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.copy-field { display: flex; align-items: center; gap: 10px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.copy-field a { flex: 1; min-width: 0; }
.btn-copy { flex: none; font: inherit; font-size: 13px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; cursor: pointer; }
.btn-copy:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Pied de page ---------- */
.footer { background: #1a0d17; color: #c9b8c4; padding: 56px 0 0; margin-top: 0; font-size: 14px; }
.footer a { color: #e8d8e2; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
.footer-logo { height: 30px; width: auto; margin-bottom: 14px; }
.footer-legal { font-size: 13px; color: #9d8a98; }
.footer h5 { color: #fff; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding: 20px 16px; font-size: 13px; }
.footer-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Lecteur fixe (dock) ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: var(--dock-h); background: rgba(26, 13, 23, .97); backdrop-filter: blur(10px); color: #fff; border-top: 1px solid rgba(255,255,255,.08); }
.dock-in { display: flex; align-items: center; gap: 14px; height: 100%; }
.dock-art { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.dock-meta { min-width: 0; flex: 1; }
.dock-title, .dock-artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-title { font-weight: 600; font-size: 15px; }
.dock-artist { font-size: 13px; color: #c9b8c4; }
.live-pill { flex: none; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 4px 8px; border-radius: 5px; }
.live-pill[hidden] { display: none; }
.vol { display: flex; align-items: center; gap: 8px; }
.vol input { width: 110px; accent-color: var(--brand); }
.icon-btn { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: inherit; cursor: pointer; text-decoration: none !important; }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icon-btn svg[fill="none"] { fill: none; }
.is-muted .icon-btn .wave { opacity: .2; }
@media (max-width: 640px) { .vol, .dock .live-pill { display: none; } .dock-in { gap: 10px; } }

/* ---------- Fenêtre lecteur détaché ---------- */
body.popup { padding: 0; min-height: 100vh; display: grid; place-items: center; background: radial-gradient(500px 400px at 80% 0%, rgba(163,25,107,.45), transparent 70%), var(--brand-dark); }
.popup-card { width: 100%; max-width: 380px; padding: 20px; color: #fff; }
.popup-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.popup-logo { height: 24px; width: auto; }
.popup .pc-art-wrap { aspect-ratio: 1; border-radius: var(--radius); box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.popup-meta { margin-top: 20px; text-align: center; }
.popup .pc-artist { color: #e2c9d8; }
.popup .progress-bar { background: rgba(255,255,255,.15); }
.popup .progress-bar span { background: #fff; }
.popup .progress.no-dur .progress-bar span { background: linear-gradient(90deg, rgba(255,255,255,.15), #fff, rgba(255,255,255,.15)); background-size: 200% 100%; }
.popup .progress-times { color: #e2c9d8; }
.popup-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.popup .play-btn { background: #fff; color: var(--brand-dark); width: 64px; height: 64px; }
.popup .play-btn .spinner { border-color: rgba(74,18,56,.25); border-top-color: var(--brand-dark); }
.popup-foot { display: flex; flex-direction: column; gap: 4px; margin-top: 22px; font-size: 13px; color: #e2c9d8; }
.popup-foot strong { color: #fff; }
