/* Site staff Zone Axios — fond animé (vraies images du serveur), panneaux en verre, animations douces. */
:root {
  --bg: #0a0d11;
  --surface: rgba(19, 23, 29, .72);
  --surface-solid: #161b21;
  --surface-2: rgba(36, 43, 53, .55);
  --surface-3: rgba(58, 67, 80, .5);
  --border: rgba(255, 255, 255, .075);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #eef1f5;
  --text-2: #b4bdc9;
  --text-3: #818c9a;
  --accent: #2a8db3;
  --accent-hover: #35a2cb;
  --accent-text: #67c2e4;
  --accent-soft: rgba(42, 141, 179, .18);
  --red: #ef6158;
  --orange: #e3a33a;
  --green: #45b874;
  --blue: #5aa3e2;
  --purple: #a681e3;
  --teal: #36bdad;
  --gray: #8e98a6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .28);
  --glass: blur(18px) saturate(1.25);
  --shade: linear-gradient(180deg, rgba(8, 11, 15, .80) 0%, rgba(8, 11, 15, .88) 45%, rgba(8, 11, 15, .95) 100%);
  --shade-login: linear-gradient(180deg, rgba(8, 11, 15, .35) 0%, rgba(8, 11, 15, .55) 60%, rgba(8, 11, 15, .85) 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", ui-monospace, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef1f5; --surface: rgba(255, 255, 255, .80); --surface-solid: #ffffff; --surface-2: rgba(244, 246, 249, .78); --surface-3: rgba(226, 231, 237, .8);
    --border: rgba(16, 24, 36, .08); --border-strong: rgba(16, 24, 36, .15);
    --text: #18202a; --text-2: #4a5462; --text-3: #788292;
    --accent: #1d7da1; --accent-hover: #186a89; --accent-text: #186f90; --accent-soft: rgba(29, 125, 161, .12);
    --shadow: 0 18px 50px rgba(20, 30, 45, .18); --shadow-sm: 0 6px 18px rgba(20, 30, 45, .10);
    --shade: linear-gradient(180deg, rgba(238, 241, 245, .84) 0%, rgba(238, 241, 245, .9) 50%, rgba(238, 241, 245, .95) 100%);
    --shade-login: linear-gradient(180deg, rgba(10, 14, 19, .25) 0%, rgba(10, 14, 19, .45) 60%, rgba(10, 14, 19, .75) 100%);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #eef1f5; --surface: rgba(255, 255, 255, .80); --surface-solid: #ffffff; --surface-2: rgba(244, 246, 249, .78); --surface-3: rgba(226, 231, 237, .8);
  --border: rgba(16, 24, 36, .08); --border-strong: rgba(16, 24, 36, .15);
  --text: #18202a; --text-2: #4a5462; --text-3: #788292;
  --accent: #1d7da1; --accent-hover: #186a89; --accent-text: #186f90; --accent-soft: rgba(29, 125, 161, .12);
  --shadow: 0 18px 50px rgba(20, 30, 45, .18); --shadow-sm: 0 6px 18px rgba(20, 30, 45, .10);
  --shade: linear-gradient(180deg, rgba(238, 241, 245, .84) 0%, rgba(238, 241, 245, .9) 50%, rgba(238, 241, 245, .95) 100%);
  --shade-login: linear-gradient(180deg, rgba(10, 14, 19, .25) 0%, rgba(10, 14, 19, .45) 60%, rgba(10, 14, 19, .75) 100%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
select option { background: var(--surface-solid); color: var(--text); }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.spacer { flex: 1; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--text-3); position: relative; z-index: 1; }
#app { position: relative; z-index: 1; }

/* ---------- décor : vraies images du serveur, fondu enchaîné + lent travelling */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #07090c; }
.scene-img {
  position: absolute; inset: -4%; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 2.4s ease;
  animation: drift 46s ease-in-out infinite alternate;
}
.scene-img.on { opacity: 1; }
.scene-img.b { animation-delay: -23s; }
.scene-shade { position: absolute; inset: 0; background: var(--shade); transition: background .8s; }
.scene-grain {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(42, 141, 179, .10), transparent 55%), radial-gradient(ellipse at 100% 100%, rgba(0, 0, 0, .35), transparent 60%);
}
body.is-login .scene-shade { background: var(--shade-login); }
.scene-caption {
  position: fixed; left: 22px; bottom: 18px; z-index: 1; color: rgba(255, 255, 255, .78); font-size: 12px; letter-spacing: .3px;
  display: none; align-items: center; gap: 8px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); transition: opacity .6s;
}
body.is-login .scene-caption { display: flex; }
.scene-caption .dot { width: 7px; height: 7px; border-radius: 50%; background: #ef6158; animation: blink 2s ease-in-out infinite; }
@keyframes drift {
  0% { transform: scale(1.04) translate3d(0, 0, 0); }
  100% { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
}
@keyframes blink { 50% { opacity: .25; } }

/* ---------- animations générales */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes checkpop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes donepulse { 0% { box-shadow: 0 0 0 0 rgba(69, 184, 116, .55); } 100% { box-shadow: 0 0 0 14px rgba(69, 184, 116, 0); } }

.main > * { animation: rise .5s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: .05s; }
.main > *:nth-child(3) { animation-delay: .1s; }
.main > *:nth-child(4) { animation-delay: .15s; }
.main > *:nth-child(5) { animation-delay: .2s; }
.main > *:nth-child(n+6) { animation-delay: .25s; }
.stagger > * { animation: rise .45s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .04s; }
.stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .16s; }
.stagger > *:nth-child(6) { animation-delay: .2s; }
.stagger > *:nth-child(7) { animation-delay: .24s; }
.stagger > *:nth-child(n+8) { animation-delay: .28s; }

/* ---------- mise en page */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; transition: transform .6s var(--ease); }
.brand:hover img { transform: rotate(60deg); }
.brand b { display: block; font-size: 15px; letter-spacing: .2px; }
.brand span { display: block; font-size: 12px; color: var(--text-3); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-3); padding: 16px 12px 6px; font-weight: 600; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; transition: background .2s, color .2s, transform .2s;
}
.nav a::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); transform: scaleY(0); transition: transform .25s var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; transform: translateX(2px); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.nav a.active::before { transform: scaleY(1); }
.nav a .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 20px; padding: 0 7px; line-height: 18px; }
.side-user {
  margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.side-user .who { min-width: 0; flex: 1; }
.side-user .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: 12px; color: var(--text-3); }
.content { min-width: 0; }
.main { min-width: 0; padding: 28px 34px 64px; max-width: 1680px; }
.topbar { display: none; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; margin: 0; letter-spacing: -.4px; font-weight: 700; }
.page-head p { margin: 5px 0 0; color: var(--text-2); max-width: 760px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- boutons et champs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 550; white-space: nowrap;
  transition: background .18s, border-color .18s, transform .12s, box-shadow .18s;
  backdrop-filter: blur(6px);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(42, 141, 179, .28); }
.btn.primary:hover { background: var(--accent-hover); box-shadow: 0 8px 22px rgba(42, 141, 179, .36); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: rgba(239, 97, 88, .12); }
.btn.primary.danger { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(239, 97, 88, .25); }
.btn.primary.danger:hover { background: #dc4d44; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); backdrop-filter: none; }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn.icon { padding: 6px; }
.btn svg.ic { width: 16px; height: 16px; }

input[type=text], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 11px; outline: none; min-height: 38px; transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
input[type=color] { width: 46px; height: 36px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin: 0; }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > span { font-size: 12px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .4px; }
.field > span em { color: var(--red); font-style: normal; }
.field .hint { font-size: 12px; color: var(--text-3); }
.multi { display: flex; flex-wrap: wrap; gap: 6px; max-height: 170px; overflow-y: auto; padding: 7px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.multi label { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 20px; background: var(--surface-3); cursor: pointer; font-size: 12.5px; }

.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 11px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; color: var(--text-2); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s, box-shadow .2s;
}
.seg button .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--gray)); }
.seg button:hover { color: var(--text); background: var(--surface-3); }
.seg button.on { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow-sm); }
.seg button:disabled { cursor: default; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .search { position: relative; flex: 1 1 220px; max-width: 360px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 16px; height: 16px; }
.toolbar .search input { padding-left: 34px; }
.toolbar select { width: auto; min-width: 140px; }
.chipbar { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip {
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); border-radius: 30px; padding: 5px 12px;
  cursor: pointer; font-weight: 600; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; transition: all .18s; backdrop-filter: blur(6px);
}
.fchip:hover { color: var(--text); border-color: var(--text-3); }
.fchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fchip .n { font-weight: 700; opacity: .75; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a, .tabs button {
  padding: 10px 14px; color: var(--text-2); border: 0; background: none; cursor: pointer; font-weight: 550;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .2s, border-color .2s;
}
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .active { color: var(--accent-text); border-bottom-color: var(--accent); }
.tabs .n { font-size: 11.5px; color: var(--text-3); margin-left: 4px; }

/* ---------- cartes, stats, tableaux (verre) */
.card, .stat, .table-wrap, .col, .modal, .doc-shell {
  background: var(--surface); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.card { transition: border-color .2s; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 14.5px; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head .more { margin-left: auto; font-size: 12.5px; }
.card-body { padding: 16px 18px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  padding: 15px 17px; display: block; color: var(--text); position: relative; overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
a.stat:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); text-decoration: none; }
.stat .k { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 9px; font-weight: 550; }
.stat .k .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--accent)) 18%, transparent); color: var(--c, var(--accent-text)); }
.stat .k .ico svg { width: 16px; height: 16px; }
.stat .v { font-size: 28px; font-weight: 700; margin-top: 8px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--text-3); }
.stat .v.red { color: var(--red); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th {
  text-align: left; font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px;
  padding: 11px 13px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.t th.sortable { cursor: pointer; user-select: none; }
table.t th.right, table.t td.right { text-align: right; }
table.t td.right { font-variant-numeric: tabular-nums; }
table.t th.sortable:hover { color: var(--text); }
table.t td { padding: 10px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; transition: background .15s; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: var(--surface-2); }
table.t .clip { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.t tr.group td { background: var(--surface-2); font-weight: 700; color: var(--text-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 11px; padding: 10px 18px; border-bottom: 1px solid var(--border); transition: background .15s; }
.list li:last-child { border-bottom: 0; }
.list li.click { cursor: pointer; }
.list li.click:hover { background: var(--surface-2); }
.list .grow { flex: 1; min-width: 0; }
.list .grow b, .list .grow .t1 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }

.empty { padding: 36px 16px; text-align: center; color: var(--text-3); }
.empty b { display: block; color: var(--text-2); margin-bottom: 4px; font-weight: 650; }

/* ---------- puces, avatars */
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 20px; font-size: 12px; font-weight: 650;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 21px;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip-red { background: rgba(239, 97, 88, .16); color: var(--red); }
.chip-orange { background: rgba(227, 163, 58, .17); color: var(--orange); }
.chip-green { background: rgba(69, 184, 116, .16); color: var(--green); }
.chip-blue { background: rgba(90, 163, 226, .16); color: var(--blue); }
.chip-purple { background: rgba(166, 129, 227, .17); color: var(--purple); }
.chip-teal { background: rgba(54, 189, 173, .16); color: var(--teal); }
.chip-gray { background: var(--surface-3); color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cat {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 8px; line-height: 20px;
  color: var(--c); background: color-mix(in srgb, var(--c) 17%, transparent); white-space: nowrap;
}
.avatar {
  position: relative; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--accent); overflow: hidden;
  box-shadow: 0 0 0 2px var(--surface-solid);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar.xl { width: 76px; height: 76px; font-size: 26px; box-shadow: 0 0 0 3px var(--surface-solid), 0 8px 24px rgba(0, 0, 0, .35); }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -7px; }

.progress { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--green), #5fd08e); border-radius: 4px; transition: width .6s var(--ease); }
.ring { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }

/* ---------- accueil */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--border); margin-bottom: 18px; min-height: 200px;
  background: #0b0e12 url('/fonds/net_1.webp') center 40% / cover no-repeat; color: #fff;
  display: flex; align-items: stretch;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 10, 14, .92) 0%, rgba(7, 10, 14, .7) 45%, rgba(7, 10, 14, .25) 100%); }
.hero > * { position: relative; }
.hero .hero-text { padding: 28px 30px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { margin: 0; font-size: 30px; letter-spacing: -.6px; }
.hero p { margin: 6px 0 0; color: rgba(255, 255, 255, .78); }
.hero .hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .82); }
.hero .hero-meta b { color: #fff; font-size: 17px; margin-right: 4px; }
.hero .hero-side { padding: 22px 30px; display: flex; align-items: center; gap: 16px; }
.hero .ring-box { position: relative; width: 110px; height: 110px; }
.hero .ring-box .pct { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: 22px; line-height: 1.1; }
.hero .ring-box .pct small { display: block; font-size: 11px; font-weight: 500; color: rgba(255, 255, 255, .7); }
.hero .ring .track { stroke: rgba(255, 255, 255, .15); }
.hero .place { position: absolute; right: 16px; bottom: 10px; font-size: 11px; color: rgba(255, 255, 255, .6); }

/* ---------- tâches */
.tsum { display: grid; grid-template-columns: minmax(230px, 1.3fr) repeat(5, minmax(120px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tsum .stat { display: flex; flex-direction: column; justify-content: center; }
.tsum .ringstat { flex-direction: row; align-items: center; gap: 16px; }
.tsum .ringstat .ring-box { position: relative; width: 74px; height: 74px; flex: none; }
.tsum .ringstat .ring-box .pct { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.tsum .stat button.stat-link { all: unset; cursor: pointer; }

.views { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 11px; backdrop-filter: var(--glass); }
.views button { border: 0; background: transparent; color: var(--text-2); padding: 6px 11px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; transition: all .2s; }
.views button svg { width: 15px; height: 15px; }
.views button:hover { color: var(--text); }
.views button.on { background: var(--accent); color: #fff; }

.board { display: grid; grid-template-columns: repeat(3, minmax(290px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.col { display: flex; flex-direction: column; min-height: 160px; transition: border-color .2s, background .2s, transform .2s; }
.col-head { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--border); font-weight: 700; }
.col-head .ic-box { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.col-head .ic-box svg { width: 15px; height: 15px; }
.col-head .n { color: var(--text-3); font-weight: 600; font-size: 12.5px; background: var(--surface-3); border-radius: 20px; padding: 0 8px; }
.col-body { padding: 11px; display: flex; flex-direction: column; gap: 9px; min-height: 70px; }
.col.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); transform: translateY(-2px); }
.col .drop-hint { border: 2px dashed var(--border-strong); border-radius: 10px; padding: 18px 0; text-align: center; color: var(--text-3); font-size: 12.5px; }
.quick-add { padding: 0 11px 11px; }
.quick-add input { background: transparent; border-style: dashed; }
.quick-add input:focus { border-style: solid; }

.tcard {
  position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 12px 10px 15px; cursor: grab; display: flex; flex-direction: column; gap: 7px;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s, opacity .3s;
}
.tcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc, transparent); }
.tcard.prio-urgente { --pc: var(--red); }
.tcard.prio-haute { --pc: var(--orange); }
.tcard.prio-normale { --pc: var(--blue); }
.tcard.prio-basse { --pc: var(--gray); }
.tcard:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.tcard.dragging { opacity: .35; transform: rotate(1.5deg) scale(.98); }
.tcard.done { opacity: .7; }
.tcard.done .tc-title { color: var(--text-3); text-decoration: line-through; }
.tcard.completing { animation: donepulse .7s ease-out; border-color: var(--green); }
.tc-top { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.tc-title { font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.tc-desc { color: var(--text-3); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-progress { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.tc-progress .progress { flex: 1; height: 5px; }
.tc-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-3); }
.tc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.tc-meta svg { width: 13px; height: 13px; }
.due { font-weight: 650; border-radius: 6px; padding: 0 6px; }
.due.late { color: var(--red); background: rgba(239, 97, 88, .14); }
.due.soon { color: var(--orange); background: rgba(227, 163, 58, .15); }
.due.week { color: var(--blue); }
.prio-flag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; }
.prio-flag svg { width: 13px; height: 13px; }
.prio-flag.urgente { color: var(--red); }
.prio-flag.haute { color: var(--orange); }
.checkbtn {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); background: transparent; cursor: pointer; flex: none;
  display: grid; place-items: center; color: transparent; transition: all .2s; padding: 0;
}
.checkbtn svg { width: 14px; height: 14px; stroke-width: 3; }
.checkbtn:hover { border-color: var(--green); color: var(--green); }
.checkbtn.on { background: var(--green); border-color: var(--green); color: #fff; animation: checkpop .35s ease; }

.due-groups { display: flex; flex-direction: column; gap: 16px; }
.due-group h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.due-group h3 .n { color: var(--text-3); font-weight: 500; }
.due-group.late h3 { color: var(--red); }
.trow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--surface-2); }
.trow .grow { flex: 1; min-width: 0; }
.trow .grow b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.done b { text-decoration: line-through; color: var(--text-3); }

.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.member { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.member .who { display: flex; align-items: center; gap: 12px; }
.member .who b { display: block; font-size: 15px; }
.member .counts { display: flex; gap: 6px; flex-wrap: wrap; }
.member ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.member li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: background .15s; }
.member li:hover { background: var(--surface-2); }
.member li .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.task-title-input { font-size: 20px !important; font-weight: 700; padding: 10px 13px !important; }
.task-editor { display: flex; flex-direction: column; gap: 16px; }
.task-editor .row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.md-toggle { display: flex; align-items: center; justify-content: space-between; }
.md-preview { min-height: 90px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.meta-box { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 18px; }
.meta-box dt { color: var(--text-3); }
.meta-box dd { margin: 0; display: flex; align-items: center; gap: 6px; }

/* ---------- trombinoscope */
.pole-title { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); font-weight: 700; }
.pole-title:first-child { margin-top: 0; }
.pole-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pole-title .n { color: var(--text-3); font-weight: 500; letter-spacing: 0; text-transform: none; }
.trombi { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.person {
  padding: 22px 16px 16px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 9px; position: relative; overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.person::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 64px; background: linear-gradient(180deg, color-mix(in srgb, var(--gc, var(--accent)) 35%, transparent), transparent); opacity: .7; }
.person > * { position: relative; }
.person:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.person b { font-size: 15px; }
.person .sub { font-size: 12px; color: var(--text-3); margin-top: -6px; }
.person .chips { justify-content: center; }
.person .badge-acc { position: absolute; top: 10px; right: 10px; color: var(--green); }

/* ---------- détail (fenêtre) */
.backdrop {
  position: fixed; inset: 0; background: rgba(4, 6, 9, .55); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; z-index: 50; animation: fade .2s ease;
}
.modal { box-shadow: var(--shadow); width: 100%; max-width: 640px; background: color-mix(in srgb, var(--surface-solid) 92%, transparent); animation: pop .3s var(--ease); border-radius: 18px; }
.modal.wide { max-width: 1080px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 18px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 15px 22px; border-top: 1px solid var(--border); }
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; }
.detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 26px; }
.section-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-3); font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.side-block + .side-block { margin-top: 22px; }

.checklist { display: flex; flex-direction: column; gap: 2px; }
.checklist .row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; transition: background .15s; }
.checklist .row:hover { background: var(--surface-2); }
.checklist .row span { flex: 1; overflow-wrap: anywhere; }
.checklist .row.done span { color: var(--text-3); text-decoration: line-through; }
.checklist .row .by { font-size: 11.5px; color: var(--text-3); }
.checklist .row button { opacity: 0; }
.checklist .row:hover button { opacity: 1; }
.inline-add { display: flex; gap: 6px; margin-top: 8px; }

.comments { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 10px; animation: rise .3s var(--ease); }
.comment .bubble { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; }
.comment .bubble .h { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.comment .bubble .h b { font-weight: 650; }
.comment .bubble .h .x { margin-left: auto; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.comment-form textarea { min-height: 64px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 13px 19px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 17px; bottom: 0; width: 1px; background: var(--border-strong); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 12px; color: var(--text-3); }
.changes { margin: 4px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-2); }
.changes li { padding: 0 !important; }
.changes li::before, .changes li::after { display: none; }
.changes s { color: var(--text-3); }

.kv { display: grid; grid-template-columns: 170px 1fr; gap: 7px 14px; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- activité */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 11px; padding: 11px 18px; border-bottom: 1px solid var(--border); transition: background .15s; }
.feed li:hover { background: var(--surface-2); }
.feed li:last-child { border-bottom: 0; }
.feed .txt { flex: 1; min-width: 0; }
.feed .txt b { font-weight: 650; }
.feed .when { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.feed .entity { font-size: 11.5px; color: var(--text-3); }

/* ---------- suggestions */
.sugg { display: flex; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.sugg:last-child { border-bottom: 0; }
.sugg:hover { background: var(--surface-2); }
.votes { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 46px; }
.votes button { border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: 7px; width: 32px; height: 26px; cursor: pointer; display: grid; place-items: center; color: var(--text-2); transition: all .15s; }
.votes button:hover { color: var(--text); background: var(--surface-3); }
.votes button.on.up { color: var(--green); border-color: var(--green); }
.votes button.on.down { color: var(--red); border-color: var(--red); }
.votes .score { font-weight: 700; font-size: 15px; }
.sugg .grow { flex: 1; min-width: 0; }
.sugg .grow h3 { margin: 0 0 3px; font-size: 15px; }
.sugg .grow p { margin: 0 0 7px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- forum */
.fcat { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--border); transition: background .15s; }
.fcat:last-child { border-bottom: 0; }
.fcat:hover { background: var(--surface-2); text-decoration: none; }
.fcat .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.fcat .grow { flex: 1; min-width: 0; color: var(--text); }
.fcat .grow b { display: block; font-size: 15px; }
.fcat .grow span { color: var(--text-2); font-size: 13px; }
.fcat .num { text-align: right; font-size: 12.5px; color: var(--text-3); min-width: 110px; }
.post { display: grid; grid-template-columns: 180px 1fr; border-bottom: 1px solid var(--border); }
.post:last-child { border-bottom: 0; }
.post .author { padding: 18px 16px; border-right: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; }
.post .author b { overflow-wrap: anywhere; }
.post .author .g { font-size: 12px; color: var(--text-3); }
.post .content { padding: 15px 20px; min-width: 0; }
.post .content .h { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.post .content .h .acts { margin-left: auto; display: flex; gap: 4px; }

.md p { margin: 0 0 9px; }
.md p:last-child { margin-bottom: 0; }
.md ul { margin: 0 0 9px; padding-left: 20px; }
.md blockquote { margin: 0 0 9px; padding: 4px 12px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.md { overflow-wrap: anywhere; }

/* ---------- addons */
.thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--surface-3); display: block; }
.thumb.ph { display: grid; place-items: center; color: var(--text-3); }
.addon-title { font-weight: 600; }
.badge-new { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--green); border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: 1px; }

/* ---------- budget */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bars .row { display: grid; grid-template-columns: 160px 1fr 90px; gap: 10px; align-items: center; font-size: 13px; }
.bars .row .track { height: 9px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.bars .row .track div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 5px; animation: grow 1s var(--ease) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.amount-neg { color: var(--red); }
.amount-pos { color: var(--green); }

/* ---------- connexion */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 400px; padding: 34px 32px 28px; background: rgba(14, 18, 23, .62) !important; color: #eef1f5; animation: pop .6s var(--ease) both; border-color: rgba(255, 255, 255, .12) !important; }
.login .field > span { color: rgba(238, 241, 245, .75); }
.login input { background: rgba(255, 255, 255, .07) !important; border-color: rgba(255, 255, 255, .16) !important; color: #fff; }
.login .faint { color: rgba(238, 241, 245, .55); }
.login .logo { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 24px; text-align: center; }
.login .logo img { width: 78px; height: 78px; animation: pop .8s .15s var(--ease) both; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .5)); }
.login .logo h1 { margin: 8px 0 0; font-size: 22px; letter-spacing: .5px; }
.login .logo p { margin: 0; color: rgba(238, 241, 245, .6); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.login form { display: flex; flex-direction: column; gap: 15px; }
.alert { padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px; animation: rise .3s var(--ease); }
.alert.err { background: rgba(239, 97, 88, .14); color: var(--red); border: 1px solid rgba(239, 97, 88, .32); }
.alert.info { background: var(--accent-soft); color: var(--accent-text); border: 1px solid rgba(42, 141, 179, .32); }
.alert.warn { background: rgba(227, 163, 58, .13); color: var(--orange); border: 1px solid rgba(227, 163, 58, .32); }

.secret { display: flex; align-items: center; gap: 8px; padding: 11px 13px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); font-family: var(--mono); font-size: 15px; }
.secret span { flex: 1; overflow-wrap: anywhere; }
pre.msg { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px; font: 13px/1.5 var(--font); margin: 0; }

/* ---------- notifications */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast {
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent); border: 1px solid var(--border-strong); border-left: 4px solid var(--accent);
  border-radius: 11px; padding: 11px 15px; box-shadow: var(--shadow); max-width: 380px; animation: slidein .35s var(--ease);
}
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }

/* ---------- squelette de chargement */
.skeleton { border-radius: var(--radius); min-height: 120px; background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 800px 100%; animation: shimmer 1.4s linear infinite; border: 1px solid var(--border); }

/* ---------- document imprimable */
.doc { background: #fff; color: #1b2028; border-radius: var(--radius); padding: 40px 44px; max-width: 980px; margin: 0 auto; box-shadow: var(--shadow); }
.doc header { display: flex; align-items: center; gap: 18px; border-bottom: 2px solid #1b2028; padding-bottom: 16px; margin-bottom: 22px; }
.doc header img { width: 64px; height: 64px; }
.doc header h1 { margin: 0; font-size: 24px; }
.doc header p { margin: 2px 0 0; color: #555f6d; }
.doc header .date { margin-left: auto; text-align: right; font-size: 12.5px; color: #555f6d; }
.doc h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .8px; margin: 26px 0 8px; padding-bottom: 5px; border-bottom: 1px solid #ccd2da; display: flex; justify-content: space-between; }
.doc h2 span { color: #7a8391; font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 13px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc th { text-align: left; font-size: 11px; text-transform: uppercase; color: #7a8391; padding: 6px 8px; border-bottom: 1px solid #e1e5ea; }
.doc td { padding: 7px 8px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.doc .who { display: flex; align-items: center; gap: 9px; }
.doc .who img, .doc .who .ph { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #dde3ea; flex: none; }
.doc .sum { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: #4c5563; }
.doc .sum b { color: #1b2028; font-size: 18px; display: block; }
.doc .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 0; }
.doc footer { margin-top: 30px; font-size: 11.5px; color: #7a8391; text-align: center; }

@media print {
  body { background: #fff; }
  .scene, .scene-caption, .sidebar, .topbar, .page-head, .tabs, .toolbar, .no-print, .toasts { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .main > * { animation: none !important; }
  .doc { box-shadow: none; padding: 0; max-width: none; }
  @page { margin: 14mm; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .scene-img { animation: none; transform: scale(1.04); }
}

/* ---------- écrans moyens et mobiles */
@media (max-width: 1280px) {
  .tsum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tsum .ringstat { grid-column: span 3; }
}
@media (max-width: 980px) {
  .grid-2, .grid-3, .detail { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(3, minmax(270px, 85vw)); }
  .hero { flex-direction: column; }
  .hero .hero-side { padding-top: 0; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 270px; transform: translateX(-105%); transition: transform .25s var(--ease); box-shadow: var(--shadow); background: color-mix(in srgb, var(--surface-solid) 94%, transparent); }
  .shell.menu-open .sidebar { transform: none; }
  .shell.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 55; animation: fade .2s; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
  .topbar img { width: 28px; height: 28px; }
  .topbar b { flex: 1; }
  .main { padding: 18px 16px 50px; }
  .page-head h1 { font-size: 22px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; }
  .stat .v { font-size: 22px; }
  .tsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsum .ringstat { grid-column: span 2; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; }
  .post .author { flex-direction: row; text-align: left; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 14px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .bars .row { grid-template-columns: 100px 1fr 80px; }
  .doc { padding: 22px 16px; }
  .modal-body { padding: 16px; }
  .fcat .num { display: none; }
  .toolbar select { flex: 1 1 130px; min-width: 0; }
  .hero h1 { font-size: 24px; }
  .hero .hero-text { padding: 22px 20px; }
  .trombi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .scene-caption { display: none !important; }
}
