@font-face { font-family: "Outfit"; src: url("/fonts/outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("/fonts/pixelify-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("/fonts/pixelify-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
/* Mise en page : barre latérale bois-et-bambou à gauche, bandeau de forêt pixel vivant en haut du contenu, réglages en blocs filetés + aperçu Discord à droite */
:root {
  --bg: #eef2ea; --surface: #fbfcf8; --field: #ffffff; --ink: #1f2b24; --muted: #66766b; --line: #dbe3d4; --line-strong: #c5d1bd;
  --green: #4f8a34; --green-ink: #ffffff; --leaf: #5f8f3e; --leaf-2: #77a653;
  --rust: #c4532a; --rust-deep: #8c3417; --rust-soft: #f6e2d8; --wood: #6e4b33; --wood-light: #8a6446;
  --panda-dark: #3a1e14; --panda-white: #f8f1e6; --panda-eye: #1d130e;
  --sky-1: #d3e2c9; --sky-2: #dfe9d6; --sky-3: #ecdcc4; --stalk-far: #bdd1b0; --stalk-mid: #9fbd8c; --stalk-near: #6f9a52; --node: #e4eedc;
  --st-on: #4f8a34; --st-wait: #c9557c; --st-work: #d08a1c; --st-off: #a3ada4;
  --discord-bg: #313338; --discord-ink: #dbdee1; --discord-muted: #949ba4; --discord-mention: #c9cdfb; --discord-mention-bg: #3c4270; --discord-embed: #2b2d31;
  --font-text: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-pixel: "Pixelify Sans", "Outfit", system-ui, sans-serif;
  --r: 5px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #151e19; --surface: #1c2721; --field: #18221d; --ink: #e3ebe0; --muted: #8d9e92; --line: #29372f; --line-strong: #364a3e;
  --green: #6ea64f; --green-ink: #10170f; --leaf: #6a9c47; --leaf-2: #86b45f; --rust: #d8653a; --rust-deep: #a8441f; --rust-soft: #3a2419; --wood: #5a3c29; --wood-light: #6e4b33;
  --sky-1: #101a15; --sky-2: #1a2a21; --sky-3: #4a2c22; --stalk-far: #1f3027; --stalk-mid: #2a4234; --stalk-near: #3e6146; --node: #335042;
  --st-on: #6ea64f; --st-wait: #d9668f; --st-work: #e0a030; --st-off: #5b685f; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #151e19; --surface: #1c2721; --field: #18221d; --ink: #e3ebe0; --muted: #8d9e92; --line: #29372f; --line-strong: #364a3e;
  --green: #6ea64f; --green-ink: #10170f; --leaf: #6a9c47; --leaf-2: #86b45f; --rust: #d8653a; --rust-deep: #a8441f; --rust-soft: #3a2419; --wood: #5a3c29; --wood-light: #6e4b33;
  --sky-1: #101a15; --sky-2: #1a2a21; --sky-3: #4a2c22; --stalk-far: #1f3027; --stalk-mid: #2a4234; --stalk-near: #3e6146; --node: #335042;
  --st-on: #6ea64f; --st-wait: #d9668f; --st-work: #e0a030; --st-off: #5b685f; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font-text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
.px { font-family: var(--font-pixel); letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }


/* scène pixel */
.scene { position: relative; overflow: hidden; background: var(--sky-1); }
.scene canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.bubble { position: absolute; max-width: min(320px, 60%); background: var(--surface); color: var(--ink); border: 2px solid var(--panda-dark); border-radius: var(--r); padding: 8px 12px; font-size: 14px; line-height: 1.35; box-shadow: 3px 3px 0 var(--panda-dark); transition: opacity .25s, transform .25s var(--ease); }
.bubble::before { content: ""; position: absolute; left: -10px; top: 14px; border: 6px solid transparent; border-right: 6px solid var(--panda-dark); border-left: 0; }
.bubble.hide { opacity: 0; transform: translateY(4px); }

/* connexion */
.login { min-height: 100%; display: grid; grid-template-rows: auto 1fr; }
.login .scene { height: clamp(300px, 52vh, 460px); }
.login-card { justify-self: center; width: min(460px, 100%); margin-top: -64px; position: relative; background: var(--surface); border: 2px solid var(--panda-dark); border-radius: var(--r); box-shadow: 6px 6px 0 var(--panda-dark); padding: 24px 24px 20px; display: grid; gap: 14px; }
.login-wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 32px; display: grid; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 48px; height: 48px; flex: none; }
.brand h1 { font-family: var(--font-pixel); font-size: 30px; font-weight: 600; line-height: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r); padding: 9px 16px; font-weight: 500; transition: transform .1s, background .15s; }
.btn:hover { background: var(--field); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--rust); border-color: var(--rust-deep); color: #fff; box-shadow: 0 3px 0 var(--rust-deep); }
.btn-main:hover { background: var(--rust); filter: brightness(1.06); }
.btn-main:active { box-shadow: 0 1px 0 var(--rust-deep); transform: translateY(2px); }
.btn-go { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn-go:hover { background: var(--green); filter: brightness(1.08); }
.btn-ghost { border-color: transparent; background: transparent; }
.login-note { font-size: 13px; color: var(--muted); margin: 0; }

/* serveurs */
.page-pad { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--rust); display: grid; place-items: center; color: #fff; font-weight: 600; flex: none; overflow: hidden; }
.servers { max-width: 980px; margin: 0 auto; padding-block: 28px 48px; display: grid; gap: 18px; }
.servers h2 { font-family: var(--font-pixel); font-size: 26px; font-weight: 600; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.server { text-align: left; display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, transform .15s var(--ease); }
.server:hover { border-color: var(--rust); transform: translateY(-2px); }
.server .name { font-weight: 600; font-size: 16px; }
.server .meta { font-size: 13px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--font-pixel); padding: 2px 7px; border-radius: 3px; border: 1px solid var(--line-strong); color: var(--muted); }
.tag i { width: 8px; height: 8px; display: inline-block; background: var(--st-off); }
.tag.on i { background: var(--st-on); }
.tag.on { color: var(--ink); }

/* cube voxel */
.voxel { width: 64px; height: 64px; perspective: 260px; display: grid; place-items: center; }
.cube { width: 34px; height: 34px; position: relative; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(-38deg); transition: transform 1.2s var(--ease); }
.server:hover .cube, .server:focus-visible .cube { transform: rotateX(-24deg) rotateY(322deg); }
.cube span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-pixel); font-size: 17px; color: #fff; image-rendering: pixelated;
  background-image: linear-gradient(90deg, rgba(0,0,0,.10) 50%, transparent 50%), linear-gradient(rgba(0,0,0,.10) 50%, transparent 50%); background-size: 17px 17px; }
.cube .f { transform: translateZ(17px); } .cube .b { transform: rotateY(180deg) translateZ(17px); }
.cube .l { transform: rotateY(-90deg) translateZ(17px); filter: brightness(.78); } .cube .r { transform: rotateY(90deg) translateZ(17px); filter: brightness(.78); }
.cube .t { transform: rotateX(90deg) translateZ(17px); filter: brightness(1.15); } .cube .u { transform: rotateX(-90deg) translateZ(17px); filter: brightness(.6); }

/* tableau de bord */
.dash { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: sticky; top: 0; height: 100vh; }
.side-head { padding: 14px 14px 10px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.side-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-pixel); font-size: 19px; font-weight: 600; }
.side-brand svg { width: 28px; height: 28px; }
.switcher { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r); background: var(--field); text-align: left; }
.switcher .ic { width: 28px; height: 28px; border-radius: 4px; background: var(--rust); color: #fff; display: grid; place-items: center; font-family: var(--font-pixel); }
.switcher .nm { font-weight: 600; line-height: 1.1; }
.switcher .sub { font-size: 12px; color: var(--muted); }
.nav { overflow-y: auto; padding: 8px 8px 16px; flex: 1; }
.nav-group { margin-top: 10px; }
.nav-title { font-family: var(--font-pixel); font-size: 13px; color: var(--muted); padding: 4px 8px; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 4px; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current="page"] { background: var(--rust-soft); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--rust); }
.dot { width: 8px; height: 8px; flex: none; background: var(--st-off); }
.dot.on { background: var(--st-on); } .dot.wait { background: var(--st-wait); }
.nav .count { margin-left: auto; min-width: 20px; text-align: center; font-size: 12px; font-weight: 600; color: #fff; background: var(--st-wait); border-radius: 3px; padding: 0 5px; font-variant-numeric: tabular-nums; }
.side-foot { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.side-foot .user { flex: 1; min-width: 0; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid transparent; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.main { min-width: 0; display: flex; flex-direction: column; }
.band { height: 150px; border-bottom: 2px solid var(--panda-dark); }
.content { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 22px 120px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { font-family: var(--font-pixel); font-size: 30px; font-weight: 600; line-height: 1.1; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 60ch; }

/* interrupteur */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 24px; border-radius: 4px; background: var(--st-off); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 3px; background: var(--surface); box-shadow: 0 2px 0 rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--rust); outline-offset: 2px; }

/* vue d'ensemble */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 22px; }
.stat { padding: 14px 16px; display: grid; gap: 2px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .v { font-family: var(--font-text); font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13px; color: var(--muted); }
.stat .d { font-size: 12px; color: var(--green); }
.cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.block-head h3 { font-size: 16px; }
.log { list-style: none; margin: 0; padding: 4px 0; }
.log li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: baseline; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.log li:last-child { border-bottom: 0; }
.log time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.log .dot { transform: translateY(-1px); }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; }
.mod { display: flex; align-items: center; gap: 9px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 14px; text-decoration: none; color: var(--ink); }
.mod:hover { background: var(--bg); }

/* réglages */
.settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 26px; align-items: start; }
.sec { padding: 16px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.sec:last-child { border-bottom: 0; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-head h3 { font-size: 16px; }
.sec-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.field { display: grid; gap: 6px; }
.field > label, .field > .lbl { font-size: 13.5px; font-weight: 500; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="text"], input[type="number"], input[type="date"], input[type="time"], select, textarea { width: 100%; background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px 10px; min-height: 38px; }
textarea { resize: vertical; min-height: 86px; line-height: 1.45; }
input[type="text"]:focus, input[type="number"]:focus, input[type="date"]:focus, input[type="time"]:focus, select:focus, textarea:focus { outline: none; border-color: var(--rust); box-shadow: 0 0 0 3px var(--rust-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--font-pixel); font-size: 13px; padding: 2px 8px; border-radius: 3px; border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); }
.chip:hover { border-style: solid; border-color: var(--rust); color: var(--rust); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.seg button { border: 0; background: var(--field); padding: 6px 12px; font-size: 14px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: var(--rust-soft); color: var(--ink); font-weight: 600; }
.swatches { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sw { width: 28px; height: 28px; border-radius: 4px; border: 2px solid transparent; box-shadow: inset 0 0 0 2px var(--surface); }
.sw[aria-pressed="true"] { border-color: var(--ink); }
.disabled-zone { opacity: .45; pointer-events: none; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }

/* aperçu Discord */
.preview { position: sticky; top: 16px; display: grid; gap: 8px; }
.preview .lbl { font-family: var(--font-pixel); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; }
.dc { background: var(--discord-bg); color: var(--discord-ink); border-radius: var(--r); padding: 16px 16px 18px; font-size: 15px; line-height: 1.4; display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.dc .av { width: 40px; height: 40px; border-radius: 50%; background: #2f4a36; display: grid; place-items: center; }
.dc .av svg { width: 30px; height: 30px; }
.dc .who { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.dc .who b { color: #f2f3f5; font-weight: 600; }
.dc .bot { background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 4px; border-radius: 3px; }
.dc .time { color: var(--discord-muted); font-size: 12px; }
.dc .msg { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dc .mention { background: var(--discord-mention-bg); color: var(--discord-mention); border-radius: 3px; padding: 0 2px; }
.dc .embed { margin-top: 6px; background: var(--discord-embed); border-left: 4px solid var(--accent, #c4532a); border-radius: 4px; padding: 10px 12px; }
.card { margin-top: 8px; aspect-ratio: 1024 / 450; max-width: 100%; border-radius: 6px; overflow: hidden; position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4%; padding: 0 6%; color: #fff;
  background: linear-gradient(135deg, var(--accent, #c4532a), #1d130e 120%); }
.card .ring { width: clamp(52px, 20cqw, 92px); aspect-ratio: 1; border-radius: 50%; border: 4px solid #fff; background: #f8f1e6; display: grid; place-items: center; overflow: hidden; }
.card { container-type: inline-size; }
.card .t1 { font-family: var(--font-pixel); font-size: clamp(18px, 8cqw, 38px); line-height: 1; letter-spacing: 0.04em; }
.card .t2 { font-size: clamp(11px, 3.6cqw, 16px); opacity: .9; margin-top: 4px; }

/* barre d'enregistrement */
.savebar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, calc(100% + 160px)); visibility: hidden; transition: transform .3s var(--ease), visibility .3s; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; background: var(--panda-dark); color: var(--panda-white); border-radius: var(--r); box-shadow: 4px 4px 0 rgba(0,0,0,.25); width: max-content; max-width: calc(100% - 32px); }
.savebar.show { transform: translate(-50%, 0); visibility: visible; }
.savebar span { font-size: 14px; }
.savebar .btn-ghost { color: var(--panda-white); }
.savebar .btn-ghost:hover { background: rgba(255,255,255,.08); }

/* mobile */
.bottom-nav, .sheet, .sheet-bg { display: none; }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .side { display: none; }
  .settings, .cols { grid-template-columns: 1fr; }
  .preview { position: static; }
  .band { height: 120px; }
  .content { padding-block: 18px 110px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .bottom-nav button, .bottom-nav a { display: grid; place-items: center; gap: 2px; padding: 9px 4px 8px; border: 0; background: none; font-size: 12px; color: var(--muted); text-decoration: none; }
  .bottom-nav [aria-current="page"] { color: var(--rust); }
  .bottom-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .savebar { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); gap: 6px; padding: 8px 8px 8px 12px; }
  .savebar span { flex: 1; font-size: 13px; line-height: 1.2; }
  .savebar .btn { padding: 8px 10px; }
  .sheet-bg.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
  .sheet.open { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; max-height: 78vh; z-index: 41; background: var(--surface); border-top: 2px solid var(--panda-dark); border-radius: 8px 8px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .sheet .nav { padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  .sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-family: var(--font-pixel); font-size: 18px; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ajouts de la version branchée */
.dot.unk { background: transparent; box-shadow: inset 0 0 0 1.5px var(--st-off); }
.cube span img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.login-error { margin: 0; padding: 8px 10px; border-radius: var(--r); background: var(--rust-soft); border: 1px solid var(--rust); font-size: 14px; }
.toast { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -160%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s; z-index: 50; background: var(--surface); color: var(--ink); border: 2px solid var(--rust); border-radius: var(--r); box-shadow: 4px 4px 0 var(--rust-deep); padding: 10px 14px; max-width: calc(100% - 32px); font-size: 14px; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.loading { padding: 40px 0; color: var(--muted); }
.cmds { list-style: none; margin: 0; padding: 0; }
.cmds li { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.cmds li:last-child { border-bottom: 0; }
.cmds code { font-family: var(--font-text); font-weight: 600; color: var(--rust); overflow-wrap: anywhere; }
.empty { padding: 18px 16px; color: var(--muted); font-size: 14px; }
.card-img { margin-top: 8px; width: 100%; max-width: 100%; aspect-ratio: 1024 / 450; border-radius: 6px; display: block; transition: opacity .2s; background: var(--discord-embed); }
.card-img.busy { opacity: .55; }
.note { font-size: 13px; color: var(--muted); padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: var(--r); margin: 0; }
.server-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
a.server { color: inherit; text-decoration: none; }
@media (max-width: 860px) { .cmds li { grid-template-columns: 1fr; gap: 2px; } }

/* formulaires génériques */
.sec-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 16px; align-items: start; }
.sec-body .field.wide, .row-grid .field.wide { grid-column: 1 / -1; }
.toggle-field { align-self: center; }
.with-unit { display: flex; align-items: stretch; gap: 0; }
.with-unit input { flex: 1 1 auto; width: auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.with-unit .unit, .with-unit select { flex: 0 0 auto; width: auto; max-width: 55%; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--bg); color: var(--muted); font-size: 13.5px; min-height: 38px; }
.with-unit select { background: var(--field); color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--field); min-height: 38px; }
.tags select, .tags .tag-input { border: 0; background: transparent; min-height: 28px; padding: 2px 6px; width: auto; flex: 1 1 140px; box-shadow: none; }
.tags .tag-input:focus, .tags select:focus { outline: none; box-shadow: none; }
.tags:focus-within { border-color: var(--rust); box-shadow: 0 0 0 3px var(--rust-soft); }
.tagchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 3px; background: var(--rust-soft); font-size: 13.5px; max-width: 100%; overflow-wrap: anywhere; }
.tagchip button { border: 0; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; border-radius: 3px; }
.tagchip button:hover { color: var(--rust); background: var(--bg); }
.bot-tag { background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; padding: 0 4px; border-radius: 3px; }
.search { position: relative; flex: 1 1 180px; display: flex; }
.search .tag-input { flex: 1; }
.results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 3px 3px 0 var(--line-strong); display: grid; }
.results:empty { display: none; }
.results button { text-align: left; border: 0; background: transparent; padding: 8px 10px; font-size: 14px; border-bottom: 1px solid var(--line); }
.results button:last-child { border-bottom: 0; }
.results button:hover, .results button:focus-visible { background: var(--rust-soft); }
.list-field { display: grid; gap: 10px; }
.row-item { border: 1px solid var(--line); border-left: 3px solid var(--wood-light); border-radius: var(--r); padding: 10px 12px 12px; background: var(--bg); display: grid; gap: 10px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }
.row-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 12px; align-items: start; }
.btn-small { padding: 4px 10px; font-size: 13px; }
.list-field > .btn { justify-self: start; }
.note.warn { border-style: solid; border-color: var(--st-work); background: var(--rust-soft); color: var(--ink); }
.page-head + .note, .note + .note, .note + .block { margin-top: 12px; }
.cmd-details { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.cmd-details summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
.cmd-details[open] summary { border-bottom: 1px solid var(--line); }
.mini-preview { margin-top: 6px; }
.dc-mini { padding: 10px 12px; font-size: 14px; grid-template-columns: 32px 1fr; gap: 10px; }
.dc-mini .av { width: 32px; height: 32px; }
.dc-mini .av svg { width: 24px; height: 24px; }
.dc .link { color: #00a8fc; }
.sec-body > .field, .row-grid > .field { min-width: 0; }
.with-unit { width: 100%; min-width: 0; }
