/* Le direct : tableau temps réel des courses du jour (statuts, arrivées, rapports). */

.direct-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.direct-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.02;
  margin: 6px 0 8px;
}
.direct-hero .eyebrow { color: var(--cyan); }
.direct-hero p { color: var(--muted); max-width: 46ch; }

.direct-live-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--panel-2);
}
.direct-live-badge strong { display: block; color: var(--red); letter-spacing: .12em; font-size: 13px; }
.direct-live-badge span { color: var(--muted); font-size: 12px; }
.live-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 124, 112, .7);
  animation: live-pulse 1.6s infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 124, 112, .6); }
  70% { box-shadow: 0 0 0 12px rgba(255, 124, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 124, 112, 0); }
}

.direct-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}
.ds-chip {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--panel);
}
.ds-chip.live { color: var(--red); border-color: rgba(255, 124, 112, .4); }
.ds-chip.up { color: var(--cyan); }
.ds-chip.await { color: var(--gold); border-color: rgba(243,199,97,.4); }
.ds-chip.fin { color: var(--lime); }
.ds-next { color: var(--muted); font-size: 13px; margin-left: auto; }

.direct-section { margin-bottom: 22px; }
.direct-section-title {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 10px 2px;
}
.direct-section-title em {
  font-style: normal;
  color: var(--text);
  background: var(--panel-3);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
}
.direct-section.live .direct-section-title { color: var(--red); }

.direct-row {
  display: grid;
  grid-template-columns: 62px 130px 1fr minmax(0, 1.15fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, transform .12s, background .15s;
}
.direct-row:hover { transform: translateY(-1px); border-color: var(--line-strong); background: var(--panel-2); }
.direct-row.running { border-left-color: var(--red); background: linear-gradient(90deg, rgba(255,124,112,.08), transparent 40%); }
.direct-row.soon { border-left-color: var(--gold); }
.direct-row.upcoming { border-left-color: var(--cyan); }
.direct-row.awaiting { border-left-color: var(--gold); opacity: .82; }
.direct-row.finished { border-left-color: var(--lime); }

.direct-time { font-family: var(--font-display); font-size: 19px; font-weight: 700; }

.direct-status-chip {
  justify-self: start;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--line);
}
.direct-status-chip.running { color: var(--red); border-color: rgba(255,124,112,.45); background: rgba(255,124,112,.1); }
.direct-status-chip.soon { color: var(--gold); border-color: rgba(243,199,97,.4); }
.direct-status-chip.upcoming { color: var(--cyan); }
.direct-status-chip.awaiting { color: var(--gold); border-color: rgba(243,199,97,.4); background: rgba(243,199,97,.08); }
.direct-status-chip.finished { color: var(--lime); border-color: rgba(200,255,98,.35); background: rgba(200,255,98,.08); }

.direct-race strong { display: block; font-size: 14px; }
.direct-race small { color: var(--muted); font-size: 12px; }
.direct-race .q { color: var(--lime-dark); background: var(--lime); border-radius: 4px; padding: 0 5px; font-size: 11px; }

.direct-result {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  text-align: right;
  align-items: flex-end;
}
.direct-arrival b, .direct-prono b { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.direct-arrival { font-variant-numeric: tabular-nums; font-weight: 600; }
.direct-rap { color: var(--gold); font-weight: 700; }
.direct-prono { color: var(--muted); }
.direct-pending { color: var(--red); font-weight: 600; }
.direct-await { color: var(--gold); font-weight: 600; }
.direct-soon { color: var(--cyan); }

@media (max-width: 720px) {
  .direct-row {
    grid-template-columns: 58px 1fr;
    grid-template-areas:
      "time race"
      "time chip"
      "time result";
    row-gap: 6px;
    column-gap: 12px;
    align-items: start;
  }
  .direct-time { grid-area: time; align-self: center; }
  .direct-race { grid-area: race; }
  .direct-status-chip { grid-area: chip; justify-self: start; }
  .direct-result { grid-area: result; text-align: left; align-items: flex-start; }
  .ds-next { margin-left: 0; width: 100%; }
}
