/**
 * PlayAwale — Le caractère des IA
 * -----------------------------------------------------------------------------
 * Une carte par adversaire, dans l'ordre du classement : rang, portrait, nom et
 * surnom, puis comment il joue, comment le battre, et deux chiffres.
 *
 * ELLE REPREND LE SITE
 * Titre gravé et bloc de sable du compte ; pastilles sombres des rangs, conseils
 * en encart clair. Aucun liseré de couleur sur le côté ou au-dessus d'un bloc :
 * c'est le fond, l'ombre ou la couleur d'un titre qui distingue.
 *
 * @package   PlayAwale
 * @version   2.0
 * @author    Nicolas Lion — Développeur web — https://nlion.fr
 * @copyright 2026 Nicolas Lion
 */

.opponents-page .account-block {
  width: min(94vw, 1120px);
}

.opponents-lead {
  max-width: 46rem;
}

.opponents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
  gap: var(--space-md);

  margin: 0;
  padding: 0;
  list-style: none;

  text-align: left;
}

.opponent {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);

  padding: var(--space-md);

  background-color: var(--color-sand-100);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow-sm);
}

.opponent__head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.opponent__rank {
  display: grid;
  place-items: center;
  flex: none;

  width: 2rem;
  height: 2rem;

  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-brand-cream);

  background-color: var(--color-brand-dark);
  border-radius: var(--radius-full);
}

.opponent__face {
  flex: none;
  width: 72px;
  height: 72px;
  padding: 3px;

  object-fit: contain;
  background-color: var(--color-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-hollow);
}

.opponent__name {
  margin: 0;

  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 400;
  line-height: var(--line-height-tight);
}

.opponent__style {
  margin: 2px 0 0;

  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-brand-amber-deep);
}

.opponent__label {
  margin: 0 0 2px;

  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.opponent__text,
.opponent__tip {
  margin: 0;

  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
  color: var(--color-text);
}

/* Le conseil : un encart clair, sans liseré — c'est son titre vert qui le
   distingue. */
.opponent__tip {
  padding: var(--space-sm);

  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hollow);
}

.opponent__tip-label {
  display: block;
  margin-bottom: 2px;

  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-verdict-best);
}

/* Un seul chiffre par carte — les victoires des joueurs —, sur toute la
   largeur, calé en bas pour que les cartes voisines s'alignent. */
.opponent__facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2xs);

  margin: auto 0 0;
}

.opponent__fact {
  display: flex;
  flex-direction: column;
  gap: 2px;

  padding: var(--space-xs);

  text-align: center;

  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
}

.opponent__fact dt {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.opponent__fact dd {
  margin: 0;

  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

.opponents-page .opponents-note {
  max-width: 48rem;
  margin: var(--space-md) auto 0;
  text-align: center;
}

.opponents-cta {
  display: flex;
  justify-content: center;

  margin: var(--space-md) 0 0;
}

@media (max-width: 40rem) {

  .opponents-page .account-block {
    padding: var(--space-md);
  }
}
