/* ==========================================================================
   MINREX One Admin: layout and components. Colours, type and spacing come
   from tokens.css only. Desktop first (1280 px), tablet from 768 px. The
   demonstration band stays visible on screen and in print.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--papier);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

h1, h2, h3, h4, h5 { margin: 0; color: var(--vert-profond); }
h1, .h1 { font-family: var(--ff-display); font-size: var(--fs-2xl); font-weight: 600; line-height: var(--lh-tight); }
h2, .h2 { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 600; line-height: var(--lh-snug); }
h3, .h3 { font-family: var(--ff-display); font-size: 1.25rem; font-weight: 600; line-height: var(--lh-snug); }
.h4 { font-family: var(--ff-body); font-size: 1.0625rem; font-weight: 600; line-height: var(--lh-snug); }
.h5 { font-family: var(--ff-body); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-2); }
.display { font-family: var(--ff-display); font-size: var(--fs-3xl); font-weight: 600; line-height: var(--lh-tight); margin: 0; }
p { margin: 0 0 0.6rem; }
ol, ul { margin: 0; padding-left: 1.2rem; }
a { color: var(--vert-etat); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--or);
  outline-offset: 2px;
}

/* Headings take focus after each page change; the outline would frame the title, so it is left off. */
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: var(--z-skip);
  background: var(--vert-profond); color: #fff; padding: 8px 12px; border-radius: var(--r-sm);
}
.skip:focus { top: 12px; }

.mono { font-family: var(--ff-mono); font-size: 0.92em; }
.small { font-size: var(--fs-xs); }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.stack > * + * { margin-top: 12px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cluster--between { justify-content: space-between; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.eyebrow { font-family: var(--ff-mono); font-size: var(--fs-3xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--vert-etat); margin: 0 0 6px; }
.lead { font-size: 1.0625rem; color: var(--ink-2); max-width: var(--measure); margin: 6px 0 16px; }
.lead-small { color: var(--ink-2); margin: 4px 0 0; }
.note { font-size: var(--fs-xs); color: var(--ink-3); }
.crumb { margin: 0 0 8px; }
.emblem { width: 72px; height: 72px; display: block; margin-bottom: 14px; }

/* ---------- Icons, chips, tags, buttons ---------- */

.ic { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.chip, .tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.3; white-space: nowrap;
}
.chip .ic { width: 14px; height: 14px; }
.chip--ok { background: var(--vert-voile); color: var(--vert-profond); }
.chip--info { background: var(--vert-brume); color: var(--ink-2); border-color: var(--ligne); }
.chip--late { background: var(--ambre-voile); color: var(--ambre); }
.chip--alert { background: var(--rouge-voile); color: var(--rouge-etat); }
.chip--progress { background: var(--vert-brume); color: var(--vert-etat); border-color: var(--ligne-forte); }
.chip--action { background: var(--or-voile); color: var(--ink); border-color: var(--or); }

.tag { font-family: var(--ff-mono); font-size: var(--fs-3xs); letter-spacing: var(--ls-wide); text-transform: uppercase; font-weight: 500; padding: 2px 8px; }
.tag--demoData { background: var(--or-voile); color: var(--ink-2); border-color: var(--or); }
.tag--scope { background: transparent; color: var(--ink-3); border-color: var(--ligne-forte); }
.tag--simulated { background: var(--vert-brume); color: var(--ink-2); border-color: var(--ligne-forte); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-family: var(--ff-body); font-size: var(--fs-sm); font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn--primary { background: var(--vert-etat); color: #fff; }
.btn--primary:hover { background: var(--vert-profond); }
.btn--outline { background: #fff; color: var(--vert-etat); border-color: var(--vert-etat); }
.btn--outline:hover { background: var(--vert-voile); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ligne-forte); }
.btn--ghost:hover { background: var(--vert-brume); }
.btn--danger { background: var(--rouge-etat); color: #fff; }
.btn--danger:hover { background: #A60D25; }
.btn--sm { min-height: 32px; padding: 6px 10px; font-size: var(--fs-xs); }
.btn--block { width: 100%; }
.btn .ic { width: 16px; height: 16px; }
.btn--sm .ic { width: 14px; height: 14px; }

.link-btn {
  background: none; border: 0; padding: 0; color: var(--vert-etat); font: inherit;
  font-weight: 600; text-decoration: underline; cursor: pointer;
}
.ref-link { font-family: var(--ff-mono); font-size: 0.92em; color: var(--vert-etat); font-weight: 500; white-space: nowrap; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 38px; height: 38px; padding: 0; border-radius: var(--r-sm);
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.icon-btn .ic { width: 18px; height: 18px; }
.badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--or-clair); color: var(--vert-nuit);
  font-size: var(--fs-3xs); font-weight: 700; line-height: 18px; text-align: center;
}

/* ---------- Form controls ---------- */

.field { display: block; margin-bottom: 14px; }
.field label, .field__label { display: block; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.hint { font-size: var(--fs-xs); color: var(--ink-3); margin: 6px 0 0; }
.field-error { font-size: var(--fs-xs); color: var(--rouge-etat); margin: 6px 0 0; font-weight: 600; }
.input {
  display: block; width: 100%; min-height: 42px; padding: 8px 12px;
  border: 1px solid var(--ligne-forte); border-radius: var(--r-sm); background: #fff;
  color: var(--ink); font: inherit;
}
.input:focus { border-color: var(--vert-etat); box-shadow: 0 0 0 3px rgba(15, 117, 84, 0.18); outline: none; }
.input[aria-invalid="true"] { border-color: var(--rouge-etat); }
textarea.input { min-height: 84px; resize: vertical; }
.input--sm { min-height: 34px; padding: 5px 9px; font-size: var(--fs-xs); width: auto; }
.input--code { font-family: var(--ff-mono); font-size: 1.5rem; letter-spacing: 0.4em; text-align: center; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.inline-form .input { width: auto; min-width: 200px; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 0 0 12px; }
.filter { display: flex; flex-direction: column; gap: 4px; }
.filter__label { font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--ink-3); font-weight: 600; }
.filter--text .input { min-width: 220px; }
.chip-link {
  display: inline-block; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--ligne-forte);
  font-size: var(--fs-xs); color: var(--ink-2); text-decoration: none; background: #fff;
}
.chip-link:hover { background: var(--vert-brume); }
.chip-link.is-active { background: var(--vert-profond); border-color: var(--vert-profond); color: #fff; }
.action-form { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ligne); }
.action-form .btn { margin-top: 6px; }

/* ---------- Cards, banners, empty states ---------- */

.card {
  background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); padding: 18px 20px; min-width: 0;
}
.card > h2:first-child, .card > .cluster > h2:first-child { margin-bottom: 10px; }
.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--ligne-forte); background: #fff;
}
.banner p { margin: 2px 0 0; }
.banner .ic { color: var(--ink-2); margin-top: 2px; }
.banner--alert { background: var(--rouge-voile); border-color: var(--rouge-etat); }
.banner--alert .ic { color: var(--rouge-etat); }
.banner--pending { background: var(--or-voile); border-color: var(--or); }
.empty { border: 1px dashed var(--ligne-forte); border-radius: var(--r-sm); padding: 26px; text-align: center; color: var(--ink-3); background: #fff; }
.empty p { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain > li { padding: 6px 0; border-bottom: 1px solid var(--ligne); }
.plain > li:last-child { border-bottom: 0; }
.approval { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kv-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.kv-grid dt { color: var(--ink-3); font-size: var(--fs-xs); }
.kv-grid dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- KPI cards ---------- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
.kpi {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.kpi__label { font-size: var(--fs-xs); color: var(--ink-2); font-weight: 600; }
.kpi__value { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 600; color: var(--vert-profond); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi__note { font-size: var(--fs-2xs); color: var(--ink-3); }
.kpi.is-alert .kpi__value { color: var(--rouge-etat); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-sm); }
.table { width: 100%; border-collapse: collapse; background: #fff; font-size: var(--fs-xs); }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--ligne); text-align: left; vertical-align: top; }
.table thead th {
  background: var(--vert-brume); color: var(--ink-2); font-size: var(--fs-3xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: var(--ls-wide); white-space: nowrap;
}
.table tbody th[scope="row"] { font-weight: 600; color: var(--ink); }
.table tbody tr:hover td, .table tbody tr:hover th { background: var(--vert-brume); }
.table--compact th, .table--compact td { padding: 6px 9px; }
.cell-title { display: block; font-weight: 600; }

/* ---------- Shell: band, topbar, sidebar, view ---------- */

.device { min-height: 100vh; display: flex; flex-direction: column; }
.band {
  margin: 0; padding: 6px 16px; text-align: center; background: var(--vert-nuit); color: var(--or-clair);
  font-family: var(--ff-mono); font-size: var(--fs-3xs); letter-spacing: var(--ls-wider); text-transform: uppercase;
}
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 18px;
  background: var(--vert-profond); color: #fff; border-bottom: 1px solid var(--or);
}
.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__center { flex: 1 1 auto; min-width: 0; max-width: 520px; margin: 0 auto; }
.topbar__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { width: 34px; height: 34px; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name { font-family: var(--ff-display); font-size: 1.125rem; font-weight: 600; line-height: 1.1; }
.brand__sub { font-size: var(--fs-3xs); letter-spacing: var(--ls-wide); opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; }
.search { position: relative; margin: 0; }
.search__icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.75); display: flex; }
.search__icon .ic { width: 16px; height: 16px; }
.search__input {
  width: 100%; height: 38px; padding: 0 12px 0 34px; border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.1); color: #fff; font: inherit; font-size: var(--fs-xs);
}
.search__input::placeholder { color: rgba(255, 255, 255, 0.7); }
.search__input:focus { outline: 3px solid var(--or-clair); outline-offset: 1px; background: rgba(255, 255, 255, 0.16); }
.account { display: flex; flex-direction: column; text-align: right; line-height: 1.2; min-width: 0; }
.account__name { font-weight: 600; font-size: var(--fs-xs); white-space: nowrap; }
.account__role { font-size: var(--fs-3xs); opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.guide-btn { width: auto; padding: 0 10px; gap: 8px; }
.guide-btn__label { font-size: var(--fs-xs); font-weight: 600; }

/* Language switch on the dark topbar, and on light cards (profile). */
.lang-switch { display: inline-flex; border-radius: var(--r-sm); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.3); }
.lang-btn { min-width: 40px; height: 32px; padding: 0 8px; border: 0; background: transparent; color: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; cursor: pointer; }
.lang-btn[aria-pressed="true"] { background: #fff; color: var(--vert-profond); }
.lang-switch--wide { border-color: var(--ligne-forte); }
.lang-switch--wide .lang-btn { color: var(--ink); }
.lang-switch--wide .lang-btn[aria-pressed="true"] { background: var(--vert-profond); color: #fff; }

.shell { flex: 1 1 auto; display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 0; }
.sidebar {
  background: var(--vert-profond); color: #fff; display: flex; flex-direction: column;
  position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px); overflow-y: auto;
}
.nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; }
.nav__item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm);
  color: rgba(255, 255, 255, 0.86); text-decoration: none; font-size: var(--fs-sm);
}
.nav__item .ic { width: 18px; height: 18px; color: var(--or-clair); }
.nav__item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav__item.is-active { background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--or); }
.nav__badge {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--or-clair); color: var(--vert-nuit); font-size: var(--fs-3xs); font-weight: 700; text-align: center;
}
.sidebar__foot { margin-top: auto; padding: 16px; font-size: var(--fs-3xs); letter-spacing: var(--ls-wide); opacity: 0.7; }
.sidebar__head { display: none; }
.nav-scrim { display: none; }
.view { min-width: 0; padding: 26px 32px 48px; outline: none; }
.view > h1 { margin-bottom: 4px; }
.view > .lead { margin-bottom: 16px; }

/* The signed-out pages: no sidebar, the sign-in on its own. */
.device.is-signed-out .shell { grid-template-columns: minmax(0, 1fr); }
.device.is-signed-out .topbar__center { visibility: hidden; }
.device.is-signed-out .view { padding: 28px 24px 56px; }

/* ---------- Sign-in ---------- */

.signin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 36px; align-items: start; max-width: 1080px; margin: 0 auto; }
.signin__intro { padding-top: 12px; }
.signin__intro .lead { max-width: 52ch; }
.signin__card { padding: 24px 26px; }
.signin__card form { margin-top: 12px; }
.signin__card .btn { margin-top: 4px; }
.demo-accounts { max-width: 1080px; margin: 28px auto 0; }
.demo-accounts .table { margin-top: 10px; }

/* ---------- Results (refused, not found) ---------- */

.result { max-width: 620px; margin: 40px auto 0; text-align: center; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r-md); padding: 34px 28px; box-shadow: var(--shadow-sm); }
.result__icon { display: inline-flex; width: 60px; height: 60px; align-items: center; justify-content: center; border-radius: var(--r-pill); background: var(--rouge-voile); color: var(--rouge-etat); margin-bottom: 14px; }
.result__icon .ic { width: 28px; height: 28px; }
.result--alert { border-top: 4px solid var(--rouge-etat); }
.result .stack { max-width: 360px; margin-left: auto; margin-right: auto; }
.result-card { margin-top: 14px; }

/* ---------- Case file ---------- */

.case-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 20px; margin-bottom: 14px; }
.case-head .h1 { margin-top: 2px; }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; margin-top: 14px; }
.case-main > .card + .card, .case-side > .card + .card { margin-top: 14px; }
.case-side { min-width: 0; }
.applicant { font-family: var(--ff-display); font-size: var(--fs-lg); font-weight: 600; margin: 4px 0 2px; color: var(--ink); }
.actions .btn { margin-top: 8px; }
.timeline { list-style: none; margin: 4px 0 0; padding: 0; }
.timeline__item { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.timeline__item:not(:last-child)::before {
  content: ""; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 2px; background: var(--ligne);
}
.timeline__icon {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--r-pill);
  background: var(--papier); color: var(--ink-3); border: 1px solid var(--ligne-forte);
}
.timeline__icon .ic { width: 15px; height: 15px; }
.timeline__item.is-done .timeline__icon { background: var(--vert-etat); border-color: var(--vert-etat); color: #fff; }
.timeline__item.is-current .timeline__icon { background: var(--or); border-color: var(--or); color: var(--ink); }
.timeline__item.is-physical .timeline__icon { background: var(--ambre-voile); border-color: var(--ambre); color: var(--ambre); }
.timeline__body { display: flex; flex-direction: column; min-width: 0; padding-top: 4px; }
.timeline__title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.timeline__item.is-todo .timeline__title { color: var(--ink-3); font-weight: 500; }
.timeline__meta { font-size: var(--fs-xs); color: var(--ink-3); }
.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 7px 0; border-bottom: 1px solid var(--ligne); overflow-wrap: anywhere; }
.history li:last-child { border-bottom: 0; }
.history__when { font-family: var(--ff-mono); font-size: var(--fs-2xs); color: var(--ink-3); }
.history__what { font-weight: 600; }
.notes { list-style: none; padding: 0; }
.notes li { padding: 8px 0; border-bottom: 1px solid var(--ligne); }
.notes li:last-child { border-bottom: 0; }

/* ---------- Charts and small bar lists ---------- */

.chart { width: 100%; height: auto; display: block; margin-top: 6px; }
.chart-grid { stroke: var(--ligne); stroke-width: 1; }
.chart-axis { fill: var(--ink-3); font-size: 12px; font-family: var(--ff-body); }
.chart-legend text { fill: var(--ink-2); }
.hbars, .hbars-list { list-style: none; margin: 8px 0 0; padding: 0; }
.hbars li, .hbars-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 1.2fr) auto; align-items: center; gap: 10px; padding: 5px 0; font-size: var(--fs-xs); }
.hbars-list li { grid-template-columns: minmax(0, 1fr) auto; }
.hbars__label { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.hbars__track { height: 10px; background: var(--vert-voile); border-radius: var(--r-pill); overflow: hidden; display: block; }
.hbars__track > span { display: block; height: 100%; border-radius: var(--r-pill); }
.hbars__value { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.kpi .kpi__value + .kpi__note { margin-top: 2px; }
.sharebar { height: 8px; background: var(--vert-voile); border-radius: var(--r-pill); overflow: hidden; }
.sharebar > span { display: block; height: 100%; }
.donut-track { stroke: var(--vert-voile); }

/* ---------- Presenter guide (side panel) ---------- */

.demo-panel {
  position: fixed; top: 60px; right: 0; bottom: 0; z-index: var(--z-drawer);
  width: min(440px, 100%); overflow-y: auto; padding: 18px 20px 28px;
  background: #fff; border-left: 1px solid var(--ligne-forte); box-shadow: var(--shadow-lg);
}
.demo-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.demo-panel__head .icon-btn { color: var(--vert-profond); border-color: var(--ligne-forte); width: 34px; height: 34px; }
.demo-panel__head .icon-btn:hover { background: var(--vert-brume); }
.demo-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ligne); }
.demo-section > .h5 { margin-bottom: 8px; }
.demo-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.demo-scenario { padding: 12px 0; border-bottom: 1px solid var(--ligne); }
.demo-scenario:last-child { border-bottom: 0; }
.demo-scenario h3 { margin-bottom: 4px; }
.demo-steps { margin: 6px 0 8px; padding-left: 20px; font-size: var(--fs-xs); color: var(--ink-2); }
.demo-steps li { margin-bottom: 4px; }
.demo-roles { list-style: none; margin: 8px 0 0; padding: 0; }
.demo-role { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); border-bottom: 1px solid var(--ligne); }
.demo-role.is-current { background: var(--vert-brume); }
.demo-role__who { display: flex; flex-direction: column; min-width: 0; }
.demo-role__who strong { font-size: var(--fs-xs); }
.demo-role .btn { flex: 0 0 auto; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: var(--z-overlay);
  max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 11px 16px; border-radius: var(--r-sm);
  background: var(--vert-nuit); color: #fff; font-size: var(--fs-xs); font-weight: 600; box-shadow: var(--shadow-md);
}

/* ---------- Reports: the Minister's printable pages ---------- */

.report-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.report { display: flex; flex-direction: column; gap: 16px; }
.report-page {
  background: #fff; border: 1px solid var(--ligne); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  padding: 28px 30px; min-width: 0;
}
.report-cover { min-height: 560px; display: flex; flex-direction: column; justify-content: flex-start; }
.report-cover .lead { margin-bottom: 18px; }
.report-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.report-kv dt { color: var(--ink-3); font-size: var(--fs-xs); }
.report-kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.report-kv dd .muted { font-weight: 400; }
.report-kv--cover { margin-top: 18px; max-width: 620px; }
.report-chart { min-width: 0; }
.report-page .table-wrap { margin-top: 10px; }
.band-demo { margin: auto 0 0; padding-top: 18px; font-family: var(--ff-mono); font-size: var(--fs-3xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--ink-3); }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .menu-btn { display: inline-flex; }
  .guide-btn__label { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: var(--z-drawer); width: 260px; height: 100vh;
    transform: translateX(-102%); visibility: hidden;
    transition: transform var(--dur-base) var(--ease-out), visibility var(--dur-base); box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: none; visibility: visible; }
  .sidebar[hidden] { display: none; }
  .sidebar__head { display: flex; justify-content: flex-end; padding: 10px 10px 0; }
  .nav-scrim { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: calc(var(--z-drawer) - 1); cursor: pointer; }
  .sidebar.is-open + .nav-scrim { display: block; }
  .device.is-signed-out .sidebar { display: none; }
  .topbar { top: 0; }
  .view { padding: 22px 24px 44px; }
  .demo-panel { top: 0; }
}

@media (max-width: 960px) {
  .case-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .signin { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .account { display: none; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }
  .view { padding: 18px 16px 40px; }
  .device.is-signed-out .view { padding: 20px 16px 40px; }
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .topbar { padding: 8px 12px; gap: 10px; }
  .brand__sub { display: none; }
  .filter--text .input { min-width: 0; width: 100%; }
  .filters .filter { width: 100%; }
  .inline-form .input { min-width: 0; width: 100%; }
  .demo-panel { width: 100%; }
  .report-page { padding: 22px 18px; }
  .report-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .report-kv dd { margin-bottom: 8px; }
  .kv-grid { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv-grid dd { margin-bottom: 8px; }
  .approval { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .topbar__center { display: none; }
}

@media (max-width: 420px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .timeline__item { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Print: the report, the band, nothing else ---------- */

@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  body { background: #fff; font-size: 11pt; color: #000; }
  .topbar, .sidebar, .nav-scrim, .demo-panel, .toast, .no-print, .skip, .report-tools { display: none !important; }
  .shell { display: block; }
  .view { padding: 0; }
  .band { position: static; background: #fff; color: #000; border-bottom: 1px solid #000; padding: 0 0 4pt; text-align: left; }
  .report { gap: 0; }
  .report-page { border: 0; box-shadow: none; border-radius: 0; padding: 0; break-after: page; page-break-after: always; }
  .report-page:last-child { break-after: auto; page-break-after: auto; }
  .report-cover { min-height: 0; }
  .card, .kpi { box-shadow: none; }
  a { color: #000; text-decoration: none; }
  .chip, .tag { border: 1px solid #000; background: #fff !important; color: #000 !important; }
  .table thead th { background: #eee !important; }
  .table th, .table td { border-bottom-color: #bbb; }
}
