/* Panel admin de Braise : feu de camp, sobre et sombre. Les classes .d-* reproduisent Discord. */
:root {
  --bg: #0e0f11;
  --bg-2: #141518;
  --panel: #1a1b1f;
  --panel-2: #212226;
  --line: #2a2c31;
  --line-2: #34363c;
  --text: #ecebe9;
  --muted: #9a9ca3;
  --faint: #6d7078;
  --accent: #d14a03;
  --accent-2: #f07a2a;
  --gold: #f2b544;
  --moss: #4fb36a;
  --blood: #e5484d;
  --boost: #f47fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Discord */
  --dc-bg: #313338;
  --dc-side: #2b2d31;
  --dc-deep: #1e1f22;
  --dc-text: #dbdee1;
  --dc-muted: #949ba4;
  --dc-link: #00a8fc;
  --dc-embed: #2b2d31;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-2); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: rgba(209, 74, 3, 0.45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c2e33; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }

/* ───────────── Connexion ───────────── */
.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(600px 400px at 50% 110%, rgba(209, 74, 3, 0.35), transparent 70%),
    radial-gradient(900px 500px at 50% 120%, rgba(240, 122, 42, 0.12), transparent 70%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.login-card {
  width: min(400px, 100%);
  background: rgba(26, 27, 31, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px 30px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  z-index: 1;
}
.login-card h1 { margin: 14px 0 4px; font-size: 26px; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 22px; color: var(--muted); }
.login-card form { display: grid; gap: 12px; }
.login-error { color: var(--blood); min-height: 22px; font-size: 14px; }
.sparks span {
  position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2);
  animation: rise linear infinite; opacity: 0;
}
@keyframes rise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(40px); opacity: 0; }
}

/* Flamme animée du logo */
.flame { width: 64px; height: 64px; margin: 0 auto; position: relative; }
.flame.sm { width: 34px; height: 34px; margin: 0; }
.flame i {
  position: absolute; left: 50%; bottom: 8%; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform-origin: 50% 100%; animation: flicker 1.6s ease-in-out infinite alternate;
}
.flame i:nth-child(1) { width: 64%; height: 84%; margin-left: -32%; background: radial-gradient(circle at 50% 75%, #ffb347, #d14a03 70%); filter: blur(0.3px); }
.flame i:nth-child(2) { width: 42%; height: 58%; margin-left: -21%; background: radial-gradient(circle at 50% 80%, #fff1c1, #f2b544 70%); animation-duration: 1.1s; }
.flame i:nth-child(3) { width: 18%; height: 26%; margin-left: -9%; background: #fff8e6; animation-duration: 0.8s; }
@keyframes flicker {
  0% { transform: scale(1, 1) rotate(-2deg); }
  50% { transform: scale(0.94, 1.05) rotate(2deg); }
  100% { transform: scale(1.03, 0.96) rotate(-1deg); }
}

/* ───────────── Structure ───────────── */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 18px 12px 12px;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; }
.brand b { font-size: 18px; letter-spacing: -0.01em; display: block; line-height: 1.1; }
.brand small { color: var(--faint); font-size: 12px; }
.guild-pick {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 2px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; position: relative;
}
.guild-pick img { width: 30px; height: 30px; border-radius: 9px; }
.guild-pick select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.guild-pick span { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding: 14px 12px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 500; transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(209, 74, 3, 0.22), rgba(209, 74, 3, 0.06)); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.nav a.active svg { color: var(--accent-2); }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.side-foot img { width: 34px; height: 34px; border-radius: 50%; }
.side-foot div { flex: 1; min-width: 0; font-size: 13px; line-height: 1.25; }
.side-foot b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--moss); margin-right: 5px; box-shadow: 0 0 0 3px rgba(79, 179, 106, 0.18); }
.dot.off { background: var(--blood); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.18); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(14, 15, 17, 0.85); backdrop-filter: blur(10px); z-index: 10;
}
.top h2 { margin: 0; font-size: 20px; letter-spacing: -0.01em; flex: 1; display: flex; align-items: center; gap: 10px; }
.top h2 small { color: var(--faint); font-weight: 400; font-size: 14px; }
.menu-btn { display: none; }
.page { padding: 24px 28px 60px; max-width: 1500px; width: 100%; }

/* ───────────── Éléments ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); padding: 9px 14px; border-radius: 10px; cursor: pointer;
  font-weight: 600; font-size: 14px; transition: transform 0.08s, background 0.15s, border-color 0.15s; white-space: nowrap;
}
.btn:hover { background: #2a2b30; border-color: #42444b; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #e0580f, var(--accent)); border-color: #e5621c; color: #fff; box-shadow: 0 4px 14px rgba(209, 74, 3, 0.3); }
.btn.primary:hover { background: linear-gradient(180deg, #ea6418, #db5208); }
.btn.danger { background: rgba(229, 72, 77, 0.12); border-color: rgba(229, 72, 77, 0.4); color: #ff8b8e; }
.btn.danger:hover { background: rgba(229, 72, 77, 0.22); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 8px; }
.btn.block { width: 100%; }

.input, select.input, textarea.input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(209, 74, 3, 0.18); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.45; }
input[type='color'].input { padding: 4px; height: 42px; cursor: pointer; }
input[type='range'] { accent-color: var(--accent); width: 100%; }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.field > span { display: flex; justify-content: space-between; gap: 8px; }
label.field em { font-style: normal; color: var(--faint); font-weight: 400; }
.hint { font-size: 12.5px; color: var(--faint); margin: 2px 0 0; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; cursor: pointer; }
.switch + .switch { border-top: 1px solid var(--line); }
.switch b { font-weight: 500; display: block; }
.switch small { color: var(--faint); display: block; font-size: 12.5px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: #3a3c42; position: relative; cursor: pointer; transition: background 0.2s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card h3 { margin: 0 0 14px; font-size: 15px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card h3 .muted { font-weight: 400; }
.card.flush { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12.5px; }
.empty { text-align: center; color: var(--faint); padding: 40px 10px; }
.empty .big { font-size: 34px; display: block; margin-bottom: 6px; }

.stat { display: flex; gap: 14px; align-items: center; }
.stat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(209, 74, 3, 0.14); color: var(--accent-2); flex: none; font-size: 20px; }
.stat b { font-size: 24px; display: block; line-height: 1.1; letter-spacing: -0.02em; }
.stat small { color: var(--muted); font-size: 13px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.pill.ok { color: #7fe09a; border-color: rgba(79, 179, 106, 0.4); background: rgba(79, 179, 106, 0.1); }
.pill.warn { color: var(--gold); border-color: rgba(242, 181, 68, 0.4); background: rgba(242, 181, 68, 0.1); }
.pill.bad { color: #ff8b8e; border-color: rgba(229, 72, 77, 0.4); background: rgba(229, 72, 77, 0.1); }
.pill.fire { color: #ffb079; border-color: rgba(209, 74, 3, 0.5); background: rgba(209, 74, 3, 0.12); }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 12.5px; cursor: default; }
.role-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--rc, #99aab5); }
.role-chip.toggle { cursor: pointer; opacity: 0.55; }
.role-chip.toggle.on { opacity: 1; border-color: var(--rc, #99aab5); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover { background: var(--panel-2); }
.table-wrap { overflow-x: auto; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who img { width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--panel-2); }
.who div { min-width: 0; }
.who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.who small { color: var(--faint); font-size: 12px; }
.rank-n { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; background: var(--panel-2); font-size: 13px; flex: none; }
.rank-n.r1 { background: linear-gradient(135deg, #f2b544, #d18a1b); color: #2a1a00; }
.rank-n.r2 { background: linear-gradient(135deg, #d7dbe0, #9aa1ab); color: #1d1f22; }
.rank-n.r3 { background: linear-gradient(135deg, #e09060, #a8572a); color: #fff; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; margin-bottom: 18px; }
.tabs button { border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--panel-2); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 2px 8px rgba(0, 0, 0, 0.25); }

.bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--gold)); }

/* Héros du serveur */
.hero { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); margin-bottom: 16px; }
.hero-bg { height: 150px; background: linear-gradient(135deg, #3a1505, #1a0c05 60%, #0e0f11); background-size: cover; background-position: center; position: relative; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(26, 27, 31, 0.95)); }
.hero-body { display: flex; align-items: flex-end; gap: 18px; padding: 0 22px 20px; margin-top: -54px; position: relative; flex-wrap: wrap; }
.hero-body > img { width: 96px; height: 96px; border-radius: 26px; border: 5px solid var(--panel); background: var(--panel-2); }
.hero-body h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
.hero-body p { margin: 2px 0 0; color: var(--muted); }

/* Graphique */
.chart { width: 100%; height: 220px; display: block; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.chart .b { fill: url(#gFire); }
.chart .b:hover { fill: var(--gold); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Toasts et fenêtres */
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 100; max-width: calc(100vw - 36px); }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow); animation: pop 0.2s ease-out; max-width: 380px; font-size: 14px; }
.toast.ok { border-left-color: var(--moss); }
.toast.err { border-left-color: var(--blood); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 60; padding: 16px; animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; width: min(460px, 100%); padding: 22px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
.modal h3 { margin: 0 0 8px; }
.modal p { color: var(--muted); margin: 0 0 18px; }
.drawer-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 50; animation: fade 0.15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line); z-index: 51; overflow-y: auto; animation: slide 0.2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { position: relative; }
.drawer-banner { height: 140px; background: linear-gradient(135deg, #3a1505, #14151a); background-size: cover; background-position: center; }
.drawer-close { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, 0.5); border: 0; color: #fff; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; display: grid; place-items: center; }
.drawer-id { padding: 0 22px; margin-top: -46px; display: flex; align-items: flex-end; gap: 14px; }
.drawer-id img { width: 92px; height: 92px; border-radius: 50%; border: 6px solid var(--bg-2); background: var(--panel); }
.drawer-body { padding: 16px 22px 40px; display: grid; gap: 14px; }
.rank-img { width: 100%; border-radius: 12px; display: block; background: var(--panel); min-height: 120px; }

.loader { display: grid; place-items: center; padding: 60px; color: var(--faint); }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────────── Aperçu Discord ───────────── */
.dc { display: grid; grid-template-columns: 72px 240px 1fr 240px; height: calc(100vh - 150px); min-height: 520px; border-radius: 14px; overflow: hidden; border: 1px solid #1a1b1e; background: var(--dc-bg); color: var(--dc-text); font-family: 'gg sans', 'Noto Sans', var(--font); }
.dc-guilds { background: var(--dc-deep); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; overflow-y: auto; }
.dc-guilds img { width: 48px; height: 48px; border-radius: 50%; cursor: pointer; transition: border-radius 0.2s; }
.dc-guilds img:hover, .dc-guilds img.on { border-radius: 16px; }
.dc-guilds img.on { box-shadow: -10px 0 0 -4px #fff; }
.dc-channels { background: var(--dc-side); display: flex; flex-direction: column; min-height: 0; }
.dc-gname { height: 48px; padding: 0 16px; display: flex; align-items: center; font-weight: 700; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-clist { overflow-y: auto; padding: 8px 8px 16px; flex: 1; }
.dc-cat { font-size: 12px; text-transform: uppercase; color: var(--dc-muted); font-weight: 700; padding: 16px 8px 4px; letter-spacing: 0.02em; cursor: pointer; display: flex; align-items: center; gap: 2px; user-select: none; }
.dc-cat:hover { color: var(--dc-text); }
.dc-cat svg { width: 12px; height: 12px; transition: transform 0.15s; }
.dc-cat.closed svg { transform: rotate(-90deg); }
.dc-ch { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 4px; color: var(--dc-muted); cursor: pointer; font-weight: 500; margin: 1px 0; font-size: 15px; }
.dc-ch:hover { background: rgba(78, 80, 88, 0.3); color: var(--dc-text); }
.dc-ch.on { background: rgba(78, 80, 88, 0.6); color: #fff; }
.dc-ch svg { width: 20px; height: 20px; color: #80848e; flex: none; }
.dc-ch span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-vm { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 36px; font-size: 13.5px; color: var(--dc-muted); }
.dc-vm img { width: 22px; height: 22px; border-radius: 50%; }
.dc-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dc-chead { height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 8px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); flex: none; font-weight: 700; }
.dc-chead svg { width: 22px; height: 22px; color: #80848e; }
.dc-chead small { color: var(--dc-muted); font-weight: 400; border-left: 1px solid #3f4147; padding-left: 12px; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; font-size: 14px; }
.dc-msgs { flex: 1; overflow-y: auto; padding: 16px 0 8px; }
.dc-compose { padding: 0 16px 20px; flex: none; }
.dc-compose form { display: flex; align-items: center; background: #383a40; border-radius: 8px; padding: 0 6px 0 16px; }
.dc-compose input { flex: 1; background: transparent; border: 0; outline: none; padding: 12px 0; color: var(--dc-text); }
.dc-compose button { background: transparent; border: 0; color: var(--dc-muted); cursor: pointer; padding: 8px; display: grid; place-items: center; }
.dc-compose button:hover { color: #fff; }
.dc-members { background: var(--dc-side); overflow-y: auto; padding: 8px 8px 16px; }
.dc-mgroup { font-size: 12px; text-transform: uppercase; color: var(--dc-muted); font-weight: 700; padding: 18px 8px 4px; }
.dc-member { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 4px; cursor: pointer; }
.dc-member:hover { background: rgba(78, 80, 88, 0.3); }
.dc-member img { width: 32px; height: 32px; border-radius: 50%; }
.dc-member span { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.dc-more { padding: 10px; text-align: center; }

.d-msg { position: relative; padding: 2px 48px 2px 72px; min-height: 44px; margin-top: 17px; font-size: 15px; line-height: 1.375; }
.d-msg.is-compact { margin-top: 0; min-height: 0; }
.d-msg:hover { background: rgba(2, 2, 2, 0.06); }
.d-msg:hover .d-actions { display: flex; }
.d-avatar { position: absolute; left: 16px; top: 4px; width: 40px; height: 40px; border-radius: 50%; }
.d-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.d-name { font-weight: 600; color: #f2f3f5; }
.d-bot { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; line-height: 15px; position: relative; top: -1px; }
.d-time { color: var(--dc-muted); font-size: 12px; }
.d-edited { color: var(--dc-muted); font-size: 10px; }
.d-hover-time { position: absolute; left: 0; width: 72px; text-align: center; font-size: 11px; color: var(--dc-muted); top: 4px; display: none; }
.d-msg.is-compact:hover .d-hover-time { display: block; }
.d-reply { font-size: 13px; color: var(--dc-muted); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.d-reply::before { content: ''; position: absolute; left: -38px; top: 9px; width: 30px; height: 10px; border-left: 2px solid #4e5058; border-top: 2px solid #4e5058; border-top-left-radius: 6px; }
.d-reply-name { color: #f2f3f5; font-weight: 600; }
.d-body { color: var(--dc-text); min-width: 0; }
.d-content { word-wrap: break-word; }
.d-line { display: block; white-space: pre-wrap; word-wrap: break-word; }
.d-h { font-weight: 700; color: #f2f3f5; margin: 8px 0 4px; line-height: 1.25; }
.d-h1 { font-size: 24px; } .d-h2 { font-size: 20px; } .d-h3 { font-size: 16px; }
.d-sub { font-size: 12.5px; color: var(--dc-muted); }
.d-sub .d-link { color: var(--dc-muted); text-decoration: underline; }
.d-li { padding-left: calc(18px + var(--lvl, 0) * 18px); position: relative; }
.d-li::before { content: '•'; position: absolute; left: calc(4px + var(--lvl, 0) * 18px); }
.d-li.d-ol::before { content: attr(data-n) '.'; left: 0; }
.d-quote { margin: 2px 0; padding: 0 0 0 12px; border-left: 4px solid #4e5058; border-radius: 2px; }
.d-code { background: #2b2d31; border: 1px solid #1e1f22; padding: 0 3px; border-radius: 4px; font-family: Consolas, monospace; font-size: 85%; }
.d-pre { background: #2b2d31; border: 1px solid #1e1f22; border-radius: 4px; padding: 8px 10px; margin: 6px 0; overflow-x: auto; font-family: Consolas, monospace; font-size: 13.5px; white-space: pre-wrap; }
.d-link { color: var(--dc-link); text-decoration: none; }
.d-link:hover { text-decoration: underline; }
.d-mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.d-role { background: color-mix(in srgb, var(--rc, #5865f2) 18%, transparent); color: var(--rc, #c9cdfb); }
.d-stamp { background: rgba(255, 255, 255, 0.06); border-radius: 3px; padding: 0 2px; }
.d-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; }
.d-spoiler:focus, .d-spoiler:hover { color: inherit; background: rgba(255, 255, 255, 0.1); }
.d-emoji { width: 22px; height: 22px; vertical-align: -5px; object-fit: contain; }
.d-h1 .d-emoji { width: 32px; height: 32px; }
.d-uemoji { margin-right: 2px; }

.d-container { margin-top: 4px; max-width: 600px; background: #393a41; background: color-mix(in srgb, #2b2d31 90%, #fff); border: 1px solid #44464e; border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.d-container[style*='--accent'] { border-left: 4px solid var(--accent); }
.d-container.is-spoiler { filter: blur(6px); }
.d-text { min-width: 0; }
.d-section { display: flex; gap: 16px; align-items: flex-start; }
.d-section-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.d-section-acc { flex: none; display: flex; align-items: flex-start; }
.d-thumb { width: 85px; height: 85px; border-radius: 8px; object-fit: cover; background: #2b2d31; }
.d-gallery { display: grid; gap: 4px; border-radius: 8px; overflow: hidden; }
.d-gallery img { width: 100%; display: block; max-height: 420px; object-fit: cover; background: #2b2d31; }
.d-gallery-2, .d-gallery-4 { grid-template-columns: 1fr 1fr; }
.d-gallery-3 { grid-template-columns: 1fr 1fr 1fr; }
.d-sep { height: 1px; background: #4e5058; margin: 4px 0; }
.d-sep.is-large { margin: 12px 0; }
.d-sep.is-space { background: transparent; }
.d-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.d-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 2px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #fff; cursor: default; user-select: none; white-space: nowrap; }
.d-btn-primary { background: #5865f2; }
.d-btn-secondary, .d-btn-link { background: #4e5058; }
.d-btn-success { background: #248046; }
.d-btn-danger { background: #da373c; }
.d-btn-premium { background: #5865f2; }
.d-btn.is-disabled { opacity: 0.5; }
.d-btn .d-emoji { width: 18px; height: 18px; vertical-align: 0; }
.d-ext { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.d-select { width: 100%; max-width: 560px; display: flex; align-items: center; justify-content: space-between; background: #1e1f22; border: 1px solid #1e1f22; border-radius: 8px; padding: 0 10px 0 12px; height: 40px; font-size: 14px; }
.d-select .d-ph { color: var(--dc-muted); }
.d-select svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.d-file { display: inline-flex; align-items: center; gap: 10px; background: #2b2d31; border: 1px solid #1e1f22; border-radius: 8px; padding: 10px 14px; margin-top: 4px; color: var(--dc-link); text-decoration: none; }
.d-file small { color: var(--dc-muted); }
.d-attach-img { display: block; max-width: min(400px, 100%); max-height: 300px; border-radius: 8px; margin-top: 6px; }
.d-reactions { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.d-reaction { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; background: #2b2d31; border: 1px solid transparent; border-radius: 8px; font-size: 14px; }
.d-reaction.is-me { background: rgba(88, 101, 242, 0.15); border-color: #5865f2; }
.d-reaction .d-emoji { width: 16px; height: 16px; vertical-align: 0; }

.d-embed { margin-top: 4px; max-width: 520px; background: var(--dc-embed); border-left: 4px solid var(--accent, #1e1f22); border-radius: 4px; padding: 8px 16px 16px 12px; display: grid; }
.d-embed-grid { display: flex; gap: 16px; }
.d-embed-main { flex: 1; min-width: 0; }
.d-embed-author { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #f2f3f5; margin-top: 8px; }
.d-embed-author img { width: 24px; height: 24px; border-radius: 50%; }
.d-embed-title { font-weight: 600; color: #f2f3f5; margin-top: 8px; font-size: 16px; }
.d-embed-desc { font-size: 14px; margin-top: 8px; }
.d-fields { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; margin-top: 8px; }
.d-field { grid-column: span 12; font-size: 14px; min-width: 0; }
.d-field.is-inline { grid-column: span 4; }
.d-field-name { font-weight: 600; color: #f2f3f5; margin-bottom: 2px; }
.d-embed-thumb { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; margin-top: 8px; flex: none; }
.d-embed-image { max-width: 100%; border-radius: 4px; margin-top: 16px; display: block; }
.d-embed-footer { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dc-muted); margin-top: 8px; }
.d-embed-footer img { width: 20px; height: 20px; border-radius: 50%; }

.d-actions { position: absolute; right: 16px; top: -14px; display: none; background: #313338; border: 1px solid #26272b; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); overflow: hidden; z-index: 2; }
.d-actions button { background: transparent; border: 0; color: var(--dc-muted); padding: 6px 8px; cursor: pointer; display: grid; place-items: center; }
.d-actions button:hover { background: #3a3c42; color: #fff; }
.d-actions button.del:hover { color: #f23f43; }

/* Créateur d'embed */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.builder-preview { position: sticky; top: 86px; }
.preview-box { background: var(--dc-bg); border-radius: 12px; padding: 10px 0 20px; border: 1px solid #1a1b1e; min-height: 200px; color: var(--dc-text); font-family: 'gg sans', 'Noto Sans', var(--font); }
.preview-box .d-msg { margin-top: 8px; }
.block { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.block-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.block-head .grow { color: var(--text); }
.adders { display: flex; gap: 8px; flex-wrap: wrap; }
.upload { position: relative; overflow: hidden; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Console */
.console { background: #0a0b0c; border: 1px solid var(--line); border-radius: 12px; height: calc(100vh - 210px); min-height: 400px; overflow-y: auto; padding: 12px 0; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12.8px; }
.console div { padding: 2px 16px; white-space: pre-wrap; word-break: break-word; display: flex; gap: 12px; }
.console div:hover { background: rgba(255, 255, 255, 0.03); }
.console time { color: #5d6068; flex: none; }
.console .warn { color: var(--gold); }
.console .error { color: #ff8b8e; }

/* Radio */
.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.station { text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; transition: border-color 0.15s, transform 0.1s; }
.station:hover { border-color: #4a3426; transform: translateY(-1px); }
.station.on { border-color: var(--accent); background: linear-gradient(180deg, rgba(209, 74, 3, 0.16), var(--bg-2)); }
.station b { display: block; margin-top: 6px; }
.station small { color: var(--faint); font-size: 12px; line-height: 1.3; display: block; }
.station .e { font-size: 24px; }
.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.eq i { width: 4px; background: var(--accent-2); border-radius: 2px; animation: eq 0.9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -0.3s; } .eq i:nth-child(3) { animation-delay: -0.6s; } .eq i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { from { height: 4px; } to { height: 18px; } }
.now { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.now .disc { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, #0e0f11 18%, #2a1206 19%, #d14a03 60%, #6b2602); display: grid; place-items: center; font-size: 30px; animation: spin 6s linear infinite; flex: none; }
.now .disc.off { animation: none; filter: grayscale(1); opacity: 0.5; }

/* ───────────── Mobile ───────────── */
@media (max-width: 1200px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc { grid-template-columns: 0 220px 1fr 0; }
  .dc-guilds, .dc-members { display: none; }
}
@media (max-width: 980px) {
  .builder { grid-template-columns: 1fr; }
  .builder-preview { position: static; }
  .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform 0.2s; box-shadow: var(--shadow); }
  .app.menu-open .side { transform: none; }
  .menu-btn { display: inline-flex; }
  .top { padding: 12px 16px; }
  .page { padding: 16px 16px 50px; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .dc { grid-template-columns: 1fr; height: auto; }
  .dc-channels { max-height: 220px; }
  .dc-chat { height: 70vh; }
  .d-msg { padding-right: 12px; }
  .hide-sm { display: none; }
}
