/* LM — touche motion de l'Accueil (Claude cloud, 4/12). Tout suit la lecture réelle (#antenne[data-playing]).
   Décoratif uniquement : aucun son, aucune lecture déclenchée, coupé si l'utilisateur réduit les animations. */

/* 1. Reflet de vinyle qui tourne derrière la scène, seulement pendant l'écoute */
html.lm-site body .station-scene::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: min(150vmax, 1500px); aspect-ratio: 1; left: 50%; top: 340px; translate: -50% -50%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 18%, rgba(255,214,0,.07) 24%, transparent 31%,
    transparent 64%, rgba(138,43,226,.10) 72%, transparent 80%);
  -webkit-mask: radial-gradient(circle, transparent 0 9%, #000 10% 68%, transparent 70%);
          mask: radial-gradient(circle, transparent 0 9%, #000 10% 68%, transparent 70%);
  opacity: 0; transition: opacity 1.2s ease;
  animation: lm-vinyl-spin 9s linear infinite; animation-play-state: paused;
}
html.lm-site body .station-scene > :is(.air, .home-channels) { position: relative; z-index: 1; }
html.lm-site:has(#antenne[data-playing="true"]) body .station-scene::before { opacity: 1; animation-play-state: running; }
@keyframes lm-vinyl-spin { to { rotate: 360deg; } }

/* 2. Le point EN DIRECT respire pendant l'écoute */
html.lm-site:has(#antenne[data-playing="true"]) body .welcome-home .home-hero-badge::before,
html.lm-site:has(#antenne[data-playing="true"]) body #antenne .hrd-onair-dot {
  animation: lm-live-breath 2.2s ease-in-out infinite;
}
@keyframes lm-live-breath {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 rgba(255,60,60,0); }
  50% { opacity: .55; text-shadow: 0 0 10px rgba(255,60,60,.85); }
}

/* 3. Mini égaliseur jaune et violet dans le lecteur, figé à l'arrêt */
html.lm-site body #antenne .hrd-onair::after {
  content: ""; display: inline-block; vertical-align: -1px; width: 17px; height: 11px; margin-left: 8px;
  background:
    linear-gradient(#ffd600, #ffd600) 0 100% / 3px 35% no-repeat,
    linear-gradient(#8a2be2, #8a2be2) 5px 100% / 3px 60% no-repeat,
    linear-gradient(#ffd600, #ffd600) 10px 100% / 3px 45% no-repeat,
    linear-gradient(#8a2be2, #8a2be2) 15px 100% / 2px 25% no-repeat;
  opacity: .45; transition: opacity .4s;
}
html.lm-site:has(#antenne[data-playing="true"]) body #antenne .hrd-onair::after {
  opacity: 1; animation: lm-eq .9s steps(6) infinite alternate;
}
@keyframes lm-eq {
  0%   { background-size: 3px 35%, 3px 70%, 3px 45%, 2px 90%; }
  33%  { background-size: 3px 90%, 3px 30%, 3px 80%, 2px 40%; }
  66%  { background-size: 3px 55%, 3px 95%, 3px 30%, 2px 70%; }
  100% { background-size: 3px 75%, 3px 50%, 3px 100%, 2px 30%; }
}

/* 4. Nouveau titre : bascule façon palette d'affichage (classe posée par accueil-motion.js) */
html.lm-site body .lm-flip { animation: lm-flip .5s cubic-bezier(.2,.8,.2,1); transform-origin: 50% 0; }
@keyframes lm-flip {
  0% { transform: perspective(400px) rotateX(-75deg); opacity: 0; }
  100% { transform: none; opacity: 1; }
}

/* 5. Le chat saute une fois quand on lance la radio */
html.lm-site body .lm-bump { animation: lm-bump .65s cubic-bezier(.3,1.6,.5,1); }
@keyframes lm-bump {
  0% { transform: none; } 35% { transform: translateY(-6px) scale(1.02); } 100% { transform: none; }
}
@media (max-width: 740px) {
  html.lm-site body .welcome-home .fusion-live.lm-bump { animation: lm-bump-bg .65s cubic-bezier(.3,1.6,.5,1); }
  @keyframes lm-bump-bg {
    0% { background-position: 0 0, right -30px center, 0 0; }
    35% { background-position: 0 0, right -30px top 38%, 0 0; }
    100% { background-position: 0 0, right -30px center, 0 0; }
  }
}

/* 6. Tuiles des canaux : halo néon violet sous le doigt ou la souris */
html.lm-site body .home-channel { transition: box-shadow .25s ease, transform .25s ease, filter .25s ease; }
html.lm-site body .home-channel:is(:hover, :focus-visible, :active) {
  box-shadow: 0 0 0 2px #8a2be2, 0 0 22px rgba(138,43,226,.55), 0 0 2px #ffd600 inset;
  filter: contrast(1.08) saturate(1.1);
}
html.lm-site body .home-channel:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  html.lm-site body .station-scene::before { animation: none !important; }
  html.lm-site body :is(.lm-flip, .lm-bump, .fusion-live.lm-bump) { animation: none !important; }
  html.lm-site body :is(.home-hero-badge::before, #antenne .hrd-onair-dot, #antenne .hrd-onair::after) { animation: none !important; }
  html.lm-site:has(#antenne[data-playing="true"]) body :is(#antenne .hrd-onair-dot, #antenne .hrd-onair::after),
  html.lm-site:has(#antenne[data-playing="true"]) body .welcome-home .home-hero-badge::before { animation: none !important; }
  html.lm-site body .home-channel { transition: none; }
  html.lm-site body .home-channel:active { transform: none; }
}

/* Beat Sync de l'Accueil : --lm-bass (0 à 1) est posé par accueil-motion.js sur .station-scene pendant l'écoute */
html.lm-site:has(#antenne[data-playing="true"]) body .station-scene::before {
  opacity: calc(.7 + var(--lm-bass, 0) * .3);
  scale: calc(1 + var(--lm-bass, 0) * .025);
}
html.lm-site body .welcome-home .welcome-media .home-hero-square {
  transform: scale(calc(1 + var(--lm-bass, 0) * .03)) rotate(calc(var(--lm-bass, 0) * -1.2deg));
  transform-origin: 50% 85%;
}
@media (max-width: 740px) {
  html.lm-site body .welcome-home .fusion-live {
    background-size: auto, calc(62% + var(--lm-bass, 0) * 4%) auto, auto !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.lm-site body .welcome-home .welcome-media .home-hero-square { transform: none !important; }
}
