/* Thème du site : sombre, une couleur d'accent (réglable dans l'admin). */
:root {
  --bg: #0e0e13;
  --bg-2: #15151c;
  --card: #1a1a23;
  --card-2: #20202b;
  --line: #2b2b38;
  --text: #ececf3;
  --muted: #9a9aab;
  --good: #3ecf8e;
  --warn: #f5b301;
  --bad: #ff5c6c;
  --radius: 14px;
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-top: 32px; padding-bottom: 64px; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 12px; text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; width: 100%; }
.wrap-wide { max-width: 1280px; }
.mt { margin-top: 24px; } .mt-lg { margin-top: 48px; } .mb { margin-bottom: 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* En-tête */
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 18px; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.nav { display: flex; gap: 20px; font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-right form { margin: 0; }
.avatar { border-radius: 50%; }
.uname { font-weight: 600; font-size: 14px; }
@media (max-width: 760px) { .nav, .uname { display: none; } }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 15px; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); text-decoration: none; cursor: pointer; transition: transform .12s ease, background .12s ease, border-color .12s ease; }
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--bad) 60%, var(--line)); color: var(--bad); }
.btn-sm { padding: 7px 12px; font-size: 14px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Cartes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-accent { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--card)), var(--card) 60%); }
.card h3 { margin-bottom: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--muted); white-space: nowrap; }
.badge-on { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.badge-premium { color: #fff; background: linear-gradient(90deg, var(--accent), #ff4f8b); border: 0; }
.badge-off { color: var(--muted); }
.badge-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.badge-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }

/* Accueil */
.hero { padding: 56px 0 24px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 54ch; }
.hero-art { position: relative; aspect-ratio: 1 / 0.9; }
.hero-art .bubble { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); max-width: 78%; }
.hero-art .bubble b { color: var(--accent); }
.hero-art .b1 { top: 4%; left: 0; } .hero-art .b2 { top: 34%; right: 0; } .hero-art .b3 { bottom: 6%; left: 8%; }
.glow { position: absolute; inset: 15%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%); filter: blur(30px); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero-art { display: none; } }
.feature { display: flex; gap: 14px; }
.feature .emoji { font-size: 26px; line-height: 1; }
.price { font-family: var(--font-display); font-size: 34px; font-weight: 800; }
.price small { font-family: var(--font-body); font-size: 15px; color: var(--muted); font-weight: 500; }
.checklist { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; gap: 8px; }
.checklist li::before { content: "✓"; color: var(--good); font-weight: 800; margin-right: 10px; }

/* Serveurs */
.gicon { border-radius: 14px; object-fit: cover; flex: none; }
.gicon-txt { --s: 48px; width: var(--s); height: var(--s); display: inline-grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); font-weight: 800; font-size: 14px; color: var(--muted); }
.guild-card { display: flex; align-items: center; gap: 14px; }
.guild-card .grow { flex: 1; min-width: 0; }
.guild-card .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Modules */
.module { display: flex; flex-direction: column; gap: 10px; }
.module-head { display: flex; align-items: center; gap: 10px; }
.module-head .emoji { font-size: 22px; }
.module-head h3 { margin: 0; flex: 1; }
.module p { color: var(--muted); font-size: 14px; flex: 1; }
.module .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.module.locked { opacity: .75; }

/* Statistiques */
.stat { padding: 18px; }
.stat .k { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-family: var(--font-display); font-size: 28px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Formulaires */
form { margin: 0; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 700; font-size: 14px; }
.field .help { color: var(--muted); font-size: 13px; }
input[type=text], input[type=number], input[type=password], input[type=email], input[type=url], select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; max-height: 260px; overflow: auto; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.reward-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form select, .inline-form input { width: auto; flex: 1; min-width: 180px; }
.role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; }
code, .code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.copy { display: flex; gap: 8px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 12px; }
.copy code { border: 0; background: none; padding: 0; flex: 1; overflow-x: auto; white-space: nowrap; }

/* Messages */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; border: 1px solid var(--line); }
.flash-success { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); background: color-mix(in srgb, var(--good) 12%, var(--card)); }
.flash-error { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); background: color-mix(in srgb, var(--bad) 12%, var(--card)); }
.flash-info { background: var(--card); }
.notice { border-left: 3px solid var(--warn); padding: 10px 14px; background: var(--card); border-radius: 8px; color: var(--muted); font-size: 14px; }

/* Menu admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.tabs a { text-decoration: none; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tabs a.on, .tabs a:hover { background: var(--card-2); color: var(--text); }

/* Assistant d'installation */
.steps { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.steps span { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.steps span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps span.done { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
ol.howto { padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
ol.howto b { color: var(--text); }

/* Pied de page */
.foot { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }
.legal { max-width: 75ch; }
.legal h2 { margin-top: 32px; font-size: 20px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
