/* Ajustements propres aux maquettes : pas de nouveau jeton, uniquement de la mise en page */
html, body { margin: 0; background: var(--bg); }
.pr-logo { display: block; width: 150px; height: auto; }
.pr-logo-rail { display: block; width: auto; height: 34px; }
.pr-preview { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.pr-preview-hero { background: #1F2322; color: #F9FBE1; padding: 20px; }
.pr-preview-hero h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.pr-preview-body { padding: 16px 20px; display: grid; gap: 10px; }
.pr-risk { border-top: 1px solid var(--line); padding: 12px 20px; font-size: 12.5px; color: var(--ink-2); }
.pr-thumb { width: 100%; aspect-ratio: 16/9; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--mute); }
.pr-doc { aspect-ratio: 3/2; border-radius: 4px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--surface-2), var(--surface)); display: grid; place-items: center; color: var(--mute); }
.pr-block { padding: 24px; }
.pr-block-hero { background: #1F2322; color: #F9FBE1; padding: 32px 28px; }
.pr-block-hero h2 { margin: 0 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.pr-block-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 28px; }
.pr-block-figures b { display: block; font-size: 24px; font-weight: 600; }
.pr-block-risk { padding: 16px 28px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.pr-block-cta { padding: 20px 28px; display: flex; gap: 12px; align-items: center; }
.pr-block-text { padding: 20px 28px; }
.pr-block-text h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
/* Aperçus du site public : charte de l'annexe D (encre #1F2322, accent #FEF047), distincte du back-office */
.pr-site-cta { display: inline-block; background: #FEF047; color: #1F2322; border-radius: 12px; padding: 10px 18px; font-weight: 500; font-size: 13.5px; }
.pr-site-card { background: #F9FBE1; }
/* Barre de parcours : relie les écrans d'un même flow */
.pr-flowbar { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
/* Prototype de démonstration */
.pr-demobar { border-left-color: var(--accent); }
.pr-demo-step { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: start; padding: 8px 6px; border-radius: 4px; text-decoration: none; color: inherit; }
.pr-demo-step:hover { background: var(--surface-2); }
.pr-msg { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; max-width: 85%; }
.pr-msg-agent { background: var(--brand-50); margin-left: auto; }
.pr-doc-page { font-size: 14px; line-height: 1.55; }
.pr-doc-page h3 { margin: 0 0 4px; font-size: 18px; }
.pr-doc-page h4 { margin: 16px 0 4px; font-size: 14px; }
.pr-doc-page .pr-doc-meta { color: var(--mute); font-size: 12.5px; margin: 0; }
.pr-doc-page ul { margin: 4px 0; padding-left: 20px; }
/* Barre latérale : neutre, avec le jaune AMALTI limité au bloc du logo */
.kui-sidebar__brand { background: #FEF047; height: var(--topbar-h); box-sizing: border-box; display: flex; align-items: center; padding-top: 0; padding-bottom: 0; margin-bottom: 12px; }
.kui-sidebar__brand .pr-logo { width: 128px; }
.kui-sidebar { border-right: 1px solid var(--line); }
/* Barre de scénario flottante, en bas de la zone de contenu (à droite de la barre latérale) */
.pr-demofloat { position: fixed; z-index: 40; bottom: 16px; left: calc(var(--sidebar-w) + 24px); right: 24px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 16px; box-shadow: 0 8px 28px rgba(20, 20, 20, .16); }
.pr-demofloat--pill { left: auto; right: 24px; padding: 6px 8px 6px 12px; border-radius: 999px; }
.kui-sidebar--collapsed ~ * .pr-demofloat:not(.pr-demofloat--pill), body:has(.kui-sidebar--collapsed) .pr-demofloat:not(.pr-demofloat--pill) { left: calc(var(--sidebar-w-collapsed) + 24px); }
.pr-demo-spacer { height: 180px; }
.pr-demo-spacer.is-reduite { height: 64px; }
/* Direction « Grand livre » : traits structurants à l'encre (le jaune ne sert pas de trait fin sur fond clair), rayons du thème */
.pr-flowbar, .pr-demobar, .pr-demofloat { border-left-color: var(--ink); }
.pr-preview, .pr-flowbar, .pr-msg { border-radius: var(--radius-card); }
.pr-demofloat:not(.pr-demofloat--pill) { border-radius: var(--radius-card); }
.pr-demofloat { box-shadow: var(--shadow-pop); }

/* ===================== Refonte UX du 25/11 (design/direction-visuelle.md) ===================== */
/* Badges : casse normale, aplat teinté, sans contour. Les capitales espacées sur chaque cellule criaient toutes au même volume. */
.kui-badge:not(.kui-delta):not(.kui-badge--plain) { height: 22px; padding: 0 8px; border: 0; background-color: color-mix(in srgb, currentColor 10%, transparent); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.kui-badge--sm:not(.kui-delta) { height: 20px; font-size: 11.5px; }
.kui-badge--brand { color: var(--ink); background-color: var(--brand-50) !important; }

/* Chiffres clés du dossier : un bandeau de faits, à la place d'une phrase de sous-titre */
.pr-figs { margin: -4px 0 0; display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pr-figs > div { flex: none; padding: 10px 22px 10px 0; margin-right: 22px; border-right: 1px solid var(--line-2); min-width: 0; }
.pr-figs > div:last-child { border-right: 0; margin-right: 0; }
.pr-figs dt { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); margin-bottom: 3px; white-space: nowrap; }
.pr-figs dd { margin: 0; font-size: 14px; color: var(--ink); white-space: nowrap; display: flex; align-items: center; min-height: 22px; }
.pr-fig-num { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.pr-fig-mute { color: var(--mute); }

/* Avancement du parcours : 18 étapes regroupées en 5 phases, lisibles d'un coup d'œil */
.pr-board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 20px 18px; }
.pr-board__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 14px; }
.pr-board__title { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.pr-board__sub { margin: 2px 0 0; font-size: 12.5px; color: var(--mute); }
.pr-board__meter { display: grid; grid-template-columns: repeat(18, 1fr); gap: 3px; width: min(420px, 45%); }
.pr-board__meter span { height: 8px; border-radius: 1px; background: var(--line); }
.pr-board__meter .is-done { background: var(--ink); }
.pr-board__meter .is-current { background: #FEF047; box-shadow: inset 0 0 0 1.5px var(--ink); }
.pr-board__meter .is-warn { background: var(--warn-ink); }
.pr-phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--line); }
.pr-phase { padding: 12px 14px 4px 0; position: relative; }
.pr-phase + .pr-phase { padding-left: 14px; border-left: 1px solid var(--line-2); }
.pr-phase::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: transparent; }
.pr-phase.is-done::before { background: var(--ink); }
.pr-phase.is-current::before { background: var(--ink); height: 4px; top: -3px; }
.pr-phase.is-warn::before { background: var(--warn-ink); height: 4px; top: -3px; }
.pr-phase__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pr-phase__n { width: 22px; height: 22px; flex: none; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 600; border: 1.5px solid var(--line-strong); color: var(--mute); }
.pr-phase__n .kui-icon { font-size: 14px; }
.pr-phase.is-done .pr-phase__n { background: var(--ink); border-color: var(--ink); color: #fff; }
.pr-phase.is-current .pr-phase__n { background: #FEF047; border-color: var(--ink); color: var(--ink); }
.pr-phase.is-warn .pr-phase__n { background: var(--warn-bg); border-color: var(--warn-ink); color: var(--warn-ink); }
.pr-phase__label { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; }
.pr-phase.is-todo .pr-phase__label { color: var(--mute); }
.pr-phase__count { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.pr-phase__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pr-phase__steps li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; padding: 4px 6px 4px 0; font-size: 13px; line-height: 1.35; color: var(--ink-2); border-radius: 2px; }
.pr-phase__steps li.is-todo { color: var(--mute); }
.pr-phase__steps li.is-current { background: var(--brand-50); color: var(--ink); font-weight: 600; margin-left: -6px; padding-left: 6px; }
.pr-phase__steps li.is-warn { background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; margin-left: -6px; padding-left: 6px; }
.pr-step__mark { width: 16px; height: 16px; margin-top: 1px; border-radius: 999px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); font-size: 11px; font-weight: 700; font-style: normal; }
.pr-step__mark .kui-icon { font-size: 12px; }
.pr-phase__steps li.is-done .pr-step__mark { border: 0; color: var(--ink); }
.pr-phase__steps li.is-current .pr-step__mark { border-color: var(--ink); background: #FEF047; }
.pr-phase__steps li.is-warn .pr-step__mark { border-color: var(--warn-ink); }
.pr-step__now, .pr-step__note { display: block; font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.pr-step__now { text-transform: uppercase; letter-spacing: 0.06em; font-size: 10.5px; font-weight: 700; color: var(--ink); }

/* Foyer : les souscripteurs côte à côte */
.pr-compare { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pr-compare th, .pr-compare td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.pr-compare thead th { font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--ink); }
.pr-compare tbody th { font-weight: 400; color: var(--mute); width: 34%; font-size: 13px; }
.pr-compare tr:last-child > * { border-bottom: 0; }
.pr-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.pr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Synthèse du conseil : verdict, montants, écart */
.pr-verdict { --v: var(--ink); display: grid; grid-template-columns: minmax(0, 1.3fr) auto; grid-template-areas: "main figs" "gauge gauge"; gap: 14px 32px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--v); border-radius: var(--radius-card); padding: 16px 20px; }
.pr-verdict.is-neg { --v: var(--neg); } .pr-verdict.is-warn { --v: var(--warn-ink); } .pr-verdict.is-info { --v: var(--info-ink); } .pr-verdict.is-pos { --v: var(--pos); }
.pr-verdict__main { grid-area: main; min-width: 0; }
.pr-verdict__eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.pr-verdict__label { display: block; margin-top: 2px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--v); }
.pr-verdict__note { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); max-width: 62ch; line-height: 1.5; }
.pr-verdict__figs { grid-area: figs; margin: 0; display: flex; gap: 28px; align-items: flex-start; }
.pr-verdict__figs dt { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.pr-verdict__figs dd { margin: 4px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pr-verdict__gaugewrap { grid-area: gauge; }
.pr-verdict__legend { margin: 6px 0 0; font-size: 12.5px; color: var(--mute); font-variant-numeric: tabular-nums; }
.pr-verdict__legend b { color: var(--ink); }
.pr-verdict__gauge { height: 8px; background: color-mix(in srgb, var(--v) 18%, var(--surface)); border-radius: 1px; overflow: hidden; }
.pr-verdict__gauge span { display: block; height: 100%; background: var(--ink); }
/* File : priorité en texte précédé d'un repère de forme (plein, demi, vide), lisible sans la couleur */
.pr-prio { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.pr-prio::before { content: ""; width: 9px; height: 9px; border-radius: 999px; border: 1.5px solid currentColor; box-sizing: border-box; }
.pr-prio--haute { color: var(--neg); font-weight: 600; } .pr-prio--haute::before { background: currentColor; }
.pr-prio--normale { color: var(--ink-2); } .pr-prio--normale::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.pr-prio--basse { color: var(--mute); }
.pr-figs--queue { margin-top: -8px; }
/* Démo soutenance : sommaire des 7 cas */
.pr-cases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pr-case { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 18px; }
.pr-case__num { font-size: 30px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; border-top: 4px solid #FEF047; padding-top: 6px; }
.pr-case__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.pr-case__title { margin: 2px 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.pr-case__resume { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.pr-case__meta { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--mute); }
.pr-nat { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.pr-nat::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--mute); }
.pr-nat--pos::before { background: var(--pos); } .pr-nat--info::before { background: var(--info); }
.pr-case__steps { margin-top: 10px; border-top: 1px solid var(--line-2); padding-top: 8px; }
.pr-case__steps summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink); width: max-content; }
.pr-case__steps summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pr-case__steps ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.pr-case__go { align-self: start; }
/* Bande de la fiche dossier : plan blanc pleine largeur (du bord du menu au bord droit), fermée par les onglets.
   Même principe que PageHeader « band » du DSM, reproduit ici car la fiche est rendue dans le contenu et non en en-tête d'AppShell. */
.pr-band { background: var(--surface); border-bottom: 1px solid var(--line); margin: 0 -32px; padding: 20px 32px 0; display: flex; flex-direction: column; gap: 16px; }
.kui-shell__inner > :first-child > .pr-band:first-child { margin-top: -24px; }
.pr-band .kui-tabs { border-bottom: 0; margin-top: -4px; }
@media (max-width: 600px) { .pr-band { margin: 0 -16px; padding: 16px 16px 0; } .kui-shell__inner > :first-child > .pr-band:first-child { margin-top: -16px; } }
/* Chiffres clés dans la bande : montants en tête et plus grands, contexte en second plan */
.pr-figs--band { margin: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); align-items: stretch; }
.pr-figs--band > div { padding: 12px 24px 12px 0; margin-right: 24px; }
.pr-figs--band dd { font-size: 13.5px; color: var(--ink-2); }
.pr-figs--band .pr-figs__key dd { color: var(--ink); }
.pr-figs--band .pr-figs__key .pr-fig-num { font-size: 22px; letter-spacing: -0.02em; }
.pr-figs--band .pr-figs__key + div:not(.pr-figs__key) { border-left: 0; }
.pr-figs--band > .pr-figs__key:nth-child(2) { border-right: 1px solid var(--line); padding-right: 32px; margin-right: 32px; }
/* Filets du bandeau en pleine largeur, comme le bas de la bande ; espacement resserré pour tenir sur une ligne à 1440 px */
.pr-figs--band { margin: 0 -32px; padding: 0 32px; flex-wrap: nowrap; overflow-x: auto; border-color: var(--line); }
.pr-figs--band > div { padding: 12px 20px 12px 0; margin-right: 20px; }
.pr-figs--band > .pr-figs__key:nth-child(2) { padding-right: 28px; margin-right: 28px; }
@media (max-width: 600px) { .pr-figs--band { margin: 0 -16px; padding: 0 16px; } }

/* ===================== Généralisation à tous les écrans (25/11) ===================== */
/* Bande du DSM (PageHeader band) rendue dans la pile de l'écran : même plan blanc pleine largeur que la fiche dossier de la démo */
.kui-shell__inner > :first-child > .kui-pageband:first-child { margin-top: calc(-1 * var(--space-24)); }
.kui-shell__inner > * > .kui-pageband { margin-left: calc(-1 * var(--space-32)); margin-right: calc(-1 * var(--space-32)); }
.kui-shell__inner > * > .kui-pageband__sentinel { margin-top: -16px; }
.kui-shell__inner > * > .kui-pageband__tabs { margin: -16px calc(-1 * var(--space-32)) 0; }
.kui-shell__inner > * > .kui-pageband .kui-pageband__wrap, .kui-shell__inner > * > .kui-pageband__tabs .kui-pageband__wrap { max-width: none; }
.kui-pageband__head { padding-top: 20px; }
.kui-pageband__tabs { border-bottom-color: var(--line); }

/* Cycle de vie (LifecycleStepper) : une frise lisible, sans tuiles tronquées ; même code que l'avancement en phases */
.kui-stepper { gap: 0; }
.kui-step { border: 0; border-top: 2px solid var(--line); border-radius: 0; background: transparent; padding: 10px 10px 4px 0; gap: 8px; align-items: flex-start; }
.kui-step:hover { border-color: var(--line); }
.kui-step__dot { width: 22px; height: 22px; font-size: 11.5px; border-width: 1.5px; }
.kui-step__dot .kui-icon { font-size: 14px; }
.kui-step__label { font-size: 13px; font-weight: 600; white-space: normal; line-height: 1.3; }
.kui-step__status { white-space: normal; }
.kui-step--done { border-top-color: var(--ink); }
.kui-step--done .kui-step__dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.kui-step--done .kui-step__status { color: var(--mute); }
.kui-step--active { border-top: 4px solid var(--ink); margin-top: -2px; background: linear-gradient(var(--brand-50), var(--brand-50)) no-repeat 0 0 / 100% 100%; padding-left: 8px; }
.kui-step--active .kui-step__dot { background: #FEF047; border-color: var(--ink); color: var(--ink); }
.kui-step--todo .kui-step__label { color: var(--mute); font-weight: 500; }

/* Tuiles de chiffres (StatTile) alignées en grille : un bandeau de faits, comme l'état de la file */
.kui-grid:has(> .kui-stat) { gap: 0 !important; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kui-grid > .kui-stat { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 12px 20px; border-left: 1px solid var(--line-2); gap: 4px; }
.kui-grid > .kui-stat:first-child { border-left: 0; padding-left: 0; }
.kui-stat__label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.kui-stat__value { font-size: 24px; }
.kui-stat__note { font-size: 12px; }

/* Indicateurs (Kpi) : mêmes libellés que les chiffres clés, carte plus sobre */
.kui-kpi { box-shadow: none; gap: 8px; }
.kui-kpi__title { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.kui-kpi__value { font-size: 28px; }

/* Panneaux : sur-titre au format des libellés, en-tête séparé du contenu quand il porte un sous-titre */
.kui-panel__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
/* Graphiques : première série à l'encre (entonnoirs, barres simples), les suivantes gardent la palette du DSM */
[data-brand="amalti"] { --chart-1: #1F2322; --on-chart-1: #FFFFFF; }

/* ---------- Appels externes simulés (modale de démonstration) ---------- */
.pr-api { display: grid; gap: 12px; }
.pr-api__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--ink-2); }
.pr-api__meta b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.pr-api__meta code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; }
.pr-api__sim { margin-left: auto; color: var(--info-ink); }
.pr-api__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pr-api__x { border: 1px solid var(--line); background: var(--surface); }
.pr-api__x--aller, .pr-api__x--retour, .pr-api__x--file { border-color: var(--ink); }
.pr-api__x--erreur { border-color: var(--warn-ink); }
.pr-api__head { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 22px 70px 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; }
.pr-api__head:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.pr-api__n { width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong, var(--line)); }
.pr-api__x--ok .pr-api__n { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pr-api__dir { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pr-api__dir--out { color: var(--ink); }
.pr-api__dir--in { color: var(--info-ink); }
.pr-api__m { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; font-weight: 600; }
.pr-api__label { display: grid; min-width: 0; }
.pr-api__label b { font-weight: 600; }
.pr-api__label small { color: var(--mute); font-size: 12px; }
.pr-api__chain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 0 12px 10px 44px; font-size: 12px; }
.pr-api__node { padding: 2px 8px; border: 1px solid var(--line); color: var(--mute); transition: background .25s, color .25s, border-color .25s; }
.pr-api__node.is-on { color: var(--ink); border-color: var(--ink); }
.pr-api__node.is-cur { background: #FEF047; color: #1F2322; border-color: #1F2322; }
.pr-api__arrow { color: var(--line-strong, var(--mute)); transition: color .25s; }
.pr-api__arrow.is-on { color: var(--ink); }
.pr-api__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 0 12px 12px 44px; }
.pr-api__cap { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.pr-api__pre { margin: 0; padding: 10px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--font-mono, ui-monospace, monospace); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; color: var(--ink); }
.pr-api__wait { padding: 10px; border: 1px dashed var(--line); color: var(--mute); font-size: 12px; }
.pr-api__try { font-size: 12px; margin-bottom: 6px; color: var(--ink-2); }
.pr-api__try.is-ko b { color: var(--warn-ink); }
.pr-api__note { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--ink-2); }
.pr-api__effets { border-top: 1px solid var(--line); padding-top: 10px; }
.pr-api__effets ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pr-api__node, .pr-api__arrow { transition: none; } }

/* Scène du flux : systèmes en grand, paquet aller puis réponse retour */
.pr-scene { border: 1px solid var(--line); background: var(--surface-2); padding: 12px 16px 14px; display: grid; gap: 8px; }
.pr-scene__top { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.pr-scene__flux { font-family: var(--font-mono, ui-monospace, monospace); color: var(--ink); }
.pr-scene__lane { position: relative; height: 40px; }
.pr-scene__track { position: absolute; left: calc(50% / var(--n)); right: calc(50% / var(--n)); top: 50%; border-top: 2px dashed var(--line-strong, var(--line)); }
.pr-scene__pkt { position: absolute; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; padding: 6px 12px; background: #FEF047; color: #1F2322; border: 1.5px solid #1F2322; font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; font-weight: 600; box-shadow: 0 2px 0 #1F2322; transition: left 1s cubic-bezier(.55, .05, .35, 1); z-index: 2; }
.pr-scene__pkt.is-back { background: var(--pos-bg, #E3F4EA); color: var(--ink); border-color: var(--ink); }
.pr-scene__pkt.is-ko { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-ink); box-shadow: 0 2px 0 var(--warn-ink); }
.pr-scene__nodes { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.pr-scene__node { justify-self: stretch; text-align: center; padding: 14px 10px; background: var(--surface); border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); transition: border-color .3s, background .3s, color .3s; }
.pr-scene__node.is-tiers { border-style: dashed; }
.pr-scene__node.is-cur { border-color: var(--ink); color: var(--ink); background: var(--surface); box-shadow: inset 0 -3px 0 #FEF047; }
.pr-scene__node.is-done { color: var(--ink); border-color: var(--ink); }
.pr-scene__legend { font-size: 13px; color: var(--ink); min-height: 18px; }
.pr-scene__legend.is-ko { color: var(--warn-ink); }
.pr-api__x.is-vue { border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .pr-scene__pkt { transition: none; } }

/* Animation lente, pas à pas, et terminal synchronisé */
.pr-scene__lane { height: 46px; }
.pr-scene__track { display: none; }
.pr-scene__seg { position: absolute; top: 50%; border-top: 2px dashed var(--line-strong, var(--line)); transition: border-color .9s; }
.pr-scene__seg.is-go { border-top: 3px solid var(--ink); }
.pr-scene__seg.is-back { border-top: 3px solid var(--pos, #1E7A46); }
.pr-scene__seg.is-ko { border-top: 3px solid var(--warn-ink); }
.pr-scene__pkt { transition: left 1s cubic-bezier(.45, 0, .25, 1), background .4s; }
.pr-scene__pkt.is-wait { animation: pr-wait 1s ease-in-out infinite; }
@keyframes pr-wait { 50% { box-shadow: 0 2px 0 #1F2322, 0 0 0 6px rgba(254, 240, 71, .45); } }
.pr-scene__node.is-seen { color: var(--ink); }
.pr-scene__node.is-cur { animation: pr-arrive .6s ease-out; }
@keyframes pr-arrive { from { box-shadow: inset 0 -3px 0 #FEF047, 0 0 0 6px rgba(31, 35, 34, .12); } }
.pr-term { background: #15191A; color: #D9DEDC; font-family: var(--font-mono, ui-monospace, monospace); font-size: 12px; line-height: 1.55; padding: 12px 14px; height: 270px; overflow: auto; border: 1px solid #000; }
.pr-term__l { display: flex; gap: 10px; white-space: pre-wrap; word-break: break-word; }
.pr-term__t { color: #6E7A76; flex: none; }
.pr-term__src { color: #FEF047; flex: none; min-width: 168px; }
.pr-term__l--cmd { color: #8FA39C; }
.pr-term__l--mute { color: #6E7A76; }
.pr-term__l--titre { color: #FFFFFF; font-weight: 700; margin-top: 6px; }
.pr-term__l--out span:last-child { color: #FEF047; }
.pr-term__l--in span:last-child { color: #7FD6A0; }
.pr-term__l--err span:last-child { color: #FFB46B; }
.pr-term__l--note { color: #8FA39C; font-style: italic; }
.pr-term__json { margin: 2px 0 4px 0; padding-left: 12px; border-left: 2px solid #2E3634; color: #C9D3CF; white-space: pre-wrap; word-break: break-word; font: inherit; }
.pr-term__cur { display: inline-block; width: 8px; height: 14px; background: #FEF047; animation: pr-blink 1s steps(1) infinite; vertical-align: -2px; }
@keyframes pr-blink { 50% { opacity: 0; } }
.pr-api__head:disabled { cursor: default; }
@media (prefers-reduced-motion: reduce) { .pr-scene__pkt, .pr-scene__seg { transition: none; } .pr-scene__pkt.is-wait, .pr-scene__node.is-cur, .pr-term__cur { animation: none; } }
