/* Portail MouchoirsRP — maquettes (charte des interfaces du serveur) */
@font-face { font-family: 'Rye'; src: url(fonts/Rye-Regular.ttf); }
@font-face { font-family: 'IM Fell English SC'; src: url(fonts/IMFeENsc28P.ttf); }

:root {
    --leather: #1a1210; --leather-2: #2a1c16; --paper: #f1e2c2; --paper-dim: #c9b48d;
    --brass: #c9a25c; --brass-light: #f0d59a; --brass-dark: #7a5a26; --red: #a3201a; --red-bright: #d93a2b;
    --ok: #7fae6a; --warn: #d9822b; --ink: #2b1d0e;
    --ui: 'Segoe UI', 'Inter', Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #0c0806; color: var(--paper); font: 14px/1.45 var(--ui); }
a { color: var(--brass-light); }
.rye { font-family: 'Rye', serif; font-weight: normal; text-shadow: 0 2px 0 #5a1712, 0 4px 12px rgba(0,0,0,.8); }
.sc { font-family: 'IM Fell English SC', serif; letter-spacing: .04em; }
::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-thumb { background: var(--brass-dark); }

/* ---------- boutons, champs, puces ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid var(--brass-dark); font: 600 13.5px var(--ui);
    color: var(--ink); background: linear-gradient(180deg, var(--brass-light), var(--brass)); cursor: pointer; border-radius: 2px; text-decoration: none; white-space: nowrap; }
.btn.ghost { background: rgba(0,0,0,.3); color: var(--paper); border-color: rgba(201,162,92,.45); }
.btn.danger { background: rgba(163,32,26,.35); color: #ffd9d2; border-color: var(--red); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn.discord { background: #5865f2; border-color: #3c45a5; color: #fff; font-size: 16px; padding: 12px 22px; }
.field { background: rgba(0,0,0,.4); border: 1px solid rgba(201,162,92,.4); color: var(--paper); padding: 7px 10px; font: 14px var(--ui); border-radius: 2px; width: 100%; }
.field:focus { outline: none; border-color: var(--brass); }
.field.bad { border-color: var(--red-bright); background: rgba(217,58,43,.15); }
.chip { display: inline-block; padding: 4px 11px; border: 1px solid rgba(201,162,92,.4); background: rgba(0,0,0,.3); color: var(--paper); font: 13px var(--ui); cursor: pointer; }
.chip.on { background: linear-gradient(180deg, var(--brass-light), var(--brass)); color: var(--ink); border-color: var(--brass-dark); }
.badge { display: inline-block; padding: 1px 8px; font-size: 12px; border: 1px solid; }
.badge.ok { color: #cfe6c4; border-color: var(--ok); background: rgba(127,174,106,.18); }
.badge.warn { color: #ffe2c2; border-color: var(--warn); background: rgba(217,130,43,.18); }
.badge.red { color: #ffd6cf; border-color: var(--red-bright); background: rgba(217,58,43,.2); }
.badge.dim { color: var(--paper-dim); border-color: rgba(201,162,92,.35); }
.dim { color: var(--paper-dim); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- page de connexion ---------- */
.login { min-height: 100%; display: grid; place-items: center; background: linear-gradient(rgba(10,6,4,.55), rgba(10,6,4,.8)), url(img/background.jpg) center/cover; }
.login-card { width: 440px; text-align: center; padding: 34px 38px 28px; }
.login-card img { width: 128px; }
.login-card h1 { margin: 6px 0 0; font-size: 42px; } .login-card h1 b { color: var(--brass); font-weight: normal; }
.login-card .tag { margin: 2px 0 22px; color: var(--paper-dim); }
.login-card .roles { text-align: left; margin: 22px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--brass-dark); }
.login-card .roles div { display: flex; gap: 10px; padding: 5px 0; } .login-card .roles i { color: var(--brass); width: 18px; margin-top: 3px; }
.login-card .sign { margin-top: 18px; font-size: 12px; color: var(--paper-dim); }

/* ---------- panneau cuir (DA) ---------- */
.panel { background: radial-gradient(ellipse at 30% 0%, rgba(201,162,92,.10), transparent 60%), linear-gradient(165deg, var(--leather-2), var(--leather) 55%, #0c0806);
    border: 2px solid var(--brass-dark); outline: 1px solid rgba(201,162,92,.35); outline-offset: -8px; box-shadow: 0 24px 60px rgba(0,0,0,.8), inset 0 0 50px rgba(0,0,0,.6); }

/* ---------- mise en page du portail ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; background: linear-gradient(rgba(12,8,6,.9), rgba(12,8,6,.96)), url(img/background.jpg) center/cover fixed; }
.side { border-right: 2px solid var(--brass-dark); background: linear-gradient(180deg, var(--leather-2), var(--leather)); padding: 18px 0; display: flex; flex-direction: column; }
.brandbox { display: flex; align-items: center; gap: 10px; padding: 0 18px 16px; border-bottom: 1px dashed rgba(201,162,92,.4); }
.brandbox img { width: 46px; } .brandbox .rye { font-size: 20px; line-height: 1; } .brandbox .rye b { color: var(--brass); font-weight: normal; }
.brandbox small { display: block; color: var(--paper-dim); font-size: 12px; margin-top: 3px; }
.nav { padding: 12px 0; flex: 1; }
.nav .grp { font-family: 'IM Fell English SC', serif; color: var(--brass); font-size: 14px; padding: 12px 18px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 18px; color: var(--paper); text-decoration: none; font-size: 14px; }
.nav a i { width: 18px; color: var(--brass); text-align: center; }
.nav a.on { background: rgba(201,162,92,.18); box-shadow: inset 3px 0 0 var(--brass); }
.nav a .n { margin-left: auto; font-size: 11.5px; background: var(--red); color: #fff; padding: 0 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 18px 0; border-top: 1px dashed rgba(201,162,92,.4); }
.me .av { width: 36px; height: 36px; border-radius: 50%; background: #5865f2; display: grid; place-items: center; color: #fff; font-weight: 700; }
.me small { display: block; color: var(--paper-dim); font-size: 12px; }

.main { padding: 20px 26px 30px; min-width: 0; }
.top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.top h1 { margin: 0; font-size: 30px; }
.top .crumb { font-family: 'IM Fell English SC', serif; color: var(--brass); font-size: 15px; }
.srv { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: rgba(0,0,0,.35); border: 1px solid rgba(201,162,92,.35); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.dot.off { background: var(--red-bright); box-shadow: 0 0 6px var(--red-bright); }

.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.card { background: rgba(26,18,16,.82); border: 1px solid rgba(201,162,92,.35); padding: 14px 16px; }
.card h3 { margin: 0 0 10px; font-family: 'IM Fell English SC', serif; font-weight: normal; color: var(--brass-light); font-size: 18px; display: flex; align-items: center; gap: 9px; }
.card h3 i { color: var(--brass); font-size: 15px; } .card h3 .r { margin-left: auto; }
.stat b { font-family: 'Rye', serif; font-weight: normal; font-size: 30px; display: block; line-height: 1.1; }
.stat span { color: var(--paper-dim); } .stat.red { border-left: 3px solid var(--red-bright); } .stat.warn { border-left: 3px solid var(--warn); } .stat.ok { border-left: 3px solid var(--ok); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note { font-size: 12.5px; color: var(--paper-dim); margin-top: 8px; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font: 600 12px var(--ui); text-transform: uppercase; letter-spacing: .05em; color: var(--brass); padding: 6px 8px; border-bottom: 1px solid rgba(201,162,92,.4); }
table.list td { padding: 7px 8px; border-bottom: 1px dashed rgba(201,162,92,.18); vertical-align: middle; }
table.list tr.sel td { background: rgba(201,162,92,.16); } table.list tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--brass); }
table.list td small { display: block; color: var(--paper-dim); font-size: 12px; }
.item { display: flex; align-items: center; gap: 9px; } .item img { width: 34px; height: 34px; object-fit: contain; background: rgba(0,0,0,.35); border: 1px solid rgba(201,162,92,.25); }
.price { width: 92px; } .qty { width: 70px; }
.range { font-size: 12px; color: var(--paper-dim); white-space: nowrap; }
.range.bad { color: #ff9e8f; }

.basket .bl { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px dashed rgba(201,162,92,.18); }
.basket .bl img { width: 30px; height: 30px; object-fit: contain; } .basket .bl .q { margin-left: auto; width: 60px; }
.rules li { padding: 4px 0; } .rules { margin: 0; padding-left: 18px; }
.changes .ch { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed rgba(201,162,92,.18); font-size: 13px; }
.changes .ch s { color: var(--paper-dim); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 6px; }
.bars div { flex: 1; background: linear-gradient(180deg, var(--brass-light), var(--brass-dark)); position: relative; }
.bars div span { position: absolute; bottom: -19px; left: 0; right: 0; text-align: center; font-size: 11.5px; color: var(--paper-dim); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.toggle { width: 34px; height: 18px; border-radius: 9px; background: rgba(0,0,0,.5); border: 1px solid rgba(201,162,92,.4); position: relative; display: inline-block; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper-dim); }
.toggle.on { background: rgba(127,174,106,.35); border-color: var(--ok); } .toggle.on::after { left: 18px; background: #cfe6c4; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--warn); background: rgba(217,130,43,.13); margin-bottom: 14px; }
.banner i { color: var(--warn); }

/* ======================================================================= application (23/11/2026) */
html { scroll-behavior: smooth; }
body.app-body { overflow: hidden; }
.app { height: 100vh; }
.side { overflow-y: auto; }
.main { overflow-y: auto; height: 100vh; }
.nav a { cursor: pointer; transition: background .15s; }
.nav a:hover { background: rgba(201,162,92,.09); }
.nav a .n.hidden { display: none; }
.me a { margin-left: auto; color: var(--paper-dim); } .me a:hover { color: var(--brass-light); }
.me img.av { width: 36px; height: 36px; border-radius: 50%; }
.view { animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }
.spacer { flex: 1; }
.empty { padding: 26px; text-align: center; color: var(--paper-dim); }
.loading { padding: 40px; text-align: center; color: var(--paper-dim); }
.loading i { animation: spin 1s linear infinite; margin-right: 8px; color: var(--brass); }
@keyframes spin { to { transform: rotate(360deg); } }
.grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.g2e { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card.full { grid-column: 1 / -1; }
.stat { cursor: default; } a.stat, .stat.link { cursor: pointer; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.stat.link:hover { border-color: var(--brass); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:not(:disabled):hover { filter: brightness(1.08); }
.btn.ok { background: rgba(127,174,106,.25); color: #dff0d6; border-color: var(--ok); }
.chip { user-select: none; } .chip:hover { border-color: var(--brass); }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%);
    background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
select.field option { background: var(--leather); color: var(--paper); }
textarea.field { resize: vertical; min-height: 64px; font-family: var(--ui); }
label.lbl { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--brass); margin: 8px 0 4px; }
.searchbar { position: relative; } .searchbar i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--brass); }
.searchbar .field { padding-left: 32px; }
table.list tr.click { cursor: pointer; } table.list tr.click:hover td { background: rgba(201,162,92,.08); }
table.list td.reason { max-width: 360px; font-size: 12.5px; word-break: break-word; }
table.list td.copy { cursor: pointer; text-decoration: underline dotted rgba(201,162,92,.5); }
.wrap-table { overflow-x: auto; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 18px; margin-top: 8px; }
.facts div { font-size: 13.5px; } .facts b { display: block; font: 600 11px var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--brass); }
.facts .copy { cursor: pointer; text-decoration: underline dotted rgba(201,162,92,.6); }
.idcard { display: flex; gap: 18px; align-items: flex-start; }
.idcard .big { width: 76px; height: 76px; flex: none; display: grid; place-items: center; border: 1px solid var(--brass-dark); background: rgba(0,0,0,.35); font-family: 'Rye', serif; font-size: 30px; color: var(--brass-light); }
.idcard .big small { display: block; font: 10px var(--ui); color: var(--paper-dim); text-transform: uppercase; letter-spacing: .08em; margin-top: -10px; }
.idcard h2 { margin: 0; font-size: 28px; }
.idcard .badges { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.inv .slot { background: rgba(0,0,0,.35); border: 1px solid rgba(201,162,92,.25); padding: 4px; text-align: center; position: relative; min-height: 64px; }
.inv .slot img, .inv .slot .noimg { width: 40px; height: 40px; object-fit: contain; }
.inv .slot .noimg { display: inline-grid; place-items: center; color: var(--brass-dark); font-size: 20px; }
.inv .slot span { position: absolute; right: 4px; top: 2px; font-size: 11px; color: var(--brass-light); }
.inv .slot small { display: block; font-size: 10.5px; line-height: 1.15; color: var(--paper-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item img, .item .noimg { width: 34px; height: 34px; }
.item .noimg { display: inline-grid; place-items: center; background: rgba(0,0,0,.35); border: 1px solid rgba(201,162,92,.25); color: var(--brass-dark); }
.hrow { display: grid; grid-template-columns: 120px 170px 150px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px dashed rgba(201,162,92,.15); font-size: 13px; }
.hrow .d { color: var(--paper-dim); }
.pend { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed rgba(201,162,92,.18); font-size: 13px; }
.pend .tag { font-size: 11.5px; padding: 1px 7px; border: 1px solid var(--brass-dark); color: var(--brass-light); }
.pend .by { color: var(--paper-dim); font-size: 12px; margin-left: auto; white-space: nowrap; }
.anote { display: flex; gap: 9px; padding: 5px 0; } .anote i { color: var(--brass); width: 16px; margin-top: 3px; }
.ktag { display: inline-block; padding: 1px 7px; font-size: 12px; border: 1px solid rgba(201,162,92,.4); white-space: nowrap; }
.ktag.k-crash { background: rgba(217,58,43,.25); border-color: var(--red-bright); color: #ffd6cf; }
.ktag.k-timeout, .ktag.k-overflow { background: rgba(217,130,43,.22); border-color: var(--warn); color: #ffe2c2; }
.ktag.k-kick { background: rgba(163,32,26,.3); border-color: var(--red); } .ktag.k-quit { color: var(--paper-dim); }
tr.pvp td:first-child { box-shadow: inset 3px 0 0 var(--red-bright); }
.killer { color: #e8a08f; }
/* liste de choix avec recherche */
.picker { position: relative; flex: 1; min-width: 200px; }
.picker .opts { position: absolute; left: 0; right: 0; top: calc(100% + 2px); max-height: 280px; overflow-y: auto; z-index: 30; background: var(--leather); border: 1px solid var(--brass-dark); box-shadow: 0 12px 30px rgba(0,0,0,.6); }
.picker .opt { display: flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; font-size: 13.5px; }
.picker .opt img, .picker .opt .noimg { width: 24px; height: 24px; object-fit: contain; }
.picker .opt small { margin-left: auto; color: var(--paper-dim); font-size: 11.5px; }
.picker .opt.hl, .picker .opt:hover { background: rgba(201,162,92,.2); }
/* notifications et fenêtres */
#toasts { position: fixed; right: 18px; top: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { background: var(--leather); border: 1px solid var(--brass-dark); border-left: 4px solid var(--brass); padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.6); font-size: 13.5px; animation: slide .25s ease-out; }
.toast.ok { border-left-color: var(--ok); } .toast.err { border-left-color: var(--red-bright); } .toast.wait { border-left-color: var(--warn); }
.toast i { margin-right: 7px; }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 90; display: grid; place-items: center; animation: rise .15s ease-out; }
.modal { width: min(520px, 92vw); padding: 22px 24px; }
.modal h3 { margin: 0 0 6px; font-size: 22px; } .modal p { margin: 0 0 10px; color: var(--paper-dim); }
.modal .row { justify-content: flex-end; margin-top: 14px; }
.subtle { font-size: 12.5px; color: var(--paper-dim); }
.kbd { font: 12px monospace; background: rgba(0,0,0,.4); border: 1px solid rgba(201,162,92,.3); padding: 0 5px; }
.list-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.tagx { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; border: 1px solid rgba(201,162,92,.4); font-size: 12.5px; background: rgba(0,0,0,.25); }
.tagx button { background: none; border: 0; color: var(--paper-dim); cursor: pointer; padding: 0 4px; }
.price.changed { border-color: var(--brass-light); box-shadow: 0 0 0 1px rgba(240,213,154,.4); }
.statusline { font-size: 12px; } .statusline .ok { color: var(--ok); } .statusline .err { color: #ff9e8f; }
.dirtybar { position: sticky; bottom: 0; margin: 12px -16px -14px; padding: 10px 16px; background: rgba(26,18,16,.97); border-top: 1px solid var(--brass-dark); }
@media (max-width: 1100px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g2, .g3 { grid-template-columns: 1fr; } .app { grid-template-columns: 1fr; } .side { display: none; } }

/* ======================================================================= mode clair « parchemin » (23/11/2026)
   Activé par html[data-theme="light"] (bouton soleil / lune, choix gardé dans le navigateur). Le mode sombre reste
   celui par défaut : ce bloc ne fait que surcharger. */
html[data-theme="light"] {
    --paper: #2b1d0e; --paper-dim: #6b5536; --brass: #8a6424; --ink: #2b1d0e;
    --bg-paper: #efe1c0; --surface: rgba(255, 251, 240, .88); --soft: rgba(122, 90, 38, .08); --line: rgba(122, 90, 38, .35);
    color-scheme: light;
}
html[data-theme="light"] body { background: var(--bg-paper); color: var(--ink); }
html[data-theme="light"] a { color: #7a4a12; }
html[data-theme="light"] .rye { text-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 2px 6px rgba(122, 90, 38, .25); color: #4a2610; }
html[data-theme="light"] .brandbox .rye b, html[data-theme="light"] .login-card h1 b { color: #9a6a1f; }
html[data-theme="light"] .login { background: linear-gradient(rgba(241, 226, 194, .72), rgba(233, 216, 180, .9)), url(img/background.jpg) center/cover; }
html[data-theme="light"] .app { background: linear-gradient(rgba(241, 226, 194, .94), rgba(233, 216, 180, .97)), url(img/background.jpg) center/cover fixed; }
html[data-theme="light"] .panel { background: linear-gradient(170deg, #f6ead0, #e6d2a6); outline-color: rgba(122, 90, 38, .4); box-shadow: 0 18px 50px rgba(74, 38, 16, .35); }
html[data-theme="light"] .side { background: linear-gradient(180deg, #f3e5c4, #e5d0a3); }
html[data-theme="light"] .brandbox, html[data-theme="light"] .me { border-color: rgba(122, 90, 38, .45); }
html[data-theme="light"] .nav .grp { color: #8a6424; }
html[data-theme="light"] .nav a:hover { background: rgba(122, 90, 38, .1); }
html[data-theme="light"] .nav a.on { background: rgba(138, 100, 36, .2); box-shadow: inset 3px 0 0 #8a6424; }
html[data-theme="light"] .card { background: var(--surface); border-color: var(--line); box-shadow: 0 2px 10px rgba(74, 38, 16, .08); }
html[data-theme="light"] .card h3 { color: #6b4a1c; }
html[data-theme="light"] .top .crumb { color: #8a6424; }
html[data-theme="light"] .srv { background: var(--surface); border-color: var(--line); }
html[data-theme="light"] .field { background: #fffaf0; border-color: rgba(122, 90, 38, .45); color: var(--ink); }
html[data-theme="light"] .field::placeholder { color: #9a8462; }
html[data-theme="light"] .field:focus { border-color: #8a6424; box-shadow: 0 0 0 2px rgba(138, 100, 36, .15); }
html[data-theme="light"] .field.bad { background: #fde8e3; border-color: #b3261e; }
html[data-theme="light"] select.field option { background: #fffaf0; color: var(--ink); }
html[data-theme="light"] .btn { background: linear-gradient(180deg, #f0d59a, #c9a25c); color: var(--ink); border-color: #7a5a26; }
html[data-theme="light"] .btn.ghost { background: rgba(255, 255, 255, .55); color: var(--ink); border-color: rgba(122, 90, 38, .45); }
html[data-theme="light"] .btn.danger { background: #a3201a; color: #fff; border-color: #7a1712; }
html[data-theme="light"] .btn.ok { background: #e3eedb; color: #2f5a22; border-color: #7fae6a; }
html[data-theme="light"] .btn.discord { background: #5865f2; color: #fff; border-color: #3c45a5; }
html[data-theme="light"] .chip { background: rgba(255, 255, 255, .55); color: var(--ink); border-color: rgba(122, 90, 38, .4); }
html[data-theme="light"] .chip.on { background: linear-gradient(180deg, #f0d59a, #c9a25c); border-color: #7a5a26; }
html[data-theme="light"] .badge.ok { color: #2f5a22; background: #e3eedb; }
html[data-theme="light"] .badge.warn { color: #7a3f0c; background: #fbe6cf; }
html[data-theme="light"] .badge.red { color: #8e1b14; background: #fbe0db; }
html[data-theme="light"] .badge.dim { color: #6b5536; border-color: rgba(122, 90, 38, .4); }
html[data-theme="light"] .ktag.k-crash { color: #8e1b14; background: #fbe0db; }
html[data-theme="light"] .ktag.k-timeout, html[data-theme="light"] .ktag.k-overflow { color: #7a3f0c; background: #fbe6cf; }
html[data-theme="light"] .ktag.k-kick { color: #8e1b14; background: #f6d5d0; }
html[data-theme="light"] .killer, html[data-theme="light"] .range.bad, html[data-theme="light"] .statusline .err, html[data-theme="light"] .count.warn { color: #b3261e; }
html[data-theme="light"] .banner { background: #fbeedd; border-color: #d9822b; }
html[data-theme="light"] table.list th { color: #8a6424; border-bottom-color: rgba(122, 90, 38, .45); }
html[data-theme="light"] table.list td { border-bottom-color: rgba(122, 90, 38, .18); }
html[data-theme="light"] table.list tr.click:hover td { background: rgba(138, 100, 36, .08); }
html[data-theme="light"] table.list tr.sel td { background: rgba(138, 100, 36, .16); }
html[data-theme="light"] .item img, html[data-theme="light"] .item .noimg, html[data-theme="light"] .inv .slot,
html[data-theme="light"] .idcard .big, html[data-theme="light"] .kbd, html[data-theme="light"] .tagx { background: var(--soft); border-color: var(--line); }
html[data-theme="light"] .idcard .big { color: #6b4a1c; }
html[data-theme="light"] .inv .slot span, html[data-theme="light"] .pend .tag { color: #6b4a1c; }
html[data-theme="light"] .picker .opts, html[data-theme="light"] .toast { background: #fffaf0; border-color: #8a6424; box-shadow: 0 10px 30px rgba(74, 38, 16, .25); }
html[data-theme="light"] .picker .opt.hl, html[data-theme="light"] .picker .opt:hover { background: rgba(138, 100, 36, .15); }
html[data-theme="light"] .modal-bg { background: rgba(43, 29, 14, .35); }
html[data-theme="light"] .toggle { background: rgba(122, 90, 38, .18); }
html[data-theme="light"] .toggle::after { background: #fffaf0; }
html[data-theme="light"] .toggle.on { background: #cfe3c3; } html[data-theme="light"] .toggle.on::after { background: #4f8a3c; }
html[data-theme="light"] .dirtybar { background: rgba(246, 236, 214, .98); }
html[data-theme="light"] .price.changed { border-color: #8a6424; box-shadow: 0 0 0 2px rgba(138, 100, 36, .25); }
html[data-theme="light"] .bars div { background: linear-gradient(180deg, #d9b56e, #7a5a26); }
html[data-theme="light"] .stat.ok { border-left-color: #5f8f4c; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #b8955a; }

/* reports : discussion */
.tconv { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; margin-bottom: 10px; padding-right: 4px; }
.tmsg { padding: 8px 12px; border: 1px solid var(--line, rgba(201,162,92,.3)); background: rgba(0,0,0,.25); max-width: 80%; }
.tmsg.player { align-self: flex-start; }
.tmsg.staff { align-self: flex-end; background: rgba(201,162,92,.15); border-color: var(--brass-dark); }
.tmsg.note { align-self: flex-end; background: rgba(217,130,43,.12); border: 1px dashed var(--warn); }
.tmsg.system { align-self: center; background: none; border: 0; color: var(--paper-dim); font-style: italic; font-size: 13px; padding: 2px; }
.tmh { display: flex; gap: 12px; justify-content: space-between; font-size: 12px; color: var(--paper-dim); margin-bottom: 3px; }
.tmh b { color: var(--brass-light); } .tmsg.note .tmh b { color: #e0a060; }
.tmt { white-space: pre-wrap; word-break: break-word; }
html[data-theme="light"] .tmsg { background: rgba(255,255,255,.6); }
html[data-theme="light"] .tmsg.staff { background: #f3e3bd; } html[data-theme="light"] .tmsg.note { background: #fbeedd; }
html[data-theme="light"] .tmh b { color: #6b4a1c; } html[data-theme="light"] .tmsg.note .tmh b { color: #8a4a10; }

/* jauges (chevaux, machines) */
.gauge { height: 8px; background: rgba(0,0,0,.35); border: 1px solid var(--line, rgba(201,162,92,.3)); }
.gauge .fill { height: 100%; background: linear-gradient(90deg, var(--brass-dark), var(--brass)); }
.gauge .fill.ok { background: linear-gradient(90deg, #4f7a3e, var(--ok)); } .gauge .fill.warn { background: linear-gradient(90deg, #8a4a10, var(--warn)); }
html[data-theme="light"] .gauge { background: rgba(122,90,38,.12); }

/* bouton soleil / lune */
.theme-btn { background: none; border: 1px solid transparent; color: var(--paper-dim); cursor: pointer; padding: 4px 6px; font-size: 15px; }
.theme-btn:hover { color: var(--brass); border-color: var(--line, rgba(201,162,92,.35)); }
.theme-btn.floating { position: fixed; top: 16px; right: 16px; z-index: 50; background: rgba(0, 0, 0, .35); border-color: rgba(201, 162, 92, .4); color: var(--brass-light); padding: 7px 10px; }
html[data-theme="light"] .theme-btn.floating { background: rgba(255, 251, 240, .85); color: #6b4a1c; border-color: rgba(122, 90, 38, .45); }
.me .theme-btn { margin-left: auto; }

/* sacoche et réserves : image (ou icône de repli) au-dessus, nom en dessous */
.inv .slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.inv .slot img, .inv .slot .noimg { order: 0; }
.inv .slot small { order: 2; width: 100%; text-align: center; }

/* « Modifier avec l'IA » (24/11/2026) */
.aibox { margin-top: 14px; border: 1px dashed rgba(201,162,92,.55); background: rgba(201,162,92,.05); padding: 0 12px; }
.aibox[open] { padding-bottom: 12px; }
.aibox > summary { cursor: pointer; padding: 9px 0; color: var(--brass-light); font: 600 13.5px var(--ui); list-style: none; }
.aibox > summary::-webkit-details-marker { display: none; }
.aibox > summary::after { content: '▸'; float: right; color: var(--brass); }
.aibox[open] > summary::after { content: '▾'; }
.aibox > summary i { color: var(--brass); }
.aistep { display: flex; gap: 10px; margin-top: 10px; }
.aistep b { display: block; margin-bottom: 5px; font-size: 13px; }
.aistep .row { margin: 6px 0; }
.aino { flex: 0 0 24px; height: 24px; border: 1px solid var(--brass-dark); color: var(--brass-light); display: grid; place-items: center; font: 600 12px var(--ui); }
.field.mono { font: 12px/1.4 Consolas, 'Courier New', monospace; }
.aiout .lbl { margin-top: 8px; }
.aichg, .aierr { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.aichg li::marker { color: #7fae6a; } .aierr, .aierr li { color: #e0a060; }
