/* =============================================================================
   Plug'n'Dose · démonstrateur Tucuxi (v2). Jetons de css/site.css, règles préfixées.
============================================================================= */
.wz .sr-only, #demonstrateur .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wz-noscript { padding: 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--ink-2); margin: 0; }
.wz { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); position: relative; }

/* Barre du haut : choix de la fiche */
.wz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 12px 14px 12px 12px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.wz-drugs { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.wz-drug { position: relative; cursor: pointer; }
.wz-drug input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.wz-drug span { display: grid; gap: 1px; padding: 8px 14px; border-radius: 12px; line-height: 1.2; transition: background-color .15s; }
.wz-drug b { font-size: .9375rem; font-weight: 650; color: var(--ink-2); }
.wz-drug small { font-family: var(--font-mono); font-size: .6875rem; color: var(--ink-3); letter-spacing: .02em; }
.wz-drug:hover span { background: var(--surface-2); }
.wz-drug input:checked + span { background: var(--navy); }
.wz-drug input:checked + span b { color: #fff; }
.wz-drug input:checked + span small { color: rgba(255,255,255,.72); }
.wz-drug input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.wz-top-r { display: flex; align-items: center; gap: 14px; }

/* Étapes */
.wz-nav { border-bottom: 1px solid var(--line-2); }
.wz-steps { list-style: none; margin: 0; padding: 0 8px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.wz-steps::-webkit-scrollbar { display: none; }
.wz-steps li { position: relative; flex: none; }
.wz-steps button { display: flex; align-items: center; gap: 9px; padding: 13px 12px 12px; background: none; border: 0; cursor: pointer; font: inherit; font-size: .9375rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.wz-steps button:hover { color: var(--ink); }
.wz-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: .75rem; background: var(--surface-2); color: var(--ink-2); }
.wz-steps .is-on button { color: var(--ink); }
.wz-steps .is-on .wz-n { background: var(--gold); color: var(--on-gold); }
.wz-steps .is-on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--gold); }
.wz-steps .is-done .wz-n { background: var(--ok-bg); color: var(--ok-ink); }
.wz-steps .has-err .wz-n { background: var(--warn-bg); color: var(--warn-ink); box-shadow: 0 0 0 2px var(--gold); }
.wz-steps :focus-visible { outline-offset: -2px; }

/* Corps : saisie à gauche, prédiction collante à droite */
.wz-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); align-items: start; }
.wz-main { padding: clamp(20px, 2.6vw, 32px); min-width: 0; }
.wz-side { position: sticky; top: calc(var(--hdr) + 12px); border-left: 1px solid var(--line-2); min-width: 0; }
.wz-body.is-report { grid-template-columns: minmax(0, 1fr); }
.wz-body.is-report .wz-side { display: none; }

.wz-h { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.45rem, 1.25rem + .6vw, 1.75rem); line-height: 1.15; letter-spacing: -.012em; color: var(--navy); margin: 0 0 6px; outline: none; }
.wz-lead { margin: 0 0 20px; color: var(--ink-2); font-size: .9375rem; line-height: 1.5; max-width: 54ch; }
.wz-sub { margin: 24px 0 10px; font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.wz-sub:first-of-type { margin-top: 4px; }
.wz-err:empty { display: none; }
.wz-err { margin: 0 0 16px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: .875rem; }
.wz-err ul { margin: 0; padding-left: 18px; }
.wz-empty { margin: 0 0 12px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-3); font-size: .875rem; }
.wz-empty p { margin: 0; }
.wz-link { background: none; border: 0; padding: 2px 0; font: inherit; font-size: .875rem; font-weight: 600; color: var(--teal-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.wz-link:hover { text-decoration-thickness: 2px; }

/* Champs */
.wz .field { margin-bottom: 14px; gap: 5px; }
.wz .field label { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.wz .field input { padding: 10px 12px; border-radius: 10px; }
.wz-inp { position: relative; }
.wz-inp input.has-unit { padding-right: 64px; }
.wz-unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: .75rem; color: var(--ink-3); pointer-events: none; }
.wz .field input[type="number"] { font-variant-numeric: tabular-nums; }
.wz .field input:user-invalid { border-color: var(--measure); }
.wz-hint { margin: 0; font-size: .8125rem; color: var(--ink-3); line-height: 1.45; }
.wz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.wz-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wz-grid-sample { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: end; }
.wz-calc { margin: -2px 0 16px; font-size: .8125rem; color: var(--ink-3); }
.wz-calc:empty { display: none; }
.wz-set { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.wz-set legend { padding: 0; margin-bottom: 7px; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.wz-set legend .wz-link { font-size: .8125rem; font-weight: 500; margin-left: 8px; }
.wz-target .field { margin-bottom: 0; }

/* Pastilles */
.wz-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.wz-pill { position: relative; cursor: pointer; }
.wz-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wz-pill span { display: grid; justify-items: center; min-width: 58px; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; transition: border-color .15s, background-color .15s, color .15s; }
.wz-pill small { font-size: .6875rem; font-weight: 500; color: var(--ink-3); }
.wz-pill:hover span { border-color: var(--teal); color: var(--ink); }
.wz-pill input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.wz-pill input:checked + span small { color: rgba(255,255,255,.75); }
.wz-pill input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.wz-seg .wz-pill span { min-width: 76px; padding-block: 9px; }
.wz-adjp .wz-pill span { min-width: 74px; }

/* Cartes de saisie */
.wz-rowcard { border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 4px; margin-bottom: 10px; background: var(--paper); }
.wz-rowcard .field input { background: var(--surface); }
.wz-rowhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: .8125rem; }
.wz-x { width: 38px; height: 42px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.wz-x:hover { color: var(--measure); border-color: var(--measure); }
.wz-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.wz-read { margin: -6px 0 10px; font-size: .8125rem; color: var(--ink-3); }
.wz-read:empty { display: none; }
.wz-read .wz-link { font-size: .8125rem; }
.wz-add { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 6px; padding: 8px 2px; background: none; border: 0; font: inherit; font-size: .875rem; font-weight: 600; color: var(--teal-ink); cursor: pointer; }
.wz-add::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 1rem; line-height: 1; }
.wz-add:hover { color: var(--ink); }
.wz-bool { margin: -2px 0 14px; }
.wz-model { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--paper); font-size: .8125rem; display: grid; gap: 6px; }
.wz-model div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; }
.wz-model dt { color: var(--ink-3); }
.wz-model dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }

/* Propositions et comparaison */
.wz-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.wz-prop { display: grid; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, background-color .15s; }
.wz-prop:hover { border-color: var(--teal); }
.wz-prop.is-on { border-color: var(--teal-ink); background: var(--ok-bg); }
.wz-prop-l { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.wz-prop.is-on .wz-prop-l { color: var(--ok-ink); }
.wz-prop-v { font-size: .9375rem; }
.wz-prop-v b { font-size: 1.125rem; }
.wz-prop-s { font-size: .8125rem; color: var(--ink-2); }
.wz-toggle { margin: 2px 0 12px; padding: 6px 0; background: none; border: 0; font: inherit; font-size: .875rem; font-weight: 600; color: var(--teal-ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.wz-toggle::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.wz-toggle[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-2px); }
.wz-matrix { overflow-x: auto; margin: 0 0 8px; }
.wz-matrix table { border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; }
.wz-matrix th { font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; color: var(--ink-3); padding: 2px 4px; text-align: center; white-space: nowrap; }
.wz-matrix tbody th { text-align: right; padding-right: 8px; font-family: var(--font-sans); font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.wz-cell { display: block; min-width: 50px; height: 30px; padding: 0 6px; border-radius: 7px; border: 1.5px solid transparent; font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--ink-2); }
.wz-cell[data-s="in"] { background: var(--ok-bg); color: var(--ok-ink); }
.wz-cell[data-s="above"] { background: var(--warn-bg); color: var(--warn-ink); }
.wz-cell[data-s="below"] { background: var(--info-bg); color: var(--info-ink); }
.wz-cell:hover { border-color: var(--teal); }
.wz-cell.is-cur { border-style: dashed; border-color: currentColor; }
.wz-cell.is-rec { box-shadow: inset 0 0 0 1.5px var(--teal-ink); }
.wz-cell[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.wz-cell.is-na { display: grid; place-items: center; cursor: default; background: transparent; border: 1px dashed var(--line); color: var(--ink-3); }
.wz-mlegend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 14px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--surface-2); }
.sw[data-s="in"] { background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--ok-ink); }
.sw[data-s="above"] { background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-ink); }
.sw[data-s="below"] { background: var(--info-bg); box-shadow: inset 0 0 0 1px var(--info-ink); }
.wz-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); font-size: .9375rem; }
.wz-chosen > span:first-child { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.wz-chosen-d { flex-basis: 100%; font-size: .8125rem; color: var(--ink-3); }

/* Panneau de prédiction */
.wz-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 0; font-size: .9375rem; }
.wz-plot { position: relative; padding: 6px 10px 0 6px; }
.wz-plot svg { width: 100%; height: auto; display: block; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pk-samp { fill: var(--measure); stroke: var(--surface); stroke-width: 2.5; }
.pk-cdot { fill: var(--surface); stroke: var(--curve-b); stroke-width: 2; pointer-events: none; }
.pk-dose.is-past { opacity: .55; }
.pk-clip { font-family: var(--font-mono); font-size: 9.5px; fill: var(--ink-3); letter-spacing: .04em; }
.wz .pk-target-lab { font-size: 9.5px; }
.wz .pk-adj-lab { font-size: 9.5px; }
.wz-legend { padding: 2px 18px 12px; font-size: .75rem; gap: 4px 14px; }
.wz-ros { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.wz-ros .ro { padding: 14px 16px 16px; border-bottom: 0; }
.wz-ros .ro + .ro { border-left: 1px solid var(--line-2); }
.wz-ros .ro dt { font-size: .625rem; }
.wz-ros .ro .v { font-size: 1.3rem; }
.wz-ros .ro .v small { font-size: .8125rem; }
.wz-ros .ro .s { font-size: .75rem; }
.wz-ros .ro .chip { margin-top: 6px; font-size: .6875rem; }
.wz-engine { margin: 0; padding: 9px 20px 12px; border-top: 1px solid var(--line-2); font-family: var(--font-mono); font-size: .6875rem; color: var(--ink-3); letter-spacing: .02em; }
.wz-loading { display: grid; justify-items: center; gap: 12px; padding: 72px 24px; text-align: center; color: var(--ink-2); font-size: .9375rem; }
.wz-loading p { margin: 0; }
.wz-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--teal) 25%, transparent); border-top-color: var(--teal); animation: wz-spin .8s linear infinite; flex: none; display: inline-block; }
@keyframes wz-spin { to { transform: rotate(360deg); } }
.wz-busy { position: absolute; top: 12px; right: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .75rem; font-weight: 600; color: var(--ink-2); z-index: 4; }
.wz-busy .wz-spin { width: 13px; height: 13px; border-width: 2px; }
.wz-side.is-busy .wz-plot, .wz-side.is-busy .wz-ros { opacity: .5; transition: opacity .2s; }
.wz-side.is-busy .wz-side-head .chip { visibility: hidden; }

/* Pied */
.wz-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px clamp(20px, 2.6vw, 32px); border-top: 1px solid var(--line-2); }
.wz-foot .btn { height: 44px; }
.wz-flash { position: absolute; left: 50%; bottom: 76px; transform: translate(-50%, 8px); margin: 0; max-width: min(92%, 520px); padding: 9px 16px; border-radius: 999px; background: var(--navy); color: #fff; font-size: .8125rem; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 6; text-align: center; }
.wz-flash.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Thème sombre : textes sur fonds marine clair */
:root[data-theme="dark"] .wz-drug input:checked + span b, :root[data-theme="dark"] .wz-pill input:checked + span, :root[data-theme="dark"] .wz-cell[aria-pressed="true"], :root[data-theme="dark"] .wz-flash { color: #0C1F2E; }
:root[data-theme="dark"] .wz-drug input:checked + span small, :root[data-theme="dark"] .wz-pill input:checked + span small { color: rgba(12,31,46,.7); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wz-drug input:checked + span b, :root:not([data-theme="light"]) .wz-pill input:checked + span, :root:not([data-theme="light"]) .wz-cell[aria-pressed="true"], :root:not([data-theme="light"]) .wz-flash { color: #0C1F2E; }
  :root:not([data-theme="light"]) .wz-drug input:checked + span small, :root:not([data-theme="light"]) .wz-pill input:checked + span small { color: rgba(12,31,46,.7); }
  :root:not([data-theme="light"]) .wz-chk input::after { border-color: #0C1F2E; }
}

/* Rapport */
.wz-rep-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; margin-top: 8px; }
.wz-rep-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.wz-cfg { min-width: 0; }
.wz-secs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.wz-sec { border-bottom: 1px solid var(--line-2); background: var(--paper); }
.wz-sec:last-child { border-bottom: 0; }
.wz-sec:not(.is-on) .wz-chk span { color: var(--ink-3); }
.wz-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 12px; }
.wz-chk { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9375rem; font-weight: 600; color: var(--ink); min-height: 34px; }
.wz-chk input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 6px; border: 2px solid var(--ink-3); background: var(--surface); display: grid; place-content: center; cursor: pointer; transition: background-color .15s, border-color .15s; }
.wz-chk input::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .12s; }
.wz-chk input:checked { background: var(--teal-ink); border-color: var(--teal-ink); }
:root[data-theme="dark"] .wz-chk input::after { border-color: #0C1F2E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wz-chk input::after { border-color: #0C1F2E; } }
.wz-chk input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.wz-chk input:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.wz-chk-s { font-size: .8438rem; font-weight: 500; color: var(--ink-2); min-height: 30px; }
.wz-opts { display: grid; gap: 0; padding: 0 12px 8px 44px; }
.wz-mv { display: flex; gap: 2px; flex: none; }
.wz-mv button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.wz-mv button:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.wz-mv button:disabled { opacity: .3; cursor: default; }
.wz-mv svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wz-cfg .field textarea { min-height: 84px; }
.wz-presets .wz-pill span { min-width: 0; padding: 8px 13px; }

.wz-paper { min-width: 0; }
.wz-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.wz-actions .btn { height: 40px; }


/* Feuille de rapport : toujours claire, comme du papier */
.rpt {
  --ink: #0E2436; --ink-2: #445A6B; --ink-3: #687C8B; --line: #D6E0E1; --line-2: #E4EBEB;
  --surface: #FFFFFF; --paper: #F3F6F6; --surface-2: #EAF0F0; --navy: #2A4A63; --teal: #3E9B8E; --teal-ink: #1D7266;
  --gold: #F6B400; --gold-ink: #8A6200; --measure: #D14A2C; --curve-a: #2A4A63; --curve-b: #3E9B8E;
  --band-out: rgba(62,155,142,.13); --band-in: rgba(62,155,142,.26); --target: rgba(42,74,99,.07); --target-line: rgba(42,74,99,.34); --grid: #E3EAEA;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-lg);
  padding: clamp(20px, 3.4vw, 40px); font-size: .9063rem; line-height: 1.5; min-width: 0; overflow-wrap: anywhere;
}
:root[data-theme="dark"] .rpt { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 24px 60px -30px rgba(0,0,0,.8); }
.rpt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--navy); margin-bottom: 6px; }
.rpt-org { margin: 0 0 2px; font-size: .8125rem; color: var(--ink-2); font-weight: 650; }
.rpt-title { font-family: var(--font-display); font-weight: 400; font-size: 1.625rem; line-height: 1.15; letter-spacing: -.01em; color: var(--navy); margin: 0; }
.rpt-meta { display: grid; gap: 4px; justify-items: end; text-align: right; font-size: .75rem; color: var(--ink-3); flex: none; }
.rpt-demo { font-family: var(--font-mono); font-size: .6563rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-ink); --warn-bg: #FDF0CC; --warn-ink: #735000; white-space: nowrap; }
.rpt-sec { margin-top: 18px; break-inside: avoid; }
.rpt-sec h6 { margin: 0 0 8px; font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.rpt-sec p { margin: 0 0 6px; }
.rpt-kv { margin: 0; display: grid; }
.rpt-kv div { display: grid; grid-template-columns: minmax(120px, 30%) minmax(0, 1fr); gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.rpt-kv div:last-child { border-bottom: 0; }
.rpt-kv dt { color: var(--ink-3); font-size: .8438rem; }
.rpt-kv dd { margin: 0; font-weight: 600; }
.rpt-t { width: 100%; border-collapse: collapse; font-size: .8438rem; font-variant-numeric: tabular-nums; }
.rpt-t th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .75rem; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); }
.rpt-t td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.rpt-fig { margin: 0; }
.rpt-fig svg { width: 100%; height: auto; display: block; }
.rpt-fig figcaption { font-size: .75rem; color: var(--ink-3); margin-top: 4px; }
.rpt-none { color: var(--ink-3); font-style: italic; }
.rpt-warn { padding: 10px 14px; border-radius: 8px; background: #FDF0CC; color: #735000; }
.rpt-warn h6 { color: #735000; border-color: rgba(115,80,0,.25); }
.rpt-warn ul { margin: 0; padding-left: 18px; }
.rpt-stamp { display: inline-grid; gap: 2px; padding: 10px 16px; border: 2px solid #1D7266; color: #135C51; border-radius: 8px; transform: rotate(-1.5deg); }
.rpt-stamp b { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-size: .875rem; }
.rpt-stamp span { font-size: .8438rem; }
.rpt-sign { height: 64px; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; color: var(--ink-3); font-size: .75rem; }
.rpt-foot { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .7188rem; color: var(--ink-3); line-height: 1.45; }
.rpt-foot p { margin: 0 0 4px; }

#wz-print { display: none; }
.wz-paper .rpt { position: sticky; top: calc(var(--hdr) + 16px); }

@media (max-width: 1080px) {
  .wz-body { grid-template-columns: minmax(0, 1fr); }
  .wz-side { position: static; border-left: 0; border-top: 1px solid var(--line-2); order: -1; }
  .wz-rep-grid { grid-template-columns: minmax(0, 1fr); }
  .wz-paper .rpt { position: static; }
}
@media (max-width: 640px) {
  .wz { border-radius: 18px; }
  .wz-top { padding: 10px; }
  .wz-drugs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -2px; padding: 2px; }
  .wz-drugs::-webkit-scrollbar { display: none; }
  .wz-drug span { padding: 7px 11px; }
  .wz-top-r { width: 100%; justify-content: space-between; }
  .wz-steps button { padding: 12px 8px; font-size: .875rem; }
  .wz-grid { grid-template-columns: minmax(0, 1fr); }
  .wz-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; }
  .wz-grid-3 .wz-unit { display: none; }
  .wz-grid-3 .wz-inp input.has-unit { padding-right: 10px; }
  .wz-grid-sample { grid-template-columns: minmax(0, 1fr) auto; }
  .wz-grid-sample .field:first-child { grid-column: 1 / -1; }
  .wz-ros { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wz-ros .ro:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line-2); }
  .wz-side-head { padding: 14px 14px 0; }
  .wz-legend { padding: 2px 14px 10px; }
  .wz-engine { padding: 8px 14px 10px; }
  .rpt-head { flex-direction: column; }
  .rpt-meta { justify-items: start; text-align: left; }
  .rpt-kv div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wz-flash { bottom: 84px; }
}
/* Mode dossier (démo client) : demandes pré-remplies */
.wz-top-t { font-size: .875rem; font-weight: 600; color: var(--ink-2); padding: 6px 4px; }
.wz-cases { display: grid; gap: 8px; margin: 0 0 22px; }
.wz-case { position: relative; cursor: pointer; display: block; }
.wz-case input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wz-case > span { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "id name" "id why"; gap: 2px 14px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.wz-case small { grid-area: id; font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .04em; color: var(--ink-3); padding-top: 2px; }
.wz-case b { grid-area: name; font-size: .9375rem; font-weight: 650; color: var(--ink); }
.wz-case em { grid-area: why; font-style: normal; font-size: .8438rem; color: var(--ink-2); line-height: 1.4; }
.wz-case:hover > span { border-color: var(--ink-3); }
.wz-case input:checked + span { border-color: var(--gold); background: var(--paper); box-shadow: inset 3px 0 0 var(--gold); }
.wz-case input:checked + span small { color: var(--ink-2); }
.wz-case input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.wz-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wz-checks .wz-pill span { min-width: 0; display: inline-flex; align-items: center; gap: 7px; }
.wz-checks .wz-pill span::before { content: ""; width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--ink-3); flex: none; transition: background-color .15s, border-color .15s; }
.wz-checks .wz-pill input:checked + span::before { background: currentColor; border-color: currentColor; box-shadow: inset 0 0 0 2px var(--navy); }
.wz-hint.wz-rule { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); }
@media (max-width: 900px) { .wz-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .wz-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; }
  .wz-case > span { grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "name" "why"; }
}
@media (prefers-reduced-motion: reduce) { .wz-spin { animation-duration: 2.4s; } }
/* Impression : seul le rapport est imprimé */
@media print {
  body.wz-printing > *:not(#wz-print) { display: none !important; }
  body.wz-printing #wz-print { display: block !important; }
  body.wz-printing { background: #fff !important; }
  #wz-print .rpt { border: 0; box-shadow: none; border-radius: 0; padding: 0; font-size: 10.5pt; }
  #wz-print .rpt-title { font-size: 20pt; }
  @page { margin: 16mm 14mm; }
}
.wz-noscript { padding: 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--ink-2); margin: 0; }

.wz-tlab { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.wz-drug span { white-space: nowrap; }
.rpt-t td { overflow-wrap: normal; }
.wz-mlegend { gap: 4px 14px; } .wz-mlegend span { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
