/* Grille des programmes ls-radio.com : même direction artistique que l'accueil. */

:root {
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.72);
  --ink-3: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.12);
  --page: #0b0b0d;
  --panel: #141418;
  --font: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --display: "Unbounded", "Instrument Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --pad: clamp(16px, 3.9vw, 56px);
  --hour: 160px;
  --label: 170px;
  --row: 84px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.top { display: flex; align-items: center; gap: 36px; padding: max(18px, env(safe-area-inset-top, 0px)) var(--pad) 0; min-height: 88px; }
.top-logo img { height: 38px; width: auto; }
.top-nav { display: flex; gap: 28px; font-weight: 600; font-size: 0.95rem; }
.top-nav a { color: var(--ink-2); transition: color 0.2s; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--ink); }
.top-nav a[aria-current] { border-bottom: 2px solid #fff; }

.g-head { position: relative; padding: 40px var(--pad) 26px; overflow: hidden; }
.g-head h1 {
  margin: 18px 0 30px; font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.4rem, 7vw, 6rem); line-height: 0.9; letter-spacing: -0.05em;
}
.sticker {
  margin: 0; display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: #000; padding: 10px 14px; transform: rotate(-2deg);
  font-family: var(--display); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff2d2d; }

.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 6px; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; border: 0; cursor: pointer; border-radius: 999px; padding: 11px 18px;
  font-family: var(--display); font-weight: 800; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.85); transition: background 0.2s, color 0.2s, transform 0.25s var(--ease);
}
.day:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.day[aria-selected="true"] { background: #fff; color: #000; transform: rotate(-2deg); box-shadow: 4px 4px 0 #ff2d2d; }

.g-status { margin: 0; padding: 30px var(--pad); color: var(--ink-2); }
.g-status[hidden] { display: none; }

/* ---------- La frise ---------- */
.grid { padding: 0 0 0 var(--pad); }
.grid[hidden] { display: none; }
.g-scroll { position: relative; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 10px; scrollbar-color: rgba(255, 255, 255, 0.3) transparent; }
.g-hours {
  display: grid; grid-template-columns: repeat(24, var(--hour)); width: calc(var(--hour) * 24);
  margin-left: var(--label); height: 34px; align-items: end;
}
.g-hours span { font-size: 0.8125rem; font-weight: 700; color: var(--ink-3); border-left: 1px solid var(--line); padding: 0 0 8px 8px; font-variant-numeric: tabular-nums; }
.g-rows { list-style: none; margin: 0; padding: 0; width: calc(var(--label) + var(--hour) * 24 + var(--pad)); }
.g-radio { display: flex; height: var(--row); margin-bottom: 8px; }
.g-label {
  position: sticky; left: 0; z-index: 3; flex: none; width: calc(var(--label) - 10px); margin-right: 10px;
  display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 16px;
  background: var(--c); box-shadow: 6px 0 0 var(--page), 8px 8px 0 #000; transition: transform 0.25s var(--ease);
}
.g-radio[data-radio="lsradio"] .g-label { background: #1d1d22; }
.g-label img { width: 70px; height: auto; flex: none; }
.g-label .g-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.g-label:hover { transform: rotate(-2deg) scale(1.03); }
.g-track {
  position: relative; flex: none; width: calc(var(--hour) * 24); border-radius: 16px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px var(--hour));
}
.slot {
  position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0;
  padding: 0 14px; border-radius: 14px; overflow: clip;
  background: color-mix(in srgb, var(--c) 82%, #fff 6%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, filter 0.25s;
}
.g-radio[data-radio="lsradio"] .slot { background: #2a2a31; }
.si { position: sticky; left: calc(var(--label) + 4px); display: flex; flex-direction: column; gap: 4px; align-self: flex-start; width: max-content; max-width: 100%; min-width: 0; }
.slot b { font-family: var(--display); font-weight: 800; font-size: 0.875rem; line-height: 1.1; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si > span { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.75); white-space: nowrap; font-variant-numeric: tabular-nums; }
.slot:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px #fff, 6px 6px 0 #000; z-index: 2; }
.slot.is-flow {
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 0 10px, transparent 10px 20px), color-mix(in srgb, var(--c) 35%, var(--page));
}
.slot.is-flow b { font-family: var(--font); font-weight: 600; text-transform: none; font-size: 0.875rem; color: rgba(255, 255, 255, 0.75); }
.slot.is-now { box-shadow: inset 0 0 0 3px #fff, 6px 6px 0 #000; }
.slot.is-now b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 7px 2px 0; border-radius: 50%; background: #ff2d2d; vertical-align: middle;
  animation: live 2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 45, 0.7); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255, 45, 45, 0); } }
.g-empty { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 0.875rem; }

.g-now { position: absolute; z-index: 4; top: 30px; bottom: 10px; width: 3px; margin-left: -1px; background: #ff2d2d; pointer-events: none; border-radius: 2px; }
.g-now[hidden] { display: none; }
.g-now span {
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%) rotate(-3deg); white-space: nowrap;
  background: #ff2d2d; color: #fff; padding: 5px 9px;
  font-family: var(--display); font-weight: 800; font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase;
}

.home-foot {
  display: flex; align-items: center; gap: 18px; margin-top: 64px;
  padding: 30px var(--pad) max(30px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-3);
}
.home-foot img { height: 24px; width: auto; opacity: 0.8; }

/* Passage vers un player */
.wipe { position: fixed; inset: 0; z-index: 120; pointer-events: none; display: grid; grid-template-rows: repeat(3, 1fr); }
.wipe i { display: block; transform: translateX(-101%); }
.wipe i:nth-child(1) { background: #fff; }
.wipe i:nth-child(2) { background: #000; }
.wipe i:nth-child(3) { background: color-mix(in srgb, var(--c, #555) 65%, #fff); }
.wipe.is-closing i { animation: wipe-close 0.6s cubic-bezier(0.7, 0, 0.2, 1) both; }
.wipe.is-closing i:nth-child(2) { animation-delay: 0.07s; }
.wipe.is-closing i:nth-child(3) { animation-delay: 0.14s; }
@keyframes wipe-close { from { transform: translateX(-101%); } to { transform: none; } }

@media (max-width: 760px) {
  :root { --hour: 120px; --label: 84px; --row: 76px; }
  .g-label { padding: 0 8px; justify-content: center; }
  .g-label img { width: 58px; }
  .slot { padding: 0 10px; }
  .slot b { font-size: 0.75rem; }
  .si > span { font-size: 0.75rem; }
  .top-nav { margin-left: auto; font-size: 0.875rem; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
