/* Command Hub — styles */
:root {
  --bg: #f6f8fb; --surface: #ffffff; --surface-2: #f1f4f9; --surface-3: #e9eef6; --line: #e3e8ef; --line-2: #d5dce7;
  --fg: #0f1b33; --fg-2: #23324f; --muted: #64748b; --faint: #94a3b8;
  --navy: #0f1d3d; --navy-2: #13254d; --primary: #12305f; --primary-fg: #ffffff; --link: #0f5e9c;
  --blue: #2563eb; --blue-soft: #e8f0fe; --blue-fg: #1d4ed8;
  --red: #dc2626; --red-soft: #fdecec; --red-line: #f5b5b5;
  --amber: #d97706; --amber-soft: #fff4e0; --amber-line: #f6d39a;
  --green: #059669; --green-soft: #e6f6ef; --green-line: #a7e3c9;
  --violet: #7c3aed; --violet-soft: #f1ebfe;
  --teal: #0d9488;
  --side-top: #111a35; --side-bot: #273a73; --side-fg: #eef2fb; --side-muted: #a8b4d4; --side-line: rgba(255,255,255,.08);
  --band-a: #111a35; --band-b: #26357a;
  --shadow-sm: 0 1px 2px rgba(15,27,51,.06);
  --shadow: 0 1px 3px rgba(15,27,51,.06), 0 6px 18px rgba(15,27,51,.05);
  --radius: 14px; --radius-sm: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1222; --surface: #121b30; --surface-2: #17223b; --surface-3: #1d2a47; --line: #24314f; --line-2: #2e3d60;
  --fg: #e6ebf5; --fg-2: #cbd5e6; --muted: #98a6c0; --faint: #6b7a97;
  --primary: #3b6fd4; --primary-fg: #ffffff; --link: #7fb2ff;
  --blue-soft: #19294d; --blue-fg: #8ab4ff; --red-soft: #3a1820; --red-line: #6b2a33; --amber-soft: #3a2a12; --amber-line: #6b4d1c;
  --green-soft: #12352a; --green-line: #1f5c47; --violet-soft: #2a2050;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 1px 3px rgba(0,0,0,.3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.num, .tabnum { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 292px minmax(0, 1fr); min-height: 100%; }
.att-row svg, .comment svg, b svg { flex: none; }
.app.collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.app.collapsed .side { visibility: hidden; }
.side { position: sticky; top: 0; height: 100vh; overflow: hidden auto; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--side-top) 0%, #18264f 45%, var(--side-bot) 100%); color: var(--side-fg); }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 18px 16px; border-bottom: 1px solid var(--side-line); }
.brand-logo { height: 38px; display: flex; align-items: center; flex: none; }
.brand-logo img { height: 38px; width: auto; max-width: 170px; object-fit: contain; display: block; }
.brand-logo .fallback { font-weight: 800; font-size: 20px; color: #fff; letter-spacing: -.01em; }
.brand-name { font-weight: 800; font-size: 18px; white-space: nowrap; letter-spacing: -.01em; line-height: 1.15; }
.brand-sub { font-size: 12.5px; color: var(--side-muted); }
.nav { padding: 12px 12px 28px; display: flex; flex-direction: column; gap: 3px; }
.nav-group { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px; background: none; border: 0; color: var(--side-muted);
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-align: left; }
.nav-group svg { width: 14px; height: 14px; transition: transform .15s; }
.nav-group.closed svg { transform: rotate(-90deg); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--side-fg); text-decoration: none; font-weight: 600; font-size: 15.5px; }
.nav-item:hover { background: rgba(255,255,255,.05); }
.nav-item.on { background: rgba(255,255,255,.09); }
.nav-item.on.glow-red { box-shadow: 0 10px 24px -12px rgba(244,114,182,.55); }
.nav-item.on.glow-blue { box-shadow: 0 10px 24px -12px rgba(129,140,248,.55); }
.nav-item.on.glow-teal { box-shadow: 0 10px 24px -12px rgba(45,212,191,.45); }
.nav-item.on.glow-amber { box-shadow: 0 10px 24px -12px rgba(251,191,36,.45); }
.nav-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; border: 1px solid rgba(255,255,255,.08); }
.nav-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico-blue { background: #2c3770; color: #c7d2fe; } .ico-red { background: #4a2240; color: #f9a8d4; }
.ico-teal { background: #1b4a4b; color: #99f6e4; } .ico-amber { background: #4a3a1c; color: #fcd34d; }
.ico-violet { background: #3b2a6b; color: #ddd6fe; }
.nav-item.on.glow-violet { box-shadow: 0 10px 24px -12px rgba(167,139,250,.55); }
/* Plateforme CR intégrée */
.page.page-flush { padding: 0; gap: 0; }
.studio-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.studio-frame { display: block; width: 100%; border: 0; height: calc(100vh - 72px); background: var(--bg); }
.studio-bar + .studio-frame { height: calc(100vh - 72px - 53px); }
.nav-sub { display: block; padding: 7px 10px 7px 56px; border-radius: 9px; color: var(--side-muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-sub:hover { color: var(--side-fg); background: rgba(255,255,255,.04); }
.nav-sub.on { color: #fff; background: rgba(255,255,255,.1); font-weight: 600; }
.nav-sub.flush { padding-left: 46px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 72px; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 22px; }
.tb-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; position: relative; color: var(--fg); }
.tb-btn:hover { background: var(--surface-2); }
.tb-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tb-burger { border: 0; }
.badge-dot { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.scope { min-width: 0; flex: 1; position: relative; }
.scope-btn { background: none; border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; }
.scope-btn b { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.scope-btn b svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2; }
.scope-btn small { color: var(--muted); font-size: 12.5px; }
.tb-user { text-align: right; line-height: 1.25; }
.tb-user b { font-weight: 700; font-size: 14px; display: block; }
.tb-user small { color: var(--muted); font-size: 11.5px; }
.tb-logout { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 14px; font-weight: 600; font-size: 13px; }
.tb-week { color: var(--muted); font-size: 14px; white-space: nowrap; }
.tb-week b { color: var(--primary); }
.page { padding: 26px 30px 60px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------- Generic ---------- */
h1.title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card.pad { padding: 18px 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; }
.card-h h3 { margin: 0; font-size: 15px; font-weight: 700; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.sep { width: 1px; align-self: stretch; background: var(--line); }

.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; white-space: nowrap; color: var(--fg); }
.btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.blue { background: #1f6fd1; border-color: #1f6fd1; color: #fff; }
.btn.green { background: #0f8a5f; border-color: #0f8a5f; color: #fff; }
.btn.danger { background: #d92d2d; border-color: #d92d2d; color: #fff; }
.btn.danger-outline { color: var(--red); border-color: var(--red-line); background: var(--surface); }
.btn.danger-outline:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.soft-blue { background: var(--blue-soft); border-color: #bcd3f7; color: var(--blue-fg); }
.btn.soft-green { color: var(--green); border-color: var(--green-line); background: var(--surface); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); font-weight: 600; font-size: 13px; }
.linkbtn:hover { text-decoration: underline; }

.input, .select, .textarea { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 12px; width: 100%; min-width: 0; color: var(--fg); }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { border-color: #9cb8e8; box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--fg-2); }
.field > span i { color: var(--red); font-style: normal; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--faint); fill: none; stroke-width: 2; }
.search .input { padding-left: 36px; }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 11px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--surface-2); }

.seg { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--fg-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.seg button.on { background: var(--navy); color: #fff; }
.seg.blue button.on { background: #12305f; }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-blue { background: var(--blue-soft); color: var(--blue-fg); border-color: #cddcf8; }
.p-red { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.p-amber { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.p-green { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.p-violet { background: var(--violet-soft); color: var(--violet); border-color: #ddd0fb; }
.p-grey { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.p-navy { background: var(--navy); color: #fff; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--fg-2); font-size: 11.5px; font-weight: 700; }
.stream-code { font-weight: 700; font-size: 12px; color: #0f5e9c; letter-spacing: .02em; }
.tag-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: 11.5px; color: var(--fg-2); background: var(--surface); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tr.clickable { cursor: pointer; }
table.t tr.clickable:hover td { background: var(--surface-2); }
.ref-cell { display: flex; align-items: center; gap: 9px; }
.ref-bar { width: 5px; height: 26px; border-radius: 3px; background: var(--rc, var(--blue)); flex: none; }
.ref-link { color: #0f6e8c; font-weight: 700; font-size: 13.5px; }
.cr-link { color: #0f6e8c; font-weight: 600; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--fg); font-size: 15px; margin-bottom: 4px; }

/* Progress bar */
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: #3b82f6; }
.compl { display: inline-flex; align-items: center; gap: 8px; min-width: 110px; }
.compl .bar { flex: 1; height: 18px; border-radius: 6px; background: var(--surface-3); position: relative; }
.compl .bar > i { border-radius: 6px; background: #b7e4cf; }
.compl .bar > b { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--fg); }

/* ---------- Cockpit ---------- */
.health { border-radius: 18px; padding: 24px 26px; color: #fff; background: linear-gradient(115deg, var(--band-a) 0%, #1a2552 55%, var(--band-b) 100%);
  display: grid; grid-template-columns: minmax(260px, 1.15fr) auto minmax(0, 1.6fr); gap: 26px; align-items: center; }
.health .eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; color: #c9d3ee; display: flex; align-items: center; gap: 6px; }
.health .eyebrow svg { width: 15px; height: 15px; stroke: #c9d3ee; fill: none; stroke-width: 2; }
.health .score { font-size: 52px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 4px; }
.health p { margin: 6px 0 0; color: #d3dbf0; font-size: 13.5px; }
.meteo { background: #fff; color: var(--navy); border-radius: 14px; min-width: 150px; padding: 12px 18px 14px; text-align: center; }
.meteo .lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: #5b6a8a; }
.meteo .wx { width: 60px; height: 60px; margin: 6px auto 4px; border-radius: 14px; background: #eef3fb; display: grid; place-items: center; }
.meteo .wx svg { width: 44px; height: 44px; }
.meteo b { font-size: 14px; }
.hchips { display: flex; flex-wrap: wrap; gap: 10px; }
.hchip { border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #eef2fb; white-space: nowrap; }
.hchip.pink { background: rgba(244,114,182,.18); border-color: rgba(244,114,182,.35); }
.hchip.amber { background: rgba(251,191,36,.2); border-color: rgba(251,191,36,.4); color: #fde68a; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { text-align: left; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--kc, var(--blue)); border-radius: var(--radius); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; }
.kpi:hover { box-shadow: var(--shadow); }
.kpi.alert { border-color: #f3b4b4; border-top-color: var(--kc); }
.kpi .ki { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--kbg, var(--blue-soft)); color: var(--kc); margin-bottom: 8px; }
.kpi .ki svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kpi .kn { font-size: 32px; font-weight: 800; color: var(--knc, var(--fg)); letter-spacing: -.02em; line-height: 1.1; }
.kpi .kt { font-weight: 700; font-size: 14.5px; color: var(--fg); }
.kpi .ks { color: var(--muted); font-size: 12.5px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 600; color: var(--fg-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.tabs button.on { color: #3949ab; border-color: #3949ab; }
.cockpit-split { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.prio { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.prio-score { width: 40px; height: 40px; border-radius: 10px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-weight: 800; font-size: 13.5px; border: 1px solid var(--red-line); }
.prio-title { font-weight: 600; font-size: 14.5px; }
.prio-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.prio-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.late-pill { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line); border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.aging { display: flex; flex-direction: column; gap: 12px; padding: 4px 20px 18px; }
.aging a { display: grid; grid-template-columns: 70px minmax(0, 1fr) 40px; gap: 12px; align-items: center; text-decoration: none; color: var(--muted); font-size: 13px; }
.aging a b { text-align: right; color: var(--fg); font-size: 15px; }
.aging .bar { height: 10px; }
.aging .bar > i { background: #6c7fd8; }
.widget-rows { display: flex; flex-direction: column; padding: 0 20px 14px; }
.widget-rows a, .widget-rows div { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--fg-2); font-size: 13.5px; }
.widget-rows b { font-size: 16px; color: var(--fg); }

/* ---------- Actions cockpit ---------- */
.ac-head { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.ac-title { font-size: 19px; font-weight: 800; }
.stat-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 6px 13px; font-weight: 700; font-size: 13.5px; border: 1px solid; background: none; }
.stat-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stat-pill b { font-weight: 800; }
.stat-pill.red { color: var(--red); background: var(--red-soft); border-color: var(--red-line); }
.stat-pill.amber { color: var(--amber); background: var(--amber-soft); border-color: var(--amber-line); }
.stat-pill.green { color: var(--green); background: var(--green-soft); border-color: var(--green-line); }
.toggle { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-weight: 600; font-size: 13.5px; }
.switch { width: 42px; height: 24px; border-radius: 999px; background: #c5cfdd; position: relative; border: 0; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: #2f7ad8; }
.switch.on::after { left: 21px; }
.info-box { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--fg-2); }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 10px 16px; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.k-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 320px; max-height: 76vh; }
.k-col-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.k-col-h .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.k-col-b { padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; }
.k-col.drop { outline: 2px dashed #6c8fd8; outline-offset: -4px; }
.k-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--kb, #3b82f6); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; cursor: pointer; box-shadow: var(--shadow-sm); }
.k-card:hover { box-shadow: var(--shadow); }
.k-top { display: flex; gap: 8px; align-items: flex-start; }
.k-ref { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; flex: none; }
.k-title { font-weight: 700; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--fg-2); }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: #dbe4f5; color: #2b3f75; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; background: var(--navy); color: #fff; }
.k-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.k-late { color: var(--red); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.k-late svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.sprint-pill { background: var(--violet-soft); color: var(--violet); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

/* Drawer */
.scrim { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 60; display: flex; justify-content: flex-end; backdrop-filter: blur(2px); }
.drawer { width: min(860px, 100%); height: 100%; background: var(--surface); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.25); }
.drawer-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); gap: 10px; }
.drawer-h h2 { margin: 0; font-size: 19px; font-weight: 800; }
.drawer-x { width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; }
.drawer-x:hover { background: var(--surface-2); }
.drawer-x svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.drawer-tools { padding: 14px 24px 0; display: flex; flex-direction: column; gap: 12px; }
.drawer-b { flex: 1; overflow-y: auto; padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.drawer-f { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line); }
.status-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.status-seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 14px; font-weight: 600; font-size: 13.5px; }
.status-seg button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.subtabs { display: flex; gap: 8px; flex-wrap: wrap; }
.subtabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 6px 13px; font-weight: 600; font-size: 13px; }
.subtabs button.on { background: var(--blue-soft); border-color: #a9c4f2; color: var(--blue-fg); }
.subtabs.dark button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.subtabs.pill button { border-radius: 999px; }
.subtabs.pill button.on { background: #1d8ce0; border-color: #1d8ce0; color: #fff; }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.box-h { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-2); }
.box-h.green { color: var(--green); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; font-size: 13px; }
.kv span { color: var(--muted); }
.note-blue { background: var(--blue-soft); color: var(--blue-fg); border-radius: 8px; padding: 7px 12px; font-size: 12.5px; }
.note-green { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.note-amber { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-line); border-radius: 8px; padding: 7px 12px; font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-tog { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; color: var(--fg-2); }
.chip-tog.on { background: var(--blue-soft); border-color: #93b4ee; color: var(--blue-fg); font-weight: 600; }
.chip-tog.on-green { background: var(--green-soft); border-color: var(--green-line); color: var(--green); font-weight: 600; }

/* Rich text editor */
.rte { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.rte-bar { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rte-bar button { width: 28px; height: 26px; border: 0; background: none; border-radius: 6px; font-weight: 700; color: var(--fg-2); display: grid; place-items: center; }
.rte-bar button:hover { background: var(--surface-3); }
.rte-bar button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.rte-bar .rte-state { margin-left: auto; font-size: 12px; color: var(--muted); width: auto !important; padding: 0 6px; font-weight: 500 !important; }
.rte-bar .rte-state:hover { color: var(--fg); }
.rte-area { min-height: 140px; padding: 14px 16px; outline: none; font-size: 15px; line-height: 1.55; }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--faint); }
.rte-area ul, .rte-area ol { margin: 4px 0; padding-left: 22px; }
.rte-area p { margin: 0 0 6px; }

/* ---------- CR ---------- */
.mini-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mini-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.mini-kpi span { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; color: var(--muted); }
.mini-kpi b { display: block; font-size: 24px; font-weight: 800; margin-top: 2px; }
.tab-count { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; display: inline-flex; gap: 7px; align-items: center; color: var(--fg-2); }
.tab-count.on { background: #1d6fd6; color: #fff; }
.tab-count.on .count { background: rgba(255,255,255,.25); color: #fff; }
.cr-head { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.cr-title-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.cr-title { display: flex; gap: 14px; align-items: flex-start; }
.back-btn { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; display: grid; place-items: center; flex: none; }
.back-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.cr-title h1 { margin: 0; font-size: 21px; font-weight: 800; }
.cr-sub { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--fg-2); margin-top: 3px; }
.cr-num { background: var(--blue-soft); color: var(--blue-fg); border-radius: 6px; padding: 1px 8px; font-weight: 700; font-size: 12px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badges .pill { border-radius: 6px; font-size: 11.5px; }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.steps button { border: 0; background: none; border-radius: 9px; padding: 10px 8px; font-weight: 600; font-size: 13.5px; color: var(--fg-2); display: flex; gap: 8px; align-items: center; justify-content: center; }
.steps button svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.steps button.on { background: var(--navy); color: #fff; }
.step-card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 0; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: #1d8ce0; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.step-ttl { display: flex; gap: 12px; align-items: center; }
.step-ttl b { display: block; font-size: 15px; }
.step-ttl small { color: var(--muted); font-size: 12.5px; }
.inner-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.inner-box > b { font-size: 14px; }
.slide-sim { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.slide-box { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.slide-box-h { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.ok-chip { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-weight: 700; letter-spacing: 0; }
.comment { border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; }
.comment p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.att-row:first-child { border-top: 0; }

/* ---------- Stand-up ---------- */
.su-bar { background: linear-gradient(100deg, #0e1a3a, #18306a); color: #fff; border-radius: 14px 14px 0 0; padding: 10px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.su-bar .lbl { font-size: 11px; color: #a9b8dc; font-weight: 700; letter-spacing: .08em; }
.su-chip { display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px 10px 3px 4px; font-size: 12.5px; }
.su-chip.on { background: #fff; color: var(--navy); font-weight: 700; }
.su-chip .avatar { width: 20px; height: 20px; font-size: 9.5px; }
.su-chip small { color: #fca5a5; font-weight: 600; }
.su-chip.on small { color: var(--red); }
.su-timer { display: inline-flex; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.su-timer .bar { width: 70px; height: 5px; background: rgba(255,255,255,.2); }
.su-timer .bar > i { background: #ef4444; }
.su-input { display: flex; gap: 10px; }
.su-hints { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.su-hints code { font-family: var(--mono); font-size: 11.5px; }
.su-entry { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; align-items: start; }
.su-entry .sid { font-size: 11px; color: var(--faint); font-weight: 600; padding-top: 2px; }
.su-entry p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.su-entry .su-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.su-entry .su-meta .late { color: var(--red); }
.su-actions { display: flex; gap: 8px; align-items: center; }
.su-actions .select { height: 32px; width: auto; font-size: 12.5px; padding: 0 28px 0 10px; }
.su-actions .linkbtn { color: var(--fg-2); font-weight: 500; }
.filter-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); }
.filter-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.filter-lbl { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }

/* Points d'attention */
.pil-btn { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; border: 1px solid; background: var(--surface); }
.pil-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.pil-ok { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
.pil-ko { color: var(--red); border-color: var(--red-line); background: var(--red-soft); }
.pil-rk { color: #2563eb; border-color: #bcd3f7; background: var(--blue-soft); }
.stream-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stream-chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 600; color: var(--fg-2); }
.stream-chips button.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Modal, toast, login */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal .card { width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal.wide .card { width: min(900px, 100%); }
.modal h3 { margin: 0; font-size: 17px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #0f1b33; color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; z-index: 100; box-shadow: var(--shadow); font-size: 13.5px; }
.toast.err { background: #b42318; }
.login { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 16px; }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px 30px 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-sm); }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand .brand-logo { height: 34px; padding-right: 14px; border-right: 1px solid var(--line); }
.login-brand .brand-logo img { height: 34px; }
.login-brand .brand-logo .fallback { color: #232d4b; }
.login-brand b { font-size: 21px; font-weight: 800; white-space: nowrap; }
.login .err { color: var(--red); font-size: 13px; min-height: 1em; }
.login .btn.primary { justify-content: center; height: 42px; background: #6f8fb5; border-color: #6f8fb5; }
.login .btn.primary.ready { background: var(--primary); border-color: var(--primary); }
.popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; min-width: 260px; }
.popover button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; }
.popover button:hover { background: var(--surface-2); }

@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .health { grid-template-columns: 1fr auto; }
  .health .hchips { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; width: 292px; transform: translateX(-100%); transition: transform .2s; }
  .app.mobile-open .side { transform: none; }
  .app.collapsed .side { visibility: visible; }
  .cockpit-split { grid-template-columns: 1fr; }
  .tb-user, .tb-week { display: none; }
  .page { padding: 18px 16px 50px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .kpi-grid, .mini-kpis, .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .scope { overflow: hidden; }
  .scope-btn { max-width: 100%; }
  .scope-btn b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .scope-btn small { display: none; }
  .seg button { padding: 6px 9px; font-size: 12.5px; }
  .kpi-grid, .mini-kpis, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .health { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; gap: 8px; }
  .tb-logout { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
