/* ══════════════════════════════════════════════════════════════════════════
   AlibiRadio — page d'écoute publique · © by AlibiDev

   Même charte que le site vitrine alibirp.com (Projet Horizon) : le dégradé du
   logo V3, cyan → bleu → violet → magenta → rose → orange → jaune, posé sur un
   noir profond très légèrement violacé. Boutons en pilule rose → orange,
   cartes « vitre » à 26 px, titres Inter 800 serrés.

   Cette feuille ne sert QU'À la page d'écoute (et au widget). La régie garde
   sa propre charte, plate et grise : c'est un outil de travail, pas une vitrine.
   ══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
  --cyan: #22d3ee; --blue: #3b5bff; --violet: #7c3aed; --magenta: #c026d3;
  --pink: #ff2d6f; --orange: #ff7a1a; --yellow: #ffc93c;
  --bg: #05030c; --bg-soft: #0b0718;
  --text: #fff; --text-soft: rgba(233, 228, 255, .66);
  --r: 26px;
  --grad: linear-gradient(100deg, var(--cyan), var(--blue), var(--violet), var(--magenta), var(--pink), var(--orange), var(--yellow));
  --grad-court: linear-gradient(100deg, var(--pink), var(--orange));
  --bord: rgba(255, 255, 255, .09);
  --vitre: rgba(255, 255, 255, .035);
  --w: 1080px;
  --gap: clamp(1rem, 2.4vw, 1.6rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(1rem, .96rem + .2vw, 1.06rem);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--pink); color: #fff; }
:where(a, button, input, textarea, summary):focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px;
}

/* ── Décor : halos discrets en haut de page, grain léger ─────────────────── */
.voile {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(80% 42% at 78% 0%, rgba(192, 38, 211, .12), transparent 62%),
    radial-gradient(70% 38% at 14% 4%, rgba(59, 91, 255, .10), transparent 62%),
    linear-gradient(180deg, rgba(255, 122, 26, .05) 0%, transparent 34%);
}
.voile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 3, 12, .30) 0%, rgba(5, 3, 12, .6) 46%, var(--bg) 88%);
}
.grain::after {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: min(var(--w), 100% - clamp(2rem, 8vw, 5rem)); margin-inline: auto; }
main { position: relative; z-index: 2; }

/* ── Typo ────────────────────────────────────────────────────────────────── */
h1, h2, h3 { line-height: 1.08; font-weight: 800; letter-spacing: -.025em; }
.grad {
  background: var(--grad); background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: glisse 14s linear infinite;
}
@keyframes glisse { to { background-position: 260% 0; } }
.kicker {
  font-size: .74rem; font-weight: 800; letter-spacing: .19em; text-transform: uppercase;
  color: var(--text-soft); margin-bottom: .6rem;
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.45rem; border-radius: 999px;
  font-weight: 700; font-size: .92rem; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s, background .3s;
}
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn.primary {
  position: relative; overflow: hidden;
  background: var(--grad-court); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(255, 45, 111, .55);
}
.btn.primary:hover { box-shadow: 0 16px 40px -10px rgba(255, 45, 111, .7); transform: translateY(-2px); }
.btn.primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .32) 50%, transparent 65%);
  translate: -120% 0; transition: translate .7s var(--ease);
}
.btn.primary:hover::after { translate: 120% 0; }
.btn > * { position: relative; z-index: 1; }
.btn.ghost { border: 1px solid var(--bord); background: var(--vitre); color: #fff; }
.btn.ghost:hover { border-color: rgba(255, 255, 255, .28); transform: translateY(-2px); }
.btn.petit { padding: .55rem 1.05rem; font-size: .82rem; }

/* ── Navigation ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 3, 12, .72);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--bord);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .8rem; }
.nav-logo { display: flex; align-items: center; gap: .7rem; }
.nav-logo img { width: 40px; height: 40px; object-fit: contain; transition: transform .4s var(--ease); }
.nav-logo:hover img { transform: rotate(-8deg) scale(1.08); }
.nav-nom { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.nav-actions { display: flex; align-items: center; gap: .6rem; }

/* ── Indicateur « en direct » ────────────────────────────────────────────── */
.live {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .5rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--bord); background: var(--vitre);
  backdrop-filter: blur(10px);
  font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-soft);
}
.live i { width: 8px; height: 8px; border-radius: 50%; background: #64748b; flex: none; }
.live.on { color: #6ee7b7; border-color: rgba(52, 211, 153, .3); }
.live.on i { background: #34d399; animation: pouls 2.2s infinite; }
.live.off { color: #fda4af; }
.live.off i { background: #f43f5e; }
@keyframes pouls {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ── Le lecteur (en-tête de page) ────────────────────────────────────────── */
.lecteur {
  position: relative;
  padding-block: clamp(2.5rem, 7vh, 5rem) clamp(2rem, 5vh, 3.5rem);
  text-align: center;
}
/* La bannière de la station, très estompée derrière le lecteur. */
.lecteur-fond {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
  /* Floutée : juste une lueur aux couleurs de la station, jamais une
     deuxième image qui ferait doublon avec le logo. */
  opacity: .32; filter: blur(38px) saturate(1.3); transform: scale(1.15);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 95%);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 95%);
}
.lecteur-in { position: relative; z-index: 1; display: grid; justify-items: center; }

.lecteur-logo {
  width: clamp(150px, 22vw, 230px); aspect-ratio: 1;
  display: grid; place-items: center;
  margin-bottom: 1.6rem;
  position: relative;
}
.lecteur-logo img {
  width: 92%; height: auto;
  filter: drop-shadow(0 22px 60px rgba(255, 45, 111, .38));
  animation: flotte 7s ease-in-out infinite;
}
.lecteur-logo::before {
  content: ''; position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: 80%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 45, 111, .34), transparent 68%);
  filter: blur(46px); z-index: -1;
  animation: respire 7s ease-in-out infinite;
}
/* En lecture, le halo bat plus fort : la page « vit » avec le son. */
body.en-lecture .lecteur-logo::before { animation-duration: 2.4s; }
@keyframes flotte {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  50% { transform: translateY(-12px) rotate(1.2deg) scale(1.015); }
}
@keyframes respire {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.14); }
}

.lecteur .live { margin-bottom: 1.4rem; }
.piste-titre {
  font-size: clamp(2rem, 1.1rem + 4.2vw, 4.4rem);
  max-width: 18ch;
  margin-bottom: .6rem;
  overflow-wrap: anywhere;
  min-height: 1.1em;
}
.piste-artiste {
  font-size: clamp(1.05rem, 1rem + .6vw, 1.4rem);
  color: var(--text-soft); font-weight: 600;
  min-height: 1.6em;
}

/* Le spectre : barres aux couleurs du dégradé V3, sous le titre. */
.spectre {
  width: min(760px, 100%); height: 90px;
  margin: 1.4rem auto .4rem;
  opacity: .9;
}

.commandes {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  flex-wrap: wrap; margin-top: .6rem;
}
.gros-play {
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad-court); color: #fff;
  box-shadow: 0 14px 40px -10px rgba(255, 45, 111, .7);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  position: relative;
}
.gros-play:hover { transform: scale(1.06); box-shadow: 0 18px 50px -10px rgba(255, 45, 111, .85); }
.gros-play svg { width: 30px; height: 30px; fill: currentColor; }
.gros-play.en-lecture { background: rgba(255, 255, 255, .08); border: 1px solid var(--bord); box-shadow: none; }
.volume-bloc {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem; border-radius: 999px;
  border: 1px solid var(--bord); background: var(--vitre);
  color: var(--text-soft);
}
.volume-bloc svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }

input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 130px; height: 16px; background: transparent; cursor: pointer; outline: none;
}
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%;
  background: var(--grad-court); box-shadow: 0 0 0 4px rgba(255, 45, 111, .18);
}
input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border: 0; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 0 4px rgba(255, 45, 111, .18);
}

.votes { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.votes .kicker { margin: 0 .3rem 0 0; }
.vote { gap: .45rem; }
.vote.choisi { border-color: rgba(255, 45, 111, .5); background: rgba(255, 45, 111, .14); }
.vote-info { font-size: .85rem; color: var(--text-soft); min-width: 7ch; }

.liens-station { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: 1.4rem; }

/* ── Sections et cartes ──────────────────────────────────────────────────── */
.sections { display: grid; gap: var(--gap); padding-bottom: clamp(2rem, 6vh, 4rem); }
.grille-2 { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

.card {
  position: relative; overflow: hidden;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--r);
  border: 1px solid var(--bord);
  background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01));
  transition: border-color .45s, box-shadow .45s;
}
.card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity .45s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 45, 111, .12), transparent 62%);
}
.card:hover { border-color: rgba(255, 45, 111, .3); box-shadow: 0 28px 60px -28px rgba(255, 45, 111, .45); }
.card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card h2 { font-size: 1.35rem; margin-bottom: .3rem; }
.card .sous { color: var(--text-soft); font-size: .92rem; margin-bottom: 1.1rem; }

/* Les listes (derniers titres, top) */
.liste { list-style: none; display: grid; }
.liste li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .72rem 0; border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: .95rem;
}
.liste li:last-child { border-bottom: 0; }
.liste li:first-child span { font-weight: 700; }
.liste time, .liste .num { color: var(--text-soft); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.liste .discret { color: var(--text-soft); justify-content: flex-start; }

/* La shoutbox */
.shout-form { display: grid; grid-template-columns: 160px 1fr; gap: .6rem; margin-bottom: 1rem; }
.shout-form .ligne { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
input[type=text], input:not([type]), textarea {
  width: 100%; padding: .75rem 1rem; border-radius: 14px;
  border: 1px solid var(--bord); background: rgba(255, 255, 255, .04);
  color: #fff; font: inherit; font-size: .95rem;
  transition: border-color .25s, background .25s;
}
input::placeholder, textarea::placeholder { color: rgba(233, 228, 255, .38); }
input:focus, textarea:focus { outline: none; border-color: rgba(255, 45, 111, .55); background: rgba(255, 255, 255, .06); }
.case { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--text-soft); cursor: pointer; }
.case input { accent-color: var(--pink); width: 16px; height: 16px; }
.info { font-size: .85rem; color: var(--text-soft); }

.shouts { list-style: none; display: grid; gap: .55rem; max-height: 380px; overflow: auto; padding-right: .3rem; }
.shouts li {
  display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: baseline;
  padding: .7rem .9rem; border-radius: 16px;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .05);
  font-size: .93rem;
}
.shouts li.demande { border-color: rgba(255, 45, 111, .28); background: rgba(255, 45, 111, .07); }
.shout-pseudo { font-weight: 800; background: var(--grad-court); -webkit-background-clip: text; background-clip: text; color: transparent; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shout-message { overflow-wrap: anywhere; }
.shouts time { color: var(--text-soft); font-size: .78rem; font-variant-numeric: tabular-nums; }
.shouts .discret { display: block; color: var(--text-soft); background: none; border: 0; padding: .4rem 0; }
.shouts::-webkit-scrollbar { width: 6px; }
.shouts::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 6px; }

/* Actus */
.actus { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.actu time { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); }
.actu h3 { font-size: 1.15rem; margin: .4rem 0 .5rem; }
.actu p { color: var(--text-soft); font-size: .95rem; }

/* Contact replié */
details.card summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 1.15rem; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: '+'; font-size: 1.5rem; color: var(--pink); font-weight: 400; transition: rotate .3s var(--ease); }
details.card[open] summary::after { rotate: 45deg; }
.contact-form { display: grid; gap: .7rem; margin-top: 1.2rem; }
.contact-form .ligne { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

/* ── Pied de page ────────────────────────────────────────────────────────── */
.pied {
  position: relative; z-index: 2;
  padding-block: 2.4rem 2rem;
  border-top: 1px solid var(--bord);
  background: linear-gradient(180deg, transparent, rgba(11, 7, 24, .85));
}
.pied-in { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.pied-marque { display: flex; align-items: center; gap: .8rem; color: var(--text-soft); font-size: .88rem; }
.pied-marque img { width: 34px; height: 34px; object-fit: contain; }
.pied-liens { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.pied-liens a { font-size: .88rem; color: var(--text-soft); transition: color .25s; }
.pied-liens a:hover { color: #fff; }

/* ── Widget (iframe) ─────────────────────────────────────────────────────── */
body.widget-page { background: transparent; min-height: 0; }
.widget {
  display: flex; align-items: center; gap: .9rem;
  padding: .7rem 1rem; border-radius: 20px;
  border: 1px solid var(--bord);
  background: linear-gradient(160deg, rgba(20, 12, 40, .92), rgba(8, 5, 20, .96));
}
.widget-logo { width: 46px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 16px rgba(255, 45, 111, .35)); }
.widget-infos { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.widget .live { padding: 0; border: 0; background: none; backdrop-filter: none; font-size: .64rem; margin-bottom: .15rem; }
.widget-titre { font-weight: 800; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-artiste { font-size: .82rem; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget .gros-play { width: 46px; height: 46px; }
.widget .gros-play svg { width: 20px; height: 20px; }
.widget input[type=range] { width: 80px; }
.widget-lien { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); }
@media (max-width: 480px) { .widget input[type=range], .widget-lien { display: none; } }

/* ── Étroit ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-nom { display: none; }
  .shout-form { grid-template-columns: 1fr; }
  .shouts li { grid-template-columns: 1fr auto; }
  .shouts li .shout-message { grid-column: 1 / -1; grid-row: 2; }
  .gros-play { width: 64px; height: 64px; }
}

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

/* La pochette du titre joué prend la place du logo (même halo, même flottement). */
.lecteur-logo img.pochette {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 22px; border: 1px solid var(--bord);
  box-shadow: 0 30px 80px -24px rgba(255, 45, 111, .55);
}
.lecteur-logo.avec-pochette img.logo { display: none; }
