:root {
  --bg: #070708;
  --bg-2: #0c0c0f;
  --panel: #121215;
  --panel-2: #19191e;
  --panel-3: #202027;
  --border: #222229;
  --border-2: #31313a;
  --text: #f4f4f5;
  --muted: #9a9aa5;
  --dim: #64646e;
  --red: #e11d2e;
  --red-2: #ff3547;
  --red-dark: #7a0d17;
  --red-soft: rgba(225, 29, 46, 0.12);
  --red-line: rgba(225, 29, 46, 0.35);
  --green: #22c55e;
  --radius: 16px;
  --sidebar: 272px;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, p, dl, dd { margin: 0; }
img { display: block; }
[hidden] { display: none !important; }
code { background: var(--panel-3); border: 1px solid var(--border-2); padding: 1px 6px; border-radius: 6px; font: 12px var(--mono); color: #ff8a94; }
.muted { color: var(--muted); }
.dim { color: var(--dim) !important; }
.red { color: var(--red); }
.link { color: var(--red-2); font-weight: 600; }
[data-lucide], .ic { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #44444f; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Boutons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 11px; border: 1px solid transparent; white-space: nowrap;
  font: 600 14px 'Inter', sans-serif; color: var(--text); cursor: pointer; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-red { background: linear-gradient(180deg, #f0283a, var(--red)); box-shadow: 0 8px 24px -10px var(--red), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-red:hover:not(:disabled) { background: linear-gradient(180deg, #ff3d4e, var(--red-2)); box-shadow: 0 10px 28px -8px var(--red), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-ghost { background: var(--panel-2); border-color: var(--border-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--red-line); background: var(--panel-3); }
.btn-warn:hover:not(:disabled) { border-color: #f97316; color: #fdba74; }
.btn-danger { background: rgba(225, 29, 46, .14); border-color: var(--red-line); color: #ff8a94; }
.btn-danger:hover:not(:disabled) { background: var(--red); color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: transparent; border: 1px solid var(--border); color: var(--muted); cursor: pointer; transition: .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); background: var(--panel-2); }
.icon-btn.on { color: var(--red-2); border-color: var(--red-line); background: var(--red-soft); }

/* ---------- Logo ---------- */
.brand { display: flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.brand b { color: var(--red); font-weight: 800; }
.brand-logo {
  position: relative; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, #ff3547, #b3101f); box-shadow: 0 0 0 4px var(--red-soft), 0 8px 22px -6px var(--red);
}
.brand-logo [data-lucide] { width: 21px; height: 21px; stroke-width: 2.6; color: #fff; }

/* ---------- Layout dashboard ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 30;
  display: flex; flex-direction: column; gap: 16px; padding: 22px 14px 14px;
  background: linear-gradient(180deg, rgba(225, 29, 46, .07), transparent 220px), var(--bg-2);
  border-right: 1px solid var(--border); transition: transform .25s;
}
.sidebar .brand { padding: 0 8px 4px; }
.guild-switch {
  display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 13px;
  background: var(--panel); border: 1px solid var(--border); transition: .15s;
}
.guild-switch:hover { border-color: var(--red-line); }
.guild-switch img, .guild-switch .guild-initial { width: 36px; height: 36px; border-radius: 10px; }
.guild-switch [data-lucide] { color: var(--dim); width: 16px; height: 16px; }
.guild-switch-name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-switch-name small, .sidebar-user small { display: block; font-weight: 500; font-size: 11px; color: var(--dim); }
.guild-initial { display: grid; place-items: center; background: linear-gradient(145deg, var(--red), var(--red-dark)); color: #fff; font-weight: 700; }
.guild-initial.big { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }

.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.nav-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); padding: 16px 12px 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  color: var(--muted); font-weight: 500; transition: .15s;
}
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, rgba(225, 29, 46, .2), rgba(225, 29, 46, .04)); color: #fff; }
.nav-item.active::before {
  content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--red); box-shadow: 0 0 12px var(--red);
}
.nav-item.active [data-lucide] { color: var(--red-2); }
.dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); }
.dot.on { background: var(--red); box-shadow: 0 0 8px var(--red); }
.nav-live {
  margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .08em; padding: 2px 6px; border-radius: 5px;
  background: var(--red); color: #fff; animation: blink 2s infinite;
}
@keyframes blink { 50% { opacity: .55; } }

.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; background: var(--panel); border: 1px solid var(--border); }
.sidebar-user img { width: 34px; height: 34px; border-radius: 50%; }
.sidebar-user > span { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user a { color: var(--dim); display: grid; padding: 6px; border-radius: 8px; }
.sidebar-user a:hover { color: var(--red-2); background: var(--red-soft); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar); background: radial-gradient(900px 400px at 100% -10%, rgba(225, 29, 46, .08), transparent 70%); }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 32px;
  background: rgba(7, 7, 8, .78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.crumbs { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); min-width: 0; }
.crumbs span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs [data-lucide] { width: 14px; height: 14px; color: var(--dim); }
.crumbs b { color: var(--text); white-space: nowrap; }
.menu-btn { display: none; }
.content { padding: 32px; max-width: 1160px; display: flex; flex-direction: column; gap: 20px; animation: rise .35s ease backwards; }
.content-wide { max-width: 1500px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.overlay { display: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 100; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 13px 16px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--border-2);
  border-left: 3px solid var(--green); font-weight: 600; box-shadow: 0 18px 40px -12px #000;
  animation: toast-in .3s ease; transition: opacity .3s, transform .3s;
}
.toast > [data-lucide], .toast > .ic { color: var(--green); }
.toast-error { border-left-color: var(--red); }
.toast-error > [data-lucide], .toast-error > .ic { color: var(--red-2); }
.toast.hide { opacity: 0; transform: translateY(10px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Cartes et formulaires ---------- */
.module-form, .stack { display: flex; flex-direction: column; gap: 20px; }
.stack { gap: 16px; }
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 120px), var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 16px;
  transition: border-color .2s;
}
.card:hover { border-color: #2a2a32; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.card-title [data-lucide] { color: var(--red); }
.module-head {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 22px 24px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: radial-gradient(500px 160px at 0% 0%, rgba(225, 29, 46, .22), transparent 70%), var(--panel);
}
.module-head::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(225, 29, 46, .15); box-shadow: 0 0 0 30px rgba(225, 29, 46, .03), 0 0 0 60px rgba(225, 29, 46, .02); pointer-events: none;
}
.module-title { flex: 1; min-width: 0; }
.module-title h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.module-title p { color: var(--muted); }
.module-icon {
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(145deg, rgba(225, 29, 46, .25), rgba(225, 29, 46, .06)); border: 1px solid var(--red-line); color: var(--red-2);
}
.module-icon [data-lucide] { width: 23px; height: 23px; }
.module-icon.sm { width: 38px; height: 38px; border-radius: 11px; }
.module-icon.sm [data-lucide] { width: 18px; height: 18px; }
.module-icon.big { width: 72px; height: 72px; border-radius: 20px; }
.module-icon.big [data-lucide] { width: 32px; height: 32px; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label, .field-inline label { font-weight: 600; font-size: 13px; }
.field small, .field-inline small { color: var(--dim); font-size: 12px; display: block; }
.field-inline { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.vars code { margin-right: 2px; }
input[type=text], input[type=url], input[type=number], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border-2);
  background: var(--bg-2); color: var(--text); font: 14px 'Inter', sans-serif; outline: none; transition: .15s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
textarea { resize: vertical; min-height: 46px; line-height: 1.55; }
select {
  appearance: none; cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239a9aa5' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input:hover, textarea:hover, select:hover { border-color: #3d3d47; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split-preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sticky-card { position: sticky; top: 84px; }
.form-actions { display: flex; justify-content: flex-end; }

.check { display: flex; align-items: center; gap: 10px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--red); width: 16px; height: 16px; }

/* ---------- Interrupteur ---------- */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch > span { position: absolute; inset: 0; border-radius: 99px; background: var(--border-2); cursor: pointer; transition: .2s; }
.switch > span::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #d4d4d8; transition: .2s cubic-bezier(.3, 1.4, .6, 1); box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}
.switch input:checked + span { background: var(--red); box-shadow: 0 0 16px -3px var(--red); }
.switch input:checked + span::before { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--red-2); outline-offset: 2px; }
.switch-lg { width: 56px; height: 31px; }
.switch-lg > span::before { width: 25px; height: 25px; }
.switch-lg input:checked + span::before { transform: translateX(25px); }

/* ---------- Barre d'enregistrement ---------- */
.savebar {
  position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px;
  border-radius: 14px; background: rgba(18, 18, 21, .92); backdrop-filter: blur(10px); border: 1px solid var(--border-2);
  box-shadow: 0 16px 40px -18px #000; transition: border-color .2s, box-shadow .2s;
}
.savebar-text { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--dim); font-weight: 500; min-width: 0; }
.savebar-text [data-lucide] { display: none; }
.savebar .txt-dirty, .savebar .reset-btn { display: none; }
.savebar.dirty { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft), 0 16px 40px -14px var(--red); animation: nudge .4s ease; }
.savebar.dirty .txt-clean { display: none; }
.savebar.dirty .txt-dirty, .savebar.dirty .reset-btn { display: inline-flex; }
.savebar.dirty .savebar-text { color: var(--text); }
.savebar.dirty .savebar-text [data-lucide] { display: block; color: var(--red-2); }
@keyframes nudge { 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }

/* ---------- Liste déroulante avec recherche ---------- */
.sel { position: relative; min-width: 0; }
.sel-native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px; padding: 0 !important; bottom: 0; left: 0; }
.sel-btn {
  width: 100%; display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 12px; border-radius: 11px;
  border: 1px solid var(--border-2); background: var(--bg-2); color: var(--text); font: 14px 'Inter', sans-serif; cursor: pointer; text-align: left; transition: .15s;
}
.sel-btn:hover { border-color: #3d3d47; }
.sel.open .sel-btn, .sel-btn:focus-visible { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); outline: none; }
.sel-btn .ic { color: var(--muted); width: 16px; height: 16px; }
.sel-btn .chev { margin-left: auto; transition: transform .2s; }
.sel.open .chev { transform: rotate(180deg); }
.sel-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-btn .sel-label { flex: 0 1 auto; }
.sel-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; display: none; flex-direction: column;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 13px; overflow: hidden;
  box-shadow: 0 24px 50px -14px #000, 0 0 0 1px rgba(0, 0, 0, .4);
}
.sel.up .sel-panel { top: auto; bottom: calc(100% + 6px); }
.sel.open .sel-panel { display: flex; animation: pop .14s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.sel-search { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border-2); color: var(--dim); }
.sel-search input { border: 0; background: none; padding: 6px 0; box-shadow: none !important; }
.sel-list { max-height: 280px; overflow-y: auto; padding: 6px; }
.sel-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.sel-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.sel-item .ic { width: 16px; height: 16px; color: var(--dim); }
.sel-item.active { background: var(--panel-3); color: var(--text); }
.sel-item.selected { color: #fff; }
.sel-item.selected .sel-label { font-weight: 600; }
.sel-check { margin-left: auto; opacity: 0; color: var(--red-2) !important; }
.sel-item.selected .sel-check { opacity: 1; }
.sel-item.disabled { opacity: .35; cursor: not-allowed; }
.sel-empty { padding: 14px; text-align: center; color: var(--dim); }

/* ---------- Champs avec bouton emoji ---------- */
.emoji-field { position: relative; }
.emoji-field input { padding-right: 46px; }
.emoji-field textarea { padding-right: 46px; }
.emoji-btn {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--dim); cursor: pointer; transition: .15s;
}
.emoji-field.is-area .emoji-btn { top: 7px; transform: none; }
.emoji-btn:hover { color: #ffd166; background: var(--panel-3); transform: translateY(-50%) scale(1.08); }
.emoji-field.is-area .emoji-btn:hover { transform: scale(1.08); }

/* ---------- Sélecteur d'emojis ---------- */
.ep {
  position: absolute; z-index: 90; height: 420px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 15px; box-shadow: 0 30px 60px -18px #000;
  animation: pop .15s ease;
}
.ep-search { display: flex; align-items: center; gap: 8px; margin: 10px; padding: 0 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border-2); color: var(--dim); }
.ep-search input { border: 0; background: none; padding: 9px 0; box-shadow: none !important; }
.ep-main { flex: 1; min-height: 0; display: flex; border-top: 1px solid var(--border); }
.ep-rail { width: 50px; flex-shrink: 0; overflow-y: auto; padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--bg-2); border-right: 1px solid var(--border); }
.ep-rail-btn { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--dim); cursor: pointer; transition: .15s; }
.ep-rail-btn img { width: 26px; height: 26px; border-radius: 8px; }
.ep-rail-btn:hover { background: var(--panel-3); color: var(--text); }
.ep-rail-btn.active { background: var(--red-soft); color: var(--red-2); box-shadow: inset 0 0 0 1px var(--red-line); }
.ep-initial { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--red-dark); color: #fff; font-weight: 700; font-size: 12px; }
.ep-body { position: relative; flex: 1; overflow-y: auto; padding: 4px 8px 10px; }
.ep-head { position: sticky; top: -4px; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 8px 4px 6px; background: var(--panel-2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ep-head img, .ep-head .ep-initial { width: 18px; height: 18px; border-radius: 5px; font-size: 10px; }
.ep-head .ic { width: 14px; height: 14px; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; }
.ep-emoji { height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 23px; line-height: 1; transition: background .1s, transform .1s; }
.ep-emoji img { width: 28px; height: 28px; object-fit: contain; }
.ep-emoji:hover { background: var(--panel-3); transform: scale(1.12); }
.ep-foot { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--border); background: var(--bg-2); min-height: 46px; }
.ep-foot-emoji { font-size: 24px; line-height: 1; }
.ep-foot-emoji img { width: 26px; height: 26px; }
.ep-foot-name { font: 600 13px var(--mono); color: var(--muted); }
.ep-loading, .ep-none, .ep-note { padding: 20px 10px; text-align: center; color: var(--dim); font-size: 13px; }
.ep-note { padding: 10px; margin: 6px 0; border-radius: 10px; background: var(--bg-2); border: 1px dashed var(--border-2); text-align: left; }

/* ---------- Aperçu Discord ---------- */
.preview-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.preview-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.preview-label [data-lucide] { width: 14px; height: 14px; }
.dc-preview { display: flex; gap: 14px; padding: 14px 16px; border-radius: 12px; background: #313338; border: 1px solid #3f4147; font-family: 'gg sans', 'Noto Sans', 'Inter', sans-serif; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.dc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dc-head { display: flex; align-items: center; gap: 6px; }
.dc-name { font-weight: 600; color: #f2f3f5; }
.dc-tag { font-size: 10px; font-weight: 700; background: #5865f2; color: #fff; padding: 1px 5px; border-radius: 4px; }
.dc-time { font-size: 12px; color: #949ba4; }
.dc-content { color: #dbdee1; white-space: pre-wrap; word-break: break-word; }
.dc-embed { display: flex; gap: 14px; max-width: 440px; padding: 10px 14px 14px; border-radius: 4px; border-left: 4px solid var(--red); background: #2b2d31; }
.dc-embed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.dc-embed-title { font-weight: 700; color: #f2f3f5; }
.dc-embed-desc { color: #dbdee1; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.dc-embed-desc.dim { color: #6d6f78 !important; }
.dc-embed-img { max-width: 100%; border-radius: 4px; }
.dc-embed-thumb { width: 64px; height: 64px; border-radius: 4px; flex-shrink: 0; object-fit: cover; }
.dc-embed-foot { font-size: 12px; color: #949ba4; }
.dc-emoji { display: inline-block; width: 1.375em; height: 1.375em; vertical-align: -0.35em; object-fit: contain; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; padding: 0 2px; border-radius: 3px; font-weight: 500; }
.dc-preview code { background: #1e1f22; border: 0; color: #dbdee1; }
.dc-buttons { display: flex; gap: 8px; margin-top: 4px; }
.dc-buttons:empty { display: none; }
.dc-button { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 4px; font-size: 14px; font-weight: 500; color: #fff; }
.dc-button-danger { background: #da373c; }
.dc-button-secondary { background: #4e5058; }

/* ---------- Composants modules ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 99px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border-2); font-weight: 500; transition: .15s; user-select: none;
}
.chip:hover { border-color: #44444f; }
.chip input { display: none; }
.chip:has(input:checked) { background: var(--red-soft); border-color: var(--red); color: #fff; box-shadow: 0 0 14px -6px var(--red); }
.chip.disabled { opacity: .4; cursor: not-allowed; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cmd-list { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.cmd-list span { padding: 6px 10px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--border); }
.toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.toggle-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border); font-weight: 500; transition: .15s;
}
.toggle-row:hover { border-color: var(--border-2); }
.toggle-row:has(input:checked) { border-color: var(--red-line); }
.toggle-row > [data-lucide] { color: var(--muted); }
.toggle-row > span:nth-child(2) { flex: 1; }
.reward-list { display: flex; flex-direction: column; gap: 10px; }
.reward-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; }
.reward-level { position: relative; }
.reward-level span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 13px; }
.reward-level input { padding-left: 46px; height: 44px; }
.inline-form { display: flex; gap: 10px; }
.inline-form .sel { flex: 1; }
.color-field { display: flex; align-items: center; gap: 10px; height: 44px; padding: 5px 12px 5px 5px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--bg-2); }
.color-field input { width: 34px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
.color-field span { font-family: var(--mono); color: var(--muted); }
.console-cta { flex-direction: row; align-items: center; gap: 16px; border-color: var(--red-line); background: linear-gradient(90deg, rgba(225, 29, 46, .14), transparent 70%), var(--panel); }
.console-cta:hover { border-color: var(--red); }
.console-cta-text { flex: 1; display: flex; flex-direction: column; }
.console-cta-text small { color: var(--muted); }

/* ---------- Vue d'ensemble ---------- */
.hero-guild {
  display: flex; align-items: center; gap: 18px; padding: 26px; border-radius: var(--radius); border: 1px solid var(--border);
  background: radial-gradient(120% 160% at 0% 0%, rgba(225, 29, 46, .25), transparent 55%), var(--panel);
}
.hero-guild img { width: 68px; height: 68px; border-radius: 19px; box-shadow: 0 0 0 4px var(--red-soft); }
.hero-guild h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); transition: .2s; }
.stat:hover { border-color: var(--red-line); transform: translateY(-2px); }
.stat > [data-lucide] { width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: var(--red-soft); color: var(--red-2); }
.stat b { display: block; font-size: 23px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 12px; }
.stat-link { border-color: var(--red-line); }
.module-grid { display: flex; flex-direction: column; gap: 8px; }
.module-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); transition: .15s; }
.module-tile:hover { border-color: var(--red); transform: translateX(3px); }
.module-tile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.module-tile-text small { color: var(--dim); }
.badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); color: var(--dim); border: 1px solid var(--border-2); }
.badge-on { background: var(--red-soft); color: var(--red-2); border-color: var(--red-line); }
.top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.top-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); }
.top-list img { width: 32px; height: 32px; border-radius: 50%; }
.rank { width: 28px; font-weight: 800; color: var(--dim); }
.top-list li:first-child { background: linear-gradient(90deg, rgba(225, 29, 46, .16), var(--bg-2)); }
.top-list li:first-child .rank { color: var(--red-2); }
.top-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-lvl { font-size: 12px; font-weight: 700; color: var(--red-2); }

/* ---------- Console live ---------- */
.live-status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--border-2); font-weight: 600; font-size: 13px; color: var(--muted); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; }
.live-status.ok { color: #86efac; border-color: rgba(34, 197, 94, .35); }
.live-status.ok .live-dot { background: var(--green); animation: pulse-green 1.6s infinite; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.console-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.terminal {
  position: relative; display: flex; flex-direction: column; height: calc(100vh - 250px); min-height: 480px;
  border-radius: var(--radius); border: 1px solid var(--border-2); background: #050506; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 20px 50px -30px var(--red);
}
.terminal-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg-2); flex-wrap: wrap; }
.term-filters { flex: 1; display: flex; gap: 4px; flex-wrap: wrap; }
.tf { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); font: 600 12px 'Inter', sans-serif; cursor: pointer; transition: .15s; }
.tf [data-lucide] { width: 14px; height: 14px; }
.tf:hover { background: var(--panel-2); color: var(--text); }
.tf.active { background: var(--red-soft); border-color: var(--red-line); color: #fff; }
.term-tools { display: flex; align-items: center; gap: 6px; }
.term-tools .icon-btn { width: 32px; height: 32px; }
.term-search { display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 32px; border-radius: 8px; border: 1px solid var(--border-2); background: #050506; color: var(--dim); }
.term-search [data-lucide] { width: 14px; height: 14px; }
.term-search input { width: 130px; border: 0; background: none; padding: 0; font: 12px var(--mono); box-shadow: none !important; }
.terminal-body { flex: 1; overflow-y: auto; padding: 10px 6px; font: 12.5px/1.55 var(--mono); }
.term-empty { padding: 6px 10px; color: var(--dim); }
.term-prompt { color: var(--red-2); }
.caret { animation: blink 1s steps(1) infinite; color: var(--text); }
.tl { display: flex; align-items: baseline; gap: 10px; padding: 3px 10px; border-radius: 6px; animation: line-in .25s ease; }
.tl:hover { background: rgba(255, 255, 255, .035); }
@keyframes line-in { from { opacity: 0; transform: translateX(-6px); } }
.tl-time { color: #4b4b55; flex-shrink: 0; }
.tl-tag { flex-shrink: 0; min-width: 70px; text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 5px; color: var(--c, #a1a1aa); background: color-mix(in srgb, var(--c, #a1a1aa) 14%, transparent); }
.tl-user { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; border: 0; background: none; padding: 0; color: var(--c, #e4e4e7); font: 600 12.5px var(--mono); cursor: pointer; }
.tl-user img { width: 18px; height: 18px; border-radius: 50%; align-self: center; }
.tl-user:hover span { text-decoration: underline; }
.tl-chan { color: #6b7280; flex-shrink: 0; }
.tl-text { color: #d4d4d8; white-space: pre-wrap; word-break: break-word; min-width: 0; }
.tl-join { --c: #4ade80; }
.tl-leave { --c: #fb923c; }
.tl-voice { --c: #38bdf8; }
.tl-chat { --c: #a1a1aa; }
.tl-delete, .tl-edit { --c: #facc15; }
.tl-role { --c: #c084fc; }
.tl-mod, .tl-automod { --c: #ff4d5e; }
.tl-mod .tl-text, .tl-automod .tl-text { color: #fecaca; }
.tl-ticket { --c: #f472b6; }
.tl-level { --c: #fbbf24; }
.tl-nick { --c: #2dd4bf; }
.term-jump { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; border: 0; background: var(--red); color: #fff; font: 600 12px 'Inter', sans-serif; cursor: pointer; box-shadow: 0 8px 24px -6px var(--red); }
.term-jump [data-lucide] { width: 14px; height: 14px; }
.terminal-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--border); background: var(--bg-2); color: var(--dim); font: 11px var(--mono); }

.member-panel { position: sticky; top: 84px; gap: 14px; }
.member-search { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--dim); }
.member-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.member-search input { border: 0; background: none; padding: 11px 0; box-shadow: none !important; }
.member-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; padding: 6px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border-2); box-shadow: 0 24px 50px -14px #000; }
.mr-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 9px; background: none; color: var(--text); cursor: pointer; text-align: left; }
.mr-item:hover { background: var(--panel-3); }
.mr-item img { width: 32px; height: 32px; border-radius: 50%; }
.mr-names { display: flex; flex-direction: column; min-width: 0; }
.mr-names small { color: var(--dim); }
.mr-empty { padding: 12px; text-align: center; color: var(--dim); }
.member-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 10px; text-align: center; color: var(--dim); border: 1px dashed var(--border-2); border-radius: 13px; }
.member-empty [data-lucide] { width: 28px; height: 28px; color: var(--red); }
.member-card { display: flex; flex-direction: column; gap: 14px; transition: opacity .2s; }
.member-card.loading { opacity: .5; pointer-events: none; }
.member-top { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 13px; background: radial-gradient(200px 100px at 0% 0%, rgba(225, 29, 46, .25), transparent), var(--bg-2); border: 1px solid var(--border); }
.member-top img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 3px var(--red-soft); }
.member-names { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member-names b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-names span { color: var(--dim); font: 11px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.member-badges:empty { display: none; }
.mbadge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--panel-3); color: var(--muted); }
.mbadge .ic { width: 13px; height: 13px; }
.mbadge-voice { background: rgba(56, 189, 248, .12); color: #7dd3fc; }
.mbadge-red { background: var(--red-soft); color: #ff8a94; }
.member-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.member-info div { padding: 9px 11px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.member-info dt { font-size: 11px; color: var(--dim); }
.member-info dd { font-weight: 700; }
.member-section { display: flex; flex-direction: column; gap: 9px; padding-top: 12px; border-top: 1px solid var(--border); }
.section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.member-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.mrole { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 9px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border-2); font-size: 12.5px; font-weight: 500; }
.mrole-x { display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 5px; background: none; color: var(--dim); cursor: pointer; }
.mrole-x .ic { width: 12px; height: 12px; }
.mrole-x:hover { background: var(--red); color: #fff; }
.add-role { display: flex; gap: 8px; }
.add-role .sel { flex: 1; }
.add-role .sel-btn { height: 34px; border-radius: 9px; font-size: 13px; }
.mute-row { display: flex; gap: 8px; }
.mute-row .sel { flex: 1; }
.mute-row .sel-btn { height: 34px; border-radius: 9px; font-size: 13px; }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.action-grid .btn { padding: 0 8px; }

/* ---------- Pages publiques ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(60% 50% at 50% 0%, rgba(225, 29, 46, .18), transparent 70%), var(--bg); }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 22px 40px; }
.user-nav { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.user-nav img { width: 34px; height: 34px; border-radius: 50%; }
.landing-hero { text-align: center; padding: 80px 24px 60px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.landing-hero h1 { font-size: clamp(34px, 6vw, 64px); line-height: 1.04; font-weight: 800; letter-spacing: -0.045em; }
.landing-hero h1 .red { background: linear-gradient(90deg, #ff4d5e, var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-hero > p { max-width: 560px; color: var(--muted); font-size: 17px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--panel); font-size: 13px; color: var(--muted); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 46, .7); } 70% { box-shadow: 0 0 0 10px rgba(225, 29, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 29, 46, 0); } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-stats { display: flex; gap: 48px; margin-top: 18px; }
.hero-stats b { display: block; font-size: 28px; font-weight: 800; }
.hero-stats span { color: var(--dim); font-size: 13px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 1080px; width: 100%; margin: 0 auto; padding: 0 24px 80px; }
.feature { padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; transition: .2s; }
.feature:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: 0 20px 40px -24px var(--red); }
.feature b { font-size: 16px; }
.feature p { color: var(--muted); }
.landing-foot { margin-top: auto; text-align: center; padding: 24px; color: var(--dim); border-top: 1px solid var(--border); }

.servers-page { max-width: 1080px; width: 100%; margin: 0 auto; padding: 40px 24px 80px; display: flex; flex-direction: column; gap: 8px; }
.servers-page h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.server-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 18px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); transition: .2s; }
.server-card:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: 0 20px 40px -24px var(--red); }
.server-banner { width: calc(100% + 36px); height: 80px; background: var(--red-dark) center / cover; filter: blur(18px) saturate(1.4); opacity: .55; transform: scale(1.3); }
.server-icon { width: 64px; height: 64px; border-radius: 18px; margin-top: -36px; position: relative; border: 3px solid var(--panel); }
.server-name { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.error-page { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.error-page h1 { font-size: 32px; font-weight: 800; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .split-preview { grid-template-columns: 1fr; }
  .console-layout { grid-template-columns: 1fr; }
  .member-panel { position: static; }
}
@media (max-width: 980px) {
  .grid-split { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .overlay.show { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .6); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .topbar .btn { display: none; }
  .content { padding: 20px 16px; }
  .module-head { padding: 18px; flex-wrap: wrap; }
  .grid-2, .grid-3, .toggle-grid { grid-template-columns: 1fr; }
  .landing-nav { padding: 18px 16px; }
  .hero-stats { gap: 28px; }
  .inline-form { flex-direction: column; }
  .reward-row { grid-template-columns: 110px minmax(0, 1fr); }
  .savebar { flex-wrap: wrap; padding: 10px; }
  .savebar-text { flex-basis: 100%; }
  .terminal { height: 70vh; }
  .term-search input { width: 90px; }
  .tl { flex-wrap: wrap; gap: 4px 8px; }
  .tl-text { flex-basis: 100%; }
  .console-cta { flex-wrap: wrap; }
}

/* Champs de recherche intégrés */
.sel-search input, .ep-search input, .member-search input, .term-search input {
  flex: 1; min-width: 0; width: 100%; outline: none; color: var(--text); font-family: inherit; font-size: 13.5px;
}
.term-search input { font-family: var(--mono); font-size: 12px; }

/* Ligne de commande de la console */
.term-input { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--border); background: #09090b; font: 13px var(--mono); }
.term-input .term-prompt { color: var(--red-2); font-weight: 700; flex-shrink: 0; }
.term-input-wrap { position: relative; flex: 1; min-width: 0; }
.term-input input { width: 100%; border: 0; background: none; padding: 6px 0; color: var(--text); font: 13px var(--mono); outline: none; box-shadow: none !important; caret-color: var(--red-2); }
.term-hint { position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 11.5px; pointer-events: none; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.term-input .icon-btn { width: 30px; height: 30px; }
.term-input:focus-within { box-shadow: inset 0 1px 0 var(--red-line); }
.tl-cmd { --c: #f4f4f5; }
.tl-cmd .tl-text { color: #fff; font-weight: 600; }
.tl-out { --c: #4ade80; }
.tl-out .tl-text { color: #bbf7d0; }
.tl-err { --c: #ff4d5e; }
.tl-err .tl-text { color: #fecaca; }

/* Suggestions de la ligne de commande */
.term-suggest {
  position: absolute; left: -10px; right: -40px; bottom: calc(100% + 14px); z-index: 30; padding: 6px;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: 0 -18px 40px -16px #000;
  animation: pop .12s ease;
}
.ts-item { display: flex; align-items: baseline; gap: 12px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font: 12.5px var(--mono); }
.ts-item:hover, .ts-item.active { background: var(--panel-3); }
.ts-item.active { box-shadow: inset 2px 0 0 var(--red); }
.ts-main { color: var(--text); white-space: nowrap; }
.ts-detail { color: var(--dim); font-size: 11.5px; margin-left: auto; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-out .tl-text, .tl-err .tl-text { white-space: pre; overflow-x: auto; }
.tl-music { --c: #f472b6; }
.tl-eco { --c: #facc15; }
.tl-giveaway { --c: #fb7185; }
.tl-ticket { --c: #e879f9; }

/* ---------- Économie ---------- */
.shop-list { display: flex; flex-direction: column; gap: 8px; }
.shop-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 120px minmax(0, 1.2fr) minmax(0, 1.6fr); gap: 8px; align-items: center; }
.shop-row .sel-btn { height: 44px; }
.shop-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); padding: 0 4px; }

/* ---------- Giveaways ---------- */
.card-title .badge { margin-left: 4px; }
.quick-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-picks button { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--muted); font: 600 12px 'Inter', sans-serif; cursor: pointer; }
.quick-picks button:hover { border-color: var(--red); color: #fff; }
.gw-list { display: flex; flex-direction: column; gap: 8px; }
.gw-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: linear-gradient(90deg, rgba(225, 29, 46, .12), var(--bg-2) 60%); border: 1px solid var(--red-line); }
.gw-item.ended { background: var(--bg-2); border-color: var(--border); }
.gw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gw-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-main small { color: var(--muted); }
.gw-end { color: var(--red-2) !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.gw-actions { display: flex; gap: 6px; }

/* ---------- Musique ---------- */
.player-card .card-title .live-status { margin-left: auto; font-size: 12px; padding: 5px 11px; }
.np { display: flex; gap: 18px; align-items: center; padding: 16px; border-radius: 14px; background: radial-gradient(300px 140px at 0% 0%, rgba(225, 29, 46, .25), transparent), var(--bg-2); border: 1px solid var(--border); }
.np-cover { width: 110px; height: 110px; border-radius: 12px; object-fit: cover; flex-shrink: 0; box-shadow: 0 14px 30px -12px var(--red); }
.np-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.np-title { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-title:hover { color: var(--red-2); }
.np-author { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-progress { display: flex; align-items: center; gap: 10px; font: 11px var(--mono); color: var(--dim); }
.np-bar { flex: 1; height: 5px; border-radius: 5px; background: var(--border-2); overflow: hidden; }
.np-bar div { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), #ff6b78); border-radius: 5px; transition: width 1s linear; }
.np-controls { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.np-play { width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--red); color: #fff; cursor: pointer; box-shadow: 0 8px 22px -6px var(--red); transition: transform .1s; }
.np-play:hover { transform: scale(1.06); background: var(--red-2); }
.np-volume { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); }
.np-volume input { width: 110px; accent-color: var(--red); }
.play-form { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.play-form .inline-form input { flex: 1; }
.queue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 480px; overflow-y: auto; }
.queue-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; background: var(--bg-2); }
.queue-item .icon-btn { width: 28px; height: 28px; }
.queue-num { width: 22px; text-align: center; font: 700 12px var(--mono); color: var(--dim); }
.queue-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.queue-info b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-info small { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 860px) {
  .shop-row { grid-template-columns: 1fr 100px; }
  .shop-head { display: none; }
  .np { flex-direction: column; align-items: stretch; }
  .np-cover { width: 100%; height: 160px; }
  .gw-item { flex-wrap: wrap; }
}
.field.field-inline { flex-direction: row; text-align: left; }
.field.field-inline > div { min-width: 0; }
.ts-avatar { width: 20px; height: 20px; border-radius: 50%; align-self: center; flex-shrink: 0; margin-right: -4px; }
.ts-item { align-items: center; }

/* ---------- Tickets ---------- */
.small { font-size: 12px; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border-2); width: fit-content; }
.segmented input { display: none; }
.segmented span { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; color: var(--muted); font-weight: 600; cursor: pointer; transition: .15s; }
.segmented span [data-lucide], .segmented span svg { width: 16px; height: 16px; }
.segmented input:checked + span { background: var(--red); color: #fff; box-shadow: 0 6px 18px -8px var(--red); }
.cat-list { display: flex; flex-direction: column; gap: 10px; }
.cat-card { border-radius: 14px; border: 1px solid var(--border); background: var(--bg-2); overflow: visible; transition: border-color .15s; }
.cat-card.open { border-color: var(--red-line); }
.cat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; user-select: none; }
.cat-emoji { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; background: var(--panel-2); font-size: 20px; overflow: hidden; }
.cat-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cat-head-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-badges .badge { font-size: 10.5px; padding: 2px 8px; }
.cat-tools { display: flex; align-items: center; gap: 6px; }
.cat-tools .icon-btn { width: 32px; height: 32px; }
.cat-tools .icon-btn:disabled { opacity: .3; cursor: default; }
.cat-chevron { display: grid; place-items: center; width: 28px; color: var(--dim); transition: transform .2s; }
.cat-card.open .cat-chevron { transform: rotate(180deg); }
.cat-body { display: none; flex-direction: column; gap: 16px; padding: 4px 16px 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.cat-card.open .cat-body { display: flex; }
.cat-grid { display: grid; grid-template-columns: 140px minmax(0, 1fr) 180px; gap: 14px; }
.role-grid { align-items: start; }
.role-field label { display: flex; align-items: center; gap: 6px; }
.role-field label [data-lucide], .role-field label svg, .field > label svg { width: 15px; height: 15px; color: var(--red-2); }
.role-field .member-roles { min-height: 30px; align-items: center; }
.role-field .sel-btn { height: 36px; font-size: 13px; }
.q-list { display: flex; flex-direction: column; gap: 8px; }
.q-row { display: grid; grid-template-columns: 26px minmax(0, 1.2fr) minmax(0, 1fr) auto auto 34px; gap: 8px; align-items: center; }
.q-row .icon-btn { width: 34px; height: 34px; }
.q-row .check { font-size: 12.5px; white-space: nowrap; }
.q-num { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--red-soft); color: var(--red-2); font: 700 12px var(--mono); }
.q-add { width: fit-content; }
.dc-buttons-wrap { flex-wrap: wrap; }
.dc-button img.dc-emoji { width: 18px; height: 18px; vertical-align: -4px; }
.dc-select { position: relative; max-width: 420px; margin-top: 4px; }
.dc-select-box { width: 100%; display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 12px; border-radius: 4px; border: 1px solid #1e1f22; background: #1e1f22; color: #949ba4; font: 14px 'Inter', sans-serif; cursor: pointer; }
.dc-select-list { margin-top: 4px; border-radius: 4px; background: #2b2d31; border: 1px solid #1e1f22; overflow: hidden; }
.dc-option { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: #dbdee1; }
.dc-option:hover { background: #35373c; }
.dc-option b { display: block; font-weight: 500; }
.dc-option small { display: block; color: #949ba4; font-size: 12px; }
.dc-option-emoji { font-size: 20px; width: 24px; text-align: center; }
.fun-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.fun-cmd { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.fun-cmd span { color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  .cat-grid { grid-template-columns: 1fr; }
  .q-row { grid-template-columns: 26px 1fr 34px; }
  .q-row input[data-q-field="placeholder"], .q-row .check { grid-column: 2 / 3; }
  .cat-tools .icon-btn[data-action="up"], .cat-tools .icon-btn[data-action="down"] { display: none; }
}
.name-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.name-presets button { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--muted); font: 600 12px var(--mono); cursor: pointer; transition: .15s; }
.name-presets button:hover { border-color: var(--red-line); color: #fff; }
.name-presets button.active { background: var(--red-soft); border-color: var(--red); color: #fff; }
.name-example { color: var(--text); font-family: var(--mono); }

/* Éditeur de texte avec emojis affichés */
.rt-source { display: none !important; }
.rt-editor {
  width: 100%; padding: 11px 46px 11px 13px; border-radius: 11px; border: 1px solid var(--border-2);
  background: var(--bg-2); color: var(--text); font: 14px/1.55 'Inter', sans-serif; outline: none; transition: .15s;
  white-space: pre-wrap; word-break: break-word; cursor: text;
}
.rt-editor:hover { border-color: #3d3d47; }
.rt-editor:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.rt-single { white-space: nowrap; overflow-x: auto; overflow-y: hidden; min-height: 44px; scrollbar-width: none; }
.rt-single::-webkit-scrollbar { display: none; }
.rt-multi { resize: vertical; overflow: auto; }
.rt-editor.empty::before { content: attr(data-placeholder); color: var(--dim); pointer-events: none; }
.rt-emoji { display: inline-block; width: 22px; height: 22px; vertical-align: -5px; object-fit: contain; margin: 0 1px; user-select: all; }
.discord-logo { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #5865f2; color: #fff; flex-shrink: 0; }
.discord-logo svg { width: 16px; height: 16px; }
.ep-head .discord-logo { width: 18px; height: 18px; border-radius: 5px; }
.ep-head .discord-logo svg { width: 12px; height: 12px; }
.ep-rail-btn.active .discord-logo { box-shadow: 0 0 0 2px var(--red); }
.cat-emoji .rt-emoji, .cat-emoji img { width: 24px; height: 24px; }

/* Cases à cocher personnalisées */
input[type=checkbox]:not(.switch input):not(.chip input) {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; margin: 0; cursor: pointer;
  width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border-2); background: var(--bg-2);
  display: inline-grid; place-items: center; transition: background .15s, border-color .15s, box-shadow .15s;
}
input[type=checkbox]:not(.switch input):not(.chip input):hover { border-color: var(--red-line); }
input[type=checkbox]:not(.switch input):not(.chip input):checked {
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
  border-color: var(--red); box-shadow: 0 0 12px -3px var(--red);
}
input[type=checkbox]:not(.switch input):not(.chip input):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--red-soft); }
.check { user-select: none; }

/* Recherche de musique */
.music-search { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--dim); }
.music-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.music-search input { border: 0 !important; background: none; padding: 11px 0; box-shadow: none !important; flex: 1; min-width: 0; color: var(--text); outline: none; font: 14px 'Inter', sans-serif; }
.music-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; padding: 6px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--border-2); box-shadow: 0 24px 50px -14px #000; max-height: 380px; overflow-y: auto; animation: pop .12s ease; }
.ms-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 7px 8px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.ms-item.active, .ms-item:hover { background: var(--panel-3); }
.ms-item img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.ms-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ms-text b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-text small { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-duration { font: 12px var(--mono); color: var(--dim); }
.ms-play { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; opacity: 0; transition: opacity .15s; flex-shrink: 0; }
.ms-play .ic { width: 14px; height: 14px; }
.ms-item.active .ms-play, .ms-item:hover .ms-play { opacity: 1; }
.ms-empty { padding: 14px; text-align: center; color: var(--dim); font-size: 13px; }
