/* latin-ext */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-300-latin-ext-ga7Qi-c.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-300-latin-vOuBqtB.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-400-latin-ext-ga7Qi-c.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-400-latin-vOuBqtB.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-500-latin-ext-ga7Qi-c.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-500-latin-vOuBqtB.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-600-latin-ext-ga7Qi-c.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-600-latin-vOuBqtB.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-700-latin-ext-ga7Qi-c.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-700-latin-vOuBqtB.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-800-latin-ext-ga7Qi-c.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-800-latin-vOuBqtB.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-400-latin-ext-c8h-btv.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-400-latin-AcnlIJe.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-500-latin-ext-c8h-btv.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-500-latin-AcnlIJe.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-600-latin-ext-c8h-btv.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-600-latin-AcnlIJe.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-700-latin-ext-c8h-btv.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-700-latin-AcnlIJe.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ============================================================================
   Ariane — design system (Claude Design handoff)
   Tokens, chassis and components. Vanilla CSS, server-rendered Twig.
   ========================================================================== */

:root {
    /* Base neutre chaude (papier) */
    --bg-app: #faf9f7;
    --bg-off: #efece6;
    --bg-sidebar: #f1efe9;
    --row-hover: #f4f2ec;
    --white: #fff;
    --ink: #1d1b18;
    --ink-2: #3c382f;
    --muted: #6f6a62;
    --faint: #8c877d;
    --vfaint: #9c968c;
    --vfaint-2: #a9a397;
    --border: #e3dfd6;
    --border-strong: #d8d3ca;
    --row-sep: #efebe3;
    --nav-active: #e6e0d6;
    --label-strong: #5a554d;

    /* « Le fil » (terracotta) */
    --fil: #b3442a;
    --fil-light: #d97a4f;
    --fil-bg: #fbf2ee;
    --fil-bg-2: #fbf6ea;
    --fil-border: #efd9cf;
    --seg-future: #e6ded4;
    --dot-future: #cbbfb1;

    /* Statuts sémantiques */
    --ok: #2f7d5b;
    --ok-bg: #e9f1ec;
    --ok-border: #cfe3d7;
    --warn: #9c7016;
    --warn-bg: #f6efdf;
    --warn-border: #e7d9b6;
    --warn-dot: #b07d1c;
    --run: #5b6470;
    --run-bg: #eef0f2;
    --run-border: #dde1e6;
    --todo: #8c877d;
    --todo-bg: #f1efe9;
    --todo-border: #e3dfd6;
    --todo-dot: #bdb7ab;

    --ui: 'Hanken Grotesk', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
    background: var(--bg-off);
    font-family: var(--ui);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.55;
}

a { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 6px;
    border: 2px solid var(--bg-app);
}

.mono { font-family: var(--mono); }

/* ============================================================================
   Boutons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 9px;
    padding: 9px 15px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--ink);
    transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: var(--row-hover); }
.btn-primary {
    background: var(--fil);
    color: var(--white);
    border-color: var(--fil);
}
.btn-primary:hover { background: #a23c25; }
.btn-accept {
    background: var(--ok);
    color: var(--white);
    border-color: var(--ok);
}

/* ============================================================================
   Le « fil » — composant de cycle de vie
   ========================================================================== */
.fil {
    display: flex;
    align-items: center;
}
.fil-seg {
    flex: 1;
    height: 2px;
    background: var(--seg-future);
}
.fil-seg.is-filled { background: var(--fil); }
.fil-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.fil-dot.is-past { background: var(--fil); }
.fil-dot.is-current {
    width: 13px;
    height: 13px;
    border: 2.5px solid var(--fil);
    background: var(--bg-app);
}
.fil-dot.is-future {
    border: 1.5px dashed var(--dot-future);
    background: transparent;
}
.fil-label {
    margin-left: 10px;
    font-size: 11.5px;
    color: var(--label-strong);
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================================================
   Avatars d'acteurs
   ========================================================================== */
.avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border: 1.5px solid var(--bg-app);
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
}
.avatar.is-human { background: #c9a98f; }
.avatar.is-human.alt { background: #9c8aa8; }
.avatar.is-agent {
    background: #3a3530;
    color: var(--fil-light);
    font-size: 11px;
}
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar + .avatar { margin-left: -6px; }

/* Carré de statut de run */
.run-dot {
    width: 7px;
    height: 7px;
    border-radius: 2px;
    flex: none;
    background: var(--border-strong);
}
.run-dot.is-completed { background: var(--ok); }
.run-dot.is-failed { background: var(--fil); }
.run-dot.is-running,
.run-dot.is-launched { background: var(--run); }

/* ============================================================================
   Pastilles de statut (pills)
   ========================================================================== */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    padding: 3px 11px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--todo-border);
    background: var(--todo-bg);
    color: var(--todo);
}
.pill.is-ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-border); }
.pill.is-warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-border); }
.pill.is-run { color: var(--run); background: var(--run-bg); border-color: var(--run-border); }
.pill.is-accent { color: var(--fil); background: var(--fil-bg); border-color: var(--fil-border); }

/* ============================================================================
   Chassis : sidebar 240px + zone principale
   ========================================================================== */
.chassis {
    height: 100vh;
    display: flex;
    background: var(--bg-app);
    overflow: hidden;
}

.sidebar {
    width: 240px;
    flex: none;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 18px 13px;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 16px;
}
.brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--ink);
    position: relative;
    flex: none;
}
.brand-mark .ring {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-mark .ring i {
    width: 13px;
    height: 13px;
    border: 2px solid var(--fil-light);
    border-radius: 50%;
    display: block;
}
.brand-mark .ring b {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fil-light);
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.workspace {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 9px 11px;
    margin-bottom: 18px;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    text-align: left;
}
.workspace .ws-left { display: flex; align-items: center; gap: 9px; }
.workspace .ws-chip {
    width: 19px;
    height: 19px;
    border-radius: 5px;
    background: var(--fil);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.workspace .ws-name { font-size: 13px; font-weight: 600; }
.workspace .ws-caret { color: var(--vfaint); font-size: 10px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--muted);
}
.nav-item .ico { width: 16px; text-align: center; flex: none; }
.nav-item.is-active {
    background: var(--nav-active);
    font-weight: 600;
    color: var(--ink);
}
a.nav-item:hover { background: var(--row-hover); }

.nav-section {
    margin-top: 20px;
    padding: 0 11px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--vfaint-2);
    margin-bottom: 9px;
}
.nav-phase {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--muted);
}
.nav-phase .count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--vfaint-2);
}

.sidebar-user {
    position: relative;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-top: 1px solid var(--border);
}
.sidebar-user .avatar { width: 28px; height: 28px; font-size: 11px; }
.sidebar-user .who { line-height: 1.2; min-width: 0; }
.sidebar-user .who .name { font-size: 12.5px; font-weight: 600; }
.sidebar-user .who .role { font-size: 11px; color: var(--vfaint); }
.sidebar-user .gear { color: var(--vfaint-2); font-size: 14px; }

/* Menu d'options (roue crantée) — dropdown natif <details>, ouverture vers le haut */
.sidebar-user .user-menu { margin-left: auto; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu[open] > summary { color: var(--ink); }
.user-menu-pop {
    position: absolute;
    right: 9px;
    bottom: 100%;
    margin-bottom: 6px;
    min-width: 168px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 18px 40px -24px rgba(40, 33, 22, 0.4);
    padding: 5px;
    display: flex;
    flex-direction: column;
    z-index: 20;
}
.user-menu-item {
    display: block;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--ink-2);
}
a.user-menu-item:hover { background: var(--row-hover); }
.user-menu-item.is-disabled { color: var(--vfaint); cursor: default; }

/* Zone principale */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar {
    height: 60px;
    flex: none;
    border-bottom: 1px solid #e7e3db;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}
.topbar-title { display: flex; align-items: baseline; gap: 12px; }
.topbar-title h1 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0;
}
.topbar-sub { font-size: 13px; color: var(--faint); }
.topbar-sub .accent { color: var(--fil); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 11px; }

.searchbox {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 256px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 8px 11px;
    font-size: 13px;
    color: #b3b0a7;
}
.searchbox .kbd {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 10px;
    color: #c2bcb1;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
}

.filterbar {
    height: 48px;
    flex: none;
    border-bottom: 1px solid var(--row-sep);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 28px;
}
.chip {
    font-size: 12.5px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
}
.chip.is-active {
    font-weight: 600;
    background: var(--ink);
    color: var(--bg-app);
    border-color: var(--ink);
}
.filter-sort {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--faint);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-sort strong { font-weight: 600; color: var(--label-strong); }

/* ============================================================================
   Registre (tableau portefeuille)
   ========================================================================== */
.registry-head,
.registry-row {
    display: grid;
    grid-template-columns: 248px 332px 132px 1fr 100px 84px;
    align-items: center;
    gap: 20px;
}
.registry-head {
    padding: 12px 28px;
    border-bottom: 1px solid #e7e3db;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vfaint-2);
}
.registry-head .right { text-align: right; }
.registry-body { flex: 1; overflow: auto; }
.registry-row {
    padding: 17px 28px;
    border-bottom: 1px solid var(--row-sep);
    cursor: pointer;
    transition: background .12s ease;
}
.registry-row:hover { background: var(--row-hover); }

.cell-product { min-width: 0; }
.cell-product .name { font-size: 14.5px; font-weight: 600; }
.cell-product .type { font-size: 12px; color: var(--faint); }

.cell-tasks { display: flex; align-items: center; gap: 8px; }
.cell-tasks .count { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.cell-tasks .unit { font-size: 11px; color: var(--vfaint); }

.cell-next {
    font-size: 13.5px;
    color: var(--ink-2);
    line-height: 1.35;
}
.cell-next strong { font-weight: 700; }
.cell-next .ref { font-family: var(--mono); font-size: 11px; color: var(--vfaint); }

.cell-context {
    text-align: right;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
}

/* Ligne « vide » (produit en Idée) atténuée */
.registry-row.is-empty .cell-product .name { color: var(--label-strong); }
.registry-row.is-empty .cell-product .type { color: var(--vfaint-2); }
.registry-row.is-empty .cell-tasks .count { color: var(--vfaint-2); }
.registry-row.is-empty .fil-label { color: var(--vfaint-2); }
.registry-row.is-empty .cell-context { color: var(--vfaint-2); }
.empty-dash { font-size: 13px; color: #cfc9be; }

.registry-empty {
    padding: 40px 28px;
    color: var(--faint);
    font-size: 14px;
}

/* ============================================================================
   Pages « simples » (auth, écrans pas encore redessinés) — fallback lisible
   ========================================================================== */
.page {
    max-width: 52rem;
    margin: 2rem auto;
    padding: 0 1rem;
    color: var(--ink-2);
}
/* Dans le chassis applicatif (sidebar + topbar), `.page` sert de conteneur de
   contenu : il remplit la zone et défile, au lieu d'être la coquille centrée. */
.main .page {
    max-width: none;
    margin: 0;
    padding: 26px 28px 40px;
    flex: 1;
    overflow: auto;
}
.page-nav {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 1.5rem;
}
.page-nav a { color: var(--fil); }
.page h1 { font-size: 26px; letter-spacing: -0.02em; margin-bottom: .25rem; }
.page h2 { font-size: 18px; letter-spacing: -0.015em; margin-top: 1.75rem; }
.page h3 { font-size: 15px; }
.page a { color: var(--fil); }
.page label { display: block; font-weight: 600; margin-top: .75rem; }
.page textarea,
.page input[type=text],
.page input[type=email],
.page input[type=password],
.page input[type=url] {
    width: 100%;
    padding: .5rem .6rem;
    font: inherit;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
}
.page button {
    margin-top: 1rem;
    padding: .55rem 1.1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--fil);
    background: var(--fil);
    color: var(--white);
    border-radius: 9px;
}
.page dt { font-weight: 600; margin-top: .5rem; }
.page dd { margin: 0 0 .5rem; }
.help-text { color: var(--faint); font-size: .9em; }
.flash {
    padding: .6rem .9rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
}
.flash-error { color: var(--fil); background: var(--fil-bg); border-color: var(--fil-border); }

/* ============================================================================
   Sidebar product-scoped (espace projet)
   ========================================================================== */
.sidebar-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 12.5px;
    color: var(--faint);
    margin-bottom: 12px;
}
.sidebar-back:hover { background: var(--row-hover); }
.product-header {
    padding: 0 9px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}
.product-header .row { display: flex; align-items: center; gap: 9px; }
.product-chip {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--fil-light);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.product-header .who { line-height: 1.25; min-width: 0; }
.product-header .who .name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.product-header .who .type { font-size: 11.5px; color: var(--vfaint); }
.nav-item .badge {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--vfaint-2);
}

/* ============================================================================
   Espace projet (hub)
   ========================================================================== */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); }
.breadcrumb a { color: var(--faint); }
.breadcrumb a:hover { color: var(--ink-2); }
.breadcrumb .sep { color: #cfc9be; }
.breadcrumb .here { color: var(--ink); font-weight: 600; }

.hub { flex: 1; overflow: auto; padding: 26px 28px 40px; }

.hub-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}
.hub-title h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.hub-title .head { display: flex; align-items: center; gap: 12px; }
.hub-title .desc { font-size: 14px; color: var(--muted); margin: 8px 0 0; max-width: 560px; line-height: 1.5; }
.hub-title .meta { text-align: right; flex: none; }
.hub-title .meta .ulid { font-family: var(--mono); font-size: 11px; color: var(--vfaint); }
.hub-title .meta .mcp { font-size: 12px; color: var(--faint); margin-top: 6px; }
.hub-title .meta .mcp strong { color: var(--ink-2); font-weight: 600; }

.state-pill {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    background: var(--row-hover);
    border: 1px solid #e6e1d8;
    border-radius: 20px;
    padding: 4px 11px;
}

/* Cartes in-app (bordure, pas d'ombre) */
.card { background: var(--white); border: 1px solid #e9e2d8; border-radius: 14px; }
.card-pad { padding: 18px; }

/* La boucle (grand fil) */
.loop { margin-bottom: 22px; padding: 24px 28px 20px; }
.loop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.loop-head .label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--vfaint-2); }
.loop-head .hint { font-size: 12px; color: var(--faint); }
.loop-track { display: flex; align-items: flex-start; padding: 0 6px; }
.loop-stage { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.loop-node { width: 11px; height: 11px; border-radius: 50%; }
.loop-node.is-past { background: var(--fil); }
.loop-node.is-current {
    width: 19px;
    height: 19px;
    border: 3px solid var(--fil);
    background: var(--white);
    box-shadow: 0 0 0 4px #f6e7e0;
}
.loop-node.is-future { border: 1.5px dashed var(--dot-future); background: transparent; }
.loop-stage .name { font-size: 12.5px; font-weight: 600; margin-top: 12px; color: var(--ink-2); }
.loop-stage.is-current .name { margin-top: 8px; font-weight: 700; color: var(--fil); }
.loop-stage.is-future .name { color: var(--vfaint-2); }
.loop-stage .sub { font-size: 11px; color: var(--vfaint-2); margin-top: 2px; }
.loop-link { height: 11px; display: flex; align-items: center; flex: none; width: 70px; }
.loop-link span { flex: 1; height: 2px; background: var(--seg-future); }
.loop-link.is-filled span { background: var(--fil); }

/* Deux colonnes */
.hub-cols { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }

/* Tableau des tâches */
.tasks-card { overflow: hidden; }
.tasks-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--row-sep);
}
.tasks-head .title { font-size: 15px; font-weight: 700; }
.tasks-head .pill-count {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--vfaint);
    background: var(--row-hover);
    border: 1px solid #e6e1d8;
    border-radius: 5px;
    padding: 2px 7px;
    margin-left: 10px;
}
.tasks-grid { display: grid; grid-template-columns: 1fr 116px 84px 132px; gap: 16px; align-items: center; }
.tasks-colhead {
    padding: 9px 20px;
    border-bottom: 1px solid var(--row-sep);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vfaint-2);
}
.task-row {
    padding: 14px 20px;
    border-bottom: 1px solid var(--row-sep);
    transition: background .12s ease;
}
.task-row:last-child { border-bottom: none; }
a.task-row:hover { background: #f7f5f1; }
.task-row .t-title { font-size: 13.5px; font-weight: 500; }
.task-row .t-refs { font-family: var(--mono); font-size: 10.5px; color: var(--vfaint-2); margin-top: 2px; }
.task-row .t-empty { font-size: 13px; color: #cfc9be; }
.task-row .t-run { display: flex; align-items: center; gap: 7px; }
.task-row .t-run .lbl { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.task-row .t-run .none { font-size: 12px; color: var(--vfaint-2); font-family: var(--mono); }

/* Pastille de statut avec puce */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 20px;
    padding: 3px 9px;
    border: 1px solid var(--todo-border);
    background: var(--todo-bg);
    color: var(--todo);
}
.tag .pdot { width: 6px; height: 6px; border-radius: 50%; background: var(--todo-dot); flex: none; }
.tag.is-run { color: var(--run); background: var(--run-bg); border-color: var(--run-border); }
.tag.is-run .pdot { background: var(--run); }
.tag.is-warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-border); }
.tag.is-warn .pdot { background: var(--warn-dot); }
.tag.is-ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-border); }
.tag.is-ok .pdot { background: var(--ok); }

/* Puce d'état ronde (dernier run) */
.sdot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--border-strong); }
.sdot.is-completed { background: var(--ok); }
.sdot.is-failed { background: var(--fil); }
.sdot.is-running,
.sdot.is-launched { background: var(--run); }

/* Avatar de tâche (plus petit, sans bordure) */
.avatar.sm { width: 21px; height: 21px; border: none; font-size: 10px; }

/* Rail de droite */
.rail { display: flex; flex-direction: column; gap: 16px; }
.rail-card-title { font-size: 13.5px; font-weight: 700; }

.next-card { background: var(--fil-bg); border: 1px solid var(--fil-border); border-radius: 14px; padding: 18px; }
.next-card .kicker { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: #bd8a78; margin-bottom: 7px; }
.next-card .body { font-size: 14.5px; color: var(--ink-2); line-height: 1.4; font-weight: 500; }
.next-card .btn { margin-top: 14px; width: 100%; justify-content: center; }

.ctx-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.mcp-badge { font-size: 10.5px; font-weight: 600; color: var(--ok); display: inline-flex; align-items: center; gap: 5px; }
.mcp-badge .sdot { background: var(--ok); }
.ctx-rows { display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; color: var(--muted); }
.ctx-row { display: flex; justify-content: space-between; }
.ctx-row .v { color: var(--ink-2); font-weight: 500; }
.ctx-endpoint {
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid var(--row-sep);
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--vfaint);
    word-break: break-all;
}
.ctx-link { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--fil); }

.actors { display: flex; flex-direction: column; gap: 11px; margin-top: 13px; }
.actor-row { display: flex; align-items: center; gap: 10px; }
.actor-row .avatar { width: 26px; height: 26px; font-size: 10px; }
.actor-row .who { line-height: 1.2; }
.actor-row .who .name { font-size: 12.5px; font-weight: 600; }
.actor-row .who .role { font-size: 11px; color: var(--vfaint); }

/* Barre de transitions du cycle de vie (sous la boucle) */
.loop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--row-sep); align-items: center; }
.loop-actions .lbl { font-size: 12px; color: var(--faint); margin-right: 4px; }
.loop-actions form { display: inline; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }

/* ============================================================================
   Intention — FOR-02 (document + rail assistant)
   ========================================================================== */
.doc-wrap { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 34px 28px 60px; }
.doc { width: 680px; flex: none; }
.doc-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vfaint-2); margin-bottom: 10px; }
.doc h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 14px; }

.mini-fil { display: flex; align-items: center; margin-bottom: 30px; max-width: 420px; }
.mini-fil .note { margin-left: 11px; font-size: 11.5px; color: var(--faint); white-space: nowrap; }

.doc-field { margin-bottom: 22px; }
.doc-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: #b08a3a; display: block; margin-bottom: 8px; }
.doc textarea,
.doc input[type=text] {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 15px 17px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-2);
    resize: vertical;
}
.doc textarea { min-height: 70px; }
.doc input[type=text] { padding: 11px 17px; }
.doc textarea:focus,
.doc input[type=text]:focus { outline: none; border-color: var(--fil-border); box-shadow: 0 0 0 3px var(--fil-bg); }
.doc .help-text { margin-top: 6px; }

.criteria-box { background: var(--white); border: 1px solid var(--border); border-radius: 11px; padding: 6px 17px; }
.criterion-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid #f1ede5;
    font-size: 14.5px;
    color: var(--ink-2);
}
.criterion-row:last-child { border-bottom: none; }
.criterion-row .mark { font-size: 13px; margin-top: 2px; flex: none; }
.criterion-row .mark.ok { color: var(--ok); }
.criterion-row .mark.todo { color: var(--warn); }
.criterion-row.to-quantify { color: var(--warn); }
.criterion-row .quantify { color: var(--warn); font-weight: 600; }
.criterion-row .grow { flex: 1; }
.criterion-row .edit { font-size: 12px; color: var(--fil); font-weight: 600; flex: none; }
.criteria-empty { color: var(--faint); font-size: 14px; padding: 12px 0; }

.add-section {
    display: block;
    font-size: 13px;
    color: var(--faint);
    background: none;
    border: 1px dashed var(--border-strong);
    border-radius: 9px;
    padding: 10px 16px;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: 4px;
}
.add-section:hover { background: var(--row-hover); }

/* Rail assistant */
.assistant-rail { width: 300px; flex: none; margin-left: 28px; display: flex; flex-direction: column; gap: 16px; }
.assistant-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.assistant-head .glyph { width: 24px; height: 24px; border-radius: 6px; background: #3a3530; color: var(--fil-light); font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.insights { display: flex; flex-direction: column; gap: 11px; }
.insight { border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; }
.insight.amber { border-color: var(--warn-border); background: var(--fil-bg-2); }
.insight .msg { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.insight .msg strong { font-weight: 600; }
.insight .ok-msg { font-size: 12.5px; color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }

.freeze-check { display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; color: var(--muted); }
.freeze-check .row { display: flex; align-items: center; gap: 9px; }
.freeze-check .m-ok { color: var(--ok); }
.freeze-check .m-warn { color: #b08a3a; }
.freeze-check .m-todo { color: var(--dot-future); }
.freeze-foot { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--row-sep); font-size: 11.5px; color: var(--vfaint); }
.freeze-foot strong { color: var(--muted); }

.version-block { font-family: var(--mono); font-size: 10.5px; color: var(--vfaint); padding: 0 4px; line-height: 1.6; }
.version-block a { color: var(--fil); }

/* ============================================================================
   Spécification — SPE-03 (éditeur 3 panneaux)
   ========================================================================== */
.spec-panes { flex: 1; display: flex; min-height: 0; }

/* Panneau liste */
.spec-list { width: 312px; flex: none; border-right: 1px solid #e7e3db; overflow: auto; padding: 16px 12px; }
.spec-filter {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    margin: 0 4px 14px;
    font-size: 12.5px;
    color: #b3b0a7;
}
.spec-group { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--vfaint-2); padding: 14px 10px 7px; }
.spec-group:first-of-type { padding-top: 6px; }
.req-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
}
a.req-item:hover { background: var(--row-hover); }
.req-item.is-active { background: var(--fil-bg); border-color: var(--fil-border); }
.req-item .req-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--todo-dot); flex: none; }
.req-item.is-active .req-dot { background: var(--warn-dot); }
.req-item .req-code { font-family: var(--mono); font-size: 10.5px; color: var(--vfaint); flex: none; }
.req-item.is-active .req-code { color: var(--fil); font-weight: 600; }
.req-item .req-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-item.is-active .req-name { font-weight: 600; }
.spec-list-empty { padding: 14px 10px; font-size: 13px; color: var(--faint); }

/* Panneau détail */
.spec-detail { flex: 1; overflow: auto; padding: 30px 38px; min-width: 0; }
.spec-detail-inner { max-width: 680px; }
.req-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; flex-wrap: wrap; }
.req-meta .path { font-family: var(--mono); font-size: 11px; color: var(--vfaint); }
.req-detail-title { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
.req-body { font-size: 15px; line-height: 1.65; color: var(--ink-2); margin: 0 0 28px; white-space: pre-wrap; }
.req-actions { display: flex; gap: 8px; }
.spec-detail .doc { width: auto; }

/* Panneau traçabilité */
.trace-rail { width: 280px; flex: none; border-left: 1px solid #e7e3db; overflow: auto; padding: 24px 20px; background: #faf8f5; }
.trace-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--vfaint-2); margin-bottom: 16px; }
.trace { position: relative; padding-left: 20px; }
.trace::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--seg-future); }
.trace-step { position: relative; margin-bottom: 20px; }
.trace-step:last-child { margin-bottom: 0; }
.trace-node { position: absolute; left: -20px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--fil); }
.trace-node.ring { border: 2.5px solid var(--fil); background: #faf8f5; }
.trace-node.muted { background: var(--dot-future); }
.trace-label { font-size: 11px; color: var(--vfaint); margin-bottom: 5px; }
.trace-card { display: block; background: var(--white); border: 1px solid #e9e2d8; border-radius: 9px; padding: 10px 12px; }
.trace-card + .trace-card { margin-top: 7px; }
.trace-card.accent { background: var(--fil-bg); border-color: var(--fil-border); }
.trace-card .t { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.trace-card .s { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.trace-foot { margin-top: 24px; padding-top: 18px; border-top: 1px solid #e7e3db; font-size: 11.5px; color: var(--vfaint); line-height: 1.7; }

/* Compteur d'en-tête (exigences · critères) */
.spec-counts { font-size: 12px; color: var(--muted); }
.spec-counts .ok { color: var(--ok); font-weight: 600; }

/* ============================================================================
   Tâche — ORC/EXE (brief + run + hand-off)
   ========================================================================== */
.task-detail { flex: 1; overflow: auto; padding: 28px 32px 48px; }
.task-head { margin-bottom: 22px; }
.task-head .head { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.task-head h1 { font-size: 23px; font-weight: 700; letter-spacing: -0.018em; margin: 0; }
.task-sub { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--faint); flex-wrap: wrap; }
.task-sub .ref { font-family: var(--mono); color: var(--fil); font-weight: 600; }
.task-sub .ulid { font-family: var(--mono); font-size: 11px; color: var(--vfaint); }

.task-cols { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.task-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Carte (en-tête + corps) */
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--row-sep);
}
.card-head .title { font-size: 14.5px; font-weight: 700; }
.card-head.tinted { background: #faf8f5; }
.card-tag {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--vfaint);
    background: var(--todo-bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 2px 7px;
}
.card-meta { font-size: 11.5px; color: var(--faint); }

/* Brief */
.brief-body { padding: 20px; }
.brief-section { margin-bottom: 18px; }
.brief-section:last-child { margin-bottom: 0; }
.brief-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--vfaint-2); margin-bottom: 8px; }
.brief-text { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.cri-list { display: flex; flex-direction: column; gap: 7px; }
.cri-line { display: flex; gap: 9px; font-size: 13.5px; color: var(--ink-2); }
.cri-line .code { font-family: var(--mono); font-size: 11px; color: var(--vfaint); flex: none; margin-top: 1px; }
.ctx-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ctx-chip { font-size: 12px; color: var(--label-strong); background: var(--row-hover); border: 1px solid #e6e1d8; border-radius: 7px; padding: 5px 10px; }

/* Run */
.run-id { font-size: 14.5px; font-weight: 700; line-height: 1.1; }
.run-sub { font-family: var(--mono); font-size: 10.5px; color: var(--vfaint); margin-top: 1px; }
.run-timeline { padding: 18px 20px; border-bottom: 1px solid var(--row-sep); }
.run-step-text { font-size: 13px; color: var(--ink-2); }
.run-artifacts { padding: 16px 20px; }
.artifact-row {
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #e9e2d8;
    border-radius: 9px;
    padding: 10px 13px;
}
.artifact-row + .artifact-row { margin-top: 8px; }
.artifact-row .name { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.artifact-row .meta { font-size: 11.5px; color: var(--faint); }
.artifact-row .act { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--fil); background: none; border: none; cursor: pointer; font-family: inherit; }
.result-box {
    margin-top: 13px;
    background: #faf8f5;
    border: 1px solid #ede8df;
    border-radius: 9px;
    padding: 12px 14px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
}
.result-box strong { color: var(--ink-2); }

/* Hand-off rail */
.handoff-agent { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.handoff-agent .glyph { width: 30px; height: 30px; border-radius: 8px; background: #3a3530; color: var(--fil-light); font-size: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.handoff-agent .who { line-height: 1.25; }
.handoff-agent .who .name { font-size: 13px; font-weight: 600; }
.handoff-agent .who .role { font-size: 11px; color: var(--vfaint); }
.handoff-note { font-size: 11.5px; color: var(--faint); line-height: 1.5; margin-bottom: 13px; }

/* Critères (rail) */
.cri-rail { display: flex; flex-direction: column; gap: 11px; }
.cri-item { display: flex; gap: 10px; align-items: flex-start; }
.cri-item .toggle { background: none; border: none; cursor: pointer; font-size: 15px; padding: 0; line-height: 1.2; font-family: inherit; }
.cri-item .toggle.checked { color: var(--ok); }
.cri-item .toggle.pending { color: #b08a3a; }
.cri-item .c-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.cri-item .c-code { font-family: var(--mono); font-size: 10px; color: var(--vfaint-2); margin-top: 2px; }

/* Liens typés (rail) */
.links-list { display: flex; flex-direction: column; gap: 9px; }
.links-list a { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-2); }
.links-list .lk-code { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--fil); }
.links-list .lk-code.muted { color: var(--vfaint); font-weight: 400; }

/* Zone de gestion (formulaires secondaires) */
.mgmt { margin-top: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
.mgmt .card-pad h2 { font-size: 14px; font-weight: 700; margin: 0 0 12px; }
.mgmt label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 8px 0 4px; }
.mgmt input[type=text], .mgmt input[type=url], .mgmt textarea, .mgmt select {
    width: 100%; padding: .5rem .6rem; font: inherit; border: 1px solid var(--border); border-radius: 8px; background: var(--white);
}
.mgmt textarea { min-height: 60px; resize: vertical; }
.return-history { list-style: none; padding: 0; margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.return-history li { padding: 6px 0; border-top: 1px solid var(--row-sep); }
