/* ================ STRUCTURE GLOBALE ================ */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
  }
  
  .main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* ================ EN-TÊTE ================ */
  .header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px;
    background: #fff; /* Ajout d'un fond si nécessaire */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
  
.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.hlflux-logo {
  height: 50px;
  margin-right: 15px;
}
  
  /* Bannière promotionnelle */
  .promo-banner {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 12px 20px;
    border-radius: 6px;
    color: #333;
}

.promo-message {
    font-weight: bold;
    white-space: nowrap;
}

  .promo-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
  
  #promo-message {
    font-weight: bold;
    flex: 1;
  }
  
  .promo-button {
    background: #0066cc;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}
  
.promo-button:hover {
    background: #0052a3;
}
  
.promo-countdown {
    font-size: 0.85em;
    color: #333;
    white-space: nowrap;
}

/* Responsive pour petits écrans */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .promo-banner {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
}
  
  /* ================ LECTEUR VIDÉO ================ */
  .player-section {
    width: 100%;
    margin-bottom: 15px;
  }
  
  .player-container {
    position: relative;
    margin-bottom: 20px;
}

  .video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
  }
  
  #mainPlayer {
    width: 100%;
    height: 100%;
  }
  
  /* Overlay de démarrage */
  .interaction-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
  }
  
  .play-button {
    background: #ff5722;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  .play-button:hover {
    background: #e64a19;
  }
  
  /* Badge et type de média */
   
  .badge-container {
    position: absolute;
    right: 0;
    bottom: -25px; /* Ajustez selon besoin */
}

.media-type-label {
  font-weight: bold;
  font-size: 1.1rem;
}

.badge-line {
  display: flex;
  justify-content: space-between; /* 🔧 éloigne les éléments aux extrémités */
  align-items: center;
  margin-top: 10px;
  padding: 0 12px; /* optionnel : ajoute un petit espace horizontal */
}
  
.category-badge {
  background: #222;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
}
  
  .category-badge.documentary { background: #4caf50; }
  .category-badge.reportage { background: #009688; }
  .category-badge.ad { background: #f44336; }
  .category-badge.jingle { background: #9c27b0; }
  
  /* ================ CONTROLES ================ */
  .main-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
  }
  
  .main-controls button {
    padding: 10px 20px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .secondary-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
  }
  
  .media-btn {
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .media-btn:hover {
    transform: translateY(-2px);
  }
  
/* ================ LOGO PLEIN ECRAN ================ */

/* Logo plein écran */
.fullscreen-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: 150px; /* Taille réduite */
  opacity: 0.3;
  display: none;
}

.fullscreen-logo.show {
  display: block;
}

/* Quand le lecteur est en plein écran */
:-webkit-full-screen .fullscreen-logo,
/* Quand en plein écran */
:fullscreen .fullscreen-logo {
  display: block;
}

/* ce sélecteur pour cacher le logo original */
:-webkit-full-screen .hlflux-logo,
:fullscreen .hlflux-logo {
    display: none;
}

  /* ================ PROGRAMME ================ */
  .program-info-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
  }
  
  .program-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .program-box h3 {
    color: #e74c3c;
    margin-top: 0;
  }
  
  .program-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
  }
  
  .program-content img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
  }
  
  .synopsis {
    font-style: italic;
    color: rgb(3, 0, 0);
    display: none;
  }
  
  .synopsis.visible {
    display: block;
  }

  #current-synopsis {
    font-weight: bold;
    color: rgb(40 154 214);
  }

  .synopsis:empty::after {
    content: "Aucune description disponible";
    color: #999;
    font-style: italic;
  }

  .program-box .synopsis {
    display: block;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 5px;
    font-size: 0.9em;
    line-height: 1.4;
  }

  .program-box .synopsis:empty {
    display: none;
  }

.program-box .synopsis:empty::before {
  content: "Aucun synopsis disponible";
  color: #999;
  font-style: italic;
}
  
  /* ================ PUBLICITÉ ================ */
  
  .ad-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #0000B3;
    padding: 16px 20px;
    margin-top: 20px;
    border-radius: 8px;
    width: 100%;
    flex-wrap: wrap;
  }

  .ad-left {
    flex: 1;
    max-width: 45%;
  }

  .ad-content {
    display: flex;
    align-items: center;
  }

  .ad-image {
    max-height: 80px;
    width: auto;
    border-radius: 4px;
    transition: opacity 0.6s ease-in-out;
  }

.ad-content img {
  max-height: 60px;
  margin-right: 15px;
}

.ad-content p {
  margin: 0;
  font-size: 0.9rem;
}

  .ad-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
  }
  
  .ad-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 50%;
  }

  .ad-messages-container {
    flex: 1;
    height: 40px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    border-radius: 4px;
  }
  
  .ad-messages {
    background-color: rgb(255, 243, 205); /* Fond jaune pour texte */
    color: black;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: bold;
    min-width: 200px;
    text-align: right;
  }
  
  .side-message {
    background-color: rgb(255, 255, 219);
    color: black;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.95rem;
    min-height: 20px;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
  }

  .ad-content {
    position: absolute;
    width: 100%;
    text-align: center;
    padding: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    transform: translateY(-100%);
    transition: transform 0.5s ease;
    font-weight: bold;
  }

  .ad-message.visible {
    top: 0;
  }
  
  .ad-space {
    width: 200px;
    margin-left: 20px;
    text-align: center;
  }
  
  .ad-space img {
    max-height: 40px;
    width: auto;
  }
  
  /* ================ CALENDRIER ================ */
  #calendar-container {
    margin-top: 30px;
    width: 100%;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    clear: both; /* Empêche tout chevauchement */
}

/* [CORRECTION] Style pour le conteneur vidéo-info caché */
.video-info {
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Garantir que le calendrier a toujours sa place */
@media (max-width: 768px) {
    #calendar-container {
        margin-top: 20px;
        padding: 15px;
    }
}
  
  /* ================ MODALS ================ */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
  }
  
  .modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
  }
  
  .close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
  }
  
  /* ================ RESPONSIVE ================ */
  @media (max-width: 768px) {
    .header-container {
      flex-direction: column;
      gap: 15px;
    }
    
    .program-info-line {
      grid-template-columns: 1fr;
    }
    
    .ad-line {
      flex-direction: column;
      gap: 15px;
    }
    
    .ad-space {
      margin-left: 0;
      width: 100%;
    }
    
    .program-content {
      flex-direction: column;
    }
    
    .program-content img {
      width: 100%;
      height: auto;
    }
  }
  
  @media (max-width: 600px) {
    .promo-banner {
      padding: 10px 15px;
    }
    
    .promo-content {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }
    
    .promo-button {
      width: 100%;
    }
    
    .promo-countdown {
      text-align: left;
    }
    
    .main-controls, .secondary-controls {
      flex-wrap: wrap;
    }
    
    .main-controls button, .media-btn {
      flex: 1 0 100%;
    }
  }

  #startPlayback {
    background: #ff5722;
    border: none;
    padding: 12px 24px;
    font-size: 1.2em;
    cursor: pointer;
}

#mainPlayer {
  transition: opacity 0.5s ease-in-out;
}
.fade-out {
  opacity: 0;
}
.fade-in {
  opacity: 1;
}

/* Éditeur de synopsis */
.synopsis-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.synopsis-content {
  background: rgba(0, 0, 0, 0.74);
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.synopsis-form {
  margin-top: 20px;
}

.char-count {
  text-align: right;
  font-size: 0.8em;
  color: #666;
}

.editor-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 100;
}

.editor-btn:hover {
  background: #3e8e41;
}

.close-synopsis {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}
/* Style pour le calendrier */
#tv-calendar {
  max-width: 1100px;
  margin: 20px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Indicateur de chargement */
.fc-loading {
  opacity: 0.6;
  position: relative;
}

.fc-loading::after {
  content: "Chargement...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #333;
  font-weight: bold;
}

/* ========== STRUCTURE & GLOBAL ========== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.main-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 30px;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 30px;
}

.hlflux-logo {
  height: 70px;
  width: auto;
  flex-shrink: 0;
}

/* ========== ALERTES & ERREURS ========== */
.calendar-error,
.calendar-alert {
  padding: 12px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #c62828;
}

.calendar-alert {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 300px;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
  color: white;
}

.calendar-alert-error {
  background-color: #e74c3c;
}

.calendar-alert-success {
  background-color: #2ecc71;
}

.calendar-error button {
  margin-left: auto;
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
}

/* ========== SPINNERS & CHARGEMENTS ========== */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fc-loading {
  opacity: 0.6;
  position: relative;
}
.fc-loading::after {
  content: "Chargement...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #333;
  font-weight: bold;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
}

.calendar-loading {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.calendar-loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* ========== BADGES / ÉTIQUETTES ========== */
.media-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  margin-left: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  bottom: -37px;
  transition: all 0.3s ease;
}

.media-badge.ad { background-color: #ff5252; color: white; }
.media-badge.documentaires { background-color: #2196f3; color: white; }
.media-badge.promos { background-color: #ff9800; color: white; }
.media-badge.emissions { background-color: #9c27b0; color: white; }

.media-badge.jingle {
  background-color: #4caf50;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 5px rgba(76, 175, 80, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

@media (max-width: 600px) {
  .media-badge {
    font-size: 10px;
    padding: 3px 8px;
  }
}

/* ========== GALERIES ========== */
.media-gallery,
#live-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
  background-color: #fafafa;
  min-height: 200px;
}

.video-thumbnail {
  width: 240px;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #ccc;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.video-thumbnail img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
  max-height: 160px;
  margin-bottom: 8px;
  cursor: pointer;
}

.retour-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.content-gallery .retour-btn {
  position: relative;
  margin-top: 20px;
}

/* ========== VIDÉO PLAYER ========== */
video {
  max-width: 100%;
  border-radius: 8px;
}

video.transition {
  transition: opacity 0.4s ease;
}

/* ========== BOUTONS ========== */
.media-btn {
  width: 180px;
}



/* ========== PANNEAU LATÉRAL ========== */
.side-buttons {
  display: flex;
  flex-direction: row;
  gap: 12px;
  transition: all 0.4s ease;
}

.side-buttons.vertical {
  flex-direction: column;
  align-items: flex-start;
}

#cinema-theatre-gallery {
  min-height: 200px;
}

.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 20px;
  background: #fafafa;
  min-height: 200px;
}

.video-thumbnail {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.video-thumbnail img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.video-thumbnail h4 {
  font-size: 1rem;
  margin: 0.5rem 0;
}

.genre-label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.video-thumbnail button {
  display: block;
  width: 100%;
  margin: 5px 0;
  padding: 8px;
  font-size: 0.9rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.watch-cinema {
  background-color: #222;
  color: #fff;
}

.fav-btn {
  background-color: #f0f0f0;
  color: #333;
}

/* 📌 [REPÉRAGE] Style du bouton de retour */
#exit-zone {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}

.exit-btn {
  background-color: #0078D7;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}
.exit-btn:hover {
  background-color: #005fa3;
}

#form-mobile-hlflux input {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#form-mobile-hlflux button {
  background-color: #222;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
}

#form-mobile-hlflux button:hover {
  background-color: #444;
}

.ad-container {
  background-color: #0000B3;
  color: white;
  padding: 12px 20px;
  margin-top: 20px;
  border-radius: 6px;
  display: flex;
  justify-content: center;
}

.ad-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ad-image {
  max-height: 80px;
  width: auto;
  border-radius: 4px;
  margin-bottom: 6px;
  transition: opacity 0.6s ease-in-out;
}

.ad-pitch {
  font-size: 0.9rem;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  text-align: right;
  transition: opacity 0.6s ease-in-out;
}

.ad-text {
  background-color: yellow;
  color: black;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: bold;
  max-width: 60%;
  transition: opacity 0.6s ease-in-out;
}

#sideMessageBox {
  background-color: yellow;
  color: black;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.95rem;
  min-width: 220px;
  display: inline-block;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

#cinema-theatre-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.video-thumbnail {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.video-thumbnail img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.video-thumbnail h4 {
  margin: 10px;
  font-size: 1rem;
}

.video-thumbnail p {
  margin: 5px 10px;
  font-size: 0.9rem;
  color: #666;
}

.media-type {
  background: #333;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  font-size: 0.8rem;
  margin: 5px 10px;
}

.watch-theatre {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 8px;
  margin: 10px;
  width: calc(100% - 20px);
  border-radius: 4px;
  cursor: pointer;
}

.cinema-theatre-zone {
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-top: 20px;
}

.video-thumbnail:hover {
  transform: translateY(-5px);
}

.thumbnail-content {
  padding: 15px;
}

.media-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin: 5px 0;
  color: white;
}

.media-badge.theatre { background: #9b59b6; }
.media-badge.sketch { background: #3498db; }
.media-badge.cinema { background: #e74c3c; }

.watch-btn, .fav-btn {
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.watch-btn {
  background: #2ecc71;
  color: white;
}

.fav-btn {
  background: #f1c40f;
  color: #333;
}

.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.debug-info {
  display: none;
}

#abonnement-zone {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  padding: 20px;
  z-index: 9999;
  overflow-y: auto;
  max-height: 90vh;
}

.abonnement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.abonnement-card {
  background-color: #f9f9f9;
  border-radius: 6px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.subscribe-btn {
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #0078D7;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.subscribe-btn:hover {
  background-color: #005fa3;
}

.souscrire-btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 8px 15px;
  margin-top: 10px;
  border-radius: 5px;
  cursor: pointer;
}

.close-x {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-weight: bold;
}

#exit-zone {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}
#abonnement-options {
  margin-top: 20px;
}

.mobile-payment-container {
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
}

.operator-btn {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.operator-btn.active {
  border-color: #4CAF50;
  background: #e8f5e9;
}

#mobile-payment-form input:invalid {
  border-color: #ffcdd2;
}
.fullscreen-logo {
  transition: opacity 0.3s ease;
  opacity: 0.9;
}

#flux-overlay-logo {
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

/* ========== TRANSITIONS FLUIDES UNIFIÉES ========== */

/* Apparitions/disparitions douces */
.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Pour les synopsis dynamiques */
.synopsis {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.synopsis.visible {
  opacity: 1;
  transform: translateY(0);
}

.synopsis.hidden {
  opacity: 0;
  transform: translateY(10px);
}

/* Pour les badges */
.media-badge {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.media-badge.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.media-badge.fade-in {
  opacity: 1;
  transform: scale(1);
}

/* Pour les galeries */
.video-thumbnail {
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.video-thumbnail:hover {
  transform: scale(1.02);
  opacity: 0.95;
}

/* Pour les modals */
.modal,
.synopsis-modal {
  transition: opacity 0.4s ease-in-out;
}

.modal-content,
.synopsis-content {
  transition: transform 0.4s ease-in-out;
}

.modal.show,
.synopsis-modal.show {
  opacity: 1;
}

.modal-content.show,
.synopsis-content.show {
  transform: scale(1);
}

.modal.hide,
.synopsis-modal.hide {
  opacity: 0;
}

.modal-content.hide,
.synopsis-content.hide {
  transform: scale(0.95);
}

/* 🎬 Cinéma */
.video-thumbnail.cinema {
  border-left: 6px solid #e74c3c;
  background: #fff5f5;
}

/* 🎭 Théâtre classique */
.video-thumbnail.theatres {
  border-left: 6px solid #9b59b6;
  background: #f5f0ff;
}

/* 🪕 Théâtre de chez nous / Sketchs */
.video-thumbnail.theatres_de_chez_nous {
  border-left: 6px solid #3498db;
  background: #f0f8ff;
}

.media-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: white;
}

.media-badge.cinema { background: #e74c3c; }
.media-badge.theatres { background: #9b59b6; }
.media-badge.theatres_de_chez_nous { background: #3498db; }

.media-badge.concerts {
  background: #ff9800;
  color: white;
}

.media-badge.performances {
  background: #3f51b5;
  color: white;
}

.access-badge {
  display: inline-block;
  background: #2ecc71;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-bottom: 6px;
}

/* Styles pour les abonnements Mobile Money */
.abonnement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.abonnement-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.abonnement-card.featured {
  border-color: #ff6b00;
  background: #fffaf0;
}

.abonnement-card h4 {
  color: #333;
  margin-bottom: 10px;
}

.abonnement-card .duration {
  color: #666;
  font-size: 0.9em;
}

.abonnement-card .price {
  font-size: 1.5em;
  font-weight: bold;
  color: #ff6b00;
  margin: 15px 0;
}

.subscribe-btn {
  background: #ff6b00;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
}

.subscribe-btn:hover {
  background: #e55a00;
}

/* Formulaire Mobile Money */
#abonnement-mobile-zone {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  border: 1px solid #ddd;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
}

.btn-pay-mobile {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1em;
  width: 100%;
}

.btn-pay-mobile:hover {
  background: #218838;
}

/* Cartes d'achat */
.purchase-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  background: #f9f9f9;
}

.purchase-card h4 {
  color: #333;
  margin-bottom: 10px;
}

.purchase-card p {
  margin: 5px 0;
  color: #666;
}

@media (max-width: 768px) {
  .side-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    padding: 0 10px;
  }

  .side-buttons button,
  .currency-selector select {
    width: 100%;
    font-size: 1rem;
  }

  .media-btn {
    width: 100%;
  }

  .promo-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .promo-button,
  #btn-abonnement,
  #btn-achats,
  #btn-recus {
    width: 100%;
  }

  .main-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .main-controls button {
    width: 100%;
  }

  .program-info-line {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 10px;
  }

  .program-box {
    width: 100%;
  }
}

.ad-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  padding: 20px;
  background-color: #0000B3;
  color: white;
  border-radius: 6px;
  flex-wrap: wrap;
}

.ad-left {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 200px;
}

#sideMessageBox {
  font-size: 1rem;
  font-weight: bold;
  background-color: yellow;
  color: black;
  padding: 10px 15px;
  border-radius: 6px;
  max-width: 100%;
  word-break: break-word;
}

.ad-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 2;
  gap: 15px;
  min-width: 280px;
}

.ad-image {
  max-height: 80px;
  width: auto;
  border-radius: 4px;
  transition: opacity 0.6s ease-in-out;
}

#adPitchBox {
  font-size: 0.9rem;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 10px 15px;
  border-radius: 6px;
  text-align: right;
  white-space: normal;
  max-width: 100%;
}
@media (max-width: 768px) {
  .ad-container {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .ad-right {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .ad-image {
    align-self: center;
  }

  #adPitchBox {
    text-align: left;
    width: 100%;
  }

  #sideMessageBox {
    width: 100%;
    text-align: center;
  }
}

.calendar-details {
  margin-top: 5px;
  font-size: 0.85rem;
  color: #333;
}

.calendar-link {
  display: inline-block;
  margin-top: 4px;
  background: #0078D7;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
}

.calendar-link:hover {
  background: #005fa3;
}
