/* ---------------------------------------------------------------------------
   player.css — Styles ONDE pour le lecteur vidéo / audio de MyLector
   --------------------------------------------------------------------------- */

.ml-player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  background: linear-gradient(180deg, rgba(8,9,15,0.88) 0%, transparent 30%, transparent 70%, rgba(8,9,15,0.95) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 6;
}

.ml-video-wrapper:hover .ml-player-overlay,
.ml-player-overlay.user-active {
  opacity: 1;
  pointer-events: auto;
}

.ml-player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ml-current-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ml-now-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ml-badge-live {
  background: var(--warn);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 10px rgba(242, 100, 90, 0.5);
  flex-shrink: 0;
}

.ml-badge-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.4s infinite;
}

@keyframes blink {
  50% { opacity: 0.3; }
}

.ml-player-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ml-seek {
  margin-top: 4px;
}

.ml-seekbar {
  position: relative;
  height: 5px;
  border-radius: 4px;
  background: var(--panel3);
  cursor: pointer;
}

.ml-seekbar .buf {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 60%;
  background: var(--line2);
  border-radius: 4px;
}

.ml-seekbar .prog {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--signal), #ffce7a);
  border-radius: 4px;
}

.ml-seekbar .knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: transform 0.1s;
}

.ml-seekbar:hover .knob {
  transform: translate(-50%, -50%) scale(1.25);
}

.ml-times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  margin-top: 4px;
}

.ml-transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ml-controls-left,
.ml-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ml-icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
  flex-shrink: 0;
}

.ml-icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.ml-play-btn-amber {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--signal);
  color: #140c00;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px -8px rgba(246, 166, 37, 0.6);
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.ml-play-btn-amber:hover {
  transform: scale(1.06);
}

.ml-volume-slider {
  width: 70px;
  accent-color: var(--signal);
  cursor: pointer;
}

/* Mobile Small Screen Player Adjustments */
@media (max-width: 640px) {
  .ml-player-overlay {
    padding: 10px;
  }

  .ml-now-title {
    font-size: 13px;
  }

  .ml-volume-slider {
    display: none; /* Hide volume slider on mobile; gesture zone or device buttons used */
  }

  .ml-play-btn-amber {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }

  .ml-icon-btn {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
}
