/* ===== CONTRÔLES VIDÉO AMÉLIORÉS - JOHNNY TV ===== */

/* Container vidéo */
.custom-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

/* Iframe vidéo */
.video-iframe-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== CONTRÔLES PERSONNALISÉS - AU-DESSUS DE LA VIDÉO ===== */
.video-custom-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 60%, transparent 100%);
  padding: 30px 20px 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 100;
  pointer-events: none;
}

.video-custom-controls.visible {
  opacity: 1;
  transform: translateY(0);
}

.video-custom-controls.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* ===== BARRE DE PROGRESSION ===== */
.video-progress-container {
  margin-bottom: 16px;
  pointer-events: auto;
}

.video-progress-time {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: white;
  margin-bottom: 8px;
  font-weight: 600;
}

.video-progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.video-progress-bar:hover {
  height: 7px;
}

.video-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* ===== BOUTONS DE CONTRÔLE ===== */
.video-controls-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.video-controls-left,
.video-controls-right {
  display: flex;
  gap: 12px;
  align-items: center;
  pointer-events: auto;
}

.video-control-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

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

.video-control-btn:active {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0.95);
}

/* Bouton Play/Pause principal */
.video-control-btn.play-btn {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  width: 52px;
  height: 52px;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.video-control-btn.play-btn:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
}

/* Icônes SVG */
.video-control-btn svg {
  width: 22px;
  height: 22px;
}

.video-control-btn.play-btn svg {
  width: 26px;
  height: 26px;
  fill: #000;
}

/* Tooltip au survol */
.video-control-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.video-control-btn:hover::after {
  opacity: 1;
}

/* ===== BOUTONS SPÉCIFIQUES ===== */

/* Bouton Retour au début */
.video-control-btn.restart-btn svg {
  stroke: white;
  stroke-width: 2.5;
  fill: none;
}

/* Bouton Reculer 10s */
.video-control-btn.skip-back-btn {
  position: relative;
}

.video-control-btn.skip-back-btn svg {
  stroke: white;
  stroke-width: 2.5;
  fill: none;
}

.skip-back-text {
  position: absolute;
  font-size: 10px;
  font-weight: 900;
  color: white;
  pointer-events: none;
}

/* ===== BADGE EN DIRECT ===== */
.video-live-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 90;
  background: rgba(239, 68, 68, 0.95);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  animation: fadeInLeft 0.5s ease;
  pointer-events: none;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.video-live-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.3);
  }
}

/* ===== COUCHE INTERACTIVE POUR DÉTECTER LA SOURIS ===== */
.video-interaction-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  cursor: default;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .video-custom-controls {
    padding: 20px 12px 12px;
  }

  .video-control-btn {
    width: 40px;
    height: 40px;
  }

  .video-control-btn.play-btn {
    width: 48px;
    height: 48px;
  }

  .video-control-btn svg {
    width: 20px;
    height: 20px;
  }

  .video-control-btn.play-btn svg {
    width: 24px;
    height: 24px;
  }

  .video-controls-left,
  .video-controls-right {
    gap: 8px;
  }

  .video-progress-time {
    font-size: 11px;
  }

  /* Masquer les tooltips sur mobile */
  .video-control-btn::after {
    display: none;
  }

  .video-live-badge {
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 11px;
  }

  .video-live-dot {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 480px) {
  .video-control-btn {
    width: 36px;
    height: 36px;
  }

  .video-control-btn.play-btn {
    width: 44px;
    height: 44px;
  }

  .video-control-btn svg {
    width: 18px;
    height: 18px;
  }

  .video-control-btn.play-btn svg {
    width: 22px;
    height: 22px;
  }

  .skip-back-text {
    font-size: 8px;
  }

  .video-controls-buttons {
    gap: 8px;
  }

  .video-controls-left,
  .video-controls-right {
    gap: 6px;
  }
}

/* ===== PLEIN ÉCRAN ===== */
.custom-video-container:fullscreen,
.custom-video-container:-webkit-full-screen,
.custom-video-container:-moz-full-screen {
  width: 100vw;
  height: 100vh;
}

.custom-video-container:fullscreen .video-custom-controls,
.custom-video-container:-webkit-full-screen .video-custom-controls,
.custom-video-container:-moz-full-screen .video-custom-controls {
  padding: 40px 30px 30px;
}
