/* =====================================================================
   MedTestBank Nursing Drug Guide (drugs.medtestbank.com)
   Clinical but warm: linen-gray paper, scrub teal, arterial red for alerts,
   a study highlighter for exam tips, and a deep stage for the 3D model.
   ===================================================================== */
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #f2f5f4;
  --surface: #ffffff;
  --surface-2: #e9efee;
  --ink: #10212a;
  --ink-2: #2b3f48;
  --muted: #566a72;
  --line: #d5dfe0;
  --line-2: #bfcdcf;
  --scrub: #0e6b67;
  --scrub-2: #0a5450;
  --scrub-soft: #d8ece9;
  --pulse: #c23a30;
  --pulse-soft: #f8e3e0;
  --ok: #157046;
  --ok-soft: #dcf1e5;
  --mark: #ffe680;
  --stage: #0f1d25;
  --stage-2: #172d38;
  --stage-3: #20404d;
  --stage-ink: #e6f0f1;
  --stage-muted: #9fb4ba;
  --f-display: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --r: 14px;
  --r-s: 9px;
  --wrap: 1220px;
  --gutter: 20px;
  --shadow: 0 1px 2px rgba(16, 33, 42, .06), 0 10px 30px -14px rgba(16, 33, 42, .25);
  --head-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--scrub); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--scrub-2); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #4fb3ad; outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; letter-spacing: -.018em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.032em; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
mark { background: linear-gradient(transparent 8%, var(--mark) 8%, var(--mark) 92%, transparent 92%); color: inherit; padding: 0 .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: .98rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--scrub); color: #fff; }
.btn-primary:hover { background: var(--scrub-2); color: #fff; }
.btn-ghost { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn-light { background: var(--stage-ink); color: var(--stage); }
.btn-light:hover { background: #fff; color: var(--stage); }
.btn-ghost-light { border-color: rgba(230, 240, 241, .35); color: var(--stage-ink); }
.btn-ghost-light:hover { border-color: var(--stage-ink); color: #fff; }
.btn-shop { background: var(--ink); color: #fff; }
.btn-shop:hover { background: #000; color: #fff; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; color: var(--scrub); font-weight: 700; cursor: pointer; text-decoration: none; font-size: .95rem; }
.link-btn:hover { color: var(--scrub-2); text-decoration: underline; }
.link-btn .ico { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: .88rem; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--line-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- bandeau MedTestBank.com ---------- */
.strip { background: #0b161c; color: #c9d8db; font-size: .86rem; line-height: 1.4; }
.strip-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 38px; padding-top: 7px; padding-bottom: 7px; }
.strip a { color: #fff; text-decoration: none; }
.strip a:hover { text-decoration: underline; color: #fff; }
.strip-cta { flex: none; font-weight: 700; color: #9fd8d3 !important; text-decoration: underline !important; text-underline-offset: .2em; }
.hero-link { color: #9fd8d3; font-weight: 700; }
.hero-link:hover { color: #fff; }
.foot-brand p a, .credit a { font-weight: 700; }

/* ---------- en-tête ---------- */
.top { position: sticky; top: 0; z-index: 40; height: var(--head-h); background: rgba(242, 245, 244, .9); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.logo-mark { width: 34px; height: 34px; }
.logo-bg { fill: var(--scrub); }
.logo-fg { fill: #f4fbfa; }
.logo-line { stroke: var(--scrub); stroke-width: 1.4; }
.brand-text { display: grid; line-height: 1.05; }
.brand-text b { font-family: var(--f-display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand-text small { font-size: .74rem; color: var(--muted); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--scrub); }
.nav .nav-shop { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; border: 1.5px solid var(--line-2); border-radius: 999px; }
.nav .nav-shop .ico { width: 18px; height: 18px; }
.nav-toggle { display: none; margin-left: auto; }
.top-dark { background: rgba(15, 29, 37, .88); border-bottom-color: rgba(255, 255, 255, .08); }
.top-dark .brand, .top-dark .nav a { color: var(--stage-ink); }
.top-dark .brand-text small { color: var(--stage-muted); }
.top-dark .nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.top-dark .nav .nav-shop { border-color: rgba(230, 240, 241, .3); }
.top-dark .logo-bg { fill: #e6f0f1; }
.top-dark .logo-fg { fill: var(--stage); }
.top-dark .logo-line { stroke: #e6f0f1; }
.top-dark .nav-toggle { background: transparent; border-color: rgba(255, 255, 255, .2); color: var(--stage-ink); }

/* ---------- accueil ---------- */
.hero { background: radial-gradient(120% 90% at 78% 35%, var(--stage-3) 0%, var(--stage-2) 38%, var(--stage) 75%); color: var(--stage-ink); margin-top: calc(var(--head-h) * -1); padding-top: var(--head-h); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: center; min-height: min(760px, calc(100vh - 10px)); padding-top: 28px; padding-bottom: 36px; }
.hero h1 { color: #fff; max-width: 13ch; }
.hero-sub { color: var(--stage-muted); font-size: 1.12rem; max-width: 52ch; }
.hero-search { position: relative; display: flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 6px 6px 16px; margin: 26px 0 16px; max-width: 560px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.hero-search .ico { color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 1rem; background: transparent; padding: 10px 0; color: var(--ink); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border-radius: 14px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 6px; z-index: 5; max-height: 320px; overflow: auto; }
.suggest a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--surface-2); }
.suggest small { color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 34px 0 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { color: var(--stage-muted); font-size: .9rem; }
.hero-stats dd { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 1.9rem; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }

.section { padding: 72px 0; }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.sys-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.sys-list > li { border-bottom: 1px solid var(--line); }
.sys-list > li > a { display: grid; grid-template-columns: 12px 1fr; grid-template-areas: "bar name" "bar tag" "bar meta"; column-gap: 16px; padding: 18px 4px; text-decoration: none; color: var(--ink); }
.sys-list > li > a::before { content: ""; grid-area: bar; border-radius: 4px; background: var(--sys); }
.sys-list > li > a:hover .sys-name { color: var(--scrub); }
.sys-name { grid-area: name; font-family: var(--f-display); font-weight: 750; font-size: 1.2rem; letter-spacing: -.015em; }
.sys-tag { grid-area: tag; color: var(--muted); font-size: .97rem; }
.sys-meta { grid-area: meta; display: flex; gap: 14px; font-size: .85rem; color: var(--ink-2); margin-top: 4px; }
.sys-list-page { grid-template-columns: 1fr; }
.sys-sub { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -6px 0 16px 32px; padding: 0; font-size: .92rem; }

.studies-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.study-row { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; }
.study-row li { scroll-snap-align: start; }
.study-row a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; border-radius: var(--r); background: var(--stage); color: var(--stage-ink); text-decoration: none; transition: transform .15s; }
.study-row a:hover { transform: translateY(-2px); color: #fff; }
.study-row b { font-family: var(--f-display); font-size: 1.1rem; letter-spacing: -.01em; }
.study-row span { color: var(--stage-muted); font-size: .92rem; }
.study-row em { margin-top: auto; font-style: normal; font-size: .85rem; color: #9fd8d3; }
.study-grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); overflow: visible; }

.how-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 40px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.how-steps li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 14px; }
.how-steps h3::before { content: counter(s) " "; color: var(--scrub); }
.how-steps p { color: var(--ink-2); }

.shop-band { padding: 56px 0; }
.shop-in { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; background: var(--scrub-soft); border-radius: 22px; padding: 34px; }
.shop-in h2 { margin-bottom: .3em; }
.shop-in p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.shop-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- pages système / structure ---------- */
.page-head { padding-top: 34px; padding-bottom: 22px; }
.page-head h1 { max-width: 20ch; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 68ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.jump a { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: .9rem; font-weight: 700; }
.jump a:hover { border-color: var(--line-2); color: var(--ink); }
.sys-page .page-head h1, .struct-page .page-head h1 { padding-left: 18px; border-left: 6px solid var(--sys); }
.sys-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px; align-items: start; padding-bottom: 72px; }
.quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.quick .chip { flex: none; }
.study-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.study-link span { display: grid; font-size: .88rem; color: var(--muted); }
.study-link b { color: var(--ink); font-size: .98rem; }
.study-link:hover { border-color: var(--line-2); }
.sys-body { min-width: 0; }
.block { padding: 6px 0 26px; }
.block + .block { border-top: 1px solid var(--line); padding-top: 26px; }
.block p, .block li { max-width: 72ch; }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 3px; background: var(--sys, var(--scrub)); }
.structs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.structs li { padding: 14px 0; border-bottom: 1px dashed var(--line-2); }
.structs li:last-child { border-bottom: 0; }
.structs h3 { margin-bottom: .25em; }
.structs h3 a { color: var(--ink); text-decoration: none; }
.structs h3 a:hover { color: var(--scrub); }
.structs p { margin-bottom: .4em; color: var(--ink-2); }
.struct-actions { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tips li { line-height: 1.75; }
.note { font-size: .9rem; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-2); font-family: var(--f-display); font-size: .88rem; font-weight: 700; color: var(--ink-2); }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 700; min-width: 140px; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.labs td.num { white-space: normal; min-width: 150px; }
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; padding: 24px; border-radius: 18px; background: var(--scrub-soft); margin: 10px 0 28px; }
.cta-card h2 { font-size: 1.3rem; margin-bottom: .25em; }
.cta-card p { margin: 0; color: var(--ink-2); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cta-dark { background: var(--stage); color: var(--stage-ink); margin-top: 28px; }
.cta-dark p { color: var(--stage-muted); }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pager a { display: grid; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 700; min-width: 45%; }
.pager small { color: var(--muted); font-weight: 400; }
.pager-next { text-align: right; margin-left: auto; }
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.related a { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: .92rem; font-weight: 700; color: var(--ink-2); }
.related h2 { font-size: 1.2rem; }
.name-cols { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 28px; font-size: .93rem; }
.name-cols li { break-inside: avoid; padding: 3px 0; }
.name-cols a { color: var(--ink-2); text-decoration: none; }
.name-cols a:hover { color: var(--scrub); text-decoration: underline; }
.name-cols .link-btn { font-weight: 400; color: var(--ink-2); text-align: left; padding: 2px 0; }
.prose-wrap { display: grid; grid-template-columns: minmax(0, 820px); padding-bottom: 72px; }
.narrow-head { padding-top: 80px; padding-bottom: 120px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- pied de page ---------- */
.foot { background: var(--stage); color: var(--stage-ink); padding: 56px 0 28px; }
.foot .brand { color: #fff; }
.foot .brand-text small { color: var(--stage-muted); }
.foot .logo-bg { fill: #e6f0f1; }
.foot .logo-fg { fill: var(--stage); }
.foot .logo-line { stroke: #e6f0f1; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-brand p { color: var(--stage-muted); max-width: 42ch; margin: 14px 0 18px; }
.foot .btn-shop { background: #e6f0f1; color: var(--stage); }
.foot-col h2 { font-size: 1rem; color: #fff; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-col a { color: var(--stage-muted); text-decoration: none; }
.foot-col a:hover { color: #fff; }
.foot-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; color: var(--stage-muted); }
.foot-legal a { color: #bfe3df; }

/* =====================================================================
   Calculateurs, exercices, examen
   ===================================================================== */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; padding-bottom: 72px; }
.page-main { min-width: 0; }
.page-side { position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 14px; }
.side-box { display: block; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.side-box h2 { font-size: 1rem; margin-bottom: .6em; }
.side-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .93rem; }
.side-box a { color: var(--ink-2); text-decoration: none; }
.side-box a:hover { color: var(--scrub); text-decoration: underline; }
.side-exam { display: grid; gap: 2px; background: var(--stage); color: var(--stage-ink); border-color: var(--stage); }
.side-exam b { color: #fff; font-family: var(--f-display); font-size: 1.05rem; }
.side-exam span { color: var(--stage-muted); font-size: .9rem; }
.side-exam:hover { background: var(--stage-2); color: #fff; }
.side-shop { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--scrub-soft); color: var(--ink); text-decoration: none; font-size: .9rem; }
.side-shop span { display: grid; color: var(--ink-2); }
.side-shop b { color: var(--ink); font-size: 1rem; }
.side-shop:hover b { color: var(--scrub); }

/* formulaire de calcul */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin: 4px 0 30px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.calc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 14px; padding: 22px; align-content: start; }
.field { display: grid; gap: 6px; align-content: start; }
.field-number, .field-time { grid-column: span 1; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 700; color: var(--ink-2); line-height: 1.3; }
.opt { font-weight: 400; color: var(--muted); font-size: .8rem; }
.field select, .field input, .input-unit input { width: 100%; min-height: 46px; padding: 0 12px; border-radius: 11px; border: 1.5px solid var(--line-2); background: #fff; font: inherit; font-size: 1.02rem; color: var(--ink); }
.field select { padding-right: 30px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23566a72' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
.field input:focus, .field select:focus, .input-unit input:focus { outline: 3px solid rgba(14, 107, 103, .25); border-color: var(--scrub); }
.input-unit { position: relative; display: flex; align-items: center; }
.input-unit .unit { position: absolute; right: 12px; color: var(--muted); font-size: .88rem; pointer-events: none; }
.input-unit input { padding-right: 76px; font-variant-numeric: tabular-nums; }
.calc-out { background: var(--stage); color: var(--stage-ink); padding: 22px; display: grid; gap: 14px; align-content: start; min-height: 100%; }
.calc-empty { margin: 0; color: var(--stage-muted); }
.calc-results { display: grid; gap: 8px; }
.result { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.result-label { color: var(--stage-muted); font-size: .9rem; }
.result-value { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.result-value small { font-size: .85em; font-weight: 400; color: var(--stage-muted); }
.result-main { display: grid; justify-content: start; gap: 2px; padding: 4px 0 14px; }
.result-main .result-value { font-family: var(--f-display); font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; color: #fff; text-align: left; line-height: 1.05; }
.result-main.tone-ok .result-value { color: #8fe0b4; font-size: 1.5rem; }
.result-main.tone-alert .result-value { color: #ffb4a8; font-size: 1.5rem; }
.calc-steps-box h3 { font-size: .95rem; color: #fff; margin-bottom: .5em; }
.calc-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .94rem; color: var(--stage-ink); }
.calc-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 210, 138, .12); color: #ffd28a; font-size: .88rem; }
.calc-reset { color: #9fd8d3; justify-self: start; }
.calc-reset:hover { color: #fff; }

/* contenus */
.formula { display: grid; gap: 6px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--scrub); margin-bottom: 1em; }
.formula p { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; }
.steps-list { padding-left: 22px; display: grid; gap: 8px; }
.example { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.example-q { margin-bottom: .6em; }
.example-steps { margin: 0 0 .6em; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); font-size: .97rem; }
.example-a { margin: 0; }
.ticks-alert li::before { background: var(--pulse); }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.faq-wide { max-width: 860px; }
.practice-link { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 22px; border-radius: 18px; background: var(--stage); color: var(--stage-ink); margin: 10px 0 26px; }
.practice-link h2 { color: #fff; font-size: 1.25rem; margin-bottom: .2em; }
.practice-link p { margin: 0; color: var(--stage-muted); }
.practice-link .btn-primary { background: #e6f0f1; color: var(--stage); }
.practice-link .btn-primary:hover { background: #fff; }
.card-grid { list-style: none; margin: 0; padding: 0 0 72px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card-grid a { display: grid; gap: 6px; height: 100%; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.card-grid a:hover { border-color: var(--scrub); }
.card-grid b { font-family: var(--f-display); font-size: 1.06rem; letter-spacing: -.01em; }
.card-grid span { color: var(--muted); font-size: .93rem; }
.section .card-grid { padding-bottom: 0; }

/* exercices statiques */
.problem-list { padding-left: 24px; display: grid; gap: 14px; }
.problem-list > li { padding: 4px 0 14px; border-bottom: 1px dashed var(--line-2); }
.problem-list > li > p { margin-bottom: .5em; }
.problem-choices { margin: 0 0 .5em; color: var(--ink-2); }
.problem-answer summary { cursor: pointer; color: var(--scrub); font-weight: 700; font-size: .93rem; }
.problem-answer ol { margin: 10px 0 6px; padding: 12px 14px 12px 32px; border-radius: 10px; background: var(--surface-2); display: grid; gap: 4px; }
.problem-answer p { margin: 0; }

/* entraîneur */
.trainer { margin: 4px 0 30px; }
.trainer-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.trainer-head h2 { margin: 0; }
.trainer-score { margin: 0; color: var(--muted); font-size: .92rem; }
.trainer-card { padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 14px; }
.trainer-topic { margin: 0; font-size: .82rem; font-weight: 700; color: var(--scrub); }
.trainer-q { margin: 0; font-size: 1.12rem; line-height: 1.55; }
.trainer-answer { display: flex; gap: 10px; flex-wrap: wrap; }
.trainer-answer .input-unit { flex: 1 1 220px; max-width: 340px; }
.trainer-answer input.is-right { border-color: var(--ok); background: var(--ok-soft); }
.trainer-answer input.is-wrong { border-color: var(--pulse); background: var(--pulse-soft); }
.trainer-choices { display: grid; gap: 8px; }
.choice { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff; font: inherit; cursor: pointer; }
.choice:hover:not([disabled]) { border-color: var(--ink-2); }
.choice.is-right { border-color: var(--ok); background: var(--ok-soft); }
.choice.is-wrong { border-color: var(--pulse); background: var(--pulse-soft); }
.choice[disabled] { cursor: default; color: var(--ink); }
.trainer-feedback { padding: 14px 16px; border-radius: 12px; }
.trainer-feedback.is-right { background: var(--ok-soft); }
.trainer-feedback.is-wrong { background: var(--pulse-soft); }
.fb-title { margin: 0 0 .4em; font-weight: 800; }
.fb-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: .96rem; }
.trainer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.topic-pick { border: 0; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topic-pick legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: .86rem; font-weight: 700; color: var(--muted); }
.chip-check input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-check input:focus-visible + span { outline: 3px solid #4fb3ad; outline-offset: 2px; }

/* examen */
.exam-wrap { padding-bottom: 72px; }
.exam { max-width: 860px; }
.exam-bar { position: sticky; top: var(--head-h); z-index: 5; display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding: 10px 0; background: var(--paper); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.exam-timer, .exam-progress { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.exam-progress { color: var(--muted); font-weight: 400; }
.exam-bar .btn { margin-left: auto; }
.exam-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: q; }
.exam-q { counter-increment: q; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; }
.exam-q.is-right { border-color: var(--ok); }
.exam-q.is-wrong { border-color: var(--pulse); }
.exam-topic { margin: 0; font-size: .8rem; font-weight: 700; color: var(--scrub); }
.exam-topic::before { content: counter(q) ". "; color: var(--ink); }
.exam-text { margin: 0; }
.exam-q .input-unit { max-width: 320px; }
.exam-choices { display: grid; gap: 6px; }
.radio { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.radio input { width: 18px; height: 18px; accent-color: var(--scrub); }
.exam-fb { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.exam-submit { margin: 18px 0; }
.exam-result { padding: 22px; border-radius: 18px; background: var(--stage); color: var(--stage-ink); margin-bottom: 18px; }
.exam-result p { color: var(--stage-muted); }
.exam-score { font-family: var(--f-display); font-size: 2.4rem; font-weight: 800; color: #fff !important; margin: 0 0 .2em; letter-spacing: -.03em; }
.exam-result .btn-primary { background: #e6f0f1; color: var(--stage); }

/* accueil */
.hero { margin-top: 0; padding-top: 0; }
.hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 0; padding-top: 56px; padding-bottom: 64px; gap: 44px; }
.hero h1 { max-width: 16ch; }
.hero-by { margin-top: 22px; color: var(--stage-muted); font-size: .95rem; }
.hero-calc { color: var(--ink); }
.hero-calc-title { margin: 0 0 10px; color: var(--stage-muted); font-weight: 700; font-size: .9rem; }
.hero-calc .calc { margin: 0; grid-template-columns: 1fr; border: 0; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.hero-calc .calc-out { background: #0b161c; }
.calc-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px 32px; }
.calc-group h3 { font-size: 1rem; color: var(--muted); margin-bottom: 10px; }
.calc-group ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.calc-group li { border-bottom: 1px solid var(--line); }
.calc-group a { display: grid; gap: 2px; padding: 12px 2px; text-decoration: none; color: var(--ink); }
.calc-group b { font-family: var(--f-display); font-weight: 700; }
.calc-group span { color: var(--muted); font-size: .9rem; }
.calc-group a:hover b { color: var(--scrub); }
.how-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tools { margin-top: 48px; }
.tools h2 { font-size: 1.2rem; }
.tools ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tools a { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tools span { color: var(--muted); font-size: .9rem; }
.foot-sub { margin-top: 18px; }
.prose-wrap { display: grid; grid-template-columns: minmax(0, 820px); padding-bottom: 72px; }


/* ---------- Drug guide ---------- */
.dsearch { position: relative; display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 999px; padding: 4px 18px; margin: 24px 0 14px; max-width: 580px; border: 1.5px solid var(--line-2); }
.hero .dsearch { border-color: transparent; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.dsearch .ico { color: var(--muted); }
.dsearch input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 1.02rem; background: transparent; padding: 12px 0; color: var(--ink); -webkit-appearance: none; appearance: none; }
.dsearch:focus-within { border-color: var(--scrub); box-shadow: 0 0 0 3px rgba(79, 179, 173, .35); }
.dsearch .suggest { border: 1px solid var(--line); }
.suggest span { font-weight: 700; }
.suggest small { text-align: right; }
.suggest-empty { padding: 10px 12px; color: var(--muted); font-size: .93rem; }
.hero-card { background: var(--surface); color: var(--ink); border-radius: 18px; padding: 22px 24px 18px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); max-width: 520px; justify-self: end; width: 100%; }
.hero-card-title { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; margin: 0 0 6px; }
.check-list { margin: 0; }
.check-list div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.check-list dt a { font-weight: 700; color: var(--ink); text-decoration: none; }
.check-list dt a:hover { color: var(--scrub); }
.check-list dd { margin: 0; color: var(--ink-2); font-size: .95rem; }
.hero-card-more { display: inline-block; margin-top: 12px; font-weight: 700; font-size: .95rem; }
.kicker { margin: 4px 0 6px; font-weight: 700; }
.kicker a { text-decoration: none; }
.drug-head h1 { margin-bottom: .3em; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin: 0 0 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts div { padding: 14px 16px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.facts dt { font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 700; }
.boxed { border: 3px solid var(--ink); background: var(--surface); margin: 0 0 30px; }
.boxed h2 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 14px; background: var(--ink); color: #fff; font-size: 1rem; letter-spacing: 0; }
.boxed h2 .ico { width: 18px; height: 18px; }
.boxed p { margin: 0; padding: 14px 16px 16px; font-weight: 700; max-width: 72ch; }
.block-alert h2 { color: var(--pulse); }
.src-note { padding: 14px 16px; background: var(--surface-2); border-radius: var(--r-s); margin: 4px 0 30px; }
.drug-links { list-style: none; margin: 0 0 1em; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.drug-links a { display: grid; gap: 1px; height: 100%; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.drug-links a:hover { border-color: var(--scrub); }
.drug-links b { font-family: var(--f-display); font-weight: 700; }
.drug-links span { color: var(--ink-2); font-size: .88rem; }
.drug-links em { font-style: normal; color: var(--muted); font-size: .84rem; }
.drug-links-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.page-head .dsearch { margin-bottom: 0; }
.az { padding-bottom: 20px; }
.az-letter { padding-top: 22px; }
.az-letter h2 { font-size: 1.5rem; margin-bottom: 10px; color: var(--scrub); }
.az-note { padding-bottom: 72px; max-width: 72ch; }
.cls-group { padding-top: 34px; }
.cls-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 12px; }
.cls-group-head h2 { margin: 0; }
.cls-group .card-grid { padding-bottom: 0; }
.cls-group:last-child { padding-bottom: 72px; }
.stem { font-style: normal; font-weight: 700; color: var(--scrub-2); font-size: .88rem; }
.plain-links a { padding: 10px 2px; font-weight: 700; }
.sys-groups { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.sys-groups h3 a { color: var(--muted); text-decoration: none; }
.sys-groups h3 a:hover { color: var(--scrub); }
.quiz-band { padding-bottom: 0; }
.quiz-band .shop-in { background: var(--stage); color: var(--stage-ink); }
.quiz-band .shop-in h2 { color: #fff; }
.quiz-band .shop-in p { color: var(--stage-muted); }
.quiz-band .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
.quiz-band .btn-ghost:hover { border-color: #fff; color: #fff; }
/* quiz */
.dq { margin: 8px 0 34px; padding: 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.dq-head h2 { margin-bottom: .3em; }
.dq-head p { color: var(--ink-2); margin-bottom: .4em; }
.dq-score { font-weight: 700; color: var(--scrub-2) !important; }
.dq-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; counter-reset: q; }
.dq-item { counter-increment: q; padding: 20px 0; border-top: 1px solid var(--line); }
.dq-cls { margin: 0 0 4px; font-size: .86rem; font-weight: 700; }
.dq-cls a { text-decoration: none; }
.dq-q { font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; max-width: 70ch; }
.dq-q::before { content: counter(q) ". "; color: var(--muted); }
.dq-choices { display: grid; gap: 8px; max-width: 70ch; }
.dq-choices .choice { display: flex; gap: 12px; align-items: flex-start; }
.dq-choices .choice b { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); font-size: .85rem; }
.dq-choices .choice.is-right b { background: var(--ok); color: #fff; }
.dq-choices .choice.is-wrong b { background: var(--pulse); color: #fff; }
.dq-why { margin-top: 10px; max-width: 70ch; }
.dq-why summary { cursor: pointer; font-weight: 700; color: var(--scrub); font-size: .95rem; }
.dq-item.is-right .dq-why summary { color: var(--ok); }
.dq-item.is-wrong .dq-why summary { color: var(--pulse); }
.dq-why p { margin: 8px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.dq-why p b { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .page-grid { grid-template-columns: 1fr; }
  .page-side { position: static; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .calc { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .nav { position: fixed; inset: var(--head-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px var(--gutter) 20px; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1.05rem; }
  .nav .nav-shop { margin: 8px 0 0; justify-content: center; }
  .nav-toggle { display: inline-grid; }
  .hero-in { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 40px; gap: 28px; }
  .how-in { grid-template-columns: 1fr; gap: 10px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .hero-card { justify-self: stretch; max-width: none; }
}
@media (max-width: 680px) {
  :root { --gutter: 16px; --head-h: 58px; }
  .strip-cta { display: none; }
  .strip { font-size: .8rem; }
  body { font-size: 1rem; }
  .section { padding: 52px 0; }
  .how-steps { grid-template-columns: 1fr; }
  .shop-in { padding: 24px; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .btn { white-space: normal; text-align: center; }
  .brand-text small { display: none; }
  .calc-fields { grid-template-columns: 1fr 1fr; padding: 16px; gap: 12px 10px; }
  .calc-out { padding: 18px 16px; }
  .trainer-card { padding: 16px; }
  .trainer-answer .btn { flex: 1 1 100%; }
  .practice-link { padding: 18px; }
  .exam-bar .btn { margin-left: 0; }
  .calc-groups { grid-template-columns: 1fr; }
  .table-wrap table { font-size: .9rem; }
  th, td { padding: 10px; }
  .dq { padding: 18px 16px; }
  .check-list div { grid-template-columns: 1fr; gap: 2px; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) { .calc-fields { grid-template-columns: 1fr; } }

/* ---------- impression de la fiche ---------- */
@media print {
  .strip, .top, .foot, .no-print, .skip, .page-side, .crumbs { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .page-grid { display: block; }
  .page-head { padding: 0 0 8px; }
  .page-head h1 { font-size: 22pt; }
  .block { padding: 4px 0 10px; break-inside: avoid; }
  .block + .block { padding-top: 10px; }
  .facts, .boxed { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
