:root {
  --bg: #0f1117;
  --bg2: #161922;
  --card: #1b1f2a;
  --line: #2a2f3d;
  --text: #e8eaf0;
  --muted: #9aa1b2;
  --accent: #f5b83d;
  --accent2: #8b5cf6;
  --green: #3ecf8e;
  --red: #f0616d;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: Outfit, Inter, sans-serif; margin: 0; }
code { background: var(--bg2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.hero {
  background:
    radial-gradient(800px 300px at 15% -10%, rgba(139, 92, 246, .35), transparent 70%),
    radial-gradient(700px 300px at 90% 0%, rgba(245, 184, 61, .22), transparent 70%),
    var(--bg2);
  border-bottom: 1px solid var(--line);
}
.hero-inner { display: flex; align-items: center; gap: 20px; padding-top: 36px; padding-bottom: 24px; flex-wrap: wrap; }
.icon { width: 92px; height: 92px; border-radius: 26px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.hero-text { flex: 1; min-width: 220px; }
h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -.5px; }
.tagline { margin: 4px 0 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.chip b { color: var(--text); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }
.btn-join {
  background: #5865f2; color: #fff; text-decoration: none; font-weight: 600;
  padding: 12px 22px; border-radius: 12px; transition: transform .15s, background .15s;
}
.btn-join:hover { background: #4752c4; transform: translateY(-1px); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab {
  background: none; border: 0; color: var(--muted); font: 600 14px Inter, sans-serif;
  padding: 12px 14px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

main.wrap { padding-top: 24px; padding-bottom: 24px; }
body { overflow-x: hidden; }
.stats > *, .grid2 > *, .items > * { min-width: 0; }
.panel { display: none; }
.panel.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Accueil */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat-label { display: block; color: var(--muted); font-size: 13px; }
.stat-value { font: 700 26px Outfit, sans-serif; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h2 { font-size: 20px; margin-bottom: 12px; }
.card h3 { font-size: 15px; margin: 18px 0 10px; color: var(--muted); }
.rules { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.rules li { color: #cfd3dd; }
.rules li.note { color: var(--muted); font-style: italic; }
.features { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: #cfd3dd; }
.tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.tier { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 13px; }
.tier small { color: var(--muted); }

/* Classements */
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.seg-btn { background: none; border: 0; color: var(--muted); font: 600 14px Inter, sans-serif; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.seg-btn.active { background: var(--card); color: var(--text); box-shadow: 0 1px 0 var(--line); }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.row.top1 { border-color: rgba(245, 184, 61, .6); background: linear-gradient(90deg, rgba(245,184,61,.12), var(--card) 60%); }
.row.top2 { border-color: rgba(192, 192, 192, .45); }
.row.top3 { border-color: rgba(205, 127, 50, .5); }
.rank { width: 34px; text-align: center; font: 700 16px Outfit, sans-serif; color: var(--muted); flex: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg2); flex: none; }
.who { flex: 1; min-width: 0; }
.who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--muted); }
.value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.value small { display: block; color: var(--muted); font-weight: 400; }
.pos { color: var(--green); } .neg { color: var(--red); }

/* Boutique / marché */
.hint { color: var(--muted); margin: 0 0 16px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.item.out { opacity: .55; }
.item h3 { font-size: 18px; color: var(--text); margin: 0; overflow-wrap: anywhere; }
.item p { margin: 0; color: #cfd3dd; font-size: 14px; }
.price { font: 700 22px Outfit, sans-serif; color: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { font-size: 12px; border-radius: 999px; padding: 2px 10px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); }
.tag.role { color: var(--text); }
.tag.bad { color: var(--red); border-color: rgba(240,97,109,.4); }
.tag.good { color: var(--green); border-color: rgba(62,207,142,.4); }
.empty { color: var(--muted); text-align: center; padding: 40px 0; grid-column: 1 / -1; }

.footer { color: var(--muted); font-size: 13px; padding-top: 8px; padding-bottom: 32px; }

/* Commun */
.muted { color: var(--muted); font-weight: 400; font-size: 14px; }
.hint.small { font-size: 13px; margin: 8px 0 12px; }
.card.wide { margin: 16px 0; }
.grid2 + .card.wide, .card.wide + .grid2 { margin-top: 16px; }
.grid2 { margin-bottom: 0; }
.mt { margin-top: 22px; }
.live-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.live { font: 600 12px Inter, sans-serif; color: var(--red); margin-left: 6px; vertical-align: 3px; }
.small-avatar { width: 24px; height: 24px; border-radius: 50%; vertical-align: -7px; margin-right: 6px; background: var(--bg2); }
.clickable { cursor: pointer; transition: border-color .15s, transform .15s; }
.clickable:hover { border-color: var(--accent2); transform: translateY(-1px); }

/* Vocal + musique */
.np { display: flex; gap: 12px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 12px; }
.np img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; background: var(--card); }
.np-info { min-width: 0; flex: 1; }
.np-info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-info small { color: var(--muted); display: block; }
.bar { height: 4px; background: var(--line); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.queue { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 13px; }
.vc { margin-bottom: 10px; }
.vc-name { font-weight: 600; margin-bottom: 6px; }
.vc-people { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 13px; }
.pill img { width: 22px; height: 22px; border-radius: 50%; }
.empty-small { color: var(--muted); font-size: 14px; margin: 0; }

/* Giveaways */
.gw { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--bg2); }
.gw.ended { opacity: .65; }
.gw b { display: block; overflow-wrap: anywhere; }
.gw small { color: var(--muted); }

/* Annonces */
.ann { border-left: 3px solid var(--accent2); padding: 4px 0 4px 12px; margin-bottom: 14px; }
.ann-head { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.ann h4 { margin: 0 0 4px; font-family: Outfit, sans-serif; font-size: 16px; }
.ann p { margin: 0; white-space: pre-line; color: #cfd3dd; font-size: 14px; overflow-wrap: anywhere; }
.ann img.pic { max-width: 100%; border-radius: 8px; margin-top: 8px; }

/* Activité */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.feed li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #cfd3dd; }
.feed .ico { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--bg2); display: grid; place-items: center; font-size: 14px; overflow: hidden; }
.feed .ico img { width: 100%; height: 100%; }
.feed small { display: block; color: var(--muted); font-size: 12px; }

/* Graphiques */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.charts h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.chart svg { width: 100%; height: 160px; display: block; }
.chart .now { font: 700 20px Outfit, sans-serif; }

/* Recherche / outils */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.toolbar .seg { margin-bottom: 0; }
.search { flex: 1; min-width: 200px; background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 10px 14px; font: 15px Inter, sans-serif; }
.search:focus { outline: 2px solid var(--accent2); outline-offset: 1px; }
.check { color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
#results { margin-bottom: 20px; }

/* Connexion */
.hero-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.btn-login { background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); text-align: center; }
.btn-login:hover { border-color: #5865f2; }
.userbox { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; }
.userbox img { width: 28px; height: 28px; border-radius: 50%; }
.userbox span { font-weight: 600; flex: 1; }

/* Formulaires (espace membre / admin) */
.admin-nav { display: flex; flex-wrap: wrap; margin-bottom: 12px; }
.admin-msg { position: sticky; top: 8px; z-index: 5; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; }
.admin-msg.good { background: rgba(62,207,142,.15); border: 1px solid rgba(62,207,142,.5); }
.admin-msg.bad { background: rgba(240,97,109,.15); border: 1px solid rgba(240,97,109,.5); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 8px 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.field[hidden] { display: none; }
.inp { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 10px; font: 14px Inter, sans-serif; width: 100%; }
.inp:focus { outline: 2px solid var(--accent2); outline-offset: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn { background: var(--green); color: #06281a; border: 0; border-radius: 10px; padding: 9px 16px; font: 600 14px Inter, sans-serif; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }
.btn.secondary { background: var(--bg2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--red); color: #fff; }
.btn-small { background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; cursor: pointer; font-size: 12px; }
.inv { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.inv li { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.suggest { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.suggest .tag { cursor: pointer; }
.row.ended { opacity: .6; }
.cat h3 { margin: 12px 0 6px; font-size: 15px; }

/* Pêche */
.fish-table { display: grid; gap: 8px; }
.fish-row { display: grid; grid-template-columns: minmax(130px, 1.2fr) 2fr 110px 140px; gap: 12px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.fish-row.special { border-color: rgba(245,184,61,.5); background: linear-gradient(90deg, rgba(245,184,61,.1), var(--bg2) 60%); }
.fish-name { font-weight: 600; }
.fish-bar { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; }
.fish-bar span { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, #8b5cf6); border-radius: 8px; min-width: 3px; }
.fish-pct, .fish-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.fish-pct small, .fish-val small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
@media (max-width: 640px) {
  .fish-row { grid-template-columns: 1fr auto; }
  .fish-bar { grid-column: 1 / -1; grid-row: 2; }
  .fish-val { grid-column: 1 / -1; text-align: left; }
}

/* Commandes */
.cat { margin-bottom: 22px; }
.cat h2 { font-size: 18px; margin-bottom: 10px; }
.cmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.cmd { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.cmd code { background: none; border: 0; padding: 0; font-size: 15px; color: var(--accent); font-weight: 600; }
.cmd p { margin: 4px 0 0; color: #cfd3dd; font-size: 14px; }
.cmd .subs { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.cmd .tag { font-size: 11px; }
.badge-admin { font-size: 11px; color: var(--red); border: 1px solid rgba(240,97,109,.4); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; }

/* Rôles */
.ladder { display: grid; gap: 8px; }
.step { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line)); border-radius: 10px; padding: 8px 12px; }
.step small { color: var(--muted); white-space: nowrap; }
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.role { background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line)); border-radius: 10px; padding: 12px; }
.role b { color: var(--c, var(--text)); }
.role p { margin: 4px 0 6px; color: var(--muted); font-size: 13px; }
.role ul { margin: 0; padding-left: 18px; font-size: 13px; color: #cfd3dd; }

/* VIP / staff : cartes de personnes */
.vip-hero { background: linear-gradient(135deg, rgba(165,105,189,.22), var(--card) 60%); border-color: rgba(165,105,189,.5); }
.vip-hero > p { color: #cfd3dd; margin: 0 0 8px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.person { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px; text-align: center; min-width: 0; }
.person img { width: 64px; height: 64px; border-radius: 50%; background: var(--card); }
.person b { display: block; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { color: var(--muted); font-size: 12px; }
.staff-group { margin-bottom: 18px; }
.staff-group h2 { font-size: 18px; color: var(--c, var(--text)); }
.staff-group p { color: var(--muted); margin: 2px 0 10px; font-size: 14px; }

/* Profil (fenêtre) */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; z-index: 10; backdrop-filter: blur(3px); }
.modal[hidden] { display: none; }
.modal-box { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; width: min(680px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; animation: fade .2s ease; }
.modal-close { position: absolute; top: 12px; right: 12px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; }
.p-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; padding-right: 36px; }
.p-head img { width: 84px; height: 84px; border-radius: 50%; flex: none; }
.p-head h2 { font-size: 24px; overflow-wrap: anywhere; }
.p-head small { color: var(--muted); }
.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.p-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.p-box span { display: block; color: var(--muted); font-size: 12px; }
.p-box b { font: 700 18px Outfit, sans-serif; }
.p-sec { margin: 16px 0 8px; font-size: 15px; color: var(--muted); }
.p-roles { display: flex; flex-wrap: wrap; gap: 6px; }
table.games { width: 100%; border-collapse: collapse; font-size: 13px; }
table.games th, table.games td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.games th:first-child, table.games td:first-child { text-align: left; }
table.games th { color: var(--muted); font-weight: 500; }
.table-wrap { overflow-x: auto; }

@media (max-width: 560px) {
  .row { gap: 8px; padding: 10px; }
  .rank { width: 24px; }
  .avatar { width: 34px; height: 34px; }
  .value { font-size: 14px; }
  .seg { display: flex; }
  .seg-btn { flex: 1; padding: 8px 6px; }
  .hero-inner { padding-top: 24px; }
  .icon { width: 64px; height: 64px; border-radius: 18px; }
  .btn-join { width: 100%; text-align: center; }
  .stat-value { font-size: 22px; }
}
