:root {
  --sable: #e6d8bc;
  --platre: #f3eadb;
  --terre: #2e2721;
  --terre-doux: #6b5d4f;
  --trait: #cdba96;
  --ct: #3d5a88;
  --t: #b0741c;
  --sur-equipe: #fbf7ef;
  --bot: #8a7b69;
  --condense: Bahnschrift, "DIN Alternate", "DIN Condensed", "Ubuntu Condensed", "Barlow Condensed", "Roboto Condensed", "Noto Sans Display", "Arial Narrow", "Liberation Sans Narrow", sans-serif-condensed, system-ui, sans-serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sable: #211c17;
    --platre: #2b251f;
    --terre: #ece2cf;
    --terre-doux: #b3a58f;
    --trait: #4a4035;
    --ct: #7f9dd0;
    --t: #dca24a;
    --sur-equipe: #1b1712;
    --bot: #968873;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sable);
  color: var(--terre);
  font: 16px/1.5 var(--texte);
}

a { color: inherit; text-decoration-color: var(--trait); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--ct); outline-offset: 2px; border-radius: 2px; }

.page { max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }

/* En-tête */
.entete {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; padding: 20px 0 16px; border-bottom: 2px solid var(--terre);
}
.marque { font: 700 1.6rem/1 var(--condense); letter-spacing: .01em; text-decoration: none; }
.nav { display: flex; gap: 20px; font: 600 1.05rem/1 var(--condense); }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 3px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--terre); }

h1, h2, h3 { font-family: var(--condense); font-stretch: condensed; line-height: 1.1; margin: 0; }
h2 { font-size: 1.6rem; font-weight: 700; margin: 40px 0 12px; }
.sous-titre { color: var(--terre-doux); margin: 4px 0 0; }

/* Tableau de score : le seul élément démonstratif de la page */
.score { margin-top: 24px; }
.score-barre { display: grid; grid-template-columns: 1fr 1fr; min-height: 168px; }
.camp { display: flex; flex-direction: column; justify-content: space-between; padding: 16px 20px; color: var(--sur-equipe); }
.camp-ct { background: var(--ct); }
.camp-t { background: var(--t); align-items: flex-end; text-align: right; }
.camp-nom { font: 600 1.1rem/1 var(--condense); }
.camp-points { font: 700 clamp(4.5rem, 14vw, 8.5rem)/.85 var(--condense); font-variant-numeric: tabular-nums; }
.score-legende {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px;
  padding: 10px 2px 0; color: var(--terre-doux);
}
.score-legende strong { color: var(--terre); font-family: var(--condense); font-size: 1.15rem; }

.veille { margin-top: 24px; padding: 24px 20px; background: var(--platre); border-left: 8px solid var(--ct); }
.veille h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.veille p { margin: 8px 0 0; max-width: 62ch; }
code.connect {
  display: inline-block; margin-top: 12px; padding: 6px 12px; background: var(--terre); color: var(--sable);
  font: 600 1.1rem/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; border-radius: 3px;
}

/* Joueurs connectés */
.equipes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-top: 16px; }
.equipe h3 { font-size: 1.15rem; padding-bottom: 4px; border-bottom: 3px solid; }
.equipe-ct h3 { border-color: var(--ct); }
.equipe-t h3 { border-color: var(--t); }
.equipe ul { list-style: none; margin: 0; padding: 0; }
.equipe li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--trait); }

/* Champions du jour */
.champions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.champion { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.champion-titre { font: 700 1.25rem/1.2 var(--condense); }
.champion-desc { color: var(--terre-doux); font-size: .92rem; grid-column: 1; }
.champion-qui { grid-column: 1; margin-top: 2px; font-weight: 600; }
.champion-valeur { grid-row: 1 / 4; grid-column: 2; align-self: center; text-align: right; font: 700 2.2rem/1 var(--condense); font-variant-numeric: tabular-nums; }
.champion-valeur small { display: block; font: 400 .8rem/1.2 var(--texte); color: var(--terre-doux); }

/* Tableaux */
.tableau-defile { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: right; font: 600 .95rem/1.2 var(--condense); color: var(--terre-doux); padding: 8px 10px; border-bottom: 2px solid var(--terre); white-space: nowrap; }
td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 0; }
th.g, td.g { text-align: left; }
td.nom { font-weight: 600; white-space: normal; min-width: 9rem; }
tbody tr:hover { background: var(--platre); }
.rang { font: 700 1.2rem/1 var(--condense); width: 2.5rem; }
.rang-1 td:first-child { color: var(--t); }
.fort { font: 700 1.15rem/1 var(--condense); }
.discret { color: var(--terre-doux); }
.badge-bot { font: 600 .72rem/1 var(--texte); color: var(--bot); border: 1px solid var(--bot); border-radius: 3px; padding: 1px 4px; margin-left: 6px; vertical-align: 2px; }

.filtre { display: flex; gap: 16px; margin: 0 0 8px; font-size: .95rem; }
.filtre a[aria-current="true"] { font-weight: 700; text-decoration: none; }

/* Barres horizontales (armes) */
.barre { position: relative; }
.barre span { position: absolute; inset: 6px auto 6px 0; background: var(--platre); border-right: 3px solid var(--t); z-index: 0; }
.barre b { position: relative; z-index: 1; font-weight: 400; }

/* Fiche joueur */
.fiche { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.fiche h1 { font-size: clamp(2.4rem, 8vw, 4.2rem); overflow-wrap: anywhere; }
.fiche-rang { text-align: right; }
.fiche-rang strong { display: block; font: 700 3.6rem/.9 var(--condense); color: var(--t); }
.chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin: 24px 0 0; border-top: 2px solid var(--terre); }
.chiffres div { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--trait); }
.chiffres dt { color: var(--terre-doux); font-size: .9rem; }
.chiffres dd { margin: 0; font: 700 1.9rem/1.1 var(--condense); font-variant-numeric: tabular-nums; }

.jours { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 120px; margin-top: 8px; }
.jour { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-align: center; }
.jour i { display: block; background: var(--ct); min-height: 2px; }
.jour small { color: var(--terre-doux); font-size: .72rem; margin-top: 4px; }

.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.liste-duels { list-style: none; margin: 0; padding: 0; }
.liste-duels li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--trait); }

.vide { padding: 20px 0; color: var(--terre-doux); max-width: 62ch; }
.hs { color: var(--t); font-weight: 600; }

.pied { margin-top: 48px; padding-top: 12px; border-top: 1px solid var(--trait); color: var(--terre-doux); font-size: .88rem; }

@media (max-width: 640px) {
  .equipes, .deux { grid-template-columns: 1fr; }
  .score-barre { min-height: 128px; }
  .col-option { display: none; }
}
