:root {
  --bg: #07070f;
  --panel: rgba(18, 18, 34, .62);
  --line: rgba(255, 255, 255, .08);
  --txt: #eef0ff;
  --mute: #8d90b3;
  --rec: #ff3b5c;
  --ok: #3ee6a0;
  --warn: #ffb547;
  --info: #5cc8ff;
  --radius: 22px;
  --g-electro: linear-gradient(135deg, #22d3ee, #a855f7);
  --g-chill: linear-gradient(135deg, #34d399, #3b82f6);
  --g-hits: linear-gradient(135deg, #f472b6, #f59e0b);
  --g-hiphop: linear-gradient(135deg, #f97316, #ef4444);
  --g-rock: linear-gradient(135deg, #ef4444, #7c3aed);
  --g-retro: linear-gradient(135deg, #facc15, #ec4899);
  --g-techno: linear-gradient(135deg, #6366f1, #06b6d4);
  --g-soul: linear-gradient(135deg, #fb7185, #c026d3);
  --g-jazz: linear-gradient(135deg, #d4a373, #7c2d12);
  --g-classique: linear-gradient(135deg, #e2e8f0, #64748b);
  --g-country: linear-gradient(135deg, #f59e0b, #92400e);
  --g-monde: linear-gradient(135deg, #22c55e, #eab308);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--txt);
  font: 15px/1.45 'Space Grotesk', system-ui, sans-serif; overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: 'JetBrains Mono', monospace; font-size: .9em; color: #c9cbff; }

/* fond anime */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; }
.aurora span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .35; animation: flotte 28s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { background: #6d28d9; top: -25vmax; left: -15vmax; }
.aurora span:nth-child(2) { background: #0ea5e9; bottom: -30vmax; right: -20vmax; animation-duration: 34s; }
.aurora span:nth-child(3) { background: #db2777; top: 30%; left: 45%; width: 35vmax; height: 35vmax; opacity: .18; animation-duration: 40s; }
@keyframes flotte { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
.grain { position: fixed; inset: 0; z-index: -1; opacity: .06; pointer-events: none;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* en-tete */
.top { max-width: 1240px; margin: 0 auto; padding: 34px 16px 10px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.brand { display: flex; gap: 18px; align-items: center; }
.brand h1 { margin: 0; font-size: clamp(30px, 5vw, 46px); letter-spacing: -.04em; line-height: 1; }
.brand h1 span { background: linear-gradient(90deg, #ff3b5c, #ff8a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p { margin: 6px 0 0; color: var(--mute); max-width: 520px; }
.brand b { color: var(--txt); }
.vinyl { width: 62px; height: 62px; flex: none; border-radius: 50%; position: relative; animation: tourne 6s linear infinite;
  background: repeating-radial-gradient(circle, #111 0 2px, #1c1c26 2px 4px); box-shadow: 0 0 0 2px #23233a, 0 10px 40px rgba(255, 59, 92, .35); }
.vinyl i { position: absolute; inset: 21px; border-radius: 50%; background: radial-gradient(circle, #07070f 0 3px, var(--rec) 3px); }
@keyframes tourne { to { transform: rotate(360deg); } }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 16px; min-width: 104px; backdrop-filter: blur(14px); }
.stat b { display: block; font: 600 22px 'JetBrains Mono', monospace; }
.stat span { color: var(--mute); font-size: 12px; }
.stat.live b { color: var(--rec); }

main { max-width: 1240px; margin: 0 auto; padding: 8px 16px 20px; display: grid; gap: 22px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 22px; backdrop-filter: blur(18px); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.bar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.bar h2 { margin: 0 8px 0 0; font-size: 22px; letter-spacing: -.02em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip { border: 1px solid var(--line); background: rgba(255, 255, 255, .03); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--mute); transition: .2s; }
.chip:hover { color: var(--txt); border-color: rgba(255, 255, 255, .2); }
.chip.on { color: #07070f; background: var(--txt); border-color: var(--txt); font-weight: 600; }
.search { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; min-width: 220px; }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--mute); stroke-width: 2; }
.search input { background: none; border: 0; outline: 0; color: var(--txt); padding: 9px 0; width: 100%; font: inherit; }

/* cartes radio */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.card { cursor: pointer; position: relative; border-radius: var(--radius); padding: 16px; min-height: 158px; text-align: left; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s; isolation: isolate; }
.card::before { content: ''; position: absolute; inset: -1px; z-index: -1; opacity: 0; background: var(--g); transition: opacity .3s; }
.card::after { content: ''; position: absolute; inset: 1px; z-index: -1; border-radius: calc(var(--radius) - 1px); background: #0e0e1c; opacity: 0; transition: opacity .3s; }
.card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .18); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.card .logo { width: 46px; height: 46px; border-radius: 14px; background: var(--g); display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.card .nom { font-weight: 600; font-size: 16px; line-height: 1.2; }
.card .tag { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); }
.card .go { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.card .go i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; }
.card:hover .go { color: var(--txt); }

/* carte en enregistrement */
.card.rec { border-color: transparent; cursor: default; transform: none; }
.card.rec::before, .card.rec::after { opacity: 1; }
.card.rec::before { animation: halo 3s linear infinite; background: conic-gradient(from var(--a, 0deg), #ff3b5c, #a855f7, #22d3ee, #ff3b5c); }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes halo { to { --a: 360deg; } }
.recpill { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; align-items: center; font: 600 11px 'JetBrains Mono', monospace;
  color: #fff; background: rgba(255, 59, 92, .18); border: 1px solid rgba(255, 59, 92, .45); padding: 4px 9px; border-radius: 999px; }
.recpill i { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 12px var(--rec); animation: pulse 1.2s ease-in-out infinite; }
.recpill.wait { background: rgba(255, 181, 71, .15); border-color: rgba(255, 181, 71, .45); }
.recpill.wait i { background: var(--warn); box-shadow: 0 0 12px var(--warn); }
@keyframes pulse { 50% { transform: scale(.6); opacity: .5; } }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.eq b { width: 4px; border-radius: 2px; background: var(--g); animation: eq 1s ease-in-out infinite; }
.eq b:nth-child(2) { animation-delay: -.3s; } .eq b:nth-child(3) { animation-delay: -.6s; } .eq b:nth-child(4) { animation-delay: -.15s; } .eq b:nth-child(5) { animation-delay: -.45s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 22px; } }
.now { font-size: 13px; color: var(--txt); white-space: nowrap; overflow: hidden; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.now span { display: inline-block; padding-right: 40px; }
.now.defile span { animation: defile 14s linear infinite; }
@keyframes defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.live-bas { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.ring { width: 46px; height: 46px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .fond { stroke: rgba(255, 255, 255, .08); }
.ring .val { stroke: url(#gr); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring em { position: absolute; inset: 0; display: grid; place-items: center; font: 600 10px 'JetBrains Mono', monospace; font-style: normal; }
.compteurs { font: 11.5px "JetBrains Mono", monospace; color: var(--mute); line-height: 1.6; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compteurs b { color: var(--txt); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.actions button { border: 1px solid var(--line); background: rgba(255, 255, 255, .06); border-radius: 10px; padding: 7px 8px; font-size: 12px; white-space: nowrap; transition: .2s; }
.actions button:hover { background: rgba(255, 255, 255, .14); }
.actions .stop:hover { background: rgba(255, 59, 92, .3); border-color: rgba(255, 59, 92, .6); }
.err { font-size: 11px; color: var(--warn); }

/* radios sans titres */
.sans { margin-top: 18px; color: var(--mute); }
.sans summary { cursor: pointer; font-size: 14px; }
.sans p { font-size: 13px; margin: 10px 0; }
.mini { display: flex; flex-wrap: wrap; gap: 8px; }
.mini span { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--line); }

/* historique */
.hist { font-size: 14px; }
.hrow { display: grid; grid-template-columns: 74px 170px minmax(0, 1fr) 70px 80px 190px; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 14px; }
.hrow.head { color: var(--mute); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; padding-top: 0; }
#hist .hrow { border-top: 1px solid var(--line); animation: entre .4s ease both; }
#hist .hrow:hover { background: rgba(255, 255, 255, .035); }
@keyframes entre { from { opacity: 0; transform: translateY(6px); } }
.hrow .h, .hrow .d, .hrow .t { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--mute); }
.hrow .r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hrow .r i { width: 10px; height: 10px; border-radius: 3px; background: var(--g); flex: none; }
.hrow .r span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .m { min-width: 0; }
.hrow .m b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hrow .m small { display: block; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { justify-self: start; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 4px 10px; border-radius: 999px; max-width: 100%; }
.badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge.ok { color: var(--ok); background: rgba(62, 230, 160, .1); }
.badge.ko { color: var(--warn); background: rgba(255, 181, 71, .1); }
.badge.run { color: var(--info); background: rgba(92, 200, 255, .1); }
.badge.run i { animation: pulse 1.2s ease-in-out infinite; }
.vide { color: var(--mute); text-align: center; padding: 40px 10px; }
.vide b { display: block; font-size: 30px; margin-bottom: 6px; }

footer { max-width: 1240px; margin: 0 auto; padding: 6px 16px 40px; color: var(--mute); font-size: 13px; }

.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 10; width: min(92vw, 420px); }
.toast { background: rgba(20, 20, 38, .92); border: 1px solid var(--line); backdrop-filter: blur(14px); padding: 12px 16px; border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: entre .3s ease both; font-size: 14px; }
.toast.ko { border-color: rgba(255, 181, 71, .5); }

@media (max-width: 820px) {
  .hrow.head { display: none; }
  .hrow { grid-template-columns: 1fr auto; grid-template-areas: "m b" "r h" "d t"; row-gap: 4px; }
  .hrow .m { grid-area: m; } .hrow .badge { grid-area: b; justify-self: end; max-width: 170px; }
  .hrow .r { grid-area: r; font-size: 12px; color: var(--mute); } .hrow .h { grid-area: h; text-align: right; }
  .hrow .d { grid-area: d; } .hrow .t { grid-area: t; text-align: right; }
  .panel { padding: 16px; border-radius: 22px; }
  .search { min-width: 0; flex: 1 1 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
  .card.rec { grid-column: 1 / -1; }
  .bar h2 { flex-basis: 100%; }
  .stat { flex: 1 1 40%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
