/* ==========================================================================
   Janus — feuille de style commune (plateforme, sites de serveur, panels).
   Le site d'un serveur redéfinit --accent / --accent-rgb sur <body>.
   ========================================================================== */

:root {
  --bg: #07090f;
  --bg-2: #0b0e16;
  --surface: #10141f;
  --surface-2: #151a28;
  --surface-3: #1b2131;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #e8ecf4;
  --text-2: #c3cad8;
  --muted: #8590a6;
  --faint: #5b6478;
  --accent: #f5a524;
  --accent-rgb: 245, 165, 36;
  --accent-2: #22d3ee;
  --accent-2-rgb: 34, 211, 238;
  --on-accent: #0b0d12;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --gold: #f5c542;
  --silver: #cbd5e1;
  --bronze: #d6935a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, .6);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
svg:not([width]) { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .9em; }
::selection { background: rgba(var(--accent-rgb), .35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grad-text {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- Boutons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font: 600 14px/1 var(--font);
  cursor: pointer; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, .2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary {
  background: var(--accent); border-color: transparent; color: var(--on-accent);
  box-shadow: 0 6px 24px -8px rgba(var(--accent-rgb), .7);
}
.btn-primary:hover { background: var(--accent); color: var(--on-accent); filter: brightness(1.08); box-shadow: 0 8px 30px -8px rgba(var(--accent-rgb), .9); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: transparent; }
.btn-danger { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .35); color: #fecaca; }
.btn-danger:hover { background: rgba(248, 113, 113, .22); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.link { color: var(--accent); font-weight: 600; }
.link:hover { color: var(--accent); text-decoration: underline; }

/* ---- Badges ------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; font: 600 12px/1 var(--font); background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line); color: var(--text-2); white-space: nowrap;
}
.badge-accent { background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .35); color: var(--accent); }
.badge-ok { background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .3); color: #6ee7b7; }
.badge-bad { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .3); color: #fca5a5; }
.badge-warn { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .3); color: #fcd34d; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
.dot-bad { background: var(--bad); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ---- Navigation ----------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 15, .72); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.topbar .wrap { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font: 700 19px/1 var(--display); letter-spacing: -.02em; flex: none; }
.brand img, .brand svg { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.brand small { display: block; font: 500 11px/1.2 var(--font); color: var(--muted); letter-spacing: .02em; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-links a {
  padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap;
}
.nav-links a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-links a.active { color: #fff; background: rgba(var(--accent-rgb), .12); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.user-chip:hover { border-color: var(--line-2); }

.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  display: none; z-index: 60;
}
.menu.open .menu-panel { display: block; }
.menu-panel a, .menu-panel button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 8px;
  background: none; border: 0; color: var(--text-2); font: 500 14px var(--font); cursor: pointer; text-align: left;
}
.menu-panel a:hover, .menu-panel button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 18px; background: rgba(9, 11, 18, .97); border-bottom: 1px solid var(--line);
    display: none; max-height: calc(100vh - 66px); overflow: auto;
  }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
  body.nav-open .nav-links { display: flex; }
  .brand small { display: none; }
}

/* ---- Avatars -------------------------------------------------------------------- */
.avatar {
  --h: 200; width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center;
  font: 700 14px/1 var(--display); color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 40) 70% 38%));
}
.avatar-round { border-radius: 50%; }
.avatar-lg { width: 64px; height: 64px; font-size: 26px; border-radius: 16px; }
.avatar-xs { width: 24px; height: 24px; font-size: 11px; border-radius: 7px; }

/* ---- Héros ------------------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; filter: saturate(1.15); }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 15% 10%, rgba(var(--accent-rgb), .30), transparent 70%),
    radial-gradient(50% 70% at 90% 30%, rgba(var(--accent-2-rgb), .18), transparent 70%),
    linear-gradient(180deg, rgba(7, 9, 15, .15) 0%, rgba(7, 9, 15, .65) 60%, var(--bg) 100%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.hero-inner { padding-top: 92px; padding-bottom: 84px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 7vw, 78px); font-weight: 700; letter-spacing: -.035em; margin-bottom: 18px; }
.hero .lead { font-size: clamp(16px, 2vw, 19px); color: var(--text-2); max-width: 600px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.hero-logo { width: 92px; height: 92px; border-radius: 22px; margin-bottom: 22px; box-shadow: 0 20px 50px -15px rgba(var(--accent-rgb), .6); object-fit: cover; }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 56px; gap: 32px; }
}

/* Carte « rejoindre » (adresse à copier) */
.join-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.join-card h3 { font-size: 15px; font-family: var(--font); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.join-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); margin-bottom: 10px; }
.join-row .ed { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); width: 66px; flex: none; }
.join-row .addr { font: 600 15px/1.3 var(--mono); color: #fff; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-row button { flex: none; }
.join-status { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; }
.join-status .count { font: 700 26px/1 var(--display); }
.meter { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---- Sections ------------------------------------------------------------------ */
main { flex: 1; }
.section { padding: 72px 0; }
.section-tight { padding: 44px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.kicker { font: 700 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: block; }
.page-head { padding: 56px 0 30px; border-bottom: 1px solid var(--line); background: radial-gradient(70% 120% at 0% 0%, rgba(var(--accent-rgb), .14), transparent 60%); }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); margin: 0; }
.page-head p { color: var(--muted); margin: 10px 0 0; max-width: 720px; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }

/* ---- Cartes & grilles ---------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 16px; }
.card-body { padding: 20px; }
.card-link { transition: transform .2s, border-color .2s, box-shadow .2s; }
.card-link:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .45); box-shadow: 0 18px 40px -20px rgba(var(--accent-rgb), .5); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: 52px 0; } }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 22px 24px; }
.stat b { display: block; font: 700 30px/1.1 var(--display); letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 500; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Actualités ---------------------------------------------------------------- */
.news-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.news-cover { aspect-ratio: 16 / 9; background: var(--surface-2); position: relative; overflow: hidden; }
.news-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .news-cover img { transform: scale(1.04); }
.news-cover .ph {
  position: absolute; inset: 0; display: grid; place-items: center; font: 700 44px var(--display); color: rgba(255, 255, 255, .14);
  background: radial-gradient(90% 90% at 20% 0%, rgba(var(--accent-rgb), .35), transparent 70%), linear-gradient(135deg, var(--surface-2), var(--surface-3));
}
.news-cover .badge { position: absolute; left: 12px; top: 12px; backdrop-filter: blur(6px); background: rgba(0, 0, 0, .55); }
.news-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-body h3 { font-size: 19px; margin: 0; }
.news-body p { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.news-meta { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; }
.news-feature { display: grid; grid-template-columns: 1.3fr 1fr; overflow: hidden; }
.news-feature .news-cover { aspect-ratio: auto; min-height: 300px; }
.news-feature .news-body { padding: 30px; justify-content: center; }
.news-feature h3 { font-size: 28px; }
@media (max-width: 760px) { .news-feature { grid-template-columns: 1fr; } .news-feature .news-cover { min-height: 200px; } }
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cats a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); font-size: 14px; font-weight: 500; }
.cats a.active, .cats a:hover { border-color: rgba(var(--accent-rgb), .5); color: #fff; background: rgba(var(--accent-rgb), .12); }

/* Article / contenu riche */
.article-cover { border-radius: var(--radius); overflow: hidden; margin: 0 0 30px; border: 1px solid var(--line); }
.prose { font-size: 16.5px; line-height: 1.75; color: var(--text-2); max-width: 760px; }
.prose h2, .prose h3, .prose h4 { color: #fff; margin: 1.8em 0 .6em; }
.prose h2 { font-size: 27px; } .prose h3 { font-size: 21px; } .prose h4 { font-size: 18px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 12px; margin: 1.4em 0; border: 1px solid var(--line); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text); font-style: italic; }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: #fff; }
.prose pre { background: #05070b; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 2.2em 0; }
.prose strong { color: #fff; }
.callout { border-radius: 12px; padding: 14px 18px 2px; margin: 1.4em 0; border: 1px solid; }
.callout-info { background: rgba(96, 165, 250, .08); border-color: rgba(96, 165, 250, .3); }
.callout-warn { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .3); }
.callout-success { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .3); }
.callout-danger { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .3); }
.spoiler { background: var(--text-2); color: transparent; border-radius: 4px; cursor: pointer; transition: .2s; }
.spoiler:hover, .spoiler:focus { background: rgba(255, 255, 255, .08); color: inherit; }

/* ---- Classements --------------------------------------------------------------------- */
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 18px; align-items: end; }
.podium-step { position: relative; text-align: center; padding: 26px 18px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.podium-step::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c, var(--accent)); }
.podium-step::after { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--c, var(--accent)) 22%, transparent), transparent 70%); pointer-events: none; }
.podium-step.first { padding-top: 40px; padding-bottom: 32px; }
.podium-rank { width: 40px; height: 40px; margin: 0 auto 14px; border-radius: 12px; display: grid; place-items: center; font: 800 18px var(--display); color: #111; }
.podium-step.first .podium-rank { background: var(--gold); width: 48px; height: 48px; font-size: 22px; }
.podium-step.second .podium-rank { background: var(--silver); }
.podium-step.third .podium-rank { background: var(--bronze); }
.podium-step h3 { font-size: 20px; margin: 0 0 4px; }
.podium-step .tag { font: 700 12px var(--mono); color: var(--c); letter-spacing: .05em; }
.podium-step .score { font: 700 28px/1 var(--display); margin-top: 14px; }
.podium-step .score small { display: block; font: 500 12px var(--font); color: var(--muted); margin-top: 4px; }
@media (max-width: 760px) { .podium { grid-template-columns: 1fr; } .podium-step.first { order: -1; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 600 12px var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .015); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-cell { width: 56px; font: 700 15px var(--display); color: var(--muted); }
.rank-1 { color: var(--gold); } .rank-2 { color: var(--silver); } .rank-3 { color: var(--bronze); }
.who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.who b { font-weight: 600; color: #fff; }
.ftag { display: inline-flex; align-items: center; gap: 6px; font: 700 11px/1 var(--mono); padding: 4px 7px; border-radius: 6px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); white-space: nowrap; }
.chip-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 22px; }
.tabs a, .tabs button { padding: 9px 16px; border-radius: 9px; font: 600 14px var(--font); color: var(--muted); white-space: nowrap; background: none; border: 0; cursor: pointer; }
.tabs a:hover, .tabs button:hover { color: #fff; }
.tabs a.active, .tabs button.active { background: var(--surface-3); color: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---- Factions ---------------------------------------------------------------------- */
.faction-card { position: relative; padding: 20px; overflow: hidden; display: flex; flex-direction: column; gap: 14px; height: 100%; }
.faction-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--c); }
.faction-card .top { display: flex; align-items: center; gap: 14px; }
.crest { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font: 800 16px var(--display); color: #fff; flex: none; background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 40%, #000)); box-shadow: 0 8px 22px -8px var(--c); }
.crest-lg { width: 86px; height: 86px; font-size: 28px; border-radius: 22px; }
.faction-card h3 { margin: 0; font-size: 18px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini-stats div { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.mini-stats b { display: block; font: 700 16px var(--display); }
.mini-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.faction-hero { padding: 48px 0 36px; border-bottom: 1px solid var(--line); background: radial-gradient(70% 140% at 0% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 60%); }
.faction-hero .wrap { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.faction-hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 6px; }
.rel-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* Joueurs en ligne */
.player-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.player-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: 14px; }

/* ---- Cartes serveur (plateforme) ---------------------------------------------------- */
.server-card { overflow: hidden; display: flex; flex-direction: column; height: 100%; --accent: var(--sc); }
.server-card .banner { aspect-ratio: 16 / 7; position: relative; background: radial-gradient(100% 120% at 0% 0%, color-mix(in srgb, var(--sc) 55%, transparent), transparent 65%), linear-gradient(135deg, var(--surface-2), #05070c); }
.server-card .banner img { width: 100%; height: 100%; object-fit: cover; }
.server-card .banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(16, 20, 31, .95)); }
.server-card .logo { position: absolute; left: 20px; bottom: -26px; z-index: 2; width: 62px; height: 62px; border-radius: 16px; border: 3px solid var(--surface); background: var(--surface-3); display: grid; place-items: center; font: 800 24px var(--display); color: var(--sc); overflow: hidden; }
.server-card .logo img { width: 100%; height: 100%; object-fit: cover; }
.server-card .status { position: absolute; right: 14px; top: 14px; z-index: 2; }
.server-card .body { padding: 38px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.server-card h3 { font-size: 22px; margin: 0; }
.server-card p { color: var(--muted); margin: 0; flex: 1; }
.server-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 6px; }

/* Plateforme : fonctionnalités */
.feature { padding: 26px; }
.feature .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; background: rgba(var(--accent-rgb), .12); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .25); }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: 14.5px; }
.janus-mark svg { width: 100%; height: auto; }
.janus-mark { width: 100%; max-width: 360px; margin: 0 auto; filter: drop-shadow(0 30px 60px rgba(var(--accent-rgb), .25)); }
.faces { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.face { padding: 22px; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01)); }
.face b { font: 700 13px var(--font); letter-spacing: .1em; text-transform: uppercase; }
.face.java b { color: var(--accent); } .face.bedrock b { color: var(--accent-2); }
.face p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* ---- Boutique ------------------------------------------------------------------------ */
.soon { text-align: center; padding: 80px 24px; position: relative; overflow: hidden; }
.soon .ico { width: 84px; height: 84px; border-radius: 24px; margin: 0 auto 24px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .12); border: 1px solid rgba(var(--accent-rgb), .3); color: var(--accent); }
.soon .ico svg { width: 38px; height: 38px; }
.soon h2 { font-size: 32px; }
.soon p { color: var(--muted); max-width: 520px; margin: 0 auto 8px; }
.shop-skeleton { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; opacity: .45; }
.shop-skeleton div { height: 150px; border-radius: 14px; border: 1px dashed var(--line-2); background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, .02) 12px 24px); }
@media (max-width: 640px) { .shop-skeleton { grid-template-columns: 1fr; } }

/* ---- Divers -------------------------------------------------------------------------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty b { display: block; color: var(--text); font: 600 17px var(--display); margin-bottom: 6px; }
.flashes { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.flash { padding: 13px 16px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-weight: 500; animation: flash-in .3s ease-out; display: flex; gap: 10px; align-items: flex-start; }
.flash-ok { border-color: rgba(52, 211, 153, .4); }
.flash-ok::before { content: '✓'; color: var(--ok); font-weight: 800; }
.flash-error { border-color: rgba(248, 113, 113, .45); }
.flash-error::before { content: '!'; color: var(--bad); font-weight: 800; }
@keyframes flash-in { from { opacity: 0; transform: translateY(10px); } }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.search { position: relative; }
.search input { padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }

/* Pied de page */
.footer { border-top: 1px solid var(--line); margin-top: 40px; background: var(--bg-2); }
.footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding: 48px 20px 30px; }
.footer h4 { font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.footer a { display: block; color: var(--text-2); padding: 3px 0; font-size: 14px; }
.footer a:hover { color: var(--accent); }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: 13px; }
.powered { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.powered svg { width: 18px; height: 18px; }
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr 1fr; } .footer .wrap > :first-child { grid-column: 1 / -1; } }

/* ---- Formulaires --------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > label, .label { font: 600 13px var(--font); color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.input, .field input[type=text], .field input[type=password], .field input[type=email], .field input[type=url], .field input[type=number], .field input[type=search], .field select, .field textarea, .search input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line-2);
  background: #0a0d15; color: var(--text); font: 14px var(--font); transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 120px; padding: 11px 13px; line-height: 1.6; resize: vertical; }
.field textarea.code, textarea.code { font-family: var(--mono); font-size: 13px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .search input:focus { outline: none; border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
.field input[type=color] { width: 56px; height: 42px; padding: 3px; border-radius: 10px; border: 1px solid var(--line-2); background: #0a0d15; cursor: pointer; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.field-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; padding: 4px 0; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check small { display: block; color: var(--muted); font-size: 12.5px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.error-text { color: #fca5a5; font-size: 13.5px; }
.preview-img { width: 100%; max-width: 320px; border-radius: 10px; border: 1px solid var(--line); margin-top: 6px; }

/* ---- Connexion -------------------------------------------------------------------------- */
.auth-page { display: grid; place-items: center; padding: 60px 20px; flex: 1; }
.auth-card { width: 100%; max-width: 430px; padding: 32px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 22px 0; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.btn-janus { background: linear-gradient(100deg, #f5a524, #22d3ee); color: #0b0d12; border: 0; }
.btn-janus:hover { color: #0b0d12; filter: brightness(1.08); }

/* ---- Panel d'administration -------------------------------------------------------------- */
.admin { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; }
.admin-side .brand { padding: 20px 20px 18px; border-bottom: 1px solid var(--line); }
.side-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav .group { font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .12em; color: var(--faint); padding: 16px 10px 6px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: 14px; }
.side-nav a svg { width: 18px; height: 18px; opacity: .75; flex: none; }
.side-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side-nav a.active { background: rgba(var(--accent-rgb), .13); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.side-nav a.active svg { color: var(--accent); opacity: 1; }
.side-foot { padding: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.side-foot .who { flex: 1; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-top { display: flex; align-items: center; gap: 14px; padding: 0 28px; height: 64px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: rgba(7, 9, 15, .85); backdrop-filter: blur(12px); }
.admin-top h1 { font-size: 19px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-body { padding: 28px; flex: 1; }
.admin-body.flush { padding: 0; display: flex; }
.admin-toggle { display: none; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; z-index: 70; width: 270px; transform: translateX(-100%); transition: transform .25s; }
  body.side-open .admin-side { transform: none; box-shadow: var(--shadow); }
  .admin-toggle { display: inline-flex; }
  .admin-top { padding: 0 16px; }
  .admin-body { padding: 18px 16px; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { padding: 18px 20px; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi b { display: block; font: 700 28px/1.2 var(--display); margin-top: 4px; }
.kpi small { color: var(--faint); font-size: 12.5px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .spacer { flex: 1; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.inline-form { display: inline; }
.console-frame { flex: 1; width: 100%; border: 0; min-height: calc(100vh - 64px); background: var(--bg); }
.node-group { margin-bottom: 18px; }
.node-group h4 { font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.node-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 18px; }
.node-grid .check code { color: var(--accent); font-size: 12px; }
.role-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 7px; font: 600 12px var(--font); background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); white-space: nowrap; }
.editor-tabs { display: flex; gap: 2px; margin-bottom: -1px; }
.editor-tabs button { padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 9px 9px 0 0; background: none; color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.editor-tabs button.active { background: #0a0d15; border-color: var(--line-2); color: #fff; }
.md-preview { min-height: 240px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 0 10px 10px 10px; background: #0a0d15; }
.md-help { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.md-help code { color: var(--text-2); }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }
.danger-zone { border-color: rgba(248, 113, 113, .3); }
.danger-zone .card-head h3 { color: #fca5a5; }
.secret { font-family: var(--mono); letter-spacing: .1em; }
.podium-step .crest { margin: 0 auto; }
