/* ============================================
   PROGRAMME.CSS – Vue programme
   Barre de jours, filtres, progression, live,
   cartes spectacles et badges.
   ============================================ */

/* --- Barre de jours --- */
#barre-jours {
  display: flex;
  gap: 6px;
  padding: 10px 14px 10px;
  margin-top: 10px;
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#barre-jours::-webkit-scrollbar { display: none; }

.btn-jour {
  background: var(--surface);
  border: none;
  border-radius: var(--rayon-pill);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--texte-sec);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}
.btn-jour.actif {
  background: var(--vert);
  color: var(--vert-texte);
  font-weight: 600;
}

/* --- Barre de filtres --- */
#barre-filtres {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px 12px;
  flex-shrink: 0;
  gap: 6px;
}
#compteur {
  font-size: 12px;
  color: var(--texte-sec);
  white-space: nowrap;
}
#filtres-genre {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
#filtres-genre::-webkit-scrollbar { display: none; }

/* Bouton "Filtres" */
#btn-filtres-avances {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--fond);
  border: none;
  border-radius: var(--rayon-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--texte-sec);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: var(--ombre-sm);
  transition: all 0.15s;
}
#btn-filtres-avances.actif {
  background: var(--vert);
  color: var(--vert-texte);
  box-shadow: var(--ombre);
}
#badge-filtres {
  display: none;
  background: var(--vert);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  min-width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* --- Barre de progression de la journée --- */
#barre-progression {
  padding: 6px 14px 4px;
  flex-shrink: 0;
}
#progression-texte {
  display: block;
  font-size: 11px;
  color: var(--texte-sec);
  margin-bottom: 5px;
}
#progression-bar {
  height: 3px;
  background: var(--bordure);
  border-radius: 2px;
  overflow: hidden;
}
#progression-fill {
  height: 100%;
  background: var(--vert);
  border-radius: 2px;
  transition: width 0.6s ease;
  width: 0%;
}

/* --- Filtres genre --- */
.btn-filtre {
  background: transparent;
  border: 0.5px solid var(--bordure);
  border-radius: var(--rayon-pill);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--texte-sec);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
}
.btn-filtre.actif {
  background: var(--vert-clair);
  border-color: var(--vert);
  color: var(--vert);
}

/* --- Liste des spectacles --- */
#liste-spectacles {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px 72px;
  -webkit-overflow-scrolling: touch;
}

/* --- Section Live --- */
#section-live {
  margin: 0 10px 20px;
  padding: 14px 14px 16px;
  background: var(--vert);
  border-radius: var(--rayon);
}
.titre-section-live {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--vert-texte);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

/* Pastille rouge clignotante */
.pastille-direct {
  width: 8px;
  height: 8px;
  background: #ff3b30;
  border-radius: 50%;
  animation: pulse-rouge 1.5s infinite;
}
@keyframes pulse-rouge {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.4; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* Défilement horizontal des cartes live */
.flux-horizontal {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 2px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.flux-horizontal::-webkit-scrollbar { display: none; }
.flux-horizontal .carte-spectacle {
  min-width: 240px;
  scroll-snap-align: start;
  margin-bottom: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.12);
}
.flux-horizontal .carte-spectacle .carte-heure-val { color: var(--vert-texte); opacity: 0.9; }
.flux-horizontal .carte-spectacle .carte-duree     { color: rgba(255,255,255,0.5); }
.flux-horizontal .carte-spectacle .carte-titre      { color: var(--vert-texte); }
.flux-horizontal .carte-spectacle .carte-compagnie  { color: rgba(255,255,255,0.6); }
.flux-horizontal .carte-spectacle .carte-lieu       { color: rgba(255,255,255,0.6); }
.flux-horizontal .carte-spectacle .btn-favori       { color: rgba(255,255,255,0.4); }
.flux-horizontal .carte-spectacle .btn-favori.actif { color: #ff9999; }
.flux-horizontal .carte-spectacle .badge-age        { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.6); }

/* --- Carte spectacle --- */
.carte-spectacle {
  background: var(--surface);
  border: none;
  border-radius: var(--rayon);
  padding: 13px 14px;
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--ombre);
  transition: box-shadow 0.15s, transform 0.1s;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.carte-spectacle:hover, .carte-spectacle:focus-within {
  box-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 8px 24px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}
.carte-spectacle:active { transform: scale(0.98); box-shadow: var(--ombre-sm); }
.carte-spectacle.est-favori  { border-left: 3px solid var(--vert); padding-left: 11px; }
.carte-spectacle.est-passe   { opacity: 0.38; filter: grayscale(40%); box-shadow: none; }
.carte-spectacle.est-encours { box-shadow: 0 0 0 1.5px var(--vert), var(--ombre); }
.carte-spectacle.est-annule  { opacity: 0.5; filter: grayscale(60%); }
.carte-spectacle.est-annule .carte-titre { text-decoration: line-through; }

.badge-annule {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #dc2626;
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

/* Point vert pulsant sous la durée, dans la colonne heure */
.pastille-encours {
  width: 8px;
  height: 8px;
  background: var(--vert);
  border-radius: 50%;
  margin: 5px auto 0;
  animation: pulse-vert 1.5s infinite;
}
@keyframes pulse-vert {
  0%   { opacity: 1; transform: scale(1);   box-shadow: 0 0 0 0   rgba(26,26,26,0.4); }
  70%  { opacity: 1; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(26,26,26,0); }
  100% { opacity: 1; transform: scale(1);   box-shadow: 0 0 0 0   rgba(26,26,26,0); }
}

.carte-heure {
  min-width: 44px;
  flex-shrink: 0;
  text-align: center;
  padding-top: 1px;
}
.carte-heure-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: block;
  line-height: 1.2;
}
.carte-duree {
  font-size: 12px;
  color: var(--texte-ter);
  display: block;
  margin-top: 2px;
}

.carte-corps { flex: 1; min-width: 0; }

.carte-titre-ligne {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 2px;
}
.carte-titre {
  font-size: 13px;
  font-weight: 600;
  color: var(--texte);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.btn-favori {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px;
  flex-shrink: 0;
  color: var(--texte-ter);
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.btn-favori:hover  { color: #D85A30; }
.btn-favori:active { transform: scale(0.82); }
.btn-favori.actif  { color: #D85A30; }
.btn-favori.actif:active { transform: scale(1.28); }

.carte-compagnie {
  font-size: 12px;
  color: var(--texte-sec);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
  line-height: 1.35;
}
.carte-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* --- Badges --- */
.badge-genre {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--rayon-pill);
  flex-shrink: 0;
  text-transform: capitalize;
}
.carte-lieu {
  font-size: 12px;
  color: var(--texte-sec);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.badge-age {
  font-size: 11px;
  color: var(--texte-ter);
  background: var(--fond);
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}
.badge-type {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.badge-type.IN      { background: var(--vert-clair); color: var(--vert); }
.badge-type.OFF     { background: #FAEEDA; color: #854F0B; }
.badge-type.Concert { background: #EEEDFE; color: #534AB7; }

/* --- Transitions de jour --- */
@keyframes entree-droite {
  from { opacity: 0.5; transform: translateX(28px); }
  to   { opacity: 1;   transform: translateX(0); }
}
@keyframes entree-gauche {
  from { opacity: 0.5; transform: translateX(-28px); }
  to   { opacity: 1;   transform: translateX(0); }
}
#liste-spectacles.entree-droite { animation: entree-droite 0.22s ease-out; }
#liste-spectacles.entree-gauche { animation: entree-gauche 0.22s ease-out; }

/* --- Message vide (aucun résultat) --- */
.message-vide {
  text-align: center;
  padding: 60px 20px;
  color: var(--texte-sec);
}
.message-vide svg  { margin-bottom: 12px; opacity: 0.4; }
.message-vide p    { font-size: 14px; }
.message-vide span { font-size: 12px; display: block; margin-top: 6px; }
