: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: #ff5a1f;
  --red-2: #ff7b42;
  --red-dark: #7a2a0d;
  --red-soft: rgba(255, 90, 31, 0.12);
  --red-line: rgba(255, 90, 31, 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; padding: 0 18px; 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-warn:hover:not(:disabled) { border-color: #f97316; color: #fdba74}
.btn-danger { background: rgba(255, 90, 31, .14); border-color: var(--red-line); color: #ff8a94}
.btn-danger:hover:not(:disabled) { background: var(--red); color: #fff}
.btn-sm { padding: 0 12px}
.btn-lg { padding: 0 26px; font-size: 15px}
.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; flex-shrink: 0;
  background: transparent; border: 1px solid var(--border); color: var(--muted); cursor: pointer; transition: .15s}
.icon-btn:hover { color: var(--text)}
.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; display: grid; place-items: center}
.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; z-index: 30;
  display: flex; flex-direction: column; transition: transform .25s}
.sidebar .brand { padding: 0 8px 4px}
.sidebar-user small { display: block; font-weight: 500; font-size: 11px; color: var(--dim)}
.guild-initial { display: grid; place-items: center; 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}
.nav-label { font-size: 11px; font-weight: 700}
.nav-item {
  position: relative; display: flex; align-items: center; transition: .15s}

.nav-item.active::before {
  content: ''; position: absolute; background: var(--red)}
.nav-item.active [data-lucide] { color: var(--red-2)}
.dot { margin-left: auto; border-radius: 50%; background: var(--border-2)}

.nav-live {
  margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .08em; padding: 2px 6px}
@keyframes blink { 50% { opacity: .55; } }

.sidebar-user { display: flex; align-items: center; gap: 10px}
.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(255, 90, 31, .08), transparent 70%)}
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; backdrop-filter: blur(12px)}
.crumbs { flex: 1; display: flex; align-items: center; gap: 8px; 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 { max-width: 1160px; display: flex; flex-direction: column}
.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; background: var(--panel-2); border: 1px solid var(--border-2);
  border-left: 3px solid var(--green); font-weight: 600;
  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); display: flex; flex-direction: column; gap: 16px;
  transition: border-color .2s}

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px}
.card-title { display: flex; align-items: center; gap: 10px}
.card-title [data-lucide] { color: var(--red)}
.module-head {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px;
  border-radius: var(--radius); border: 1px solid var(--border)}
.module-head::after {
  content: ''; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(255, 90, 31, .15); box-shadow: 0 0 0 30px rgba(255, 90, 31, .03), 0 0 0 60px rgba(255, 90, 31, .02); pointer-events: none}
.module-title { flex: 1; min-width: 0}
.module-title h1 { letter-spacing: -0.02em}
.module-title p { color: var(--muted)}
.module-icon {
  display: grid; place-items: center; width: 50px; height: 50px; flex-shrink: 0}
.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=password], 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}

.grid-2 { display: grid; grid-template-columns: repeat(2, 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 { box-shadow: 0 0 16px -3px var(--red)}
.switch input:checked + span::before { transform: translateX(20px)}
.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; backdrop-filter: blur(10px); border: 1px solid var(--border-2); 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 .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-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) { 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 > [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(255, 90, 31, .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(255, 90, 31, .25), transparent 55%), var(--panel)}
.hero-guild img { width: 68px; height: 68px; border-radius: 19px}
.hero-guild h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.02em}
.stats { display: grid}
.stat { align-items: center; border-radius: var(--radius); border: 1px solid var(--border); transition: .2s}

.stat > [data-lucide] { width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: var(--red-soft); color: var(--red-2)}
.stat b { display: block; letter-spacing: -0.02em; line-height: 1.2}

.badge { padding: 4px 10px; 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(255, 90, 31, .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; 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(255, 90, 31, .25), transparent), var(--bg-2); border: 1px solid var(--border)}
.member-top img { width: 52px; height: 52px; border-radius: 50%}
.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-weight: 700; letter-spacing: .08em}
.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}
.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 > p { max-width: 560px; color: var(--muted)}
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--panel); 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(255, 90, 31, .7); } 70% { box-shadow: 0 0 0 10px rgba(255, 90, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 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 { transform: translateY(-3px)}
.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 { width: 100%; margin: 0 auto; padding: 40px 24px 80px; display: flex; flex-direction: column}
.servers-page h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em}

.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; 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(255, 90, 31, .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(255, 90, 31, .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; 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: 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: 10px; margin-left: auto; padding: 6px 12px; background: var(--panel-2); border: 1px solid var(--border-2); color: var(--muted)}
.np-volume .ic, .np-volume [data-lucide] { width: 17px; height: 17px; color: var(--text)}
.np-volume input { width: 120px}
.np-vol-value { min-width: 38px; text-align: right; font: 600 12px var(--mono); color: var(--text)}

/* Curseur (range) personnalisé : piste sombre, partie remplie en rouge, bouton rond */
input[type=range].range {
  -webkit-appearance: none; appearance: none; height: 6px; border-radius: 99px; cursor: pointer; outline: none; margin: 0;
  background: linear-gradient(90deg, var(--red) 0, #ff4d5e var(--fill, 50%), var(--border-2) var(--fill, 50%))}
input[type=range].range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--red); transition: transform .12s}
input[type=range].range::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--red)}
input[type=range].range::-moz-range-track { height: 6px; border-radius: 99px; background: transparent}
input[type=range].range:hover::-webkit-slider-thumb, input[type=range].range:active::-webkit-slider-thumb { transform: scale(1.18)}
input[type=range].range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(255, 90, 31, .35)}
.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: 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; 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}
.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-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: 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)}
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; 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}

/* ---------- Statistiques, rôles à choisir, compteurs ---------- */
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px}
.mini-stats div { padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); display: flex; flex-direction: column}
.mini-stats b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em}
.mini-stats b.up { color: #4ade80}
.mini-stats b.down { color: #ff6b78}
.mini-stats span { color: var(--dim); font-size: 12px}
.chart-box { position: relative; height: 260px}
.chart-switch span { height: 30px; padding: 0 12px; font-size: 12.5px}
.sr-roles { display: flex; flex-direction: column; gap: 8px}
.sr-role { display: grid; grid-template-columns: minmax(120px, 170px) 130px minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 8px; align-items: center}
.sr-role .mrole { overflow: hidden; white-space: nowrap; text-overflow: ellipsis}
.sr-role .icon-btn { width: 34px; height: 34px}
.sr-role .rt-single { min-height: 40px; padding-top: 9px; padding-bottom: 9px}
.sr-send { display: flex; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border)}
.sr-send .sel { flex: 1}
.sr-menu { max-width: 420px; margin-top: 4px}
.counter-list { display: flex; flex-direction: column; gap: 8px}
.counter-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border)}
.counter-row.missing { opacity: .55}
.counter-type { font-weight: 700; font-size: 13px}
.counter-preview { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis}
.counter-preview svg, .counter-preview [data-lucide] { width: 15px; height: 15px}
@media (max-width: 860px) {
  .sr-role { grid-template-columns: 1fr 34px}
  .sr-role input { grid-column: 1 / 2}
  .counter-row { grid-template-columns: 1fr}
  .chart-box { height: 200px}
}

/* =====================================================================
   DA v2 — même structure, rendu plus sobre : aplats, angles nets,
   typo Archivo / IBM Plex, accents rouges en traits plutôt qu'en halos
   ===================================================================== */
:root {
  --bg: #0b0b0c;
  --bg-2: #0f0f11;
  --panel: #131315;
  --panel-2: #18181b;
  --panel-3: #1f1f23;
  --border: #222226;
  --border-2: #2d2d33;
  --text: #ededee;
  --muted: #9b9ba3;
  --dim: #66666e;
  --red: #ff5a1f;
  --red-2: #ff7b42;
  --red-soft: rgba(255, 90, 31, 0.1);
  --red-line: rgba(255, 90, 31, 0.45);
  --radius: 8px;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --display: 'Archivo', 'IBM Plex Sans', sans-serif}
body, input, select, textarea, button, .sel-btn, .rt-editor, .tf, .quick-picks button, .dc-select-box { font-family: 'IBM Plex Sans', system-ui, sans-serif}
.btn { font-family: 'IBM Plex Sans', sans-serif}

/* Titres : Archivo condensée */
.brand, .module-title h1, .hero-guild h1, .landing-hero h1, .servers-page h1, .error-page h1,
.stat b, .mini-stats b, .hero-stats b, .np-title, .card-title {
  font-family: var(--display); font-stretch: 82%; letter-spacing: -0.005em}

.card-title [data-lucide], .card-title svg { width: 16px; height: 16px}
.nav-label, .section-label, .preview-label, .sel-group, .ep-head, .shop-head { font-family: var(--mono); font-weight: 500; letter-spacing: .08em}

/* Plus de halos, dégradés ni animations décoratives */
.content { animation: none}

.card, .module-head, .hero-guild, .console-cta, .gw-item, .member-top, .np, .top-list li:first-child { background: var(--panel)}
.module-head::after { display: none}

.brand-logo { border-radius: 6px}

.nav-item.active::before { box-shadow: none; left: -14px; top: 6px; bottom: 6px; width: 3px; border-radius: 0}
.dot.on, .switch input:checked + span, .chip:has(input:checked), .term-jump, .np-play, .np-cover, .terminal, .feature:hover { box-shadow: none}
.toast { box-shadow: 0 8px 24px rgba(0, 0, 0, .45)}
.sel-panel, .ep, .member-results, .music-suggest, .term-suggest { box-shadow: 0 12px 32px rgba(0, 0, 0, .55)}
.savebar { box-shadow: none}
.savebar.dirty { box-shadow: none; animation: none; border-color: var(--red)}
.nav-live, .pulse-dot, .live-status.ok .live-dot, .caret { animation: none}
.nav-live { border-radius: 3px; font-family: var(--mono)}
.landing-hero h1 .red { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--red)}
.stat:hover, .feature:hover { transform: none}
.ep-rail-btn.active { background: var(--panel-3); color: var(--text); box-shadow: none}
.tl-tag { border-radius: 3px}

/* Angles plus nets */

input[type=text], input[type=password], input[type=url], input[type=number], select, textarea, .rt-editor, .sel-btn, .color-field,
.field-inline, .toggle-row, .member-search, .music-search, .term-search, .ep-search, .reward-level input { border-radius: 6px}
.card, .module-head, .hero-guild, .stat, .terminal, .cat-card, .feature, .dc-preview, .np, .member-top, .gw-item, .mini-stats div, .counter-row, .member-info div, .fun-cmd { border-radius: 8px}
.sel-panel, .ep, .member-results, .music-suggest, .term-suggest, .toast, .savebar { border-radius: 8px}
.sel-item, .mr-item, .ms-item, .ts-item, .ep-emoji, .ep-rail-btn, .tf, .queue-item, .top-list li { border-radius: 5px}
.chip, .mrole, .mbadge, .badge, .pill, .live-status, .quick-picks button, .name-presets button, .cmd-list span, .q-num { border-radius: 4px}
.badge { font-family: var(--mono); font-weight: 500; letter-spacing: .02em; text-transform: uppercase; font-size: 10.5px}

.segmented span { border-radius: 4px}
.segmented input:checked + span { box-shadow: none}

.hero-guild img, .guild-initial.big { border-radius: 10px}
.hero-guild img { box-shadow: none}
.member-top img { box-shadow: none}

/* Icônes : simples, sans carré teinté ni dégradé */

.stat > [data-lucide], .stat > svg { background: none; padding: 0; width: 22px; height: 22px; color: var(--red)}
.stat { gap: 14px; border-left: 3px solid var(--border-2)}
.stat-link { border-left-color: var(--red)}

.mini-stats div { border-left: 3px solid var(--border-2)}

/* Accents rouges en traits */
.module-head, .hero-guild { border-left: 3px solid var(--red)}
.console-cta, .gw-item { border-color: var(--border); border-left: 3px solid var(--red)}
.gw-item.ended { border-left-color: var(--border-2)}
.top-list li:first-child { box-shadow: inset 3px 0 0 var(--red)}
.cat-card.open { border-color: var(--border-2); box-shadow: inset 3px 0 0 var(--red)}
.toggle-row:has(input:checked) { border-color: var(--border-2); box-shadow: inset 3px 0 0 var(--red)}
.chip:has(input:checked) { background: var(--red); border-color: var(--red); color: #fff}

/* Champs : focus net (bordure rouge, sans halo) */
input:focus, select:focus, textarea:focus, .rt-editor:focus, .sel.open .sel-btn, .sel-btn:focus-visible,
.member-search:focus-within, .music-search:focus-within { box-shadow: none; border-color: var(--red)}

/* Pages publiques */
.landing-hero { padding-top: 96px}
.landing-hero h1 { font-size: clamp(36px, 6.2vw, 72px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em}
.landing-hero > p { font-size: 16px}
.pill { font-family: var(--mono); font-size: 12px}
.pulse-dot { box-shadow: none}
.feature { border-top: 3px solid var(--border-2)}
.feature:hover { border-color: var(--border)}

/* Lecteur et curseur */
.np-play { border-radius: 8px}
.np-volume { border-radius: 6px}
input[type=range].range::-webkit-slider-thumb { box-shadow: none}
input[type=range].range::-moz-range-thumb { box-shadow: none}
.np-bar div { background: var(--red)}

/* Cases à cocher : sans halo */
input[type=checkbox]:not(.switch input):not(.chip input) { border-radius: 4px}
input[type=checkbox]:not(.switch input):not(.chip input):checked { box-shadow: none}

/* DA v2 : traits rouges droits (pas de bordure arrondie) */
.guild-initial { background: var(--red)}
.stat, .mini-stats div, .module-head, .hero-guild, .console-cta, .gw-item { border-left-width: 1px; border-left-color: var(--border)}
.stat, .mini-stats div { box-shadow: inset 3px 0 0 var(--border-2)}
.stat-link { box-shadow: inset 3px 0 0 var(--red)}
.module-head, .hero-guild, .console-cta, .gw-item { box-shadow: inset 3px 0 0 var(--red)}
.gw-item.ended { box-shadow: inset 3px 0 0 var(--border-2)}
.feature { border-top-width: 1px; border-top-color: var(--border); box-shadow: inset 0 3px 0 var(--border-2)}
.feature:hover { border-top-color: var(--border); box-shadow: inset 0 3px 0 var(--red)}

/* DA v2 : repère rouge = barre droite décollée des coins */
.stat, .mini-stats div, .module-head, .hero-guild, .console-cta, .gw-item, .feature, .feature:hover,
.cat-card.open, .toggle-row:has(input:checked), .top-list li:first-child { box-shadow: none}
.stat-link, .module-head, .hero-guild, .console-cta, .gw-item, .cat-card.open, .toggle-row:has(input:checked), .top-list li:first-child, .feature { position: relative}
.stat-link::before, .module-head::before, .hero-guild::before, .console-cta::before, .gw-item::before,
.cat-card.open::before, .toggle-row:has(input:checked)::before, .top-list li:first-child::before {
  content: ''; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; background: var(--red)}
.gw-item.ended::before { background: var(--border-2)}
.cat-card.open::before { top: 16px; bottom: auto; height: 38px}
.feature::before { content: ''; position: absolute; top: -1px; left: 22px; width: 28px; height: 3px; background: var(--border-2); transition: background .15s, width .15s}
.feature:hover::before { background: var(--red); width: 44px}

/* Champ image des embeds */
.image-input { display: flex; gap: 8px; align-items: center}
.image-input input[type=url] { flex: 1; min-width: 0}
.image-input .icon-btn { width: 40px; height: 40px}
.image-thumb { max-width: 260px; max-height: 140px; border-radius: 6px; border: 1px solid var(--border-2); object-fit: cover}

/* Page « Tes serveurs » */
.servers-page { max-width: 1040px; gap: 20px}

/* Éditeur de la carte de bienvenue */
.wc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start}
.wc-stage-wrap { display: flex; flex-direction: column; gap: 10px; min-width: 0}
.wc-stage { border-radius: 8px; overflow: hidden; border: 1px solid var(--border-2); background: #000; line-height: 0}
.wc-stage canvas { width: 100%; height: auto; display: block; touch-action: none; outline: none}
.wc-actions { display: flex; gap: 8px; flex-wrap: wrap}
.wc-rendered { width: 100%; border-radius: 8px; border: 1px solid var(--border-2)}
.wc-panel { display: flex; flex-direction: column; gap: 14px}
.wc-bgs { display: grid; gap: 6px}
.wc-bg { position: relative; aspect-ratio: 1024 / 450; border-radius: 5px; border: 2px solid transparent; background: var(--bg-2) center / cover; cursor: pointer; padding: 0; overflow: hidden}
.wc-bg span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 10px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis}
.wc-bg.active { border-color: var(--red)}
.wc-bg:hover { border-color: var(--border-2)}
.wc-bg.active:hover { border-color: var(--red)}
.wc-bg-upload { display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--border-2)}
.wc-bg-upload svg, .wc-bg-upload [data-lucide] { width: 18px; height: 18px; margin-bottom: 10px}
.wc-layers { display: flex; flex-direction: column; gap: 4px}
.wc-layer { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; color: var(--muted)}
.wc-layer span { flex: 1; font-weight: 500}
.wc-layer svg, .wc-layer > [data-lucide] { width: 16px; height: 16px}
.wc-layer .icon-btn { width: 28px; height: 28px}
.wc-layer.active { color: var(--text); border-color: var(--border-2); box-shadow: inset 3px 0 0 var(--red)}
@media (max-width: 1100px) { .wc-layout { grid-template-columns: 1fr} }

/* Éditeur de carte v2 : barre d'ajout, barre de mise en forme, édition directe */
.wc-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap}
.wc-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap}
.wc-label { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-right: 4px}
.wc-history { display: flex; gap: 6px}
.wc-history .icon-btn:disabled { opacity: .35; cursor: default}
.wc-format { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 50px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2)}
.wc-format > .muted { display: flex; align-items: center; gap: 8px}
.wc-format > .muted svg { width: 15px; height: 15px}
.wc-badge { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--red); color: #fff}
.wc-badge svg { width: 16px; height: 16px}
.wc-sep { width: 1px; height: 26px; background: var(--border-2); margin: 0 2px}
.wc-group { display: inline-flex; padding: 2px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--panel)}
.wc-tool { display: grid; place-items: center; width: 30px; height: 28px; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer}
.wc-tool svg { width: 16px; height: 16px}
.wc-tool:hover { color: var(--text); background: var(--panel-3)}
.wc-tool.on { background: var(--red); color: #fff}
.wc-tool.wc-danger:hover { background: var(--red); color: #fff}
.wc-num { display: inline-flex; align-items: center; gap: 0; height: 32px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--panel); overflow: hidden}
.wc-num span { padding: 0 8px; font-size: 11.5px; color: var(--dim); white-space: nowrap}
.wc-num button { width: 22px; height: 100%; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px}
.wc-num button:hover { background: var(--panel-3); color: var(--text)}
.wc-num input[type=number] { width: 48px; height: 100%; padding: 0 2px; border: 0; border-radius: 0; background: var(--bg-2); text-align: center; font: 600 13px var(--mono); -moz-appearance: textfield}
.wc-num input::-webkit-outer-spin-button, .wc-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0}
.wc-color { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 3px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--panel); cursor: pointer}
.wc-color input { width: 26px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer}
.wc-color span { font-size: 11.5px; color: var(--dim)}
.wc-opacity { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--dim)}
.wc-opacity input { width: 80px}
.wc-font { position: relative}
.wc-font-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--panel); color: var(--text); font-size: 14px; cursor: pointer; min-width: 130px; justify-content: space-between}
.wc-font-btn svg { width: 14px; height: 14px; color: var(--dim)}
.wc-font-list { position: absolute; top: calc(100% + 4px); left: 0; z-index: 70; width: 220px; padding: 5px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--panel-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .55); display: flex; flex-direction: column}
.wc-font-list[hidden] { display: none}
.wc-font-opt { padding: 8px 10px; border: 0; border-radius: 5px; background: none; color: var(--text); font-size: 17px; text-align: left; cursor: pointer}
.wc-font-opt:hover { background: var(--panel-3)}
.wc-font-opt.on { background: var(--red); color: #fff}
.wc-stage { position: relative; background-color: #000; background-size: cover; background-position: center}
.wc-inline { position: absolute; z-index: 5; margin: 0; padding: 0 6px; border: 2px solid #38bdf8; border-radius: 4px; background: rgba(0, 0, 0, .35); outline: none; resize: none; overflow: hidden; white-space: nowrap; line-height: 1.5}
.wc-layer.off span { opacity: .45; text-decoration: line-through}
.wc-layer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0}
.wc-layers { max-height: 300px; overflow-y: auto}
.wc-bgs { grid-template-columns: repeat(4, 1fr)}
.wc-bg em { position: absolute; top: 3px; right: 3px; padding: 1px 5px; border-radius: 3px; background: var(--red); color: #fff; font: 700 9px var(--mono); font-style: normal}
.wc-shortcuts { margin-right: auto}
.wc-add .btn:disabled { opacity: .4}

/* Page musique : 3 colonnes (lecteur, file, bibliothèque) */
.music-grid { display: grid; gap: 20px; align-items: start}
@media (max-width: 1400px) { .music-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr)} .library-card { grid-column: 1 / -1} }
@media (max-width: 980px) { .music-grid { grid-template-columns: 1fr} }
.lib-tabs span { height: 30px; padding: 0 10px; font-size: 12.5px}
.lib-tabs svg, .lib-tabs [data-lucide] { width: 14px; height: 14px}
.lib-bar { display: flex; align-items: center; gap: 8px; justify-content: space-between}
.lib-title { flex: 1; min-width: 0; font-family: var(--display); font-stretch: 85%; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.lib-tools { display: flex; gap: 6px; flex-wrap: wrap}
.lib-form { display: flex; gap: 6px}
.lib-form input { flex: 1; min-width: 0; height: 34px; padding: 0 10px}
.lib-list { display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow-y: auto}
.lib-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; background: var(--bg-2); border: 1px solid transparent}
.lib-item:hover { border-color: var(--border-2)}
.lib-pl { cursor: pointer}
.lib-cover { width: 38px; height: 38px; border-radius: 5px; object-fit: cover; flex-shrink: 0}
.lib-cover-empty { display: grid; place-items: center; background: var(--panel-3); color: var(--dim)}
.lib-cover-empty svg { width: 16px; height: 16px}
.lib-row-actions, .lib-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0}
.lib-row-actions .icon-btn, .lib-actions .icon-btn { width: 30px; height: 30px}
.lib-chevron { width: 16px; height: 16px; color: var(--dim)}
.lib-heart.on { color: var(--red); border-color: var(--red-line)}
.lib-heart.on svg { fill: var(--red)}
.ms-item .lib-actions { opacity: 0; transition: opacity .12s}

.lib-menu { position: absolute; z-index: 95; width: 240px; padding: 6px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--panel-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 2px}
.lib-menu[hidden] { display: none}
.lib-menu .section-label { padding: 4px 8px; font-size: 10.5px}
.lib-menu button { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 0; border-radius: 5px; background: none; color: var(--text); text-align: left; cursor: pointer; font-size: 13px}
.lib-menu button:hover { background: var(--panel-3)}
.lib-menu button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.lib-menu button small { color: var(--dim); font-family: var(--mono)}
.lib-menu svg { width: 15px; height: 15px; color: var(--dim)}
/* Page de partage */
.share-page { max-width: 820px}
.share-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap}
.share-cover { width: 120px; height: 120px; border-radius: 10px; display: grid; place-items: center; background: var(--red); color: #fff}
.share-cover svg { width: 48px; height: 48px}
.share-info { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px}
.share-info h1 { font-size: 38px}
.share-actions { justify-content: flex-start}
.share-tracks { margin-top: 18px; max-height: none}
.share-ok { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .08); color: #bbf7d0}
.share-ok svg { width: 18px; height: 18px; color: #4ade80; flex-shrink: 0}
.library-card .card-head { flex-wrap: wrap; gap: 10px}
.library-card .card-title { white-space: nowrap}
.library-card .lib-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr}
.library-card .lib-tabs span { justify-content: center; width: 100%}

/* ===== Création d'un bot : mis en avant en jaune dans le menu ===== */
:root { --gold: #facc15; --gold-2: #fde047; --gold-soft: rgba(250, 204, 21, .1); --gold-line: rgba(250, 204, 21, .4)}
.nav-label-pro { display: flex; align-items: center; gap: 6px; color: var(--gold)}
.nav-label-pro svg, .nav-label-pro [data-lucide] { width: 12px; height: 12px}
.nav-pro { color: #e9dfae}
.nav-pro [data-lucide], .nav-pro svg { color: var(--gold)}
.nav-pro:hover { background: var(--gold-soft); color: #fff}
.nav-item.nav-pro.active { background: var(--gold-soft); color: #fff}
.nav-item.nav-pro.active::before { background: var(--gold)}
.nav-item.nav-pro.active [data-lucide], .nav-item.nav-pro.active svg { color: var(--gold-2)}
.dot.on-pro { background: var(--gold); box-shadow: 0 0 8px rgba(250, 204, 21, .6)}
.dot.err { background: #f87171}

/* ===== Bot personnalisé ===== */
.token-input { display: flex; gap: 6px}
.token-input input { flex: 1; min-width: 0; font-family: var(--mono); letter-spacing: .02em}
.token-input .icon-btn { height: auto; width: 42px}
.bot-token-form { margin-top: 14px; display: flex; flex-direction: column; gap: 12px}
.bot-form-actions { gap: 8px}
.bot-perks { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border)}
.bot-perks ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px}
.bot-perks li { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: 13px}
.bot-perks li svg { width: 15px; height: 15px; color: var(--red); margin-top: 2px; flex-shrink: 0}
.bot-perks.compact { margin-top: 14px; padding-top: 14px}
.bot-steps { list-style: none; counter-reset: s; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px}
.bot-steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px}
.bot-steps li::before { content: counter(s); grid-row: span 2; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--red-line); color: var(--red-2); background: var(--red-soft); border-radius: 4px; font: 600 13px var(--mono)}
.bot-steps b { font-size: 13.5px}
.bot-steps span { color: var(--muted); font-size: 13px}
.bot-note { display: flex; gap: 8px; margin-top: 18px; padding: 10px 12px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border)}
.bot-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px}
.bot-hero { margin-bottom: 20px; display: flex; flex-direction: column; gap: 16px}
.bot-id { display: flex; align-items: center; gap: 16px; flex-wrap: wrap}
.bot-avatar { position: relative; width: 64px; height: 64px; flex-shrink: 0}
.bot-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--panel-3)}
.bot-avatar.sm { width: 38px; height: 38px}
.bot-dot { position: absolute; right: -1px; bottom: -1px; width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--panel); background: var(--dim)}
.bot-avatar.sm .bot-dot { width: 13px; height: 13px; border-width: 3px; border-color: #232428}
.bot-dot.ok, .bot-dot.p-online { background: #23a55a}
.bot-dot.wait, .bot-dot.p-idle { background: #f0b232}
.bot-dot.err, .bot-dot.p-dnd { background: #f23f43}
.bot-dot.off, .bot-dot.p-invisible { background: #80848e}
.bot-name { flex: 1; min-width: 200px}
.bot-name h2 { font-family: var(--display); font-stretch: 85%; font-size: 26px; line-height: 1.1}
.bot-state { font-weight: 600}
.bot-state.ok { color: #4ade80}
.bot-state.wait { color: #fbbf24}
.bot-state.err { color: #f87171}
.bot-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center}
.bot-alert { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 6px; font-size: 13px; border: 1px solid; flex-wrap: wrap}
.bot-alert span { flex: 1; min-width: 220px}
.bot-alert svg { width: 17px; height: 17px; flex-shrink: 0}
.bot-alert.err { border-color: rgba(248, 113, 113, .35); background: rgba(248, 113, 113, .07); color: #fecaca}
.bot-alert.warn { border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .07); color: #fde68a}
.bot-alert.ok { border-color: rgba(34, 197, 94, .3); background: rgba(34, 197, 94, .06); color: #bbf7d0}
.bot-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin: 0}
.bot-facts div { background: var(--bg-2); padding: 10px 14px}
.bot-facts dt { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim)}
.bot-facts dd { margin: 4px 0 0; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis}
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600}
.presence-form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px}
.presence-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 6px; background: #232428}
.presence-preview b { display: block; font-size: 14px}
.presence-preview small { color: #b5bac1; font-size: 12px}
.bot-cta { margin-top: 14px; width: fit-content}
@media (max-width: 900px) { .bot-facts { grid-template-columns: repeat(2, minmax(0, 1fr))} }

/* ===== Créateur de commandes : liste ===== */
.module-head .pill { margin-left: auto}
.cc-top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; margin-bottom: 28px}
.cc-hero { position: relative; min-height: 350px; border: 1px solid #2a2a33; border-radius: var(--radius); background-color: #17171d; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px), radial-gradient(120% 90% at 50% 0%, #1f1f27 0%, #17171d 60%); background-size: 28px 28px, 28px 28px, 100% 100%; display: grid; place-items: center; overflow: hidden; padding: 20px}
.cc-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; background: #202028; border: 1px solid #30303b; box-shadow: 0 8px 20px -10px rgba(0,0,0,.6); color: var(--text); line-height: 1.15; animation: ccFloat 6s ease-in-out infinite}
.cc-chip:nth-of-type(2) { animation-delay: -1.5s} .cc-chip:nth-of-type(3) { animation-delay: -3s} .cc-chip:nth-of-type(4) { animation-delay: -4.5s}
.cc-chip b { display: block; font-size: 13px; font-weight: 600}
.cc-chip small { display: block; font-size: 11px; color: var(--dim); margin-top: 2px}
.cc-chip::after { content: ''; position: absolute; right: -5px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #17171d; border: 2px solid var(--tone)}
.cc-chip[style*="right"]::after { right: auto; left: -5px}
.cc-chip-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 16%, transparent); color: var(--tone); font-style: normal}
.cc-chip-ic svg { width: 15px; height: 15px}
.cc-chip.t-blue { --tone: #60a5fa} .cc-chip.t-amber { --tone: #fbbf24} .cc-chip.t-green { --tone: #4ade80} .cc-chip.t-violet { --tone: #a78bfa}
@keyframes ccFloat { 50% { transform: translateY(-4px)} }
@media (prefers-reduced-motion: reduce) { .cc-chip { animation: none} }
@media (max-width: 640px) { .cc-chip { display: none} }
.cc-hero-card { position: relative; z-index: 1; max-width: 340px; text-align: center; background: #1d1d24; border: 1px solid #32323d; border-radius: 16px; padding: 28px 34px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.7); display: flex; flex-direction: column; align-items: center; gap: 8px}
.cc-hero-card h2 { font-family: var(--display); font-stretch: 85%; font-size: 24px}
.cc-hero-card .btn { margin-top: 8px}
.cc-hero-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--red-soft); color: var(--red-2); border: 1px solid var(--red-line); display: grid; place-items: center; margin-bottom: 4px}
.cc-hero-ic svg { width: 22px; height: 22px}
.cc-templates { display: flex; flex-direction: column; gap: 8px; max-height: 330px}
.cc-templates #ccTemplates { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-right: -6px; padding-right: 6px}
.cc-tpl { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border)}
.cc-tpl > div { flex: 1; min-width: 0}
.cc-tpl b { display: block; font-size: 13.5px}
.cc-tpl small { display: block; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.cc-tpl-ic { width: 32px; height: 32px; border-radius: 5px; display: grid; place-items: center; background: var(--panel-3); color: var(--red-2); flex-shrink: 0}
.cc-tpl-ic svg { width: 16px; height: 16px}
.cc-list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px}
.cc-h2 { font-family: var(--display); font-stretch: 85%; font-size: 22px}
.cc-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center}
.cc-toolbar select { width: auto; height: 34px}
.cc-search { position: relative; display: flex; align-items: center}
.cc-search svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--dim); pointer-events: none}
.cc-search input { padding-left: 32px; height: 34px; width: 240px}
.cc-group { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 13px; color: var(--muted)}
.cc-group svg { width: 15px; height: 15px; color: var(--dim)}
.cc-group span { font: 500 11px var(--mono); color: var(--dim)}
.cc-empty-group { margin: 0 0 8px}
.cc-row { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; margin-bottom: 6px; transition: border-color .15s}
.cc-row:hover { border-color: var(--border-2)}
.cc-row.off { opacity: .55}
.cc-row-ic { width: 32px; height: 32px; border-radius: 5px; background: var(--red); color: #fff; display: grid; place-items: center; font: 700 15px var(--mono); flex-shrink: 0}
.cc-row-info { flex: 1; min-width: 0; cursor: pointer}
.cc-row-info b { font-family: var(--mono); font-weight: 600}
.cc-row-info small { display: block; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.cc-row-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap}
.cc-row-acts select { width: 150px; height: 34px}
@media (max-width: 1100px) { .cc-top { grid-template-columns: 1fr} .cc-templates { max-height: none} }
@media (max-width: 760px) { .cc-row { flex-wrap: wrap} .cc-row-acts { width: 100%} .cc-search, .cc-search input { width: 100%} }

/* ===== Créateur de commandes : éditeur plein écran ===== */
body.cc-open { overflow: hidden}
.cc-editor { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: #121217}
.cc-etop { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--border); flex-wrap: wrap}
.cc-etitle { display: flex; flex-direction: column; line-height: 1.2}
.cc-etitle b { font-family: var(--mono)}
.cc-etitle small { color: var(--dim); font-size: 12px; display: flex; align-items: center; gap: 6px}
.cc-dirty { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block}
.cc-undo { display: flex; gap: 4px; margin-left: 6px}
.cc-undo .icon-btn:disabled, .cc-etop .btn:disabled { opacity: .35; cursor: default}
.cc-sp { flex: 1}
.cc-badge { font: 600 10.5px var(--mono); background: var(--red); color: #fff; padding: 0 6px; border-radius: 3px}
.cc-ebody { flex: 1; min-height: 0; display: grid}
.cc-left, .cc-right { background: var(--panel); overflow-y: auto; padding: 14px}
.cc-left { border-right: 1px solid var(--border); flex-direction: column}
.cc-right { border-left: 1px solid var(--border)}
.cc-left .cc-search, .cc-left .cc-search input { width: 100%}
.cc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border)}
.cc-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 9px 4px; font-family: inherit; font-weight: 600; font-size: 13px; cursor: pointer}
.cc-tabs button.on { color: var(--text); border-color: var(--red)}
.cc-blocks { flex: 1; display: flex; flex-direction: column; gap: 2px}
.cc-sec { margin: 12px 0 4px; font-size: 10.5px; color: var(--dim)}
.cc-item { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 6px; cursor: grab; transition: background .12s}
.cc-item:hover { background: var(--panel-2)}
.cc-item > div { flex: 1; min-width: 0}
.cc-item b { display: block; font-size: 13px}
.cc-item small { display: block; color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.cc-item.hot b { color: #fca5a5}
.cc-item-ic { width: 32px; height: 32px; border-radius: 5px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--g) 18%, transparent); color: var(--g); border: 1px solid color-mix(in srgb, var(--g) 35%, transparent)}
.cc-item-ic svg { width: 15px; height: 15px}
.cc-star { background: none; border: 0; color: var(--dim); cursor: pointer; padding: 4px; opacity: 0; transition: opacity .12s}
.cc-item:hover .cc-star, .cc-star.on { opacity: 1}
.cc-star svg { width: 14px; height: 14px}
.cc-star.on { color: var(--gold)}
.cc-star.on svg { fill: var(--gold)}
.cc-help { padding: 10px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border); line-height: 1.45}
@property --px { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --py { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --z { syntax: '<number>'; inherits: true; initial-value: 1; }
.cc-canvas { position: relative; overflow: hidden; cursor: grab; touch-action: none; background-color: var(--bg); background-image: radial-gradient(var(--border-2) 1.2px, transparent 1.2px); background-size: calc(22px * var(--z)) calc(22px * var(--z)); background-position: var(--px) var(--py)}
.cc-canvas.grab { cursor: grabbing}
.cc-canvas.anim { transition: --px .4s ease, --py .4s ease, --z .4s ease}
.cc-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform: translate(var(--px), var(--py)) scale(var(--z)); transform-origin: 0 0}
.cc-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible}
.cc-edge { fill: none; stroke: var(--dim); stroke-width: 2; stroke-dasharray: 7 6; animation: ccflow .9s linear infinite; pointer-events: none}
.cc-edge.yes { stroke: #22c55e}
.cc-edge.no { stroke: #f87171}
.cc-edge.loop { stroke: var(--gold)}
.cc-edge.temp { stroke: var(--red-2); stroke-dasharray: 4 5}
.cc-hit { fill: none; stroke: transparent; stroke-width: 16; cursor: pointer; pointer-events: stroke}
.cc-hit:hover + .cc-edge { stroke: var(--red-2); stroke-width: 3}
@keyframes ccflow { to { stroke-dashoffset: -13; } }
.cc-node { position: absolute; width: 210px; background: var(--panel); border: 1px solid var(--border-2); border-top: 3px solid var(--g); border-radius: 6px; user-select: none; cursor: pointer; transition: border-color .15s, box-shadow .2s}
.cc-node:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .45)}
.cc-node.sel { border-color: var(--text); border-top-color: var(--g); box-shadow: 0 0 0 1px var(--text)}
.cc-node.drag { box-shadow: 0 16px 34px rgba(0, 0, 0, .55); z-index: 2; cursor: grabbing}
.cc-node.hot .cc-nh b { color: #fca5a5}
.cc-nh { display: flex; gap: 8px; align-items: center; padding: 9px 10px 4px}
.cc-nh b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.cc-nh-ic { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--g) 20%, transparent); color: var(--g)}
.cc-nh-ic svg { width: 13px; height: 13px}
.cc-ns { padding: 0 10px 11px 42px; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.cc-cond { display: flex; justify-content: space-around; font: 500 10.5px var(--mono); color: var(--muted); padding-bottom: 9px; text-transform: uppercase; letter-spacing: .05em}
.cc-port { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 3px solid #4f8ef7; cursor: crosshair; transition: transform .12s}
.cc-port:hover { transform: scale(1.3)}
.cc-port.in { top: -9px; left: calc(50% - 7px); cursor: default}
.cc-port.out { bottom: -8px}
.cc-port.yes { border-color: #22c55e}
.cc-port.no { border-color: #f87171}
.cc-port.loop { border-color: var(--gold)}
.cc-port.hot { background: var(--red); border-color: var(--red); transform: scale(1.3); animation: ccring 1s ease-out infinite}
.cc-canvas.linking .cc-port.in { animation: ccring 1.2s ease-out infinite; border-color: var(--red-2)}
@keyframes ccring { from { box-shadow: 0 0 0 0 rgba(255, 90, 31, .6); } to { box-shadow: 0 0 0 10px transparent; } }
.cc-node.pop { animation: ccpop .34s cubic-bezier(.2, .9, .3, 1.25) backwards}
.cc-node.flash { animation: ccflash .6s ease-out}
@keyframes ccpop { from { opacity: 0; transform: scale(.85) translateY(10px); } }
@keyframes ccflash { from { box-shadow: 0 0 0 0 var(--red); } to { box-shadow: 0 0 0 14px transparent; } }
.cc-tools { position: absolute; left: 14px; bottom: 14px; z-index: 3; display: flex; flex-direction: column; gap: 6px; align-items: center; background: var(--panel); border: 1px solid var(--border-2); border-radius: 6px; padding: 6px}
.cc-tools span { font: 500 11px var(--mono); color: var(--dim)}
.cc-tools .icon-btn { width: 32px; height: 32px}
.cc-insp { display: flex; flex-direction: column; gap: 14px}
.cc-insp-head { display: flex; gap: 10px; align-items: flex-start}
.cc-insp-head .cc-nh-ic { width: 34px; height: 34px; border-radius: 5px}
.cc-insp-head .cc-nh-ic svg { width: 17px; height: 17px}
.cc-insp-head h3 { margin: 0; font-size: 16px}
.cc-insp textarea { min-height: 96px; resize: vertical}
.cc-hint { font-size: 11.5px}
.cc-slash { display: flex; align-items: stretch}
.cc-slash span { display: grid; place-items: center; padding: 0 10px; background: var(--panel-3); border: 1px solid var(--border-2); border-right: 0; border-radius: 5px 0 0 5px; font: 600 14px var(--mono); color: var(--red-2)}
.cc-slash input { flex: 1; min-width: 0; border-radius: 0 5px 5px 0; font-family: var(--mono)}
.cc-seg { width: 100%; grid-template-columns: 1fr 1fr}
.cc-seg span { justify-content: center; height: 30px; font-size: 12.5px; padding: 0 8px}
.cc-check { font-size: 13px}
.cc-tip { display: flex; gap: 9px; padding: 10px 12px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border); color: var(--muted); font-size: 12.5px; line-height: 1.45}
.cc-tip svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--gold); margin-top: 1px}
.cc-tip.warn { border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .06)}
.cc-tip.warn svg { color: #f87171}
.cc-vars > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px}
.cc-vars button { font: 500 11.5px var(--mono); color: #ff8a94; background: var(--panel-3); border: 1px solid var(--border-2); border-radius: 4px; padding: 3px 7px; cursor: pointer}
.cc-vars button:hover { border-color: var(--red-line); color: #fff}
.cc-insp-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border)}
.cc-danger { color: #f87171}
.cc-danger:hover:not(:disabled) { border-color: rgba(248, 113, 113, .5)}
@media (max-width: 1100px) {
  .cc-editor { overflow-y: auto}
  .cc-ebody { display: flex; flex-direction: column}
  .cc-canvas { height: 65vh; flex-shrink: 0}
  .cc-left { max-height: 320px; border-right: 0; border-bottom: 1px solid var(--border)}
  .cc-right { border-left: 0; overflow: visible}
}

/* ===== Créateur de commandes : fenêtres ===== */
.cc-modal { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .65); display: flex; align-items: center; justify-content: center; padding: 16px}
.cc-modal-box { width: 100%; max-width: 620px; max-height: 85vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px}
.cc-modal-box #ccModalBody { display: flex; flex-direction: column; gap: 10px}
.cc-code { width: 100%; min-height: 220px; font: 12px/1.45 var(--mono); resize: vertical}
.cc-inline { display: flex; gap: 8px}
.cc-inline input { flex: 1; min-width: 0}
.cc-modal-actions { gap: 8px}
.cc-problems { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px}
.cc-problems li { display: flex; gap: 9px; font-size: 13.5px}
.cc-problems svg { width: 16px; height: 16px; color: #fbbf24; flex-shrink: 0; margin-top: 2px}

/* ===== Mode premium : bouton du menu et panneau dédié ===== */
.nav-premium-btn { display: flex; align-items: center; gap: 11px; margin: 4px 0 6px; padding: 10px 11px; border: 1px solid var(--gold-line); background: linear-gradient(110deg, rgba(250, 204, 21, .14), rgba(250, 204, 21, .03)); color: #fff; transition: border-color .15s, background .15s}
.nav-premium-btn:hover { border-color: var(--gold); background: linear-gradient(110deg, rgba(250, 204, 21, .22), rgba(250, 204, 21, .05))}
.nav-premium-btn > span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.2}
.nav-premium-btn b { display: block; color: var(--gold-2); font-size: 14px}
.nav-premium-btn small { display: block; color: #bfb48a; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.nav-premium-btn > svg:last-child { width: 16px; height: 16px; color: var(--gold)}
.premium-crown { width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0; background: var(--gold); color: #1a1400}
.premium-crown svg { width: 17px; height: 17px}
.premium-crown.big { width: 64px; height: 64px; border-radius: 12px}
.premium-crown.big svg { width: 30px; height: 30px}
.nav-premium { animation: premiumIn .28s ease-out}
@keyframes premiumIn { from { opacity: 0; transform: translateX(18px); } }
.nav-back { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: var(--muted); font-size: 13px; border-radius: 6px}
.nav-back:hover { color: #fff; background: var(--panel)}
.nav-back svg { width: 15px; height: 15px}
.premium-banner { display: flex; align-items: center; gap: 11px; margin: 6px 0 4px; padding: 11px; border-radius: 7px; border: 1px solid var(--gold-line); background: linear-gradient(110deg, rgba(250, 204, 21, .14), rgba(250, 204, 21, .03))}
.premium-banner b { display: block; color: var(--gold-2)}
.premium-banner small { display: block; color: #bfb48a; font-size: 11.5px}

/* ===== Mode premium : accueil ===== */
.premium-hero { display: flex; gap: 24px; align-items: center; padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background-color: var(--panel); background-image: radial-gradient(var(--border-2) 1.2px, transparent 1.2px); background-size: 22px 22px; margin-bottom: 20px; flex-wrap: wrap}
.premium-hero-text { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 10px}
.premium-hero-text h1 { font-family: var(--display); font-stretch: 85%; font-size: 34px; line-height: 1.05; max-width: 620px}
.premium-hero-text p { max-width: 560px}
.premium-hero .hero-actions { justify-content: flex-start; margin-top: 6px}
.premium-kicker { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 4px 10px; border-radius: 4px; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-2); font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .08em}
.premium-kicker svg { width: 13px; height: 13px}
.premium-bot-card { width: 240px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 22px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border-2)}
.premium-bot-card b { font-size: 17px; margin-top: 4px}
.premium-bot-card .bot-dot { border-color: var(--bg-2)}
.premium-stats { margin-bottom: 26px}
.premium-h2 { margin-bottom: 14px}
.premium-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px}
.premium-feature { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); transition: border-color .15s, transform .15s}
.premium-feature:hover { border-color: var(--red-line); transform: translateY(-2px)}
.premium-feature b { font-size: 14.5px}
.premium-feature .muted { font-size: 13px}
.premium-feature-ic { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; background: var(--red-soft); border: 1px solid var(--red-line); color: var(--red-2); margin-bottom: 4px}
.premium-feature-ic svg { width: 18px; height: 18px}
@media (max-width: 700px) { .premium-bot-card { width: 100%} .premium-hero-text h1 { font-size: 27px} }

/* ===== Variables ===== */
.var-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px}
.var-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border)}
.var-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px}
.var-row .icon-btn { width: 30px; height: 30px}

/* ===== Mode Événements ===== */
.cc-row-ic.ev { background: var(--panel-3); color: var(--gold); border: 1px solid var(--border-2)}
.cc-row-ic.ev svg { width: 16px; height: 16px}
.cc-modal.wide .cc-modal-box { max-width: 980px}
.ev-search, .ev-search input { width: 100%}
.ev-groups { display: flex; flex-direction: column}
.ev-cat { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px}
.ev-cat svg { width: 15px; height: 15px; color: var(--gold)}
.ev-cat b { font-size: 14px}
.ev-cat span { font: 500 11px var(--mono); color: var(--dim)}
.ev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px}
.ev-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font: 600 13.5px inherit; font-family: inherit; text-align: left; cursor: pointer; transition: border-color .12s, background .12s}
.ev-item:hover { border-color: var(--gold-line); background: var(--panel-3)}
.ev-item.on { border-color: var(--gold); background: var(--gold-soft)}
.ev-item svg { width: 16px; height: 16px; color: var(--gold); flex-shrink: 0}
.ev-pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--gold-line); color: var(--text); font: 600 13px inherit; font-family: inherit; text-align: left; cursor: pointer}
.ev-pick:hover { border-color: var(--gold)}
.ev-pick span { flex: 1}
.ev-pick svg { width: 16px; height: 16px; color: var(--gold); flex-shrink: 0}
.ev-pick svg:last-child { color: var(--dim)}
@media (max-width: 700px) { .ev-grid { grid-template-columns: 1fr} }

/* ===== Correctifs : listes natives, recherche musique, mise en page musique ===== */
select option, select optgroup { background: var(--panel-2); color: var(--text)}
.music-suggest { right: auto; width: max(100%, 480px); max-width: calc(100vw - 32px)}
.ms-item .lib-actions { display: none}
.ms-item:hover .lib-actions, .ms-item.active .lib-actions { display: inline-flex; opacity: 1}
.music-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "player library" "queue library"}
.music-grid > .player-card { grid-area: player}
.music-grid > .queue-card { grid-area: queue}
.music-grid > .library-card { grid-area: library; grid-column: auto}
.queue-card .queue-list { max-height: 300px}
@media (max-width: 1100px) {
  .music-grid { grid-template-columns: 1fr; grid-template-areas: "player" "queue" "library"}
}

/* ===== Éditeur : menu à icônes, panneaux ===== */
.cc-ebody { grid-template-columns: 340px minmax(0, 1fr) 360px}
.cc-left { display: grid; grid-template-columns: 54px minmax(0, 1fr); padding: 0; gap: 0}
.cc-rail { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; background: var(--bg-2); border-right: 1px solid var(--border)}
.cc-rail button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; background: color-mix(in srgb, var(--rc) 22%, transparent); color: var(--rc); transition: background .15s, transform .15s}
.cc-rail button:hover { transform: scale(1.06)}
.cc-rail button.on { background: var(--rc); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 30%, transparent)}
.cc-rail svg { width: 18px; height: 18px}
.cc-pane { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-width: 0}
.cc-pane[hidden] { display: none}
.cc-pane-title { margin: 0; font-family: var(--display); font-stretch: 85%; font-size: 21px}
.cc-pane-head { display: flex; align-items: center; gap: 6px}
.cc-pane-head .cc-pane-title { flex: 1}
.cc-keys { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted)}
kbd { font: 500 11px var(--mono); border-bottom-width: 2px; color: var(--text);}
.err-list { display: flex; flex-direction: column; gap: 8px}
.err-item { padding: 12px 14px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); border-left: 3px solid #f59e0b; display: flex; flex-direction: column; gap: 4px}
.err-head { display: flex; align-items: center; gap: 8px}
.err-head svg { width: 16px; height: 16px; color: #fbbf24; flex-shrink: 0}
.err-head b { flex: 1; font-size: 13.5px}
.err-head span { font-size: 11.5px; color: var(--dim)}
.err-item p { margin: 0; font-size: 13px}
.err-item small { color: var(--dim); font-size: 12px}
.err-clear { margin-left: auto}
.cc-note { display: flex; gap: 6px; margin: -4px 10px 10px; padding: 6px 8px; border-radius: 4px; background: rgba(250, 204, 21, .08); border: 1px solid rgba(250, 204, 21, .25); color: #e9dfae; font-size: 11.5px; line-height: 1.35; white-space: normal}
.cc-note svg { width: 12px; height: 12px; flex-shrink: 0; margin-top: 1px; color: var(--gold)}

/* ===== Bloc message ===== */
.msg-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border)}
.msg-mini { padding: 9px 11px; border-radius: 4px; background: var(--panel-2); border-left: 3px solid var(--ec); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.msg-edit { width: 100%; justify-content: center}
.msg-seg, .msg-sub { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border)}
.msg-sub { grid-template-columns: 1fr 1fr}
.msg-seg button, .msg-sub button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border: 0; border-radius: 4px; background: none; color: var(--muted); font: 600 12.5px inherit; font-family: inherit; cursor: pointer}
.msg-seg button.on, .msg-sub button.on { background: var(--panel-3); color: #fff; box-shadow: inset 0 0 0 1px var(--border-2)}
.msg-seg svg { width: 14px; height: 14px}
.msg-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 7px; border: 1px solid rgba(34, 197, 94, .3); background: rgba(34, 197, 94, .05)}
.msg-box label { font-weight: 600; font-size: 12.5px}
.msg-what { display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; border-radius: 7px; background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .3); font-size: 13px}
.msg-what > b { display: flex; align-items: center; gap: 6px; color: #4ade80; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em}
.msg-what > b svg { width: 13px; height: 13px}
.msg-adv { border-radius: 7px; border: 1px solid var(--border); background: var(--bg-2)}
.msg-adv summary { display: flex; align-items: center; gap: 8px; padding: 11px 13px; cursor: pointer; font-weight: 600; list-style: none}
.msg-adv summary::-webkit-details-marker { display: none}
.msg-adv summary svg { width: 15px; height: 15px; transition: transform .15s}
.msg-adv[open] summary svg { transform: rotate(90deg)}
.msg-adv summary small { margin-left: auto; color: var(--dim); font-weight: 400}
.msg-adv > .cc-opt { margin: 0 10px 10px}
.cc-opt { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--border)}
.cc-opt > div { flex: 1; min-width: 0}
.cc-opt b { display: flex; align-items: center; gap: 6px; font-size: 13px}
.cc-opt b svg { width: 14px; height: 14px; color: var(--dim)}
.cc-opt small { display: block; color: var(--dim); font-size: 12px; line-height: 1.35}
.cc-opt.col { flex-direction: column; align-items: stretch; gap: 8px}
.cc-opt-ic { width: 30px; height: 30px; border-radius: 5px; display: grid; place-items: center; background: var(--panel-3); color: var(--muted); flex-shrink: 0}
.cc-opt-ic svg { width: 15px; height: 15px}
#blkNote { min-height: 60px}

/* ===== Créateur de message (plein écran) ===== */
.mb-modal { position: fixed; inset: 0; z-index: 130; background: rgba(0, 0, 0, .7); display: flex; padding: 18px}
.mb-modal[hidden] { display: none}
.mb-box { flex: 1; display: flex; flex-direction: column; min-height: 0; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--border-2)}
.mb-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--border); flex-wrap: wrap}
.mb-ic { width: 36px; height: 36px; border-radius: 6px; display: grid; place-items: center; background: #5865f2; color: #fff}
.mb-ic svg { width: 18px; height: 18px}
.mb-title b { display: block; font-size: 15px}
.mb-title span { display: flex; gap: 6px; margin-top: 3px}
.mb-title em { font: normal 500 11px var(--mono); padding: 2px 7px; border-radius: 4px; background: var(--panel-3); color: var(--muted)}
.mb-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(380px, 640px) minmax(0, 1fr)}
.mb-edit { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--border); background: var(--panel)}
.mb-preview { overflow-y: auto; padding: 28px; background-color: var(--bg); background-image: radial-gradient(var(--border-2) 1.2px, transparent 1.2px); background-size: 22px 22px}
.mb-preview .dc-preview { max-width: 620px}
.mb-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--border)}
.mb-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px}
.mb-counter { color: var(--dim); font: 11px var(--mono)}
.mb-embeds-head { display: flex; align-items: center; gap: 8px}
.mb-pill { font: 500 11px var(--mono); padding: 2px 7px; border-radius: 4px; background: var(--panel-3); color: var(--muted)}
.mb-embed { padding: 0; border-left: 3px solid var(--ec)}
.mb-embed-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; cursor: pointer}
.mb-embed-head .icon-btn { width: 28px; height: 28px}
.mb-embed-head .icon-btn:disabled { opacity: .3}
.mb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ec)}
.mb-embed-sum { color: var(--dim); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px}
.mb-chev { width: 16px; height: 16px; color: var(--dim); transition: transform .15s}
.mb-embed.open .mb-chev { transform: rotate(180deg)}
.mb-embed-body { display: none; flex-direction: column; gap: 8px; padding: 0 12px 12px}
.mb-embed.open .mb-embed-body { display: flex}
.mb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px}
.mb-color { display: flex; gap: 6px}
.mb-color input[type=color] { width: 42px; height: 38px; padding: 2px; border-radius: 5px; border: 1px solid var(--border-2); background: var(--panel-3)}
.mb-color input[type=text] { flex: 1; min-width: 0; font-family: var(--mono)}
.mb-field { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 5px; background: var(--bg-2); border: 1px solid var(--border)}
.mb-field-tools { display: flex; justify-content: space-between; align-items: center}
.mb-field-tools .icon-btn { width: 26px; height: 26px}
.mb-add { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 5px; border: 1px dashed var(--border-2); background: none; color: var(--muted); cursor: pointer; font: 600 12.5px inherit; font-family: inherit}
.mb-add:hover:not(:disabled) { border-color: var(--red-line); color: #fff}
.mb-add svg { width: 14px; height: 14px; color: var(--red-2)}
.mb-more { border-radius: 5px}
.mb-more summary { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 5px; background: var(--panel-3); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; list-style: none}
.mb-more summary::-webkit-details-marker { display: none}
.mb-more summary svg { width: 12px; height: 12px; color: var(--red-2)}
.mb-more[open] { display: flex; flex-direction: column; gap: 8px}
.mb-hint { text-align: center; padding: 10px}
.mb-author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #f2f3f5}
.mb-author img, .mb-foot img { width: 22px; height: 22px; border-radius: 50%}
.mb-foot { gap: 6px;}
.mb-foot img { width: 18px; height: 18px}
.mb-link { color: #00a8fc}
.mb-fields { display: flex; flex-wrap: wrap; gap: 8px 16px}
.mb-f { flex: 1 1 100%; display: flex; flex-direction: column; font-size: 14px; color: #dbdee1}
.mb-f.inline { flex: 1 1 28%}
.mb-f b { color: #f2f3f5; font-size: 13.5px}
.mb-empty-embed { color: #6d6f78; font-size: 13px}
.dc-content.dim { color: #6d6f78}
@media (max-width: 1000px) { .mb-body { grid-template-columns: 1fr} .mb-edit { border-right: 0} .mb-modal { padding: 0} }

/* ===== Module Sécurité ===== */
.sec-status { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 14px; flex-wrap: wrap}
.sec-status .console-cta-text { flex: 1; min-width: 220px}
.sec-status.raid { border-color: rgba(248, 113, 113, .5); background: rgba(248, 113, 113, .06)}
.sec-status.raid .module-icon { color: #f87171}
.sec-grid { align-items: start}
.sec-grid .card { display: flex; flex-direction: column; gap: 14px}
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px}
.sec-perms { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 16px}
.sec-perms svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px}

/* ===== Notifications ===== */
.notif-add { display: flex; gap: 6px; flex-wrap: wrap}
.pf { width: 10px; height: 10px; border-radius: 3px; display: inline-block}
.pf.yt { background: #ff0000} .pf.tw { background: #9146ff} .pf.kk { background: #53fc18} .pf.tt { background: linear-gradient(135deg, #25f4ee, #fe2c55)}
.notif-feeds { display: flex; flex-direction: column; gap: 10px; margin-top: 12px}
.notif-feed { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border)}
.notif-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap}
.notif-head small { color: var(--dim)}
.notif-err, .notif-ok { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.notif-err { color: #fca5a5} .notif-ok { color: #4ade80}
.notif-err svg, .notif-ok svg { width: 13px; height: 13px; flex-shrink: 0}
.notif-vars { margin-top: 10px}

/* ===== Pages légales ===== */
.legal { max-width: 860px; margin: 0 auto; padding: 30px 20px 60px; display: flex; flex-direction: column; gap: 10px}
.legal h1 { font-family: var(--display); font-stretch: 85%; font-size: 40px}
.legal-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px}
.legal-tabs a { padding: 7px 14px; border-radius: 5px; background: var(--panel); border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: 13px}
.legal-tabs a.on { background: var(--red-soft); border-color: var(--red-line); color: #fff}
.legal-body { margin-top: 10px; line-height: 1.7; color: #d4d4d8}
.legal-body h2 { margin: 26px 0 8px; font-size: 18px; color: #fff}
.legal-body p, .legal-body ul { margin: 0 0 10px}
.legal-body li { margin-bottom: 6px}
.legal-body a { color: var(--red-2)}
.legal-foot { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap}
.legal-foot a { color: var(--dim)}
.legal-foot a:hover { color: #fff}
.sidebar-legal { gap: 10px; flex-wrap: wrap; padding: 6px 14px 0; font-size: 11px}
.sidebar-legal a { color: var(--dim)}
.sidebar-legal a:hover { color: var(--text)}

/* ===== Boutique et premium ===== */
.shop { max-width: 1100px; margin: 0 auto; padding: 30px 20px 50px; display: flex; flex-direction: column; gap: 18px}
.shop-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px}
.shop-hero h1, .shop-thanks h1, .admin-page h1 { font-family: var(--display); font-stretch: 85%; font-size: 44px; line-height: 1.05}
.shop-legal { text-align: center}
.shop-thanks { align-items: center; text-align: center; padding-top: 70px}
.premium-state { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 12px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--border-2); color: var(--muted); font-size: 13px; font-weight: 600}
.premium-state.on { color: var(--gold-2); border-color: var(--gold-line); background: var(--gold-soft)}
.premium-state svg { width: 15px; height: 15px}
.premium-locked { margin-bottom: 16px}

/* ===== Personnalisation du dashboard (écrou) ===== */
.lay-on { display: flex !important; flex-direction: row !important; flex-wrap: wrap; gap: 20px; align-items: flex-start}
.lay-on > * { min-width: 0; margin: 0 !important}
.lay-on > .lay-l { flex: 1 1 100%; width: 100%; max-width: 100%}
.lay-on > .lay-m { flex: 0 0 calc(50% - 11px); max-width: calc(50% - 11px)}
.lay-on > .lay-s { flex: 0 0 calc(33.333% - 14px); max-width: calc(33.333% - 14px)}
.lay-on > .savebar, .lay-on > .lay-bar { flex: 1 1 100%; order: 9999 !important}
.lay-hidden { display: none !important}
.lay-edit > .lay-hidden { display: none !important}
.lay-edit > *:not(.savebar) { position: relative; outline: 2px dashed var(--border-2); outline-offset: 4px; border-radius: 8px}
.lay-edit > *:hover { outline-color: var(--gold-line)}
.lay-dragging { opacity: .45}
.lay-tools { position: absolute; top: -14px; right: 10px; z-index: 20; display: flex; gap: 3px; padding: 3px; border-radius: 6px; background: var(--panel-3); border: 1px solid var(--gold-line); box-shadow: 0 6px 18px rgba(0, 0, 0, .5)}
.lay-tools button, .lay-handle { min-width: 26px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 4px; background: var(--panel-2); color: var(--muted); font: 600 11px var(--mono); cursor: pointer}
.lay-tools button:hover { background: var(--gold-soft); color: var(--gold-2)}
.lay-handle { cursor: grab; color: var(--gold); font-size: 14px}
.lay-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--gold-line); box-shadow: 0 12px 34px rgba(0, 0, 0, .6); font-size: 13px}
.lay-bar[hidden] { display: none}
.lay-bar b { color: var(--gold-2); margin-right: 6px}
.lay-restore { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; color: var(--dim)}
.lay-restore button { padding: 3px 8px; border-radius: 4px; border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text); font-size: 12px; cursor: pointer}
#layoutBtn svg { transition: transform .4s}
#layoutBtn:hover svg { transform: rotate(90deg)}
@media (max-width: 900px) { .lay-on > .lay-m, .lay-on > .lay-s { flex-basis: 100%; max-width: 100%} }

/* ===== Collaborateurs ===== */
.collab-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start}
.collab-col { display: flex; flex-direction: column; gap: 20px}
.collab-col .card { display: flex; flex-direction: column; gap: 14px}
.collab-head { display: flex; align-items: flex-start; gap: 12px}
.collab-head > div { flex: 1}
.collab-head h2 { font-size: 16px}
.collab-ic { width: 38px; height: 38px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; background: var(--red-soft); color: var(--red-2); border: 1px solid var(--red-line)}
.collab-ic svg { width: 18px; height: 18px}
.collab-ic.sm { width: 30px; height: 30px}
.collab-ic.sm svg { width: 15px; height: 15px}
.collab-count { font: 500 12px var(--mono); color: var(--dim); white-space: nowrap}
.collab-list { display: flex; flex-direction: column; gap: 8px}
.collab-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border)}
.collab-item img { width: 36px; height: 36px; border-radius: 50%}
.collab-item > div { flex: 1; min-width: 0}
.collab-item small { display: block; color: var(--dim); font-size: 12px}
.collab-item select, .collab-item .sel { width: 160px}
.collab-item.act span { color: var(--muted)}
.collab-tabs { grid-template-columns: 1fr 1fr}
.collab-tabs button svg { width: 14px; height: 14px}
.collab-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border-2)}
.collab-link code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; color: var(--text)}
.collab-badge { font: 600 10.5px var(--mono); text-transform: uppercase; padding: 3px 7px; border-radius: 4px; background: var(--red); color: #fff; white-space: nowrap}
.collab-badge.dim { background: var(--panel-3); color: var(--dim)}
.collab-perms { display: flex; flex-direction: column; gap: 6px}
.collab-chips { display: flex; flex-wrap: wrap; gap: 5px}
.collab-chips span { font-size: 11.5px; padding: 3px 8px; border-radius: 4px; background: var(--panel-3); border: 1px solid var(--border-2); color: var(--muted)}
.collab-chips .none { color: var(--dim); font-style: italic}
.collab-wide { width: 100%; justify-content: center}
.collab-warn { margin-top: 4px}
.collab-role { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border)}
.collab-role-head { display: flex; align-items: center; gap: 6px}
.collab-role-head b { flex: 1}
.collab-role-head .icon-btn { width: 28px; height: 28px}
.collab-role-form { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 12px}
.collab-checks { display: flex; flex-wrap: wrap; gap: 6px}
.collab-filter, .collab-filter input { width: 100%}
.collab-join-icon { width: 80px; height: 80px; border-radius: 20px}
.collab-invites { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px}
@media (max-width: 1100px) { .collab-grid { grid-template-columns: 1fr} }
.plan-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px}
.plan-row { display: grid; grid-template-columns: 1.3fr 90px 110px 2fr auto auto auto auto auto; gap: 8px; align-items: center; padding: 10px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border)}
.plan-row.new { border-style: dashed}
.plan-row .check { font-size: 12px; white-space: nowrap}
@media (max-width: 1100px) { .plan-row { grid-template-columns: 1fr 1fr} }

/* Bouton Boutique (jaune) */
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1a1400}
.btn-gold:hover:not(:disabled) { background: var(--gold-2); border-color: var(--gold-2); color: #1a1400; box-shadow: 0 0 20px -6px rgba(250, 204, 21, .7)}
.btn-gold svg, .btn-gold [data-lucide] { color: #1a1400}
.landing-nav nav, .topbar { gap: 10px}
.landing-nav nav { display: flex; align-items: center}
.nav-locked { opacity: .55}
.nav-locked::after { content: '🔒'; margin-left: auto; font-size: 11px}

/* Logo Squir */
.brand-logo { background: #0b0b0c !important; border: 1px solid var(--border-2); box-shadow: 0 0 18px -6px rgba(255, 26, 10, .55) !important; overflow: hidden}
.brand-logo img { width: 118%; height: 118%; object-fit: contain; margin: -9%}

/* ===== Admin : prise de contrôle ===== */
.takeover { display: flex; flex-direction: column; gap: 12px}
.takeover-search, .takeover-search input { width: 100%}
.takeover-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 560px; overflow-y: auto}
.takeover-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border)}
.takeover-item[hidden] { display: none}
.takeover-item img, .takeover-item .guild-initial { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0}
.takeover-item > div { flex: 1; min-width: 0}
.takeover-item small { display: block; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.takeover-item form { margin: 0}
.staff-banner { display: flex; align-items: center; gap: 8px; padding: 8px 20px; background: rgba(250, 204, 21, .1); border-bottom: 1px solid var(--gold-line); color: var(--gold-2); font-size: 13px; font-weight: 600}
.staff-banner svg { width: 15px; height: 15px}
.staff-banner a { margin-left: auto; color: #fff; text-decoration: underline}

/* ===== Choix du style ===== */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px}
.theme-grid button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 4px; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--muted); font: 600 11px inherit; font-family: inherit; cursor: pointer}
.theme-grid button:hover { background: var(--panel-3); color: var(--text)}
.theme-grid button.on { border-color: var(--red); color: var(--text)}
.theme-sw { width: 100%; height: 34px; border-radius: 6px; display: flex; align-items: flex-end; gap: 4px; padding: 5px; border: 1px solid rgba(127, 127, 127, .25)}
.theme-sw i { display: block; height: 10px; border-radius: 3px; flex: 1}
.theme-sw i:last-child { flex: 0 0 14px; height: 14px; border-radius: 50%}

/* ===== Page des 15 styles ===== */
.styles-page { max-width: 1300px; margin: 0 auto; padding: 30px 20px 60px; display: flex; flex-direction: column; gap: 12px}
.styles-page h1 { font-family: var(--display); font-stretch: 85%; font-size: 40px}

/* ---------- Communauté, premium, profils (octobre 2026) ---------- */
.btn-green { background: #1f9d55; border-color: #1f9d55; color: #fff}
.btn-green:hover:not(:disabled) { background: #22b562}
.chips-scroll { max-height: 180px; overflow-y: auto; padding: 2px}
.grid-split-sm { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 16px}
.grid-split-sm input[type=color], .profile-edit input[type=color], .pa-new input[type=color] { width: 100%; height: 44px; padding: 4px; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--bg-2); cursor: pointer}
.cta-inline { display: flex; gap: 8px; align-items: center; min-width: 260px}
.cta-inline .sel { flex: 1}
.switch-sm { width: 34px; height: 20px}
.switch-sm > span::before { width: 14px; height: 14px}
.switch-sm input:checked + span::before { transform: translateX(14px)}
.section-label { font-size: 11px; color: var(--dim); text-transform: uppercase; margin-top: 4px}

/* Listes classées (invitations, anniversaires, rappels…) */
.rank-list { display: flex; flex-direction: column; gap: 2px}
.rank-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 6px}
.rank-row:nth-child(odd) { background: var(--bg-2)}
.rank-row img { width: 28px; height: 28px; border-radius: 50%}
.rank-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600}
.rank-pos { width: 22px; text-align: center; font-family: var(--mono); color: var(--dim)}
.rank-val { font-weight: 600; white-space: nowrap}
.rank-val small { color: var(--dim); font-weight: 400}
.usage-grid { display: flex; gap: 12px}
.usage-grid > div { flex: 1; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2)}
.usage-grid b { display: block; font-family: var(--display); font-stretch: 85%; font-size: 24px}
.usage-grid small { color: var(--dim)}
.season-list { display: flex; flex-direction: column; gap: 6px}
.season-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2)}
.season-item span { color: var(--muted)}

/* Éditeur de listes */
.row-list { display: flex; flex-direction: column; gap: 10px}
.row-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2)}
.row-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; user-select: none}
.row-head > b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.row-head > [data-lucide], .row-head > svg:first-child { width: 16px; height: 16px; color: var(--red)}
.row-body { display: none; flex-direction: column; gap: 14px; padding: 14px 14px 16px; border-top: 1px solid var(--border)}
.row-item.open > .row-body { display: flex}
.row-list-sub { gap: 6px}
.row-q { background: var(--panel)}
.q-line { display: flex; gap: 8px; align-items: center; padding: 8px; flex-wrap: wrap}
.q-line input[type=text] { flex: 1; min-width: 160px; padding: 8px 10px}
.q-line .chip { padding: 6px 10px; font-size: 12px}

/* Candidatures reçues */
.app-list { display: flex; flex-direction: column; gap: 8px}
.app-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2)}
.app-item summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none}
.app-item summary::-webkit-details-marker { display: none}
.app-item summary img { width: 34px; height: 34px; border-radius: 50%}
.app-who { flex: 1; min-width: 0; display: flex; flex-direction: column}
.app-who small, .app-votes { color: var(--dim); font-size: 12px}
.app-answers { display: grid; gap: 12px; padding: 4px 16px 12px}
.app-answers b { font-size: 13px}
.app-answers p { color: var(--muted); white-space: pre-wrap}
.app-actions { display: flex; gap: 8px; padding: 0 16px 16px; flex-wrap: wrap}
.pill-warn { color: #f59e0b; border-color: rgba(245, 158, 11, .4)}
.pill-info { color: #60a5fa; border-color: rgba(96, 165, 250, .4)}
.pill-ok { color: #22c55e; border-color: rgba(34, 197, 94, .4)}
.pill-err { color: #f87171; border-color: rgba(248, 113, 113, .4)}

/* Modération IA */
.ai-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px}
.ai-cat { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); cursor: pointer}
.ai-cat input { accent-color: var(--red); margin-top: 3px}
.ai-cat span { display: flex; flex-direction: column}
.ai-cat small { color: var(--dim); font-size: 12px}
.ai-cat:has(input:checked) { border-color: var(--red-line)}

/* Sauvegardes */
.backup-list { display: flex; flex-direction: column; gap: 8px}
.backup-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2)}
.backup-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--panel-2); color: var(--red-2); flex-shrink: 0}
.backup-ic [data-lucide], .backup-ic svg { width: 17px; height: 17px}
.backup-info { flex: 1; min-width: 0; display: flex; flex-direction: column}
.backup-info small { color: var(--dim)}
.modal { border: 1px solid var(--border-2); border-radius: 12px; background: var(--panel); color: var(--text); padding: 0; width: min(520px, calc(100vw - 32px))}
.modal::backdrop { background: rgba(0, 0, 0, .65)}
.modal-box { display: flex; flex-direction: column; gap: 14px; padding: 22px}
.modal-box h2 { display: flex; align-items: center; gap: 8px; font-size: 17px}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px}
.radio-card { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); cursor: pointer}
.radio-card input { accent-color: var(--red); margin-top: 3px}
.radio-card span { display: flex; flex-direction: column; gap: 2px}
.radio-card small { color: var(--dim)}
.radio-card:has(input:checked) { border-color: var(--red-line)}

/* Historique */
.hist-list { display: flex; flex-direction: column; gap: 6px}
.hist-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2)}
.hist-item summary { display: grid; grid-template-columns: 150px 150px 1fr auto; gap: 14px; align-items: center; padding: 11px 14px; cursor: pointer; list-style: none}
.hist-item summary::-webkit-details-marker { display: none}
.hist-mod { font-weight: 700}
.hist-who { display: flex; flex-direction: column}
.hist-who small, .hist-when { color: var(--dim); font-size: 12px}
.hist-what { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.hist-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start}
.hist-table { width: 100%; border-collapse: collapse; font-size: 13px}
.hist-table th { text-align: left; color: var(--dim); font-weight: 500; padding: 6px 8px}
.hist-table td { padding: 6px 8px; border-top: 1px solid var(--border)}
.hist-table .old { color: #f87171; text-decoration: line-through}
.hist-table .new { color: #4ade80}

/* Essai premium */
.trial-card { flex-direction: row; align-items: center; gap: 16px; border-color: rgba(234, 179, 8, .35)}

/* Recherche Ctrl+K */
.search-trigger { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 7px 10px; border: 1px solid var(--border-2); color: var(--dim); cursor: pointer; font-size: 13px}
.search-trigger:hover { color: var(--text); border-color: #3d3d47}
.search-trigger [data-lucide], .search-trigger svg { width: 15px; height: 15px}
.search-trigger kbd, .palette kbd { font: 11px var(--mono); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-2); color: var(--dim)}
.palette { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .6); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px}
.palette-box { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; border: 1px solid var(--border-2); border-radius: 12px; background: var(--panel); overflow: hidden}
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border)}
.palette-input input { border: 0; background: transparent; padding: 4px 0; box-shadow: none !important}
.palette-list { overflow-y: auto; padding: 6px}
.palette-group { font: 11px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding: 10px 10px 4px}
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; cursor: pointer}
.palette-item.active { background: var(--panel-3)}
.palette-item > [data-lucide], .palette-item > svg { width: 16px; height: 16px; color: var(--red-2); flex-shrink: 0}
.palette-item span { flex: 1; min-width: 0; display: flex; flex-direction: column}
.palette-item small { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.palette-item .palette-ext { color: var(--dim)}
.palette-empty { padding: 20px; text-align: center; color: var(--dim)}

/* Musique dans le navigateur */
.listen-mode { flex-direction: row; align-items: center; gap: 16px; margin-top: 20px}
.web-player { margin-top: 20px}
.web-player #wpBar { cursor: pointer}
.web-player .queue-list li { cursor: pointer}
.web-player .queue-list li.current { border-color: var(--red-line)}
#wpLoop.on { color: var(--red-2)}
.player-dim { opacity: .55}

/* Page des serveurs */

.srv-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 0 16px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); overflow: hidden; transition: border-color .15s, transform .15s}
.srv-card:hover { border-color: var(--border-2); transform: translateY(-2px)}
.srv-banner { align-self: stretch; height: 70px; margin: 0 -16px; background: var(--panel-3) center / cover; filter: blur(18px) brightness(.55); transform: scale(1.3)}
.srv-icon { position: relative; width: 64px; height: 64px; border-radius: 50%; margin-top: -32px; border: 4px solid var(--panel); object-fit: cover; background: var(--panel-3)}
.srv-icon-empty { display: grid; place-items: center; font-size: 26px; font-weight: 700; color: var(--muted)}
.srv-name { font-weight: 700; font-size: 15px; margin-top: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.srv-meta { color: var(--dim); font-size: 12.5px}
.srv-btn { margin-top: 10px; align-self: stretch; padding: 8px; border-radius: var(--radius); background: var(--red); color: #fff; font-weight: 600; font-size: 13px}
.srv-off .srv-btn { background: var(--panel-3); color: var(--text)}
.srv-off .srv-icon { filter: grayscale(1); opacity: .7}
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--border)}
.user-chip:hover { border-color: var(--border-2)}
.user-nav .user-chip img { width: 28px; height: 28px}

/* Profils */
.profile-page { max-width: 760px; margin: 0 auto; padding: 30px 24px 60px; display: flex; flex-direction: column; gap: 20px; width: 100%}
.profile-card { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); overflow: hidden}
.profile-cover { height: 120px; background: linear-gradient(135deg, var(--pc), color-mix(in srgb, var(--pc) 30%, #000))}
.profile-avatar { width: 104px; height: 104px; border-radius: 50%; border: 6px solid var(--panel); margin: -52px 0 0 24px; background: var(--panel-3)}
.profile-body { padding: 12px 24px 24px; display: flex; flex-direction: column; gap: 12px}
.profile-body h1 { font-family: var(--display); font-stretch: 85%; font-size: 28px}
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px}
.profile-bio { color: var(--muted); white-space: pre-wrap}
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px}
.profile-stats > div { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2)}
.profile-stats b { display: block; font-size: 16px}
.profile-stats small { color: var(--dim)}
.site-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); cursor: pointer; font-family: inherit}
.site-badge [data-lucide], .site-badge svg { width: 13px; height: 13px}
.site-badge.off { color: var(--dim); border-color: var(--border-2); background: transparent}
.site-badge.off:hover { color: var(--c)}
.profile-admin-list { display: flex; flex-direction: column; gap: 8px}
.profile-admin-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2); flex-wrap: wrap}
.profile-admin-item img { width: 36px; height: 36px; border-radius: 50%}
.pa-who { display: flex; flex-direction: column; min-width: 140px}
.pa-roles { display: flex; flex-wrap: wrap; gap: 6px; flex: 1}
.pa-catalog summary { cursor: pointer; color: var(--muted)}
.pa-new { margin-top: 10px; gap: 8px}
.pa-new input[type=color] { width: 56px}

/* Boutique : code promo et affiliation */

.shop-old { text-decoration: line-through; color: var(--dim); font-size: .6em; margin-right: 8px}
.aff-link { max-width: 640px; margin: 0 auto; width: 100%}
.aff-stats { max-width: 900px; margin: 0 auto; width: 100%}
.aff-rates { gap: 10px; align-items: center; flex-wrap: wrap}
.aff-rates input { width: 70px; display: inline-block; padding: 6px 8px}

@media (max-width: 760px) {
  .ai-cats, .grid-split-sm { grid-template-columns: 1fr}
  .hist-item summary { grid-template-columns: 1fr auto}
  .hist-who, .hist-what { display: none}
  .listen-mode, .trial-card { flex-direction: column; align-items: flex-start}
  .cta-inline { min-width: 0; width: 100%}
  .search-trigger span, .search-trigger kbd { display: none}
  .profile-page { padding: 20px 16px 40px}
}

/* Carte de profil dans le dashboard */
.sidebar-profile { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; font-weight: 600}
.sidebar-profile span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.sidebar-profile:hover img { outline: 2px solid var(--red); outline-offset: 2px}
.topbar-avatar { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%}
.topbar-avatar img { width: 32px; height: 32px; border-radius: 50%}
.topbar-avatar:hover img { outline: 2px solid var(--red); outline-offset: 2px}
.pc-overlay { position: fixed; inset: 0; z-index: 210; background: rgba(0, 0, 0, .6); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; overflow-y: auto}
.pc-box { width: min(480px, 100%); background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden}
.pc-box .profile-card { border: 0; border-radius: 0}
.pc-box .profile-cover { position: relative; height: 96px}
.pc-close { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, .35); color: #fff}
.pc-box .profile-avatar { width: 88px; height: 88px; margin: -44px 0 0 20px}
.pc-box .profile-body { padding: 10px 20px 20px}
.pc-box .profile-body h1 { font-size: 24px}
.pc-box input[type=color] { width: 100%; height: 40px; padding: 4px; border-radius: var(--radius); border: 1px solid var(--border-2); background: var(--bg-2)}
.pc-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap}
.profile-avatar { position: relative; z-index: 1}
.pc-box .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr))}
@media (max-width: 480px) { .pc-box .profile-stats { grid-template-columns: 1fr} }

/* Profil façon Discord : bannière, pronoms, statut, liens */
.profile-cover { position: relative; background-size: cover; background-position: center}
.profile-cover.has-img { height: 140px}
.pc-box .profile-cover.has-img { height: 120px}
.pc-banner-tools { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px}
.pc-banner-tools .btn { background: rgba(0, 0, 0, .55); border-color: rgba(255, 255, 255, .15); color: #fff}
.profile-name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap}
.profile-pronouns { color: var(--dim); font-size: 13px}
.profile-status { color: var(--text); font-size: 13.5px; padding: 8px 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); width: fit-content; max-width: 100%}
.profile-section { display: flex; flex-direction: column; gap: 4px}
.profile-links { display: flex; flex-wrap: wrap; gap: 6px}
.profile-links a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--border-2); color: var(--muted); font-size: 12.5px}
.profile-links a:hover { color: var(--text); border-color: var(--pc, var(--red))}
.profile-links svg, .profile-links [data-lucide] { width: 13px; height: 13px}
.pc-link { display: grid; grid-template-columns: 140px 1fr; gap: 6px}
.pc-link + .pc-link { margin-top: 6px}
.pc-box .profile-body .grid-2 { gap: 10px}

/* Mini lecteur (musique du navigateur, sur toutes les pages) */
.mini-player { position: fixed; right: 16px; bottom: 16px; z-index: 150; width: min(380px, calc(100vw - 32px)); display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--panel); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7)}
.mini-player > img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; grid-row: span 2}
.mp-info { min-width: 0; display: flex; flex-direction: column; gap: 2px}
.mp-title { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.mp-title:hover { color: var(--red-2)}
.mp-author { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.mp-bar { height: 3px; border-radius: 99px; background: var(--border-2); overflow: hidden; margin-top: 4px}
.mp-fill { display: block; height: 100%; width: 0; background: var(--red)}
.mp-ctrl { display: flex; align-items: center; gap: 2px}
.mp-ctrl .icon-btn { width: 30px; height: 30px}
.mp-ctrl svg, .mp-ctrl [data-lucide] { width: 16px; height: 16px}
.mp-play { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer}
.mp-play:hover { background: var(--red-2)}
.mp-close { color: var(--dim)}
.mp-time { grid-column: 2 / 4; font: 11px var(--mono); color: var(--dim)}
body:has(.savebar) .mini-player { bottom: 84px}
@media (max-width: 760px) { .mini-player { right: 8px; left: 8px; width: auto; bottom: 8px} }

/* Likes de profil */
.like-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--muted); font: 600 13px inherit; cursor: pointer; transition: color .15s, border-color .15s}
.like-btn svg, .like-btn [data-lucide] { width: 15px; height: 15px}
.like-btn:not(.static):hover { color: #f43f5e; border-color: rgba(244, 63, 94, .5)}
.like-btn.on { color: #f43f5e; border-color: rgba(244, 63, 94, .5); background: rgba(244, 63, 94, .1)}
.like-btn.on svg { fill: currentColor}
.like-btn.static { cursor: default}
.like-btn.pop svg { animation: like-pop .35s ease}
@keyframes like-pop { 50% { transform: scale(1.35); } }

/* Vue d'ensemble : 8 chiffres sur 2 lignes complètes */
.stats { grid-template-columns: repeat(4, minmax(0, 1fr))}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr))} }

/* Page « Tes serveurs » */
.hub { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start}
.hub-main { display: flex; flex-direction: column; gap: 22px; min-width: 0}
.hub-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--border)}
.hub-hello { color: var(--dim); font-size: 13px; margin-bottom: 2px}
.hub-head h1 { font-family: var(--display); font-stretch: 85%; font-size: 32px; font-weight: 800}
.hub-search { max-width: 360px}
.hub-group { display: flex; flex-direction: column; gap: 10px}
.hub-label { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); display: flex; gap: 8px}
.hub-label span { color: var(--muted)}
.hub-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); overflow: hidden}
.hub-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; transition: background .15s}
.hub-row + .hub-row { border-top: 1px solid var(--border)}
.hub-row:hover { background: var(--panel-2)}
.hub-icon { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--panel-3)}
.hub-icon-empty { display: grid; place-items: center; font-weight: 700; color: var(--muted)}
.hub-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px}
.hub-info b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.hub-info small { color: var(--dim); font-size: 12.5px}
.hub-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end}
.hub-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border-2); color: var(--muted); font-size: 11.5px; white-space: nowrap}
.hub-tag svg, .hub-tag [data-lucide] { width: 12px; height: 12px}
.hub-tag.gold { color: var(--gold); border-color: rgba(234, 179, 8, .35)}
.hub-go { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; background: var(--red); color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap}
.hub-go svg, .hub-go [data-lucide] { width: 14px; height: 14px}
.hub-off .hub-icon { filter: grayscale(1); opacity: .6}
.hub-off .hub-go { background: var(--panel-3); color: var(--text)}
.hub-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 48px 24px; border: 1px dashed var(--border-2); border-radius: 10px}
.hub-empty [data-lucide], .hub-empty svg { width: 28px; height: 28px; color: var(--dim)}
.hub-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px}
.hub-card { border: 1px solid var(--border); border-radius: 10px; background: var(--panel)}
.hub-me { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 0 16px 16px; overflow: hidden}
.hub-me-cover { align-self: stretch; height: 72px; margin: 0 -16px; background: linear-gradient(135deg, var(--pc), color-mix(in srgb, var(--pc) 25%, #000)) center / cover}
.hub-me-avatar { width: 72px; height: 72px; border-radius: 50%; margin-top: -46px; border: 5px solid var(--panel); position: relative}
.hub-me-name { font-size: 16px}
.hub-me .profile-badges { justify-content: center}
.hub-me-stats { align-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 8px}
.hub-me-stats div { padding: 8px 4px; display: flex; flex-direction: column}
.hub-me-stats div + div { border-left: 1px solid var(--border)}
.hub-me-stats b { font-size: 15px}
.hub-me-stats small { color: var(--dim); font-size: 11px}
.hub-me .btn { align-self: stretch; justify-content: center}
.hub-promo { display: flex; gap: 12px; padding: 14px; border-color: rgba(234, 179, 8, .3)}
.hub-promo span:last-child { display: flex; flex-direction: column; gap: 3px}
.hub-promo small { color: var(--muted); font-size: 12.5px; line-height: 1.45}
.hub-promo:hover { border-color: rgba(234, 179, 8, .6)}
.hub-links { display: flex; flex-direction: column; padding: 6px}
.hub-links a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--muted); font-size: 13.5px}
.hub-links a:hover { background: var(--panel-2); color: var(--text)}
.hub-links svg, .hub-links [data-lucide] { width: 15px; height: 15px}
@media (max-width: 980px) {
  .hub { grid-template-columns: 1fr}
  .hub-side { position: static; order: -1}
  .hub-links, .hub-promo { display: none}
}
@media (max-width: 640px) {
  .hub { padding: 16px 16px 48px}
  .hub-tags { display: none}
  .hub-head { align-items: flex-start; flex-direction: column}
}

/* Vue d'ensemble : modules en grille compacte */
.mod-filter label span { padding: 4px 10px; font-size: 12px}
.mod-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px}
.mod-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); font-size: 13px; font-weight: 500; color: var(--muted); min-width: 0}
.mod-chip span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.mod-chip svg, .mod-chip [data-lucide] { width: 15px; height: 15px; flex-shrink: 0; color: var(--dim)}
.mod-chip.on { color: var(--text)}
.mod-chip.on svg { color: var(--red-2)}
.mod-chip:hover { border-color: var(--border-2); background: var(--panel-2)}
.mod-chip .dot { flex-shrink: 0}

/* Boutique : cartes de prix (en-tête coloré, avantages, inclus) */
.pricing { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 24px 60px; display: flex; flex-direction: column; gap: 22px}
.pricing-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px}
.pricing-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: var(--red-soft); border: 1px solid var(--red-line); color: var(--red-2); font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase}
.pricing-kicker svg, .pricing-kicker [data-lucide] { width: 14px; height: 14px}
.pricing-hero h1 { font-family: var(--display); font-stretch: 85%; font-size: 52px; font-weight: 800; line-height: 1.05}
.pricing-switch { display: inline-flex; gap: 4px; padding: 5px; margin-top: 8px; border-radius: 99px; background: var(--panel); border: 1px solid var(--border-2)}
.pricing-switch input { display: none}
.pricing-switch span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 99px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; transition: .15s}
.pricing-switch small { font-weight: 500; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--panel-3); color: var(--dim)}
.pricing-switch input:checked + span { background: var(--panel-3); color: var(--text)}
.pricing-switch input:checked + span small { background: var(--red-soft); color: var(--red-2)}
.pricing-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 900px; margin: 0 auto 30px; width: 100%; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel)}
.pricing-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; transition: opacity .2s}
.pricing-field label { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px}
.pricing-field label svg, .pricing-field label [data-lucide] { width: 14px; height: 14px; color: var(--red-2)}
.pricing-field.dimmed { opacity: .4; pointer-events: none}
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; gap: 20px; align-items: start}
.price-card { position: relative; display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--border-2); background: var(--panel); overflow: hidden; transition: transform .2s, border-color .2s}
.price-card:hover { transform: translateY(-4px); border-color: var(--red-line)}
.price-card.popular { border-color: var(--red); transform: translateY(-10px)}
.price-card.popular:hover { transform: translateY(-14px)}
.price-ribbon { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 0 0 10px 10px; font-weight: 800; font-size: 12px}
.price-ribbon svg, .price-ribbon [data-lucide] { width: 13px; height: 13px; fill: currentColor}
.price-head { padding: 28px 24px 24px; background: linear-gradient(150deg, #ff5a1f 0%, #9b0f1d 70%, #5c0811 100%); color: #fff}
.price-card.popular .price-head { padding-top: 38px}

.price-head h2 { font-family: var(--display); font-stretch: 85%; font-size: 24px; font-weight: 800}
.price-head p { font-size: 13.5px; margin-top: 2px}
.price-amount { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; flex-wrap: wrap}
.price-amount b { font-family: var(--display); font-stretch: 85%; font-size: 44px; font-weight: 800; line-height: 1}
.price-amount small { font-size: 15px}
.price-amount .shop-old { font-size: 18px}
.price-body { display: flex; flex-direction: column; gap: 18px; padding: 22px 24px 24px; flex: 1}
.price-features, .price-included { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px}
.price-features li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500}
.price-features svg, .price-features [data-lucide] { width: 18px; height: 18px; color: var(--red-2); flex-shrink: 0}
.price-perk { font-weight: 700 !important}
.price-card.is-plus .price-perk svg { color: var(--gold)}
.price-included { padding-top: 18px; border-top: 1px solid var(--border); gap: 10px}
.price-included li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px}
.price-included svg, .price-included [data-lucide] { width: 15px; height: 15px; color: #22c55e; flex-shrink: 0}
.price-btn { justify-content: center; margin-top: auto; padding: 12px; font-size: 14px}
.price-btn svg, .price-btn [data-lucide] { width: 16px; height: 16px}
.price-card:not(.popular) .price-btn { background: var(--panel-3); border-color: var(--border-2)}
.price-card:not(.popular) .price-btn:hover:not(:disabled) { background: var(--red); border-color: var(--red)}
.pricing-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: 26px; color: var(--muted); font-size: 13.5px}
.pricing-trust span { display: inline-flex; align-items: center; gap: 8px}
.pricing-trust svg, .pricing-trust [data-lucide] { width: 16px; height: 16px; color: var(--red-2)}
@media (max-width: 760px) {
  .pricing-hero h1 { font-size: 36px}
  .pricing-bar { grid-template-columns: 1fr}
  .price-card.popular, .price-card.popular:hover { transform: none}
  .pricing-switch span { padding: 8px 12px}
  .pricing-switch small { display: none}
}

/* Activation volontaire du premium */
.premium-offer { display: flex; align-items: center; gap: 14px; margin: 16px 28px 0; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--gold-line); background: linear-gradient(90deg, var(--gold-soft), var(--panel) 60%)}
.premium-offer-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0}
.premium-offer-text small { color: var(--muted); font-size: 12.5px}
.hub-premium { padding: 14px; display: flex; flex-direction: column; gap: 8px; border-color: var(--gold-line)}
.hub-premium-title { display: flex; align-items: center; gap: 8px; font-weight: 700}
.hub-premium-title svg, .hub-premium-title [data-lucide] { width: 16px; height: 16px; color: var(--gold)}
.hub-premium-title small { margin-left: auto; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--gold-2)}
.hub-premium-list { display: flex; flex-direction: column; gap: 2px}
.hub-premium-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 6px; cursor: pointer}
.hub-premium-row:hover { background: var(--panel-2)}
.hub-premium-row > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.hub-premium-row small { color: var(--dim); font-size: 11.5px}
.hub-premium-row.locked { cursor: default; opacity: .7}
.hub-premium .switch input:checked + span { background: var(--gold)}
@media (max-width: 760px) { .premium-offer { margin: 12px 12px 0; flex-wrap: wrap} }

/* Boutique : en-têtes sombres (plus de gros blocs rouges) */
.price-head, .price-card.popular .price-head, .price-card.is-plus .price-head {
  background: radial-gradient(260px 140px at 100% 0%, rgba(255, 90, 31, .16), transparent 70%), var(--panel-2);
  color: var(--text); border-bottom: 1px solid var(--border); box-shadow: inset 0 3px 0 var(--border-2)}
.price-card.popular .price-head { background: radial-gradient(300px 160px at 100% 0%, rgba(255, 90, 31, .3), transparent 70%), var(--panel-2); box-shadow: inset 0 3px 0 var(--red)}
.price-card.is-plus .price-head { background: radial-gradient(260px 140px at 100% 0%, rgba(250, 204, 21, .12), transparent 70%), var(--panel-2); box-shadow: inset 0 3px 0 var(--gold)}
.price-head p { color: var(--muted)}
.price-amount small { color: var(--dim)}
.price-amount .shop-old { color: var(--dim)}
.price-card.popular .price-amount b { color: var(--red-2)}
.price-card.is-plus .price-amount b { color: var(--gold-2)}
.price-ribbon { background: var(--red); color: #fff}
.price-card.is-plus.popular .price-ribbon { background: var(--gold); color: #1a1400}
.price-card.popular { box-shadow: 0 24px 60px -30px rgba(255, 90, 31, .55)}

/* Navigation sans rechargement : fine barre de chargement en haut */
html.soft-loading::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 300; background: linear-gradient(90deg, transparent, var(--red), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: soft-load 0.9s linear infinite}
html.soft-loading main.content { opacity: .6; transition: opacity .15s}
@keyframes soft-load { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* Musique : la file d'attente colle au lecteur (la bibliothèque prend la hauteur à droite) */
.music-grid { grid-template-rows: auto 1fr}
.music-grid > .player-card, .music-grid > .queue-card { align-self: start}
@media (max-width: 1100px) { .music-grid { grid-template-rows: none} }

.panel-music-btn { margin-left: auto; text-transform: none; letter-spacing: 0; font-family: inherit}
.player-card .card-title .panel-music-btn + .live-status { margin-left: 8px}
.modal .sel { width: 100%}
@media (max-width: 760px) { body:has(.savebar) .mini-player { bottom: 92px} }

/* =====================================================================
   DA « console » (octobre 2026) : noir pur, bordures fines, police Geist,
   menu compact, chiffres sobres. Le rouge Squir reste pour les actions.
   ===================================================================== */
:root:not([data-theme]) {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --panel: #0a0a0a;
  --panel-2: #111111;
  --panel-3: #1a1a1a;
  --border: #1f1f1f;
  --border-2: #2e2e2e;
  --text: #ededed;
  --muted: #a1a1a1;
  --dim: #6e6e6e;
  --radius: 8px;
  --sidebar: 236px;
  --mono: 'Geist Mono', ui-monospace, Consolas, monospace;
  --display: 'Geist', 'Inter', system-ui, sans-serif}
body, input, select, textarea, button, .btn, .sel-btn, .rt-editor, .tf, .quick-picks button, .dc-select-box { font-family: 'Geist', 'Inter', system-ui, sans-serif}
body { font-size: 14px; letter-spacing: -0.005em}
.brand, .module-title h1, .hero-guild h1, .landing-hero h1, .servers-page h1, .error-page h1, .stat b, .mini-stats b, .hero-stats b, .np-title, .card-title,
.hub-head h1, .pricing-hero h1, .price-head h2, .price-amount b, .profile-body h1, .usage-grid b { font-family: 'Geist', 'Inter', sans-serif; font-stretch: 100%; letter-spacing: -0.02em}

/* Fond et surfaces */
.main, .landing { background: var(--bg)}
.card, .module-head, .hero-guild, .console-cta, .gw-item, .member-top, .np, .hub-list, .hub-card, .price-card, .pricing-bar { background: var(--panel); border-color: var(--border); border-radius: var(--radius)}
.card { padding: 20px; box-shadow: none}
.card:hover { border-color: var(--border)}
.card-title { font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: -0.01em}
.card-title [data-lucide], .card-title svg { color: var(--muted)}
.module-head { padding: 20px 22px; background: var(--panel)}
.module-head::before { display: none}
.module-title h1 { font-size: 22px; font-weight: 600}
.module-icon { background: var(--panel-3); border: 1px solid var(--border-2); color: var(--text); border-radius: 8px}
.module-icon [data-lucide] { color: var(--text)}

/* Barre latérale façon console */
.sidebar { background: #000; border-right: 1px solid var(--border); padding: 12px 10px; gap: 8px; width: var(--sidebar)}
.sidebar .brand { display: none}
.nav { gap: 1px; margin: 0; padding: 0 2px}
.nav-label { font: 600 11px 'Geist', sans-serif; letter-spacing: .04em; color: var(--text); padding: 18px 10px 6px; text-transform: uppercase}
.nav-item { padding: 7px 10px; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: var(--muted); gap: 10px}
.nav-item [data-lucide], .nav-item svg { width: 16px; height: 16px}
.nav-item:hover { background: var(--panel-2); color: var(--text)}
.nav-item.active { background: var(--panel-3); color: var(--text)}
.nav-item.active::before { display: none}
.nav-item.active [data-lucide], .nav-item.active svg { color: var(--text)}
.dot { width: 6px; height: 6px}
.dot.on { background: #22c55e; box-shadow: none}
.nav-live { background: transparent; color: var(--text); border: 1px solid var(--border-2); animation: none; font: 600 9.5px var(--mono)}
.nav-premium-btn { border-radius: 8px}
.sidebar-user { background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 12px 6px 4px; margin: 0 -10px; padding-left: 16px; padding-right: 12px}
.sidebar-legal { display: none}

/* Sélecteur de serveurs : logo / serveur ⌄ */
.ws-head { position: relative; display: flex; align-items: center; gap: 6px; padding: 4px 4px 10px; border-bottom: 1px solid var(--border); margin: 0 -10px 4px; padding-left: 14px; padding-right: 10px}
.ws-logo { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0}
.ws-logo img { width: 22px; height: 22px}
.ws-sep { color: var(--border-2); font-size: 18px; font-weight: 300}
.ws-switch { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; border: 0; background: transparent; color: var(--text); font: 600 13.5px 'Geist', sans-serif; cursor: pointer; text-align: left}
.ws-switch:hover, .ws-switch.open { background: var(--panel-2)}
.ws-switch [data-lucide], .ws-switch svg { width: 15px; height: 15px; color: var(--dim); flex-shrink: 0}
.ws-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.ws-av { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0; object-fit: cover; background: var(--panel-3); border: 1px solid var(--border-2); color: var(--muted); font: 600 11px 'Geist', sans-serif}
.ws-av [data-lucide], .ws-av svg { width: 13px; height: 13px}
.ws-menu { position: absolute; top: calc(100% - 4px); left: 10px; right: -40px; z-index: 60; padding: 6px; border-radius: 8px; border: 1px solid var(--border-2); background: #0d0d0d; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .8); max-height: 60vh; overflow-y: auto}
.ws-label { font: 600 11px 'Geist', sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); padding: 6px 8px 6px}
.ws-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; color: var(--muted); font-size: 13.5px}
.ws-item span:not(.ws-av) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.ws-item:hover { background: var(--panel-3); color: var(--text)}
.ws-item.on { color: var(--text)}
.ws-item > [data-lucide], .ws-item > svg { width: 15px; height: 15px; color: var(--text)}
.ws-div { height: 1px; background: var(--border); margin: 6px 0}
.ws-add .ws-av { background: transparent; border-style: dashed}

/* Barre du haut */
.topbar { height: 56px; padding: 0 24px; background: rgba(0, 0, 0, .85); border-bottom: 1px solid var(--border)}
.crumbs { color: var(--muted); font-size: 13.5px}
.crumbs b { font-weight: 600}
.icon-btn { width: 32px; height: 32px; border-radius: 6px; border-color: var(--border)}
.icon-btn:hover { background: var(--panel-2); border-color: var(--border-2)}
.search-trigger { border-radius: 6px; background: var(--panel)}
.content { padding: 28px 32px; gap: 18px}

/* Boutons plus plats */
.btn { border-radius: 6px; height: 36px; font-weight: 500; font-size: 13.5px}
.btn-sm { height: 32px; border-radius: 6px; font-size: 13px}
.btn-lg { height: 44px; border-radius: 8px}
.btn-red { background: var(--red); box-shadow: none}
.btn-red:hover:not(:disabled) { background: var(--red-2); box-shadow: none}
.btn-ghost { background: var(--panel); border-color: var(--border-2)}
.btn-ghost:hover:not(:disabled) { background: var(--panel-3); border-color: #3a3a3a}

/* Champs */
input[type=text], input[type=password], input[type=url], input[type=number], select, textarea, .sel-btn { border-radius: 6px; background: #000; border-color: var(--border-2)}
input:focus, select:focus, textarea:focus { border-color: #4a4a4a; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06)}
.field-inline, .row-item, .ai-cat, .radio-card, .backup-item, .hist-item, .app-item, .season-item, .rank-row:nth-child(odd), .usage-grid > div { background: #000}
.segmented { border-radius: 6px; background: #000}
.badge { border-radius: 4px}
.savebar { border-radius: 8px; background: rgba(10, 10, 10, .95)}
.switch input:checked + span { background: var(--text)}
.switch input:checked + span::before { background: #000}

/* Cartes de chiffres : libellé en haut, valeur, petit trait coloré en bas à droite */
.stats { gap: 12px}
.stat { position: relative; display: block; padding: 16px 18px 20px; background: var(--panel); border-color: var(--border)}
.stat:hover { transform: none; border-color: var(--border-2)}
.stat > [data-lucide], .stat > svg { display: none}
.stat > div { display: flex; flex-direction: column-reverse; gap: 6px}
.stat span { font-size: 13.5px; color: var(--muted)}
.stat b { font-size: 26px; font-weight: 600}
.stat::after { content: ''; position: absolute; right: 18px; bottom: 16px; width: 72px; height: 2px; border-radius: 2px; background: var(--line, #22c55e)}
.stats > :nth-child(8n + 1) { --line: #22c55e}
.stats > :nth-child(8n + 2) { --line: #3b82f6}
.stats > :nth-child(8n + 3) { --line: #eab308}
.stats > :nth-child(8n + 4) { --line: #a855f7}
.stats > :nth-child(8n + 5) { --line: #ff5a1f}
.stats > :nth-child(8n + 6) { --line: #06b6d4}
.stats > :nth-child(8n + 7) { --line: #f97316}
.stats > :nth-child(8n + 8) { --line: #ec4899}
.stat-link { border-color: var(--border)}

/* Divers */
.toast { border-radius: 8px}
.premium-crown { border-radius: 6px}
.hub-go, .srv-btn { border-radius: 6px}
@media (max-width: 980px) { .sidebar { width: 280px} }

/* Créateur de commandes : boutons, menus, sorties multiples, clic droit */
.cc-cond.cc-multi { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px}
.cc-cond.cc-multi span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 10px}
.cc-node.multi { outline: 2px dashed #60a5fa; outline-offset: 3px}
.cc-seg { display: flex; gap: 4px; padding: 4px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); flex-wrap: wrap}
.cc-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 500 12.5px inherit; cursor: pointer; white-space: nowrap}
.cc-seg button:hover { color: var(--text)}
.cc-seg button.on { background: var(--panel-3); color: var(--text)}
.cc-seg svg, .cc-seg [data-lucide] { width: 14px; height: 14px}
.cc-btn-preview { padding: 14px; border-radius: 8px; background: #313338; border: 1px solid var(--border)}
.cc-dc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 4px; background: var(--bc); color: #fff; font: 500 14px 'gg sans', 'Geist', sans-serif}
.cc-dc-btn svg, .cc-dc-btn [data-lucide] { width: 14px; height: 14px}
.cc-row2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 8px}
.cc-optlist { display: flex; flex-direction: column; gap: 8px}
.cc-optrow { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 40px 10px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg)}
.cc-optrow .icon-btn { position: absolute; top: 8px; right: 6px; width: 28px; height: 28px}
.cc-optrow .field { gap: 4px}
.cc-optrow label { font-size: 11.5px}
.cc-optrow input { padding: 7px 9px; font-size: 13px}
.cc-chips { font-size: 12px; color: var(--dim)}
.cc-ctx { position: fixed; z-index: 400; min-width: 230px; padding: 6px; border-radius: 10px; border: 1px solid var(--border-2); background: #111; box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .8)}
.cc-ctx.wide { width: 340px}
.cc-ctx > button, .cc-ctx-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: 500 13.5px inherit; text-align: left; cursor: pointer}
.cc-ctx > button:hover, .cc-ctx-list button:hover { background: var(--panel-3)}
.cc-ctx svg, .cc-ctx [data-lucide] { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0}
.cc-ctx span { flex: 1; min-width: 0; display: flex; flex-direction: column}
.cc-ctx span small { color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.cc-ctx kbd { font: 11px var(--mono); color: var(--dim)}
.cc-ctx-sep { height: 1px; margin: 4px 0; background: var(--border)}
.cc-ctx-search { display: flex; align-items: center; gap: 8px; padding: 4px 8px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px}
.cc-ctx-search input { border: 0; background: transparent; padding: 6px 0; box-shadow: none !important}
.cc-ctx-list { max-height: 320px; overflow-y: auto}
.cc-area { position: absolute; z-index: 5; border: 1px dashed #60a5fa; background: rgba(96, 165, 250, .08); pointer-events: none}
#ccCanvas.area-mode { cursor: crosshair}

/* Le contenu utilise toute la largeur de l’écran */
.content, .content-wide { max-width: none; width: 100%}
@media (min-width: 1800px) { .content { padding-left: 40px; padding-right: 40px} }

/* Éditeur du site web */
.site-ed { display: flex; flex-direction: column; gap: 14px}
.site-top { flex-direction: row; align-items: flex-end; gap: 18px; flex-wrap: wrap}
.site-addr { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 6px}
.site-addr label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px}
.site-addr label svg, .site-addr label [data-lucide] { width: 15px; height: 15px}
.site-addr-input { display: flex; align-items: center; border: 1px solid var(--border-2); border-radius: 6px; background: #000; overflow: hidden}
.site-addr-input span { padding: 0 10px; color: var(--dim); font: 13px var(--mono); white-space: nowrap}
.site-addr-input input { border: 0 !important; border-radius: 0; padding: 10px 2px; font: 600 14px var(--mono); box-shadow: none !important; background: transparent}
.site-ok { color: #22c55e !important}
.site-err { color: #f87171 !important}
.site-pub { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer}
.site-pub > span:first-child { display: flex; flex-direction: column}
.site-pub small { color: var(--dim); font-size: 12px}
.site-actions { display: flex; gap: 8px}
.btn-pulse { box-shadow: 0 0 0 3px var(--red-soft) !important}
.site-body { display: grid; grid-template-columns: 290px minmax(0, 1fr) 320px; gap: 14px; align-items: start}
.site-col { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow-y: auto}
.site-sections { display: flex; flex-direction: column; gap: 4px}
.site-sec { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border-radius: 6px; border: 1px solid var(--border); background: #000; cursor: pointer}
.site-sec.on { border-color: var(--text)}
.site-sec > svg, .site-sec > [data-lucide] { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0}
.site-sec span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; font-weight: 500}
.site-sec small { color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.site-sec .icon-btn { width: 24px; height: 24px; border: 0}
.site-sec .icon-btn svg { width: 14px; height: 14px}
.site-addmenu { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px; border-radius: 8px; border: 1px solid var(--border-2); background: #0d0d0d}
.site-addmenu button { display: flex; align-items: center; gap: 6px; padding: 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: 500 12.5px inherit; text-align: left; cursor: pointer}
.site-addmenu button:hover { background: var(--panel-3)}
.site-addmenu svg { width: 14px; height: 14px; color: var(--muted)}
.site-preview { padding: 0; overflow: hidden}
.site-preview-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border); font: 12.5px var(--mono); color: var(--muted)}
.site-preview-bar .dots { display: flex; gap: 6px}
.site-preview-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-2)}
.site-preview-bar span:nth-child(2) { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.site-device { width: auto; padding: 2px}
.site-device button { padding: 4px 8px}
.site-frame-wrap { background: #050505; display: flex; justify-content: center}
#siteFrame { width: 100%; height: calc(100vh - 210px); min-height: 520px; border: 0; background: #000; transition: width .25s}
#siteFrame.mobile { width: 390px; border-left: 1px solid var(--border); border-right: 1px solid var(--border)}
.site-img { display: flex; gap: 6px}
.site-thumb { margin-top: 6px; max-height: 90px; border-radius: 6px; object-fit: cover}
.site-items { display: flex; flex-direction: column; gap: 8px}
.site-item { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: #000}
.site-item-head { display: flex; align-items: center; gap: 4px}
.site-item-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px}
.site-item-head .icon-btn { width: 26px; height: 26px}
@media (max-width: 1300px) { .site-body { grid-template-columns: 260px minmax(0, 1fr)} .site-body > aside:last-child { grid-column: 1 / -1; position: static; max-height: none} }
@media (max-width: 900px) { .site-body { grid-template-columns: 1fr} .site-col { position: static; max-height: none} }

/* Mini lecteur réduit : une pastille avec la pochette et un petit égaliseur */
.mini-player.mp-small { width: auto; padding: 0; border-radius: 50%; display: block; background: transparent; border: 0; box-shadow: none}
.mp-pill { position: relative; display: block; width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 2px solid var(--border-2); background: var(--panel); cursor: pointer; overflow: hidden; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .8); transition: transform .15s, border-color .15s}
.mp-pill:hover { transform: scale(1.06); border-color: var(--red)}
.mp-pill img { width: 100%; height: 100%; object-fit: cover}
.mp-eq { position: absolute; inset: auto 0 0 0; height: 18px; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .75))}
.mp-eq i { width: 3px; height: 10px; border-radius: 2px; background: #fff; animation: mp-eq .9s ease-in-out infinite}
.mp-eq i:nth-child(2) { animation-delay: .2s}
.mp-eq i:nth-child(3) { animation-delay: .4s}
.mp-eq.off i { animation: none; height: 3px}
@keyframes mp-eq { 0%, 100% { height: 4px; } 50% { height: 11px; } }
@media (max-width: 760px) { .mini-player.mp-small { left: auto; right: 12px} }

/* « + Bouton » / « + Menu » sous les blocs message */
.cc-addcomp { position: absolute; display: flex; justify-content: space-between; pointer-events: none}
.cc-addcomp button { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 99px; border: 1px solid var(--border-2); color: var(--text); font: 600 12px inherit; cursor: pointer; transition: border-color .15s, transform .15s}
.cc-addcomp button:hover { border-color: #4f8ef7; transform: translateY(-1px)}
.cc-addcomp svg, .cc-addcomp [data-lucide] { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: #4f8ef7; color: #fff}

/* Façon BotGhost : pastilles sur le bord des blocs, aperçu du bouton, branches étiquetées */
.cc-addcomp { bottom: -15px; left: -14px; right: -14px}
.cc-addcomp.left { justify-content: flex-start}
.cc-addcomp button { background: #202024; box-shadow: 0 4px 14px rgba(0, 0, 0, .5)}
.cc-btnprev { padding: 4px 12px 14px}
.cc-btnprev .cc-dc-btn { padding: 5px 14px; font-size: 13px}
.cc-optcase { color: var(--text); font-weight: 600}
.cc-elabel rect { fill: #0b0b0d; stroke: #22c55e; stroke-width: 1}
.cc-elabel text { fill: #22c55e; font: 700 10px var(--mono); text-anchor: middle; letter-spacing: .05em}
.cc-elabel.else rect { stroke: var(--gold)}
.cc-elabel.else text { fill: var(--gold)}
/* Champs côte à côte bien alignés (compteur sur la même ligne que le libellé) */
.cc-row2 { align-items: end}
.cc-row2 .field label { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; white-space: nowrap; min-height: 18px}
.cc-row2 .field label small { font-size: 11px; font-weight: 500}

/* Site : pages, plein écran */
.site-pages { display: flex; flex-wrap: wrap; gap: 4px}
.site-page { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 6px; border: 1px solid var(--border); background: #000; color: var(--muted); font: 500 13px inherit; cursor: pointer}
.site-page svg, .site-page [data-lucide] { width: 13px; height: 13px}
.site-page:hover { color: var(--text)}
.site-page.on { color: var(--text); border-color: var(--text)}
.site-page.add { padding: 6px 8px}
.site-slugmini { display: flex; align-items: center; border: 1px solid var(--border-2); border-radius: 6px; background: #000}
.site-slugmini span { padding-left: 10px; color: var(--dim); font-family: var(--mono)}
.site-slugmini input { border: 0 !important; box-shadow: none !important; background: transparent; padding-left: 2px; font-family: var(--mono)}
.site-page-opts { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px}
.site-linksel + .site-linkurl { margin-top: 6px}
.site-ed.site-fs .site-preview { position: fixed; inset: 0; z-index: 500; border-radius: 0; border: 0}
.site-ed.site-fs #siteFrame { height: calc(100vh - 45px)}
.site-ed.site-fs #siteFrame.mobile { height: calc(100vh - 45px)}
.site-preview-bar .icon-btn { width: 28px; height: 28px}

/* Fond du site public (accueil, boutique, serveurs, profils…) : image Squir fixe, légèrement assombrie */
.landing {
  background: radial-gradient(900px 480px at 50% -10%, rgba(255, 90, 31, .10), transparent 70%), #0f1012}
@media (max-width: 760px) { .landing { background-attachment: scroll} }

/* Bannières des embeds (/admin) */
.bn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 12px}
.bn-item { border: 1px solid var(--border, #222); border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.02)}
.bn-img { position: relative; aspect-ratio: 1000 / 256; background: #0b0b0d}
.bn-img img { width: 100%; height: 100%; object-fit: cover; display: block}
.bn-img .badge { position: absolute; top: 6px; right: 6px}
.bn-row { display: flex; align-items: center; gap: 6px; padding: 8px}
.bn-row code { font-size: 12px; flex: none}
.bn-row input[type=url] { flex: 1; min-width: 0; height: 32px; font-size: 12.5px}
.bn-row .btn { flex: none; padding: 0 9px; height: 32px}

/* Page Boutons */
.bl-list { display: flex; flex-direction: column; gap: 8px}
.bl-row { display: grid; grid-template-columns: 210px 1fr 150px auto; gap: 8px; align-items: center}
.bl-preview { min-width: 0}
.bl-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 14px; border-radius: 6px; background: #4e5058; color: #fff; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis}
.bl-emo img { width: 18px; height: 18px; vertical-align: middle}
.bl-emo:empty { display: none}
.bl-txt:empty { display: none}
.bl-row input[type=text] { height: 36px; min-width: 0}
.bl-hide { white-space: nowrap}
.bl-auto { grid-column: 3 / 5}
@media (max-width: 760px) {
  .bl-row { grid-template-columns: 1fr 1fr}
  .bl-preview { grid-column: 1 / -1}
  .bl-auto { grid-column: auto}
}

/* ===== Lot suggestions : modèles, statistiques, calendrier, pages publiques, mobile ===== */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px}
.tpl-card { display: flex; flex-direction: column; gap: 12px}
.tpl-top { display: flex; align-items: center; gap: 10px}
.tpl-top h2 { margin: 0; font-size: 18px}
.tpl-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red)}
.tpl-tree { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-2)}
.tpl-cat b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 3px}
.tpl-cat span { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 1px 0 1px 6px; color: var(--text)}
.tpl-cat svg { width: 14px; height: 14px; color: var(--dim)}
.tpl-roles { display: flex; flex-wrap: wrap; gap: 6px}
.tpl-roles span { font-size: 12px; padding: 2px 8px; border-radius: 99px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent)}
.tpl-opts { display: flex; flex-wrap: wrap; gap: 6px}
.tpl-card .btn { margin-top: auto; justify-content: center}

.hm-wrap { overflow-x: auto}
.hm { display: grid; grid-template-columns: 38px repeat(24, minmax(16px, 1fr)); gap: 3px; min-width: 560px}
.hm-h { font-size: 10px; color: var(--dim); text-align: center}
.hm-d { font-size: 11px; color: var(--muted); align-self: center}
.hm-c { aspect-ratio: 1; border-radius: 3px; background: color-mix(in srgb, var(--red) calc(var(--a) * 100%), var(--panel-3))}
.gr-bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 8px}
.gr-col { flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 1px}
.gr-col span { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px}
.gr-in, .gr-key-in { background: #22c55e}
.gr-out, .gr-key-out { background: var(--red)}
.gr-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle}

.cal-head { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 12px}
.cal-head h2 { margin: 0; text-transform: capitalize; min-width: 180px; text-align: center}
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px}
.cal-dow { font-size: 12px; color: var(--muted); text-align: center; padding: 4px 0}
.cal-day { min-height: 104px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; gap: 3px; background: var(--bg-2); min-width: 0}
.cal-empty { border-color: transparent; background: none}
.cal-today { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red)}
.cal-num { font-size: 12px; font-weight: 700; color: var(--muted)}
.cal-today .cal-num { color: var(--red)}
.cal-ev { font-size: 11px; line-height: 1.3; padding: 2px 5px; border-radius: 4px; background: var(--panel-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis}
.cal-ev em { font-style: normal; color: var(--dim)}
.cal-event { background: color-mix(in srgb, #3b82f6 22%, var(--panel-2))}
.cal-giveaway { background: color-mix(in srgb, #a855f7 22%, var(--panel-2))}
.cal-birthday { background: color-mix(in srgb, #ec4899 22%, var(--panel-2))}
.cal-announce { background: color-mix(in srgb, #f59e0b 20%, var(--panel-2))}
.cal-more { font-size: 11px; color: var(--muted)}
@media (max-width: 760px) {
  .cal-day { min-height: 60px; padding: 4px}
  .cal-ev { font-size: 0; padding: 0; height: 5px}
  .cal-more { font-size: 9px}
}

.hist-search { display: flex; align-items: center; gap: 8px}
.hist-search input[type=search] { flex: 1; min-width: 0}
.hist-search svg { color: var(--muted); flex: none}
.ops-events { display: flex; flex-direction: column; gap: 4px; margin: 10px 0}
.ops-ev { font-size: 12.5px; color: var(--muted)}
.ops-ev b { text-transform: uppercase; font-size: 11px; margin-right: 4px}
.ops-crash b, .ops-error b { color: #ef4444}
.ops-ev em { color: var(--dim); font-style: normal; margin-left: 4px}
.card-sub { font-size: 14px; margin: 14px 0 4px}
.chips-sm .chip { font-size: 12px; padding: 3px 8px}

.pub-wrap { width: 100%; box-sizing: border-box; max-width: 980px; margin: 0 auto; padding: 32px 16px 60px}
.pub-wrap h1 { font-size: 32px; margin: 0 0 6px}
.rk-list { display: flex; flex-direction: column; gap: 10px; margin-top: 22px}
.rk-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--panel) 88%, transparent)}
.rk-pos { font-weight: 800; font-size: 18px; width: 44px; text-align: center; color: var(--muted); flex: none}
.rk-top1 { color: #fbbf24}
.rk-top2 { color: #d1d5db}
.rk-top3 { color: #d97706}
.rk-icon { width: 56px; height: 56px; border-radius: 14px; flex: none; object-fit: cover}
.rk-noicon { display: grid; place-items: center; background: var(--panel-3); font-weight: 800; font-size: 22px}
.rk-body { flex: 1; min-width: 0}
.rk-body h2 { margin: 0; font-size: 17px}
.rk-body p { margin: 3px 0 6px; color: var(--muted); font-size: 13.5px}
.rk-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--muted)}
.rk-meta span { display: inline-flex; align-items: center; gap: 4px}
.rk-meta svg { width: 14px; height: 14px}
.rk-tag { padding: 1px 8px; border-radius: 99px; background: var(--panel-3)}
@media (max-width: 600px) {
  .rk-card { flex-wrap: wrap}
  .rk-pos { width: auto}
  .rk-card .btn { width: 100%; justify-content: center}
}
.st-head { display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel)}
.st-head h1 { font-size: 24px; margin: 0}
.st-head p { margin: 2px 0 0}
.st-dot { width: 16px; height: 16px; border-radius: 50%; flex: none}
.st-ok .st-dot { background: #22c55e; box-shadow: 0 0 0 6px rgba(34, 197, 94, .18)}
.st-down .st-dot { background: #ef4444; box-shadow: 0 0 0 6px rgba(239, 68, 68, .18)}
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 14px}
.st-box { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel)}
.st-box span { display: block; font-size: 12px; color: var(--muted)}
.st-box b { font-size: 20px}
.st-title { margin: 28px 0 10px; font-size: 18px}
.st-events { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden}
.st-ev { display: grid; grid-template-columns: 26px 130px 1fr auto; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--panel); font-size: 13.5px}
.st-ev:first-child { border-top: 0}
.st-ev-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: #71717a; margin: 0 auto } .st-ev-dot.ok { background: #23a55a } .st-ev-dot.bad { background: #ff5a1f }
.st-ev em { color: var(--muted); font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.st-ev time { color: var(--dim); font-size: 12px}
@media (max-width: 600px) {
  .st-ev { grid-template-columns: 26px 1fr auto}
  .st-ev em { display: none}
}

.mob-nav { display: none}
@media (max-width: 860px) {
  .mob-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--panel); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom))}
  .mob-nav a, .mob-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); background: none; border: 0; padding: 4px 0; text-decoration: none; cursor: pointer; font-family: inherit}
  .mob-nav svg { width: 20px; height: 20px}
  .mob-nav .on { color: var(--red)}
  .main { padding-bottom: 76px}
  .savebar { bottom: calc(64px + env(safe-area-inset-bottom))}
}

/* ===== Niveaux, Paramètres et préférences d'affichage ===== */
.lvl-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: rgba(0, 0, 0, .86)}
.lvl-box { width: min(980px, 100%); padding: 32px; border-radius: 18px; background: var(--panel); border: 1px solid var(--border-2); text-align: center; box-shadow: 0 30px 80px -30px #000}
.lvl-box h1 { font-size: 28px; margin: 12px 0 6px}
.lvl-box > p { max-width: 620px; margin: 0 auto 22px}
.lvl-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--red); background: var(--red-soft); border: 1px solid var(--red-line)}
.lvl-badge svg { width: 14px; height: 14px}
.lvl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px}
.lvl-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; text-align: left; border-radius: 14px; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--text); cursor: pointer; font: inherit; transition: border-color .1s, background .1s}
.lvl-card:hover { border-color: var(--red-line); background: var(--panel-2)}
.lvl-card.is-loading { border-color: var(--red); background: var(--red-soft)}
.lvl-card.is-loading .lvl-count::after { content: " · préparation…"; color: var(--red)}
.lvl-busy .lvl-card:not(.is-loading) { opacity: .45; pointer-events: none}
.lvl-card.on { border-color: var(--red); background: var(--red-soft)}
.lvl-card b { font-size: 19px}
.lvl-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red)}
.lvl-simple .lvl-icon { background: rgba(34, 197, 94, .14); color: #22c55e}
.lvl-normal .lvl-icon { background: rgba(59, 130, 246, .14); color: #3b82f6}
.lvl-desc { font-size: 13.5px; color: var(--muted); line-height: 1.45}
.lvl-count { font-size: 12.5px; font-weight: 600; color: var(--text); margin-top: auto}
.lvl-mods { font-size: 11.5px; color: var(--dim); line-height: 1.4}
.lvl-reco { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--red); color: #fff}
.lvl-grid-inline { margin-top: 10px}
@media (max-width: 760px) {
  .lvl-grid { grid-template-columns: 1fr}
  .lvl-box { padding: 22px 16px}
  .lvl-box h1 { font-size: 22px}
}
.nav-more { display: flex; align-items: center; gap: 8px; margin: 10px 6px 4px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; color: var(--muted); border: 1px dashed var(--border-2); text-decoration: none}
.nav-more:hover { color: var(--text); border-color: var(--red-line)}
.nav-more svg { width: 14px; height: 14px}

.set-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); scrollbar-width: none}
.set-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap}
.set-tabs a svg { width: 16px; height: 16px}
.set-tabs a:hover { color: var(--text); background: var(--panel-2)}
.set-tabs a.on { color: var(--text); background: var(--panel-3)}
.set-themes { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr))}

/* Densité, taille du menu, animations */
[data-density="compact"] .card { padding: 14px 16px}
[data-density="compact"] .field { margin-bottom: 10px}
[data-density="compact"] .nav-item { padding-top: 5px; padding-bottom: 5px}
[data-density="large"] .card { padding: 26px 28px}
[data-density="large"] .field { margin-bottom: 20px}
[data-sidebar="compact"] .nav-item { padding-top: 4px; padding-bottom: 4px; font-size: 13px}
[data-sidebar="compact"] .nav-label { margin-top: 10px}
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important}

/* ===== Santé, démo, assistant, docs, support ===== */
.card.health { display: flex; flex-direction: row; align-items: center; gap: 22px}
.health-ring { --p: 0; --c: var(--red); flex: none; width: 108px; height: 108px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--panel) 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--panel-3) 0)}
.health-ring b { font-size: 30px; line-height: 1}
.health-ring span { font-size: 12px; color: var(--muted)}
.health-body { flex: 1; min-width: 0}
.health-tips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px}
.health-pts { display: inline-block; min-width: 34px; font-size: 11.5px; font-weight: 700; color: #22c55e}
@media (max-width: 600px) { .card.health { flex-direction: column; align-items: flex-start} }

.demo-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--red-soft); border: 1px solid var(--red-line); font-size: 13.5px}
.demo-banner span { flex: 1; min-width: 0}
.demo-banner svg { color: var(--red); flex: none}

.setup-box { max-width: 900px; margin: 10px auto; text-align: center}
.setup-box h1 { font-size: 26px; margin: 12px 0 6px}
.setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 20px 0 14px; text-align: left}
.setup-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--bg-2); cursor: pointer}
.setup-card input { position: absolute; opacity: 0; pointer-events: none}
.setup-card:has(input:checked) { border-color: var(--red); background: var(--red-soft)}
.setup-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px}
.setup-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px}

.docs-search { width: 100%; margin: 14px 0 10px}
.docs-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px}
.docs-toc a { font-size: 13px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); text-decoration: none}
.docs-toc a:hover { color: var(--text); border-color: var(--red-line)}
.docs-cat { margin: 30px 0 10px; font-size: 20px}
.docs-mod { padding: 16px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--panel) 90%, transparent)}
.docs-head { display: flex; align-items: center; gap: 12px}
.docs-head > div { flex: 1; min-width: 0}
.docs-head h3 { margin: 0; font-size: 16px}
.docs-head p { margin: 2px 0 0; font-size: 13.5px}
.docs-lvl { font-size: 11.5px; padding: 2px 9px; border-radius: 99px; background: var(--panel-3); color: var(--muted); flex: none}
.docs-cmds { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; font-size: 13.5px}
.docs-cmds code { color: var(--red)}
.docs-cmds span { color: var(--muted)}
.docs-sub { padding-left: 18px; font-size: 12.5px}

.support-wrap form { margin-top: 18px}
.sup-item { border-top: 1px solid var(--border); background: var(--panel)}
.sup-item:first-child { border-top: 0}
.sup-item summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; font-size: 13.5px}
.sup-item summary b { flex: 1}
.sup-item time { color: var(--dim); font-size: 12px}
.sup-item > p, .sup-answer { margin: 0 14px 12px; font-size: 13.5px}
.sup-answer { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border-left: 3px solid var(--red)}
.sup-answer p { margin: 4px 0 0; white-space: pre-wrap}
.sup-st { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--panel-3)}
.sup-answered { background: rgba(34, 197, 94, .16); color: #22c55e}

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px}
@keyframes spin { to { transform: rotate(360deg); } }

/* Réglages avancés des modules */
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px}
.more-wide { grid-column: 1 / -1}
.unit-input { display: flex; align-items: center; gap: 8px}
.unit-input input { flex: 1; min-width: 0}
.unit-input span { color: var(--muted); font-size: 13px; flex: none}
@media (max-width: 760px) { .more-grid { grid-template-columns: 1fr} }

/* Membres, fiche membre, problèmes de module, notes, objectif, favoris */
.mb-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center}
.mb-toolbar input[type=search] { flex: 1; min-width: 200px}
.mb-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; margin-bottom: 10px; border-radius: 10px; background: var(--red-soft); border: 1px solid var(--red-line)}
.mb-head, .mb-row { display: grid; grid-template-columns: 30px minmax(0, 2.4fr) repeat(5, minmax(0, 1fr)); gap: 8px; align-items: center}
.mb-head { padding: 0 8px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border)}
.mb-row { padding: 8px; border-bottom: 1px solid var(--border); font-size: 13.5px}
.mb-row.on { background: var(--red-soft)}
.mb-user { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none}
.mb-user img { width: 34px; height: 34px; border-radius: 50%; flex: none}
.mb-user span { display: flex; flex-direction: column; min-width: 0}
.mb-user b, .mb-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap}
.mb-user small { color: var(--muted)}
.mb-user:hover b { color: var(--red)}
.mb-warn { color: #f59e0b; font-weight: 700}
.mb-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 10px}
@media (max-width: 760px) { .mb-head span:nth-child(n+4), .mb-row > span:nth-child(n+4) { display: none} .mb-head, .mb-row { grid-template-columns: 30px minmax(0, 1fr) 70px} }
.mf-head { display: flex; align-items: center; gap: 18px; margin-top: 10px; background: linear-gradient(90deg, var(--panel) 40%, transparent), var(--banner, none) center / cover}
.mf-avatar { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--border-2)}
.mf-id h1 { margin: 0; font-size: 24px}
.mf-id p { margin: 3px 0}
.mf-alert { color: #f59e0b; font-weight: 600}
.mf-roles { display: flex; flex-wrap: wrap; gap: 6px}
.mf-role { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); color: var(--c); font-size: 12.5px}
.mf-role button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0}
.mf-log { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto; margin-top: 8px; font-size: 13.5px}
.mf-log p { margin: 2px 0 0}
.mf-actions { display: flex; flex-wrap: wrap; gap: 8px}
.mod-problems, .team-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px}
.mod-problems { background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .4)}
.mod-problems svg { color: #f59e0b; flex: none}
.mod-problems ul { margin: 4px 0 0; padding-left: 18px}
.team-note { background: var(--panel-2); border: 1px dashed var(--border-2)}
[data-fav].on { color: #fbbf24}
[data-fav].on svg { fill: currentColor}
.goal-top { display: flex; justify-content: space-between; align-items: center}
.goal-bar { height: 10px; border-radius: 99px; background: var(--panel-3); overflow: hidden; margin: 8px 0}
.goal-bar span { display: block; height: 100%; background: var(--red); border-radius: 99px}
.trend { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 4px}
.trend.up { color: #22c55e}
.trend.down { color: #ef4444}
.hero-img { padding: 22px; border-radius: 16px; background: linear-gradient(90deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, .2)), var(--hero) center / cover}
.sel-create { display: block; width: 100%; padding: 9px 12px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--red); font: inherit; font-size: 13px; text-align: left; cursor: pointer}
.sel-create:hover { background: var(--panel-3)}
.row-drag { cursor: grab; color: var(--dim); display: inline-flex}
.row-drag svg { width: 16px; height: 16px}
.dragging-row { opacity: .5}
.crumbs a { color: inherit; text-decoration: none}
.crumbs a:hover { color: var(--text)}
.health-alerts { margin-bottom: 8px}
.health-minus { color: #ef4444}

/* Fenêtres, raccourcis, mode focus, visite guidée, éditeur de thème */
.pw-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6)}
.pw-box { width: min(620px, 100%); max-height: 80vh; overflow: auto; border-radius: 14px; background: var(--panel); border: 1px solid var(--border-2)}
.pw-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border)}
.pw-body { padding: 14px 16px}
.pw-diff { width: 100%; border-collapse: collapse; font-size: 13.5px}
.pw-diff td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top}
.pw-diff .old { color: #ef4444; text-decoration: line-through}
.pw-diff .new { color: #22c55e}
kbd { padding: 2px 6px; border-radius: 5px; background: var(--panel-3); border: 1px solid var(--border-2); font-family: var(--mono); font-size: 12px}
.focus-mode #sidebar, .focus-mode .topbar, .focus-mode .mob-nav { display: none !important}
.focus-mode .main { margin-left: 0 !important; padding-left: 24px}
.pw-tour { position: fixed; z-index: 310; width: 320px; padding: 14px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--red-line); box-shadow: 0 20px 50px -20px #000; font-size: 13.5px}
.pw-tour p { margin: 6px 0 10px; color: var(--muted)}
.pw-tour div { display: flex; align-items: center; gap: 8px}
.pw-tour div span { flex: 1}
.pw-spot { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 10px; position: relative; z-index: 305}
.theme-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 10px}
.theme-editor label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted)}
.theme-editor input[type=color] { width: 36px; height: 30px; padding: 0; border: 1px solid var(--border-2); border-radius: 6px; background: none}
.has-user-bg body { background-image: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)), var(--user-bg); background-size: cover; background-attachment: fixed; background-position: center}

/* Champs de recherche : même style que les autres champs */
input[type=search] { width: 100%; padding: 11px 13px; border: 1px solid var(--border-2); border-radius: 6px; background: #000; color: var(--text); font: 14px 'Inter', sans-serif; outline: none; transition: .15s; -webkit-appearance: none; appearance: none; }
input[type=search]:hover { border-color: #3d3d47; }
input[type=search]:focus { border-color: var(--red-line); }
input[type=search]::-webkit-search-cancel-button { filter: invert(.6); cursor: pointer; }
/* Recherche de l'historique : une seule ligne, loupe dans le champ */
.card.hist-search { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; position: relative; }
.card.hist-search > svg { position: absolute; left: 25px; top: 32px; transform: translateY(-50%); width: 16px; height: 16px; color: var(--dim); pointer-events: none; }
.card.hist-search input[type=search] { flex: 1 1 260px; width: auto; padding-left: 38px; }
.card.hist-search select { flex: 0 0 200px; width: 200px; }
.card.hist-search .sel { flex: 0 0 200px; }
.card.hist-search .btn { flex: none; height: 42px; }
@media (max-width: 600px) { .card.hist-search .sel, .card.hist-search select, .card.hist-search .btn { flex: 1 1 100%; width: 100%; } }
.vc-live { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.vc-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); color: inherit; text-decoration: none; min-width: 0; }
.vc-person:hover { border-color: var(--red-line); }
.vc-person img { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.vc-person span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.vc-person b, .vc-person small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-person small { color: var(--muted); font-size: 12px; }
.vc-person em { font-style: normal; flex: none; }

/* Calendrier : créneaux */
.cal-head { flex-wrap: wrap; }
.cal-book-btn { margin-left: auto; }
.cal-hint { text-align: center; margin: -4px 0 10px; }
.cal-day[data-book-day] { cursor: pointer; transition: border-color .12s; }
.cal-day[data-book-day]:hover { border-color: var(--red-line); }
.cal-booking { background: color-mix(in srgb, #3b82f6 26%, var(--panel-2)); }
.cal-modal { width: min(640px, 100%); }
.cal-agenda { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.cal-agenda-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; border-left: 3px solid var(--c); background: var(--panel-2); }
.cal-agenda-row > div { flex: 1; min-width: 0; }
.cal-agenda-row p { margin: 2px 0; }
.cal-agenda-time { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 92px; padding-top: 2px; }
.cal-form .grid-3 { gap: 10px; }
.cal-form-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
input[type=date], input[type=time] { width: 100%; padding: 10px 12px; border: 1px solid var(--border-2); border-radius: 6px; background: #000; color: var(--text); font: 14px 'Inter', sans-serif; color-scheme: dark; }

/* ---------- Créateur de commandes : blocs sobres (fond gris doux, couleur juste en accent) ---------- */
.cc-canvas { background-color: #15151b; background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) }
.cc-node {
  width: 236px; border-radius: 12px; border: 1px solid #2f2f3a; border-top-width: 1px; overflow: visible;
  background: #1e1e26; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .55), inset 3px 0 0 var(--g);
  transition: border-color .15s, box-shadow .2s, transform .12s }
.cc-node:hover { border-color: #3d3d4a; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6), inset 3px 0 0 var(--g) }
.cc-node.sel { border-color: color-mix(in srgb, var(--g) 70%, #2f2f3a); border-top-color: color-mix(in srgb, var(--g) 70%, #2f2f3a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 18%, transparent), inset 3px 0 0 var(--g) }
.cc-node.drag { box-shadow: 0 18px 36px -10px rgba(0, 0, 0, .65), inset 3px 0 0 var(--g); transform: scale(1.02) }
.cc-nh { display: flex; gap: 12px; align-items: center; padding: 12px 14px 12px 16px }
.cc-nh-ic {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--g) 14%, #1e1e26); border: 0; color: var(--g) }
.cc-nh-ic svg { width: 17px; height: 17px }
.cc-nh-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.25 }
.cc-nh-t b { font-size: 13.5px; font-weight: 600; color: #f1f1f4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.cc-node.hot .cc-nh-t b { color: #f1f1f4 }
.cc-nh-t .cc-ns { padding: 0; color: #9a9aa8; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.cc-btnprev, .cc-note { margin: 0 14px 12px 16px }
.cc-cond { padding: 0 14px 12px 16px; font: 600 10px var(--mono); letter-spacing: .08em; color: #9a9aa8 }
.cc-cond span { padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08) }
.cc-cond.cc-multi span { padding: 3px 4px }
/* Points de connexion : pastilles pleines, entourées de la couleur du fond */
.cc-port {
  width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--g, #60a5fa);
  box-shadow: 0 0 0 3px #15151b }
.cc-port.in { top: -6px; left: calc(50% - 5.5px) }
.cc-port.out { bottom: -6px; margin-left: 1.5px }
.cc-port.yes { background: #4ade80; box-shadow: 0 0 0 3px #15151b }
.cc-port.no { background: #f87171; box-shadow: 0 0 0 3px #15151b }
.cc-port.loop { background: var(--gold); box-shadow: 0 0 0 3px #15151b }
.cc-port:hover { transform: scale(1.35) }
/* Liens : trait fin et net (plus de pointillés qui défilent) */
.cc-edge { stroke: rgba(255, 255, 255, .22); stroke-width: 1.6; stroke-dasharray: none; animation: none }
.cc-edge.yes { stroke: rgba(34, 197, 94, .7) }
.cc-edge.no { stroke: rgba(248, 113, 113, .7) }
.cc-edge.loop { stroke: rgba(250, 204, 21, .7) }
.cc-edge.temp { stroke: var(--red-2); stroke-dasharray: 4 5 }
.cc-addcomp button { border-radius: 999px }

/* Listes qui défilent : les éléments gardent leur hauteur */
.queue-list > *, .lib-list > *, .takeover-list > * { flex-shrink: 0 }

/* ---------- Créateur de commandes : test dans un salon ---------- */
.cc-test { display: flex; flex-direction: column; gap: 10px }
.cc-test > .btn { align-self: flex-start }
.cc-test-err { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .3); color: #fca5a5 }
.cc-test-err span { color: var(--text); font-size: 13px }
.cc-test-sum { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--panel-2) }
.cc-test-sum > svg { width: 20px; height: 20px; flex-shrink: 0 }
.cc-test-sum.good > svg { color: #4ade80 } .cc-test-sum.bad > svg { color: #f87171 }
.cc-test-sum > div { flex: 1; min-width: 0 }
.cc-test-sum b { display: block; font-size: 14px }
.cc-test-sum small { color: var(--dim); font-size: 12px }
.cc-test-msg { margin: 0; padding: 8px 12px; border-radius: 8px; background: rgba(248, 113, 113, .08); color: #fca5a5; font-size: 13px }
.cc-tsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto }
.cc-ts { display: grid; grid-template-columns: 22px 18px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid transparent; cursor: pointer; font-size: 13px }
.cc-ts:hover { border-color: var(--border-2) }
.cc-ts-n { font: 600 11px var(--mono); color: var(--dim); text-align: right }
.cc-ts > svg { width: 15px; height: 15px }
.cc-ts.ok > svg { color: #4ade80 } .cc-ts.err > svg { color: #f87171 } .cc-ts.stop > svg { color: var(--muted) }
.cc-ts b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.cc-ts em { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--muted) }
.cc-ts small { color: var(--dim); font: 11px var(--mono) }
.cc-ts p { grid-column: 3 / -1; margin: 0; color: #fca5a5; font-size: 12.5px }
.cc-ts.err { border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .06) }
.cc-tvars summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0 }
.cc-tvars div { display: flex; gap: 10px; padding: 4px 0; font-size: 12.5px; border-bottom: 1px solid var(--border) }
.cc-tvars code { color: var(--muted); flex-shrink: 0 }
.cc-tvars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.cc-node.cc-tok::before, .cc-node.cc-terr::before { content: ''; position: absolute; top: -8px; right: -8px; width: 18px; height: 18px; border-radius: 50%; background: #4ade80 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23052e16' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; box-shadow: 0 0 0 3px #15151b; z-index: 2 }
.cc-node.cc-terr { border-color: rgba(248, 113, 113, .6) }
.cc-node.cc-terr::before { background: #f87171 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23450a0a' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / 10px no-repeat }

/* ---------- Créateur de commandes : mode clair ---------- */
.cc-editor.cc-light, .cc-modal.cc-light {
  --bg: #f4f4f6; --bg-2: #ffffff; --panel: #ffffff; --panel-2: #f3f3f6; --panel-3: #e9e9ee;
  --border: #e4e4ea; --border-2: #d4d4dc; --text: #17171c; --muted: #5d5d6b; --dim: #8a8a97;
  color: var(--text); color-scheme: light }
.cc-editor.cc-light { background: #f4f4f6 }
.cc-modal.cc-light { background: rgba(20, 20, 30, .35) }
.cc-modal.cc-light .cc-modal-box { background: #fff; border-color: #dcdce3; color: #17171c }
.cc-light .cc-canvas { background-color: #eef0f3; background-image: radial-gradient(rgba(0, 0, 0, .1) 1px, transparent 1px) }
.cc-light .cc-node { background: #ffffff; border-color: #dcdce3; box-shadow: 0 4px 14px -8px rgba(20, 20, 40, .25), inset 3px 0 0 var(--g) }
.cc-light .cc-node:hover { border-color: #c8c8d2; box-shadow: 0 8px 20px -10px rgba(20, 20, 40, .3), inset 3px 0 0 var(--g) }
.cc-light .cc-nh-ic { background: color-mix(in srgb, var(--g) 13%, #fff); color: color-mix(in srgb, var(--g) 80%, #000) }
.cc-light .cc-nh-t b, .cc-light .cc-node.hot .cc-nh-t b { color: #17171c }
.cc-light .cc-nh-t .cc-ns, .cc-light .cc-cond { color: #6b6b78 }
.cc-light .cc-cond span { background: rgba(0, 0, 0, .04); border-color: rgba(0, 0, 0, .08) }
.cc-light .cc-port, .cc-light .cc-port.yes, .cc-light .cc-port.no, .cc-light .cc-port.loop, .cc-light .cc-node.cc-tok::before, .cc-light .cc-node.cc-terr::before { box-shadow: 0 0 0 3px #eef0f3 }
.cc-light .cc-edge { stroke: rgba(0, 0, 0, .28) }
.cc-editor.cc-light input, .cc-editor.cc-light select, .cc-editor.cc-light textarea, .cc-modal.cc-light input, .cc-modal.cc-light select, .cc-modal.cc-light textarea { background-color: #fff !important; color: #17171c !important; border-color: #d4d4dc !important }
.cc-light .cc-addcomp button { background: #fff; color: #17171c; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .25) }
.cc-light .cc-ts em { background: rgba(0, 0, 0, .05) }
.cc-light .btn-ghost, .cc-light .icon-btn { color: #2a2a33 !important; background: #fff !important; border-color: #d4d4dc !important }
.cc-light .btn-ghost:hover, .cc-light .icon-btn:hover { background: #f1f1f5 !important; color: #17171c !important }
.cc-light .btn-ghost svg, .cc-light .icon-btn svg { color: inherit; opacity: 1 }
.cc-light .cc-ts p, .cc-light .cc-test-msg, .cc-light .cc-test-err { color: #dc2626 }

/* ---------- Créateur de commandes : variables, stats, historique, galerie ---------- */
.cc-vac { position: fixed; z-index: 200; display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--panel-2); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); max-height: 240px; overflow-y: auto }
.cc-vac[hidden] { display: none }
.cc-vac button { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit }
.cc-vac button.on, .cc-vac button:hover { background: var(--panel-3) }
.cc-vac code { font: 600 12.5px var(--mono); color: var(--red-2); white-space: nowrap }
.cc-vac small { color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.cc-vac p { margin: 4px 6px 2px; color: var(--dim); font-size: 10.5px }
.cc-spark { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; font: 12px var(--font, inherit); flex-shrink: 0 }
.cc-spark:hover { border-color: var(--border-2); background: var(--panel-2) }
.cc-spark-svg { width: 56px; height: 18px; fill: color-mix(in srgb, var(--red) 70%, var(--muted)) }
.cc-spark b { color: var(--text) }
.cc-spark em { font-style: normal; color: #f87171 }
.cc-pub-on { color: #4ade80 !important }
.cc-st { display: flex; flex-direction: column; gap: 12px }
.cc-st-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px }
.cc-st-nums div { padding: 10px 12px; border-radius: 10px; background: var(--panel-2) }
.cc-st-nums b { display: block; font-size: 20px }
.cc-st-nums small { color: var(--dim); font-size: 11.5px }
.cc-st-nums .bad b { color: #f87171 } .cc-st-nums .mid b { color: #fbbf24 } .cc-st-nums .good b { color: #4ade80 }
.cc-st-bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding: 8px; border-radius: 10px; background: var(--panel-2) }
.cc-st-bars span { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end }
.cc-st-bars i { display: block; width: 100%; height: max(2px, var(--h)); border-radius: 3px; background: var(--red) }
.cc-st-bars em { position: absolute; top: -2px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #f87171 }
.cc-st-h { font-size: 13.5px }
.cc-st-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; background: var(--panel-2); font-size: 13px }
.cc-st-user > span { width: 16px; color: var(--dim); font: 600 11px var(--mono) }
.cc-st-user img, .cc-st-user > i { width: 24px; height: 24px; border-radius: 50%; background: var(--panel-3) }
.cc-st-user b { flex: 1; font-weight: 600 }
.cc-st-user small { color: var(--muted) }
.cc-hist { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto }
.cc-hist-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2) }
.cc-hist-row > div { flex: 1; min-width: 0 }
.cc-hist-row b { display: block; font-size: 13.5px }
.cc-hist-row small { color: var(--dim); font-size: 12px }
.cc-hist-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-2); flex-shrink: 0 }
.cc-hist-row:first-child .cc-hist-dot { background: var(--red) }
@media (max-width: 760px) { .cc-spark { order: 3 } }


/* Unité (h, %, min…) dans le champ : tous les champs d'une grille ont la même largeur */
.unit-input { position: relative; display: block !important }
.unit-input > input { width: 100%; padding-right: 46px !important }
.unit-input > span:not(.kp-step-in) { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--muted); font: 600 12px var(--mono) }

/* ---------- Boutique de l'économie : lignes ajoutables ---------- */
.shop-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap }
.shop-count { margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--muted); font: 600 12px var(--mono) }
.shop-row { grid-template-columns: 28px minmax(0, 1.2fr) 130px minmax(0, 1.2fr) minmax(0, 1.6fr) 40px !important }
.shop-row > input, .shop-row .unit-input input, .shop-row .sel-btn { height: 44px }
.shop-num { color: var(--dim); font: 600 12px var(--mono); text-align: center }
.shop-del { width: 40px; height: 40px; color: var(--dim) }
.shop-del:hover { color: #f87171; border-color: rgba(248, 113, 113, .4) }
.shop-new { animation: shopIn .25s ease }
@keyframes shopIn { from { opacity: 0; transform: translateY(-4px) } }
.shop-addline { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px dashed var(--border-2); background: none; color: var(--muted); font: 600 13px inherit; cursor: pointer; transition: border-color .15s, color .15s, background .15s }
.shop-addline:hover:not(:disabled) { border-color: var(--red-line); color: var(--text); background: var(--red-soft) }
.shop-addline:disabled, #shopAdd:disabled { opacity: .45; cursor: not-allowed }
.shop-addline svg { width: 16px; height: 16px }
@media (max-width: 860px) {
  .shop-row { grid-template-columns: 24px minmax(0, 1fr) 110px 40px !important; padding: 10px 0; border-bottom: 1px solid var(--border) }
  .shop-row > .sel, .shop-row > [name=shopDesc] { grid-column: 2 / -1 }
  .shop-head { display: none !important }
}
.unit-input:has(.kp-step-in) { display: flex !important; align-items: center; gap: 8px }

.shop-addline { box-sizing: border-box }
.shop-row { grid-template-columns: 28px minmax(0, 1.3fr) 140px minmax(0, 1.1fr) minmax(0, 1.4fr) 40px !important }
.shop-addline { width: auto !important; margin-left: 0; margin-right: 0 }
/* L'animation d'arrivée ne doit pas laisser de transform : sinon la barre fixe se place par rapport au formulaire */
.kp .content > .module-form, .kp .content > form { animation-fill-mode: backwards !important }
/* Champs nombre avec − / + : pleine largeur, l'unité à l'intérieur, à gauche du + */
.field .kp-step-in, .more-grid .kp-step-in { display: flex !important; width: 100% !important }
.field .kp-step-in input, .more-grid .kp-step-in input { flex: 1; min-width: 0; text-align: center; padding-right: 0 !important }
.unit-input:has(.kp-step-in) { position: relative; display: block !important }
.unit-input:has(.kp-step-in) > span:not(.kp-step-in) { position: absolute; right: 46px; top: 50%; transform: translateY(-50%) }
.kp .shop-top .card-title > svg { display: none } .shop-top { display: flex !important; align-items: center; justify-content: space-between; gap: 12px }
/* Réglages avancés : les interrupteurs alignés sur les champs (pas de double marge) */
.kp .module-form .card .more-grid .field-inline { margin: 0 !important }
/* Carte hors formulaire (ex. panneau banque) : même largeur et même en-tête que les cartes du formulaire */
.kp .content > .kp-formcard { max-width: 1080px; width: 100%; padding: 0 0 20px; box-sizing: border-box }
.kp .content > .kp-formcard > * { margin-left: 24px; margin-right: 24px }
.kp .content > .kp-formcard > .card-title { margin: 0 0 14px; padding: 18px 24px; border-bottom: 1px solid var(--border); font-size: 17px }
.kp .content > .kp-formcard > .card-title svg { display: none }
/* Les messages (« Modifications enregistrées »…) s'affichent au-dessus du bouton de l'assistant IA */
.toast { bottom: 90px; right: 24px }
@media (max-width: 860px) { .toast { bottom: calc(150px + env(safe-area-inset-bottom)); right: 16px; left: 16px; max-width: none } }


/* ---------- Barre d'enregistrement ----------
   Toujours au même endroit, en bas du contenu. Seul son état change :
   à jour (neutre) · modifiée (Annuler / Enregistrer en rouge) · enregistrée (vert, quelques secondes). */
.savebar {
  position: fixed !important; z-index: 70; bottom: 20px; right: auto;
  left: calc(var(--sidebar) + (100vw - var(--sidebar)) / 2); transform: translateX(-50%);
  width: min(720px, calc(100vw - var(--sidebar) - 180px)); margin: 0 !important;
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px !important;
  border-radius: 12px !important; border: 1px solid var(--border-2) !important; background: #141417 !important;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .7) !important; animation: none !important; backdrop-filter: none;
  transition: border-color .2s, background .2s }
.savebar-text { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; color: var(--dim) }
.savebar-text > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.savebar-text svg, .savebar-text [data-lucide] { width: 16px; height: 16px; flex-shrink: 0 }
.savebar .sb-ic-dirty, .savebar .txt-dirty, .savebar .txt-saved, .savebar .reset-btn, .savebar [data-show-diff] { display: none !important }
.savebar .sb-ic-clean { display: block !important; color: var(--dim) }
.savebar .txt-clean { display: inline }
.savebar .save-btn { height: 36px; padding: 0 16px; border-radius: 9px; background: var(--panel-3) !important; color: var(--text) !important; border: 1px solid var(--border-2) !important; box-shadow: none !important }
/* Modifiée */
.savebar.dirty { border-color: color-mix(in srgb, var(--red) 50%, var(--border-2)) !important }
.savebar.dirty .savebar-text { color: var(--text) }
.savebar.dirty .sb-ic-clean, .savebar.dirty .txt-clean, .savebar.dirty .txt-saved { display: none !important }
.savebar.dirty .sb-ic-dirty { display: block !important; color: var(--red-2) }
.savebar.dirty .txt-dirty { display: inline !important }
.savebar.dirty .reset-btn, .savebar.dirty [data-show-diff] { display: inline-flex !important; height: 36px }
.savebar.dirty .save-btn { background: var(--red) !important; border-color: var(--red) !important; color: #fff !important }
/* Enregistrée (après le rechargement) */
.savebar.just-saved:not(.dirty) { border-color: rgba(74, 222, 128, .45) !important }
.savebar.just-saved:not(.dirty) .savebar-text, .savebar.just-saved:not(.dirty) .sb-ic-clean { color: #4ade80 !important }
.savebar.just-saved:not(.dirty) .txt-clean { display: none }
.savebar.just-saved:not(.dirty) .txt-saved { display: inline !important }
/* Pendant l'envoi : le bouton garde sa place et son texte */
.savebar .save-btn.loading { color: #fff !important }
.savebar .save-btn.loading svg { visibility: hidden }
.savebar .save-btn.loading::after { left: 14px }
@media (max-width: 1180px) { .savebar.dirty [data-show-diff] { display: none !important } }
@media (max-width: 860px) {
  .savebar { left: 50%; width: calc(100vw - 24px); bottom: calc(76px + env(safe-area-inset-bottom)) }
}

/* Messages : sobres, sans effet */
.toast { bottom: 84px; border-radius: 10px !important; border: 1px solid var(--border-2) !important; border-left: 1px solid var(--border-2) !important; background: #141417 !important; padding: 11px 14px !important; font-size: 13.5px; font-weight: 500 }
.toast > svg, .toast > [data-lucide] { width: 16px; height: 16px }
/* Rien à enregistrer : la barre est cachée. Elle glisse dès qu'il y a une modification, ou quelques secondes après l'enregistrement. */
.savebar { transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .3, 1.1), border-color .2s !important }
.savebar:not(.dirty):not(.just-saved) { opacity: 0; transform: translate(-50%, 24px); pointer-events: none; visibility: hidden; transition: opacity .25s, transform .3s, visibility 0s .3s !important }
/* Boutons à icône : pas de marge intérieure du navigateur, icône bien centrée */
.icon-btn, .np-play { padding: 0 !important }
.np-controls .icon-btn > svg { display: block; margin: 0 }
.np-controls .icon-btn { width: 36px; height: 36px; border-radius: 9px }
.np-controls .icon-btn > svg { width: 18px; height: 18px }
.np-play > svg { width: 22px; height: 22px; display: block; margin: 0 }

/* ---------- Image de fond du panel (dashboard connecté) ---------- */
:root:not([data-theme]) body:has(.app.kp) {
  background: #000 url('/panel-bg.svg') center / cover no-repeat fixed;
}
/* Les zones du panel laissent voir le fond (les cartes gardent le leur) */
:root:not([data-theme]) .app.kp, :root:not([data-theme]) .app.kp > .main, :root:not([data-theme]) .app.kp .content { background: transparent !important }

/* ---------- Créateur de commandes : unslop (gris neutres, couleur réservée aux blocs du plan) ---------- */
/* Liste : encadré « Créer » avec un vrai mini-plan */
.cc-hero { min-height: 340px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); align-items: center; gap: 32px; padding: 32px 40px; border: 1px solid rgba(237, 237, 237, .08); border-radius: 14px; background-color: #19191b; background-image: radial-gradient(rgba(237, 237, 237, .07) 1px, transparent 1px); background-size: 20px 20px; place-items: initial }
.cc-hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 420px }
.cc-hero-text h2 { margin: 0; font-family: inherit; font-stretch: normal; font-size: 28px; font-weight: 500; letter-spacing: -.01em; color: #ededed }
.cc-hero-text p { margin: 0; color: #a1a1a6; font-size: 15px; line-height: 1.5 }
.cc-hero-text .btn { margin-top: 8px }
.cc-hero-plan { position: relative; height: 300px }
.cc-hero-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible }
.cc-hero-wires path { fill: none; stroke: rgba(237, 237, 237, .22); stroke-width: 1.5; vector-effect: non-scaling-stroke }
.cc-hero-wires path.yes { stroke: rgba(76, 195, 138, .6) } .cc-hero-wires path.no { stroke: rgba(229, 72, 77, .55) }
.cc-hn { position: absolute; display: flex; align-items: center; gap: 10px; width: 152px; padding: 10px 12px; border-radius: 10px; background: #1e1e21; border: 1px solid rgba(237, 237, 237, .1); box-shadow: inset 2px 0 0 var(--tone), 0 8px 20px -12px rgba(0, 0, 0, .7) }
.cc-hn > svg { width: 16px; height: 16px; stroke-width: 1.75; color: var(--tone); flex-shrink: 0 }
.cc-hn b { display: block; font-size: 12.5px; font-weight: 500; color: #ededed; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cc-hn small { display: block; font-size: 11px; color: #85858b; margin-top: 2px }
.cc-hn > span { min-width: 0 }
.cc-hn.t-red { --tone: #ff5a1f } .cc-hn.t-amber { --tone: #e0a33a } .cc-hn.t-green { --tone: #4cc38a } .cc-hn.t-blue { --tone: #6a9ef0 }
.cc-hn.t-red b { font-family: var(--mono); }
@media (max-width: 900px) { .cc-hero { grid-template-columns: 1fr; padding: 24px } .cc-hero-plan { display: none } }
/* Modèles prêts et liste des commandes */
.cc-tpl { min-height: 52px; padding: 8px 12px; border-radius: 10px; background: none; border: 1px solid rgba(237, 237, 237, .08) }
.cc-tpl b { font-weight: 500 } .cc-tpl-ic { width: 32px; height: 32px; border-radius: 8px; background: #232325; color: #a1a1a6 } .cc-tpl-ic svg { stroke-width: 1.75 }
.cc-row-ic { width: 32px; height: 32px; border-radius: 8px; background: #232325; color: #a1a1a6; border: 1px solid rgba(237, 237, 237, .08); font: 500 14px var(--mono) }
.cc-row-info b { font-family: var(--mono); font-weight: 500 }
.cc-spark-svg { fill: #3a3a3e } .cc-spark em { color: #e5484d }
.cc-h2 { font-weight: 500 }
/* Éditeur : barre du haut */
.cc-etop { background: #141415; border-bottom: 1px solid rgba(237, 237, 237, .08) }
.cc-etitle b { font-weight: 500 }
.cc-badge { font: 400 12px var(--mono); background: none; color: #e5484d; padding: 0; border-radius: 0 }
/* Éditeur : colonne de boutons, sans pastilles de couleur */
.cc-rail { gap: 4px; padding: 12px 0; background: #0f0f10; border-right: 1px solid rgba(237, 237, 237, .08) }
.cc-rail button { width: 36px; height: 36px; border-radius: 8px; background: none; color: #85858b; box-shadow: none; transition: background-color .15s cubic-bezier(.22, 1, .36, 1), color .15s cubic-bezier(.22, 1, .36, 1) }
.cc-rail button:hover { transform: none; background: #19191b; color: #ededed }
.cc-rail button.on { background: #232325; color: #ededed; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) }
.cc-rail svg { width: 18px; height: 18px; stroke-width: 1.75 }
/* Éditeur : colonnes de gauche et de droite */
.cc-left, .cc-right { background: #141415; padding: 16px }
.cc-left { border-right: 1px solid rgba(237, 237, 237, .08) } .cc-right { border-left: 1px solid rgba(237, 237, 237, .08) }
.cc-tabs { border-bottom: 1px solid rgba(237, 237, 237, .08) }
.cc-tabs button { font-weight: 500; color: #85858b; height: 36px; padding: 0 4px }
.cc-tabs button.on { color: #ededed; border-color: #ededed }
.cc-sec { margin: 16px 0 4px; font-size: 12px; color: #85858b }
.cc-item { min-height: 44px; padding: 6px 8px; border-radius: 8px; transition: background-color .12s cubic-bezier(.22, 1, .36, 1) }
.cc-item:hover { background: #19191b }
.cc-item b { font-weight: 500; color: #ededed } .cc-item small { color: #85858b; font-size: 12px }
.cc-item.hot b { color: #ededed }
.cc-item-ic { width: 28px; height: 28px; border-radius: 7px; background: #1e1e21; border: 0; color: var(--g); box-shadow: inset 0 0 0 1px rgba(237, 237, 237, .08) }
.cc-item-ic svg { width: 15px; height: 15px; stroke-width: 1.75 }
.cc-help, .cc-tip { background: #19191b; border: 1px solid rgba(237, 237, 237, .08); border-radius: 10px; color: #a1a1a6 }
.cc-tip svg { color: #85858b } .cc-tip.warn { border-color: rgba(229, 72, 77, .3); background: rgba(229, 72, 77, .06) } .cc-tip.warn svg { color: #e5484d }
.cc-insp-head h3 { font-weight: 500 }
.cc-slash span { background: #232325; border-color: rgba(237, 237, 237, .1); color: #a1a1a6; font-weight: 500 }
.cc-vars button { color: #a1a1a6; background: #1e1e21; border: 1px solid rgba(237, 237, 237, .08); border-radius: 6px; padding: 4px 8px; font-weight: 400 }
.cc-vars button:hover { color: #ededed; border-color: rgba(237, 237, 237, .2) }
.cc-insp-actions { border-top: 1px solid rgba(237, 237, 237, .08) }
/* Éditeur : plan de travail, couleur seulement sur les blocs et leurs fils */
.cc-canvas { background-color: #111112; background-image: radial-gradient(rgba(237, 237, 237, .07) 1px, transparent 1px) }
.cc-node { background: #1c1c1f; border-color: rgba(237, 237, 237, .1); box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .6), inset 2px 0 0 var(--g) }
.cc-node:hover { border-color: rgba(237, 237, 237, .18); box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .65), inset 2px 0 0 var(--g) }
.cc-node.sel { border-color: rgba(237, 237, 237, .45); box-shadow: 0 0 0 1px rgba(237, 237, 237, .2), inset 2px 0 0 var(--g) }
.cc-node.drag { transform: none }
.cc-nh-ic { width: 32px; height: 32px; border-radius: 8px; background: #232325; box-shadow: inset 0 0 0 1px rgba(237, 237, 237, .06) }
.cc-nh-ic svg { width: 16px; height: 16px; stroke-width: 1.75 }
.cc-nh-t b { font-weight: 500; color: #ededed } .cc-nh-t .cc-ns { color: #85858b }
.cc-cond { font: 400 11px var(--mono); letter-spacing: 0; text-transform: none; color: #85858b }
.cc-cond span { border-radius: 6px }
.cc-port { box-shadow: 0 0 0 3px #111112 } .cc-port.yes, .cc-port.no, .cc-port.loop { box-shadow: 0 0 0 3px #111112 }
.cc-port:hover { transform: scale(1.2) }
.cc-port.hot { animation: none; box-shadow: 0 0 0 3px #111112, 0 0 0 5px rgba(255, 90, 31, .35) }
.cc-canvas.linking .cc-port.in { animation: none; box-shadow: 0 0 0 3px #111112, 0 0 0 5px rgba(237, 237, 237, .25) }
.cc-node.pop { animation: ccpop2 .24s cubic-bezier(.22, 1, .36, 1) backwards }
@keyframes ccpop2 { from { opacity: 0; transform: translateY(6px) } }
.cc-node.flash { animation: none; border-color: rgba(237, 237, 237, .45) }
.cc-tools { background: #19191b; border-color: rgba(237, 237, 237, .1); border-radius: 10px }
.cc-edge.temp { stroke: rgba(237, 237, 237, .5) }
.cc-tip code, .cc-help code { color: #ededed; background: #232325; border-color: rgba(237, 237, 237, .08) }

/* Musique : effets, options, glisser-déposer de la file, statistiques */
.np-extra { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; padding-top: 14px; border-top: 1px solid var(--border) }
.np-extra-row { display: flex; align-items: flex-start; gap: 12px }
.np-extra-label { flex: 0 0 62px; padding-top: 6px; font-size: 12.5px; color: var(--muted) }
.np-chips { display: flex; flex-wrap: wrap; gap: 6px }
.np-chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-2); background: transparent; color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer }
.np-chip:hover { border-color: var(--muted) }
.np-chip.on { background: var(--red); border-color: var(--red); color: #fff }
.np-bar { cursor: pointer }
.card-title .q-clear { margin-left: auto }
.q-hint { margin: 8px 0 0; font-size: 12.5px }
.queue-item[draggable="true"] { cursor: grab }
.queue-item.dragging { opacity: .45 }
.queue-item.drop { box-shadow: inset 0 2px 0 var(--red) }
.mstats-sub { font-size: 12.5px; font-weight: 400; margin-left: 8px }
.mstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px }
.mstats-col h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted) }
.mstats-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px }
.mstats-list li { padding-left: 2px }
.mstats-list li > * { vertical-align: middle }
.mstats-name { display: inline-block; max-width: calc(100% - 46px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.mstats-list b { float: right; font-weight: 600; color: var(--muted) }
.music-grid > .mstats-card { grid-column: 1 / -1 }
/* Musique : la bibliothèque montre des lignes entières (plus de titre coupé en bas) et la file occupe toute la hauteur de sa colonne */
.lib-list { max-height: 474px; scroll-snap-type: y proximity }
.lib-list > * { scroll-snap-align: start }
.music-grid > .queue-card { align-self: stretch }

/* Marque Squir en haut des pages */
.sq-topbrand { gap: 10px; font-family: 'Red Hat Display', 'Inter', system-ui, sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -.04em; color: #fff; text-decoration: none }
.sq-topbrand img { width: 34px; height: 34px; background: none; border-radius: 0 }
.sq-topbrand i { font-style: normal; color: #ff5a1f }

/* ---------- Sauvegarde automatique ----------
   La barre devient une petite pastille en bas à droite, visible seulement pendant l'enregistrement,
   juste après (« Enregistré ») ou en cas d'erreur (avec « Réessayer »). */
.savebar.auto {
  left: calc(var(--sidebar, 0px) + (100vw - var(--sidebar, 0px)) / 2) !important; right: auto !important; transform: translateX(-50%) !important; width: auto !important; max-width: min(420px, calc(100vw - 48px));
  padding: 8px 14px !important; gap: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, border-color .2s !important;
  border-color: var(--border-2) !important }
.savebar.auto > *:not(.sb-status):not(.sb-retry) { display: none !important }
.savebar.auto .sb-status { font-size: 13px; font-weight: 600; color: var(--dim); display: inline-flex; align-items: center; gap: 8px }
.savebar.auto .sb-retry { display: none !important; height: 30px }
.savebar.auto.sb-saving, .savebar.auto.sb-saved, .savebar.auto.sb-error { opacity: 1 !important; visibility: visible !important; transition: opacity .15s !important }
.savebar.auto:not(.sb-saving):not(.sb-saved):not(.sb-error) { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important }
.savebar.auto.sb-saving .sb-status::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--text); animation: sbspin .7s linear infinite }
.savebar.auto.sb-saved { border-color: rgba(74, 222, 128, .45) !important }
.savebar.auto.sb-saved .sb-status { color: #4ade80 }
.savebar.auto.sb-saved .sb-status::before { content: '✓'; font-weight: 800 }
.savebar.auto.sb-error { pointer-events: auto !important; border-color: color-mix(in srgb, var(--red) 60%, var(--border-2)) !important }
.savebar.auto.sb-error .sb-status { color: var(--red-2); white-space: normal }
.savebar.auto.sb-error .sb-retry { display: inline-flex !important }
@keyframes sbspin { to { transform: rotate(360deg) } }
@media (max-width: 760px) { .savebar.auto { left: 50% !important } }

/* Aperçu Discord modifiable : on écrit directement dans la bulle (comme le panel de tickets) */
.dc-live .emoji-field { position: relative; width: 100% }
.dc-live .rt-editor { padding: 4px 34px 4px 6px !important; margin: -4px -6px; width: calc(100% + 12px); border: 1px solid transparent !important; border-radius: 6px !important; background: transparent !important; color: inherit !important; font: inherit !important; line-height: inherit !important; min-height: 0 !important; box-shadow: none !important; resize: none; transition: background-color .12s, border-color .12s }
.dc-live .rt-editor:hover { background: rgba(255, 255, 255, .035) !important; border-color: rgba(255, 255, 255, .08) !important }
.dc-live .rt-editor:focus { background: rgba(255, 255, 255, .05) !important; border-color: rgba(255, 255, 255, .16) !important }
.dc-live .rt-editor.empty::before { color: #80848e }
.dc-live .dc-embed-title .rt-editor { font-weight: 600 !important }
.dc-live .dc-embed-desc .rt-editor { min-height: 1.4em !important; white-space: pre-wrap }
.dc-live .emoji-btn { width: 26px; height: 26px; right: 2px; color: #80848e; opacity: 0; transition: opacity .12s }
.dc-live .emoji-field:hover .emoji-btn, .dc-live .emoji-field:focus-within .emoji-btn { opacity: 1 }
.dc-live .emoji-field.is-area .emoji-btn { top: 0 }
.dc-live .dc-embed { min-width: min(100%, 420px) }
.dc-live .dc-embed-main { flex: 1; min-width: 0 }
.dc-vars { display: block; margin-top: 2px; color: var(--dim) } .dc-vars code { cursor: pointer } .dc-vars code:hover { color: var(--text) }
.split-preview.dc-solo { grid-template-columns: minmax(0, 1fr) }
.dc-live { position: relative }
.dc-live .dc-emoji-btn { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .1); background: #2b2d31; color: #b5bac1; cursor: pointer; transition: background-color .12s, color .12s }
.dc-live .dc-emoji-btn:hover { background: #35373c; color: #f2f3f5 }
.dc-live .dc-emoji-btn svg { width: 18px; height: 18px }
.dc-live .dc-body { padding-right: 40px }

/* Libellé au-dessus d'un aperçu modifiable (le champ d'origine est caché) */
.dc-sub { display: none; font-size: 13px; font-weight: 500; color: var(--muted, #a3a4ab); margin: 14px 0 6px }
.dc-sub:has(+ .split-preview .dc-live) { display: block }
