/* Styles spécifiques pour la page programme - utilise les variables de mobile.css */

/* Override du grid pour la page programme */
body > main.grid {
  padding: 10px var(--pad) calc(env(safe-area-inset-bottom) + 90px);
}

/* Section titre */
.section-title {
  margin: 8px var(--pad) 10px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  grid-column: 1/-1;
}

/* Match card - style similaire aux cartes de chaînes */
.match-card {
  display: flex;
  gap: 12px;
  align-items: stretch;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  touch-action: manipulation;
  min-height: 86px;
}

.match-card:active {
  transform: scale(.99);
}

.match-card:hover {
  border-color: rgba(94, 234, 212, .35);
  box-shadow: 0 10px 26px rgba(94, 234, 212, .08);
}

/* Badge horaire */
.time-badge {
  width: 66px;
  min-width: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(34, 211, 238, .12), rgba(94, 234, 212, .06));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  flex: 0 0 auto;
}

.time-badge .time {
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-2);
}

.time-badge .tz {
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
}

/* Contenu principal de la carte */
.card-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
}

/* Équipes */
.teams {
  display: block;
  flex: 1;
  min-width: 0;
}

.teamsline {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.teamsline .t1,
.teamsline .t2 {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teamsline .score-inline {
  margin: 0 4px;
  font-weight: 800;
  background: rgba(94, 234, 212, .1);
  color: #bffcf4;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, .25);
  white-space: nowrap;
}

.teamsline .score-inline.final {
  background: rgba(136, 146, 160, .15);
  color: #cbd5e1;
  border-color: rgba(136, 146, 160, .3);
}

.dash {
  opacity: .6;
  color: var(--muted);
}

/* Affichage deux lignes pour mobile avec scores */
.teams-two-rows {
  display: none;
  margin-top: 1px;
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-row .name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.team-row .score-right {
  font-weight: 800;
  background: rgba(94, 234, 212, .1);
  color: #bffcf4;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, .25);
  min-width: 36px;
  text-align: center;
  white-space: nowrap;
}

.team-row .score-right.final {
  background: rgba(136, 146, 160, .15);
  color: #cbd5e1;
  border-color: rgba(136, 146, 160, .3);
}

.teams-two-rows .team-row + .team-row {
  margin-top: 8px;
}

/* Box live/status */
.live-box {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.minute {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-2);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4f;
  box-shadow: 0 0 0 0 rgba(255, 77, 79, .7);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 79, .6); }
  70% { box-shadow: 0 0 0 8px rgba(255, 77, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); }
}

.status-finished {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(136, 146, 160, .25);
  background: rgba(136, 146, 160, .08);
  color: #8892a0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Compétition */
.row-comp {
  margin-top: 6px;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
}

/* Meta chips (chaînes) */
.row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.meta-chip {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  white-space: nowrap;
}

hr.sep {
  height: 1px;
  border: 0;
  background: rgba(255, 255, 255, .08);
  margin: 8px 0 0;
}

/* Responsive - mobile */
@media (max-width: 560px) {
  .time-badge {
    width: 56px;
    min-width: 56px;
  }
  
  .time-badge .time {
    font-size: 17px;
  }
  
  /* Sur mobile, cacher la ligne avec score inline et afficher les deux lignes */
  .teamsline.haslive {
    display: none;
  }
  
  .teams-two-rows.show {
    display: block;
  }
  
  .match-card {
    min-height: auto;
  }
}

/* Accessibilité / Motion */
@media (prefers-reduced-motion: reduce) {
  .match-card {
    transition: none;
  }
  
  .live-dot {
    animation: none;
  }
}
