/* ---- Historique des matchs ---- */

:root {
  --couleur-j1: #5b9bd5;
  --couleur-j2: #e0645a;
  --couleur-victoire: #3ecf6a;
  --couleur-ban: #ff5a5a;
  --taille-perso: 3rem;
}

.cache {
  display: none !important;
}

/* ---- Onglets : Litiges, Mes entraînements, Matchs, Statistiques ; même
   largeur, à eux tous celle de la page (comme le Classement) ---- */

.onglets-historique {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.75rem;
  max-width: 90rem;
  margin: 0 auto 1.25rem;
}

.onglet-historique {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.75rem;
  background-color: rgba(20, 20, 20, 0.55);
  color: white;
  font-family: var(--police-titre);
  font-size: 1.375rem;
  cursor: pointer;
}

.onglet-historique span {
  font-family: var(--police-titre);
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.onglet-historique:hover {
  border-color: var(--accent-bordure);
}

.onglet-historique.active {
  border-color: var(--accent);
  background-color: var(--accent-fond);
  box-shadow: 0 0 0.75rem rgba(245, 197, 66, 0.3);
}

/* Téléphone : 2 onglets par ligne si plus de 2, textes plus petits. */
@media (max-width: 700px) {
  .onglets-historique {
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.5rem;
  }

  .onglet-historique {
    padding: 0.5rem 0.5rem;
    font-size: 1.0625rem;
    text-align: center;
  }

  .onglet-historique span {
    font-size: 0.75rem;
  }
}

/* Filtres propres à l'onglet Matchs, cachés sur les autres. */
.masque-onglet {
  display: none !important;
}

/* ---- Barre : recherche, tris, mes matchs ---- */

/* Recherche + tris centrés, dans un rectangle flou figé en haut de l'écran
   au défilement (même flou que la barre de Mon compte). */
.barre-historique {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.625rem 1rem;
  box-sizing: border-box;
  max-width: 90rem;
  margin: 0 auto 1.25rem;
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  background-color: rgba(20, 20, 20, 0.45);
  -webkit-backdrop-filter: blur(0.5rem);
  backdrop-filter: blur(0.5rem);
}

.barre-historique .tris {
  flex-wrap: wrap;
  justify-content: center;
}

.recherche-historique {
  box-sizing: border-box;
  width: 20rem;
  max-width: 100%;
  height: 2.4375rem;
  padding: 0.375rem 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5625rem;
  background-color: rgba(20, 20, 20, 0.45);
  color: white;
  font-family: inherit;
  font-size: 1.0625rem;
}

.recherche-historique:hover {
  border-color: rgba(245, 197, 66, 0.8);
}

.tris {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.tris-label {
  opacity: 0.8;
}

.bouton-historique {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 2.4375rem;
  padding: 0.375rem 0.75rem;
  border: 2px solid transparent;
  border-radius: 0.5625rem;
  background-color: rgba(20, 20, 20, 0.45);
  color: white;
  font-family: inherit;
  font-size: 1.0625rem;
  cursor: pointer;
  white-space: nowrap;
}

.bouton-historique:hover {
  border-color: rgba(245, 197, 66, 0.8);
}

.bouton-historique.active {
  border-color: rgba(245, 197, 66, 0.8);
  background-color: rgba(245, 197, 66, 0.15);
}

.bouton-historique .fleche {
  font-size: 0.75em;
}

.etat-historique {
  text-align: center;
  color: var(--texte-doux);
}

/* ---- Sections : matchs en cours, matchs terminés ---- */

.section-matchs {
  max-width: 90rem;
  margin: 0 auto 1.75rem;
}

.titre-section {
  margin: 0 0 0.75rem;
  font-size: 1.375rem;
}

/* Match en cours : contour doré, phase et lien "Regarder" au centre. */
.match.en-cours {
  border-color: var(--accent-bordure);
  cursor: pointer; /* toute la ligne mène au match (spectateur) */
}

.match.en-cours:hover {
  background-color: rgba(245, 197, 66, 0.08);
}

.match-phase {
  color: var(--accent);
  font-weight: bold;
}

.match-regarder {
  margin-top: 0.25rem;
  padding: 0.375rem 1rem;
  border: 2px solid var(--accent-bordure);
  border-radius: 62.4375rem;
  background-color: rgba(20, 20, 20, 0.45);
  color: white;
  font-weight: bold;
  text-decoration: none;
}

.match-regarder:hover {
  background-color: var(--accent-fond);
}

/* ---- Liste : une ligne par match (j1 | boss | j2) ---- */

.liste-matchs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 90rem;
  margin: 0 auto;
}

.match {
  display: grid;
  /* Bannières plus courtes (format commun) : la place libérée va au boss. */
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.75fr) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: 0.875rem;
  border: 1px solid var(--bordure);
  border-radius: 0.875rem;
  background-color: rgba(20, 20, 20, 0.55);
}

.match-joueur {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.5rem;
  border-radius: 0.75rem;
  transition: box-shadow 0.2s ease;
}

.match-joueur.gagnant {
  box-shadow: 0 0 0 0.125rem var(--couleur-victoire), 0 0 0.875rem rgba(62, 207, 106, 0.35);
}

/* Égalité : les deux joueurs entourés d'orange (comme le vainqueur en vert). */
.match-joueur.egalite {
  box-shadow: 0 0 0 0.125rem #ff9f1c, 0 0 0.875rem rgba(255, 159, 28, 0.35);
}

/* Bannière du joueur au format commun (.banniere-joueur, commun/entete.css) :
   j1 photo à gauche, j2 photo à droite (image inversée). */
.match-banniere {
  --taille-avatar: 4rem;
  gap: 0.625rem;
  font-weight: bold;
}

/* Photo entourée de la couleur du joueur (5 px, 2 px sur téléphone),
   comprise dans sa taille : elle ne dépasse pas en hauteur. */
.match-avatar {
  border: 5px solid var(--couleur-j1);
}

.match-j2 .match-avatar {
  border-color: var(--couleur-j2);
}

.match-nom {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-temps {
  margin-left: auto;
  padding: 0.1875rem 0.625rem;
  border-radius: 62.4375rem;
  background-color: rgba(0, 0, 0, 0.6);
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

.match-j2 .match-temps {
  margin-left: 0;
  margin-right: auto;
}

.gagnant .match-temps {
  color: var(--couleur-victoire);
}

.etiquette-resultat {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background-color: rgba(0, 0, 0, 0.6);
  font-size: 0.8125rem;
}

.etiquette-resultat.victoire {
  color: var(--couleur-victoire);
}

.etiquette-resultat.egalite {
  color: var(--accent);
}

/* Équipe / bans / équilibrage : libellé puis icônes. */
.match-ligne {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.match-j2 .match-ligne {
  flex-direction: row-reverse;
}

.match-label {
  flex: 0 0 5.5rem;
  font-size: 0.8125rem;
  color: var(--texte-doux);
}

.match-j2 .match-label {
  text-align: right;
}

.match-persos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.match-j2 .match-persos {
  flex-direction: row-reverse;
}

.perso-mini {
  position: relative;
  width: var(--taille-perso);
  height: var(--taille-perso);
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0.5rem;
  background-size: cover;
  background-position: center;
}

.perso-mini > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.perso-mini.banni {
  opacity: 0.8;
  box-shadow: inset 0 0 0 2px var(--couleur-ban);
}

.perso-mini.banni > img:first-child {
  filter: grayscale(60%);
}

/* Équipe : icônes plus grandes, une info par coin (cf. htmlPerso). */
.perso-mini.perso-equipe {
  --taille-perso: 4rem;
}

/* Bans et bans d'équilibrage : 15 % plus petits que l'équipe. */
.ligne-bans .perso-mini.perso-mini {
  --taille-perso: 3.4rem;
}

/* Bans : 3 infos empilées de chaque côté (constellation, arme, niveau) ;
   pastilles plus petites et plus près des bords pour ne pas se chevaucher
   (3 x 0.9375rem + marges, dans 3.4rem). */
.ligne-bans .coin {
  min-width: 0.9375rem;
  height: 0.9375rem;
  padding: 0 0.0625rem;
  font-size: 0.5rem;
}

.ligne-bans img.arme-mini,
.ligne-bans img.element-mini {
  width: 0.9375rem;
}

.ligne-bans .coin-hg,
.ligne-bans .coin-hd {
  top: 0.0625rem;
}

.ligne-bans .coin-bg,
.ligne-bans .coin-bd {
  bottom: 0.0625rem;
}

.ligne-bans .coin-hg,
.ligne-bans .coin-mg,
.ligne-bans .coin-bg {
  left: 0.0625rem;
}

.ligne-bans .coin-hd,
.ligne-bans .coin-md,
.ligne-bans .coin-bd {
  right: 0.0625rem;
}

.coin {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.125rem;
  border-radius: 62.4375rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.625rem;
  font-weight: bold;
  line-height: 1;
}

.coin-hg {
  top: 0.125rem;
  left: 0.125rem;
}

.coin-bg {
  bottom: 0.125rem;
  left: 0.125rem;
}

.coin-bas {
  bottom: 0.125rem;
  left: 50%;
  transform: translateX(-50%);
}

.coin-bd {
  bottom: 0.125rem;
  right: 0.125rem;
}

/* Bans : infos des 2 joueurs, j1 à gauche et j2 à droite (haut :
   constellation, milieu : arme, bas : niveau), dans leur couleur. */
.coin-md {
  top: 50%;
  right: 0.125rem;
  transform: translateY(-50%);
}

.coin-mg {
  top: 50%;
  left: 0.125rem;
  transform: translateY(-50%);
}

.coin-hd {
  top: 0.125rem;
  right: 0.125rem;
}

.coin-j1 {
  color: var(--couleur-j1);
}

.coin-j2 {
  color: var(--couleur-j2);
}

img.element-mini {
  width: 1.25rem;
  padding: 0.125rem;
  object-fit: contain;
}

/* Arme signature : contour de la couleur du raffinement (classes .ref-N,
   commun/cartes.css). */
img.arme-mini {
  --epaisseur-arme-mini: 2px;
  width: 1.25rem;
  padding: 0;
  object-fit: contain;
  outline: var(--epaisseur-arme-mini) solid var(--couleur-ref);
  outline-offset: calc(-1 * var(--epaisseur-arme-mini));
}

@media (max-width: 700px) {
  img.arme-mini {
    --epaisseur-arme-mini: 1px;
  }
}

/* Centre : boss, date. */
.match-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.match-boss {
  width: 100%;
  max-width: 16rem;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.match-boss-nom {
  font-weight: bold;
}

.match-date,
.match-note {
  font-size: 0.8125rem;
  color: var(--texte-doux);
}

.match-note {
  font-style: italic;
}

/* ---- Matchs classés : contour doré épais et lueur (les matchs en cours
   ont un contour doré fin), mention "Classé" au centre ---- */

.match.classe {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0.75rem rgba(245, 197, 66, 0.35);
}

.match-classe {
  padding: 0.125rem 0.625rem;
  border-radius: 62.4375rem;
  background-color: var(--accent-fond);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: bold;
}

/* Théâtre joué (nombre de bans), avec sa médaille, au centre. */
.match-theatre {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.625rem 0.125rem 0.25rem;
  border-radius: 62.4375rem;
  background-color: rgba(0, 0, 0, 0.45);
  font-size: 0.8125rem;
  font-weight: bold;
}

.match-theatre img {
  width: 1.375rem;
  height: 1.375rem;
  object-fit: contain;
}

.etiquette-resultat.trophees.gain {
  color: var(--couleur-victoire);
}

.etiquette-resultat.trophees.perte {
  color: var(--couleur-ban);
}

/* ---- Litiges (administrateurs) ---- */

.badge-admin {
  vertical-align: middle;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background-color: var(--accent-fond);
  color: var(--accent);
  font-size: 0.8125rem;
}

.sous-titre-section {
  margin: 1rem 0 0.5rem;
  font-size: 1.0625rem;
}

.filtre-litiges {
  font-weight: normal;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

/* Joueurs en litige : cliquer une ligne filtre les matchs invalidés. */
.table-litiges-cadre {
  overflow-x: auto;
}

.table-litiges {
  border-collapse: collapse;
  min-width: 100%;
  background-color: var(--fond-carte);
  border: 1px solid var(--bordure);
  border-radius: 0.5rem;
}

.table-litiges th,
.table-litiges td {
  padding: 0.375rem 0.75rem;
  text-align: center;
  white-space: nowrap;
}

.table-litiges th:first-child,
.table-litiges td:first-child {
  text-align: left;
}

.table-litiges tbody tr {
  border-top: 1px solid var(--bordure);
  cursor: pointer;
}

.table-litiges tbody tr:hover,
.table-litiges tbody tr.active {
  background-color: var(--accent-fond);
}

.tri-litiges {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.tri-litiges.active {
  color: var(--accent);
}

.tri-litiges .fleche {
  font-size: 0.75em;
}

.joueur-litiges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.joueur-litiges .photo-joueur {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  object-fit: cover;
}

/* Match invalidé : contour rouge, temps corrigibles au centre. */
.match.litige {
  border-color: var(--couleur-ban);
}

.match-litige {
  color: var(--couleur-ban);
  font-weight: bold;
  text-align: center;
}

.litige-par {
  font-weight: normal;
}

/* Raison du litige donnée par le joueur qui l'a signalé. */
.commentaire-litige-historique {
  max-width: 18rem;
  margin: 0;
  padding: 0.375rem 0.625rem;
  border-left: 3px solid var(--couleur-ban);
  border-radius: 0.375rem;
  background-color: rgba(255, 255, 255, 0.06);
  font-size: 0.8125rem;
  font-style: italic;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.correction-litige {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.375rem;
  width: 100%;
  max-width: 14rem;
}

.champ-temps-litige {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.champ-j1 .nom-temps-litige {
  color: var(--couleur-j1);
}

.champ-j2 .nom-temps-litige {
  color: var(--couleur-j2);
}

.nom-temps-litige {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.champ-temps-litige input {
  box-sizing: border-box;
  width: 4.5rem;
  padding: 0.25rem 0.375rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.375rem;
  background-color: rgba(20, 20, 20, 0.45);
  color: white;
  font-family: inherit;
  font-size: 0.9375rem;
  text-align: center;
}

.bouton-republier {
  justify-content: center;
  height: auto;
  white-space: normal;
}

.bouton-republier:disabled {
  opacity: 0.5;
  cursor: wait;
}

.match-litige-corrige {
  color: var(--accent);
}

/* ---- Téléphone : boss et date en haut, les 2 joueurs côte à côte ---- */

@media (max-width: 700px) {
  :root {
    --taille-perso: 2.125rem;
  }

  .match {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "centre centre"
      "j1 j2";
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .match-centre {
    grid-area: centre;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.625rem;
  }

  .match-boss {
    width: 2.5rem;
    height: 2.5rem;
  }

  .match-j1 {
    grid-area: j1;
  }

  .match-j2 {
    grid-area: j2;
  }

  .match-joueur {
    padding: 0.25rem;
  }

  .match-banniere {
    --taille-avatar: 2.25rem;
    flex-wrap: wrap;
    gap: 0.25rem 0.375rem;
    font-size: 0.8125rem;
  }

  .match-avatar {
    border-width: 2px;
  }

  .match-temps {
    font-size: 0.875rem;
  }

  .match-ligne,
  .match-j2 .match-ligne {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .match-label {
    flex: none;
  }
}

/* Choisi au hasard (temps écoulé, draft classée) : entouré d'orange, comme
   dans la page du match. */
.perso-mini.choix-aleatoire {
  outline: 2px solid #ff9f1c;
  outline-offset: -2px;
  box-shadow: 0 0 0.5rem rgba(255, 159, 28, 0.7);
}

/* Ban choisi au hasard : contour rouge du ban gardé, orange autour. */
.perso-mini.banni.choix-aleatoire {
  box-shadow: inset 0 0 0 2px var(--couleur-ban), 0 0 0.5rem rgba(255, 159, 28, 0.7);
}

/* Entraînement (visible de son lanceur seulement). */
.match.entrainement {
  border-style: dashed;
}

.match-entrainement {
  padding: 0.125rem 0.625rem;
  border-radius: 62.4375rem;
  background-color: rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  font-weight: bold;
}

/* Match d'équipe : joueurs de l'équipe sous la bannière du chef (★). */
.match-membres {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--texte-doux);
}

/* Mode carnage (draft de la carpe sans bans d'équilibrage). */
.match-carnage {
  padding: 0.125rem 0.625rem;
  border-radius: 62.4375rem;
  background-color: rgba(255, 90, 90, 0.18);
  color: #ff7a85;
  font-size: 0.8125rem;
  font-weight: bold;
}

/* ---- Pages (10 matchs par page, par catégorie) ---- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.bouton-page {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.5625rem;
  background-color: rgba(20, 20, 20, 0.55);
  color: white;
  font-family: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.bouton-page:hover:not(:disabled) {
  border-color: rgba(245, 197, 66, 0.8);
}

.bouton-page:disabled {
  opacity: 0.4;
  cursor: default;
}

.numero-page {
  padding: 0 0.5rem;
  font-weight: bold;
}

/* Choix du nombre de matchs par page (barre du haut). */
.choix-par-page {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  opacity: 0.9;
}

.choix-par-page select {
  height: 2.4375rem;
  padding: 0 0.5rem;
  border: 2px solid transparent;
  border-radius: 0.5625rem;
  background-color: rgba(20, 20, 20, 0.45);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.choix-par-page select:hover {
  border-color: rgba(245, 197, 66, 0.8);
}

/* Anti-triche (admin) : alerte et sanctions sous la correction des temps. */
.alerte-triche {
  max-width: 16rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  background-color: rgba(255, 90, 90, 0.18);
  color: #ffb3b3;
  font-size: 0.8125rem;
  font-weight: bold;
  text-align: center;
}

.sanction-litige {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.375rem;
  width: 100%;
  max-width: 16rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.champ-sanction,
.champ-fin-saison {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.8125rem;
}

.champ-sanction select,
.champ-fin-saison input {
  padding: 0.25rem 0.375rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.375rem;
  background-color: rgba(20, 20, 20, 0.6);
  color: white;
  font-family: inherit;
  font-size: 0.875rem;
}

.bouton-sanction {
  justify-content: center;
  height: auto;
  white-space: normal;
  border-color: rgba(255, 90, 90, 0.6);
}

/* Filtre boss : liste déroulante (à la place de l'ancien tri par boss). */
.filtre-boss-historique {
  height: 2.4375rem;
  max-width: 14rem;
  padding: 0 0.5rem;
  border: 2px solid transparent;
  border-radius: 0.5625rem;
  background-color: rgba(20, 20, 20, 0.45);
  color: white;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.filtre-boss-historique:hover,
.filtre-boss-historique.active {
  border-color: rgba(245, 197, 66, 0.8);
}

.filtre-boss-historique.active {
  background-color: rgba(245, 197, 66, 0.15);
}

.filtre-boss-historique option {
  background-color: #2a2a2a;
}

/* ---- Statistiques ---- */

.note-stats {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.entete-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.entete-stats .titre-section {
  margin: 0;
}

.filtre-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Persos les plus pick / bannis / bannis à l'équilibrage : 3 colonnes. */
.classements-persos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
}

.classement-persos {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border: 1px solid var(--bordure);
  border-radius: 0.875rem;
  background-color: rgba(20, 20, 20, 0.55);
}

.classement-persos .sous-titre-section {
  margin-top: 0;
}

.liste-classement-persos {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Rang, icône, nom, valeur ; jauge sous le nom. */
.ligne-perso-stats {
  display: grid;
  grid-template-columns: 1.75rem var(--taille-perso) minmax(0, 1fr) auto;
  grid-template-areas:
    "rang perso nom valeur"
    "rang perso jauge jauge";
  align-items: center;
  column-gap: 0.625rem;
}

.ligne-perso-stats .perso-mini {
  grid-area: perso;
}

.rang-stats {
  grid-area: rang;
  text-align: right;
  font-weight: bold;
  color: var(--texte-doux);
  font-variant-numeric: tabular-nums;
}

.nom-perso-stats {
  grid-area: nom;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.valeur-stats {
  grid-area: valeur;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.jauge-stats {
  grid-area: jauge;
  height: 0.375rem;
  border-radius: 62.4375rem;
  background-color: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.jauge-stats span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background-color: var(--accent);
}

.classement-persos[data-liste="bans"] .jauge-stats span,
.classement-persos[data-liste="bans_equilibrage"] .jauge-stats span {
  background-color: var(--couleur-ban);
}

.voir-tout {
  align-self: center;
  margin-top: 0.75rem;
  height: auto;
  font-size: 0.9375rem;
}

/* Records : une ligne par boss (boss | non classé | classé). */
.records-boss {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Titre de catégorie (boss hebdomadaires, légendes locales) : moins d'écart
   au-dessus du premier. */
.records-boss > .sous-titre-section {
  margin: 0.75rem 0 0;
}

.records-boss > .sous-titre-section:first-child {
  margin-top: 0;
}

.ligne-record {
  display: grid;
  grid-template-columns: minmax(8rem, 0.5fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--bordure);
  border-radius: 0.875rem;
  background-color: rgba(20, 20, 20, 0.55);
}

.record-boss-infos {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  text-align: center;
}

.record-boss-infos .match-boss {
  max-width: 5rem;
}

.record-boss {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.5rem;
  border: 1px solid var(--bordure);
  border-radius: 0.75rem;
}

.record-boss.classe {
  border-color: var(--accent-bordure);
}

.record-boss.vide {
  align-items: center;
  justify-content: center;
}

.record-titre {
  font-size: 0.8125rem;
  font-weight: bold;
  color: var(--texte-doux);
}

.record-boss.classe .record-titre {
  color: var(--accent);
}

.record-aucun {
  color: var(--texte-doux);
}

.record-temps {
  color: var(--couleur-victoire);
}

@media (max-width: 700px) {
  .ligne-record {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "boss boss"
      "non-classe classe";
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .record-boss-infos {
    grid-area: boss;
    flex-direction: row;
  }

  .record-boss-infos .match-boss {
    width: 2.5rem;
    height: 2.5rem;
  }

  .record-boss {
    padding: 0.25rem;
  }
}

/* Légende locale à 2 boss : les 2 images dans la place d'une seule. */
.match-centre .duo-boss {
  width: 100%;
  max-width: 16rem;
}

.record-boss-infos .duo-boss {
  max-width: 5rem;
}

.duo-boss .match-boss {
  width: 50%;
}

@media (max-width: 700px) {
  .match-centre .duo-boss,
  .record-boss-infos .duo-boss {
    width: auto;
  }

  .duo-boss .match-boss {
    width: 2.5rem;
  }
}

/* ---- Signalements : bouton sous la date (joueurs connectés), fenêtre
   avec raison obligatoire, traitement par les administrateurs ---- */

.bouton-signaler {
  margin-top: 0.25rem;
  padding: 0.125rem 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 62.4375rem;
  background: none;
  color: var(--texte-doux);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.bouton-signaler:hover:not(:disabled) {
  border-color: rgba(255, 90, 90, 0.8);
  color: #ffb3b3;
}

.bouton-signaler:disabled {
  opacity: 0.6;
  cursor: default;
}

.bouton-signaler.signale {
  border-color: rgba(255, 90, 90, 0.4);
  color: #ffb3b3;
}

.fenetre-signalement {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.7);
}

.fenetre-signalement.cache {
  display: none;
}

.contenu-fenetre-signalement {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(32rem, 100%);
  padding: 1.25rem;
  border: 1px solid rgba(255, 90, 90, 0.5);
  border-radius: 0.75rem;
  background-color: #2b2b2b;
}

.contenu-fenetre-signalement h2 {
  margin: 0;
  color: #ff5a5a;
}

.contenu-fenetre-signalement p {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.85;
}

.contenu-fenetre-signalement .match-fenetre-signalement {
  font-weight: bold;
  opacity: 1;
  overflow-wrap: anywhere;
}

#commentaire-signalement {
  box-sizing: border-box;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.06);
  color: white;
  font: inherit;
  resize: vertical;
}

#commentaire-signalement:focus {
  outline: none;
  border-color: rgba(255, 90, 90, 0.8);
}

.pied-fenetre-signalement {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compteur-signalement {
  margin-right: auto;
  font-size: 0.8125rem;
  opacity: 0.7;
}

.btn-annuler-signalement,
.btn-envoyer-signalement {
  padding: 0.5rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.5rem;
  background-color: transparent;
  color: white;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.btn-envoyer-signalement {
  border-color: #ff5a5a;
  background-color: #ff5a5a;
}

.btn-envoyer-signalement:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Administrateurs : match signalé (contour violet (orange : égalités)), raisons et décision. */
.match.signale {
  border-color: rgba(178, 140, 255, 0.85);
}

.match-signale {
  color: #b28cff;
  font-weight: bold;
}

.signalements-match {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  width: 100%;
  max-width: 18rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.auteur-signalement {
  font-size: 0.8125rem;
}

.nom-signalement {
  font-weight: bold;
  overflow-wrap: anywhere;
}

.date-signalement {
  color: var(--texte-doux);
}

.commentaire-signalement {
  margin: 0.125rem 0 0;
  padding: 0.375rem 0.625rem;
  border-left: 3px solid #b28cff;
  border-radius: 0.375rem;
  background-color: rgba(255, 255, 255, 0.06);
  font-size: 0.8125rem;
  font-style: italic;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.traitement-signalement {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.375rem;
  width: 100%;
  max-width: 16rem;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.champ-decision {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.8125rem;
}

.champ-decision select {
  padding: 0.25rem 0.375rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.375rem;
  background-color: rgba(20, 20, 20, 0.6);
  color: white;
  font-family: inherit;
  font-size: 0.875rem;
}

.temps-signalement {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.temps-signalement.cache {
  display: none;
}

.bouton-traiter-signalement {
  justify-content: center;
  height: auto;
  white-space: normal;
  border-color: rgba(178, 140, 255, 0.6);
}

.bouton-traiter-signalement:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Statistiques : saison affichée. */
.barre-saison-stats {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

/* Temps suspect sous le temps minimum connu : plus marqué que le danger 1. */
.alerte-triche.danger-2 {
  background-color: rgba(255, 60, 60, 0.35);
  color: #ffd0d0;
  box-shadow: inset 0 0 0 2px rgba(255, 90, 90, 0.8);
}

/* Match en équipe : bannières de tous les joueurs, plus compactes, puis
   résultat et temps de l'équipe. */
.bannieres-equipe {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.match-banniere.banniere-membre {
  --taille-avatar: 2.75rem;
}

.chef-equipe {
  background-color: rgba(245, 197, 66, 0.25);
  color: #ffd870;
}

.resultat-equipe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0.25rem;
  font-weight: bold;
}

.match-j2 .resultat-equipe {
  flex-direction: row-reverse;
}

.resultat-equipe .match-temps {
  margin: 0;
}

.barre-saison-stats {
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Record d'un match en équipe : joueurs de l'équipe. */
.record-membres {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--texte-doux);
}

/* ---- Random world boss (cf. creerLigneWorldBoss) ---- */

.match.match-world-boss.reussite {
  border: 2px solid rgba(62, 207, 106, 0.55);
}

.match.match-world-boss.echec {
  border: 2px solid rgba(255, 122, 133, 0.55);
}

.etiquette-resultat.echec-wb {
  color: #ff7a85;
}

.repartition-wb {
  list-style: none;
  margin: 0.375rem 0 0;
  padding: 0;
  font-size: 0.875rem;
  opacity: 0.85;
}

.repartition-wb .nom-repartition {
  font-weight: bold;
}
