/* Les Buteurs : un tableau d'affichage, puis la frise des buts, minute par minute.
   Couleurs, polices, boutons et champ de saisie viennent de /assets/styles.css. */

.bt-card {
  position: relative;
  padding: 20px 20px 22px;
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: 6px 7px 0 rgba(23, 33, 60, 0.85);
}

.bt-card::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(23, 33, 60, 0.25);
  pointer-events: none;
}

.notice {
  margin: 26px 0 18px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
}

.loading::after {
  content: '';
  display: block;
  width: 26px;
  height: 26px;
  margin: 16px auto 0;
  border: 3px solid var(--rule);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: bt-spin 0.8s linear infinite;
}

@keyframes bt-spin {
  to { transform: rotate(360deg); }
}

/* le tableau d'affichage */

.bt-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: var(--paper);
  background: var(--cover-deep);
  border: 2px solid var(--ink);
  border-bottom: 3px solid var(--gold);
}

.bt-team {
  font-family: 'Anton', Impact, sans-serif;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: right;
}

.bt-team--away {
  text-align: left;
}

.bt-score {
  padding: 4px 12px;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 30px;
  line-height: 1;
  color: var(--gold);
  background: #0b1222;
  border: 2px solid rgba(216, 163, 35, 0.5);
  font-variant-numeric: tabular-nums;
}

.bt-venue {
  margin: 8px 0 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}

/* la frise des buts */

.bt-goals {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.bt-goal {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(23, 33, 60, 0.08);
}

.bt-goal--home .bt-cell:first-child {
  display: flex;
  justify-content: flex-end;
}

.bt-minute {
  justify-self: center;
  min-width: 46px;
  padding: 3px 6px;
  text-align: center;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 15px;
  color: var(--paper);
  background: var(--ink);
}

.bt-slot {
  display: inline-block;
  min-width: 120px;
  max-width: 100%;
  padding: 7px 10px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--rule);
  border: 2px dashed var(--rule);
  overflow-wrap: anywhere;
}

.bt-slot.is-found {
  color: var(--ink);
  border: 2px solid var(--ink);
  background: linear-gradient(135deg, #f7e6a8 0%, #fff8dc 45%, #e3c96a 100%);
  box-shadow: 2px 2px 0 var(--ink);
  animation: bt-stick 0.3s ease-out;
}

.bt-slot.is-og {
  color: var(--ink-soft);
  font-weight: 600;
  font-style: italic;
  background: rgba(201, 183, 143, 0.2);
  border: 2px solid var(--rule);
  box-shadow: none;
  animation: none;
}

.bt-slot.is-revealed {
  color: var(--red);
  border: 2px solid var(--red);
  background: rgba(207, 58, 37, 0.06);
}

.bt-slot.is-hinted {
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  color: var(--gold);
  border-color: var(--gold);
}

.bt-tag {
  margin-left: 4px;
  font-style: normal;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}

@keyframes bt-stick {
  from { transform: scale(1.15) rotate(-3deg); opacity: 0; }
}

/* saisie */

.bt-feedback {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
}

.bt-actions {
  display: flex;
  gap: 6px;
}

.bt-actions .ghost:disabled {
  opacity: 0.4;
  cursor: default;
}

.tried {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
}

.tried li {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border: 2px solid currentColor;
}

.tried .is-ko {
  color: var(--red);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

@media (max-width: 560px) {
  .bt-card {
    padding: 16px 12px 18px;
  }

  .bt-team {
    font-size: 15px;
  }

  .bt-score {
    font-size: 22px;
  }

  .bt-goal {
    grid-template-columns: 1fr 46px 1fr;
    gap: 5px;
  }

  .bt-minute {
    min-width: 40px;
    font-size: 13px;
  }

  .bt-slot {
    min-width: 0;
    width: 100%;
    font-size: 12px;
    padding: 6px;
  }

  .bt-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bt-slot.is-found {
    animation: none;
  }
}

@media (min-width: 1280px) {
  .bt-slot {
    min-width: 200px;
    font-size: 15px;
  }

  .bt-team {
    font-size: 24px;
  }
}
