/* ============================================================
   ESJC Live Video Popup
   ============================================================ */

/* Overlay plein écran */
.esjc-live-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: esjcLiveFadeIn 0.25s ease;
}

.esjc-live-overlay[hidden] {
  display: none;
}

@keyframes esjcLiveFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Carte popup */
.esjc-live-popup {
  background: #0f172a;
  border-radius: 1rem;
  width: min(92vw, 860px);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(239, 68, 68, 0.3);
  animation: esjcLiveSlideUp 0.3s ease;
}

@keyframes esjcLiveSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Header */
.esjc-live-popup__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(90deg, #1e3a5f, #0f172a);
  border-bottom: 1px solid rgba(239, 68, 68, 0.25);
}

.esjc-live-popup__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.04em;
  flex: 1;
  margin: 0;
}

/* Point rouge animé */
.esjc-live-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  min-width: 0.55rem;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: esjcLivePulse 1.6s infinite;
}

@keyframes esjcLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70%  { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Bouton fermer */
.esjc-live-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.esjc-live-close:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* Zone vidéo 16:9 */
.esjc-live-popup__video {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}

.esjc-live-popup__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   Bouton flottant de réouverture
   ============================================================ */
.esjc-live-reopen {
  position: fixed;
  bottom: calc(5rem + env(safe-area-inset-bottom));
  right: 1.1rem;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem 0.45rem 0.65rem;
  background: #dc2626;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.55);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: esjcLiveFadeIn 0.3s ease;
}

/* Sur mobile le radio player peut passer sur 2 lignes → monter le badge */
@media (max-width: 640px) {
  .esjc-live-reopen {
    bottom: calc(9rem + env(safe-area-inset-bottom));
  }
}

.esjc-live-reopen[hidden] {
  display: none;
}

.esjc-live-reopen:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 24px rgba(220, 38, 38, 0.7);
}
