/* ------------------------------------------------------------
   Sunrise Radio — style « affiche suisse »
   Papier, encre, un soleil orange et des collines vertes.
   ------------------------------------------------------------ */
:root {
  --paper: #f2ebdd;
  --paper-2: #e9e0ce;
  --ink: #171512;
  --ink-soft: #5e574c;
  --rule: #171512;
  --accent: #ff6b1a;      /* remplacé par config.accent  (orange) */
  --accent-2: #1f8a4c;    /* remplacé par config.accent2 (vert)   */
  --board: #1b1a17;
  --board-text: #f2ebdd;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --dock-h: 68px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  padding-bottom: var(--dock-h);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; }

.i-pause { display: none; }
body.is-playing .i-play { display: none; }
body.is-playing .i-pause { display: block; }

/* ============ EN-TÊTE ============ */
.top {
  position: sticky; top: 0; z-index: 40;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 14px var(--pad);
  background: var(--paper);
  border-bottom: 2px solid var(--rule);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em;
}
.brand-sun { width: 30px; height: 30px; }
.brand-sun circle { fill: var(--accent); }
.brand-sun path { fill: var(--accent-2); }
.top-nav { display: flex; gap: 28px; justify-content: center; }
.top-nav a { text-decoration: none; font-weight: 500; font-size: .95rem; }
.top-nav a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.clock { font-family: var(--mono); font-size: .9rem; white-space: nowrap; }
.clock-label { color: var(--ink-soft); }
#clock { font-weight: 600; }

/* ============ AFFICHE ============ */
.poster { padding: 28px var(--pad) 0; }
.poster-meta {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  padding-bottom: 14px; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
}
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-soft); }
body.is-online .dot { background: #e0301e; animation: blink 1.4s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.wordmark {
  margin: 18px 0 0;
  font-weight: 900; font-stretch: 125%;
  font-size: clamp(3.4rem, 15.5vw, 15rem);
  line-height: .82; letter-spacing: -.045em;
  text-transform: uppercase;
}
.wm-line { display: block; }
.wm-2 { font-stretch: 62%; font-weight: 800; color: var(--accent-2); letter-spacing: -.02em; }
.wm-dot { color: var(--accent); }

.poster-grid {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 0;
  margin-top: 28px; border-top: 2px solid var(--rule);
}

/* Le soleil */
.sun-art { border-right: 1px solid var(--rule); overflow: hidden; min-height: 320px; display: flex; align-items: flex-end; }
.sun-art svg { width: 100%; height: 100%; display: block; }
.sun { fill: var(--accent); transform: translateY(70px); transition: transform 2.4s cubic-bezier(.2,.7,.1,1); }
.rays line { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 8; opacity: 0; transition: opacity 1.2s .8s; }
body.is-playing .sun { transform: translateY(0); }
body.is-playing .rays line { opacity: .55; }
body.is-playing .rays { animation: rays 40s linear infinite; transform-origin: 300px 250px; }
@keyframes rays { to { transform: rotate(360deg); } }
.hill-back { fill: var(--accent-2); }
.hill-front { fill: #156a39; }
.horizon { stroke: var(--ink); stroke-width: 2; }

/* Bloc « à l'antenne » */
.onair { padding: 28px 0 28px 32px; display: flex; flex-direction: column; }
.tagline { margin: 0 0 24px; font-size: 1.2rem; line-height: 1.4; max-width: 30ch; }
.listen {
  display: inline-flex; align-items: center; gap: 14px; align-self: flex-start;
  padding: 16px 26px 16px 20px; border: 2px solid var(--ink); border-radius: 0;
  background: var(--accent); color: var(--ink);
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.listen:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.listen:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.listen svg { width: 24px; height: 24px; fill: currentColor; }
.listeners { margin: 14px 0 0; font-family: var(--mono); font-size: .85rem; color: var(--ink-soft); min-height: 1.3em; }

.np { display: flex; gap: 16px; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); }
.np-cover { width: 84px; height: 84px; object-fit: cover; flex-shrink: 0; background: var(--paper-2); border: 1px solid var(--rule); }
.np-text { min-width: 0; }
.np-label { margin: 0; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.np-title { margin: 4px 0 0; font-weight: 800; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.015em;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.np-artist { margin: 2px 0 0; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-progress { height: 3px; margin-top: 18px; background: var(--paper-2); }
#np-bar { height: 100%; width: 0; background: var(--ink); transition: width 1s linear; }
.np-times { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-family: var(--mono); font-size: .75rem; color: var(--ink-soft); }
#np-next { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.show-now { margin: 22px 0 0; padding: 10px 14px; border-left: 4px solid var(--accent-2); background: var(--paper-2); font-size: .95rem; }
.show-now b { font-weight: 800; }

/* ============ BLOCS ============ */
.block { padding: 72px var(--pad) 8px; }
.block-head {
  display: flex; align-items: baseline; gap: 18px;
  padding-bottom: 14px; margin-bottom: 8px; border-bottom: 2px solid var(--rule);
}
.block-num { font-family: var(--mono); font-size: .95rem; color: var(--accent); font-weight: 600; }
.block-head h2 {
  margin: 0; font-weight: 900; font-stretch: 110%;
  font-size: clamp(2rem, 5.5vw, 4rem); line-height: .95; letter-spacing: -.035em; text-transform: uppercase;
}

/* Playlist */
.setlist { list-style: none; margin: 0; padding: 0; }
.setlist li {
  display: grid; grid-template-columns: 70px 52px 1fr; gap: 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid rgba(23,21,18,.25);
}
.setlist time { font-family: var(--mono); font-size: .9rem; color: var(--ink-soft); }
.setlist img { width: 52px; height: 52px; object-fit: cover; background: var(--paper-2); }
.setlist .song { min-width: 0; }
.setlist .t { font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setlist .a { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setlist .empty { display: block; color: var(--ink-soft); }

/* Horaire — panneau de gare */
.board { background: var(--board); color: var(--board-text); margin-top: 16px; font-family: var(--mono); }
.board-row {
  display: grid; grid-template-columns: 110px 150px 1fr 160px; gap: 16px; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid rgba(242,235,221,.14);
}
.board-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(242,235,221,.55); padding-block: 12px; }
.board-row .show { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; }
.board-row .desc { display: block; font-family: var(--sans); font-weight: 400; font-size: .88rem; color: rgba(242,235,221,.6); margin-top: 2px; }
.board-row.now { background: var(--accent); color: var(--ink); }
.board-row.now .desc { color: rgba(23,21,18,.7); }
.board-row .flag { display: inline-block; margin-left: 10px; padding: 2px 7px; background: var(--ink); color: var(--accent); font-family: var(--mono); font-size: .68rem; font-weight: 600; text-transform: uppercase; vertical-align: middle; }
.board-row.filler { color: rgba(242,235,221,.6); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 24px; align-items: start; }
.contact-text { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.3; font-weight: 500; max-width: 26ch; }
.contact-mail {
  display: inline-block; font-weight: 800; font-size: clamp(1.2rem, 2.6vw, 2rem); letter-spacing: -.02em;
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 4px; text-underline-offset: 6px;
  word-break: break-all;
}
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.socials a {
  padding: 9px 16px; border: 2px solid var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem;
  transition: background .15s, color .15s;
}
.socials a:hover { background: var(--ink); color: var(--paper); }

/* Pied de page */
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 80px; padding: 18px var(--pad) 24px; border-top: 2px solid var(--rule);
  font-family: var(--mono); font-size: .82rem;
}

/* ============ LECTEUR FIXE ============ */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: var(--dock-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 var(--pad);
  background: var(--paper); border-top: 2px solid var(--rule);
}
.dock-play {
  width: 44px; height: 44px; flex-shrink: 0; border: 2px solid var(--ink); border-radius: 0;
  display: grid; place-items: center; background: var(--accent); color: var(--ink);
}
.dock-play svg { width: 20px; height: 20px; fill: currentColor; }
.dock-cover { width: 44px; height: 44px; object-fit: cover; flex-shrink: 0; background: var(--paper-2); }
.dock-info { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.dock-info strong, .dock-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-info strong { font-size: .95rem; }
.dock-info span { font-size: .85rem; color: var(--ink-soft); }
.dock-volume { display: flex; align-items: center; gap: 6px; }
.mute { width: 36px; height: 36px; border: 0; background: none; display: grid; place-items: center; }
.mute svg { width: 20px; height: 20px; fill: currentColor; }
.mute.muted { color: #e0301e; }
#volume { width: 110px; accent-color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 14px); z-index: 60;
  transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 12px 16px; background: var(--ink); color: var(--paper); font-size: .92rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .top { grid-template-columns: 1fr auto; }
  .top-nav { display: none; }
  .poster-grid { grid-template-columns: 1fr; }
  .sun-art { border-right: 0; border-bottom: 1px solid var(--rule); min-height: 0; aspect-ratio: 600 / 250; }
  .onair { padding: 24px 0; }
  .board-row { grid-template-columns: 70px 1fr; gap: 4px 14px; }
  .board-row > :nth-child(3) { grid-column: 1 / -1; }
  .board-row > :nth-child(4) { grid-column: 1 / -1; color: inherit; opacity: .7; font-size: .85rem; }
  .board-head { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .clock-label { display: none; }
  .setlist li { grid-template-columns: 44px 1fr; }
  .setlist time { grid-column: 1 / -1; font-size: .8rem; }
  .setlist img { width: 44px; height: 44px; }
  .dock-volume { display: none; }
  .block { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
