/* Craftstack — Administration : feuille de style v6 (aucune ressource externe)

   Habillage repris de la page d'accueil (direction artistique « sobre » du
   7 nov. 2026, maquette « futur DA ») : fond presque noir, texte crème, filets
   gris, un seul accent beige, titres en Inter gras espacés, angles droits sur
   les boutons et 20 px sur les cartes.

   Les polices sont servies DEPUIS LE SITE, pas depuis Google : la page
   d'administration tourne sous une politique de sécurité stricte
   (font-src 'self' dans nginx), qui refuse toute ressource extérieure. */
@font-face { font-family: "Inter"; src: url(vendor/inter.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --bg: #141414;
  --surface: #1F1F1F;
  --surface-2: #262626;
  --hover: #2B2B2B;
  --border: #2E2E2E;
  --sidebar: #141414;
  --card-shadow: none;
  --border-2: #3A3A3A;
  --grid: rgba(237, 235, 230, .07);
  --text: #EDEBE6;
  --dim: #9C9A94;
  --faint: #8D8B85;
  --accent: #C9B28A;
  --accent-soft: rgba(201, 178, 138, .15);
  --good: #9DBB8F;
  --bad: #E0796B;
  --warn: #D3A46A;
  --radius: 20px;
  --gap: 20px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-titre: "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* alias des anciens noms (utilisés dans les graphiques et le code) */
  --panel: var(--surface); --panel-2: var(--surface-2); --bg-2: #191919; --accent-2: #77756F;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #EFEDE8;
  --surface: #FBFAF7;
  --surface-2: #F1EFE9;
  --hover: #E8E5DE;
  --border: #DEDAD1;
  --border-2: #CBC6BA;
  --grid: rgba(20, 20, 20, .08);
  --text: #141414;
  --dim: #5B5952;
  --faint: #8A877F;
  --accent: #8A6D3B;
  --accent-soft: rgba(138, 109, 59, .12);
  --good: #2F8A57;
  --bad: #B23F30;
  --warn: #9A6F00;
  --bg-2: #E6E3DC; --accent-2: #9C9A94;
  --sidebar: #FBFAF7;
  --card-shadow: none;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, .brand b, .card-h b, .login-card h1 { font-family: var(--font-titre); letter-spacing: -.02em; }

.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); } .faint { color: var(--faint); }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 36px 32px 26px; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 18px; color: #fff; background: var(--accent); }
.login-card h1 { font-size: 21px; font-weight: 650; margin: 20px 0 4px; letter-spacing: -.02em; }
.login-card .sub { color: var(--dim); margin-bottom: 24px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 550; color: var(--dim); margin-bottom: 6px; }
.input { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border-2); border-radius: 9px; padding: 10px 12px; font: inherit; }
.input:focus { outline: none; border-color: var(--accent); }
.pw-row { position: relative; }
.pw-row .input { padding-right: 84px; font-family: var(--mono); letter-spacing: .04em; }
.pw-row button { position: absolute; right: 5px; top: 5px; bottom: 5px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--surface-2); color: var(--dim); font-size: 12px; font-weight: 550; }
.pw-row button:hover { color: var(--text); }
.form-error { color: var(--bad); font-size: 13px; min-height: 20px; margin: 4px 0 10px; }
.login-foot { margin-top: 20px; text-align: center; font-size: 12px; color: var(--faint); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); padding: 7px 13px; border-radius: 9px; font-weight: 550; font-size: 13px; transition: background .12s, border-color .12s; white-space: nowrap; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--bad) 55%, transparent); color: var(--bad); }
.btn-danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--dim); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 9px; border-color: transparent; background: transparent; color: var(--dim); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.btn svg, .icon-btn svg { width: 17px; height: 17px; flex: none; }

/* ---------- Structure ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 12px 16px; background: var(--sidebar); border-right: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 24px; }
.brand .brand-mark { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
.brand b { display: block; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.brand small { color: var(--faint); font-size: 11.5px; }
.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.nav-sec { padding: 18px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.nav-sec:first-child { padding-top: 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--dim); font-weight: 520; text-decoration: none; }
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--surface-2); color: var(--text); }
.nav a.active svg { color: var(--accent); opacity: 1; }
.nav .badge { margin-left: auto; font-size: 11px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0 8px; font-weight: 650; line-height: 19px; }
.side-foot { margin-top: auto; padding: 14px 10px 0; font-size: 12px; color: var(--faint); line-height: 1.6; }
.side-foot a { color: var(--dim); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 0 32px; height: 64px; background: var(--bg); border-bottom: 1px solid var(--border); }
.titles { margin-right: auto; min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.topbar h1 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; }
.topbar .page-sub { color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.burger { display: none; }
.controls { display: flex; align-items: center; gap: 8px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 2px; gap: 1px; }
.seg button { border: 0; background: transparent; color: var(--dim); padding: 5px 11px; border-radius: 7px; font-weight: 550; font-size: 12.5px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--border-2); }
.more { position: relative; }
.more .menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px; padding: 5px; z-index: 30; }
.more .menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text); }
.more .menu button:hover { background: var(--hover); }
.more .menu button.on { color: var(--accent); font-weight: 600; }
.select { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 9px; padding: 6px 9px; font: inherit; font-size: 12.5px; font-weight: 550; }
.date-in { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 9px; padding: 5px 8px; font: inherit; font-size: 12.5px; color-scheme: inherit; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 550; font-size: 12.5px; border: 1px solid var(--border); text-decoration: none; }
.live-pill:hover { background: var(--hover); text-decoration: none; }
.pulse { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--good); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.tools { display: flex; align-items: center; gap: 2px; padding-left: 6px; margin-left: 4px; border-left: 1px solid var(--border); }
.content { padding: 28px 32px 72px; width: 100%; max-width: 1360px; margin: 0 auto; }
.updated { font-size: 12px; color: var(--faint); }

/* ---------- Cartes & grilles ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); align-items: stretch; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px 20px; min-width: 0; box-shadow: var(--card-shadow); }
.card-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-h h2 { font-size: 14.5px; font-weight: 620; letter-spacing: -.01em; }
.card-h .sub { color: var(--faint); font-size: 12.5px; margin-top: 2px; font-weight: 400; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.stack > .card { flex: 1; }
.chart-box { position: relative; height: 300px; }
.card.fill { display: flex; flex-direction: column; }
.card.fill .chart-box { flex: 1; height: auto; min-height: 340px; }
.chart-box.tall { height: 340px; }
.chart-box.matrix { height: 460px; }
.chart-box.short { height: 220px; }
.chart-box.donut { height: 230px; }

/* Indicateurs */
.grid.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid.kpis.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.kpis.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.kpis > .card { grid-column: auto; }
.kpi { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 16px; position: relative; overflow: hidden; }
.kpi .k-label { color: var(--dim); font-size: 12.5px; font-weight: 520; }
.kpi .k-val { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.05; white-space: nowrap; }
.kpi .k-val small { font-size: 14px; font-weight: 550; color: var(--dim); margin-left: 3px; letter-spacing: 0; }
.kpi .k-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; font-size: 12.5px; color: var(--faint); min-height: 22px; margin-top: auto; }
.kpi .k-spark { height: 34px; margin: 2px -4px -2px; }
.kpi .k-spark svg { width: 100%; height: 100%; display: block; }
.delta { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; flex: none; font-weight: 600; padding: 1px 7px; border-radius: 6px; font-size: 12px; }
.delta.up { color: var(--good); background: color-mix(in srgb, var(--good) 13%, transparent); }
.delta.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.delta.flat { color: var(--dim); background: var(--surface-2); }
.help { cursor: help; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; margin: 0 -22px -4px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; font-weight: 550; color: var(--faint); padding: 8px 12px; white-space: nowrap; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th .arr { opacity: .9; margin-left: 4px; color: var(--accent); font-size: 10px; }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr:hover td { background: var(--surface-2); }
td:first-child, th:first-child { padding-left: 8px; }
td.r, th.r { text-align: right; white-space: nowrap; }
td.nw { white-space: nowrap; }
.prio-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.cols-2 h4 { margin-bottom: 10px; font-size: 12px; font-weight: 550; color: var(--faint); }
.game-cell { display: inline-flex; align-items: center; gap: 9px; font-weight: 550; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c, var(--accent)); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 550; background: var(--surface-2); color: var(--dim); }
.chip.good { color: var(--good); background: color-mix(in srgb, var(--good) 13%, transparent); }
.chip.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.chip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, transparent); }
.spark { width: 88px; height: 26px; display: block; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { max-width: 260px; padding: 7px 11px; }
.tabs { display: inline-flex; gap: 2px; flex-wrap: wrap; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.tab { border: 0; background: transparent; color: var(--dim); padding: 4px 11px; border-radius: 7px; font-weight: 550; font-size: 12.5px; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-2); }

/* ---------- Barres, légendes, carte de chaleur ---------- */
.bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr auto; gap: 14px; align-items: center; font-size: 13.5px; }
.bar-row .nm { display: flex; align-items: center; gap: 9px; font-weight: 520; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row a.nm { color: var(--text); text-decoration: none; }
.bar-row a.nm:hover { color: var(--accent); }
.bar-row.wide { grid-template-columns: minmax(180px, 62%) 1fr auto; }
.bar-track { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--c, var(--accent)); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.bar-row .v { font-weight: 550; min-width: 60px; text-align: right; color: var(--dim); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; font-size: 11px; align-items: center; }
.heat .hh { text-align: center; color: var(--faint); font-size: 10.5px; }
.heat .hd { color: var(--dim); font-weight: 520; }
.heat .c { aspect-ratio: 1.7 / 1; border-radius: 4px; background: color-mix(in srgb, var(--accent) calc(var(--v, 0) * 100%), var(--surface-2)); cursor: default; min-height: 12px; max-height: 22px; width: 100%; }
.heat .c:hover { outline: 2px solid var(--text); outline-offset: 1px; }
.heat-legend { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 11.5px; color: var(--faint); }
.heat-legend i { display: block; width: 110px; height: 6px; background: linear-gradient(90deg, var(--surface-2) 33%, color-mix(in srgb, var(--accent) 50%, var(--surface-2)) 33% 66%, var(--accent) 66%); } /* 3 aplats */
.cohort td { text-align: center; padding: 6px; }
.cohort td.cell { border-radius: 5px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--accent) calc(var(--v, 0) * 100%), var(--surface-2)); }

/* ---------- Conclusions, vides, squelettes ---------- */
.insights { display: flex; flex-direction: column; }
.insight { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--border); }
.insight:first-child { padding-top: 0; } .insight:last-child { border-bottom: 0; padding-bottom: 0; }
.insight .ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; margin-top: 1px; background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent); color: var(--c, var(--accent)); font-size: 11px; font-weight: 700; }
.insight .ic svg { width: 13px; height: 13px; }
.insight b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.4; }
.insight span { color: var(--dim); font-size: 12.5px; display: block; margin-top: 2px; }
.empty { text-align: center; padding: 36px 16px; color: var(--dim); }
.empty b { display: block; color: var(--text); font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.skeleton { background: var(--surface); animation: pulse 1.4s ease-in-out infinite; border-radius: var(--radius); }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; margin-bottom: var(--gap); background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.banner.err { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.note { font-size: 12.5px; color: var(--faint); margin-top: 12px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; font-weight: 550; }
.svc { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.svc .st { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.svc.up .st { background: var(--good); }
.svc b { text-transform: capitalize; font-weight: 600; }
.svc small { margin-left: auto; color: var(--faint); }
.code { font-family: var(--mono); font-size: 12.5px; background: var(--bg); border: 1px solid var(--border); padding: 10px 12px; border-radius: 9px; overflow-x: auto; white-space: pre; user-select: all; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.switch:first-child { padding-top: 0; } .switch:last-child { border-bottom: 0; padding-bottom: 0; }
.switch label { display: block; font-weight: 550; } .switch small { color: var(--faint); display: block; margin-top: 1px; }
.tg { position: relative; width: 38px; height: 22px; flex: none; }
.tg input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.tg i { position: absolute; inset: 0; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 999px; transition: .18s; }
.tg i::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: var(--dim); transition: .18s; }
.tg input:checked + i { background: var(--accent); border-color: var(--accent); }
.tg input:checked + i::after { transform: translateX(16px); background: #fff; }
.tg input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.feed { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.feed .row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.feed .row:last-child { border-bottom: 0; }
.feed .t { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.big-live { font-size: 60px; font-weight: 650; letter-spacing: -.04em; line-height: 1; display: flex; align-items: center; gap: 16px; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 14px; color: var(--dim); font-size: 12.5px; }
.pod { padding: 18px 20px; }
.pod .p-label { color: var(--dim); font-size: 12.5px; font-weight: 520; }
.pod .p-name { font-size: 19px; font-weight: 650; letter-spacing: -.02em; margin: 8px 0 4px; }
.pod .p-name a { color: inherit; text-decoration: none; } .pod .p-name a:hover { color: var(--accent); }
.pod .p-sub { color: var(--faint); font-size: 12.5px; }
.block-title { font-size: 12px; font-weight: 550; color: var(--faint); margin: 0 0 12px; }

/* Boîte à idées */
.ideas { display: flex; flex-direction: column; gap: 14px; }
.idea-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: var(--surface-2); }
.idea-card.new { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: color-mix(in srgb, var(--accent) 6%, var(--surface-2)); }
.idea-card.archived, .idea-card.done { opacity: .75; }
.idea-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.idea-meta { margin-left: auto; font-size: 12.5px; }
.idea-text { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.6; margin: 0 0 14px; }
.idea-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.idea-thread { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.th-msgs { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; margin-bottom: 12px; }
.th-b { max-width: 85%; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.th-b.me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.th-who { font-size: 11.5px; color: var(--dim); margin-bottom: 3px; }
.th-t { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.5; }
.th-form textarea { width: 100%; min-height: 80px; resize: vertical; }
.th-act { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; }
.pw-line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pw-line .input { flex: 1 1 220px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }
#acsPw { margin-bottom: var(--gap); }
.chip.k-jeu, .chip.k-modif, .chip.k-direct { color: var(--text); }
.chip.k-bug { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }

/* Répartition nouveaux / retour */
.split-bar { height: 8px; border-radius: 999px; background: var(--border-2); overflow: hidden; }
.split-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.split-leg { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--dim); }
.split-leg span { display: inline-flex; align-items: center; gap: 7px; } .split-leg b { color: var(--text); font-weight: 600; }

/* ---------- Fenêtres, tiroir, notifications ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px; padding: 26px; max-height: 92vh; overflow: auto; }
.modal h3 { font-size: 17px; font-weight: 650; margin-bottom: 8px; letter-spacing: -.01em; }
.modal p { color: var(--dim); margin-bottom: 14px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.drawer-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .6); animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); border-left: 1px solid var(--border-2); z-index: 91; padding: 24px; overflow-y: auto; animation: slide .2s; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer h3 { font-size: 20px; font-weight: 650; margin: 4px 0 2px; letter-spacing: -.02em; }
.mini-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.mini-kpis div { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.mini-kpis b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.mini-kpis span { color: var(--dim); font-size: 12px; }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border: 1px solid var(--border-2); border-left: 3px solid var(--good); border-radius: 10px; padding: 12px 16px; max-width: 360px; animation: slide .2s; }
.toast.err { border-left-color: var(--bad); }

/* ---------- Adaptation aux écrans étroits ---------- */
/* ---- Outils stream ---- */
.tool { height: 100%; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--card-shadow); min-width: 0; }
.tool-h { display: flex; align-items: center; gap: 14px; }
.tool-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); flex: none; }
.tool-ic svg { width: 23px; height: 23px; }
.tool-t { min-width: 0; }
.tool-t h3 { font-size: 16px; font-weight: 640; letter-spacing: -.01em; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; min-height: 22px; }
.tool-d { color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.tool-live { padding: 9px 12px; border-radius: 9px; background: var(--surface-2); font-size: 13px; line-height: 1.5; color: var(--dim); }
.tool-live b { color: var(--text); }
.tool-live:empty { display: none; }
.warn-t { color: var(--warn); }
.tool-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-urls { border-top: 1px dashed var(--border); padding-top: 12px; }
.tool-ut { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.url-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); column-gap: 28px; }
.url-row { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 0; }
.url-l b { display: block; font-size: 13px; font-weight: 600; }
.url-l small { color: var(--faint); font-size: 11.5px; }
.url-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--dim); background: var(--surface-2); padding: 6px 9px; border-radius: 7px; }
.tool .note { margin-top: auto; }
.tool-steps { margin: 0; padding-left: 20px; color: var(--dim); font-size: 13.5px; line-height: 1.8; }
.tool-steps b { color: var(--text); }
@media (max-width: 680px) { .url-list { grid-template-columns: 1fr; } .url-row { grid-template-columns: 1fr auto; } .url-row code { grid-column: 1 / -1; order: 3; } .tool { padding: 16px; } }

@media (max-width: 1280px) {
  .grid.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.kpis.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .span-4, .span-5, .span-3 { grid-column: span 6; }
  .span-8, .span-7 { grid-column: span 12; }
  .topbar .page-sub { display: none; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 80; left: 0; width: 264px; transform: translateX(-102%); transition: transform .22s; }
  .sidebar.open { transform: none; }
  .burger { display: inline-flex; }
  .topbar { padding: 0 16px; height: auto; min-height: 58px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; row-gap: 8px; }
  .content { padding: 20px 16px 60px; }
  .topbar h1 { font-size: 17px; }
  .controls { order: 5; width: 100%; }
  .controls { flex-wrap: wrap; }
  .controls .seg { max-width: 100%; flex: none; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 680px) {
  :root { --gap: 14px; }
  .span-6, .span-4, .span-5, .span-3, .span-2 { grid-column: span 12; }
  .card { padding: 16px 16px 16px; }
  .grid.kpis, .grid.kpis.c4, .grid.kpis.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px 14px 12px; } .kpi .k-val { font-size: 23px; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
  .big-live { font-size: 46px; }
  .heat { grid-template-columns: 26px repeat(24, minmax(0, 1fr)); gap: 2px; }
  .heat .hh:nth-child(2n+1) { visibility: hidden; }
  .bar-row { grid-template-columns: minmax(70px, 110px) 1fr auto; gap: 10px; }
  .bar-row.wide { grid-template-columns: minmax(110px, 44%) 1fr auto; }
  .cols-2 { grid-template-columns: 1fr; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .tools { border-left: 0; padding-left: 0; margin-left: 0; }
}
@media print { .sidebar, .topbar { display: none; } .app { display: block; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Direction artistique « sobre » (7 nov. 2026) ----------
   Placé en fin de feuille : ces règles complètent ou remplacent celles du
   dessus (même spécificité, la dernière gagne). Les couleurs viennent toutes
   des variables de :root. */
.topbar h1 { font-size: 15px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; }
.card-h h2 { font-size: 12.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.login-card h1, .modal h3, .drawer h3, .tool-t h3 { font-weight: 800; letter-spacing: .5px; }
.login-card { border-radius: 20px; border-color: var(--border-2); }
.brand-mark { background: transparent; border: 2px solid var(--text); color: var(--text); border-radius: 0; font-weight: 800; }
.brand .brand-mark { border-radius: 0; }
.brand b { font-size: 13px; font-weight: 800; letter-spacing: 5px; text-transform: uppercase; }
.nav-sec { letter-spacing: 3px; font-weight: 800; }
.nav a { border-radius: 0; }
.nav a:hover, .nav a.active { background: var(--surface); }
.nav a.active { box-shadow: inset 2px 0 0 var(--accent); }
.btn, .btn-sm, .icon-btn, .seg, .seg button, .select, .date-in, .input, .live-pill, .tabs, .tab, .chip, .delta,
.nav .badge, .pw-row button, .more .menu, .more .menu button, .tool-ic, .toast, .banner { border-radius: 0; }
.btn { font-weight: 500; letter-spacing: .5px; border-color: var(--border-2); }
.btn { background: transparent; }
.btn-primary, .btn-primary:hover { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 800; letter-spacing: 1px; }
.btn-primary:hover { filter: none; opacity: .88; }
.btn:not(.btn-primary):not(.btn-danger):hover { border-color: var(--dim); }
.btn-ghost, .icon-btn, .btn.btn-ghost:hover, .btn.icon-btn:hover { border-color: transparent; }
.btn-danger:hover { background: #B5483A; border-color: #B5483A; }
.btn-danger:hover { color: #fff; }
.seg button.on, .tab.on { background: var(--text); color: var(--bg); box-shadow: none; }
.input:focus { box-shadow: none; }
.card, .tool, .modal, .idea-card { border-radius: 20px; }
.code, .svc, .tool-live, .mini-kpis div { border-radius: 0; }
.url-row code { border-radius: 4px; }
/* titres : majuscules espacées ; la seule ligne sable = sous le titre de la page */
.login-card h1, .modal h3, .drawer h3, .tool-t h3 { text-transform: uppercase; letter-spacing: 2px; line-height: 1.35; }
.topbar h1, .login-card h1 { padding-bottom: 6px; border-bottom: 1px solid var(--accent); }
.login-card h1 { display: table; margin-bottom: 12px; font-size: 18px; }
.kpi .k-val, .big-live, .mini-kpis b, .pod .p-name { font-weight: 800; letter-spacing: -.01em; }
th { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.tool-ut, .cols-2 h4, .block-title { letter-spacing: 2px; text-transform: uppercase; font-weight: 800; }
.tool-ic { background: transparent; border: 1px solid var(--accent); }
/* chiffres en 800 : ils débordaient des 6 cartes sur un écran de portable */
@media (min-width: 1281px) and (max-width: 1500px) { .kpi .k-val { font-size: 22px; } }
