/* ==========================================================================
   MC Stats — thème sombre
   ========================================================================== */
:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --surface: #151a22;
  --surface-2: #1b212b;
  --surface-3: #262d39;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .15);
  --text: #eef1f5;
  --text-2: #b4bcc8;
  --muted: #838c9b;
  --accent: #5ec269;
  --accent-soft: rgba(94, 194, 105, .14);
  --gold: #f2c14e;
  --silver: #c9d1dc;
  --bronze: #d58b4f;
  --good: #0ca30c;
  --danger: #e5484d;
  --chart: #3987e5;
  --grid: rgba(255, 255, 255, .07);
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-pixel: "Silkscreen", var(--font);
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, monospace;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .22);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 560px;
  background:
    radial-gradient(1100px 380px at 15% -12%, rgba(94, 194, 105, .13), transparent 60%),
    radial-gradient(900px 360px at 95% -20%, rgba(57, 135, 229, .12), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 24px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.strong { font-weight: 700; }
.text-danger { color: var(--danger); }
.stack > * + * { margin-top: 16px; }

/* --------------------------------------------------------------------------
   Barre du haut
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 19, .82);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-pixel); font-size: 18px; white-space: nowrap; }
.brand__icon.mc-icon { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.is-active { background: var(--surface-2); color: var(--text); }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.is-online .dot { background: var(--good); box-shadow: 0 0 0 3px rgba(12, 163, 12, .25); }
.is-offline .dot { background: var(--danger); }

/* --------------------------------------------------------------------------
   Champs, boutons, recherche
   -------------------------------------------------------------------------- */
.input, .search input {
  width: 100%; height: 38px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  color: var(--text); font: inherit; font-size: 14px;
}
.input::placeholder, .search input::placeholder { color: var(--muted); }
input[type="search"] {
  padding-left: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23838c9b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center;
}
input[type="search"]::-webkit-search-cancel-button { filter: invert(.6); }
select.input {
  width: auto; padding-right: 32px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23b4bcc8' stroke-width='2'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #06200b; }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }

.search { position: relative; }
.search--top { margin-left: auto; width: 260px; }
.search__results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  padding: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.search__item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.search__item:hover, .search__item.is-active { background: var(--surface-3); }
.search__item img { border-radius: 4px; image-rendering: pixelated; }
.search__item .muted { margin-left: auto; font-weight: 500; font-size: 13px; }
.search__empty { padding: 10px; color: var(--muted); font-size: 14px; }

/* --------------------------------------------------------------------------
   Éléments communs
   -------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__head h3 { font-size: 16px; }
.card__head .muted { font-size: 13px; }
.empty { padding: 32px; text-align: center; }
.empty p + p { margin-top: 6px; }
.empty-note { padding: 10px 2px; font-size: 14px; }

.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 30px; font-weight: 800; }
.page-head p { margin-top: 4px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.section-head h2, .h-section { font-size: 20px; font-weight: 700; }
.h-sub { font-size: 14px; margin: 18px 0 8px; color: var(--text-2); }
.link-more { color: var(--accent); font-weight: 600; font-size: 14px; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

.mc-icon {
  display: inline-block; flex: none; width: 24px; height: 24px; vertical-align: middle;
  background-size: 100% auto; background-position: top center; background-repeat: no-repeat;
  image-rendering: pixelated;
}
.mc-icon--ph {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px; background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 800;
}
.mc-icon--lg { width: 44px; height: 44px; }
.head { flex: none; border-radius: 4px; background: var(--surface-3); image-rendering: pixelated; }

.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 24px; padding: 0 6px; border-radius: 6px;
  background: var(--surface-3); color: var(--text); font-weight: 800; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.rank-badge.gold, .podium__rank.gold { background: var(--gold); color: #2a1d00; }
.rank-badge.silver, .podium__rank.silver { background: var(--silver); color: #1b2230; }
.rank-badge.bronze, .podium__rank.bronze { background: var(--bronze); color: #2b1403; }

.online-dot { display: none; width: 8px; height: 8px; margin-left: 7px; border-radius: 50%; background: var(--good); vertical-align: middle; box-shadow: 0 0 0 3px rgba(12, 163, 12, .22); }
.online-dot.is-on { display: inline-block; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip .mc-icon { width: 20px; height: 20px; }
a.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--accent-soft); border-color: rgba(94, 194, 105, .55); color: var(--text); }
.chip--static { height: 30px; background: var(--surface-2); }

.status-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.status-badge.is-online { background: rgba(12, 163, 12, .12); border-color: rgba(12, 163, 12, .45); }
.text-online { color: #3fd23f; font-weight: 600; }

/* --------------------------------------------------------------------------
   Tuiles
   -------------------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
a.tile:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.tile__head { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.tile__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.tile--mini .tile__value { font-size: 20px; }
.tile--mini .tile__label { white-space: normal; }
.tile__rank { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tile--first {
  border-color: rgba(242, 193, 78, .45);
  background: linear-gradient(180deg, rgba(242, 193, 78, .09), transparent 70%), var(--surface);
}

/* --------------------------------------------------------------------------
   Accueil
   -------------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1.2fr .9fr; gap: 28px; align-items: center; margin: 12px 0 28px; }
.eyebrow { margin-bottom: 10px; color: var(--accent); font-family: var(--font-pixel); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.hero__title { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -.03em; }
.hero__lead { max-width: 560px; margin: 12px 0 22px; color: var(--text-2); font-size: 17px; }
.search--hero { display: flex; gap: 8px; max-width: 560px; }
.search--hero input { height: 48px; font-size: 16px; padding-left: 40px; background-position: 14px center; }
.search--hero .btn { height: 48px; padding: 0 22px; }

.server { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.server__head { display: flex; align-items: center; gap: 12px; }
.server__favicon { width: 48px; height: 48px; border-radius: 8px; image-rendering: pixelated; }
.server__id { display: flex; flex-direction: column; min-width: 0; }
.server__label { font-weight: 700; }
.server__address { all: unset; cursor: pointer; color: var(--text-2); font-family: var(--mono); font-size: 13px; word-break: break-all; }
.server__address:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.server__copy { margin-left: 6px; color: var(--accent); font-family: var(--font); font-weight: 600; }
.server .status-badge { margin-left: auto; }
.server__motd {
  min-height: 52px; padding: 10px 12px; border-radius: 8px;
  background: #07090c; border: 1px solid var(--border);
  color: #aaaaaa; font-family: var(--mono); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere;
}
.server__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.server__stats div { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); min-width: 0; }
dt { color: var(--muted); font-size: 12px; }
dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.server__meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.server__meter span { display: block; height: 100%; border-radius: 999px; background: var(--chart); transition: width .4s; }
.server__online { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.server__player { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
a.server__player:hover { background: var(--surface-3); }
.server__player img { border-radius: 50%; image-rendering: pixelated; }
.server__more { align-self: center; }

.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 36px; }

.boards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.board { padding: 14px; }
.board__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 0 4px; }
.board__head h3 { flex: 1; font-size: 16px; }
.board__list { list-style: none; margin: 0; padding: 0; }
.board__row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; }
.board__row:hover { background: var(--surface-2); }
.board__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.board__value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.recent__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.recent__item:hover { border-color: var(--border-strong); }
.recent__text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.recent__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Classements
   -------------------------------------------------------------------------- */
.cat-nav { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.cat-nav__group { display: flex; align-items: center; gap: 12px; }
.cat-nav__label { flex: none; width: 96px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.lb-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 18px; }
.lb-head h2 { font-size: 22px; }
.lb-head p { margin-top: 2px; }
.score-help { margin-left: auto; font-size: 14px; }
.score-help summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.score-help ul { margin: 10px 0 0; padding-left: 18px; columns: 2; column-gap: 28px; color: var(--text-2); }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin-bottom: 18px; }
.podium__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 12px 16px; text-align: center; }
.podium__item:hover { border-color: var(--border-strong); }
.podium__item--1 {
  padding-top: 28px; border-color: rgba(242, 193, 78, .45);
  background: linear-gradient(180deg, rgba(242, 193, 78, .12), transparent 70%), var(--surface);
}
.podium__rank {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; font-weight: 800; background: var(--surface-3);
}
.podium__name { font-weight: 700; font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__value { font-size: 20px; font-weight: 800; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left;
  color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table--compact th, .table--compact td { padding: 6px 10px; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.col-rank { width: 60px; }
.player-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.player-link:hover span:not(.online-dot) { text-decoration: underline; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }

/* --------------------------------------------------------------------------
   Liste des joueurs
   -------------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar .input[type="search"] { max-width: 300px; }
.toolbar__sort { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 14px; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.player-card { display: flex; align-items: center; gap: 14px; padding: 14px; }
.player-card:hover { border-color: var(--border-strong); }
.player-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.player-card__name { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-card__stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; color: var(--text-2); font-weight: 600; }
.player-card__stats span { display: inline-flex; align-items: center; gap: 5px; }
.player-card__stats .mc-icon { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   Profil
   -------------------------------------------------------------------------- */
.profile {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px;
  padding: 20px 26px; margin-bottom: 18px;
}
.profile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 220px at 0% 0%, rgba(94, 194, 105, .13), transparent 70%);
}
.profile > * { position: relative; }
.profile__skin img { display: block; height: 200px; width: auto; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5)); }
.profile__title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.profile__title h1 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.profile__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.profile__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 20px; margin: 0; }
.uuid { all: unset; cursor: pointer; color: var(--text-2); font-family: var(--mono); font-size: 12px; font-weight: 500; word-break: break-all; }
.uuid:hover { color: var(--text); }
.uuid:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.profile__score {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  padding-left: 26px; border-left: 1px solid var(--border);
}
.profile__score-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.profile__score-value { font-size: 46px; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.profile__score-rank { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }

.tabs {
  display: flex; gap: 2px; margin-bottom: 18px; overflow-x: auto;
  border-bottom: 1px solid var(--border); scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; padding: 12px 14px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--text-2); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.panel { margin-bottom: 8px; }

.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.highlight { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.highlight .mc-icon { width: 36px; height: 36px; }
.highlight__text { display: flex; flex-direction: column; min-width: 0; }
.highlight__label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.highlight__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.highlight__value { color: var(--text-2); font-size: 13px; }

.chart { position: relative; height: 230px; }
.chart-table { margin-top: 8px; }
.chart-table summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.chart-table table { margin-top: 8px; max-width: 320px; }

/* Barres horizontales */
.bar-list { list-style: none; margin: 0; padding: 0; }
.bar-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-rows: auto 6px;
  align-items: center; column-gap: 10px; row-gap: 5px; padding: 6px 2px;
}
.bar-row__icon { grid-row: 1 / span 2; display: flex; }
.bar-row__icon .mc-icon { width: 26px; height: 26px; }
.bar-row__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.bar-row__value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-row__track { grid-column: 2 / span 2; height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.bar-row__fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--chart); }
.more summary { padding: 8px 2px 2px; cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }

/* Succès */
.adv-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 16px 20px; }
.adv-summary__value { font-size: 30px; font-weight: 800; line-height: 1.1; }
.adv-summary__value .muted { font-size: 20px; font-weight: 700; }
.adv-summary .muted { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.progress { flex: 1; min-width: 180px; height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.adv {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
  opacity: .5; cursor: help;
}
.adv:hover, .adv:focus-visible { opacity: 1; border-color: var(--border-strong); }
.adv.is-done { opacity: 1; }
.adv__icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 4px; background: #232833; border: 2px solid #3e4554;
}
.adv__icon .mc-icon { width: 26px; height: 26px; }
.adv:not(.is-done) .adv__icon .mc-icon { filter: grayscale(1) brightness(.8); }
.adv--goal .adv__icon { border-radius: 14px; }
.adv--challenge .adv__icon { border-radius: 10px 2px 10px 2px; }
.adv.is-done .adv__icon { background: #3a321f; border-color: #c9a227; }
.adv--challenge.is-done .adv__icon { background: #30223f; border-color: #b66cf0; box-shadow: 0 0 12px rgba(182, 108, 240, .35); }
.adv__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.adv__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.adv__sub { color: var(--muted); font-size: 12px; }
.adv__progress { height: 4px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.adv__progress span { display: block; height: 100%; background: var(--accent); }

/* Inventaire */
.inv-layout { display: grid; grid-template-columns: auto minmax(280px, 1fr); gap: 16px; align-items: start; }
.inv { display: flex; align-items: flex-start; gap: 14px; }
.inv__armor { display: grid; gap: 4px; }
.inv__offhand { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.inv__label { color: var(--muted); font-size: 11px; text-align: center; max-width: 60px; }
.inv__sep { height: 10px; }
.inv-grid { display: grid; grid-template-columns: repeat(9, 44px); gap: 4px; }
.slot {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 6px;
  background: #1a1f28; border: 1px solid #2d3441; box-shadow: inset 0 2px 0 rgba(0, 0, 0, .35);
}
.slot .mc-icon { width: 32px; height: 32px; }
.slot[data-tip] { cursor: help; }
.slot[data-tip]:hover { background: #222a36; border-color: var(--border-strong); }
.slot--selected { border-color: var(--text-2); box-shadow: 0 0 0 1px var(--text-2); }
.slot--ench .mc-icon { filter: drop-shadow(0 0 3px rgba(190, 120, 255, .9)); }
.slot__count {
  position: absolute; right: 3px; bottom: 0;
  font-family: var(--font-pixel); font-size: 12px; color: #fff; text-shadow: 1px 1px 0 #3f3f3f;
}
.slot__dura { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; background: #000; }
.slot__dura span { display: block; height: 100%; }
.slot__dura--ok span { background: #3fd23f; }
.slot__dura--mid span { background: #e0c02a; }
.slot__dura--low span { background: #e5484d; }

.vitals { display: flex; flex-direction: column; gap: 12px; }
.vital { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px; }
.vital__label { color: var(--text-2); font-weight: 600; }
.vital__value { font-weight: 700; font-variant-numeric: tabular-nums; }
.vital__bar { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.vital__bar span { display: block; height: 100%; border-radius: 999px; }
.vital--health .vital__bar span { background: #e5484d; }
.vital--food .vital__bar span { background: #d9822b; }
.vital--xp .vital__bar span { background: #7ed321; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 18px 0 0; font-size: 14px; }
.kv dt { font-size: 14px; }
.kv dd { font-weight: 600; }
.effects { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.effects li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); }

.stats-table td:first-child { color: var(--text-2); }

/* Infobulle façon Minecraft */
.tooltip {
  position: fixed; z-index: 100; max-width: 320px; padding: 8px 10px;
  background: rgba(16, 0, 16, .95); border: 2px solid #2b0d5c; border-radius: 4px;
  box-shadow: 0 0 0 1px #100010, 0 12px 30px rgba(0, 0, 0, .55);
  color: #fff; font-size: 13px; line-height: 1.45; pointer-events: none;
}
.tip__title { font-weight: 700; }
.tip__title--ench { color: #55ffff; }
.tip__title--custom { font-style: italic; }
.tip__title--challenge { color: #ff55ff; }
.tip__count { color: #aaa; font-weight: 400; }
.tip__line { color: #ddd; }
.tip__muted { color: #aaa; }
.tip__ench { color: #aaa; }
.tip__curse { color: #ff5555; }
.tip__contents { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .12); }

/* Pied de page */
.footer { padding: 20px 0; border-top: 1px solid var(--border); color: var(--text-2); font-size: 13px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; }
  .boards { grid-template-columns: repeat(2, 1fr); }
  .profile { grid-template-columns: auto 1fr; }
  .profile__score {
    grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 12px;
    padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--border);
  }
  .profile__score-value { font-size: 34px; }
  .inv-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .topbar__inner { flex-wrap: wrap; gap: 10px 12px; padding-top: 10px; padding-bottom: 10px; }
  .search--top { order: 3; width: 100%; margin-left: 0; }
  .status-pill { margin-left: auto; }
  .nav a { padding: 6px 8px; }
  .hide-md { display: none; }
  .cols-2 { grid-template-columns: 1fr; }
  .cat-nav__group { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cat-nav__label { width: auto; }
  .score-help { margin-left: 0; width: 100%; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .brand__name { font-size: 15px; }
  .boards { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 12px; }
  .tile__value { font-size: 19px; }
  .search--hero { flex-direction: column; }
  .search--hero .btn { width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; scrollbar-width: thin; }
  .score-help ul { columns: 1; }
  .podium { grid-template-columns: 1fr; }
  .podium__item--1 { order: -1; }
  .table th, .table td { padding: 10px 8px; }
  .col-rank { width: 44px; }
  .profile { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .profile__skin { display: none; }
  .profile__title h1 { font-size: 26px; }
  .inv { flex-direction: column; }
  .inv__armor { grid-auto-flow: column; }
  .inv__offhand { flex-direction: row; }
  .inv-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); width: 100%; }
  .inv__main { width: 100%; }
  .inv-grid .slot { width: auto; height: auto; aspect-ratio: 1; }
  .inv-grid .slot .mc-icon { width: 72%; height: 72%; }
  .inv__armor .slot, .inv__offhand .slot { width: 40px; height: 40px; }
  .inv__offhand .inv__label { max-width: none; }
  .slot__count { font-size: 10px; }
  .adv-grid, .highlights { grid-template-columns: 1fr; }
  .toolbar__sort { margin-left: 0; }
  .server__stats dd { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
