/* The Ondes server pages (/serveur/): status, games, leaderboards, profiles.
   Built on site.css tokens (light and dark follow the system); a game's colour comes in as
   --game, from community/catalog.py, and only ever tints a swatch or a stripe. */

.ondes-head h1 { margin-bottom: 0.2em; }
.ondes-head .actions { margin-top: 24px; }

/* Status and joining */
.ondes-live { display: grid; gap: 10px; }
.ondes-count { font-size: clamp(40px, 6vw, 64px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin: 0; color: var(--text); }
.ondes-count small { font-size: 0.42em; font-weight: 500; letter-spacing: -0.01em; color: var(--text-2); }
.ondes-live .state { font-size: 15px; }
.ondes-live .state-offline::before { background: var(--danger); }
.ondes-live .state-unknown::before { background: var(--warn); }
.ondes-updated { font-size: 13px; color: var(--text-3); margin: 0; }
.ondes-steps { margin: 0 0 18px; padding-left: 22px; color: var(--text-2); display: grid; gap: 8px; }
.ondes-steps strong { color: var(--text); font-weight: 600; }
.ondes-address { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; }
.ondes-address code { font-size: 17px; padding: 8px 14px; border-radius: 12px; }

/* Families and game cards */
.ondes-family { margin-top: clamp(40px, 6vw, 72px); }
.ondes-family > h2 { font-size: clamp(26px, 3vw, 36px); }
.ondes-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.ondes-game { margin: 0; padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.ondes-game::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--game); }
.ondes-game h3 { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.ondes-game p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.45; flex: 1; }
.ondes-game .more { font-size: 14px; margin-top: 10px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; background: var(--game);
  box-shadow: inset 0 0 0 1px var(--line-strong); }

/* Leaderboards */
.ondes-month { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 32px; }
.ondes-month label { margin: 0 0 8px; flex-basis: 100%; }
.ondes-month select { width: auto; min-width: 220px; min-height: 46px; padding-block: 10px; }
.ondes-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.ondes-board { margin: 0; overflow: hidden; scroll-margin-top: 80px; }
.ondes-board::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--game); }
.ondes-board h2 { display: flex; align-items: center; gap: 10px; }
.ondes-board h3 { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; margin: 18px 0 6px; }
.ondes-board.parkour { --game: #5fd4ff; }
.ranks { list-style: none; margin: 0; padding: 0; }
.ranks li { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ranks li:last-child { border-bottom: 0; }
.ranks .rank { width: 1.6em; text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }
.ranks li:nth-child(-n+3) .rank { color: var(--text); font-weight: 600; }
.ranks a { color: var(--text); margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranks .value { font-variant-numeric: tabular-nums; font-weight: 500; }
.ranks-empty { color: var(--text-3); font-size: 15px; margin: 6px 0 0; }

/* Player profile */
.ondes-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 0;
  margin: 0 0 32px; box-shadow: inset 0 1px 0 var(--line); }
.ondes-figures div { padding: 20px 16px 0 0; display: grid; gap: 4px; }
.ondes-figures strong { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.ondes-figures span { font-size: 14px; color: var(--text-2); }
.ondes-stats td, .ondes-stats th { font-variant-numeric: tabular-nums; }
.ondes-stats td:not(:first-child), .ondes-stats th:not(:first-child) { text-align: right; }
.ondes-stats td:first-child { display: flex; align-items: center; gap: 10px; }
.ondes-stats tr.idle td { color: var(--text-3); }
