/* ─── NEXUS : coque HIVE (refonte du 07/11/2026) ──────────────────────────────
   DA du cockpit HIVE (~/Code/hive-cockpit), maquette : nexus/docs/refonte-2026-11/maquette.
   Chargée APRÈS dashboard.css et les feuilles de page : elle repeint les anciens jetons
   (--bg, --panel, --text, --purple…) aux couleurs HIVE, pour que les pages pas encore
   refaites (Finance, propositions) prennent la DA sans être réécrites.
   Les composants des vues refaites vivent sous .nx-view (imbrication CSS native).
   Polices locales (licence OFL, public/fonts/LICENCE-*) : aucune requête externe. */

@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --bg: #07090F; --bg2: #0C1120; --surface: rgba(16,20,32,.86); --surface-solid: #111626;
  --glass: rgba(22,27,44,.55); --glass-brd: rgba(255,255,255,.09); --glass-hi: rgba(255,255,255,.14);
  --ink: #EDE8DD; --ink2: #B9B4A9; --muted: #8C8A85; --faint: #5C5D63; --line: rgba(237,232,221,.07);
  --gold: #E2B85C; --gold2: #F3D493; --gold-soft: rgba(226,184,92,.14);
  --warm: #F08A5D; --warm-soft: rgba(240,138,93,.13); --cold: #8DA3C7; --cold-soft: rgba(141,163,199,.12);
  --ok: #7FC7A0; --ok-soft: rgba(127,199,160,.12);
  --sel: rgba(226,184,92,.09); --sel-brd: rgba(226,184,92,.45);
  --shadow: 0 24px 80px -20px rgba(0,0,0,.65);
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2,.8,.2,1); --spring: cubic-bezier(.34,1.4,.64,1);
  --dock-h: 64px; --orb-btn: 76px;
  /* anciens jetons (dashboard.css, commercial.css, hive.css) repeints */
  --panel: var(--surface-solid); --panel-2: #161C2E; --side: transparent;
  --border: rgba(255,255,255,.10); --border-soft: rgba(237,232,221,.07);
  --text: var(--ink); --text2: var(--ink2); --text3: var(--muted);
  --purple: var(--gold); --purple-light: var(--gold2); --purple-soft: var(--gold-soft);
  --orange: var(--warm); --orange-text: var(--warm); --orange-soft: var(--warm-soft);
  --pos: var(--ok); --pos-soft: var(--ok-soft); --neg: var(--warm); --neg-soft: var(--warm-soft); --warn: var(--gold2);
  --brand-violet: var(--gold); --brand-orange: var(--warm);
  --grad: linear-gradient(110deg, var(--gold), var(--gold2)); --cta-text: #1a1408;
  --hero: radial-gradient(ellipse at 100% 0%, rgba(226,184,92,.10), transparent 65%), var(--glass);
  --ring: inset 0 1px 0 rgba(255,255,255,.06);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #F3EFE6; --bg2: #E9E3D6; --surface: rgba(255,253,248,.9); --surface-solid: #FFFDF8;
  --glass: rgba(255,253,248,.62); --glass-brd: rgba(40,32,15,.10); --glass-hi: rgba(255,255,255,.8);
  --ink: #1C1A16; --ink2: #46423A; --muted: #6A655B; --faint: #9A9488; --line: rgba(28,26,22,.08);
  --gold: #8A5F0E; --gold2: #A87514; --gold-soft: rgba(168,117,20,.12);
  --warm: #B4441A; --warm-soft: rgba(180,68,26,.10); --cold: #3F5A85; --cold-soft: rgba(63,90,133,.10);
  --ok: #2F7A52; --ok-soft: rgba(47,122,82,.10);
  --sel: rgba(168,117,20,.08); --sel-brd: rgba(138,95,14,.45);
  --shadow: 0 24px 70px -24px rgba(60,45,15,.35);
  --panel: var(--surface-solid); --panel-2: #F1ECE0; --border: rgba(40,32,15,.12); --border-soft: rgba(28,26,22,.08);
  --text: var(--ink); --text2: var(--ink2); --text3: var(--muted);
  --purple: var(--gold); --purple-light: var(--gold2); --purple-soft: var(--gold-soft);
  --orange: var(--warm); --orange-text: var(--warm); --orange-soft: var(--warm-soft);
  --pos: var(--ok); --pos-soft: var(--ok-soft); --neg: var(--warm); --neg-soft: var(--warm-soft); --warn: var(--gold2);
  --grad: linear-gradient(110deg, var(--gold), var(--gold2)); --cta-text: #FFFDF8;
  --hero: radial-gradient(ellipse at 100% 0%, rgba(226,184,92,.18), transparent 65%), var(--glass);
  --ring: none;
  color-scheme: light;
}

/* ── base ── */
html, body { background: var(--bg); color: var(--ink); }
body.hx { font-family: var(--sans); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; overflow-x: hidden; min-height: 100vh; }
body.hx::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(900px 600px at 12% -10%, rgba(226,184,92,.10), transparent 60%),
    radial-gradient(800px 700px at 100% 0%, rgba(90,110,180,.12), transparent 60%),
    radial-gradient(1000px 800px at 50% 120%, rgba(60,70,120,.18), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2)); }
html[data-theme="light"] body.hx::before { background: radial-gradient(900px 600px at 12% -10%, rgba(226,184,92,.22), transparent 60%),
    radial-gradient(800px 700px at 100% 0%, rgba(150,170,220,.20), transparent 60%), linear-gradient(180deg, var(--bg), var(--bg2)); }
a { color: var(--gold2); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--glass-brd); background: var(--glass); color: var(--ink2); }
.glass { background: linear-gradient(180deg, var(--glass-hi), transparent 38%), var(--glass); border: 1px solid var(--glass-brd);
  backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06); }
html[data-theme="light"] .glass { background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.4) 40%), var(--glass); }

/* ── contenu ── */
.hx-app { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 14px 28px calc(140px + env(safe-area-inset-bottom)); }
.hx-public .hx-app { padding-bottom: 40px; }
.hx-public .hx-app > main { min-height: 80vh; display: grid; place-items: center; }
html.hx-intro .hx-app { opacity: 0; transform: translateY(8px); }
.hx-app { transition: opacity .6s var(--ease) .5s, transform .6s var(--ease) .5s, filter .35s var(--ease); }
body.ready .hx-app { opacity: 1; transform: none; }

/* ── en-tête ── */
.hx-top { display: flex; align-items: center; gap: 14px; height: 60px; }
.hx-brand { display: flex; flex-direction: column; line-height: 1.05; color: var(--ink); text-decoration: none; }
.hx-brand:hover { color: var(--ink); }
.hx-today { font-family: var(--serif); font-style: italic; font-size: 26px; letter-spacing: -.01em; }
.hx-orbstate { font-size: 11px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.hx-orbstate b { color: var(--ink2); font-weight: 500; letter-spacing: .04em; }
.hx-orbstate .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.hx-orbstate.live .dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.hx-spacer { flex: 1; }
.hx-kbtn { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 12px; border-radius: 10px; color: var(--muted); cursor: pointer; font-size: 12.5px; border: 1px solid var(--glass-brd); background: var(--glass); }
.hx-kbtn:hover { color: var(--ink); border-color: var(--sel-brd); }
.hx-kbtn svg, .hx-iconbtn svg { width: 15px; height: 15px; }
.hx-iconbtn { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.hx-iconbtn:hover { color: var(--ink); background: var(--glass); }
.hx-user { position: relative; }
.hx-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--gold2); border: 1px solid var(--glass-brd); background: var(--glass); cursor: pointer; }
.hx-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 200px; border-radius: 12px; padding: 6px; display: flex; flex-direction: column; }
.hx-menu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--ink2); font-size: 13px; text-decoration: none; }
.hx-menu a:hover { background: var(--sel); color: var(--ink); }
.hx-menu svg { width: 14px; height: 14px; }

/* ── barre basse, bouton rond au centre ── */
.hx-dock { position: fixed; z-index: 58; left: 16px; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; height: var(--dock-h);
  border-radius: 22px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; transition: opacity .5s var(--ease) .6s, transform .5s var(--ease) .6s; }
html.hx-intro .hx-dock { opacity: 0; transform: translateY(20px); }
body.ready .hx-dock { opacity: 1; transform: none; }
.dock-side { display: flex; justify-content: space-around; align-items: center; height: 100%; }
.dock-btn { position: relative; min-width: 76px; height: 100%; color: var(--muted); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11.5px; font-weight: 500; }
.dock-btn svg { width: 18px; height: 18px; }
.dock-btn:hover, .dock-btn.on { color: var(--ink); }
.dock-btn.on::after { content: ""; position: absolute; bottom: 8px; left: 50%; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px; background: var(--gold); }
.orb-btn { width: var(--orb-btn); height: var(--orb-btn); margin: -30px 6px 0; border-radius: 50%; cursor: pointer; position: relative;
  border: 1px solid var(--glass-brd); background: radial-gradient(circle at 50% 40%, rgba(226,184,92,.16), transparent 62%), var(--surface-solid);
  box-shadow: 0 0 0 6px var(--bg), 0 14px 30px -6px rgba(0,0,0,.6), 0 0 26px -4px var(--gold-soft); }
html[data-theme="light"] .orb-btn { box-shadow: 0 0 0 6px var(--bg), 0 14px 30px -10px rgba(60,45,15,.35); }
.orb-btn:hover { border-color: var(--sel-brd); }
.orb-btn .lab { position: absolute; left: 50%; bottom: -19px; transform: translateX(-50%); font-size: 10.5px; color: var(--gold2); font-weight: 600; letter-spacing: .06em; white-space: nowrap; }

/* ── orbe : une seule, qui vit dans le bouton rond ── */
#orb { position: fixed; z-index: 62; width: 320px; height: 320px; left: var(--orbx, 50%); top: var(--orby, calc(100% - 64px)); transform: translate(-50%,-50%) scale(.27);
  transform-origin: center; pointer-events: none; opacity: 0; transition: transform .9s var(--ease), left .9s var(--ease), top .9s var(--ease), opacity .3s; }
body.placed #orb { opacity: 1; }
body.nx-sheet-open #orb { opacity: 0; }   /* panneau Hive ouvert : l'orbe ne flotte pas dessus */
html.hx-intro body:not(.ready) #orb { left: 50%; top: 50%; transform: translate(-50%,-62%) scale(1); opacity: 1; }
#intro { display: none; }
html.hx-intro #intro { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; pointer-events: none; }
#intro .wrap { margin-top: 250px; text-align: center; }
#intro .date { font-family: var(--serif); font-style: italic; font-size: 56px; letter-spacing: -.01em; line-height: 1; }
#intro .date span { display: inline-block; opacity: 0; transform: translateY(10px); filter: blur(6px); animation: hx-ink .7s var(--ease) forwards; }
#intro .sub { margin-top: 14px; color: var(--muted); font-size: 14px; opacity: 0; animation: hx-fade .8s var(--ease) 1.1s forwards; }
body.ready #intro { opacity: 0; transition: opacity .5s var(--ease); }
body.gone #intro { display: none; }
@keyframes hx-ink { to { opacity: 1; transform: none; filter: none; } }
@keyframes hx-fade { to { opacity: 1; } }
@keyframes hx-pop { from { transform: scale(.97) translateY(-6px); opacity: 0; } }
@keyframes hx-leave { to { opacity: 0; transform: translateY(8px); } }

/* ── palette Cmd K, toasts ── */
#pal { position: fixed; z-index: 70; inset: 0; display: grid; place-items: start center; padding-top: 14vh; background: rgba(4,6,12,.35); }
#pal[hidden] { display: none; }
html[data-theme="light"] #pal { background: rgba(60,50,30,.12); }
#pal .box { width: min(640px, calc(100vw - 32px)); border-radius: 18px; overflow: hidden; animation: hx-pop .22s var(--spring); }
#pal input { width: 100%; height: 56px; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; padding: 0 20px; border-bottom: 1px solid var(--line); }
#pal .res { max-height: 52vh; overflow: auto; padding: 8px; }
#pal .sec { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; font-weight: 600; }
#pal .it { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--ink); text-decoration: none; }
#pal .it .sub { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
#pal .it.sel { background: var(--sel); box-shadow: inset 0 0 0 1px var(--sel-brd); }
#pal mark { background: transparent; color: var(--gold2); font-weight: 600; }
#pal .empty { padding: 14px 12px; color: var(--faint); font-size: 13px; }
#toasts { position: fixed; z-index: 80; left: 50%; bottom: 110px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 16px; border-radius: 12px; font-size: 13px; animation: hx-pop .25s var(--spring); }
.toast.err { color: var(--warm); }
.toast.out { animation: hx-leave .3s var(--ease) forwards; }

/* ── anciennes pages dans la nouvelle coque ── */
.nx-page { padding-left: 0; padding-right: 0; }
.nx-h1 { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.015em; }
.nx-h1 .nx-dot { color: var(--gold); }
.nx-btn.primary { background: var(--gold); color: #1a1408; }
html[data-theme="light"] .nx-btn.primary { color: #FFFDF8; }

/* ── vues refaites ── */
.nx-view {
  margin-top: 6px; animation: hx-fade .3s var(--ease);
  .vh { display: flex; align-items: flex-end; gap: 16px; margin: 16px 0 4px; flex-wrap: wrap; }
  .vh h1 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 38px; letter-spacing: -.015em; line-height: 1; margin: 0; }
  .vh p { color: var(--muted); font-size: 13.5px; padding-bottom: 4px; margin: 0; }
  .vh .act { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .h { display: flex; align-items: center; gap: 10px; min-height: 30px; padding: 0 10px; color: var(--muted); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; }
  .h .count { font-family: var(--mono); letter-spacing: 0; color: var(--faint); font-weight: 500; }
  .h .hint { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--faint); font-size: 12px; text-align: right; }
  section.block { margin-top: 22px; }
  .list { border-radius: 14px; padding: 6px; }
  .list:has(> .tbl) { padding: 6px 10px; }
  .row { position: relative; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; min-height: 40px; padding: 7px 12px 7px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; transition: background .15s var(--ease); }
  .row + .row { margin-top: 1px; }
  a.row:hover, button.row:hover { background: rgba(237,232,221,.04); color: var(--ink); }
  .row .t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 450; }
  .row .t small { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: 12.5px; }
  .row .t .why { display: block; white-space: normal; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 1px; }
  .row .ic { width: 16px; height: 16px; color: var(--muted); display: grid; place-items: center; }
  .row .ic svg { width: 15px; height: 15px; }
  .row .ic.w { color: var(--warm); } .row .ic.g { color: var(--gold); } .row .ic.c { color: var(--cold); }
  .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
  .tag { font-size: 11.5px; height: 20px; display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 5px; white-space: nowrap; }
  .tag.late { color: var(--warm); background: var(--warm-soft); }
  .tag.soon { color: var(--gold2); background: var(--gold-soft); }
  .tag.cold { color: var(--cold); background: var(--cold-soft); }
  .tag.ok { color: var(--ok); background: var(--ok-soft); }
  .tag.line { color: var(--muted); border: 1px solid var(--line); }
  .tag.dash { color: var(--warm); border: 1px dashed color-mix(in oklab, var(--warm) 55%, transparent); }
  .btn { white-space: nowrap; font: inherit; font-size: 12.5px; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--glass-brd); background: transparent; color: var(--ink2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
  .btn:hover { border-color: var(--sel-brd); color: var(--ink); }
  .btn.primary { background: var(--gold); color: #1a1408; border-color: transparent; font-weight: 600; }
  html[data-theme="light"] & .btn.primary { color: #FFFDF8; }
  .btn.primary:hover { filter: brightness(1.08); }
  .btn svg { width: 14px; height: 14px; }
  .btn:disabled { opacity: .5; cursor: progress; }
  .empty { padding: 14px 12px; color: var(--faint); font-size: 13px; }
  .muted { color: var(--muted); } .faint { color: var(--faint); } .gold { color: var(--gold2); }
  .banner { margin-top: 14px; border-radius: 12px; padding: 10px 14px; font-size: 13px; line-height: 1.5; background: var(--warm-soft); color: var(--ink2); border: 1px solid color-mix(in oklab, var(--warm) 25%, transparent); }
  .banner b { color: var(--warm); font-weight: 600; }
  .banner.cold { background: var(--cold-soft); border-color: color-mix(in oklab, var(--cold) 25%, transparent); }
  .banner.cold b { color: var(--cold); }

  .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
  .stat { border-radius: 14px; padding: 14px 16px; position: relative; }
  .stat .k, .hive .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; display: flex; align-items: center; gap: 6px; }
  .stat .v { font-family: var(--mono); font-size: 24px; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .stat .v small { font-size: 13px; color: var(--faint); }
  .stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .stat .v.gold { color: var(--gold2); } .stat .v.warm { color: var(--warm); }
  .info { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--faint); color: var(--faint); font-size: 9.5px; display: inline-grid; place-items: center; cursor: help; text-transform: none; letter-spacing: 0; font-weight: 600; flex: none; }
  [data-tip] { position: relative; }
  [data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; z-index: 20; left: 0; top: calc(100% + 8px); width: max-content; max-width: 280px; padding: 8px 10px; border-radius: 9px;
    background: var(--surface-solid); border: 1px solid var(--glass-brd); color: var(--ink2); font-size: 12px; line-height: 1.45; text-transform: none; letter-spacing: 0; font-weight: 400; box-shadow: var(--shadow); white-space: pre-line; }
  .grid2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }

  .seg { display: inline-flex; padding: 3px; border-radius: 10px; gap: 2px; }
  .seg a { white-space: nowrap; height: 28px; padding: 0 11px; border-radius: 7px; display: inline-flex; align-items: center; color: var(--muted); font-size: 12.5px; text-decoration: none; }
  .seg a.on { background: var(--sel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--sel-brd); }
  .board { display: grid; grid-template-columns: repeat(5, minmax(205px, 1fr)); gap: 12px; margin-top: 16px; overflow-x: auto; padding-bottom: 8px; }
  .col { border-radius: 16px; padding: 10px; min-height: 300px; transition: box-shadow .2s var(--ease), background .2s; }
  .col.over { box-shadow: var(--shadow), inset 0 0 0 1px var(--sel-brd); background: var(--sel); }
  .col h3 { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; padding: 4px 4px 10px; margin: 0; }
  .col h3 .n { font-family: var(--mono); font-weight: 400; color: var(--faint); font-size: 12px; }
  .col h3 .sum { margin-left: auto; font-family: var(--mono); font-weight: 400; color: var(--muted); font-size: 11.5px; }
  .card { display: block; border-radius: 12px; padding: 10px 11px; background: var(--surface-solid); border: 1px solid var(--line); cursor: grab; color: var(--ink); text-decoration: none; transition: border-color .15s; }
  .card + .card { margin-top: 8px; }
  .card:hover { border-color: var(--sel-brd); color: var(--ink); }
  .card.dragging { opacity: .4; }
  .card .co { font-weight: 550; font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; }
  .card .co .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card .co .val { margin-left: auto; white-space: nowrap; font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--gold2); }
  .card .who { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card .nx { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink2); display: flex; gap: 6px; align-items: center; }
  .card .nx .tag { margin-left: auto; }
  .card.noact .nx { color: var(--warm); }
  .card .nx svg { width: 13px; height: 13px; flex: none; }
  .card .fix { margin-top: 6px; font-size: 11.5px; color: var(--cold); display: flex; gap: 5px; }
  .card.cold { cursor: pointer; border-style: dashed; text-align: center; color: var(--muted); padding: 16px 10px; }
  .card.cold b { display: block; font-family: var(--mono); font-size: 22px; color: var(--ink); font-weight: 400; }
  table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
  .tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
  .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .tbl tr:last-child td { border-bottom: 0; }
  .tbl td a { color: var(--ink); text-decoration: none; font-weight: 550; }
  .tbl td a:hover { color: var(--gold2); }
  .tbl td.num { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .tbl th.num { text-align: right; }
  .tbl td .sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
  .tbl tfoot td { font-weight: 600; border-top: 1px solid var(--glass-brd); }

  .aa-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; margin-top: 16px; }
  .hive { border-radius: 18px; padding: 18px 20px; }
  .cells { display: flex; flex-wrap: wrap; gap: 4px 2px; margin-top: 14px; max-width: 340px; }
  .cells svg { width: 30px; height: 34px; }
  .cells path { fill: transparent; stroke: var(--faint); stroke-width: 1.2; }
  .cells .on path { fill: var(--gold); stroke: var(--gold); }
  .big { font-family: var(--serif); font-style: italic; font-size: 44px; line-height: 1; margin-top: 14px; }
  .big small { font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--muted); margin-left: 8px; }
  .big2 { font-size: 22px; }
  .enc { margin-top: 14px; }
  .stairs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; align-items: end; }
  .step { border-radius: 10px; padding: 10px; background: var(--surface-solid); border: 1px solid var(--line); font-size: 12px; color: var(--muted); min-width: 0; }
  .step b { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
  .step.cur { border-color: var(--sel-brd); background: var(--sel); color: var(--ink2); }
  .step.cur b { color: var(--gold2); }
  .step:nth-child(3) { min-height: 96px; } .step:nth-child(4) { min-height: 114px; }

  /* fiche client */
  .fiche { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; margin-top: 16px; }
  .fiche .panel { border-radius: 18px; padding: 20px 22px; }
  .fiche h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 26px; margin: 0 0 4px; }
  .props { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13px; padding: 14px 0; margin: 14px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .props dt { color: var(--muted); } .props dd { margin: 0; overflow-wrap: anywhere; }
  .nextbox { margin-top: 16px; border-radius: 14px; padding: 12px 14px; background: var(--gold-soft); border: 1px solid color-mix(in oklab, var(--gold) 25%, transparent); }
  .nextbox.warn { background: var(--warm-soft); border-color: color-mix(in oklab, var(--warm) 35%, transparent); }
  .nextbox .lab { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--gold2); font-weight: 600; }
  .nextbox.warn .lab { color: var(--warm); }
  .nextbox .val { margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  input.f, select.f, textarea.f { min-width: 0; height: 34px; border-radius: 9px; border: 1px solid var(--glass-brd); background: var(--surface-solid); color: var(--ink); font: inherit; padding: 0 10px; outline: 0; }
  textarea.f { height: auto; padding: 8px 10px; width: 100%; resize: vertical; }
  input.f:focus, select.f:focus, textarea.f:focus { border-color: var(--sel-brd); box-shadow: 0 0 0 3px var(--gold-soft); }
  .nextbox input.f[type=text] { flex: 1; }
  input.f[type=date] { width: 150px; font-family: var(--mono); font-size: 12.5px; }
  .etapes { display: flex; flex-wrap: wrap; gap: 4px; }
  .etapes button { cursor: pointer; font: inherit; }
  .etapes .tag.line { background: transparent; }
  .tl { margin: 16px 0 0; padding: 0; }
  .tl li { list-style: none; position: relative; padding: 0 0 14px 22px; font-size: 13px; color: var(--ink2); }
  .tl li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
  .tl li.g::before { background: var(--gold); box-shadow: 0 0 8px var(--gold); } .tl li.c::before { background: var(--cold); } .tl li.o::before { background: var(--ok); }
  .tl li::after { content: ""; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
  .tl li:last-child::after { display: none; }
  .tl time { color: var(--faint); font-family: var(--mono); font-size: 11.5px; margin-right: 6px; }
  .tl b { color: var(--ink); font-weight: 500; }
  .tl .pre { white-space: pre-wrap; margin-top: 2px; }
  .actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  details.plus { margin-top: 14px; }
  details.plus > summary { cursor: pointer; color: var(--muted); font-size: 12.5px; list-style: none; }
  details.plus > summary::-webkit-details-marker { display: none; }
  details.plus[open] > summary { margin-bottom: 10px; color: var(--ink); }
  .champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .champs label, .champ { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
  .champs .f { width: 100%; }
  .vh .act details.plus { margin: 0; position: relative; }
  .vh .act details.plus > summary { color: #1a1408; }
  .vh .act details.plus > form { position: absolute; right: 0; top: 40px; z-index: 30; width: min(520px, calc(100vw - 32px)); padding: 16px; }
  .actions details.plus { margin-top: 0; flex-basis: 100%; }
  .actions form { margin: 0; }
  .etapes .tag { border: 1px solid var(--line); }
  .val { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
}

@media (max-width: 1000px) {
  .nx-view { .grid2, .aa-top, .fiche { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); } .board { grid-template-columns: repeat(5, 230px); } }
  .hx-kbtn .lbl { display: none; }
}
@media (max-width: 760px) {
  :root { --orb-btn: 66px; }
  .hx-app { padding: 8px 16px calc(130px + env(safe-area-inset-bottom)); }
  .hx-top { height: 56px; gap: 8px; } .hx-today { font-size: 20px; white-space: nowrap; }
  .dock-btn { min-width: 60px; font-size: 10.5px; }
  .nx-view {
    .vh h1 { font-size: 30px; } .vh .act { margin-left: 0; width: 100%; }
    .stat { padding: 12px; } .stat .v { font-size: 18px; white-space: nowrap; }
    .row { grid-template-columns: 22px 1fr; } .row .meta { grid-column: 2; flex-wrap: wrap; }
    .tbl .hm { display: none; }
    .stairs { grid-template-columns: repeat(2, 1fr); }
    .props { grid-template-columns: 1fr; gap: 2px; } .props dd { margin-bottom: 8px; }
    .champs { grid-template-columns: 1fr; }
    .seg { overflow-x: auto; max-width: 100%; }
  }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; } }
@media (prefers-reduced-transparency: reduce) { .glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface-solid); } }
