/* FeedMap — interface : structure Discord (rail, salons, barre utilisateur), contenus GitHub (listes, fils, libellés). */

:root {
  --accent: #5865f2;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --r-xs: 4px; --r-sm: 6px; --r: 8px; --r-lg: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --rail-w: 72px; --side-w: 248px; --top-h: 52px;

  --ok: #23a55a; --warn: #f0b232; --orange: #e67e22; --bad: #f23f43; --info: #5865f2;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-rail: #1e1f22; --bg-side: #2b2d31; --bg: #313338; --bg-2: #2b2d31; --bg-3: #232428;
  --bg-input: #1e1f22; --bg-hover: rgba(78, 80, 88, .3); --bg-active: rgba(78, 80, 88, .6);
  --card: #2b2d31; --card-2: #383a40;
  --line: #3f4147; --line-soft: rgba(63, 65, 71, .6);
  --text: #dbdee1; --text-strong: #f2f3f5; --text-2: #b5bac1; --text-3: #949ba4; --text-4: #6d6f78;
  --shadow: 0 8px 16px rgba(0, 0, 0, .24); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .45);
  --code-bg: #1e1f22;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg-rail: #e3e5e8; --bg-side: #f2f3f5; --bg: #ffffff; --bg-2: #f6f8fa; --bg-3: #ebedef;
  --bg-input: #ebedef; --bg-hover: rgba(116, 127, 141, .12); --bg-active: rgba(116, 127, 141, .24);
  --card: #ffffff; --card-2: #f6f8fa;
  --line: #d0d7de; --line-soft: #e4e7eb;
  --text: #2e3338; --text-strong: #060607; --text-2: #4e5058; --text-3: #5c5e66; --text-4: #80848e;
  --shadow: 0 8px 16px rgba(0, 0, 0, .08); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .16);
  --code-bg: #f6f8fa;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text-strong); margin: 0; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.ic { flex: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border: 3px solid transparent; background-clip: padding-box; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
html[data-theme="dark"] .th-light, html[data-theme="light"] .th-dark { display: none; }

/* ---------- Chargement ---------- */
.boot { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--bg-rail); transition: opacity .35s var(--ease), visibility .35s; }
.boot.is-done { opacity: 0; visibility: hidden; }
.boot-mark { width: 64px; height: 64px; border-radius: 20px; background: var(--accent); display: grid; align-content: center; gap: 7px; padding: 0 15px; animation: boot-morph 1.6s var(--ease) infinite; }
.boot-mark span { height: 6px; border-radius: 3px; background: #fff; transform-origin: left; animation: boot-line 1.6s var(--ease) infinite; }
.boot-mark span:nth-child(1) { width: 100%; }
.boot-mark span:nth-child(2) { width: 66%; animation-delay: .12s; }
.boot-mark span:nth-child(3) { width: 26%; animation-delay: .24s; }
.boot-name { font: 700 15px var(--font-head); color: var(--text-2); letter-spacing: .02em; }
.boot-bar { width: 140px; height: 3px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 3px; animation: boot-slide 1s var(--ease) infinite; }
@keyframes boot-morph { 0%, 100% { border-radius: 20px; } 50% { border-radius: 32px; } }
@keyframes boot-line { 0% { transform: scaleX(.2); opacity: .5; } 40%, 100% { transform: scaleX(1); opacity: 1; } }
@keyframes boot-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent); z-index: 999; opacity: 0; transition: width .4s var(--ease), opacity .3s; }
.progress.is-on { opacity: 1; }

/* ---------- Coquille ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) var(--side-w) minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.rail { background: var(--bg-rail); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 8px; overflow: hidden; }
.rail-scroll { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: none; flex: 1; width: 100%; align-items: center; padding: 2px 0; }
.rail-scroll::-webkit-scrollbar { display: none; }
.rail-item { position: relative; width: 100%; display: flex; justify-content: center; }
.rail-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--text); font: 700 16px var(--font-head); transition: border-radius .2s var(--ease), background .2s, color .2s, transform .15s; overflow: hidden; }
html[data-theme="light"] .rail-icon { background: #fff; }
.rail-icon[style*="--c"] { color: var(--text); }
.rail-icon img { width: 100%; height: 100%; object-fit: cover; }
.rail-icon.brand, html[data-theme="light"] .rail-icon.brand { background: var(--accent); color: #fff; }
.rail-icon.tool { color: var(--ok); }
.rail-item:hover .rail-icon, .rail-item.is-active .rail-icon { border-radius: 16px; }
.rail-item:hover .rail-icon[style*="--c"], .rail-item.is-active .rail-icon[style*="--c"] { background: var(--c); color: #fff; }
.rail-item:hover .rail-icon.tool, .rail-item.is-active .rail-icon.tool { background: var(--ok); color: #fff; }
.rail-item:active .rail-icon { transform: translateY(1px); }
.rail-pill { position: absolute; left: 0; top: 50%; width: 4px; height: 8px; margin-top: -4px; background: var(--text-strong); border-radius: 0 4px 4px 0; transform: scale(0); transition: transform .2s var(--ease), height .2s var(--ease), margin .2s var(--ease); }
.rail-item:hover .rail-pill { transform: scale(1); height: 20px; margin-top: -10px; }
.rail-item.is-active .rail-pill { transform: scale(1); height: 40px; margin-top: -20px; }
.rail-sep { width: 32px; height: 2px; border-radius: 1px; background: var(--line); flex: none; }

.side { background: var(--bg-side); display: flex; flex-direction: column; min-height: 0; }
.side-head { height: var(--top-h); flex: none; border-bottom: 1px solid var(--bg-3); box-shadow: 0 1px 0 rgba(0, 0, 0, .06); position: relative; }
.side-title { width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font: 700 15px var(--font-head); color: var(--text-strong); transition: background .15s; }
.side-title:not(.static):hover { background: var(--bg-hover); }
.side-title span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.role-tag { font: 600 11px var(--font); padding: 2px 6px; border-radius: 4px; background: var(--accent); color: #fff; }
.side-head .menu { left: 8px; right: 8px; top: calc(100% + 6px); }
.side-scroll { flex: 1; overflow-y: auto; padding: 12px 8px; scrollbar-width: thin; }
.side-cta { display: flex; align-items: center; gap: 8px; justify-content: center; height: 36px; margin: 0 4px 14px; border-radius: var(--r-xs); background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; transition: filter .15s, transform .1s; }
.side-cta:hover { filter: brightness(1.08); }
.side-cta:active { transform: translateY(1px); }
.side-group { margin-bottom: 16px; }
.side-label { display: flex; align-items: center; gap: 2px; padding: 6px 4px 4px 2px; font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .02em; color: var(--text-3); }
.ch { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px; margin: 1px 0; border-radius: var(--r-xs); color: var(--text-3); font-weight: 500; position: relative; transition: background .12s, color .12s; }
.ch > span:not(.ch-ic) { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ch:hover { background: var(--bg-hover); color: var(--text-2); }
.ch.is-active { background: var(--bg-active); color: var(--text-strong); }
.ch-ic { display: grid; color: var(--text-4); transition: color .15s; }
.ch:hover .ch-ic, .ch.is-active .ch-ic { color: var(--c); }
.ch-n { font: 600 12px var(--font); font-style: normal; color: var(--text-4); }
.mention, .dot-count { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--bad); color: #fff; font: 700 11px/16px var(--font); text-align: center; }
.badge-new { font: 700 10px/1 var(--font); text-transform: uppercase; letter-spacing: .03em; background: var(--bad); color: #fff; padding: 3px 5px; border-radius: 4px; }
.side-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 4px; }

.userbar { flex: none; display: flex; align-items: center; gap: 2px; height: 56px; padding: 0 8px; background: var(--bg-3); }
html[data-theme="light"] .userbar { background: #ebedef; }
.userbar-me { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 4px; border-radius: var(--r-xs); transition: background .12s; }
.userbar-me:hover { background: var(--bg-hover); }
.userbar-id { display: grid; min-width: 0; line-height: 1.2; }
.userbar-id strong { font-size: 14px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbar-id small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.presence { position: relative; display: inline-flex; }
.presence i { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 3px solid var(--bg-3); }
html[data-theme="light"] .presence i { border-color: #ebedef; }

.main { overflow-y: auto; display: flex; flex-direction: column; min-width: 0; scroll-behavior: smooth; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--bg-3); box-shadow: 0 1px 0 rgba(0, 0, 0, .05); }
html[data-theme="light"] .topbar { border-bottom-color: var(--line-soft); }
.topbar-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.topbar-ic { display: grid; color: var(--c, var(--text-4)); }
.topbar h1 { font-size: 16px; white-space: nowrap; }
.topbar-div { width: 1px; height: 24px; background: var(--line); margin: 0 6px; flex: none; }
.topbar-sub { color: var(--text-3); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.search { position: relative; display: flex; align-items: center; }
.search input { width: 200px; height: 30px; padding: 0 28px 0 30px; border-radius: var(--r-xs); background: var(--bg-input); border: 1px solid transparent; color: var(--text); font: 14px var(--font); transition: width .25s var(--ease), border-color .15s; }
.search input:focus { width: 280px; outline: none; border-color: var(--accent); }
.search .ic { position: absolute; left: 9px; color: var(--text-3); pointer-events: none; }
.search kbd { position: absolute; right: 6px; font: 600 11px var(--mono); color: var(--text-4); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; pointer-events: none; }
.search input:focus ~ kbd { opacity: 0; }

.announce { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 500; }
.announce a { text-decoration: underline; }

/* ---------- Pages ---------- */
.page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px; flex: 1; }
.page-narrow { max-width: 880px; }
.page-wide { max-width: 1440px; }
.page-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.col-side { display: grid; gap: 16px; position: sticky; top: calc(var(--top-h) + 24px); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 24px; border-top: 1px solid var(--line-soft); color: var(--text-3); font-size: 13px; }
.foot-left { display: flex; gap: 10px; align-items: center; }
.foot-left strong { color: var(--text-2); font-family: var(--font-head); }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--text-strong); text-decoration: underline; }

.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding: 24px; margin-bottom: 20px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line-soft); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.hero h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.hero p { margin: 6px 0 0; color: var(--text-2); max-width: 520px; }
.hero-stats { display: flex; gap: 28px; }
.hero-stats div { display: grid; }
.hero-stats strong { font: 800 28px/1 var(--font-head); color: var(--text-strong); font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 13px; color: var(--text-3); margin-top: 4px; }

/* ---------- Boutons, champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-xs); background: var(--card-2); color: var(--text-strong); font-weight: 600; font-size: 14px; border: 1px solid var(--line); white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, filter .15s; }
html[data-theme="dark"] .btn { background: #4e5058; border-color: transparent; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent) !important; color: #fff !important; border-color: transparent !important; }
.btn-danger { background: var(--bad) !important; color: #fff !important; border-color: transparent !important; }
.btn-ghost { background: transparent !important; border-color: transparent !important; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover) !important; color: var(--text-strong); filter: none; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.is-disabled { opacity: .45; pointer-events: none; }
.btn.is-busy { pointer-events: none; opacity: .8; }
.btn.is-busy::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-xs); color: var(--text-3); transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--bg-hover); color: var(--text-strong); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn .dot-count { position: absolute; top: 0; right: -2px; border: 2px solid var(--bg-3); height: 18px; line-height: 14px; }

.input, .select, select { width: 100%; height: 38px; padding: 0 10px; border-radius: var(--r-xs); background: var(--bg-input); border: 1px solid transparent; color: var(--text); font: 15px var(--font); transition: border-color .15s, box-shadow .15s; }
html[data-theme="light"] .input, html[data-theme="light"] .select, html[data-theme="light"] select { background: var(--bg-2); border-color: var(--line); }
textarea.input { height: auto; padding: 10px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.input-lg { height: 44px; font-size: 17px; font-weight: 500; }
.select.sm, select.sm { height: 28px; font-size: 13px; width: auto; }
input[type="file"].input { padding: 7px 10px; font-size: 13px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field-label { font: 700 12px var(--font); text-transform: uppercase; letter-spacing: .02em; color: var(--text-2); }
.field-label b { color: var(--bad); }
.field-sm { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; }
.field-sm select, .field-sm .input { height: 30px; font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.form-stack .field:last-of-type { margin-bottom: 14px; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form .input { width: auto; flex: 1; min-width: 180px; }
.color-field { display: flex; gap: 8px; }
.color-field input[type="color"] { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: var(--r-xs); padding: 3px; background: var(--bg-input); cursor: pointer; }
.pw { position: relative; display: block; }
.pw .input { padding-right: 40px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--text-3); padding: 6px; display: grid; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.meter i { height: 4px; border-radius: 2px; background: var(--bg-3); transition: background .25s; }
.meter[data-level="1"] i:nth-child(-n+1) { background: var(--bad); }
.meter[data-level="2"] i:nth-child(-n+2) { background: var(--orange); }
.meter[data-level="3"] i:nth-child(-n+3) { background: var(--warn); }
.meter[data-level="4"] i { background: var(--ok); }

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check > span:first-of-type { width: 18px; height: 18px; flex: none; border-radius: 4px; border: 2px solid var(--text-4); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.check > span:first-of-type::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .2s var(--ease-spring); }
.check input:checked + span { background: var(--accent); border-color: var(--accent); }
.check input:checked + span::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row > span:first-child { display: grid; gap: 2px; }
.switch-row strong { font-weight: 600; color: var(--text-strong); font-size: 14px; }
.switch-row small { color: var(--text-3); font-size: 13px; }
.switch { position: relative; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch i { display: block; width: 40px; height: 24px; border-radius: 12px; background: var(--text-4); transition: background .2s; position: relative; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease-spring); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Avatars, pastilles ---------- */
.avatar { width: var(--s); height: var(--s); flex: none; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; background: var(--c, var(--accent)); color: #fff; font: 700 calc(var(--s) * .38) var(--font-head); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 13px; background: var(--c); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-sm { height: 22px; font-size: 12px; padding: 0 8px 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.label { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1; color: color-mix(in srgb, var(--c) 75%, var(--text-strong)); background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.sq { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.staff-tag { display: inline-flex; align-items: center; gap: 4px; height: 16px; padding: 0 5px; border-radius: 3px; background: var(--accent); color: #fff; font: 700 10px/1 var(--font); text-transform: uppercase; letter-spacing: .03em; }
.staff-tag.lg { height: 24px; font-size: 11px; padding: 0 8px; }
.prio { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font: 700 11px/1 var(--font); text-transform: uppercase; letter-spacing: .03em; }
.prio-low { color: var(--text-3); background: var(--bg-hover); }
.prio-high { color: #fff; background: var(--orange); }
.prio-crit { color: #fff; background: var(--bad); animation: crit 2s ease-in-out infinite; }
@keyframes crit { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 25%, transparent); } }
.flag-warn, .flag-ok, .flag-bad, .flag-muted { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.flag-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.flag-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.flag-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.flag-muted { color: var(--text-3); background: var(--bg-hover); }
.code-tag { font: 500 12px var(--mono); padding: 1px 6px; border-radius: 4px; background: var(--bg-3); }

/* ---------- Toasts, alertes ---------- */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 500; display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 12px 12px 12px 14px; border-radius: var(--r); background: var(--card-2); color: var(--text-strong); box-shadow: var(--shadow-lg); border-left: 4px solid var(--c, var(--accent)); font-size: 14px; animation: toast-in .4s var(--ease-spring) both; }
html[data-theme="light"] .toast { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent)); }
.toast + .toast { bottom: 84px; }
.toast-success { --c: var(--ok); } .toast-error { --c: var(--bad); } .toast-info { --c: var(--info); }
.toast > .ic { color: var(--c); }
.toast span { flex: 1; }
.toast-x { color: var(--text-3); display: grid; padding: 4px; border-radius: 4px; }
.toast-x:hover { background: var(--bg-hover); }
.toast.is-out { animation: toast-out .25s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px; }
.alert a { margin-left: auto; font-weight: 600; text-decoration: underline; }
.alert-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--text-strong); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }

/* ---------- Menus, info-bulles ---------- */
.dd { position: relative; }
.menu { position: absolute; z-index: 60; min-width: 220px; padding: 6px; border-radius: var(--r); background: var(--bg-rail); box-shadow: var(--shadow-lg); border: 1px solid var(--line-soft); animation: menu-in .16s var(--ease) both; }
html[data-theme="light"] .menu { background: #fff; }
.menu-right { right: 0; top: calc(100% + 6px); }
.menu-head { padding: 6px 8px 8px; font: 700 12px var(--font); color: var(--text-3); text-transform: uppercase; letter-spacing: .02em; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.menu a, .menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border-radius: 4px; font-size: 14px; color: var(--text-2); text-align: left; }
.menu a:hover, .menu button:hover, .menu a.is-on { background: var(--accent); color: #fff; }
.menu a:hover .dot, .menu a.is-on .dot { box-shadow: 0 0 0 2px #fff; }
.menu .danger { color: var(--bad); }
.menu .danger:hover { background: var(--bad); color: #fff; }
.menu-form { padding: 10px; min-width: 260px; }
.menu-form .btn:hover { background: var(--bad); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.tip { position: fixed; z-index: 900; pointer-events: none; padding: 6px 10px; border-radius: 5px; background: #111214; color: #dbdee1; font-size: 13px; font-weight: 600; max-width: 280px; box-shadow: var(--shadow); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s var(--ease); }
.tip.is-on { opacity: 1; transform: none; }
.tip::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #111214; }
.tip.is-right::after { left: -5px; top: 50%; bottom: auto; margin: -5px 0 0; border: 5px solid transparent; border-left: 0; border-right-color: #111214; }

/* ---------- Listes de sujets (GitHub) ---------- */
.board { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; margin-bottom: 16px; }
html[data-theme="dark"] .board { border-color: var(--bg-3); }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); min-height: 52px; }
html[data-theme="dark"] .board-head { background: var(--bg-3); border-bottom-color: var(--bg-3); }
.seg { display: flex; gap: 4px; }
.seg-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--text-3); transition: color .12s, background .12s; }
.seg-item:hover { color: var(--text-strong); }
.seg-item.is-on { color: var(--text-strong); background: var(--bg-hover); }
.board-filters { display: flex; gap: 4px; }
.dd-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: var(--r-sm); font-size: 14px; color: var(--text-3); font-weight: 500; }
.dd-btn:hover { color: var(--text-strong); background: var(--bg-hover); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--line-soft); transition: background .12s; position: relative; }
.rows > .row:first-child, .rows.inner .row { border-top: 0; }
.row:hover { background: var(--bg-hover); }
.row.is-pinned { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.row.is-pinned::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.row.is-hidden { opacity: .7; }
.row-state { padding-top: 2px; color: var(--c); display: grid; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row-link { font-weight: 600; font-size: 15px; color: var(--text-strong); line-height: 1.4; }
.row-link:hover { color: var(--accent); }
.row-flag { color: var(--text-3); display: grid; }
.row-flag.warn { color: var(--warn); }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; font-size: 13px; color: var(--text-3); }
.row-author { font-weight: 600; color: var(--text-2); }
a.row-author:hover { color: var(--accent); text-decoration: underline; }
.row-board { display: inline-flex; align-items: center; gap: 4px; color: var(--c); font-weight: 600; font-size: 12px; }
.row-proj { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.row-side { display: flex; align-items: center; gap: 12px; flex: none; }
.row-count { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.row-count:hover { color: var(--accent); }
.vote-form { margin: 0; }
.vote { display: grid; justify-items: center; align-content: center; width: 44px; height: 48px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text-2); font: 700 14px var(--font); transition: border-color .15s, background .15s, color .15s, transform .1s; }
html[data-theme="dark"] .vote { background: var(--bg-3); border-color: transparent; }
.vote:hover { border-color: var(--accent); color: var(--accent); }
.vote.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.vote.bump { animation: bump .45s var(--ease-spring); }
.vote.bump .ic { animation: arrow-up .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.12); } }
@keyframes arrow-up { 40% { transform: translateY(-4px); } }
.vote-lg { width: 56px; height: 62px; font-size: 17px; }

.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 16px 0; }
.pager-info { font-size: 13px; color: var(--text-3); }

.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 48px 24px; }
.empty.sm { padding: 24px; }
.empty.big { padding: 80px 24px; }
.empty-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-hover); color: var(--text-3); margin-bottom: 6px; }
.empty h3 { font-size: 18px; }
.empty p { margin: 0 0 8px; color: var(--text-3); max-width: 420px; }
.err-code { font: 800 72px/1 var(--font-head); color: var(--accent); letter-spacing: -.04em; }

/* ---------- Cartes latérales ---------- */
.card { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 14px; }
html[data-theme="dark"] .card { border-color: var(--bg-3); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.card-head h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.card-head h3 .ic { color: var(--text-3); }
.card-more { font-size: 13px; color: var(--accent); font-weight: 600; }
.card-more:hover { text-decoration: underline; }
.card-link { display: flex; align-items: center; gap: 12px; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--c, var(--accent)); }
.card-link > div { flex: 1; display: grid; }
.card-link small { color: var(--text-3); font-size: 12px; }
.card-link strong { font-size: 14px; color: var(--text-strong); }
.status-mini { --c: var(--ok); }
.s-ok { --c: var(--ok); } .s-warn { --c: var(--warn); } .s-orange { --c: var(--orange); } .s-bad { --c: var(--bad); } .s-info { --c: var(--info); }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--c); position: relative; flex: none; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.6); opacity: 0; } }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.legend a { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; font-size: 14px; color: var(--text-2); }
.legend a:hover { background: var(--bg-hover); color: var(--text-strong); }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.people a { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 4px; font-size: 14px; }
.people a:hover { background: var(--bg-hover); }
.people a > span:not(.avatar) { flex: 1; display: flex; align-items: center; gap: 6px; font-weight: 500; }
.people em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--text-3); }
.release-mini { display: grid; gap: 4px; padding: 10px; border-radius: var(--r-sm); background: var(--bg-2); transition: background .15s; }
html[data-theme="dark"] .release-mini { background: var(--bg-3); }
.release-mini:hover { background: var(--bg-hover); }
.release-mini strong { color: var(--text-strong); font-size: 14px; }
.release-mini small { color: var(--text-3); font-size: 12px; }
.release-mini .ctype { justify-self: start; }
.ver { font-size: 12px; color: var(--text-3); }
.ctype { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 4px; font: 700 11px/1 var(--font); text-transform: uppercase; letter-spacing: .03em; color: #fff; }
.ctype-new { background: var(--accent); } .ctype-imp { background: #3ba55c; } .ctype-fix { background: #e67e22; } .ctype-sec { background: #ed4245; } .ctype-dep { background: #6d6f78; }
.ctype-dot { width: 8px; height: 8px; border-radius: 2px; }

/* ---------- Fil d'un sujet ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 12px; }
.crumbs a:hover { color: var(--accent); }
.issue-head { padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); margin-bottom: 20px; }
.issue-title { font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; word-break: break-word; }
.issue-num { color: var(--text-4); font-weight: 400; }
.issue-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; color: var(--text-3); font-size: 14px; }
.issue-sub strong { color: var(--text-2); }
.state-big { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--c); color: #fff; font-weight: 600; font-size: 14px; }
.issue { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.tl { position: relative; display: grid; gap: 0; }
.tl::before { content: ""; position: absolute; left: 70px; top: 0; bottom: 0; width: 2px; background: var(--line-soft); }
.msg { display: flex; gap: 14px; position: relative; margin-bottom: 18px; animation: rise .35s var(--ease) both; }
.msg-av { flex: none; width: 40px; position: relative; z-index: 1; }
.msg-box { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); position: relative; z-index: 1; }
html[data-theme="dark"] .msg-box { border-color: var(--bg-3); }
.msg-box::before { content: ""; position: absolute; left: -8px; top: 14px; width: 14px; height: 14px; background: inherit; border-left: 1px solid; border-bottom: 1px solid; border-color: inherit; transform: rotate(45deg); }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; font-size: 14px; position: relative; }
html[data-theme="dark"] .msg-head { background: var(--bg-3); border-bottom-color: var(--bg-3); }
.msg-head strong { color: var(--text-strong); }
.msg-head a:hover strong { text-decoration: underline; }
.msg-time { color: var(--text-3); font-size: 13px; }
a.msg-time:hover { text-decoration: underline; }
.msg-actions { margin-left: auto; }
.msg-badge { font-size: 12px; font-weight: 600; color: var(--text-3); border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; }
.msg-body { padding: 14px 16px; }
.msg.is-official .msg-box { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.msg.is-official .msg-head { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border-bottom-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.msg.is-internal .msg-box { border-style: dashed; border-color: var(--warn); background: color-mix(in srgb, var(--warn) 5%, var(--card)); }
.msg.is-internal .msg-head { background: color-mix(in srgb, var(--warn) 12%, var(--card)); }
.official-tag, .internal-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; }
.official-tag { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.internal-tag { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.msg:target .msg-box { box-shadow: 0 0 0 2px var(--accent); }
.ev { display: flex; align-items: center; gap: 12px; margin: 0 0 18px 56px; position: relative; z-index: 1; font-size: 14px; color: var(--text-3); animation: rise .35s var(--ease) both; }
.ev-ic { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--c, var(--text-3)); border: 2px solid var(--bg); }
html[data-theme="dark"] .ev-ic { background: var(--bg-3); }
.ev-txt { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ev-txt strong { color: var(--text-2); }
.ev-txt a { color: var(--text-strong); font-weight: 600; }
.ev-txt a:hover { color: var(--accent); }
.ev time { color: var(--text-4); }
.ev .avatar { margin-right: 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.gallery { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 14px; }
.gallery a { display: block; width: 160px; height: 110px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.gallery a:hover img { transform: scale(1.05); }
.meta-box { margin: 0 16px 14px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); font-size: 13px; }
.meta-box summary { display: flex; align-items: center; gap: 6px; padding: 8px 10px; cursor: pointer; color: var(--text-3); font-weight: 600; list-style: none; }
.meta-box summary::-webkit-details-marker { display: none; }
.meta-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; padding: 0 10px 10px; }
.meta-box dt { color: var(--text-3); text-transform: capitalize; }
.meta-box dd { margin: 0; word-break: break-all; }
.edit-form { padding: 14px 16px; display: grid; gap: 10px; border-top: 1px solid var(--line-soft); }
.reply { display: flex; gap: 14px; position: relative; padding-top: 18px; border-top: 2px solid var(--line-soft); margin-left: 56px; }
.reply > .msg-av { margin-left: -56px; }
.reply-form { flex: 1; min-width: 0; }
.reply-locked { flex: 1; display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--bg-2); color: var(--text-2); margin-left: -56px; }
.reply-locked span { flex: 1; }
.reply-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.reply-actions .btn-primary { margin-left: auto; }
.reply-opts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.select-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); }
.select-inline select { height: 30px; font-size: 13px; width: auto; }

.issue-side { display: grid; gap: 0; position: sticky; top: calc(var(--top-h) + 20px); }
.side-sec { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.side-sec h4 { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); margin-bottom: 10px; }
.side-sec h4 .ic { color: var(--text-3); }
.staff-zone h4 { justify-content: flex-start; color: var(--accent); }
.vote-box { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; }
.vote-info { display: grid; }
.vote-info strong { color: var(--text-strong); font-size: 14px; }
.vote-info small { color: var(--text-3); font-size: 12px; }
.stack { display: flex; flex-wrap: wrap; padding-left: 6px; margin-bottom: 6px; }
.stack > * { margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg); transition: transform .15s var(--ease); }
.stack > *:hover { transform: translateY(-3px); z-index: 2; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 12px; margin: 0; font-size: 14px; align-items: center; }
.kv dt { color: var(--text-3); font-size: 13px; }
.kv dd { margin: 0; display: flex; align-items: center; gap: 6px; }
.status-pick { display: grid; gap: 2px; }
.status-pick label { cursor: pointer; }
.status-pick input { position: absolute; opacity: 0; }
.status-pick span { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-xs); font-size: 14px; color: var(--text-2); transition: background .12s; }
.status-pick span i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--c); transition: background .15s; }
.status-pick label:hover span { background: var(--bg-hover); }
.status-pick input:checked + span { background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--text-strong); font-weight: 600; }
.status-pick input:checked + span i { background: var(--c); }
.tag-form { display: grid; gap: 6px; margin-top: 10px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.move-form { margin-top: 4px; }
.release-link { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-strong); padding: 4px 0; }
.release-link:hover { color: var(--accent); }

/* ---------- Éditeur ---------- */
.editor { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
html[data-theme="dark"] .editor { border-color: var(--bg-3); background: var(--bg-input); }
.editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.editor-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 6px 8px 0; background: var(--bg-2); border-bottom: 1px solid var(--line); }
html[data-theme="dark"] .editor-tabs { background: var(--bg-3); border-bottom-color: var(--bg-3); }
.editor-tabs > button { padding: 7px 14px; font-size: 14px; font-weight: 500; color: var(--text-3); border-radius: 6px 6px 0 0; border: 1px solid transparent; margin-bottom: -1px; }
.editor-tabs > button.is-on { background: var(--card); color: var(--text-strong); border-color: var(--line); border-bottom-color: var(--card); }
html[data-theme="dark"] .editor-tabs > button.is-on { background: var(--bg-input); border-color: transparent; }
.editor-tools { margin-left: auto; display: flex; gap: 2px; padding-bottom: 4px; }
.editor-tools button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; color: var(--text-3); }
.editor-tools button:hover { background: var(--bg-hover); color: var(--text-strong); }
.editor textarea { display: block; width: 100%; border: 0; background: transparent; color: var(--text); font: 15px/1.6 var(--font); padding: 12px; resize: vertical; min-height: 110px; }
.editor textarea:focus { outline: none; box-shadow: none; }
.editor-preview { padding: 12px; min-height: 110px; }
.editor-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--text-3); }
.editor-hint { display: inline-flex; align-items: center; gap: 5px; }
.editor-attach { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; padding: 4px 8px; border-radius: 4px; color: var(--text-2); }
.editor-attach:hover { background: var(--bg-hover); color: var(--accent); }
.editor-attach input { display: none; }
.editor.is-drag { border-color: var(--accent); border-style: dashed; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 10px; }
.thumbs:not(:empty) { padding: 10px; border-top: 1px solid var(--line-soft); }
.thumb { position: relative; width: 84px; height: 64px; border-radius: 6px; overflow: hidden; background: var(--bg-2); animation: rise .3s var(--ease) both; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .7); color: #fff; }
.thumb.is-bad { outline: 2px solid var(--bad); }

/* ---------- Markdown ---------- */
.md { color: var(--text); word-wrap: break-word; line-height: 1.65; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md p { margin: 0 0 12px; }
.md h2, .md h3, .md h4, .md h5 { margin: 22px 0 10px; }
.md h2 { font-size: 20px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.md h3 { font-size: 17px; }
.md a { color: var(--accent); }
.md a:hover { text-decoration: underline; }
.md a.ref { font-weight: 600; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 24px; }
.md li + li { margin-top: 4px; }
.md code { font: 13px var(--mono); padding: 2px 6px; border-radius: 4px; background: var(--code-bg); border: 1px solid var(--line-soft); }
.md-code { margin: 0 0 12px; padding: 14px; border-radius: var(--r-sm); background: var(--code-bg); border: 1px solid var(--line-soft); overflow-x: auto; font: 13px/1.55 var(--mono); }
.md-code code { padding: 0; border: 0; background: none; }
.md blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 4px solid var(--line); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.md-task { display: inline-block; width: 14px; height: 14px; margin: 0 6px -2px -20px; border: 2px solid var(--text-4); border-radius: 3px; }
.md-task.done { background: var(--ok); border-color: var(--ok); }
.md ul:has(.md-task) { list-style: none; }

/* ---------- Création ---------- */
.compose { display: grid; gap: 24px; }
.compose-step h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 14px; }
.step { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.kind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.kind input { position: absolute; opacity: 0; }
.kind-box { display: grid; gap: 4px; height: 100%; padding: 14px; border-radius: var(--r); border: 2px solid var(--line); background: var(--card); cursor: pointer; transition: border-color .15s, transform .15s var(--ease), background .15s; }
html[data-theme="dark"] .kind-box { border-color: var(--bg-3); }
.kind-box:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.kind-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); margin-bottom: 6px; transition: background .2s, color .2s; }
.kind-box strong { color: var(--text-strong); }
.kind-box small { color: var(--text-3); font-size: 13px; line-height: 1.4; }
.kind input:checked + .kind-box { border-color: var(--c); background: color-mix(in srgb, var(--c) 6%, var(--card)); }
.kind input:checked + .kind-box .kind-ic { background: var(--c); color: #fff; }
.kind input:focus-visible + .kind-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.proj-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-opt input { position: absolute; opacity: 0; }
.proj-opt > span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 24px; border: 2px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; transition: border-color .15s; }
html[data-theme="dark"] .proj-opt > span { border-color: var(--bg-3); }
.proj-opt i, .proj-opt img { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font: 700 11px var(--font-head); font-style: normal; object-fit: cover; }
.proj-opt input:checked + span { border-color: var(--accent); }
.more-fields { border: 1px solid var(--line-soft); border-radius: var(--r); padding: 0 14px; margin-bottom: 14px; }
.more-fields summary { display: flex; align-items: center; gap: 6px; padding: 12px 0; cursor: pointer; font-weight: 600; color: var(--text-2); list-style: none; }
.more-fields summary::-webkit-details-marker { display: none; }
.more-fields[open] { padding-bottom: 12px; }
.compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.compose-foot a { color: var(--accent); }
.similar { margin-top: 8px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 8px 12px; font-size: 13px; }
.similar strong { display: block; margin-bottom: 4px; color: var(--text-2); }
.similar a { display: block; padding: 2px 0; color: var(--accent); }

/* ---------- Feuille de route ---------- */
.filters-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; align-items: center; }
.filters-bar .select { width: auto; height: 32px; font-size: 14px; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--bg-hover); transition: background .15s, color .15s; }
.chip-link:hover { color: var(--text-strong); background: var(--bg-active); }
.chip-link.is-on { background: var(--accent); color: #fff; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { background: var(--bg-2); border-radius: var(--r); border: 1px solid var(--line-soft); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
html[data-theme="dark"] .kcol { background: var(--bg-side); border-color: var(--bg-3); }
.kcol header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 3px solid var(--c); border-radius: var(--r) var(--r) 0 0; }
.kcol header h2 { font-size: 14px; flex: 1; }
.kcol header em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--text-3); background: var(--bg-hover); padding: 1px 8px; border-radius: 10px; }
.kcol-body { padding: 0 10px 10px; display: grid; gap: 8px; overflow-y: auto; }
.kcard { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); transition: transform .15s var(--ease), box-shadow .15s, border-color .15s; }
html[data-theme="dark"] .kcard { background: var(--bg); border-color: transparent; }
.kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--c); }
.kcard strong { color: var(--text-strong); font-size: 14px; line-height: 1.4; }
.kcard-top, .kcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.kstats { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.kstats .ic + .ic, .kstats .ic:nth-of-type(2) { margin-left: 8px; }
.kempty { padding: 24px 10px; text-align: center; color: var(--text-4); font-size: 13px; border: 1px dashed var(--line); border-radius: var(--r-sm); }

/* ---------- Changelog ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-3); font-weight: 600; margin-bottom: 18px; }
.back-link:hover { color: var(--accent); }
.releases { display: grid; }
.release { display: grid; grid-template-columns: 140px 24px minmax(0, 1fr); gap: 0 16px; position: relative; }
.release::before { content: ""; position: absolute; left: 167px; top: 0; bottom: 0; width: 2px; background: var(--line-soft); }
.release-date { display: grid; justify-items: end; align-content: start; gap: 6px; padding-top: 14px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.release-date .ver { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); }
.release-node { position: relative; z-index: 1; width: 14px; height: 14px; margin: 18px auto 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.release-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; margin-bottom: 28px; animation: rise .4s var(--ease) both; }
html[data-theme="dark"] .release-card { border-color: var(--bg-3); }
.release-cover { width: 100%; max-height: 320px; object-fit: cover; border-bottom: 1px solid var(--line-soft); }
.release-in { padding: 20px 22px; }
.release-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.release-card h2 { font-size: 22px; margin-bottom: 12px; }
.release-card h2 a:hover { color: var(--accent); }
.release-linked { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-2); }
html[data-theme="dark"] .release-linked { background: var(--bg-3); }
.release-linked h4 { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.release-linked ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.release-linked a { display: flex; gap: 8px; font-size: 14px; }
.release-linked a:hover { color: var(--accent); }
.release-linked .mono { color: var(--text-3); }
.release-by { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--text-3); }

/* ---------- Statut ---------- */
.status-banner { --c: var(--ok); display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--r-lg); background: var(--c); color: #fff; margin-bottom: 24px; }
.status-banner .pulse { --c: #fff; width: 14px; height: 14px; }
.status-banner h2 { color: #fff; font-size: 20px; }
.status-banner p { margin: 2px 0 0; opacity: .85; font-size: 14px; }
.status-banner.s-warn { color: #1e1f22; } .status-banner.s-warn h2 { color: #1e1f22; } .status-banner.s-warn .pulse { --c: #1e1f22; }
.comp-group { margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; }
html[data-theme="dark"] .comp-group { border-color: var(--bg-3); }
.comp-group-title { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line-soft); }
html[data-theme="dark"] .comp-group-title { background: var(--bg-3); }
.past .comp-group-title { background: none; padding: 0 0 10px; border: 0; }
.comp { padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.comp:first-of-type { border-top: 0; }
.comp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.comp-name { display: flex; align-items: center; gap: 6px; }
.comp-name strong { color: var(--text-strong); }
.info-ic { color: var(--text-4); display: grid; cursor: help; }
.comp-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--c); }
.comp-state.icon-only { width: 32px; height: 32px; justify-content: center; border-radius: 50%; background: color-mix(in srgb, var(--c) 14%, transparent); }
.uptime { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 32px; }
.uptime i { border-radius: 2px; background: var(--ok); transition: transform .15s var(--ease), opacity .15s; transform-origin: bottom; }
.uptime i:hover { transform: scaleY(1.15); opacity: .8; }
.uptime .u-info { background: var(--info); } .uptime .u-warn { background: var(--warn); } .uptime .u-orange { background: var(--orange); } .uptime .u-bad { background: var(--bad); }
.uptime-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--text-4); }
.incident-card { --c: var(--warn); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-left: 4px solid var(--c); border-radius: var(--r); background: color-mix(in srgb, var(--c) 6%, var(--card)); padding: 16px 18px; margin-bottom: 18px; }
.imp-none { --c: var(--text-4); } .imp-minor { --c: var(--warn); } .imp-major { --c: var(--orange); } .imp-critical { --c: var(--bad); } .imp-maintenance { --c: var(--info); }
.incident-card header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.incident-card h3 { font-size: 17px; } .incident-card.big h2 { font-size: 22px; }
.incident-card h3 a:hover { text-decoration: underline; }
.inc-state { font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .03em; color: #fff; background: var(--c); padding: 3px 8px; border-radius: 4px; }
.inc-timeline { display: grid; gap: 0; margin-top: 14px; }
.inc-update { padding: 12px 0 12px 18px; border-left: 2px solid var(--line); position: relative; }
.inc-update::before { content: ""; position: absolute; left: -6px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 0 3px var(--card); }
.inc-update strong { color: var(--text-strong); font-size: 14px; }
.inc-update .md { margin: 4px 0; font-size: 14px; }
.inc-update time { font-size: 12px; color: var(--text-3); }
.past-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); transition: background .12s; }
.past-item:hover { background: var(--bg-hover); }
.past-item > div { flex: 1; display: grid; }
.past-item strong { color: var(--text-strong); font-size: 14px; }
.past-item small { color: var(--text-3); font-size: 12px; }
.past-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--c); }

/* ---------- Profil ---------- */
.profile { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.profile-card { border-radius: var(--r-lg); background: var(--bg-rail); overflow: hidden; padding: 0 16px 16px; display: grid; gap: 4px; position: sticky; top: calc(var(--top-h) + 24px); }
html[data-theme="light"] .profile-card { background: var(--bg-2); border: 1px solid var(--line-soft); }
.profile-banner { height: 96px; margin: 0 -16px; background: var(--c); }
.profile-av { margin-top: -46px; }
.profile-av .avatar { border: 6px solid var(--bg-rail); box-sizing: content-box; }
html[data-theme="light"] .profile-av .avatar { border-color: var(--bg-2); }
.profile-card h2 { font-size: 20px; margin-top: 6px; }
.profile-card .staff-tag { justify-self: start; margin: 6px 0; }
.profile-bio { margin: 8px 0; padding: 10px 0; border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 14px; }
.profile-since { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin: 6px 0 12px; }
.profile-main { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpis-6 { grid-template-columns: repeat(6, 1fr); margin-bottom: 20px; }
.kpi { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); transition: border-color .15s, transform .15s var(--ease); }
html[data-theme="dark"] .kpi { border-color: var(--bg-3); }
a.kpi:hover { border-color: var(--accent); transform: translateY(-2px); }
.kpi span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.kpi strong { font: 800 26px/1 var(--font-head); color: var(--text-strong); font-variant-numeric: tabular-nums; }
.kpi-alert { border-color: color-mix(in srgb, var(--bad) 50%, transparent) !important; }
.kpi-alert strong { color: var(--bad); }
.heat { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat-col { display: grid; gap: 3px; }
.heat i { width: 13px; height: 13px; border-radius: 3px; background: var(--bg-hover); }
.heat .h1 { background: color-mix(in srgb, var(--ok) 35%, transparent); }
.heat .h2 { background: color-mix(in srgb, var(--ok) 55%, transparent); }
.heat .h3 { background: color-mix(in srgb, var(--ok) 78%, transparent); }
.heat .h4 { background: var(--ok); }
.heat .hfuture { visibility: hidden; }

/* ---------- Paramètres ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { display: grid; gap: 2px; position: sticky; top: calc(var(--top-h) + 24px); }
.settings-label { font: 700 12px var(--font); text-transform: uppercase; color: var(--text-3); padding: 6px 10px; letter-spacing: .02em; }
.settings-nav a, .danger-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-xs); color: var(--text-3); font-weight: 500; font-size: 15px; width: 100%; text-align: left; transition: background .12s, color .12s; }
.settings-nav a:hover { background: var(--bg-hover); color: var(--text-2); }
.settings-nav a.is-active { background: var(--bg-active); color: var(--text-strong); }
.settings-sep { height: 1px; background: var(--line-soft); margin: 8px 10px; }
.danger-link { color: var(--bad); }
.danger-link:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.settings-body { display: grid; gap: 16px; min-width: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 20px; }
html[data-theme="dark"] .panel { border-color: var(--bg-3); }
.panel h2 { font-size: 16px; margin-bottom: 14px; }
.panel h2 + p { margin-top: -6px; }
.panel p a { color: var(--accent); }
.panel-danger { border-color: color-mix(in srgb, var(--bad) 45%, transparent) !important; }
.panel.sticky { position: sticky; top: calc(var(--top-h) + 24px); }
.sticky-bar { position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); }
.avatar-edit { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.avatar-edit > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; }
.avatar-edit p { flex-basis: 100%; margin: 4px 0 0; }
.avatar-prev .avatar, .avatar-prev img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.cover-prev { border-radius: var(--r-sm); margin-bottom: 6px; max-height: 140px; object-fit: cover; width: 100%; }

/* ---------- Supervision ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.dash-main, .dash-side { display: grid; gap: 16px; }
.bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 4px; height: 140px; align-items: end; }
.bar { height: 100%; display: flex; align-items: flex-end; border-radius: 3px; }
.bar:hover { background: var(--bg-hover); }
.bar i { display: block; width: 100%; height: max(3px, var(--h)); border-radius: 3px 3px 1px 1px; background: var(--accent); animation: grow .7s var(--ease) both; transform-origin: bottom; }
.bar:nth-child(odd) i { animation-delay: .04s; }
@keyframes grow { from { transform: scaleY(0); } }
.meter-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.meter-row em { font-style: normal; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.meter-row .ch-ic { color: var(--c); }
.meter-line { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--bg-hover); overflow: hidden; }
.meter-line i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 3px; animation: widen .8s var(--ease) both; transform-origin: left; }
@keyframes widen { from { transform: scaleX(0); } }
.feed-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed-mini li { display: flex; gap: 10px; font-size: 13px; }
.feed-mini li > div { display: grid; min-width: 0; }
.feed-mini a { color: var(--text-2); }
.feed-mini a span { color: var(--text-3); }
.feed-mini a:hover span { color: var(--accent); }
.feed-mini strong { color: var(--text-strong); }
.feed-mini small { color: var(--text-4); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .12s, border-color .12s; }
.tab:hover { color: var(--text-strong); border-color: var(--line); }
.tab.is-on { color: var(--text-strong); border-color: var(--accent); }
.bulk-head { justify-content: flex-start; }
.bulk-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; animation: rise .2s var(--ease); }
.row-wrap { display: flex; align-items: flex-start; border-top: 1px solid var(--line-soft); }
.rows > .row-wrap:first-child { border-top: 0; }
.row-check { padding: 16px 0 0 14px; }
.row-wrap > .rows { flex: 1; min-width: 0; }
.split-admin { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.tax-list { list-style: none; margin: 0; padding: 0; }
.tax { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line-soft); transition: background .12s; }
.tax:first-child { border-top: 0; }
.tax:hover { background: var(--bg-hover); }
.tax.is-editing { background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.tax-mark { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font: 700 13px var(--font-head); overflow: hidden; }
.tax-mark img { width: 100%; height: 100%; object-fit: cover; }
.tax-mark i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.tax-main { flex: 1; display: grid; min-width: 0; }
.tax-main strong { color: var(--text-strong); }
.tax-main a:hover strong { color: var(--accent); }
.tax-main small { color: var(--text-3); font-size: 13px; }
.tax-actions { display: flex; gap: 2px; }
.tax-key { flex-basis: 100%; padding-left: 48px; display: grid; gap: 8px; }
.tax-key .inline-form .muted { display: inline-flex; align-items: center; gap: 6px; flex: 1; }
.key-reveal { display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.key-reveal code { flex: 1; word-break: break-all; font-size: 13px; }
.comp-quick { flex: none; }
.icon-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick span { display: grid; place-items: center; height: 36px; border-radius: var(--r-xs); color: var(--text-3); background: var(--bg-hover); cursor: pointer; transition: background .12s, color .12s; }
.icon-pick input:checked + span { background: var(--accent); color: #fff; }
.pick-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 4px; }
.pick-list.sm { max-height: 200px; }
.pick { display: flex; width: 100%; padding: 6px 8px; border-radius: 4px; font-size: 14px; }
.pick:hover { background: var(--bg-hover); }
.pick .mono { color: var(--text-3); flex: none; }
.pick-t { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.danger-zone { margin-top: 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 10px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-3); background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
html[data-theme="dark"] .table th { background: var(--bg-3); border-bottom-color: var(--bg-3); }
.table td { padding: 10px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:hover td { background: var(--bg-hover); }
.table tr.is-banned td { opacity: .55; }
.table a strong:hover { color: var(--accent); }
.t-actions { display: flex; justify-content: flex-end; gap: 2px; }
.mono-sm td { font-size: 13px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell > span:last-child { display: grid; }
.user-cell strong { color: var(--text-strong); }
.user-cell small { color: var(--text-3); font-size: 12px; }
.role-admin { color: var(--bad); font-weight: 600; } .role-supervisor { color: var(--accent); font-weight: 600; }

/* ---------- Notifications ---------- */
.notifs { list-style: none; margin: 0; padding: 0; }
.notif { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line-soft); position: relative; }
.notif:first-child { border-top: 0; }
.notif:hover { background: var(--bg-hover); }
.notif.is-unread::before { content: ""; position: absolute; left: 4px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.notif a { flex: 1; display: grid; min-width: 0; }
.notif strong { font-weight: 500; color: var(--text-2); font-size: 14px; }
.notif.is-unread strong { color: var(--text-strong); font-weight: 600; }
.notif small { color: var(--text-3); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notif time { font-size: 12px; color: var(--text-4); white-space: nowrap; }
.notif-ic { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg-hover); color: var(--text-3); }
.notif-ic.t-official { background: var(--accent); color: #fff; } .notif-ic.t-status { color: var(--ok); } .notif-ic.t-release { background: #8957e5; color: #fff; } .notif-ic.t-new { color: var(--warn); }

/* ---------- Documents ---------- */
.doc { padding: 28px 32px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
html[data-theme="dark"] .doc { border-color: var(--bg-3); }

/* ---------- Pages d'authentification ---------- */
body.bare { background: var(--bg-rail); min-height: 100vh; }
.bare-bg { position: fixed; inset: 0; color: var(--line-soft); opacity: .5; pointer-events: none; }
.bare-main { position: relative; min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 32px 16px; }
.theme-float { position: fixed; top: 16px; right: 16px; z-index: 5; background: var(--bg); }
.auth-card { width: min(440px, 100%); padding: 32px; border-radius: var(--r-lg); background: var(--bg); box-shadow: var(--shadow-lg); animation: card-in .5s var(--ease-spring) both; }
.auth-card.wide { width: min(520px, 100%); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.auth-brand { display: flex; align-items: center; gap: 10px; font: 700 16px var(--font-head); color: var(--text-strong); margin-bottom: 22px; }
.auth-logo { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.auth-card h1 { font-size: 24px; text-align: center; }
.auth-sub { text-align: center; color: var(--text-3); margin: 6px 0 24px; }
.auth-small { display: inline-block; font-size: 14px; color: var(--accent); margin: -6px 0 16px; font-weight: 500; }
.auth-small:hover, .auth-alt a:hover { text-decoration: underline; }
.auth-alt { text-align: center; font-size: 14px; color: var(--text-3); margin: 16px 0 0; }
.auth-alt a, .auth-form .check a { color: var(--accent); font-weight: 600; }
.auth-form .check { margin-bottom: 16px; }
.bare-links { display: flex; gap: 16px; font-size: 13px; color: var(--text-3); }
.bare-links a:hover { color: var(--text-strong); }
body.bare .toast { position: fixed; }

/* ---------- Visionneuse ---------- */
.lightbox { position: fixed; inset: 0; z-index: 800; display: grid; place-items: center; background: rgba(0, 0, 0, .85); padding: 32px; animation: fade .2s ease both; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--r-sm); animation: card-in .3s var(--ease-spring) both; }
.lb-x { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255, 255, 255, .12); }
@keyframes fade { from { opacity: 0; } }

/* ---------- Entrées échelonnées ---------- */
[data-stagger] > * { animation: rise .4s var(--ease) both; }
[data-stagger] > *:nth-child(2) { animation-delay: .03s; } [data-stagger] > *:nth-child(3) { animation-delay: .06s; }
[data-stagger] > *:nth-child(4) { animation-delay: .09s; } [data-stagger] > *:nth-child(5) { animation-delay: .12s; }
[data-stagger] > *:nth-child(6) { animation-delay: .15s; } [data-stagger] > *:nth-child(7) { animation-delay: .18s; }
[data-stagger] > *:nth-child(n+8) { animation-delay: .2s; }

/* ---------- Responsive ---------- */
.only-mobile { display: none; }
.side-scrim { display: none; }
@media (max-width: 1180px) {
  .kpis-6 { grid-template-columns: repeat(3, 1fr); }
  .dash, .split-admin { grid-template-columns: 1fr; }
  .panel.sticky { position: static; }
}
@media (max-width: 1024px) {
  .page-split, .issue { grid-template-columns: 1fr; }
  .col-side, .issue-side { position: static; }
  .profile { grid-template-columns: 1fr; }
  .profile-card { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .side { position: fixed; left: var(--rail-w); top: 0; bottom: 0; width: var(--side-w); z-index: 70; transform: translateX(calc(-100% - var(--rail-w))); transition: transform .28s var(--ease); box-shadow: var(--shadow-lg); }
  .rail { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); z-index: 71; transform: translateX(-100%); transition: transform .28s var(--ease); }
  body.side-open .side, body.side-open .rail { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .55); animation: fade .2s; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .only-mobile { display: inline-grid; }
  .search input { width: 140px; } .search input:focus { width: 180px; } .search kbd { display: none; }
  .topbar-div, .topbar-sub { display: none; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-label, .settings-sep { display: none; }
  .settings-nav a, .danger-link { white-space: nowrap; width: auto; }
}
@media (max-width: 640px) {
  .page { padding: 16px; }
  .hide-sm { display: none !important; }
  .hero { padding: 18px; } .hero-stats { gap: 18px; } .hero h2 { font-size: 22px; }
  .kpis, .kpis-6 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .form-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; }
  .issue-title { font-size: 22px; }
  .tl::before { left: 15px; } .msg-av { display: none; } .msg-box::before { display: none; }
  .ev { margin-left: 0; } .reply { margin-left: 0; } .reply > .msg-av { display: none; } .reply-locked { margin-left: 0; }
  .release { grid-template-columns: 1fr; } .release::before, .release-node { display: none; } .release-date { justify-items: start; grid-auto-flow: column; justify-content: start; padding: 0 0 8px; }
  .row { padding: 12px; gap: 10px; } .row-side { gap: 8px; } .vote { width: 40px; height: 44px; }
  .toast { left: 16px; right: 16px; max-width: none; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .auth-card { padding: 24px 20px; }
  .doc { padding: 20px; }
  .uptime { gap: 1px; }
  .search input { width: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
