/* -------------------------------------------------------
   🎛️ CONTAINER GLOBAL
-------------------------------------------------------- */
.winamp-afm-container {
  width: 100%;
  height: 100vh;
  background-image: url('/fond-ampli.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  position: relative;
  user-select: none;
}

/* -------------------------------------------------------
   🪟 FENÊTRES WINAMP (desktop)
-------------------------------------------------------- */
.winamp-window {
  position: absolute;
  width: 260px;
  padding: 6px;
  background: #0a0202;
  border: 2px solid #ff3c00;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255,60,0,0.45), 0 0 18px rgba(255,10,0,0.25);
  cursor: grab;
  color: #ffeedd;
  font-family: "VT323", monospace;
  image-rendering: pixelated;
  transform: scale(0.88);
  transform-origin: top left;
}

.winamp-window:active { cursor: grabbing; }

.winamp-main { z-index: 30; }
.winamp-playlist { z-index: 20; }
.winamp-eq { z-index: 10; }

/* -------------------------------------------------------
   🎚️ MAIN WINDOW
-------------------------------------------------------- */
.winamp-main-title {
  font-size: 0.9rem;
  color: #ffddaa;
  text-shadow: 0 0 4px #ff3c00;
  margin-bottom: 6px;
}

.winamp-main-track-title {
  font-size: 0.85rem;
  color: #ffeedd;
  text-shadow: 0 0 3px #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.winamp-main-time-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
}

.winamp-time {
  font-size: 0.9rem;
  color: #00ff88;
  text-shadow: 0 0 4px #00ff88;
}

.winamp-time-sep { color: #ff8844; }

/* -------------------------------------------------------
   📊 VISUALISEUR (barres / oscilloscope)
-------------------------------------------------------- */
.winamp-visualizer {
  display: block;
  width: 100%;
  height: 40px;
  background: #0a0202;
  border: 2px solid #000;
  border-radius: 4px;
  margin-bottom: 10px;
  cursor: pointer;
  image-rendering: pixelated;
}

/* -------------------------------------------------------
   📶 VU METER
-------------------------------------------------------- */
.vu-meter {
  width: 100%;
  height: 10px;
  background: #111;
  border: 2px solid #000;
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
}

.vu-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff3300, #ffaa00);
}

/* -------------------------------------------------------
   📍 SEEK BAR
-------------------------------------------------------- */
.winamp-progress {
  width: 100%;
  height: 10px;
  background: #1a0505;
  border: 2px solid #ff3c00;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 10px;
}

.winamp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff3c00, #ffaa33);
  border-radius: 2px;
}

/* -------------------------------------------------------
   🎚️ VOLUME
-------------------------------------------------------- */
.volume-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.volume-label {
  font-size: 0.75rem;
  color: #ffaa66;
}

.volume-slider {
  flex: 1;
}

/* -------------------------------------------------------
   ▶️ BOUTONS
-------------------------------------------------------- */
.winamp-main-buttons {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}

.btn-winamp {
  background: #220000;
  border: 2px solid #000;
  padding: 4px 8px;
  border-radius: 4px;
  color: #ff8844;
  font-size: 0.9rem;
  cursor: pointer;
  text-shadow: 0 0 2px #000;
  font-family: "VT323", monospace;
  animation: none;
}

.btn-winamp:hover {
  background: #ff8844;
  color: #000;
}

.btn-winamp-main { min-width: 70px; font-weight: bold; }
.btn-winamp-small { min-width: 40px; }

/* -------------------------------------------------------
   🔁 SHUFFLE / REPEAT
-------------------------------------------------------- */
.winamp-main-modes {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.btn-mode {
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 3px;
}

.btn-mode-active {
  background: #ff3c00;
  color: #000;
  box-shadow: 0 0 6px rgba(255,60,0,0.8), 0 0 10px rgba(255,120,0,0.6);
}

.winamp-open-buttons {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

.winamp-main-layout-buttons {
  display: flex;
  gap: 4px;
}

.btn-layout {
  background: #220000;
  border: 1px solid #000;
  color: #ffaa66;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 3px;
  cursor: pointer;
  font-family: "VT323", monospace;
  animation: none;
}

.btn-close {
  margin-left: auto;
}

/* -------------------------------------------------------
   🪟 BARRE DE TITRE
-------------------------------------------------------- */
.winamp-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  cursor: grab;
}

/* -------------------------------------------------------
   📜 PLAYLIST
-------------------------------------------------------- */
.winamp-playlist { height: 260px; }

.playlist-title {
  font-size: 0.9rem;
  color: #ffaa66;
  margin-bottom: 8px;
}

.playlist-list {
  list-style: none;
  padding: 0;
  margin: 0;
  height: 180px;
  overflow-y: auto;
}

.playlist-item {
  padding: 6px;
  margin-bottom: 4px;
  background: #220000;
  border: 2px solid #000;
  border-radius: 4px;
  cursor: pointer;
}

.playlist-item:hover {
  background: #ff8844;
  color: #000;
}

.active-track {
  background: #ffaa66;
  color: #000;
  font-weight: bold;
}

/* -------------------------------------------------------
   🎚️ EQ
-------------------------------------------------------- */
.winamp-eq {
  height: 200px;
  width: 260px;
}

.eq-title {
  font-size: 0.9rem;
  color: #66d0ff;
  margin-bottom: 8px;
}

.eq-buttons {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.eq-sliders {
  display: flex;
  justify-content: space-between;
  transform: scale(0.85);
  transform-origin: top center;
}

.eq-slider-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eq-slider-pixel {
  writing-mode: bt-lr;
  -webkit-appearance: slider-vertical;
  width: 8px;
  height: 110px;
  background: #222;
  border: 2px solid #000;
  border-radius: 3px;
}

.eq-freq {
  margin-top: 4px;
  font-size: 0.7rem;
  color: #ffaa66;
}

/* -------------------------------------------------------
   📱 MOBILE (≤ 768px)
-------------------------------------------------------- */
@media (max-width: 768px) {
  .winamp-afm-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    height: auto;
    padding-bottom: 200px;
    overflow-y: auto;
  }

  .winamp-window {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    width: 90% !important;
    max-width: 320px;
    margin: 0 auto;
  }

  .winamp-playlist {
    max-height: 200px !important;
    overflow-y: auto !important;
  }

  .video-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .video-wrapper iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
  }
}

/* -------------------------------------------------------
   📱 MOBILE ULTRA‑COMPACT (≤ 480px)
-------------------------------------------------------- */
@media (max-width: 480px) {
  .winamp-window {
    transform: scale(0.75) !important;
    transform-origin: top center !important;
    padding: 4px !important;
    margin-bottom: 10px !important;
  }

  .winamp-main-title { font-size: 0.75rem !important; }
  .winamp-main-track-title { font-size: 0.7rem !important; }
  .winamp-time { font-size: 0.75rem !important; }

  .btn-winamp {
    padding: 3px 6px !important;
    font-size: 0.75rem !important;
  }

  .btn-winamp-main { min-width: 55px !important; }
  .btn-winamp-small { min-width: 32px !important; }

  .playlist-item {
    padding: 4px !important;
    font-size: 0.75rem !important;
  }

  .eq-sliders {
    transform: scale(0.7) !important;
  }

  .eq-title { font-size: 0.75rem !important; }
  .eq-freq { font-size: 0.6rem !important; }

  .video-wrapper {
    margin-top: 10px !important;
    max-width: 360px !important;
  }

  /* Winamp masqué par défaut, mini-dock affiché */
  .winamp-window {
    display: none !important;
  }

  .winamp-mini-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0a0202;
    border-top: 2px solid #ff3c00;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "VT323", monospace;
    color: #ffeedd;
    z-index: 9999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.6);
  }

  .mini-track-title {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
  }

  .mini-controls {
    display: flex;
    gap: 12px;
  }

  .mini-btn {
    background: #220000;
    border: 2px solid #000;
    padding: 6px 10px;
    border-radius: 4px;
    color: #ff8844;
    font-size: 1rem;
    cursor: pointer;
    font-family: "VT323", monospace;
    animation: none;
  }

  .mini-btn:hover {
    background: #ff8844;
    color: #000;
  }

  .winamp-expanded .winamp-window {
    display: block !important;
    position: relative !important;
    transform: scale(0.75) !important;
    margin: 10px auto;
  }

  .winamp-expanded .winamp-mini-dock {
    display: none;
  }
}
