/* ==========================================================================
   NavOps — design system
   Direction « soft SaaS » : cartes arrondies, ombres douces, contrôles en pilules.
   Toute couleur sémantique passe par un token, pour que le thème sombre fonctionne
   partout. Seules les couleurs d'identité (logos fournisseurs) restent en hex.
   Référence : docs/05-design-system.md
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #f7faf9;
  --surface: #ffffff;
  --surface-2: #f1f6f4;
  --ink: #0f1b17;
  --ink-soft: #5c6b64;
  --ink-mute: #94a39b;
  --line: #e4ede9;
  --line-soft: #eef4f1;
  --accent: #10b981;
  --accent-2: #0ea5a4;
  --accent-soft: #d9f3e8;
  --accent-ink: #0a7d5a;
  --info: #6366f1;
  --info-soft: #e8e8fc;
  --warn: #f59e0b;
  --warn-soft: #fdf0d5;
  --neg: #f43f5e;
  --neg-soft: #fde3e9;
  --pos: #10b981;
  --pos-soft: #d9f3e8;
  --plum: #a855c7;
  --plum-soft: #f3e6fb;
  --neutral: #94a39b;
  --neutral-soft: #f1f6f4;

  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sh: 0 1px 2px rgba(16, 40, 32, .05), 0 16px 32px -22px rgba(16, 40, 32, .28);
  --sh-rail: 0 0 0 1px var(--line), 24px 0 48px -24px rgba(16, 40, 32, .4);
  --sh-card: 0 1px 2px rgba(16, 40, 32, .04), 0 10px 20px -16px rgba(16, 40, 32, .4);
  --r: 20px;
  --rail-w: 84px;
  --rail-open-w: 256px;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0e1613;
  --surface: #151f1b;
  --surface-2: #1b2723;
  --ink: #eaf2ee;
  --ink-soft: #9fb0a8;
  --ink-mute: #6f8078;
  --line: #26332e;
  --line-soft: #1e2b26;
  --accent: #10b981;
  --accent-2: #2dd4bf;
  --accent-soft: #123528;
  --accent-ink: #4ade9f;
  --info: #818cf8;
  --info-soft: #23264a;
  --warn: #fbbf24;
  --warn-soft: #3a2f16;
  --neg: #fb7185;
  --neg-soft: #3a1f27;
  --pos: #34d399;
  --pos-soft: #123528;
  --plum: #c084fc;
  --plum-soft: #2c1f3a;
  --neutral: #6f8078;
  --neutral-soft: #1b2723;

  --sh: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 34px -20px rgba(0, 0, 0, .65);
  --sh-rail: 0 0 0 1px var(--line), 24px 0 48px -20px rgba(0, 0, 0, .7);
  --sh-card: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 24px -18px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--accent); }

:where(button, a, input, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.num { font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* --------------------------------------------------------------- coquille */

.app { display: grid; grid-template-columns: var(--rail-w) 1fr; position: relative; min-height: 100vh; }

.main { grid-column: 2; padding: 30px 36px 44px; min-width: 0; }

/* ------------------------------------------------- menu latéral (rail) */

.side {
  position: fixed; top: 0; left: 0; height: 100vh; width: var(--rail-w);
  overflow: hidden; z-index: 30;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 16px;
  transition: width .22s cubic-bezier(.4, 0, .2, 1), box-shadow .22s;
}
.side:hover, .side:focus-within { width: var(--rail-open-w); box-shadow: var(--sh-rail); }

.brand { display: flex; align-items: center; gap: 13px; padding: 4px 6px 22px; }
.bmark {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px -7px var(--accent);
}
.brand .bt { opacity: 0; white-space: nowrap; transition: opacity .16s; }
.side:hover .brand .bt, .side:focus-within .brand .bt { opacity: 1; }
.brand b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); }
.brand span {
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 700;
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 15px; padding: 12px; border-radius: 13px;
  color: var(--ink-soft); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.nav a svg { flex: none; width: 22px; height: 22px; color: var(--ink-mute); }
.nav a .t { opacity: 0; transition: opacity .16s; }
.side:hover .nav a .t, .side:focus-within .nav a .t { opacity: 1; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); }
.nav a.active svg { color: var(--accent-ink); }

.navlab {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-mute); margin: 18px 12px 7px; font-weight: 700;
  white-space: nowrap; opacity: 0; transition: opacity .16s;
}
.side:hover .navlab, .side:focus-within .navlab { opacity: 1; }

.side-foot {
  margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px;
  display: flex; align-items: center; gap: 12px; white-space: nowrap;
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
}
.side-me { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: inherit; border-radius: 12px; }
.side-me:hover .avatar { box-shadow: 0 0 0 2px var(--accent); }
.side-foot .ft { opacity: 0; transition: opacity .16s; }
.side:hover .side-foot .ft, .side:focus-within .side-foot .ft { opacity: 1; }
.side-foot b { display: block; color: var(--ink); font-size: 13.5px; font-weight: 700; }
.side-foot small { display: block; color: var(--ink-mute); font-size: 11px; }

/* ------------------------------------------------------------ en-tête */

.topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.h-title { font-size: 28px; font-weight: 800; letter-spacing: -.7px; margin: 0; color: var(--ink); }
.h-sub { color: var(--ink-soft); font-size: 14px; margin: 5px 0 0; font-weight: 500; }
.h-sub strong { color: var(--ink); }
.ctrls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.ctrls.baseline { align-items: flex-end; }

.peri-lab {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 7px 4px; text-align: right;
}

/* ------------------------------------------------------- contrôles */

.seg, .seg2, .pillbar {
  display: inline-flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 100px; box-shadow: var(--sh);
}
.seg { gap: 5px; padding: 5px; }
.seg2 { padding: 4px; }
.pillbar { gap: 4px; padding: 5px; flex-wrap: wrap; }

/* En rendu statique, l'état d'écran vit dans l'URL : les sélecteurs sont des
   liens. Certains contrôles restent des boutons ; les deux partagent l'allure. */
.seg :where(button, a), .seg2 :where(button, a), .pillbar :where(button, a) {
  display: inline-block; text-align: center; text-decoration: none;
  border: none; background: transparent; border-radius: 100px; cursor: pointer;
  font-family: var(--sans); color: var(--ink-soft);
}
.seg :where(button, a) { padding: 9px 15px; font-size: 13px; font-weight: 700; }
.seg :where(button, a):hover, .pillbar :where(button, a):hover { color: var(--ink); }
.seg :where(button, a).on { background: var(--accent); color: #fff; box-shadow: 0 6px 14px -6px var(--accent); }
.seg :where(button, a) .yb { display: block; font-size: 9px; font-weight: 700; opacity: .7; margin-top: 1px; }

.seg2 :where(button, a) { padding: 8px 12px; font-size: 12px; font-weight: 800; }
.seg2 :where(button, a).on, .seg2 a.on:hover { background: var(--accent); color: #fff; }

.pillbar :where(button, a) { padding: 10px 17px; font-size: 13.5px; font-weight: 700; }
.pillbar :where(button, a).on { background: var(--accent-soft); color: var(--accent-ink); }

.chip {
  display: inline-block; text-align: center; text-decoration: none;
  border: none; background: transparent; border-radius: 100px; padding: 9px 15px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer; font-family: var(--sans);
}
.chip:hover { color: var(--ink); }
.chip.on, .chip.on:hover { background: var(--accent); color: #fff; box-shadow: 0 6px 14px -6px var(--accent); }

.tbtn {
  width: 40px; height: 40px; border-radius: 100px; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--sh); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
}
.tbtn:hover { color: var(--accent-ink); border-color: var(--accent); }

a.cname { display: block; text-decoration: none; color: inherit; }
a.cname:hover { color: var(--accent-ink); }

.btn-add {
  display: flex; align-items: center; gap: 8px; background: var(--accent); color: #fff;
  border: none; border-radius: 13px; padding: 12px 18px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; font-family: var(--sans); box-shadow: 0 10px 22px -10px var(--accent);
}
.btn-add:hover { filter: brightness(.96); }
a.btn-add { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }

.fchip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 100px;
  padding: 8px 15px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  cursor: pointer; font-family: var(--sans); display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none;
}
.fchip:hover { border-color: var(--accent); }
.fchip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.fchip .cnt {
  background: var(--surface-2); color: var(--ink-soft); border-radius: 100px;
  padding: 1px 8px; font-size: 11px;
}
.fchip.on .cnt { background: var(--accent); color: #fff; }

.search {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  background: var(--surface-2); border-radius: 11px; padding: 0 13px;
  color: var(--ink-mute); width: 250px;
}
.search svg { flex: none; }
.search input {
  border: none; background: transparent; outline: none; font-family: var(--sans);
  font-size: 13px; color: var(--ink); padding: 10px 0; width: 100%;
}
.search input::placeholder { color: var(--ink-mute); }

/* ----------------------------------------------------------- cartes */

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px 24px; box-shadow: var(--sh);
}
.panel.table-panel { padding: 8px 26px 14px; }
.p-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.p-h h3 { font-size: 16.5px; font-weight: 800; letter-spacing: -.3px; margin: 0; color: var(--ink); }
.p-h .lnk { font-size: 12.5px; font-weight: 700; }
.p-h .meta { font-size: 12px; color: var(--ink-soft); font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 22px; box-shadow: var(--sh);
}
.kpi .lab {
  display: flex; align-items: center; gap: 10px; color: var(--ink-soft);
  font-size: 12.5px; font-weight: 700; margin-bottom: 15px;
}
.kpi .ic { width: 34px; height: 34px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; }
.kpi .val { font-size: 31px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; color: var(--ink); }
.kpi .foot { font-size: 12.5px; margin-top: 9px; display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-weight: 500; }

.stat3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.st {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 22px; box-shadow: var(--sh);
}
.st.inline { display: flex; align-items: center; gap: 16px; }
.st .ic { width: 44px; height: 44px; border-radius: 13px; flex: none; display: flex; align-items: center; justify-content: center; }
.st .v { font-size: 26px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; line-height: 1; color: var(--ink); }
.st .l { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; margin-top: 5px; }
.st .l.top { margin: 0 0 10px; font-weight: 700; font-size: 12px; }
.st .f { font-size: 12px; font-weight: 600; margin-top: 6px; }

.tag { font-weight: 700; padding: 3px 9px; border-radius: 100px; font-size: 11.5px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border-radius: 100px; font-size: 11.5px; font-weight: 700;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.callout {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 17px 19px; margin-top: 16px;
}
.callout .ct { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--accent-ink); }
.callout p { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.55; font-weight: 500; }

.grid2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }
.grid2.wide { grid-template-columns: 1.7fr 1fr; }
.grid-half { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stack { margin-top: 18px; }

/* --------------------------------------------------------- tableaux */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-mute); font-weight: 700; padding: 12px 0; border-bottom: 1px solid var(--line);
}
th.r, td.r { text-align: right; }
td {
  padding: 15px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
  font-weight: 500; vertical-align: middle; color: var(--ink);
}
tbody tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.cat { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.catdot { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.delta-up { color: var(--neg); font-weight: 700; }
.delta-dn { color: var(--pos); font-weight: 700; }
.delta-flat { color: var(--ink-soft); font-weight: 700; }
.link { color: var(--accent-ink); font-weight: 700; font-size: 12.5px; }
.muted-cell { color: var(--ink-soft); font-weight: 600; font-size: 12.5px; }

.prov { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 13px; }
.plogo {
  width: 28px; height: 28px; border-radius: 8px; flex: none; display: flex;
  align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: #fff;
}
.plogo.lg { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; }
.peri {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12px;
  color: var(--ink-soft); padding: 4px 10px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.peridot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.own { display: inline-flex; align-items: center; gap: 8px; }
.oav {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: flex;
  align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 800;
}
.due { font-variant-numeric: tabular-nums; font-weight: 700; }
.cname, .pname, .app-n { font-weight: 700; font-size: 14px; }
.csub, .psub, .app-e { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.app-c { display: flex; align-items: center; gap: 12px; }
.app-lo {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff;
}

/* --------------------------------------------------------- graphiques */

.bars { display: flex; align-items: flex-end; gap: 16px; height: 184px; padding-top: 8px; }
.bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; height: 100%; justify-content: flex-end; }
.bstack { width: 30px; display: flex; flex-direction: column; justify-content: flex-end; }
.bfill { width: 100%; background: var(--accent); border-radius: 8px 8px 3px 3px; }
.bplan { width: 100%; background: var(--accent-soft); border-radius: 8px 8px 0 0; }
.blab { font-size: 11.5px; color: var(--ink-soft); font-weight: 700; }

.legend { display: flex; gap: 18px; font-size: 12px; color: var(--ink-soft); font-weight: 600; flex-wrap: wrap; }
.legend.below { margin-top: 16px; }
.lg { display: flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 12px; border-radius: 4px; }
/* Le budget est tracé en tirets sur la courbe : la pastille de légende reprend
   ce trait plutôt qu'un carré plein, pour que la lecture soit immédiate. */
.sw.dashed {
  width: 18px; height: 0; border-radius: 0; background: transparent;
  border-top: 2.5px dashed var(--accent-2);
}

.row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.row:first-of-type { border-top: none; padding-top: 0; }
.rdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.row .rmain { flex: 1; min-width: 0; }
.row .rt { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.row .rs { font-size: 12px; color: var(--ink-soft); margin-top: 2px; font-weight: 500; }
.row .rv { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 100px; }
.row .ic { width: 36px; height: 36px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; }

.rb { display: flex; gap: 10px; margin: 2px 0 18px; }
.rbseg {
  height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 800;
}
.meter { height: 9px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.meter > div { height: 100%; border-radius: 6px; }
.meter-row { margin-bottom: 14px; }
.meter-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; }
.meter-head span:first-child { font-weight: 700; color: var(--ink); }
.meter-head span:last-child { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-weight: 600; }
.rbbar { height: 9px; background: var(--line-soft); border-radius: 5px; overflow: hidden; display: flex; }
.barcell { width: 150px; }

.rbtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.rbtile { border-radius: 16px; padding: 20px 22px; color: #fff; }
.rbtile .t { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; opacity: .95; }
.rbtile .v { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.rbtile .s { font-size: 12.5px; opacity: .92; margin-top: 4px; font-weight: 500; }
.rbtile.run { background: linear-gradient(135deg, var(--info), #4f46e5); }
.rbtile.build { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.split-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: var(--ink); }
.split-row .k { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.split-row .k i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.split-row .v { font-weight: 800; font-variant-numeric: tabular-nums; }

.grp { display: flex; align-items: flex-end; justify-content: space-around; height: 240px; padding: 10px 0 0; gap: 8px; }
.grpc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; height: 100%; justify-content: flex-end; }
.grpbars { display: flex; gap: 8px; align-items: flex-end; height: 100%; }
.gb { width: 38px; border-radius: 8px 8px 0 0; }
.gb.proj { border: 2px dashed var(--accent); background: transparent; }
.grplab { font-size: 12px; font-weight: 800; color: var(--ink); }
.grptag { font-size: 9.5px; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }

.rec { display: flex; gap: 13px; padding: 15px 0; border-top: 1px solid var(--line-soft); align-items: center; }
.rec:first-of-type { border-top: none; padding-top: 2px; }
.rec .ri {
  width: 34px; height: 34px; border-radius: 11px; flex: none; background: var(--pos-soft);
  color: var(--pos); display: flex; align-items: center; justify-content: center;
}
.rec .rt { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.rec .rs { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; line-height: 1.5; font-weight: 500; }
.rec .rgain { font-size: 13px; font-weight: 800; color: var(--pos); white-space: nowrap; }

/* ------------------------------------------------------------ kanban */

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
}
.col-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 2px; }
.col-h .ct { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800; color: var(--ink); }
.col-h .cd { width: 9px; height: 9px; border-radius: 50%; }
.col-h .cnt {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
  border-radius: 100px; font-size: 11px; font-weight: 700; padding: 2px 9px;
}
.kcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px;
  padding: 15px; box-shadow: var(--sh-card);
}
.ktag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 100px; font-size: 11px; font-weight: 700; margin-bottom: 11px;
}
.ktag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kt { font-size: 14px; font-weight: 700; line-height: 1.3; margin-bottom: 9px; letter-spacing: -.2px; color: var(--ink); }
.prog { height: 7px; background: var(--line-soft); border-radius: 5px; overflow: hidden; margin-bottom: 6px; }
.prog > div { height: 100%; border-radius: 5px; }
.kmeta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; color: var(--ink-soft); font-weight: 600; margin-bottom: 12px;
}
.kfoot { display: flex; align-items: center; justify-content: space-between; }
.avs { display: flex; }
.av {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: 9.5px; font-weight: 800; margin-left: -7px;
}
.av:first-child { margin-left: 0; }
.kbudget { font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 3px 9px; border-radius: 100px; }
.lbar {
  width: 120px; height: 8px; background: var(--line-soft); border-radius: 5px;
  overflow: hidden; display: inline-block; vertical-align: middle;
}
.lbar > div { height: 100%; border-radius: 5px; }

/* ------------------------------------------------------ fournisseurs */

.vcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 20px 18px; box-shadow: var(--sh);
}
.c-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.c-lo {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: flex;
  align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff;
}
.c-n { font-size: 16px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); }
.c-cat { font-size: 11.5px; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
.dep { margin-left: auto; padding: 5px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.c-spend { font-size: 27px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; color: var(--ink); }
.c-spend span { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.shbar { height: 7px; background: var(--line-soft); border-radius: 5px; overflow: hidden; margin: 12px 0 16px; }
.shbar > div { height: 100%; border-radius: 5px; background: var(--accent); }
.c-stats { display: flex; justify-content: space-between; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.c-stat .sv { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.c-stat .sl { font-size: 11px; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
.c-stat.right { text-align: right; }

.empty {
  padding: 44px 20px; text-align: center; color: var(--ink-soft);
  font-size: 13.5px; font-weight: 600;
}

/* --------------------------------------------------------- connexion */

.login { min-height: 100vh; position: relative; }
.login-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; padding: 20px; gap: 20px; }
.topctrls { position: absolute; top: 34px; right: 38px; display: flex; gap: 10px; align-items: center; z-index: 5; }

.brand-panel {
  background: linear-gradient(155deg, #0b1a15 0%, #0e3b2d 58%, #0a7d5a 100%);
  color: #eafaf3; border-radius: 28px; padding: 48px 46px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.glow {
  position: absolute; width: 460px; height: 460px; border-radius: 50%; top: -120px; right: -140px;
  background: radial-gradient(circle, rgba(16, 185, 129, .5), rgba(16, 185, 129, 0));
}
.glow2 {
  position: absolute; width: 320px; height: 320px; border-radius: 50%; bottom: -120px; left: -100px;
  background: radial-gradient(circle, rgba(14, 165, 164, .32), rgba(14, 165, 164, 0));
}
.logo { display: flex; align-items: center; gap: 13px; position: relative; }
.mark {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #0ea5a4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(16, 185, 129, .9);
}
.logo b { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.logo span {
  display: block; font-size: 11px; color: #93c9b5; letter-spacing: .16em;
  text-transform: uppercase; margin-top: 1px; font-weight: 600;
}
.lede { font-size: 40px; line-height: 1.14; font-weight: 800; letter-spacing: -1px; max-width: 440px; margin: 0 0 18px; }
.lede em { color: #5eead4; font-style: normal; }
.lede-sub { color: #a7d6c5; font-size: 15.5px; line-height: 1.6; max-width: 410px; margin: 0; }
.feats { display: flex; flex-direction: column; gap: 13px; margin-top: 32px; }
.feat { display: flex; gap: 13px; align-items: center; font-size: 14px; color: #cdeadd; }
.fic {
  width: 32px; height: 32px; border-radius: 10px; flex: none; color: #5eead4;
  background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center;
}
.trust { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #7fb3a0; position: relative; }

.auth { display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
  width: 100%; max-width: 430px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; padding: 38px 38px 32px;
  box-shadow: 0 2px 6px rgba(16, 40, 32, .05), 0 30px 60px -30px rgba(16, 40, 32, .28);
}
.mode {
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; font-weight: 700;
  padding: 6px 13px; border-radius: 100px; margin-bottom: 22px;
}
.mode .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); }
.auth-card h1 { font-size: 28px; font-weight: 800; letter-spacing: -.6px; margin: 0 0 5px; color: var(--ink); }
.auth-card .muted { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 24px; }
.auth-card label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin: 0 0 8px; }
.field {
  width: 100%; height: 48px; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 13px; padding: 0 15px; font-family: var(--sans); font-size: 15px;
  color: var(--ink); font-weight: 500;
}
.field:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.invalid, .field.modified.invalid { border-color: var(--neg); }

/* ----------------------------------------------------------- formulaires */

/* ---------------------------------------------- environnement du client */
.envgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.envf { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.envl { font-size: 11.5px; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .4px; }
.envv { font-size: 14.5px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; }

/* Bouton qui agit comme un lien : la suppression est un POST, jamais un lien. */
.lnk.danger {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 12.5px; font-weight: 700; color: var(--neg);
}
.lnk.danger:hover { text-decoration: underline; }
button.lnk:not(.danger) {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 12.5px; font-weight: 700; color: var(--accent-ink);
}
button.lnk:not(.danger):hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 900px) {
  .envgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.fld { display: flex; flex-direction: column; gap: 7px; }
.fld > label { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.fld .hint { font-size: 12px; color: var(--ink-mute); font-weight: 500; }

select.field { appearance: none; cursor: pointer; padding-right: 38px; }

/* La case à cocher garde une cible de clic confortable, libellé compris. */
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 48px; }
.check input { width: 19px; height: 19px; accent-color: var(--accent); cursor: pointer; }
.check span { font-size: 14px; font-weight: 600; color: var(--ink); }

.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.form-actions .btn { width: auto; padding: 0 26px; }
.form-actions .lnk-cancel {
  font-size: 13.5px; font-weight: 700; color: var(--ink-soft); text-decoration: none;
}
.form-actions .lnk-cancel:hover { color: var(--ink); }

.p-actions { display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Capacité contre charge : deux barres sur la même échelle. Laquelle dépasse
   l'autre doit se lire sans calcul — c'est tout l'intérêt de l'écran. */
.balance { display: flex; flex-direction: column; gap: 14px; }
.bal-row { display: grid; grid-template-columns: 130px 1fr 72px; align-items: center; gap: 14px; }
.bal-l { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.bal-track {
  display: flex; height: 22px; border-radius: 7px; overflow: hidden;
  background: var(--surface-2); min-width: 0;
}
.bal-fill { height: 100%; }
.bal-v { font-size: 13.5px; font-weight: 700; color: var(--ink); text-align: right; }
@media (max-width: 640px) { .bal-row { grid-template-columns: 96px 1fr 60px; gap: 10px; } }

/* Aperçu du phasage : douze cases, une par mois de l'exercice. Un budget se
   vérifie mois par mois — un total ne montre jamais qu'une dépense a été calée
   sur le mauvais trimestre. */
.preview { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.preview .p-h { padding: 0; margin-bottom: 14px; }
.preview h3 { font-size: 14px; margin: 0; }
.preview .meta { font-size: 12.5px; color: var(--ink-mute); font-weight: 600; }
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.mo {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  padding: 9px 4px; border-radius: 9px; background: var(--surface-2); min-width: 0;
}
.mo-l { font-size: 10.5px; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; }
.mo-v { font-size: 12px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; text-align: center; }
.mo.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line-soft); }
.mo.off .mo-v { color: var(--ink-mute); font-weight: 600; }
@media (max-width: 900px) { .months { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 520px) { .months { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Suppression tenue à l'écart des boutons d'enregistrement : un clic de trop ne
   doit pas détruire une fiche. */
.form-danger {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.form-danger .hint { font-size: 12px; color: var(--ink-mute); font-weight: 500; }

.val-msg { font-size: 12.5px; font-weight: 600; color: var(--neg); }
.form-error {
  border: 1px solid var(--neg); background: var(--neg-soft); color: var(--neg);
  border-radius: 13px; padding: 12px 16px; font-size: 13.5px; font-weight: 600;
  margin-bottom: 20px;
}
.auth-alert {
  margin: 0 0 4px; padding: 11px 13px; border-radius: 12px;
  background: var(--warn-soft); border: 1px solid var(--warn);
  font-size: 13px; line-height: 1.5; color: var(--ink);
}
.auth-panel {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 17px;
  padding: 20px; margin-top: 20px; display: flex; flex-direction: column; gap: 14px;
}
.auth-panel p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.auth-panel p strong { color: var(--ink); }
.btn {
  height: 50px; border-radius: 14px; border: none; background: var(--accent); color: #fff;
  font-family: var(--sans); font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  box-shadow: 0 10px 22px -10px var(--accent); text-decoration: none;
}
.btn:hover { filter: brightness(.96); }
.auth-foot { margin-top: 22px; font-size: 13px; color: var(--ink-soft); text-align: center; }

/* -------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  .kpis, .stat4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .grid2.wide, .grid-half { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-wrap { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
}

@media (max-width: 720px) {
  .app { grid-template-columns: var(--rail-w); }
  .main { padding: 22px 18px 32px; }
  .kpis, .stat3, .stat4, .grid3, .board, .rbtiles { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: stretch; }
  .ctrls { justify-content: flex-start; }
  .peri-lab { text-align: left; }
  .search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .side, .brand .bt, .nav a .t, .navlab, .side-foot .ft { transition: none; }
}

/* Bascule de thème : les deux icônes sont dans le DOM, le thème courant décide
   laquelle s'affiche — donc pas d'état côté serveur ni de clignotement. */
.tbtn .i-sun { display: none; }
:root[data-theme="dark"] .tbtn .i-sun { display: block; }
:root[data-theme="dark"] .tbtn .i-moon { display: none; }

/* FocusOnNavigate donne le focus au titre à chaque navigation : c'est utile au
   lecteur d'écran, mais l'anneau de focus n'a pas de sens sur un titre non cliquable. */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

.footnote { margin: 14px 0 0; font-size: 11.5px; color: var(--ink-mute); font-weight: 600; }

/* Administration des accès : cases à cocher en grille (périmètre, permissions)
   et colonnes centrées de la matrice des rôles. */
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 18px; margin-top: 6px; }
.chk-grid .check { align-items: flex-start; min-height: 40px; }
.chk-grid .check input { margin-top: 2px; flex: none; }
th.c, td.c { text-align: center; }

/* Intertitres de formulaire : un contrat porte désormais budget, fiabilité et
   échéance — sans repères, trente champs se lisent comme un mur. */
.form-sec { margin: 10px 0 -4px; font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: var(--accent-ink); }
textarea.field { height: auto; min-height: 96px; padding-top: 12px; padding-bottom: 12px; resize: vertical; line-height: 1.5; }

/* Jauge de consommation de jours : verte, orange à 80 %, rouge au dépassement. */
.gauge { height: 7px; border-radius: 10px; background: var(--surface-2); overflow: hidden; min-width: 90px; }
.gauge > span { display: block; height: 100%; border-radius: 10px; }

/* Tableaux mensuels : douze colonnes de montants doivent tenir sans défilement
   sur un écran de portable. */
table.dense th, table.dense td { padding-left: 7px; padding-right: 7px; font-size: 12.5px; white-space: nowrap; }
table.dense td:first-child, table.dense th:first-child { padding-left: 0; }

/* Portail fournisseur : une colonne, sans la coquille de l'application. */
.portal { max-width: 920px; margin: 0 auto; padding: 28px 16px; }
.portal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.portal-head .bmark { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; }
.portal-head b { display: block; font-size: 17px; }
.nda-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; max-height: 420px; overflow: auto; padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; }

/* Consultation : fil des questions, grille de notation, clauses négociées. */
.msg { padding: 10px 14px; border-radius: 13px; margin: 8px 0; font-size: 14px; line-height: 1.55; max-width: 760px; }
.msg.in { background: var(--surface-2); }
.msg.out { background: var(--accent-soft); margin-left: auto; }
.msg .tag { margin-left: 6px; background: var(--surface); color: var(--ink-soft); }
input.field.score { width: 68px; height: 34px; text-align: center; padding: 0 6px; }
.sub-h { margin: 18px 0 6px; font-size: 14.5px; }
table.clauses td { vertical-align: top; font-size: 13px; }
table.clauses td .csub { white-space: normal; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.inline-form .field { height: 34px; width: auto; min-width: 140px; font-size: 13px; }
.clause-card { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; margin: 10px 0; }
.clause-card .clause-body { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; margin: 8px 0; }

/* Exercice vide : par où commencer, sans chercher dans les onglets. */
.start-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.start-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--surface); }
.start-card:hover { border-color: var(--accent); color: var(--ink); }
.start-card b { font-size: 14px; color: var(--accent-ink); }
.start-card span { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }

/* Cycle budgétaire : étapes, propositions, arbitrage. */
.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 4px 0 14px; flex-wrap: wrap; }
.stepper li { padding: 6px 12px; border-radius: 100px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-mute); }
.stepper li.done { background: var(--accent-soft); color: var(--accent-ink); }
.stepper li.on { background: var(--accent); color: #fff; }
.split-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 10px 0; }
.split-kpis.top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split-kpis.top b { font-size: 18px; }
.split-kpis .staff { background: var(--surface-2); }
.split-caption { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-top: 4px; }
.split-kpis > div { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.split-kpis b { font-size: 16px; }
.draft-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.decide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.callout.warn { background: var(--warn-soft); }
@media (max-width: 760px) {
  .split-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decide-grid { grid-template-columns: 1fr; }
}
tr.subtotal td { font-weight: 800; background: var(--surface-2); border-top: 1px solid var(--line); }

/* Dans l'application, un bouton a la largeur de son libellé : la pleine
   largeur ne convient qu'à l'écran de connexion. */
.panel .btn, .portal .btn { width: auto; padding: 0 26px; }
.inline-form .btn { height: 42px; padding: 0 20px; font-size: 14px; }
details.voted { margin: 10px 0; }
details.voted summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent-ink); margin-bottom: 8px; }
details.transfer summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.line-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 2px; white-space: normal; }

/* Saisie en tableau : douze mois sur une ligne, comme dans le classeur. */
table.grid input.field.cell { height: 32px; width: 78px; padding: 0 6px; text-align: right; font-size: 12.5px; border-radius: 8px; }
table.grid input.field.cell.wide, table.grid select.field.cell.wide { width: 100%; min-width: 140px; text-align: left; }
table.grid select.field.cell { height: 30px; font-size: 12px; padding: 0 6px; margin: 2px 0; border-radius: 8px; }
table.grid tr.new-row td { background: var(--surface-2); }
table.grid td { vertical-align: middle; }

/* Onglets d'un bloc, sous le titre : le même composant partout. */
.block-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: -6px 0 22px; overflow-x: auto; scrollbar-width: none; }
.block-tabs a { padding: 10px 2px 11px; font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.block-tabs a:hover { color: var(--ink); }
.block-tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }

/* Où en suis-je dans l'année */
.cycle-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.cycle-step { display: flex; flex-direction: column; gap: 6px; padding: 10px 4px 6px; text-decoration: none; color: var(--ink); border-radius: 12px; }
.cycle-step:hover { background: var(--surface-2); }
.cycle-step b { font-size: 13.5px; }
.cycle-step .csub { font-size: 12px; line-height: 1.4; }
.cycle-step .cbar { height: 8px; border-radius: 99px; background: var(--line); }
.cycle-step.s-done .cbar { background: var(--accent); }
.cycle-step.s-active .cbar { background: linear-gradient(90deg, var(--accent) 50%, var(--accent-soft) 50%); }
.todo-list { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; flex-direction: column; }
.todo-h { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.todo { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); font-size: 14px; border-radius: 8px; }
.todo:last-child { border-bottom: 0; }
.todo:hover { background: var(--surface-2); }
.todo .tt { flex: 1; min-width: 0; }
.todo .ttag { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); background: var(--surface-2); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--info); flex: none; }
.tdot.warn { background: var(--warn); }
.tdot.alert { background: var(--neg); }
.cycle-panel { margin-bottom: 22px; }
.ctx-pick { display: flex; align-items: center; gap: 10px; }
.ctx-lab { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); }

/* Cap : carte d'alignement */
.cap-gaps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.gap-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.gap-chip.warn { background: var(--warn-soft); color: #8a5a00; }
.gap-chip.neg { background: var(--neg-soft); color: #b4233f; }
.gap-chip.info { background: var(--info-soft); color: #3730a3; }
.gap-chip.ok { background: var(--pos-soft); color: var(--accent-ink); }
[data-theme="dark"] .gap-chip.warn { color: var(--warn); }
[data-theme="dark"] .gap-chip.neg { color: var(--neg); }
[data-theme="dark"] .gap-chip.info { color: var(--info); }
.cap-map { display: grid; gap: 18px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.cap-col { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }
.cap-colh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding: 0 2px 2px; }
.cap-colh small { font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-mute); }
.cap-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); transition: opacity .15s, border-color .15s, background .15s; }
.cap-card:hover, .cap-card.lit { border-color: var(--accent); }
.cap-card.lit { background: var(--accent-soft); }
.cap-map.hovering .cap-card:not(.lit) { opacity: .28; }
.cap-card .cn { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 700; line-height: 1.3; }
.cap-card .cm { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.cap-card .cm b { color: var(--ink); }
.cap-card .cl { font-size: 11.5px; color: var(--ink-mute); }
.cap-card .cf { align-self: flex-start; }
.cap-card.unlinked { border-color: #f7b6c4; }
.cap-bar { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.cap-bar > span { display: block; height: 100%; border-radius: 99px; }
.wdot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 4px; display: inline-block; }
.w-none { background: #c3cec9; } .w-ok { background: var(--accent); } .w-warn { background: var(--warn); } .w-late { background: #e11d48; }
.cap-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--ink-soft); align-items: center; margin-top: 14px; }
.cap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.flow-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.flow-row:last-child { border-bottom: 0; }
.flow-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 14px; }
.flow-bar { display: flex; gap: 3px; border-radius: 10px; overflow: hidden; min-height: 34px; }
.flow-seg { display: flex; align-items: center; justify-content: center; min-width: 6px; padding: 0 8px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; box-sizing: border-box; }
.flow-row.base .flow-bar { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--line-soft) 6px, var(--line-soft) 12px); }
.flow-row.unlinked .flow-h b { color: #b4233f; }
.fc0 { background: #0ea5a4; } .fc1 { background: #10b981; } .fc2 { background: #6366f1; } .fc3 { background: #a855c7; }
.fc4 { background: #d97706; } .fc5 { background: #0f766e; } .fc6 { background: #2563eb; } .fc7 { background: #db2777; }
.cap-list { display: flex; flex-direction: column; gap: 12px; }
.cap-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.cap-item .ih { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.cap-item .ih b { font-size: 15px; }
.cap-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cap-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink); }
.cap-chip.strong { background: var(--accent-soft); color: var(--accent-ink); }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; }
.pick-list label { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; cursor: pointer; }
.pick-list input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.pick-list select { height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; padding: 0 8px; }

/* Fiche initiative */
.sheet-head { display: flex; flex-direction: column; gap: 14px; }
.sheet-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 18px; overflow-x: auto; }
.sheet-tabs a { padding: 11px 12px; font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.sheet-tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.sheet-tabs a.empty { color: var(--ink-mute); }
.weather-kpi b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.sheet-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.sheet-grid2 + .panel { margin-top: 16px; }
.sheet-text { margin: 0; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; }
.sheet-h { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.before-after { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: stretch; }
.before-after .arrow { display: flex; align-items: center; justify-content: center; color: var(--accent); }
.target-panel { background: var(--accent-soft) !important; }
.gantt { display: grid; gap: 4px 2px; align-items: center; overflow-x: auto; }
.gantt .wk { font-size: 10.5px; color: var(--ink-mute); text-align: center; font-weight: 700; }
.gantt .wk.now { color: #3730a3; background: var(--info-soft); border-radius: 6px; }
.gantt .act { font-size: 13.5px; font-weight: 600; padding: 6px 0; }
.gantt .bar { height: 16px; border-radius: 6px; background: var(--accent-soft); overflow: hidden; }
.gantt .bar > span { display: block; height: 100%; background: var(--accent); }
.gantt .bar.late { background: var(--warn-soft); }
.gantt .bar.late > span { background: var(--warn); }
.ind-track { position: relative; height: 12px; border-radius: 99px; background: var(--line-soft); }
.ind-track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--accent); }
.ind-track .mid { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--info); }
.hist-row { display: grid; grid-template-columns: 160px 30px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.hist-row:last-child { border-bottom: 0; }
.wstack { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
details.sheet-edit { margin-top: 14px; }
details.sheet-edit summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.decision-pending { border: 1px solid #f6d9a0; background: #fffaf0; border-radius: 14px; padding: 12px 14px; }
[data-theme="dark"] .decision-pending { background: var(--warn-soft); border-color: var(--warn); }

/* -------------------------------------------------------- gouvernance (N7) */

.neg-t { color: #e11d48; }
.btn.alt { background: var(--surface); color: var(--accent-ink); border: 1px solid var(--line); box-shadow: none; }
.gov-actions .btn, .slide-close .btn, .gov-record .btn, .topbar .ctrls > .btn { width: auto; height: 42px; padding: 0 20px; font-size: 14px; }
.gov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.gov-kpis.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gov-kpis > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.gov-kpis b { font-size: 20px; }
.gov-kpis.small b { font-size: 14.5px; }
.gov-objectives { display: flex; flex-direction: column; }
.gov-objective { display: grid; grid-template-columns: 14px minmax(0, 1fr) 180px; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.gov-objective:first-child { border-top: 0; }
.go-main { display: flex; flex-direction: column; gap: 2px; }
.go-prog { display: flex; align-items: center; gap: 8px; }
.go-prog .prog { flex: 1; margin: 0; }
.gov-changes { display: flex; flex-direction: column; gap: 8px; }
.gov-change { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--line); }
.gov-change.neg { border-left-color: #e11d48; }
.gov-change.pos { border-left-color: var(--accent); }
.gov-change.info { border-left-color: var(--warn); }
.gc-kind { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.gc-detail { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: 8px; color: var(--ink-soft); font-size: 13.5px; }
.gov-brief { display: flex; flex-direction: column; gap: 12px; }
.gb-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.gb-head h3 { margin: 0 0 4px; font-size: 17px; }
.gb-head h3 a { color: inherit; text-decoration: none; }
.gb-head h3 a:hover { color: var(--accent-ink); }
.gb-weather { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.gb-weather > span { display: inline-flex; align-items: center; gap: 6px; }
.gb-prog { display: flex; align-items: center; gap: 10px; }
.gb-prog .prog { flex: 1; margin: 0; height: 9px; }
.gb-highlight { margin: 0; font-size: 14.5px; line-height: 1.5; }
.gb-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; font-size: 13.5px; }
.gb-cols > div { display: flex; flex-direction: column; gap: 5px; }
.gb-cols .sheet-h { margin: 0 0 2px; }
.gov-brief:not(.large) .gb-cols { grid-template-columns: 1fr; gap: 10px; }
.gov-brief.large .gb-head h3 { font-size: 30px; letter-spacing: -.01em; }
.gov-brief.large .gb-weather { font-size: 16px; }
.gov-brief.large .gb-weather .wdot { width: 14px; height: 14px; }
.gov-brief.large .gb-highlight { font-size: 20px; }
.gov-brief.large .gb-cols { font-size: 16px; }
.gov-landing { display: flex; flex-direction: column; gap: 6px; }
.gl-track { position: relative; height: 14px; border-radius: 8px; background: var(--line-soft); }
.gl-actual { height: 100%; border-radius: 8px; background: var(--accent); }
.gl-landing { position: absolute; top: -4px; width: 3px; height: 22px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); }
.gov-bodies { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.gov-body.editing { outline: 2px solid var(--accent); }
.gov-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.gov-pending { display: flex; flex-direction: column; gap: 10px; }
.gov-pending.compact:empty { display: none; }
.gov-pending .inline-form .btn { width: auto; flex: none; }
.gb-open { display: inline-block; margin-left: 10px; font-size: 14px; }
.gov-taken { display: flex; flex-direction: column; }
.gt-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.gt-row:first-child { border-top: 0; }
.gt-row .cap-chip { flex: none; }
.gov-record { display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(200px, 2fr) minmax(160px, 2fr) auto; gap: 8px; align-items: center; }
.gov-record .field { height: 42px; }
fieldset.gov-content { border: 1px solid var(--line); border-radius: 14px; padding: 8px 16px 10px; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
fieldset.gov-content legend { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); padding: 0 6px; }
.exec-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.exec-body { display: flex; flex-direction: column; gap: 4px; }
.exec-body b { font-size: 17px; }
.exec-body b a { color: inherit; }
.exec-watch { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.exec-watch:first-of-type { border-top: 0; }
.exec-watch a { color: inherit; text-decoration: none; }

/* Mode séance : un écran à projeter, une diapositive à la fois. */
.projection { min-height: 100vh; background: var(--bg); }
.deck { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.deck-missing { padding: 60px; font-size: 18px; }
.deck-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 48px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dt-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.dt-brand { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.dt-actions { display: flex; align-items: center; gap: 18px; }
.dt-actions button.lnk { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
.deck-count { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-soft); }
.deck-body { flex: 1; overflow: auto; }
.slide { display: none; padding: 34px 64px 40px; max-width: 1500px; margin: 0 auto; font-size: 17px; }
.slide.on { display: block; animation: slide-in .18s ease-out; }
@keyframes slide-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.slide-h { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; font-size: 32px; letter-spacing: -.015em; }
.sh-n { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 17px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.slide .gov-kpis b { font-size: 28px; }
.slide .gov-objective { font-size: 17px; padding: 14px 0; }
.slide .gov-change { font-size: 17px; padding: 14px 18px; }
.slide-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; }
.si-meta { display: flex; flex-direction: column; gap: 18px; }
.si-meta > div { display: flex; flex-direction: column; gap: 4px; }
.si-meta b { font-size: 19px; }
.si-agenda { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 10px; font-size: 21px; font-weight: 700; }
.si-agenda a { color: inherit; text-decoration: none; }
.si-agenda a:hover { color: var(--accent-ink); }
.slide-decisions, .slide-close { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; }
.slide .decision-pending b { font-size: 18px; }
.deck-nav { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.deck-step { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; text-decoration: none; color: var(--ink); flex: none; }
.deck-step:hover { border-color: var(--accent); color: var(--accent-ink); }
.deck-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.deck-dots a { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; text-decoration: none; color: var(--ink-soft); background: var(--surface-2); }
.deck-dots a.on { background: var(--accent); color: #fff; }
@media (max-width: 900px) {
  .gov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gb-cols, .slide-intro, .slide-decisions, .slide-close, .gov-record { grid-template-columns: 1fr; }
  .gov-objective { grid-template-columns: 14px minmax(0, 1fr); }
  .go-prog { grid-column: 2; }
  .gov-change { grid-template-columns: 1fr; }
  .slide { padding: 22px 16px; }
  .deck-top { padding: 12px 16px; }
  .slide-h { font-size: 24px; }
}
