/* ══════════════════════════════════════════════════════════════════
   DiagFroid · interface
   Mobile d'abord, thème clair / sombre, codes couleur manifold (BP bleu, HP rouge)
   ══════════════════════════════════════════════════════════════════ */
:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eceff4;
  --ink: #0e1a2b;
  --text: #1d2939;
  --muted: #5d6b7e;
  --dim: #8a96a8;
  --line: #e1e6ee;
  --line-strong: #cfd6e0;

  --brand: #0a5bd3;
  --brand-ink: #ffffff;
  --brand-soft: #e7f0fd;

  --bp: #1d6fe0;
  --bp-soft: #e8f1fe;
  --hp: #d5343c;
  --hp-soft: #fdecec;

  --ok: #0f8a5f;
  --ok-soft: #e4f5ee;
  --warn: #b26b00;
  --warn-soft: #fff3df;
  --alert: #cc2f36;
  --alert-soft: #fdeaea;

  --header: #0c1829;
  --header-2: #13233a;
  --header-ink: #f2f6fb;
  --header-muted: #93a4bb;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14, 26, 43, .05), 0 4px 16px rgba(14, 26, 43, .06);
  --shadow-lg: 0 10px 40px rgba(14, 26, 43, .18);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --tabbar-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070d18; --surface: #0f1829; --surface-2: #131f34; --surface-3: #1a2740;
    --ink: #eef3fa; --text: #d6deea; --muted: #97a5ba; --dim: #6d7c93;
    --line: #1f2c44; --line-strong: #2b3b58;
    --brand: #4d93ff; --brand-ink: #06101f; --brand-soft: #132a4d;
    --bp: #5aa0ff; --bp-soft: #10264a; --hp: #ff6b70; --hp-soft: #3a1418;
    --ok: #3cc98f; --ok-soft: #0f2e22; --warn: #f2b24c; --warn-soft: #33260d;
    --alert: #ff6b70; --alert-soft: #3a1418;
    --header: #050a14; --header-2: #0b1424;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070d18; --surface: #0f1829; --surface-2: #131f34; --surface-3: #1a2740;
  --ink: #eef3fa; --text: #d6deea; --muted: #97a5ba; --dim: #6d7c93;
  --line: #1f2c44; --line-strong: #2b3b58;
  --brand: #4d93ff; --brand-ink: #06101f; --brand-soft: #132a4d;
  --bp: #5aa0ff; --bp-soft: #10264a; --hp: #ff6b70; --hp-soft: #3a1418;
  --ok: #3cc98f; --ok-soft: #0f2e22; --warn: #f2b24c; --warn-soft: #33260d;
  --alert: #ff6b70; --alert-soft: #3a1418;
  --header: #050a14; --header-2: #0b1424;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.45;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 70px);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
b, strong { font-weight: 650; color: var(--ink); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ico { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 26px; height: 26px; }

/* ── EN-TÊTE ── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, var(--header), var(--header-2));
  color: var(--header-ink);
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 6px 20px rgba(0,0,0,.18);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #2f80ff, #1552b8);
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.brand-mark .ico { width: 20px; height: 20px; stroke: #fff; }
.brand-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; line-height: 1.1; }
.brand-sub { font-size: .7rem; color: var(--header-muted); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-fluid {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  font-family: var(--mono); font-size: .78rem; font-weight: 600; color: #fff;
}
.hdr-fluid .dot { width: 7px; height: 7px; border-radius: 50%; background: #58c47f; }
.hdr-btn {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  color: var(--header-ink); background: rgba(255,255,255,.06);
}
.hdr-btn:active { background: rgba(255,255,255,.14); }

/* ── STRUCTURE ── */
#layout { display: flex; justify-content: center; align-items: flex-start; gap: 20px; padding: 0 16px; }
main { width: 100%; max-width: 640px; padding: 14px 0 8px; min-width: 0; }
#sidebar-ad { display: none; flex-shrink: 0; width: 300px; position: sticky; top: 84px; padding-top: 14px; }
@media (min-width: 980px) { #sidebar-ad { display: block; } }
.page { display: none; }
.page.active { display: block; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── BARRE D'ONGLETS ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
  display: flex; padding-bottom: var(--safe-b);
}
.tab {
  flex: 1; height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .68rem; font-weight: 550; color: var(--dim); position: relative;
}
.tab .ico { width: 22px; height: 22px; }
.tab.active { color: var(--brand); }
.tab.active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2.5px; border-radius: 0 0 3px 3px; background: var(--brand); }

/* ── PUB ── */
#footer-ad { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); text-align: center; z-index: 98; transition: opacity .2s; }
#footer-ad.hidden { opacity: 0; pointer-events: none; }

/* ── TITRES ── */
.eyebrow { font-size: .7rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.page-title { font-size: 1.35rem; font-weight: 750; letter-spacing: -.02em; color: var(--ink); line-height: 1.2; }
.page-head { margin: 4px 2px 14px; }
.page-head p { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.sec-title { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ── CARTES ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card.flat { box-shadow: none; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-h h3 { font-size: .98rem; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.card-h .sub { font-size: .76rem; color: var(--muted); }
.card-h .right { margin-left: auto; }

/* ── ACCUEIL ── */
.hero {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 22px 18px 18px; margin-bottom: 14px; color: #eaf2ff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(77,147,255,.35), transparent 60%),
    radial-gradient(80% 80% at 0% 100%, rgba(213,52,60,.22), transparent 60%),
    linear-gradient(160deg, #0d1b31, #0a1424);
  box-shadow: var(--shadow-lg);
}
.hero h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: #fff; }
.hero p { font-size: .88rem; color: #b8c7dc; margin-top: 8px; max-width: 34ch; }
.hero-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.hero-kpi { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 8px 10px; }
.hero-kpi .v { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: #fff; }
.hero-kpi .l { font-size: .66rem; color: #9fb2cc; letter-spacing: .03em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 18px; border-radius: 12px; width: 100%;
  font-weight: 650; font-size: .98rem; letter-spacing: -.005em;
  transition: transform .06s, filter .15s, opacity .15s;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-danger { background: var(--alert-soft); color: var(--alert); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn + .btn, .btn-row + .btn, .btn + .btn-row { margin-top: 10px; }
.hero .btn-primary { background: #2f80ff; color: #fff; margin-top: 16px; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.quick-item .qi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.quick-item b { font-size: .9rem; }
.quick-item span { font-size: .76rem; color: var(--muted); line-height: 1.35; }

/* Accordéons */
details.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
details.acc summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; font-weight: 650; font-size: .92rem; color: var(--ink); }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .chev { margin-left: auto; transition: transform .2s; color: var(--dim); }
details.acc[open] summary .chev { transform: rotate(180deg); }
details.acc .acc-body { padding: 0 16px 16px; font-size: .86rem; color: var(--text); line-height: 1.6; }
details.acc .acc-body p + p { margin-top: 8px; }
.steps-list { counter-reset: s; list-style: none; }
.steps-list li { counter-increment: s; position: relative; padding: 8px 0 8px 36px; border-top: 1px solid var(--line); }
.steps-list li:first-child { border-top: 0; }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 9px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-family: var(--mono); font-size: .75rem; font-weight: 700; display: grid; place-items: center; }

.note { font-size: .78rem; color: var(--muted); line-height: 1.55; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.note b { color: var(--text); }
.credit { text-align: center; font-size: .74rem; color: var(--dim); margin: 18px 0 6px; }
.credit b { color: var(--muted); }
.cafe { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; padding: 11px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: .8rem; text-decoration: none; }
.cafe:hover { color: var(--brand); border-color: var(--brand); }
.cafe .cards { display: inline-flex; gap: 4px; }
.cafe .cards span { font-size: .6rem; font-weight: 800; letter-spacing: .04em; padding: 1px 5px; border-radius: 3px; border: 1px solid currentColor; }

/* ── CONTRÔLES ── */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 12px; }
.seg button { min-height: 44px; border-radius: 9px; font-weight: 600; font-size: .88rem; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.fluid-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); margin-top: 10px;
}
.fluid-row .fid { font-family: var(--mono); font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.fluid-row .meta { font-size: .74rem; color: var(--muted); }
.fluid-row .ico { margin-left: auto; color: var(--dim); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; font-size: .66rem; font-weight: 700; letter-spacing: .03em; line-height: 1.5; font-family: var(--mono); }
.b-A1 { background: var(--surface-3); color: var(--muted); }
.b-A2L { background: var(--warn-soft); color: var(--warn); }
.b-A3 { background: var(--alert-soft); color: var(--alert); }
.b-B2L { background: #efe6fb; color: #6b3fb0; }
:root[data-theme="dark"] .b-B2L { background: #2a1c44; color: #c3a3f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .b-B2L { background: #2a1c44; color: #c3a3f5; } }
.b-glide { background: var(--brand-soft); color: var(--brand); }

/* ── CHAMPS DE MESURE ── */
.side { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.side-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.side-h .pill { font-family: var(--mono); font-weight: 800; font-size: .8rem; letter-spacing: .06em; padding: 4px 9px; border-radius: 7px; color: #fff; }
.side-h h3 { font-size: .95rem; font-weight: 700; color: var(--ink); }
.side-h .sub { font-size: .74rem; color: var(--muted); margin-left: auto; text-align: right; }
.side.bp .pill { background: var(--bp); }
.side.hp .pill { background: var(--hp); }
.side.air .pill { background: var(--muted); }
.side.bp { border-top: 3px solid var(--bp); }
.side.hp { border-top: 3px solid var(--hp); }
.side-body { padding: 12px 16px 14px; }

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field-l { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.field-l label { font-size: .84rem; font-weight: 600; color: var(--text); }
.field-l .hint { font-size: .72rem; color: var(--dim); text-align: right; }
.inp { display: flex; align-items: stretch; height: 54px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.inp:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); background: var(--surface); }
.inp.filled { background: var(--surface); }
.inp .sign { width: 48px; flex-shrink: 0; font-family: var(--mono); font-size: 1.25rem; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.inp .sign:active { background: var(--surface-3); }
.inp input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 0 12px; font-family: var(--mono); font-size: 1.35rem; font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.inp input::placeholder { color: var(--dim); font-weight: 400; font-family: var(--font); font-size: .95rem; }
.inp .unit { display: flex; align-items: center; padding: 0 14px 0 2px; font-size: .86rem; font-weight: 600; color: var(--muted); min-width: 54px; }

/* Lectures calculées façon manifold */
.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ro { display: flex; flex-direction: column; border-radius: 11px; padding: 9px 11px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.ro .l { font-size: .66rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro .v { font-family: var(--mono); font-size: 1.22rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.ro .v small { font-size: .72rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.ro .s { font-size: .7rem; margin-top: 1px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro.key { background: var(--surface); border-width: 1.5px; }
.ro.key.ok { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.ro.key.warn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.ro.key.alert { border-color: color-mix(in srgb, var(--alert) 60%, transparent); }
.ro.ok .s { color: var(--ok); font-weight: 650; }
.ro.warn .s { color: var(--warn); font-weight: 650; }
.ro.alert .s { color: var(--alert); font-weight: 650; }
.ro.empty .v { color: var(--dim); }

.msg { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 11px; font-size: .8rem; line-height: 1.45; margin-top: 10px; }
.msg .ico { margin-top: 1px; }
.msg.info { background: var(--brand-soft); color: var(--text); }
.msg.info .ico { color: var(--brand); }
.msg.warn { background: var(--warn-soft); color: var(--text); }
.msg.warn .ico { color: var(--warn); }
.msg.alert { background: var(--alert-soft); color: var(--text); }
.msg.alert .ico { color: var(--alert); }
.msg.ok { background: var(--ok-soft); color: var(--text); }
.msg.ok .ico { color: var(--ok); }

.opt-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; font-size: .86rem; font-weight: 600; color: var(--brand); }

/* Barre d'action collante */
.actionbar {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); z-index: 50;
  margin-top: 14px; padding: 8px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.actionbar .left { font-size: .72rem; color: var(--muted); text-align: center; margin: 0 6px 6px; line-height: 1.35; }
.actionbar .left:empty { display: none; }
.actionbar .btn { min-height: 48px; }

/* ── BILAN ── */
.verdict { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.verdict .vi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.verdict .vt { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.verdict .vv { font-weight: 700; color: var(--ink); font-size: .98rem; line-height: 1.3; }
.status-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.chip { border-radius: 11px; padding: 9px 6px; text-align: center; border: 1px solid var(--line); background: var(--surface); }
.chip .l { font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chip .v { font-size: .8rem; font-weight: 750; margin-top: 2px; }
.chip.ok { background: var(--ok-soft); border-color: transparent; } .chip.ok .v { color: var(--ok); }
.chip.warn { background: var(--warn-soft); border-color: transparent; } .chip.warn .v { color: var(--warn); }
.chip.alert { background: var(--alert-soft); border-color: transparent; } .chip.alert .v { color: var(--alert); }

.gauge { padding: 12px 0; border-top: 1px solid var(--line); }
.gauge:first-of-type { border-top: 0; padding-top: 2px; }
.gauge-top { display: flex; align-items: baseline; gap: 8px; }
.gauge-top .n { flex: 1; min-width: 0; font-size: .86rem; font-weight: 650; color: var(--text); }
.gauge-top .n small { display: block; font-size: .7rem; font-weight: 500; color: var(--dim); }
.gauge-top .val { white-space: nowrap; font-family: var(--mono); font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.gauge-top .val small { font-size: .7rem; color: var(--muted); }
.gauge-top .st { font-size: .68rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; margin-left: 4px; align-self: center; white-space: nowrap; }
.st.ok { background: var(--ok-soft); color: var(--ok); } .st.warn { background: var(--warn-soft); color: var(--warn); } .st.alert { background: var(--alert-soft); color: var(--alert); }
.track { position: relative; height: 8px; border-radius: 99px; background: var(--surface-3); margin: 10px 0 4px; }
.track .zone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ok) 30%, transparent); border-radius: 99px; }
.track .mark { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.mark.ok { background: var(--ok); } .mark.warn { background: var(--warn); } .mark.alert { background: var(--alert); }
.track-l { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .66rem; color: var(--dim); }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; font-size: .84rem; }
.kv > div { padding: 8px 0; border-top: 1px solid var(--line); }
.kv > div:nth-child(-n+2) { border-top: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-family: var(--mono); font-weight: 600; color: var(--ink); text-align: right; }

/* ── DIAGNOSTIC ── */
.ctx { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ctx span { font-size: .72rem; font-weight: 650; padding: 5px 9px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.ctx span.ok { color: var(--ok); } .ctx span.warn { color: var(--warn); } .ctx span.alert { color: var(--alert); }
.q-card .q-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 12px; }
.q-card h2 { font-size: 1.14rem; font-weight: 750; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; }
.q-card .detail { font-size: .86rem; color: var(--muted); line-height: 1.55; margin-top: 10px; }
.q-card .detail b { color: var(--text); }
.helper { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.helper-t { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: 10px; letter-spacing: .02em; }
.helper .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.helper .grid2 > div { min-width: 0; }
.helper .inp .sign { width: 38px; }
.helper .inp input { padding: 0 6px; }
.helper .inp { height: 50px; }
.helper .inp input { font-size: 1.15rem; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.yn button { min-height: 58px; border-radius: 12px; font-weight: 750; font-size: 1rem; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.yn button.yes.sugg { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.yn button.no.sugg { border-color: var(--alert); background: var(--alert-soft); color: var(--alert); }
.yn button:active { transform: scale(.985); }

.concl-head { border-radius: var(--radius) var(--radius) 0 0; padding: 16px; color: #fff; }
.concl-head.haute { background: linear-gradient(135deg, #c42d34, #9d1f26); }
.concl-head.moyenne { background: linear-gradient(135deg, #d27a0c, #a95c00); }
.concl-head.faible { background: linear-gradient(135deg, #14916a, #0c6e50); }
.concl-head .sev { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.concl-head h2 { font-size: 1.2rem; font-weight: 800; line-height: 1.25; margin-top: 4px; letter-spacing: -.01em; color: #fff; }
.concl-body { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 4px 16px 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.concl-sec { padding-top: 14px; }
.concl-sec h4 { display: flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; font-weight: 550; padding: 5px 9px; border-radius: 8px; background: var(--surface-3); color: var(--text); line-height: 1.3; }
.tag.up { background: var(--alert-soft); color: var(--alert); }
.tag.down { background: var(--bp-soft); color: var(--bp); }
.ul { list-style: none; }
.ul li { position: relative; padding: 7px 0 7px 22px; font-size: .86rem; line-height: 1.45; border-top: 1px solid var(--line); }
.ul li:first-child { border-top: 0; }
.ul li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.ol { list-style: none; counter-reset: a; }
.ol li { counter-increment: a; position: relative; padding: 8px 0 8px 32px; font-size: .86rem; line-height: 1.45; border-top: 1px solid var(--line); }
.ol li:first-child { border-top: 0; }
.ol li::before { content: counter(a); position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); font-family: var(--mono); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }

/* ── RÉGLETTE PT ── */
.pt-big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.pt-big .ro .v { font-size: 1.6rem; }
.pt-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
.pt-table th { font-family: var(--font); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 8px 6px; border-bottom: 1px solid var(--line-strong); position: sticky; top: 0; background: var(--surface); }
.pt-table th:first-child, .pt-table td:first-child { text-align: left; }
.pt-table td { text-align: right; padding: 7px 6px; border-bottom: 1px solid var(--line); color: var(--text); }
.pt-table tr.hl td { background: var(--brand-soft); color: var(--ink); font-weight: 700; }
.pt-scroll { max-height: 360px; overflow: auto; margin: 0 -16px -16px; padding: 0 16px; }

/* ── FEUILLES (modales bas d'écran) ── */
.sheet-bg { position: fixed; inset: 0; background: rgba(5,10,20,.5); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 201; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(105%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
  padding-bottom: var(--safe-b); max-width: 640px; margin: 0 auto;
  visibility: hidden;
}
.sheet.open { transform: none; visibility: visible; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 4px; }
.sheet-h { display: flex; align-items: center; padding: 8px 16px 12px; gap: 10px; }
.sheet-h h3 { font-size: 1.05rem; font-weight: 750; color: var(--ink); }
.sheet-h .x { margin-left: auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.sheet-body { overflow: auto; padding: 0 16px 16px; }
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border-radius: 12px; background: var(--surface-3); color: var(--muted); margin-bottom: 8px; }
.search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); }
.fl-group { font-size: .68rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 14px 2px 6px; }
.fl-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 10px; border-radius: 11px; }
.fl-item:active, .fl-item.sel { background: var(--brand-soft); }
.fl-item .fid { font-family: var(--mono); font-weight: 700; font-size: 1rem; color: var(--ink); width: 94px; flex-shrink: 0; }
.fl-item .info { flex: 1; min-width: 0; font-size: .74rem; color: var(--muted); line-height: 1.35; }
.fl-item .badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 2px; }
.fl-item .ico { color: var(--brand); }
.set-row { padding: 12px 0; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-row > label { display: block; font-size: .84rem; font-weight: 650; margin-bottom: 8px; color: var(--ink); }
.set-row .help { font-size: .74rem; color: var(--muted); margin-top: 6px; }

/* ── RÉFÉRENCES / HISTORIQUE ── */
.ref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ref-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.ref-item .l { font-size: .66rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ref-item .v { font-family: var(--mono); font-weight: 700; font-size: .9rem; color: var(--ink); margin-top: 2px; }
.formula { font-family: var(--mono); font-size: .8rem; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); margin-bottom: 8px; line-height: 1.5; }
.formula small { display: block; font-family: var(--font); color: var(--muted); font-size: .74rem; margin-top: 2px; }
.ftable { width: 100%; border-collapse: collapse; font-size: .8rem; }
.ftable th { font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line-strong); }
.ftable td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ftable td.n { font-family: var(--mono); text-align: right; }
.ftable th.n { text-align: right; }
.ftable .fid { font-family: var(--mono); font-weight: 700; color: var(--ink); }

.hist-item { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.hist-item .hi { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.hist-item .t { font-weight: 700; font-size: .88rem; color: var(--ink); line-height: 1.3; }
.hist-item .m { font-size: .74rem; color: var(--muted); margin-top: 3px; }
.hist-item .vals { font-family: var(--mono); font-size: .72rem; color: var(--text); margin-top: 5px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: .9rem; }
.empty .ico { width: 40px; height: 40px; color: var(--dim); margin-bottom: 10px; }

.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; font-weight: 600; color: var(--brand); padding: 6px 2px; margin: -4px 0 6px; }

@media (min-width: 520px) {
  .hero { padding: 28px 24px 22px; }
  .hero h2 { font-size: 1.7rem; }
}
@media (max-width: 360px) {
  .status-chips { grid-template-columns: repeat(2, 1fr); }
  .inp input { font-size: 1.2rem; }
}

/* ══ ÉTAPE 2 : HYPOTHÈSES, CONTRÔLES, CONCORDANCE ══ */
.verdict .vs { margin-top: 6px; font-size: .74rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.verdict .vs .st { margin-left: 0; }

.hyps { display: flex; flex-direction: column; }
.hyp { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 2px; border-top: 1px solid var(--line); }
.hyps .hyp:first-child { border-top: 0; }
.hyp:active { background: var(--surface-2); }
.hyp-rk { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; font-family: var(--mono); font-size: .78rem; font-weight: 700; background: var(--surface-3); color: var(--muted); }
.hyp.lead .hyp-rk { background: var(--brand); color: var(--brand-ink); }
.hyp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hyp-t { font-size: .88rem; font-weight: 650; color: var(--ink); line-height: 1.3; display: flex; align-items: baseline; gap: 7px; }
.hyp.lead .hyp-t { font-size: .95rem; font-weight: 750; }
.sev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; transform: translateY(-1px); display: inline-block; }
.sev-dot.alert { background: var(--alert); } .sev-dot.warn { background: var(--warn); } .sev-dot.ok { background: var(--ok); }
.hyp-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hyp-bar span { display: block; height: 100%; border-radius: 99px; background: var(--dim); }
.hyp.lead .hyp-bar span { background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #22c1c3)); }
.hyp-pct { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; color: var(--ink); min-width: 52px; text-align: right; }
.hyp-pct small { font-size: .7rem; color: var(--muted); }
.card-h .st { font-size: .66rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }

details.more { margin-top: 4px; border-top: 1px solid var(--line); }
details.more summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 12px 2px 4px; font-size: .82rem; font-weight: 650; color: var(--brand); cursor: pointer; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary .chev { transition: transform .2s; }
details.more[open] summary .chev { transform: rotate(180deg); }

.test-card { border: 1.5px solid color-mix(in srgb, var(--brand) 40%, var(--line)); }
.tc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.tc-head h3 { font-size: 1.05rem; font-weight: 750; color: var(--ink); letter-spacing: -.01em; }
.tc-ico { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.why { font-size: .84rem; color: var(--text); line-height: 1.45; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 10px; }
details.how { margin-bottom: 12px; }
details.how summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 650; color: var(--brand); cursor: pointer; padding: 2px 0; }
details.how summary::-webkit-details-marker { display: none; }
details.how summary .chev { transition: transform .2s; }
details.how[open] summary .chev { transform: rotate(180deg); }
.how-body { font-size: .82rem; color: var(--muted); line-height: 1.55; margin-top: 8px; }
.how-body b { color: var(--text); }
.test-card .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.test-card .grid2.one { grid-template-columns: 1fr; }
.test-card .grid2 > div { min-width: 0; }
.test-card .inp .sign { width: 38px; }
.test-card .inp input { padding: 0 6px; font-size: 1.2rem; }
.test-card .btn-primary { margin-top: 12px; }
.choices { display: grid; gap: 8px; }
.choice { min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 650; font-size: .92rem; color: var(--ink); padding: 0 14px; text-align: left; }
.choice:active { border-color: var(--brand); background: var(--brand-soft); }
.btn-sm { min-height: 42px; font-size: .84rem; font-weight: 600; color: var(--muted); }

.done-list { display: grid; gap: 8px; }
.done { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ok); }
.done > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.done b { font-size: .84rem; color: var(--ink); }
.done span { font-size: .78rem; color: var(--muted); font-family: var(--mono); }
.done button { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); background: var(--surface-3); }
.other-list { display: grid; gap: 6px; }
.other { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--text); text-align: left; }
.other span { flex: 1; }
.other em { font-style: normal; font-size: .68rem; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.other .ico { color: var(--muted); }

.concl-score { margin-top: 8px; font-size: .8rem; opacity: .92; }
.concl-score span { font-family: var(--mono); font-weight: 800; font-size: 1.05rem; }
.concs { display: flex; flex-direction: column; }
.conc { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.concs .conc:first-child { border-top: 0; }
.conc .ci { width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; display: grid; place-items: center; }
.conc.ok .ci { background: var(--ok-soft); color: var(--ok); }
.conc.warn .ci { background: var(--warn-soft); color: var(--warn); }
.conc.alert .ci { background: var(--alert-soft); color: var(--alert); }
.conc.none .ci { background: var(--surface-3); color: var(--dim); }
.conc .cm { min-width: 0; }
.conc .cl { font-size: .86rem; font-weight: 650; color: var(--ink); }
.conc .cl small { font-weight: 500; color: var(--dim); font-size: .72rem; }
.conc .cv { font-size: .78rem; color: var(--muted); line-height: 1.4; margin-top: 1px; }
.btn-soft:disabled { opacity: 1; cursor: default; }
.vs .st { padding: 2px 7px; border-radius: 6px; font-size: .64rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.done span { font-family: var(--font); }

/* ══ ÉTAPE 3 : PROFIL, PARCOURS D'ARRÊT, OUTILS ══ */
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.app-btn { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 650; font-size: .86rem; color: var(--muted); text-align: left; }
.app-btn.on { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.app-btn.on .ico { color: var(--brand); }
details.prof { margin-top: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
details.prof summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; }
details.prof summary::-webkit-details-marker { display: none; }
details.prof summary .chev { margin-left: auto; flex-shrink: 0; color: var(--dim); transition: transform .2s; }
details.prof[open] summary .chev { transform: rotate(180deg); }
.prof-t { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.prof-v { font-size: .8rem; color: var(--text); line-height: 1.35; margin-top: 2px; }
.prof-body { padding: 0 14px 12px; }
.prof-row { padding-top: 10px; }
.prof-l { font-size: .74rem; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.seg.sm button { min-height: 38px; font-size: .78rem; padding: 0 6px; line-height: 1.15; }
.other.big { min-height: 58px; font-size: .92rem; }
.help-line { font-size: .74rem; color: var(--muted); line-height: 1.45; margin-top: 8px; }

/* ══ ÉTAPE 4 : FICHE D'INTERVENTION, F-GAS, APPLICATION INSTALLABLE ══ */
.net-badge { font-size: .66rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: #f2b24c; color: #1d1200; }
.net-badge[hidden] { display: none; }
.install-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 12px; padding: 14px; border-radius: var(--radius); border: 1.5px dashed color-mix(in srgb, var(--brand) 50%, var(--line)); background: var(--brand-soft); color: var(--brand); }
.install-card .qi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); flex-shrink: 0; }
.install-card .ic-t { flex: 1; display: flex; flex-direction: column; }
.install-card b { color: var(--ink); font-size: .92rem; }
.install-card .ic-t span { font-size: .76rem; color: var(--muted); line-height: 1.35; }

.form .tf, .set-row .tf { margin-bottom: 12px; }
.tf label { display: block; font-size: .8rem; font-weight: 650; color: var(--text); margin-bottom: 6px; }
.tf input, .tf textarea { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 11px; border: 1.5px solid var(--line-strong); background: var(--surface-2); font-size: 16px; color: var(--ink); outline: none; font-family: var(--font); }
.tf textarea { resize: vertical; min-height: 80px; line-height: 1.45; }
.tf input:focus, .tf textarea:focus { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form .grid2 > div { min-width: 0; }
.togs { display: flex; flex-wrap: wrap; gap: 6px; }
.tog { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); font-size: .8rem; font-weight: 600; color: var(--muted); }
.tog.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.checks { display: flex; flex-direction: column; margin-bottom: 12px; }
.chk { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: .86rem; line-height: 1.4; cursor: pointer; }
.chk:first-child { border-top: 0; }
.chk input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--brand); }
.hist-item.link { width: 100%; text-align: left; align-items: center; }
.hist-item.link > .ico { color: var(--dim); flex-shrink: 0; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 20px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 300; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: .84rem; font-weight: 600; transition: opacity .2s, transform .2s; box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Document « fiche d'intervention » */
.doc { background: #fff; color: #111; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 18px 16px; font-size: .82rem; line-height: 1.45; }
.doc .ico { stroke: currentColor; }
.doc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; border-bottom: 2px solid #0c1829; padding-bottom: 10px; margin-bottom: 12px; }
.doc-brand { display: flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #1552b8; }
.doc h1 { font-size: 1.2rem; font-weight: 800; color: #0c1829; margin-top: 2px; letter-spacing: -.01em; }
.doc-ref { text-align: right; font-family: var(--mono); font-size: .72rem; color: #444; }
.doc section { margin-bottom: 12px; break-inside: avoid; }
.doc h2 { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #1552b8; margin-bottom: 5px; }
.doc-t { width: 100%; border-collapse: collapse; }
.doc-t th, .doc-t td { text-align: left; vertical-align: top; padding: 4px 6px; border-bottom: 1px solid #e3e6eb; }
.doc-t th { width: 42%; font-weight: 600; color: #444; }
.doc-t td { color: #111; }
.conc-t th { width: auto; background: #f3f5f8; }
.conc-t tr.ok td:first-child { border-left: 3px solid #0f8a5f; }
.conc-t tr.warn td:first-child { border-left: 3px solid #b26b00; }
.conc-t tr.alert td:first-child { border-left: 3px solid #cc2f36; }
.doc-diag { font-size: .9rem; margin-bottom: 6px; }
.doc-small { font-size: .76rem; color: #333; }
.doc ul { padding-left: 18px; }
.doc li { margin: 2px 0; }
.doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.doc-sign div { height: 70px; border: 1px solid #c9cfd8; border-radius: 6px; padding: 6px 8px; }
.doc-sign span { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #666; }
.doc-f { margin-top: 12px; padding-top: 8px; border-top: 1px solid #e3e6eb; font-size: .66rem; color: #666; }

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; padding: 0 !important; }
  .app-header, .tabbar, #footer-ad, #sidebar-ad, .sheet, .sheet-bg, .toast, .no-print, .back-link { display: none !important; }
  #layout { padding: 0 !important; display: block !important; }
  main { max-width: none !important; padding: 0 !important; }
  .doc { border: 0 !important; box-shadow: none !important; padding: 0 !important; font-size: 10pt; }
}

/* Hors ligne : pas d'emplacement publicitaire vide */
body.offline #footer-ad, body.offline #sidebar-ad { display: none !important; }

/* Pour comprendre : cours et animations de technique-froid.fr */
.learn { display: flex; flex-direction: column; gap: 6px; }
.learn-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; }
.learn-item:active { background: var(--brand-soft); }
.learn-item .lt { font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; flex-shrink: 0; background: var(--brand-soft); color: var(--brand); }
.learn-item .lt.animation { background: var(--ok-soft); color: var(--ok); }
.learn-item .lti { flex: 1; min-width: 0; font-size: .85rem; font-weight: 600; line-height: 1.3; }
.learn-item .ico { color: var(--dim); flex-shrink: 0; }
@media print { .learn-item .ico { display: none; } }

/* Concordance sur 100 : repère 50 et légende */
.hyp-bar { position: relative; }
.hyp-bar .mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--surface); }
.score-legend { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .74rem; line-height: 1.45; color: var(--muted); }
.score-legend b { color: var(--text); }
.score-legend .sl-bar { position: relative; flex-shrink: 0; width: 44px; height: 6px; margin-top: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--alert-soft) 0 50%, var(--ok-soft) 50% 100%); border: 1px solid var(--line); }
.score-legend .sl-bar i { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--muted); border-radius: 1px; }
