/* Le cockpit reutilise les controles du panel et le bundle local de l'editeur. */
.maps-guide { margin-top:20px; border:1px solid var(--control-border); border-radius:12px; background:var(--field); }
.maps-guide > summary { display:flex; align-items:center; gap:12px; padding:16px 18px; cursor:pointer; list-style:none; border-radius:12px; }
.maps-guide > summary::-webkit-details-marker { display:none; }
.maps-guide > summary:hover { background:var(--warning-bg); }
.maps-guide-icon { display:grid; place-items:center; flex:0 0 32px; height:32px; border-radius:10px; background:var(--warning-bg); color:var(--accent-text); font-size:17px; font-weight:700; }
.maps-guide-heading { display:grid; gap:4px; min-width:0; }
.maps-guide-heading strong { font-size:14px; color:var(--fg); }
.maps-guide-heading > span { font-size:12px; color:var(--muted); }
.maps-guide-chevron { flex:0 0 8px; width:8px; height:8px; margin-left:auto; margin-right:4px; border-right:1.5px solid var(--muted); border-bottom:1.5px solid var(--muted); transform:rotate(45deg); transition:transform .18s ease; }
.maps-guide[open] .maps-guide-chevron { transform:rotate(225deg); }
.maps-guide-body { padding:0 18px 18px; }
.maps-guide-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; padding-top:18px; border-top:1px solid var(--control-border); }
.maps-guide-section { min-width:0; }
.maps-guide-section h3 { display:flex; align-items:center; gap:8px; margin:0 0 14px; font-size:13px; text-transform:none; letter-spacing:normal; color:var(--fg); }
.maps-guide-section h3 > span { display:grid; place-items:center; width:22px; height:22px; border-radius:6px; background:var(--warning-bg); color:var(--accent-text); font-size:16px; }
.maps-guide-section ol { display:grid; gap:12px; margin:0; padding-left:24px; font-size:13px; line-height:1.65; }
.maps-guide-section li { padding-left:4px; }
.maps-guide-section li::marker { color:var(--accent-text); font-weight:700; }
.maps-guide-note { margin:18px 0 0; padding:12px 14px; border-left:3px solid var(--accent-text); border-radius:0 6px 6px 0; background:var(--warning-bg); color:var(--muted); font-size:12px; line-height:1.6; }
@media(max-width:750px) { .maps-guide-columns { grid-template-columns:minmax(0,1fr); } }
@media(prefers-reduced-motion:reduce) { .maps-guide-chevron { transition:none; } }
.custom-select { display:inline-flex; position:relative; width:max-content; min-width:0; max-width:100%; padding:0; border:0; background:transparent; vertical-align:middle; }
.custom-select[hidden] { display:none; }
.actions { align-items:center; }
.actions > label { margin:0; align-self:center; }
#ws-category-manager .category-form-row { display:grid; grid-template-columns:140px minmax(0,1fr) auto; gap:12px; align-items:center; }
#ws-category-manager .category-form-row > label { margin:0; }
#ws-category-manager .category-form-row input,
#ws-category-manager .category-form-row .custom-select { width:100%; min-width:0; box-sizing:border-box; }
#ws-category-manager .category-delete-row { margin-left:152px; }
@media(max-width:650px) {
  #ws-category-manager .category-form-row { grid-template-columns:minmax(0,1fr); gap:8px; }
  #ws-category-manager .category-delete-row { margin-left:0; }
}
.custom-select-native { position:absolute; width:1px!important; height:1px!important; min-height:0!important; padding:0!important; opacity:0; pointer-events:none; }
.custom-select-trigger { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; min-height:40px;
  padding:9px 12px; background:var(--field); color:var(--fg); border:1px solid var(--control-border); font:inherit; text-align:left; }
.custom-select-trigger > span:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.custom-select-arrow { display:grid; place-items:center; flex:0 0 16px; width:16px; height:16px;
  transition:transform .15s ease, color .15s ease; color:var(--muted); }
.custom-select-arrow::before { content:""; width:7px; height:7px; box-sizing:border-box;
  border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:translateY(-2px) rotate(45deg); }
.custom-select-trigger:hover .custom-select-arrow,
.custom-select-trigger:focus-visible .custom-select-arrow { color:var(--fg); }
.custom-select-trigger[aria-expanded="true"] .custom-select-arrow { transform:rotate(180deg); }
.custom-select-popup { position:fixed; inset:auto; margin:0; box-sizing:border-box; z-index:1000; overflow-y:auto;
  padding:6px; border:1px solid var(--border); border-radius:10px; background:var(--card); color:var(--fg);
  box-shadow:0 12px 30px var(--shadow); opacity:0; transform:translateY(-6px) scale(.98);
  transition:opacity .15s ease, transform .15s ease; transform-origin:top; }
.custom-select-popup[data-state="open"] { opacity:1; transform:translateY(0) scale(1); }
.custom-select-popup[hidden] { display:none; }
.custom-select-option { padding:9px 12px; border-radius:6px; line-height:1.5; cursor:pointer; overflow-wrap:anywhere; }
.custom-select-option:hover, .custom-select-option.highlighted { background:var(--warning-bg); }
.custom-select-option[aria-selected="true"] { color:var(--accent-text); font-weight:700; }
.custom-select-option[aria-disabled="true"] { opacity:.45; cursor:not-allowed; }
.custom-select-group { padding:8px 12px 4px; color:var(--muted); font-size:11px; font-weight:700; }
@media(prefers-reduced-motion:reduce) { .custom-select-popup, .custom-select-arrow { transition:none; } }
#schedule-form > select,
#schedule-form > .custom-select,
#schedule-form > input,
#schedule-form > button { height:40px; min-height:40px; box-sizing:border-box; margin-top:0; align-self:center; }
:root, :root[data-theme="dark"] {
  --bg:#111418; --card:#191d23; --field:#12161c; --tile:#20262e;
  --fg:#eef0f4; --muted:#a0aab9; --border:#303844; --topbar:#111418;
  --accent:#e5b151; --accent-text:#e5b151; --chart-line:#e5b151;
  --ok:#6bd69a; --status-danger:#ff958b; --danger:#a83229;
  --console:#12161c; --grid:#303844; --button-text:#181309;
}
:root[data-theme="light"] {
  --bg:#eef1f5; --card:#fff; --field:#fff; --tile:#f5f7fa;
  --fg:#222b38; --muted:#526073; --border:#ccd3dd; --topbar:#eef1f5;
  --accent:#e5b151; --accent-text:#805600; --chart-line:#93640c;
  --ok:#197044; --status-danger:#b32e25; --danger:#b32e25;
  --console:#f5f7fa; --grid:#d7dee7;
}
body { font-size:14px; line-height:1.55; }
a { text-decoration:none; }
a:hover { text-decoration:underline; }
button, .button-link { border-radius:7px; min-height:38px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline:3px solid var(--accent-text); outline-offset:3px; }
button:disabled { cursor:not-allowed; }
input[type="search"], .guided-grid input:not([type="checkbox"]) { color:var(--fg); background:var(--field); border:1px solid var(--control-border); padding:10px 12px; font:inherit; }
.actions button.primary { width:auto; }
input:not([type="checkbox"]), select { min-height:40px; border-radius:7px; }
.skip-link { position:fixed; left:12px; top:-90px; padding:12px; background:var(--accent); color:var(--button-text); z-index:100; }
.skip-link:focus { top:12px; }
.sidebar { position:fixed; inset:0 auto 0 0; width:248px; display:flex; flex-direction:column; gap:26px; padding:27px 18px 18px; background:var(--card); border-right:1px solid var(--border); overflow:auto; z-index:20; }
.server-switch small, .sidebar-footer small { display:block; font-size:11px; font-weight:400; color:var(--muted); margin-top:3px; }
.server-switch { display:flex; gap:10px; align-items:center; border:1px solid var(--border); border-radius:10px; padding:13px 10px; min-width:0; }
.server-switch strong { overflow-wrap:anywhere; font-size:13px; }
.server-avatar { width:34px; height:34px; display:grid; place-items:center; border-radius:8px; color:var(--accent-text); background:var(--tile); font-weight:700; font-size:11px; flex-shrink:0; }
.sidebar .tabs { display:flex; flex-direction:column; gap:4px; position:static; padding:0; border:0; background:transparent; overflow:visible; }
.sidebar .tabs a { display:flex; align-items:center; gap:11px; color:var(--muted); border:0; border-radius:8px; padding:11px 12px; font-size:14px; white-space:normal; }
.sidebar .tabs a:hover { background:var(--tile); color:var(--fg); text-decoration:none; }
.sidebar .tabs a.active { color:var(--accent-text); background:var(--warning-bg); font-weight:600; }
.sidebar .tabs a .badge { margin-left:auto; }
.nav-icon { width:19px; flex-shrink:0; text-align:center; font-size:20px; line-height:1; font-weight:400; }
.nav-label { display:block; color:var(--muted); font-size:10px; letter-spacing:1.5px; margin:10px 12px 6px; }
.sidebar-footer { margin-top:auto; border-top:1px solid var(--border); padding:13px 10px 0; }
.sidebar-footer .nav-label { margin-left:0; }
.sidebar-footer a { color:var(--fg); }
.sidebar-footer form { margin:13px 0; }
.sidebar-footer button { font-size:12px; }
.workspace { margin-left:248px; min-width:0; }
.workspace .topbar { min-height:77px; padding:16px 32px; background:var(--bg); border-bottom:1px solid var(--border); flex-wrap:nowrap; z-index:10; }
.topbar-location { display:flex; align-items:center; gap:12px; color:var(--muted); font-size:13px; }
.topbar-location { min-width:0; }
#breadcrumb { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nav-icon svg, .quick-actions svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.topbar .right { gap:12px; }
.topbar #search-button { color:var(--muted); font-size:12px; background:var(--card); }
kbd { margin-left:14px; padding:2px 5px; border:1px solid var(--border); border-radius:4px; font-size:10px; color:var(--muted); }
.topbar .user { border:1px solid var(--border); background:var(--card); border-radius:50px; padding:8px 13px; font-weight:600; max-width:130px; overflow:hidden; text-overflow:ellipsis; }
.workspace main { padding:32px; max-width:1700px; }
.page-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:24px; }
.eyebrow { display:block; color:var(--muted); letter-spacing:1.4px; font-size:10px; font-weight:650; margin-bottom:8px; }
.page-heading h1 { margin:0; font-size:28px; font-weight:650; letter-spacing:-.6px; line-height:1.3; }
.page-heading p { margin:9px 0 0; color:var(--muted); font-size:13px; }
.subnav { display:flex; flex-wrap:wrap; gap:22px; margin:0 0 24px; border-bottom:1px solid var(--border); }
.subnav a { color:var(--muted); padding:0 2px 12px; font-size:13px; border-bottom:2px solid transparent; }
.subnav a[aria-current="page"] { color:var(--accent-text); border-color:var(--accent-text); font-weight:600; }
.tab-panel { gap:22px; margin-bottom:22px; }
.card { padding:23px; border-radius:12px; min-width:0; }
.card h2 { font-size:16px; font-weight:650; }
.card h3 { font-size:11px; }
.wide { grid-column:1 / -1; }
.hero { display:flex; align-items:center; justify-content:space-between; gap:22px; border-color:var(--badge-ok-border); background:linear-gradient(110deg, var(--card), var(--tile)); }
.hero h2 { font-size:24px; margin-bottom:6px; }
.hero p { margin:0; font-size:13px; }
.hero[data-state="down"] { border-color:var(--error-border); }
.hero[data-state="busy"] { border-color:var(--warning-border); }
.button-link { display:inline-flex; align-items:center; justify-content:center; padding:9px 17px; white-space:nowrap; }
.button-link.primary { background:var(--accent); color:var(--button-text); font-weight:650; }
.button-link:hover { text-decoration:none; }
.tiles { gap:15px; }
#home-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tile { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:19px; }
.tile-value { font-size:29px; font-weight:650; margin:6px 0; letter-spacing:-.6px; }
.tile-label { font-size:12px; }
.tile-sub { font-size:11px; }
.quick-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.quick-actions a { display:grid; grid-template-columns:36px minmax(0,1fr); column-gap:10px; padding:17px; border:1px solid var(--border); border-radius:10px; background:var(--card); color:var(--fg); }
.quick-actions a:hover { border-color:var(--accent-text); text-decoration:none; }
.quick-actions span { grid-row:1 / 3; display:grid; place-items:center; background:var(--tile); border-radius:8px; color:var(--accent-text); font-size:24px; }
.quick-actions strong { font-size:13px; }
.quick-actions small { color:var(--muted); font-size:11px; margin-top:4px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:15px; }
.section-heading h2 { margin:0; }
.section-heading a { font-size:12px; }
.home-list { display:grid; gap:0; }
.home-item { display:flex; gap:10px; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); min-width:0; }
.home-item:last-child { border-bottom:0; }
.home-item>div { flex:1; min-width:0; }
.home-item strong, .home-item small { display:block; overflow-wrap:anywhere; }
.home-item strong { font-size:13px; font-weight:600; }
.home-item small { font-size:11px; color:var(--muted); margin-top:3px; }
.home-item .badge { margin-left:auto; }
.home-avatar { display:grid; place-items:center; width:33px; height:33px; border-radius:9px; color:var(--accent-text); background:var(--tile); flex-shrink:0; font-size:12px; font-weight:650; }
.page-footer { display:flex; justify-content:space-between; gap:16px; color:var(--muted); font-size:11px; padding:0 32px 24px; }
.scheduled-banner { display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid var(--warning-border); padding:12px 32px; background:var(--warning-bg); color:var(--warning-text); font-size:13px; }
.scheduled-banner a { white-space:nowrap; font-size:12px; }
.hint { font-size:12px; line-height:1.65; }
.table-wrap { max-height:65vh; border-radius:7px; }
.table-wrap.short { max-height:420px; }
table.mods { font-size:13px; }
table.mods td { padding:14px 10px; }
table.mods th { font-size:11px; padding:11px 10px; letter-spacing:.2px; }
table.mods tbody tr:hover { background:var(--tile); }
html { scrollbar-gutter:stable; }
.mods-table-wrap { scrollbar-gutter:stable; overflow-y:scroll; }
#mods-table { table-layout:fixed; min-width:1000px; }
#mods-table .mods-col-name { width:24%; }
#mods-table .mods-col-download { width:16%; }
#mods-table .mods-col-ids { width:30%; }
#mods-table .mods-col-size { width:8%; }
#mods-table .mods-col-actions { width:22%; }
#mods-table td { overflow-wrap:anywhere; }
#mods-table td:nth-child(2) { white-space:normal; }
#mods-table td:nth-child(2) .badge { white-space:nowrap; }
.mod-activation { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.mod-activation + small { display:block; margin-top:5px; }
.mod-row-actions { display:flex; gap:8px; flex-wrap:wrap; }
.mod-id-choices { display:flex; flex-wrap:wrap; gap:8px; min-width:0; }
#mods-table .badge { display:inline-flex; align-items:center; line-height:1.55; }
.mod-id-tag { min-height:0; padding:2px 10px; font-family:inherit; line-height:1.55; overflow-wrap:anywhere; }
.mod-row-content { min-width:0; }
.mod-id-tag[aria-pressed="true"] { background:#ea8a23; color:#211407; border-color:#ea8a23; }
.mod-id-tag:not(:disabled):hover { filter:brightness(1.12); }
.mod-id-tag:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
#mods-table .mod-category-group th { position:static; background:var(--warning-bg); padding:0;
  text-align:left; border-top:2px solid var(--warning-border); border-left:4px solid var(--accent); }
.mod-category-toggle { display:flex; align-items:center; gap:10px; width:100%; padding:15px 16px;
  text-align:left; background:transparent; color:var(--accent-text); font-size:13px; font-weight:700; }
.mod-category-toggle:hover { background:var(--warning-bg); }
#mods-table tr[hidden] { display:none; }
#mods-disk-hint:empty, #ml-alerts:empty, #ml-msg:empty { display:none; }
.mods-savebar[hidden] { display:none; }
.modid { max-width:260px; overflow-wrap:anywhere; white-space:normal; }
.mod-detail-button { padding:0; background:transparent; border:0; text-align:left; color:var(--fg); font-weight:600; min-height:32px; }
.workshop-catalog { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:18px; margin-top:22px; }
.workshop-card { display:flex; flex-direction:column; padding:20px; border:1px solid var(--border); border-radius:10px; background:var(--field); gap:13px; min-width:0; }
.workshop-card h3 { margin:0; color:var(--fg); font-size:16px; text-transform:none; letter-spacing:0; }
.workshop-card h3 a { color:var(--fg); }
.workshop-card .ws-desc { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; margin:0; }
.workshop-card .actions { margin:auto 0 0; padding-top:10px; justify-content:space-between; }
.workshop-tags { display:flex; flex-wrap:wrap; gap:6px; }
.workshop-card .workshop-actions { align-items:center; justify-content:flex-start; gap:8px; }
.workshop-card .workshop-actions > a,
.workshop-card .workshop-actions > button,
.workshop-card .workshop-cleanup > button { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; height:38px; min-height:38px; min-width:88px; margin:0; padding:0 12px; font-family:inherit; font-size:12.5px; font-weight:600; line-height:1; white-space:nowrap; }
.workshop-card .workshop-cleanup { margin:0; padding:0; }
.workshop-delete-hint { margin:0; }
.workshop-filter .hint { flex:1 1 260px; }
.workshop-filter select { max-width:100%; }
.workshop-meta { display:flex; gap:12px; flex-wrap:wrap; color:var(--muted); font-size:11px; }
.heatmap-table { border-collapse:separate; border-spacing:4px; min-width:700px; width:100%; font-size:10px; }
.heatmap-table th { color:var(--muted); font-weight:400; white-space:nowrap; }
.heatmap-table td { border-radius:3px; text-align:center; background:var(--tile); min-width:20px; height:24px; }
.heatmap-table td[data-density="1"] { background:var(--warning-bg); }
.heatmap-table td[data-density="2"] { background:var(--accent); color:var(--button-text); }
.heatmap-table td[data-density="3"] { background:var(--accent-text); color:var(--bg); font-weight:650; }
button.modid { min-height:30px; }
.badge { border-radius:5px; font-size:11px; }
.stats { gap:12px; }
.stat { border-radius:8px; }
.player-search { display:flex; align-items:center; gap:12px; font-size:12px; margin-bottom:18px; }
.player-search input { min-width:160px; flex:1; max-width:420px; }
.mods-savebar { position:fixed; bottom:18px; left:280px; right:32px; z-index:6; box-shadow:0 12px 35px var(--shadow); border-color:var(--warning-border); }
.mods-savebar h2 { margin-bottom:8px; font-size:13px; }
.mods-savebar .actions { margin:10px 0; }
.mods-savebar #ml-source, .mods-savebar #ml-cache { font-size:11px; }
.mods-savebar.clean { position:static; box-shadow:none; border-color:var(--border); }
.mods-savebar:not(.clean) #ml-source, .mods-savebar:not(.clean) #ml-cache { display:none; }
.workspace main:has(#tab-liste-mods:not([hidden]) .mods-savebar:not(.clean)) { padding-bottom:240px; }
.danger-zone { padding:4px 0; }
.danger-zone>summary { cursor:pointer; color:var(--status-danger); font-weight:600; padding:9px 0; }
.download-details>summary { cursor:pointer; font-weight:600; }
.danger-zone h2 { margin-top:16px; }
.guided-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; margin:24px 0; }
.guided-grid label { display:grid; gap:7px; font-size:13px; }
.guided-grid label small { color:var(--muted); font-size:11px; }
.guided-grid input, .guided-grid select { width:100%; padding:9px 12px; }
.guided-grid label:has(input[type="checkbox"]) { display:flex; flex-wrap:wrap; align-items:center; }
.guided-grid input[type="checkbox"] { width:19px; height:19px; }
.guided-grid label:has(input[type="checkbox"]) small { width:100%; }
.console { padding:18px; border-radius:9px; font-size:12px; line-height:1.75; }
#rcon-output { min-height:300px; white-space:pre-wrap; overflow-wrap:anywhere; }
#logs-output { min-height:45vh; }
dialog { background:var(--card); color:var(--fg); border:1px solid var(--border); border-radius:12px; padding:26px; width:min(550px,calc(100% - 32px)); max-height:90dvh; box-shadow:0 20px 65px var(--shadow); }
dialog::backdrop { background:var(--backdrop); }
dialog h2 { font-size:20px; margin:0 0 18px; }
#confirm-detail { white-space:pre-wrap; font-size:13px; color:var(--muted); line-height:1.75; }
#confirm-dialog .actions { justify-content:flex-end; margin:24px 0 0; }
#command-palette { margin-top:12vh; }
#palette-query { width:100%; padding:10px; }
#palette-results { margin-top:12px; max-height:45vh; overflow:auto; }
#palette-results a { display:flex; justify-content:space-between; gap:12px; padding:12px 10px; color:var(--fg); border-radius:6px; font-size:13px; }
#palette-results a:hover, #palette-results a:focus { background:var(--tile); text-decoration:none; }
#palette-results small { color:var(--muted); }
dialog#player-dialog { position:fixed; inset:0 0 0 auto; width:min(570px,100%); height:100dvh; max-height:100dvh; margin:0; border-radius:0; padding:28px; border:0; border-left:1px solid var(--border); overflow-y:auto; }
.player-tabs { display:flex; gap:14px; border-bottom:1px solid var(--border); margin:22px 0 18px; flex-wrap:wrap; }
.player-tabs button { background:transparent; border:0; border-bottom:2px solid transparent; border-radius:0; font-size:12px; color:var(--muted); padding:8px 2px; }
.player-tabs button[aria-selected="true"] { color:var(--accent-text); border-color:var(--accent-text); }
.mobile-only { display:none; }
#menu-backdrop { position:fixed; inset:0; border:0; border-radius:0; z-index:18; background:#0008; }
.login-body { background:radial-gradient(ellipse at top, var(--warning-bg), transparent 65%), var(--bg); }
.login-card { border-radius:15px; padding:32px; width:min(430px,calc(100% - 32px)); box-shadow:0 20px 65px var(--shadow); }
.login-card>.logo { background:var(--accent); color:var(--button-text); border:0; border-radius:12px; }
.login-card h1 { font-size:25px; margin-top:20px; }
.login-card .sub { margin:10px 0 26px; }
.login-card label { font-size:13px; }
.login-card input, .login-card button { min-height:44px; }
@media(min-width:1100px) { .tab-panel { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:1250px) { .sidebar { width:218px; padding:24px 12px; } .workspace { margin-left:218px; } .workspace main { padding:25px; } .workspace .topbar { padding:16px 25px; } .quick-actions { grid-template-columns:1fr; } .quick-actions a { padding:13px; } #search-button kbd { display:none; } .mods-savebar { left:243px; right:25px; } }
@media(max-width:980px) { #home-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .topbar .right { gap:8px; } .topbar .user { display:none; } .guided-grid { grid-template-columns:1fr; } }
@media(max-width:760px) {
  .sidebar { transform:translateX(-100%); width:255px; transition:transform .18s ease; }
  .sidebar.open { transform:translateX(0); }
  .workspace { margin:0; }
  .workspace .topbar { min-height:66px; padding:12px 16px; }
  .topbar #search-button { font-size:0; min-width:37px; }
  .topbar #search-button::after { content:"⌕"; font-size:22px; }
  .topbar #theme-label { display:none; }
  .topbar-location { font-size:12px; }
  #top-status { font-size:11px; max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-only { display:inline-flex; }
  .workspace main { padding:23px 16px; }
  .page-heading { align-items:flex-start; gap:12px; }
  .page-heading h1 { font-size:25px; }
  .page-heading p { font-size:12px; }
  #cockpit-refresh { padding:8px; font-size:11px; }
  .card { padding:18px; }
  .tab-panel { grid-template-columns:1fr; gap:16px; }
  .tiles { gap:10px; }
  .tile { padding:14px; }
  .tile-value { font-size:25px; }
  .hero { flex-wrap:wrap; padding:20px; }
  .hero h2 { font-size:22px; }
  .hero .button-link { width:100%; }
  .page-footer { padding:0 16px 20px; flex-wrap:wrap; }
  .scheduled-banner { padding:12px 16px; flex-wrap:wrap; }
  .subnav { gap:18px; }
  .subnav a { font-size:12px; }
  .mods-savebar { bottom:10px; left:16px; right:16px; }
  .mods-savebar .actions { gap:8px; }
  .mods-savebar button { font-size:12px; }
  dialog#player-dialog { padding:23px; }
  .filters label { min-width:130px; }
  .player-search { flex-wrap:wrap; }
}
@media(pointer:coarse) { button, .button-link, .sidebar .tabs a { min-height:44px; } input:not([type="checkbox"]), select, textarea { font-size:16px; } }
@media(max-width:430px) { #top-status { display:none; } }
.workshop-toolbar { flex-wrap:wrap; gap:12px; margin:16px 0; }
.workshop-toolbar button.primary { width:auto; }
.workshop-catalog.workshop-list { display:block; }
.workshop-list .table-scroll { overflow-x:auto; max-width:100%; border:1px solid var(--border); border-radius:12px; }
.workshop-list-table { width:100%; min-width:960px; table-layout:fixed; border-collapse:collapse; text-align:left; font-size:13px; }
.workshop-list-table .ws-col-select { width:80px; }
.workshop-list-table .ws-col-state { width:290px; }
.workshop-list-table .ws-col-size { width:100px; }
.workshop-list-table .ws-col-actions { width:285px; }
.workshop-list-table th { padding:13px 16px; background:var(--tile); color:var(--muted); font-size:11px; font-weight:650; text-align:left; text-transform:uppercase; letter-spacing:.06em; border-bottom:1px solid var(--border); }
.workshop-list-table td { padding:14px 16px; vertical-align:middle; border-bottom:1px solid var(--border); background:var(--card); overflow-wrap:anywhere; }
.workshop-list-table tr:last-child td { border-bottom:0; }
.workshop-list-table tbody tr:nth-child(even) td { background:var(--tile); }
.workshop-list-table tbody tr:hover td { background:var(--badge-bg); }
.workshop-list-table tbody tr:has(input:checked) td { background:var(--warning-bg); }
.workshop-list-table tbody tr:has(input:checked) td:first-child { box-shadow:inset 3px 0 var(--accent); }
.workshop-list-table th:first-child, .workshop-list-table td:first-child { text-align:center; }
.workshop-list-table input[type=checkbox] { width:18px; height:18px; margin:0; vertical-align:middle; accent-color:var(--accent); cursor:pointer; }
.workshop-list-table .num { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.workshop-list-table .ws-mod-name { display:inline-block; color:var(--fg); font-size:14px; font-weight:600; line-height:1.45; text-decoration:none; }
.workshop-list-table .ws-mod-name:hover { color:var(--accent-text); text-decoration:underline; }
.workshop-list-table .hint { margin:4px 0 0; font-size:12px; line-height:1.5; }
.workshop-list-table .ws-state-badges { display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
.workshop-list-table .badge { margin:0; }
.workshop-list-table .actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:8px; margin:0; }
.workshop-list-table .actions button { margin:0; min-height:34px; padding:7px 10px; width:auto; font-size:12px; line-height:1.35; }
@media(pointer:coarse) { .workshop-list-table .actions button { min-height:44px; } }
.workshop-select { margin-bottom:12px; }
#ws-feedback { white-space:pre-line; }
#confirm-detail { max-height:55dvh; overflow-y:auto; padding-right:8px; }

/* Mouvements courts : feedback immediat sans ralentir les actions. */
button, .button-link, a.dl, .sidebar .tabs a, .subnav a,
input, select, textarea, .workshop-card {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease,
    box-shadow .16s ease, opacity .16s ease, transform .16s ease;
}
@media(hover:hover) {
  button:not(:disabled):hover, .button-link:hover, a.dl:hover { transform:translateY(-1px); }
  .workshop-card:hover { border-color:var(--control-border); box-shadow:0 4px 16px var(--shadow); }
}
button:not(:disabled):active, .button-link:active, a.dl:active { transform:translateY(1px) scale(.98); }
.tab-panel:not([hidden]), [data-view]:not([hidden]) { animation:ui-enter .2s ease-out; }
dialog[open] { animation:ui-enter .18s ease-out; }
dialog[open]::backdrop { animation:ui-fade .18s ease-out; }
.ui-tooltip:popover-open { animation:ui-enter .12s ease-out; }
.loading { opacity:.65; transition:opacity .16s ease; }
.action-feedback:not(:empty) {
  margin:12px 0; padding:12px 16px; border-left:3px solid var(--accent);
  border-radius:8px; background:var(--tile); color:var(--fg); font-size:14px;
}
body::after {
  content:""; position:fixed; top:0; left:0; width:100%; height:3px;
  z-index:10000; pointer-events:none; opacity:0;
  background:linear-gradient(90deg, transparent, var(--accent), transparent);
  transition:opacity .15s ease;
}
body.network-busy::after { opacity:1; animation:ui-progress 1.1s ease-in-out infinite; }
@keyframes ui-enter { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
@keyframes ui-fade { from { opacity:0; } to { opacity:1; } }
@keyframes ui-progress { from { transform:translateX(-70%); } to { transform:translateX(70%); } }
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  button:not(:disabled):hover, button:not(:disabled):active, .button-link:hover,
  .button-link:active, a.dl:hover, a.dl:active { transform:none; }
}

/* Navigation compacte sur ordinateur ; le tiroir mobile reste complet. */
.sidebar-toggle { align-self:flex-end; display:flex; align-items:center; justify-content:center; padding:8px; margin-bottom:-18px; }
.sidebar-toggle svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
@media(min-width:761px) {
  .sidebar-collapsed .sidebar { width:72px; padding-left:10px; padding-right:10px; gap:20px; }
  .sidebar-collapsed .workspace { margin-left:72px; }
  .sidebar-collapsed .sidebar-toggle { align-self:center; }
  .sidebar-collapsed .sidebar-toggle svg { transform:rotate(180deg); }
  .sidebar-collapsed .server-switch,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .nav-text,
  .sidebar-collapsed .sidebar .tabs .badge,
  .sidebar-collapsed .sidebar-footer { display:none; }
  .sidebar-collapsed .sidebar .tabs a { justify-content:center; padding:12px 0; gap:0; }
  .sidebar-collapsed .mods-savebar { left:104px; }
}
@media(min-width:761px) and (max-width:1250px) {
  .sidebar-collapsed .mods-savebar { left:97px; }
}
@media(max-width:760px) { .sidebar-toggle { display:none; } }

@media print { .sidebar, .topbar, .subnav, .page-footer, .mods-savebar { display:none!important; } .workspace { margin:0; } .workspace main { padding:0; } .card { break-inside:avoid; } }

.language-choice { display:inline-flex; align-items:center; gap:8px; white-space:nowrap; font-size:12px; }
.language-choice > .select { width:auto; min-width:90px; }
.login-card > .language-choice { justify-content:flex-end; margin:0 0 16px; }
@media(max-width:760px) {
  .topbar .right { flex-wrap:wrap; }
  .topbar .language-choice { gap:4px; }
}
