/* Skyline FA — panel
   Palette tirée du logo Skyline FA : brun profond #4F3A33, or sable #D9B07A / #E2B77A, beige #EBDCC6.
   Statuts : sauge / ambre / terre cuite. Typo : Unbounded (titres, chiffres) + Manrope (texte). */
:root {
  color-scheme: light;
  --bg: #F6F0E8;
  --surface: #FFFFFF;
  --surface-2: #EFE5D8;
  --line: #E2D4C2;
  --text: #2B1F1A;
  --muted: #7A6656;
  --accent: #8B5E3C;
  --accent-soft: rgba(139, 94, 60, .12);
  --on-accent: #FFFFFF;
  --mint: #138A6E;
  --amber: #B45309;
  --rose: #C2416B;
  --shadow: 0 1px 2px rgba(43, 31, 26, .06), 0 8px 24px -12px rgba(43, 31, 26, .2);
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15100D; --surface: #1F1814; --surface-2: #2A201B; --line: #3D2F27;
  --text: #F4EADC; --muted: #B09A84; --accent: #E2B77A; --accent-soft: rgba(226, 183, 122, .13); --on-accent: #241A14;
  --mint: #6EE7B7; --amber: #FBBF77; --rose: #F87199;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 14px 36px -18px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15100D; --surface: #1F1814; --surface-2: #2A201B; --line: #3D2F27;
  --text: #F4EADC; --muted: #B09A84; --accent: #E2B77A; --accent-soft: rgba(226, 183, 122, .13); --on-accent: #241A14;
  --mint: #6EE7B7; --amber: #FBBF77; --rose: #F87199;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 14px 36px -18px rgba(0, 0, 0, .8);
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); height: 100%; }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 500 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { display: block; }

/* ---------- Structure ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--surface) 0 247px, var(--line) 247px 248px, transparent 248px); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 26px 18px; }
.brand { display: flex; align-items: center; gap: 10px; font: 500 15px/1 var(--display); letter-spacing: -.01em; padding: 0 8px; }
.brand b { font-weight: 700; margin-left: 2px; }
.brand.big { font-size: 20px; justify-content: center; margin-bottom: 8px; }
.brand-mark { width: 32px; height: 32px; flex: none; background: url("logo.png") center / contain no-repeat; }
.brand.big .brand-mark { width: 72px; height: 72px; }
.brand.big { flex-direction: column; gap: 14px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.nav-title { margin: 14px 12px 4px; font: 600 10.5px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .75; }
.nav-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.nav-dot.on { background: var(--mint); }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); color: var(--muted); text-decoration: none; font-weight: 600; transition: background .15s, color .15s; }
.nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--accent-soft); }
.nav a.active svg { stroke: var(--accent); }
.nav-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font: 600 11px/18px var(--display); text-align: center; }
.botcard { margin-top: auto; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); display: grid; grid-template-columns: 36px 1fr; gap: 4px 10px; align-items: center; font-size: 13px; }
.botcard img, .botcard .ph { width: 36px; height: 36px; border-radius: 10px; grid-row: span 2; background: var(--line); object-fit: cover; }
.botcard strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.dot.on::before { background: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 25%, transparent); }
.dot.demo::before { background: var(--amber); }

.main { min-width: 0; padding: 30px clamp(18px, 3.4vw, 44px) 60px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.top h1 { margin: 0; font: 600 clamp(22px, 2.6vw, 30px)/1.15 var(--display); letter-spacing: -.02em; }
.sub { margin: 6px 0 0; color: var(--muted); }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.view { display: grid; gap: 20px; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { margin: 0 0 4px; font: 600 15px/1.3 var(--display); letter-spacing: -.01em; }
.card .hint { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head .hint { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }

/* ---------- File d'attente (élément signature) ---------- */
.queue { padding: 24px 24px 18px; overflow: hidden; }
.queue-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.queue-count { display: flex; align-items: baseline; gap: 12px; }
.queue-count strong { font: 600 56px/0.9 var(--display); letter-spacing: -.04em; }
.queue-count span { color: var(--muted); max-width: 22ch; line-height: 1.35; }
.queue-scale { position: relative; height: 18px; margin: 0 0 6px 200px; color: var(--muted); font-size: 11.5px; }
.queue-scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.queue-rows { display: grid; gap: 6px; }
.qrow { display: grid; grid-template-columns: 188px 1fr; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 4px 0; border-radius: var(--r-sm); }
.qrow:hover .qbar-fill { filter: brightness(1.08); }
.qwho { display: flex; flex-direction: column; min-width: 0; }
.qwho b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qwho small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qtrack { position: relative; height: 30px; border-radius: 8px; background: var(--surface-2); }
.qtrack .mark { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--line); }
.qbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; min-width: 64px; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; font: 600 12px/1 var(--display); color: var(--on-accent); transition: width .6s cubic-bezier(.2, .7, .2, 1); }
.qbar-fill.ok { background: var(--mint); }
.qbar-fill.wait { background: var(--accent); }
.qbar-fill.warn { background: var(--amber); }
.qbar-fill.late { background: var(--rose); }
.qlegend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; color: var(--muted); font-size: 12.5px; }
.qlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.queue-empty { padding: 26px 0 8px; color: var(--muted); }

/* ---------- Indicateurs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.kpi { padding: 18px 20px; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .value { font: 600 28px/1.15 var(--display); letter-spacing: -.03em; margin: 8px 0 4px; }
.kpi .value small { font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.kpi .foot { color: var(--muted); font-size: 12.5px; }
.stars { color: var(--amber); letter-spacing: 1px; }

/* ---------- Graphiques ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font: 500 11px var(--body); }
.legend { display: flex; gap: 16px; color: var(--muted); font-size: 12.5px; }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
.range { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.range button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.range button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.catbars { display: grid; gap: 14px; }
.catbar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.catbar-top span:last-child { color: var(--muted); white-space: nowrap; }
.catbar-track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.catbar-track div { height: 100%; border-radius: 99px; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.hours div { aspect-ratio: 1 / 1.6; border-radius: 4px; background: var(--accent); }
.hours-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 6px; }

/* ---------- Boutons & champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--text); transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--rose); }
.btn.danger.solid { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn.ghost { background: none; border-color: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.form { display: grid; gap: 16px; align-content: start; }
.form .hint { margin-bottom: 0; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.row.r3 { grid-template-columns: 90px minmax(0, 1fr) 170px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span { font-weight: 700; font-size: 13.5px; }
.field small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.input, .field input:not([type="checkbox"]):not([type="color"]), .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.color-input { display: flex; gap: 8px; align-items: center; }
.color-input input[type="color"] { width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; flex: none; }
.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 4px; }
.color-input input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.chips-help { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-help button { border: 1px dashed var(--line); background: none; border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.chips-help button:hover { color: var(--accent); border-color: var(--accent); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch-row:first-child { border-top: 0; padding-top: 0; }
.switch-row b { display: block; font-size: 14px; }
.switch-row small { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sélecteur de rôles */
.picker { position: relative; }
.picker-box { display: flex; flex-wrap: wrap; gap: 6px; min-height: 44px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: text; }
.picker-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .picker-box input, .picker-box input { flex: 1; width: auto; min-width: 100px; border: 0; background: none; outline: none; box-shadow: none; padding: 4px 6px; }
.picker-chips { display: contents; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.chip i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 4px; font-size: 15px; line-height: 1; }
.chip button:hover { color: var(--rose); }
.picker-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 230px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.picker-list button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.picker-list button:hover, .picker-list button.hl { background: var(--surface-2); }
.picker-list button i { width: 10px; height: 10px; border-radius: 50%; }
.picker-list p { margin: 0; padding: 10px; color: var(--muted); font-size: 13px; }

/* ---------- Listes & tableaux ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input { max-width: 280px; }
.toolbar select.input { max-width: 220px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 0 12px 10px; white-space: nowrap; }
td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
td .num { font: 600 13px var(--display); }
.muted { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--surface-2); border: 1px solid var(--line); }
.tag i { width: 7px; height: 7px; border-radius: 50%; }
.status-open { color: var(--accent); } .status-open i { background: var(--accent); }
.status-claimed { color: var(--mint); } .status-claimed i { background: var(--mint); }
.status-closed, .status-deleted { color: var(--muted); } .status-closed i, .status-deleted i { background: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font: 600 16px var(--display); margin-bottom: 6px; }

.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: auto 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; transition: border-color .15s; }
.item:hover { border-color: var(--accent); }
.item.dragging { opacity: .5; }
.item.drop { border-color: var(--accent); border-style: dashed; }
.handle { cursor: grab; color: var(--muted); padding: 4px; border: 0; background: none; }
.handle svg { width: 16px; height: 16px; fill: currentColor; }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.item h3 { margin: 0; font-size: 15px; font-weight: 700; }
.item p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.item .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.off { opacity: .55; }

/* ---------- Éditeurs ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 20px; align-items: start; }
.sticky { position: sticky; top: 20px; }
.qlist { display: grid; gap: 10px; }
.qcard { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; background: var(--surface-2); display: grid; gap: 12px; }
.qcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qcard-head b { font: 600 13px var(--display); }
.qcard .row { gap: 12px; }
.inline-check { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.inline-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.savebar { position: sticky; bottom: 16px; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--shadow); transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .25s, opacity .25s; }
.savebar.show { transform: none; opacity: 1; pointer-events: auto; }
.savebar span { font-weight: 700; font-size: 14px; }

/* ---------- Aperçu façon Discord (toujours sombre, comme l'app) ---------- */
.dc { background: #313338; color: #DBDEE1; border-radius: var(--r-md); padding: 16px; font: 400 15px/1.375 "gg sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif; }
.dc-label { color: var(--muted); font-size: 12.5px; font-weight: 700; margin: 0 0 8px; }
.dc-msg { display: grid; grid-template-columns: 40px 1fr; gap: 0 14px; }
.dc-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #5865F2; font-size: 20px; }
.dc-name { color: #F2F3F5; font-weight: 500; margin-right: 6px; }
.dc-bot { background: #5865F2; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 3px; margin: 0 6px 0 0; vertical-align: 2px; }
.dc-time { color: #949BA4; font-size: 12px; }
.dc-text { margin-top: 2px; }
.dc-mention { background: rgba(88, 101, 242, .3); color: #C9CDFB; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-embed { margin-top: 6px; max-width: 432px; background: #2B2D31; border-left: 4px solid #7C9CFF; border-radius: 4px; padding: 10px 16px 14px 12px; display: grid; gap: 6px; }
.dc-embed .au { font-size: 14px; font-weight: 600; color: #F2F3F5; }
.dc-embed .ti { font-weight: 600; color: #F2F3F5; font-size: 16px; }
.dc-embed .de { font-size: 14px; line-height: 1.45; white-space: normal; word-wrap: break-word; }
.dc-embed .fi { font-size: 14px; } .dc-embed .fi b { color: #F2F3F5; display: block; font-size: 14px; }
.dc-embed .im { width: 100%; max-height: 200px; object-fit: cover; border-radius: 4px; margin-top: 4px; }
.dc-embed .fo { font-size: 12px; color: #B5BAC1; }
.dc-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dc-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 16px; border-radius: 3px; background: #4E5058; color: #fff; font-size: 14px; font-weight: 500; }
.dc-btn.p { background: #5865F2; } .dc-btn.d { background: #DA373C; } .dc-btn.s { background: #248046; }
.dc-select { margin-top: 8px; max-width: 400px; height: 40px; border-radius: 4px; background: #1E1F22; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: #949BA4; font-size: 14px; }
.dc-options { max-width: 400px; background: #2B2D31; border: 1px solid #1E1F22; border-radius: 0 0 4px 4px; }
.dc-options div { display: grid; grid-template-columns: 26px 1fr; padding: 8px 12px; gap: 0 8px; align-items: center; }
.dc-options div + div { border-top: 1px solid #1E1F22; }
.dc-options b { color: #F2F3F5; font-weight: 500; font-size: 14px; }
.dc-options small { grid-column: 2; color: #B5BAC1; font-size: 12px; }
.dc-modal { margin-top: 14px; background: #313338; border-radius: 8px; border: 1px solid #1E1F22; padding: 16px; display: grid; gap: 12px; }
.dc-modal h4 { margin: 0; color: #F2F3F5; font-size: 18px; font-weight: 600; }
.dc-modal label { font-size: 12px; font-weight: 700; color: #B5BAC1; text-transform: uppercase; letter-spacing: .02em; }
.dc-modal label em { color: #F23F43; font-style: normal; }
.dc-modal .f { margin-top: 6px; background: #1E1F22; border-radius: 3px; padding: 10px; color: #6D6F78; font-size: 14px; min-height: 40px; }
.dc-modal .f.p { min-height: 76px; }

/* ---------- Fiche ticket ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.facts { display: grid; gap: 12px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: right; }
.answers { display: grid; gap: 14px; }
.answers b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.answers p { margin: 0; white-space: pre-wrap; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline time { display: block; color: var(--muted); font-size: 12px; }
.transcript { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: var(--r-md); background: #15100D; }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.login-error { margin: -6px 0 0; min-height: 1em; color: var(--rose); font-size: 13.5px; }

/* ---------- Toasts & dialogues ---------- */
.toasts { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; z-index: 100; }
.toast { padding: 12px 16px; border-radius: var(--r-md); background: var(--text); color: var(--bg); font-weight: 700; font-size: 14px; box-shadow: var(--shadow); animation: toast-in .25s ease-out; max-width: 360px; }
.toast.err { background: var(--rose); color: #fff; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
.dialog { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); padding: 24px; width: min(440px, calc(100% - 32px)); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(27, 20, 18, .6); backdrop-filter: blur(3px); }
.dialog h3 { margin: 0 0 8px; font: 600 17px var(--display); }
.dialog p { margin: 0 0 16px; color: var(--muted); }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.skeleton { height: 120px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.4s infinite linear; border: 1px solid var(--line); }
@keyframes sk { to { background-position: -200% 0; } }
.demo-banner { padding: 10px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--amber) 14%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor, .detail, .grid-3-1 { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .side { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; gap: 12px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31; background: var(--surface); }
  .side .brand > span:last-child, .botcard { display: none; }
  .nav { flex-direction: row; overflow: visible; }
  .nav-title, .nav-dot { display: none; }
  .nav a { padding: 8px 10px; white-space: nowrap; font-size: 13.5px; gap: 8px; }
  .grid-2, .row { grid-template-columns: 1fr; }
  .queue-scale { margin-left: 0; display: none; }
  .qrow { grid-template-columns: 1fr; gap: 4px; }
  .item { grid-template-columns: 44px 1fr; }
  .item .handle { display: none; }
  .item .meta { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr; }
  .queue-count strong { font-size: 44px; }
  .row.r3 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Identifiant de catégorie Discord ---------- */
.idpick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 210px); gap: 8px; }
.field .idpick input { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.idcheck { font-weight: 700; }
.idcheck:empty { display: none; }
.idcheck.ok { color: var(--mint); }
.idcheck.warn { color: var(--amber); }
.idcheck.err { color: var(--rose); }

/* ---------- Embed complet (aperçu) ---------- */
.dc-embed { position: relative; }
.dc-embed.has-thumb { display: block; }
.dc-embed.has-thumb > * + * { margin-top: 6px; }
.dc-thumb { float: right; margin: 2px 0 8px 14px; width: 72px; height: 72px; border-radius: 50%; background: #4E5058; display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 600; }
.dc-ic { display: inline-grid; place-items: center; border-radius: 50%; background: #4F3A33; color: #fff; font-size: 11px; font-weight: 700; vertical-align: -4px; margin-right: 4px; object-fit: cover; }
.dc-embed .au { display: flex; align-items: center; gap: 4px; }
.dc-embed .fo { display: flex; align-items: center; gap: 4px; }
.fis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; clear: both; }
.dc-quote { display: block; border-left: 4px solid #4E5058; padding-left: 10px; }
.dc-name.staff { color: #D9B07A; }
.dc-bot.s { background: #2F3D77; }
.dc-file { display: inline-block; margin-top: 6px; padding: 8px 12px; border-radius: 6px; background: #2B2D31; color: #00A8FC; text-decoration: none; font-size: 14px; }
img.dc-av { object-fit: cover; }

/* ---------- Conversation en direct ---------- */
.chat-log { max-height: 520px; overflow-y: auto; display: grid; gap: 14px; align-content: start; min-height: 160px; }
.chat-form { display: grid; gap: 10px; margin-top: 14px; }
.chat-as { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--muted); flex-wrap: wrap; }
.chat-as input { flex: 1; min-width: 160px; max-width: 260px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; color: var(--text); }
.chat-form textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); resize: vertical; min-height: 84px; line-height: 1.5; outline: none; }
.chat-form textarea:focus, .chat-as input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.chat-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 520px) {
  .idpick { grid-template-columns: 1fr; }
  .fis { grid-template-columns: 1fr; margin-right: 0; }
  .dc-thumb { display: none; }
}

/* ---------- Messages du bot ---------- */
.dc-gif { display: block; width: 100%; max-width: 400px; border-radius: 4px; margin-top: 8px; }
.msg-field + .msg-field { padding-top: 14px; border-top: 1px solid var(--line); }
.inline-check .switch { width: 38px; height: 22px; }
.inline-check .switch input { width: 100%; height: 100%; }
.inline-check .switch span::after { width: 16px; height: 16px; }
.inline-check .switch input:checked + span::after { transform: translateX(16px); }

/* ---------- Journal ---------- */
.audit { display: grid; gap: 8px; }
.audit-row { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.audit-row summary, .audit-row.plain { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; list-style: none; }
.audit-row summary { cursor: pointer; }
.audit-row summary::-webkit-details-marker { display: none; }
.audit-row summary:hover { background: var(--surface-2); border-radius: var(--r-md); }
.audit-row[open] summary { border-bottom: 1px solid var(--line); border-radius: var(--r-md) var(--r-md) 0 0; }
.audit-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: 17px; }
.audit-main { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.audit-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.audit-body { padding: 12px 14px 14px; display: grid; gap: 10px; }
.audit-note { margin: 0; color: var(--muted); font-size: 13.5px; }
.audit-diff td { vertical-align: top; font-size: 13.5px; cursor: default; }
.audit-diff tbody tr { cursor: default; }
.audit-diff tbody tr:hover { background: none; }
.audit-diff .old { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--rose) 60%, transparent); }
.audit-diff .new { color: var(--text); }
.audit-diff .pre { white-space: pre-wrap; word-break: break-word; display: block; max-height: 160px; overflow: auto; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line); }
.whoami { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.whoami:empty { display: none; }
.whoami b { color: var(--text); }
.transcript-txt { margin: 0; max-height: 620px; overflow: auto; padding: 16px; border-radius: var(--r-md); background: #15100D; color: #F4EADC; border: 1px solid var(--line); font: 12.5px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 860px) { .whoami { display: none; } .audit-row summary, .audit-row.plain { grid-template-columns: 36px 1fr; } .audit-meta { grid-column: 2; } }

/* ---------- Statut du bot ---------- */
.acts { display: grid; gap: 8px; }
.act-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.act-row select, .act-row input { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); outline: none; width: 100%; }
.act-row select:focus, .act-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.presence { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: #2B2D31; color: #DBDEE1; min-height: 56px; }
.presence b { display: block; color: #F2F3F5; font-size: 14px; font-weight: 600; }
.presence small { display: block; font-size: 12.5px; color: #B5BAC1; }
.pres-av { position: relative; width: 36px; height: 36px; flex: none; }
.pres-av img { width: 36px; height: 36px; border-radius: 50%; }
.pres-av i { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #2B2D31; }
.pres-online { background: #23A55A; } .pres-idle { background: #F0B232; } .pres-dnd { background: #F23F43; }

/* ---------- Commentaire & crédits ---------- */
.facts .comment { flex-direction: column; gap: 4px; }
.facts .comment dd { text-align: left; font-weight: 500; font-style: italic; color: var(--text); }
.credits { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.credits b, .credits-login b { color: var(--accent); }
.credits-login { margin: 0; text-align: center; color: var(--muted); font-size: 12.5px; }
@media (max-width: 520px) { .act-row { grid-template-columns: 1fr; } }

/* ---------- Accueil : cartes des modules ---------- */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.mod { display: flex; flex-direction: column; gap: 14px; }
.mod-head { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.mod-head .hint { margin: 2px 0 0; }
.mod-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); border: 1px solid var(--line); }
.mod.on .mod-ico { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.mod:not(.on) { opacity: .82; }
.mod-stat { margin: 0; font-weight: 700; font-size: 14px; }
.mod-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mod-stats div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.mod-stats b { font: 600 20px/1.1 var(--display); }
.mod-stats span { color: var(--muted); font-size: 12.5px; }
.mod-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mod-cmds { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

/* ---------- Pages des modules ---------- */
.mod-form.grid-2 { align-items: start; }
.mod-form .card.wide, .mod-form > .savebar { grid-column: 1 / -1; }
.cmds { display: grid; gap: 8px; }
.cmds div { display: grid; grid-template-columns: 190px 1fr; gap: 12px; align-items: baseline; font-size: 13.5px; }
.cmds code { font: 600 12.5px ui-monospace, Consolas, monospace; color: var(--accent); background: var(--surface-2); padding: 3px 8px; border-radius: 6px; justify-self: start; }
.cmds span { color: var(--muted); }
tr.off td { opacity: .55; }
.feeds { display: grid; gap: 10px; }
.feed { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.feed.off { opacity: .6; }
.feed-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); }
.feed-ico.p-twitch { background: rgba(145, 70, 255, .18); } .feed-ico.p-youtube { background: rgba(255, 0, 51, .14); } .feed-ico.p-tiktok { background: rgba(37, 244, 238, .14); }
.feed-main { display: grid; gap: 3px; min-width: 0; font-size: 13.5px; }
.feed-main b { font-size: 15px; }
.feed-err { color: var(--rose); font-weight: 600; }
.feed-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.feed-form { padding: 16px; border: 1px dashed var(--accent); border-radius: var(--r-md); margin-bottom: 16px; background: var(--surface-2); }
@media (max-width: 860px) {
  .feed { grid-template-columns: 46px 1fr; } .feed-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .cmds div { grid-template-columns: 1fr; gap: 4px; }
}

.mod-form > .savebar:not(.show) { display: none; }
.mod-stats b { font-size: 18px; }

.envs { display: grid; gap: 10px; }
.envs div { display: grid; grid-template-columns: 26px 110px 1fr; gap: 4px 10px; align-items: center; font-size: 13.5px; }
.envs div > span.ok, .envs div > span.ko { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.envs .ok { background: color-mix(in srgb, var(--mint) 22%, transparent); color: var(--mint); }
.envs .ko { background: color-mix(in srgb, var(--rose) 18%, transparent); color: var(--rose); }
.envs code { font: 600 12px ui-monospace, Consolas, monospace; color: var(--accent); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.envs .codes { display: flex; gap: 6px; flex-wrap: wrap; }
.envs small { grid-column: 3; color: var(--muted); }

/* ---------- Créateur d'embeds ---------- */
.eb-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.eb-tpl { display: grid; gap: 8px; justify-items: start; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-align: left; transition: border-color .15s, transform .15s; }
.eb-tpl:hover { border-color: var(--accent); transform: translateY(-2px); }
.eb-tpl span { font-size: 24px; }
.eb-tpl b { font-size: 14px; }
.eb-list { display: grid; gap: 10px; }
.eb-item { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px 12px 12px; border-radius: var(--r-md); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .15s; }
.eb-item:hover { border-color: var(--accent); }
.eb-bar { align-self: stretch; border-radius: 4px; }
.eb-main { display: grid; gap: 2px; min-width: 0; }
.eb-main .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; font-size: 12.5px; }
.eb-name { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; border-bottom: 2px dashed var(--line); padding: 0; width: min(560px, 100%); outline: none; }
.eb-name:focus { border-bottom-color: var(--accent); }
.eb-editor { grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); }
.eb-side { display: grid; gap: 0; }
.eb-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.eb-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.eb-tab i { width: 10px; height: 10px; border-radius: 3px; }
.eb-tab.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.eb-tab.add { border-style: dashed; }
.eb-colors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.eb-sw { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.eb-sw.on { border-color: var(--text); }
.eb-colors .color-input { margin-left: 6px; }
.eb-colors .color-input input:not([type=color]) { width: 110px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.eb-sec { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; background: var(--surface-2); }
.eb-sec summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }
.eb-sec[open] summary { margin-bottom: 12px; }
.eb-sec .btn { margin-top: 10px; }
.row.r3e { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eb-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--surface); }
.eb-tools + textarea { border-radius: 0 0 10px 10px !important; }
.eb-tools button { min-width: 32px; height: 30px; padding: 0 8px; border-radius: 7px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 12.5px; font-weight: 700; }
.eb-tools button:hover { background: var(--accent-soft); color: var(--accent); }
.eb-tools select { height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 12.5px; padding: 0 8px; max-width: 160px; }
.counter { font-style: normal; font-weight: 600; font-size: 11.5px; color: var(--muted); }
.counter.warn { color: var(--amber); }
.field > span .counter { margin-left: 6px; }
.eb-fields, .eb-btnlist { display: grid; gap: 10px; }
.eb-field { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.eb-field-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.eb-field-head b { font: 600 12.5px var(--display); }
.eb-field .input, .eb-field input:not([type=checkbox]), .eb-field select, .eb-field textarea { background: var(--surface); }
.eb-errs { margin-top: 12px; display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--rose) 12%, transparent); border: 1px solid color-mix(in srgb, var(--rose) 40%, transparent); font-size: 13px; }
.eb-errs b { color: var(--rose); }
.eb-ok { margin-top: 12px; padding: 10px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--mint) 12%, transparent); color: var(--mint); font-weight: 700; font-size: 13px; }
.eb-pub { display: flex; gap: 8px; flex-wrap: wrap; }
.eb-schedule { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: end; }

/* Rendu Discord détaillé */
.dcx { max-height: 70vh; overflow: auto; }
.dcx-desc { font-size: 14px; line-height: 1.375; white-space: normal; overflow-wrap: anywhere; }
.dcx-desc > div { min-height: 1em; }
.dcx-br { height: .5em; }
.dcx-h1 { font-size: 22px; font-weight: 700; color: #F2F3F5; margin: 6px 0 2px; }
.dcx-h2 { font-size: 19px; font-weight: 700; color: #F2F3F5; margin: 6px 0 2px; }
.dcx-h3 { font-size: 16px; font-weight: 700; color: #F2F3F5; margin: 6px 0 2px; }
.dcx-sub { font-size: 12px; color: #949BA4; }
.dcx-quote { border-left: 4px solid #4E5058; padding-left: 10px; }
.dcx-list { margin: 2px 0; padding-left: 22px; }
.dcx-code { background: #1E1F22; border-radius: 4px; padding: 0 4px; font: 13px Consolas, ui-monospace, monospace; }
.dcx-pre { background: #1E1F22; border: 1px solid #1A1B1E; border-radius: 4px; padding: 8px; margin: 4px 0; font: 13px Consolas, ui-monospace, monospace; white-space: pre-wrap; color: #DBDEE1; }
.dcx-a { color: #00A8FC; cursor: pointer; }
.dcx-spoil { background: #1E1F22; color: transparent; border-radius: 3px; padding: 0 2px; transition: color .2s; }
.dcx-spoil:hover { color: #DBDEE1; background: #2B2D31; }
.dcx-time { background: rgba(255, 255, 255, .06); border-radius: 3px; padding: 0 2px; }
.dcx-embed { margin-top: 6px; max-width: 520px; background: #2B2D31; border-left: 4px solid; border-radius: 4px; padding: 10px 16px 14px 12px; color: #DBDEE1; }
.dcx-embed.empty { color: #949BA4; font-size: 13px; font-style: italic; }
.dcx-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.dcx-grid.thumb { grid-template-columns: minmax(0, 1fr) 80px; }
.dcx-body { display: grid; gap: 6px; min-width: 0; }
.dcx-author { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #F2F3F5; }
.dcx-aicon { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dcx-title { font-size: 16px; font-weight: 600; color: #F2F3F5; }
.dcx-title.link { color: #00A8FC; }
.dcx-fields { display: grid; gap: 8px; margin-top: 2px; }
.dcx-frow { display: grid; gap: 8px; }
.dcx-fname { font-size: 14px; font-weight: 600; color: #F2F3F5; margin-bottom: 2px; }
.dcx-fval { font-size: 14px; }
.dcx-thumb { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; }
.dcx-image { display: block; margin-top: 12px; max-width: 100%; max-height: 300px; border-radius: 4px; object-fit: contain; }
.dcx-image.ph, .dcx-thumb.ph { display: grid; place-items: center; height: 120px; background: #1E1F22; color: #949BA4; font-size: 12px; }
.dcx-thumb.ph { height: 80px; }
.dcx-embed img.broken { opacity: .25; min-height: 40px; }
.dcx-footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: #B5BAC1; }
.dcx-ficon { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.dc-btn.l { background: #4E5058; }
.dc-btn svg { opacity: .8; }
@media (max-width: 1180px) { .eb-editor { grid-template-columns: 1fr; } .eb-schedule { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .row.r3e { grid-template-columns: 1fr; } .eb-item { grid-template-columns: 6px 1fr; } .eb-meta { grid-column: 2; justify-content: flex-start; } }

/* ---------- Connexion Discord et choix du serveur ---------- */
.login-lead { margin: 0 0 14px; text-align: center; color: var(--muted); }
.login-note { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }
.btn.discord { background: #5865F2; border-color: #5865F2; color: #fff; padding: 12px 16px; font-size: 15px; }
.btn.discord:hover { background: #4752C4; }
.btn.discord svg { width: 22px; height: 22px; }
.servers { min-height: 100vh; padding: 40px 20px; }
.servers-inner { max-width: 980px; margin: 0 auto; display: grid; gap: 18px; }
.servers-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.servers-user { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.servers-user img { width: 32px; height: 32px; border-radius: 50%; }
.servers h1 { margin: 0; font: 600 clamp(24px, 3vw, 32px)/1.15 var(--display); letter-spacing: -.02em; }
.servers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.server { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.server.off { opacity: .8; }
.server img, .g-initials { border-radius: 16px; object-fit: cover; }
.g-initials { display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font: 600 15px var(--display); color: var(--accent); }
.server-main { display: grid; gap: 2px; min-width: 0; }
.server-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-main .muted { font-size: 12.5px; }
.servers-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.guild-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-align: left; font-weight: 700; font-size: 13.5px; color: var(--text); }
.guild-switch:hover { border-color: var(--accent); }
.guild-switch img, .guild-switch .g-initials { border-radius: 9px; flex: none; font-size: 10px; }
.guild-switch span:not(.g-initials) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-switch svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.whoami .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.whoami .who img { width: 22px; height: 22px; border-radius: 50%; }
@media (max-width: 860px) { .guild-switch { width: auto; max-width: 180px; } }

a.brand { text-decoration: none; color: inherit; border-radius: 10px; transition: opacity .15s; }
a.brand:hover { opacity: .8; }

/* ---------- Cartes & marché ---------- */
.arr-table td { padding: 8px; vertical-align: middle; }
.arr-table tbody tr { cursor: default; }
.arr-table tbody tr:hover { background: none; }
.arr-table .input { padding: 7px 9px; min-width: 120px; }
.arr-table .input.sm { width: 90px; min-width: 0; }
.arr-table .input.xs { width: 56px; min-width: 0; text-align: center; }
.arr-table input[type=color] { width: 40px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: none; padding: 2px; }
.arr-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.arr-table small { display: block; margin-top: 2px; font-size: 11.5px; }
.cd-group { margin: 22px 0 10px; font: 600 14px var(--display); }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.cd-item { display: grid; gap: 8px; }
.cd-item.off { opacity: .5; }
.cd-img { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; transition: transform .2s; }
.cd-img:hover { transform: translateY(-4px) rotate(-1deg); }
.cd-img img { width: 100%; aspect-ratio: 300 / 420; display: block; border-radius: 12px; }
.cd-meta { display: grid; gap: 2px; font-size: 13px; }
.cd-view { display: grid; gap: 10px; justify-items: center; text-align: center; }
.cd-view p { margin: 0; }
.cd-view img { width: 300px; max-width: 100%; aspect-ratio: 300 / 420; }
.cd-results { display: grid; gap: 4px; }
.cd-results button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; color: var(--text); }
.cd-results button:hover { border-color: var(--accent); }
.cd-results img { width: 24px; height: 24px; border-radius: 50%; }
.mk-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mk-offer { display: grid; gap: 4px; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.mk-offer > span:first-child { font-size: 26px; }
.mk-offer .muted { font-size: 12.5px; }
.mk-offer strong { font: 600 18px var(--display); color: var(--accent); margin-top: 4px; }

.rpick { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }

/* ---------- Espace propriétaire ---------- */
.nav-beta { margin-left: auto; font: 700 9.5px var(--display); letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--amber) 22%, transparent); color: var(--amber); }
.nav-beta.off { background: color-mix(in srgb, var(--rose) 18%, transparent); color: var(--rose); }
.own-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.own-legend b { color: var(--text); }
.own-list { display: grid; gap: 8px; }
.own-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); flex-wrap: wrap; }
.own-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 16px; }

/* ---------- Ambiance Skyline : lueurs chaudes et poussière dorée ---------- */
body { background:
  radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, #D9B07A 16%, transparent), transparent 70%),
  radial-gradient(800px 420px at 10% 110%, color-mix(in srgb, #E2B77A 10%, transparent), transparent 70%),
  var(--bg); background-attachment: fixed; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
    background-image: radial-gradient(1px 1px at 12% 18%, rgba(226,183,122,.55) 50%, transparent 51%), radial-gradient(1px 1px at 72% 12%, rgba(226,183,122,.55) 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 38% 62%, #F3E2C4 50%, transparent 51%), radial-gradient(1px 1px at 88% 48%, rgba(226,183,122,.55) 50%, transparent 51%),
      radial-gradient(1px 1px at 22% 82%, #EBDCC6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 58% 34%, rgba(226,183,122,.55) 50%, transparent 51%),
      radial-gradient(1px 1px at 92% 86%, rgba(226,183,122,.55) 50%, transparent 51%), radial-gradient(1px 1px at 5% 52%, rgba(226,183,122,.55) 50%, transparent 51%);
    background-size: 520px 520px; }
}
.btn.primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #D9B07A)); border-color: transparent; }
.nav a.active, .nav a[aria-current] { background: linear-gradient(90deg, color-mix(in srgb, #D9B07A 22%, transparent), color-mix(in srgb, #E2B77A 10%, transparent)); }

/* ---------- Thèmes de cartes ---------- */
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.th-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; overflow: hidden; }
.th-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px 120px at 90% 0%, color-mix(in srgb, var(--th) 22%, transparent), transparent 70%); opacity: .35; transition: opacity .2s; pointer-events: none; }
.th-card:hover { transform: translateY(-2px); }
.th-card.on { border-color: color-mix(in srgb, var(--th) 70%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--th) 40%, transparent), 0 10px 30px -18px var(--th); }
.th-card.on::before { opacity: 1; }
.th-card input { position: absolute; opacity: 0; pointer-events: none; }
.th-head { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.th-ico { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: none; background: color-mix(in srgb, var(--th) 20%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--th) 45%, transparent); }
.th-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-head b { display: block; font-size: 14.5px; }
.th-head small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.th-sw { width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.th-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.th-card.on .th-sw { background: var(--th); }
.th-card.on .th-sw::after { transform: translateX(16px); }
.th-card input:focus-visible ~ .th-head .th-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.th-art { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; min-width: 0; }
.th-art img { width: 100%; height: auto; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--th) 40%, transparent), 0 4px 10px rgba(0,0,0,.35); }
.th-card:not(.on) .th-art img { filter: grayscale(.7); opacity: .6; }
.th-foot { position: relative; font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
/* Illustrations des cartes de thème */
.art-dlg { width: min(1040px, calc(100% - 24px)); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; }
.art-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.art-head p { margin: 4px 0 0; max-width: 760px; font-size: 13px; }
.art-head .btn.icon { flex: none; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; }
.art-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 16px 0 12px; }
.art-bar .field { margin: 0; min-width: 220px; }
.art-bar .hint { font-size: 12px; color: var(--muted); flex-basis: 100%; }
.art-progress { position: relative; height: 30px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--line); }
.art-progress div { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #D9B07A, #E2B77A); transition: width .4s; opacity: .55; }
.art-progress span { position: relative; display: block; line-height: 28px; padding: 0 12px; font-size: 12.5px; font-weight: 600; }
.art-err { color: #F87171; font-size: 13px; margin: 0 0 10px; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.art-item { display: grid; gap: 4px; padding: 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.art-item b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-item small { font-size: 11.5px; color: var(--muted); }
.art-img { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 5 / 7; background: #0F0B09; }
.art-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.art-img .tag { position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; padding: 2px 7px; background: rgba(5,6,12,.75); backdrop-filter: blur(4px); }
.art-img .tag.ok { color: #E2B77A; } .art-img .tag.info { color: #C98B5E; }
.art-item.busy .art-img img { opacity: .35; }
.art-item.busy .art-img::after { content: ''; position: absolute; inset: 40% 40%; border: 3px solid rgba(255,255,255,.2); border-top-color: #E2B77A; border-radius: 50%; animation: spin 1s linear infinite; }
.art-act { display: flex; gap: 6px; margin-top: 4px; }
.art-act .btn { flex: 1; padding: 5px 6px; font-size: 12px; }
.art-act [data-reset] { flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
