/* Coupe — mobile (portrait spine + duels ; landscape keep legacy match cards) */

.coupe-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #93c5fd;
}

/* Hero: uses shared .m-page-hero from shell.css
   Trophy crop exception — keep subject centered in the 140px strip */
.m-page-hero--coupe .m-page-hero-image {
  object-position: center center;
}

/* Sélecteur C1…Cn — entre bannière et progression */
.coupe-m .m-chip-row {
  margin: 8px 0 12px;
}

/* ---------- Spine (portrait) ---------- */

.coupe-spine {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  margin: 4px 0 16px;
  padding: 12px 8px 10px;
  border-radius: 16px;
  border: 1px solid var(--m-border);
  background: rgba(255, 255, 255, 0.03);
}

.coupe-spine-step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.coupe-spine-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.45);
  background: transparent;
}

.coupe-spine-step.is-done .coupe-spine-dot {
  border-color: #60a5fa;
  background: #60a5fa;
}

.coupe-spine-step.is-current .coupe-spine-dot,
.coupe-spine-step.is-active .coupe-spine-dot {
  border-color: #93c5fd;
  background: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.22);
}

.coupe-spine-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--m-muted);
  white-space: nowrap;
}

.coupe-spine-step.is-current .coupe-spine-label,
.coupe-spine-step.is-active .coupe-spine-label {
  color: #e2e8f0;
}

.coupe-spine-step.is-done .coupe-spine-label {
  color: #93c5fd;
}

.coupe-spine-link {
  flex: 0 0 8px;
  height: 2px;
  margin-top: 8px;
  background: rgba(148, 163, 184, 0.28);
  align-self: flex-start;
}

.coupe-spine-trophy {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  margin-top: 2px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, #fde68a 0%, #d97706 100%);
  box-shadow: 0 2px 0 rgba(180, 83, 9, 0.55);
  position: relative;
}

.coupe-spine-trophy::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 8px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 2px 2px 0 0;
  background: #fbbf24;
}

/* ---------- Seeds ---------- */

.coupe-seeds-details {
  margin: 0 0 14px;
  border-radius: 12px;
  border: 1px solid var(--m-border);
  background: rgba(255, 255, 255, 0.02);
  padding: 0 12px;
}

.coupe-seeds-details summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-muted);
}

.coupe-seeds-details summary::-webkit-details-marker {
  display: none;
}

.coupe-seeds-details[open] summary {
  color: #e2e8f0;
  border-bottom: 1px solid var(--m-border);
  margin-bottom: 8px;
}

.coupe-seeds .m-badge {
  background: rgba(250, 204, 21, 0.18);
  color: var(--m-gold);
}

/* ---------- Chips ---------- */

.coupe-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 0 14px;
  padding: 2px 0 6px;
}

.coupe-chips::-webkit-scrollbar {
  display: none;
}

.coupe-chip {
  flex: 0 0 auto;
  border: 1px solid var(--m-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--m-muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.coupe-chip.is-active {
  color: #fff;
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.22);
}

.coupe-chip:active {
  transform: scale(0.98);
}

/* ---------- Panels / duels ---------- */

.coupe-panel[hidden] {
  display: none !important;
}

.coupe-duel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coupe-duel {
  margin-bottom: 10px;
  animation: m-fade-up 0.3s ease both;
  border-color: rgba(148, 163, 184, 0.16);
}

.coupe-duel.is-played {
  border-color: rgba(59, 130, 246, 0.28);
}

.coupe-duel.is-upcoming {
  border-style: dashed;
}

.coupe-duel--mine {
  border-color: rgba(59, 130, 246, 0.5);
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.16) 0%,
    rgba(30, 41, 59, 0.45) 100%
  );
}

.coupe-duel.is-final {
  border-color: rgba(250, 204, 21, 0.45);
  background: linear-gradient(
    160deg,
    rgba(250, 204, 21, 0.12) 0%,
    rgba(30, 41, 59, 0.65) 70%
  );
}

.coupe-duel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.coupe-duel-team {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coupe-duel-home {
  text-align: right;
}

.coupe-duel-away {
  text-align: left;
}

.coupe-duel-team.is-winner {
  color: #fff;
}

.coupe-duel-team.is-loser {
  color: var(--m-muted);
  font-weight: 600;
  opacity: 0.8;
}

.coupe-duel-score {
  min-width: 56px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.4);
  text-align: center;
  font-family: var(--m-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.coupe-duel-score.is-pending {
  color: var(--m-muted);
  font-weight: 700;
  font-size: 0.82rem;
}

.coupe-duel-meta {
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--m-muted);
  text-align: center;
}

.coupe-path-hint {
  margin: -2px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.1);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: #bfdbfe;
  text-align: center;
}

.coupe-next-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.coupe-next {
  margin-bottom: 0;
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
}

.coupe-next--mine {
  border-style: solid;
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
}

.coupe-next-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.coupe-next-side {
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.coupe-next-side:first-child {
  text-align: right;
}

.coupe-next-side:last-child {
  text-align: left;
}

.coupe-next-side.is-placeholder {
  color: var(--m-muted);
  font-weight: 600;
  font-size: 0.78rem;
}

.coupe-next-vs {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-muted);
}

.coupe-bridge {
  margin: 14px 0 4px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #93c5fd;
}

.coupe-bridge--final {
  color: var(--m-gold);
}

/* ---------- Legacy match cards (landscape) ---------- */

.coupe-round {
  margin-bottom: 4px;
}

.coupe-round-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coupe-match {
  margin-bottom: 0;
  animation: m-fade-up 0.35s ease both;
  border-color: rgba(148, 163, 184, 0.16);
}

.coupe-match.played {
  border-color: rgba(59, 130, 246, 0.35);
}

.coupe-match.final-win {
  border-color: rgba(250, 204, 21, 0.45);
  background: linear-gradient(
    160deg,
    rgba(250, 204, 21, 0.12) 0%,
    rgba(30, 41, 59, 0.65) 70%
  );
}

.coupe-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 4px 0;
}

.coupe-match-row + .coupe-match-row {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.coupe-team {
  font-weight: 700;
  font-size: 0.92rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coupe-score {
  flex-shrink: 0;
  font-family: var(--m-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  min-width: 1.5rem;
  text-align: right;
}

.coupe-match-row.winner .coupe-team,
.coupe-match-row.winner .coupe-score {
  color: #4ade80;
}

.coupe-match-row.loser .coupe-team,
.coupe-match-row.loser .coupe-score {
  color: var(--m-muted);
  opacity: 0.75;
}

.coupe-match-info {
  margin-top: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-muted);
}

@media (prefers-reduced-motion: reduce) {
  .coupe-duel,
  .coupe-match,
  .coupe-chip {
    animation: none !important;
    transition: none !important;
  }

  .coupe-chip:active {
    transform: none;
  }
}

/* Popup d’aide Coupe (ⓘ) — réutilise .pe-stade-info-* via stade.css */
.m-coupe-title-row {
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.m-coupe-title-row .m-page-title {
  margin: 0;
}

.pe-stade-info-table--coupe-primes thead th:nth-child(1),
.pe-stade-info-table--coupe-primes tbody td:nth-child(1) {
  width: 44%;
}

.pe-stade-info-table--coupe-primes thead th:nth-child(2),
.pe-stade-info-table--coupe-primes tbody td:nth-child(2) {
  width: 28%;
}

.pe-stade-info-table--coupe-primes thead th:nth-child(3),
.pe-stade-info-table--coupe-primes tbody td:nth-child(3) {
  width: 28%;
}

.pe-stade-info-table--coupe-primes thead th:nth-child(2),
.pe-stade-info-table--coupe-primes thead th:nth-child(3),
.pe-stade-info-table--coupe-primes .pe-coupe-primes-montant {
  text-align: right;
}

.pe-coupe-primes-montant {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #e2e8f0;
}
