/* ============================================================
   Harmonix — Visualizer v2.0
   Barres fréquentielles animées (Web Audio API)
   ============================================================ */

#hx-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
  width: auto;
  flex-shrink: 0;
  padding: 0 4px;
}

.hx-vbar {
  width: 3px;
  min-height: 3px;
  background: var(--gold);
  border-radius: 1.5px 1.5px 0 0;
  transition: height 60ms linear;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Idle state: subtle random animation */
#hx-visualizer.idle .hx-vbar {
  animation: hx-idle-bar 1.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.1s);
}

@keyframes hx-idle-bar {
  0%, 100% { height: 3px; opacity: 0.3; }
  50%       { height: 8px; opacity: 0.5; }
}

/* Playing state: driven by JS */
#hx-visualizer.playing .hx-vbar {
  animation: none;
  opacity: 0.85;
}

/* Paused: frozen at current height with low opacity */
#hx-visualizer.paused .hx-vbar {
  animation: none;
  opacity: 0.3;
}
