/* ARK MODORU — thème sombre, accent rouge.
   Parti pris : aplats, filets fins, angles nets, pas de halos ni de dégradés décoratifs. */
:root {
  --bg: #101113;
  --bg-2: #141517;
  --panel: #18191c;
  --panel-2: #1e2023;
  --line: #2a2c30;
  --line-2: #383b40;
  --text: #ecedee;
  --muted: #a0a4aa;
  --dim: #6c7077;
  --red: #d32b2b;
  --red-2: #a91f1f;
  --green: #4cb86b;
  --orange: #f08a3c;
  --discord: #5865f2;
  --basic: #5cb86a;
  --rapide: #f08a3c;
  --violet: #a48cf0;
  --gold: #e0b443;
  --blue: #5aa5e6;
  --grey: #9aa0a8;
  --radius: 4px;
  --side: 72px;
  --side-open: 228px;
  --top: 60px;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'JetBrains Mono', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--red); }
h1, h2, h3 { line-height: 1.2; }
h3 { margin: 0 0 6px; font-size: 1rem; }
p { margin: 0 0 8px; }

svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Logo ---------- */
.logo-mark { width: 42px; height: 42px; object-fit: contain; flex: none; }
.logo-ark { font-weight: 800; letter-spacing: .3em; font-size: .75rem; color: #e4e4e5; }
.logo-modoru { font-weight: 900; font-style: italic; letter-spacing: .01em; font-size: 1.4rem; color: #f1f1f1; }

/* ---------- Barre latérale ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side);
  background: #0c0d0e;
  border-right: 1px solid var(--line);
  z-index: 40;
  overflow: hidden;
  transition: width .18s ease;
  display: flex;
  flex-direction: column;
}
.sidebar:hover, .sidebar:focus-within, .sidebar.open { width: var(--side-open); }

.side-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 84px;
  padding: 0 15px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.side-logo .logo-text { display: flex; flex-direction: column; line-height: 1; white-space: nowrap; opacity: 0; transition: opacity .12s; }
.sidebar:hover .logo-text, .sidebar:focus-within .logo-text, .sidebar.open .logo-text { opacity: 1; }

.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 46px;
  padding: 0 25px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-left: 2px solid transparent;
}
.side-nav a span { opacity: 0; transition: opacity .12s; font-weight: 500; }
.sidebar:hover .side-nav a span, .sidebar:focus-within .side-nav a span, .sidebar.open .side-nav a span { opacity: 1; }
.side-nav a:hover { color: var(--text); background: var(--panel); }
.side-nav a.active { color: #fff; background: var(--panel-2); border-left-color: var(--red); }
.side-nav a.active svg { color: var(--red); }

.side-backdrop { display: none; }

/* ---------- Bandeau du haut ---------- */
.shell { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.stats { display: flex; align-items: center; flex: 1; min-width: 0; overflow: hidden; }
.stat-item { display: flex; align-items: center; gap: 11px; padding: 0 20px; border-right: 1px solid var(--line); }
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border-right: 0; }
.stat-item > svg { color: var(--dim); width: 22px; height: 22px; }
.stat-item div { display: flex; flex-direction: column; line-height: 1.25; }
.stat-k { font-size: .74rem; color: var(--dim); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.stat-v { display: flex; align-items: center; gap: 7px; font-weight: 700; font-family: var(--mono); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-chip { display: flex; align-items: center; gap: 4px; }
.user-link { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; padding: 4px 8px; border-radius: var(--radius); }
.user-link:hover { background: var(--panel); }
.user-link img { width: 30px; height: 30px; border-radius: 50%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--panel); }
.burger { display: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 3px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  color: #fff;
  background: var(--panel-2);
}
.btn svg { width: 18px; height: 18px; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-red { background: var(--red); }
.btn-red:hover { background: #e03636; }
.btn-outline { background: rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .4); }
.btn-outline:hover { border-color: #fff; }
.btn-red-outline { background: transparent; border-color: var(--red); }
.btn-red-outline:hover { background: var(--red); }
.btn-discord { background: var(--discord); }
.btn-discord:hover { background: #4752c4; }
.btn-small { padding: 4px 11px; font-size: .84rem; background: transparent; border-color: var(--line-2); color: var(--muted); }
.btn-small:hover { color: #fff; border-color: var(--muted); }
.btn[aria-disabled="true"] { background: var(--panel-2); color: var(--dim); pointer-events: none; }

/* ---------- Contenu ---------- */
main { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 24px 48px; flex: 1; }
.page:not([data-page="accueil"]) { padding-top: 6px; }

/* Titre de section : petit, en capitales, suivi d'un filet */
.section-head { display: flex; align-items: center; gap: 14px; margin: 30px 0 14px; }
.section-head h2 {
  margin: 0;
  font-size: .95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.section-head h2::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--red); margin-right: 10px; vertical-align: 1px; }
.section-head::after { content: ''; flex: 1; height: 1px; background: var(--line); order: 1; }
.section-head > :not(h2) { order: 2; }
.more-link { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: .86rem; white-space: nowrap; }
.more-link:hover { color: var(--text); }
.more-link svg { width: 15px; height: 15px; }

/* Bannière */
.hero {
  margin: 0 -24px;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 44px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(16, 17, 19, .2) 0%, rgba(16, 17, 19, .5) 60%, var(--bg) 100%),
    url('/img/hero.jpg') center 35% / cover no-repeat,
    linear-gradient(180deg, #1d1416 0%, var(--bg) 85%);
}
.hero-inner { max-width: 880px; }
.hero-logo { display: flex; flex-direction: column; align-items: center; line-height: 1; margin-bottom: 14px; }
.hero-logo .logo-mark { width: 140px; height: 140px; margin-bottom: 6px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .7)); }
.hero-logo .logo-ark { font-size: 1.2rem; }
.hero-logo .logo-modoru { font-size: clamp(2.5rem, 7vw, 4.2rem); }
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 900; margin: 6px 0 8px; }
.hero h1 span { color: var(--red); }
.hero p { color: #d6d8db; font-size: 1.08rem; margin-bottom: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Clusters */
.cluster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cluster {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--c);
  background: var(--panel);
  display: flex;
  flex-direction: column;
}
.cluster-img { height: 140px; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.cluster.basic .cluster-img { background-image: url('/img/cluster-basic.jpg'), linear-gradient(160deg, #1b3a2c, #12201b); }
.cluster.rapide .cluster-img { background-image: url('/img/cluster-rapide.jpg'), linear-gradient(160deg, #46220f, #20130e); }
.cluster-body { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.cluster-title { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cluster-title svg { width: 34px; height: 34px; color: var(--c); }
.cluster-title h3 { margin: 0; font-size: 1.25rem; font-weight: 900; color: var(--c); text-transform: uppercase; letter-spacing: .03em; }
.cluster-title span { color: var(--muted); font-size: .92rem; }
.cluster-body p { color: #cfd2d6; font-size: .95rem; }
.cluster-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.cluster-link { margin-top: auto; align-self: flex-end; display: inline-flex; align-items: center; color: var(--c); text-decoration: none; font-size: .88rem; font-weight: 600; }
.cluster-link svg { width: 15px; height: 15px; }

/* Vie du serveur + Discord */
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; }
.split > [hidden] { display: none; }
.split:has(> #home-discord[hidden]) { grid-template-columns: 1fr; }
.life-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.discord-card { display: flex; flex-direction: column; gap: 14px; }
.discord-row { display: flex; gap: 14px; align-items: flex-start; }
.discord-big { width: 40px; height: 40px; color: var(--discord); }

/* Cartes génériques */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stack { display: grid; gap: 12px; }
.top-gap { margin-top: 16px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
}
.card.warn { border-left: 3px solid var(--orange); margin: 16px 0; }
.login-card { text-align: center; padding: 32px 18px; margin-top: 24px; }
.login-card .btn { margin-top: 8px; }

.kpi { display: flex; flex-direction: column; justify-content: center; }
.kpi-label { color: var(--dim); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.kpi-value { font-family: var(--mono); font-size: 1.8rem; font-weight: 800; color: #fff; }
.kpi-value.red { color: var(--red); }

.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); }
.pos { color: var(--green); }
.neg { color: #e46a6a; }

.badge {
  display: inline-block;
  font-size: .72rem;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line-2);
  white-space: nowrap;
}
.badge.ok { color: var(--green); }
.badge.accent { color: #e46a6a; }

.bar { height: 8px; background: #0b0c0d; border-radius: 2px; overflow: hidden; margin: 8px 0 4px; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; background: var(--red); }
.bar.done > span { background: var(--green); }
.stage { padding: 10px 0; border-top: 1px solid var(--line); }
.stage:first-of-type { border-top: 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.more { margin-top: 4px; }
.more summary { cursor: pointer; color: var(--muted); font-size: .86rem; padding: 6px 0; }
.more summary:hover { color: var(--text); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
td.num, th.num { text-align: right; font-family: var(--mono); }
tr.me td { background: rgba(211, 43, 43, .12); }
.rank-1 td:first-child { color: #e8c15a; font-weight: 800; }
.rank-2 td:first-child { color: #c9ced4; font-weight: 800; }
.rank-3 td:first-child { color: #c98a55; font-weight: 800; }

/* Boutique */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.toolbar select, .toolbar input {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 11px;
  font: inherit;
  min-width: 0;
}
.toolbar input { flex: 1; min-width: 180px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { background: var(--bg-2); color: var(--muted); border: 0; padding: 8px 15px; font: inherit; cursor: pointer; }
.seg button.active { background: var(--red); color: #fff; font-weight: 700; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.item { display: flex; flex-direction: column; gap: 4px; }
.item .price { font-family: var(--mono); color: var(--gold); font-weight: 800; margin-top: auto; }
.item .contents { color: var(--muted); font-size: .85rem; word-break: break-word; }

/* ---------- Mon espace ---------- */
.sub-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 0 0 10px; font-weight: 800; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(250px, 1fr); gap: 14px; align-items: start; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.profile-head img { width: 68px; height: 68px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.profile-head h3 { font-size: 1.45rem; margin: 0 0 2px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Étiquettes du profil : un filet de couleur à gauche, pas de pastille */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  --c: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 3px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  border-left: 3px solid var(--c);
}
.tag-chip svg { width: 15px; height: 15px; color: var(--c); }

/* Tuiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.tile {
  --c: var(--red);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px;
  text-align: left;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-top: 3px solid var(--c);
  background: var(--panel-2);
  transition: background .12s, border-color .12s;
  min-width: 0;
}
.tile:hover, .tile:focus-visible { background: #24262a; border-color: var(--line-2); border-top-color: var(--c); outline: none; }
.tile-head { display: flex; align-items: center; gap: 12px; padding-right: 22px; }
.tile-icon { display: inline-flex; color: var(--c); flex: none; }
.tile-icon svg { width: 26px; height: 26px; }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-title { color: var(--dim); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.tile-value { font-size: 1.08rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.tile-sub { color: var(--dim); font-size: .78rem; }
.tile-alert {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: .78rem;
  color: #fff;
  background: var(--red);
}

.tile-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 72px;
  padding: 10px 11px;
  border-radius: 3px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.pv-empty { color: var(--dim); margin: auto; }
.pv-row { display: flex; align-items: center; gap: 8px; font-size: .84rem; min-width: 0; }
.pv-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #d9dbde; }
.pv-right { color: var(--muted); font-family: var(--mono); font-size: .8rem; white-space: nowrap; }
.pv-dot { width: 7px; height: 7px; border-radius: 1px; flex: none; background: var(--c); }
.pv-dot.basic { background: var(--basic); }
.pv-dot.rapide { background: var(--rapide); }
.pv-dot.green { background: var(--green); }
.pv-bar { display: block; height: 6px; border-radius: 1px; background: #0b0c0d; overflow: hidden; }
.pv-bar > span { display: block; height: 100%; background: var(--c); }
.pv-spark { width: 100%; height: 36px; display: block; }
.pv-spark-line { fill: none; stroke: var(--c); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pv-spark-area { fill: color-mix(in srgb, var(--c) 14%, transparent); stroke: none; }

.tile-more { display: inline-flex; align-items: center; gap: 2px; align-self: flex-end; color: var(--dim); font-size: .8rem; font-weight: 700; }
.tile-more svg { width: 14px; height: 14px; }
.tile:hover .tile-more { color: var(--c); }

/* Tuile des votes */
.vote-tile { display: flex; flex-direction: column; gap: 2px; border-top: 3px solid var(--red); }
.vote-box { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.vote-box .btn { justify-content: center; }

/* Cartes de tribu (dans la fiche « Mes tribus ») */
.tribe-card {
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
  position: relative;
  border-left: 3px solid var(--red);
  transition: background .12s;
}
.tribe-card:hover, .tribe-card:focus-visible { background: var(--panel-2); outline: none; }
.tribe-card h3 { font-size: 1.15rem; }
.tribe-stats { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.tribe-stats span { color: var(--muted); font-size: .85rem; }
.tribe-stats b { color: #fff; font-family: var(--mono); font-size: 1.05rem; margin-right: 4px; }
.tribe-open { position: absolute; right: 14px; bottom: 12px; color: var(--muted); font-size: .84rem; display: inline-flex; align-items: center; }
.tribe-open svg { width: 15px; height: 15px; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); margin-right: 6px; vertical-align: middle; }
.status-dot.on { background: var(--green); }

/* Fenêtre */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box {
  --c: var(--red);
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-top: 4px solid var(--c);
  border-radius: var(--radius);
}
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--panel-2); font-size: .95rem; }
.modal-inner { padding: 18px 22px 22px; }
.modal-inner .sub-title:first-child { margin-top: 0; }
body.modal-open { overflow: hidden; }

/* Bandeau de fiche : aplat, filet et titre de la couleur de la tuile */
.fiche-banner {
  position: relative;
  padding: 24px 22px 18px;
  background: color-mix(in srgb, var(--c) 9%, var(--panel));
  border-bottom: 1px solid color-mix(in srgb, var(--c) 40%, var(--line));
}
.fiche-kicker { color: var(--c); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fiche-banner h3 { font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 900; margin: 4px 40px 12px 0; }
.fiche-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.fiche-stats div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 3px; padding: 8px 12px; }
.fiche-stats b { display: block; font-family: var(--mono); font-size: 1.3rem; color: var(--c); }
.fiche-stats b.pos { color: var(--green); }
.fiche-stats span { color: var(--dim); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
.modal-box .card { background: var(--panel); }
.modal-box .kpi-value.red { color: var(--c); }
.modal-box .bar > span { background: var(--c); }
.member-list li { align-items: center; }
.member-list .me { color: var(--c); font-weight: 700; }

.notice { background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--red); border-radius: var(--radius); padding: 10px 14px; margin: 16px 0 0; }

.footer { text-align: center; padding: 18px; color: var(--dim); font-size: .84rem; border-top: 1px solid var(--line); }

[hidden] { display: none !important; }

/* Couleur par thème : chaque bloc coloré lit --c (placé après les valeurs par défaut). */
.c-red, .red { --c: var(--red); }
.c-violet, .violet { --c: var(--violet); }
.c-orange, .orange { --c: var(--orange); }
.c-gold, .gold { --c: var(--gold); }
.c-blue, .blue { --c: var(--blue); }
.c-green, .green { --c: var(--green); }
.c-grey, .grey { --c: var(--grey); }
.basic { --c: var(--basic); }
.rapide { --c: var(--rapide); }

/* ---------- Tablette / téléphone ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .top-actions .btn-red-outline span { display: none; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); width: var(--side-open); transition: transform .18s ease; }
  .sidebar:hover, .sidebar:focus-within { width: var(--side-open); }
  .sidebar.open { transform: none; }
  .sidebar .logo-text, .side-nav a span { opacity: 1; }
  .side-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 35; }
  .shell { margin-left: 0; }
  .burger { display: inline-flex; }
  .topbar { padding: 0 12px; gap: 10px; }
  .stat-item { padding: 0 12px; }
  .stat-item > svg, .stat-k { display: none; }
  .stat-item div { flex-direction: row; }
  .stat-v::after { font-weight: 400; color: var(--muted); font-size: .8rem; font-family: var(--body); }
  #stat-servers .stat-v::after { content: 'serveurs'; }
  #stat-players .stat-v::after { content: 'joueurs'; }
  #stat-discord { display: none !important; }
  .top-actions .btn-red-outline { display: none !important; }
  .user-link span { display: none; }
  main { padding: 0 16px 40px; }
  .hero { margin: 0 -16px; min-height: 360px; }
  .btn-discord#btn-login span { display: none; }
}

@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile { padding: 12px; }
  .tile-preview { min-height: 0; }
}

@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; justify-content: center; }
  .kpi-value { font-size: 1.5rem; }
}
