/* Le Onze : une page d'album d'équipe, onze emplacements de vignettes sur un terrain.
   Couleurs, polices, boutons et champ de saisie viennent de /assets/styles.css. */

.xi-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);
}

.xi-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: xi-spin 0.8s linear infinite;
}

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

.xi-match {
  margin: 0;
  font-family: 'Anton', Impact, sans-serif;
  font-size: 26px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.xi-match strong {
  font-weight: 400;
}

.xi-score {
  display: inline-block;
  padding: 0 8px;
  margin: 0 4px;
  color: var(--paper);
  background: var(--ink);
}

.xi-team {
  box-shadow: inset 0 -6px 0 rgba(216, 163, 35, 0.55);
}

.xi-opponent {
  color: var(--ink-soft);
}

/* l'équipe à retrouver, en tête du terrain comme le nom d'une page d'équipe dans un album */
.xi-target {
  margin: 0;
  padding: 10px 12px 12px;
  text-align: center;
  background: var(--ink);
  border: 2px solid var(--ink);
  border-bottom: 3px solid var(--gold);
}

.xi-target span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(241, 228, 200, 0.7);
}

.xi-target strong {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 16px 0;
  font-family: 'Anton', Impact, sans-serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
}

.xi-venue {
  margin: 6px 0 16px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* le terrain */

.pitch {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 8px;
  margin-bottom: 16px;
  border: 2px solid var(--ink);
  border-top: 0;
  background:
    linear-gradient(transparent calc(50% - 1px), rgba(255, 255, 255, 0.35) calc(50% - 1px), rgba(255, 255, 255, 0.35) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 46px, rgba(255, 255, 255, 0.35) 47px, rgba(255, 255, 255, 0.35) 49px, transparent 50px),
    repeating-linear-gradient(180deg, #1f7a4a 0 44px, #1b6e42 44px 88px);
}

.pitch-row {
  display: flex;
  justify-content: space-evenly;
  gap: 6px;
}

.slot-xi {
  position: relative;
  flex: 0 1 96px;
  min-width: 0;
  height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  background: rgba(16, 26, 48, 0.25);
  color: var(--paper);
}

.slot-number {
  font-family: 'Anton', Impact, sans-serif;
  font-size: 22px;
  line-height: 1;
  opacity: 0.85;
}

.slot-name {
  font-weight: 800;
  font-size: 11px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.slot-name:empty {
  display: none;
}

.slot-pos {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.9; /* 5:1 on the pitch, it is tiny */
}

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

.slot-xi.is-found .slot-number {
  font-size: 14px;
  color: var(--red);
}

.slot-xi.is-revealed {
  border: 2px solid var(--red);
  background: rgba(255, 253, 246, 0.9);
  color: var(--red);
}

.slot-xi.is-revealed .slot-number {
  font-size: 14px;
}

.slot-xi.is-hinted .slot-name {
  font-family: 'Anton', Impact, sans-serif;
  font-size: 14px;
  color: #f7d060; /* a lighter gold: 4.9:1 on the pitch */
}

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

/* saisie */

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

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

.xi-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;
}

/* fin de page */

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

  .xi-match {
    font-size: 21px;
  }

  .pitch {
    padding: 12px 4px;
    gap: 8px;
  }

  .pitch-row {
    gap: 4px;
  }

  .slot-xi {
    height: 66px;
  }

  .slot-name {
    font-size: 10px;
  }

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

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

@media (min-width: 1280px) {
  .slot-xi {
    flex-basis: 124px;
    height: 88px;
  }

  .slot-name {
    font-size: 12px;
  }
}

