/* ─────────────────────────────────────────────
   Skip link
───────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--solid-bg); color: var(--solid-fg);
  padding: 8px 16px; z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ─────────────────────────────────────────────
   Site Header
───────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.site-header__inner {
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header__start {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.site-header__end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.site-logo__mark {
  width: 1.75rem; height: 1.75rem;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 5px;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.site-logo:hover .site-logo__mark {
  transform: rotate(-8deg) scale(1.08);
}
.site-logo__dot {
  width: 0.75rem; height: 0.75rem;
  background: var(--mint);
  border-radius: 2px;
  animation: logo-dot-pulse 2.4s ease-in-out infinite;
}
.site-logo:hover .site-logo__dot {
  background: var(--teal-bright);
}
@keyframes logo-dot-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(.62); opacity: .55; }
}
.site-logo__name {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.site-logo__pro {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-left: 0.3rem;
  vertical-align: 0.15em;       /* léger exposant, tag discret */
  /* Dégradé teal → mint → teal qui glisse doucement sur le texte */
  background: linear-gradient(100deg, var(--teal) 0%, var(--mint) 50%, var(--teal) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  animation: logo-new-sheen 3.2s linear infinite;
}
@keyframes logo-new-sheen {
  0%   { background-position: 0% 0; }
  100% { background-position: 220% 0; }
}
/* Accessibilité : pas d'animation si l'utilisateur la refuse */
@media (prefers-reduced-motion: reduce) {
  .site-logo__mark,
  .site-logo__dot { animation: none; transition: none; }
  .site-logo__pro {
    animation: none;
    background: none;
    -webkit-text-fill-color: var(--teal);
            color: var(--teal-text);
  }
}

/* Nav principale */
.site-nav {
  display: none;
}
@media (min-width: 768px) {
  .site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--ink-soft);
  }
  .site-nav a:hover { color: var(--ink); }
}

/* Search hint */
.search-hint {
  display: none;
}
@media (min-width: 768px) {
  .search-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--rule);
    background: var(--surface-alt);
    font-size: 0.75rem;
    color: var(--ink-soft);
  }
  .search-hint__key {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--ink-faint);
  }
}

/* Boutons d'action mobile (recherche + menu) */
.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--rule);
  background: var(--surface-alt);
  color: var(--ink-soft);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-icon-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
.nav-icon-btn svg { width: 1.15rem; height: 1.15rem; }
@media (min-width: 768px) {
  .nav-icon-btn { display: none; }   /* desktop : nav + ⌘K suffisent */
}
@media (max-width: 767px) {
  .site-status { display: none; }    /* « EN LIGNE » masqué pour désencombrer */
}

/* Bascule de thème clair / sombre (visible desktop + mobile) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border: 1px solid var(--rule); background: var(--surface-alt);
  color: var(--ink-soft); border-radius: 6px; cursor: pointer; flex-shrink: 0;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-faint); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }
.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: inline-block; }

/* En sombre : garder le carré du logo distinct pour que le point mint ressorte */
[data-theme="dark"] .site-logo__mark { background: var(--surface-alt); }

/* En sombre : retinter les états d'erreur/warning des champs (sinon boîtes claires criardes) */
[data-theme="dark"] .mms-input.is-error,
[data-theme="dark"] .field-wrap.is-error { background: rgba(239, 68, 68, 0.12); }
[data-theme="dark"] .field-wrap.is-warn  { background: rgba(245, 158, 11, 0.12); }
[data-theme="dark"] .field-wrap.filled   { border-color: var(--rule); }

/* Menu mobile déroulant */
.mobile-menu {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.18);
}
.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  padding-block: 0.5rem;
}
.mobile-menu a {
  padding: 0.875rem 0.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-soft);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover,
.mobile-menu a:active { color: var(--teal-text); }
@media (min-width: 768px) {
  .mobile-menu { display: none !important; }   /* jamais sur desktop */
}

/* ─────────────────────────────────────────────
   Fil d'Ariane (Breadcrumb)
───────────────────────────────────────────── */
.breadcrumb {
  border-bottom: 1px solid var(--rule);
  background: var(--surface-alt);
}
.breadcrumb__inner { padding-block: 0.5rem; }
.breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}
.breadcrumb__link {
  color: var(--ink-faint);
  transition: color 0.15s;
}
.breadcrumb__link:hover { color: var(--teal-text); }
.breadcrumb__sep  { color: var(--rule); }
.breadcrumb__current { color: var(--ink-soft); font-weight: 500; }
.breadcrumb__item { display: inline-flex; align-items: center; gap: 0.25rem; }

/* Grille de sélection de formule (2×2) */
.formula-seg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

/* ─────────────────────────────────────────────
   Saisie par domaine (MMSE, etc.)
───────────────────────────────────────────── */
.mms-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.mms-item:last-child { border-bottom: none; }
.mms-item__head {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}
.mms-item__control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.mms-input {
  width: 3.25rem;
  text-align: center;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--surface);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mms-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-bg);
}
.mms-input.is-error {
  border-color: var(--stage-5);
  background: #FEF2F2;
}
.mms-input::-webkit-outer-spin-button,
.mms-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mms-input[type=number] { -moz-appearance: textfield; }
.mms-item__max {
  font-size: 0.75rem;
  color: var(--ink-faint);
  width: 1.75rem;
}

/* ─────────────────────────────────────────────
   Score à items (Glasgow, etc.)
───────────────────────────────────────────── */
.score-item {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.score-item:last-child { margin-bottom: 0; }
.score-item__legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.625rem;
}
.score-item__max { color: var(--ink-faint); font-size: 0.75rem; }
.score-options {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.score-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.score-option:hover { border-color: var(--ink-faint); }
.score-option__val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  background: var(--surface-alt);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.score-option__txt {
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.3;
}
.score-option.active {
  border-color: var(--teal);
  background: var(--teal-bg);
}
.score-option.active .score-option__val {
  background: var(--teal);
  color: #fff;
}
.score-option:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

/* ─────────────────────────────────────────────
   Status Bar (EHR-style)
───────────────────────────────────────────── */
.status-bar {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.status-bar__inner {
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.status-bar__meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.status-bar__label { color: var(--ink-soft); }

/* ─────────────────────────────────────────────
   Smallcaps label
───────────────────────────────────────────── */
.smallcaps {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   Dot grid background
───────────────────────────────────────────── */
.dot-grid {
  background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -12px -12px;
}

/* ─────────────────────────────────────────────
   Calculator Hero
───────────────────────────────────────────── */
.calc-hero {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}
.calc-hero__title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.calc-hero__subtitle {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  color: var(--ink-soft);
}
.calc-hero__ref {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 1.25rem;
}

/* ─────────────────────────────────────────────
   Presets section
───────────────────────────────────────────── */
.calc-presets {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}
.calc-presets__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.calc-presets__hint {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* Preset cards */
.preset {
  cursor: pointer;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.preset:hover {
  border-color: var(--teal);
  background: var(--teal-bg);
  transform: translateY(-1px);
}
.preset__desc {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}
.preset__creat {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ─────────────────────────────────────────────
   Calculator Workspace
───────────────────────────────────────────── */
.calc-workspace {
  padding-bottom: 4rem;
}
.calc-workspace .grid-12 {
  align-items: start;
}
/* Moniteur de résultat sticky (sous le header + le sommaire sticky) */
@media (min-width: 1024px) {
  .calc-workspace .col-5 {
    position: sticky;
    top: 7rem;
  }
}

/* ─────────────────────────────────────────────
   Sommaire sticky (table des matières d'ancres)
───────────────────────────────────────────── */
.calc-toc {
  position: sticky;
  top: 3.5rem; /* sous le header sticky */
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.calc-toc__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 2.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.calc-toc__inner::-webkit-scrollbar { display: none; }
.calc-toc__label {
  color: var(--ink-faint);
  flex-shrink: 0;
}
.calc-toc__inner a {
  position: relative;
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  padding: 0.25rem 0;
  white-space: nowrap;
  transition: color 0.15s;
}
.calc-toc__inner a:hover { color: var(--ink); }
.calc-toc__inner a.active { color: var(--teal-text); font-weight: 600; }
.calc-toc__inner a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -0.5rem;
  height: 2px;
  background: var(--teal);
}
/* Décalage d'ancrage : éviter que les titres passent sous les barres sticky */
[id="calculator"], [id="methode"], [id="indications"], [id="interpretation"], [id="conduite"], [id="faq"], [id="apropos"], [id="related"] {
  scroll-margin-top: 7rem;
}

/* ─────────────────────────────────────────────
   Sections « Indications » et « À propos »
───────────────────────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.indications-section,
.about-section {
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.indications-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 62rem;
}
@media (min-width: 768px) {
  .indications-grid { grid-template-columns: 1fr 1fr; }
}
.indication-col {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
}
.indication-col--use   { border-left: 3px solid var(--teal); }
.indication-col--avoid { border-left: 3px solid var(--stage-5); }
.indication-col__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.875rem;
}
.indication-col--use   .indication-col__head { color: var(--teal-text); }
.indication-col--avoid .indication-col__head { color: var(--stage-5); }
.indication-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.indication-list li {
  display: flex;
  gap: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.indication-list li::before {
  content: "✓";
  flex-shrink: 0;
  font-weight: 700;
  color: var(--teal);
}
.indication-col--avoid .indication-list li::before {
  content: "✗";
  color: var(--stage-5);
}
.about-inner { max-width: 52rem; }
.about-body {
  color: var(--ink-soft);
  line-height: 1.75;
}

/* ─────────────────────────────────────────────
   Params panel (formulaire)
───────────────────────────────────────────── */
.params-panel {
  border: 1px solid var(--rule);
  background: var(--surface);
}
.params-panel__header {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.params-panel__count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-faint);
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 0.125rem 0.375rem;
}
.params-panel__body {
  padding: 1.5rem;
}
.params-panel__footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--rule);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.params-panel__live {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-faint);
}
.params-reset {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.params-reset:hover { color: var(--ink); text-decoration: underline; }

/* Champs de saisie */
.field-wrap {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 0.875rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-wrap:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-bg);
}
.field-wrap.filled { border-color: #CBD5E1; }
.field-wrap.is-warn {
  border-color: var(--warn-border);
  background: #FFFBEB;
}
.field-wrap.is-error {
  border-color: var(--stage-5);
  background: #FEF2F2;
}
.field-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  width: 100%;
  letter-spacing: -0.01em;
}
.field-input::placeholder { color: #CBD5E1; }
.field-input::-webkit-outer-spin-button,
.field-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field-input[type=number] { -moz-appearance: textfield; }
.field-unit {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.field-unit > .unit-toggle { flex: none; }
.field-unit__ref {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

/* Hints de validation */
.hint {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
  display: flex;
  gap: 0.5rem;
  border-left: 2px solid;
}
.hint--warn  { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }
.hint--error { background: #FEF2F2; border-color: var(--stage-5); color: #991B1B; }
.hint--info  { background: var(--teal-bg); border-color: var(--teal); color: var(--teal-text); }

/* Tooltip d'aide contextuelle (survol + focus, sans JS) */
.tooltip {
  position: relative;
  display: inline-flex;
}
.tooltip__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  cursor: help;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.tooltip__trigger:hover,
.tooltip__trigger:focus-visible {
  color: var(--teal-text);
  background: var(--teal-bg);
  outline: none;
}
.tooltip__bubble {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  z-index: 40;
  width: max-content;
  max-width: 16rem;
  padding: 0.625rem 0.75rem;
  background: var(--monitor-bg);
  color: var(--monitor-text);
  font-size: 0.75rem;
  line-height: 1.5;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.25rem);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  pointer-events: none;
}
.tooltip__bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 0.5rem;
  border: 5px solid transparent;
  border-top-color: var(--monitor-bg);
}
.tooltip:hover .tooltip__bubble,
.tooltip:focus-within .tooltip__bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Boutons segmentés (sexe) */
.seg {
  cursor: pointer;
  padding: 0.625rem 1rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.seg:hover { border-color: var(--teal); color: var(--teal-text); }
.seg.active { background: var(--solid-bg); color: var(--solid-fg); border-color: var(--solid-bg); }

/* Sélecteur d'unité au niveau du champ — contrôle segmenté unifié */
.unit-toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 0.375rem;
  overflow: hidden;
  background: var(--surface);
}
.unit-toggle__opt {
  cursor: pointer;
  padding: 0.15rem 0.55rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--ink-faint);
  transition: color 0.15s, background 0.15s;
  user-select: none;
}
.unit-toggle__opt + .unit-toggle__opt { border-left: 1px solid var(--rule); }
.unit-toggle__opt:hover { color: var(--ink-soft); }
.unit-toggle__opt.active {
  color: var(--teal-text);
  background: var(--teal-bg);
  font-weight: 600;
}

/* ─────────────────────────────────────────────
   Monitor panel (panneau résultat)
───────────────────────────────────────────── */
.monitor {
  background: var(--monitor-bg);
  color: var(--monitor-text);
  border: 1px solid var(--monitor-surface);
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}
.monitor__header {
  padding: 0.625rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: var(--monitor-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.monitor__live {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  color: var(--mint);
  letter-spacing: 0.1em;
}
.monitor__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.monitor__body { padding: 1.75rem; }
.monitor__footer {
  padding: 0.5rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  color: var(--monitor-faint);
}

/* Empty state */
.monitor__empty {
  padding-block: 3rem;
  text-align: center;
}

/* Readout (grand chiffre) */
.monitor-readout {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(4rem, 11vw, 7rem);
  font-weight: 300;
  line-height: 1;
  color: var(--mint);
  letter-spacing: -0.04em;
  text-shadow: 0 0 24px rgba(52, 211, 153, 0.2);
}

/* Barre de stades */
.stage-bar {
  display: flex;
  gap: 0.25rem;
}
.stage-bar__seg {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
.stage-bar__seg.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--seg-color, var(--mint));
  box-shadow: 0 0 12px var(--seg-color, var(--mint));
}
.stage-bar__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  color: var(--monitor-faint);
}
.stage-bar__roman {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  color: var(--monitor-faint);
  opacity: 0.7;
}

/* Interprétation */
.monitor__interp {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Détail calcul */
.monitor__detail-toggle {
  cursor: pointer;
  list-style: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--monitor-faint);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.monitor__detail-toggle::-webkit-details-marker { display: none; }

.calc-detail {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8125rem;
  color: var(--monitor-text);
  padding: 0.75rem 1rem;
  line-height: 1.8;
  margin-top: 0.75rem;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Warning contextuel */
.monitor__warning {
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border-left: 2px solid var(--warn-border);
  color: #FCD34D;
}
.monitor__warning strong {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
}

/* ─────────────────────────────────────────────
   Badge (stade)
───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid currentColor;
}

/* ─────────────────────────────────────────────
   Icon buttons
───────────────────────────────────────────── */
.icon-btn {
  width: 2rem; height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.icon-btn:hover { border-color: var(--teal); color: var(--teal-text); }
.icon-btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.icon-btn--dark {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--monitor-text);
}
.icon-btn--dark:hover {
  border-color: var(--mint);
  color: var(--mint);
  background: rgba(52, 211, 153, 0.08);
}

/* ─────────────────────────────────────────────
   Section formule
───────────────────────────────────────────── */
.formula-section {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding-block: 3.5rem;
}
.formula-section__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .formula-section__inner { grid-template-columns: 1fr 2fr; }
}
.formula-box {
  border: 1px solid var(--rule);
  background: var(--surface-alt);
  padding: 2rem;
}
.formula-fraction {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  padding-block: 1rem;
}
.formula-fraction__equals {
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
.formula-fraction__num {
  display: inline-block;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  padding-bottom: 0.75rem;
  padding-inline: 1rem;
  border-bottom: 2px solid var(--ink);
  letter-spacing: -0.01em;
}
.formula-fraction__den {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  padding-top: 0.75rem;
  padding-inline: 1rem;
  letter-spacing: -0.01em;
}
.formula-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  font-size: 0.875rem;
}
@media (max-width: 639px) {
  .formula-cards { grid-template-columns: 1fr; }
}
.formula-card {
  padding: 0.75rem;
  background: var(--surface);
}
.formula-card--k    { border-left: 3px solid var(--teal); }
.formula-card--mgdl { border-left: 3px solid var(--stage-4); }
.formula-card--conv { border-left: 3px solid var(--stage-5); }

/* ─────────────────────────────────────────────
   Footer
───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
}
.site-footer__inner {
  padding-block: 2.5rem;
}
.site-footer__refs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .site-footer__refs { grid-template-columns: 7fr 5fr; }
}
.site-footer__ref-item {
  display: flex;
  gap: 0.75rem;
}
.site-footer__ref-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  padding-top: 0.125rem;
  color: var(--teal-text);
  flex-shrink: 0;
}
.site-footer__legal {
  font-size: 0.75rem;
  line-height: 1.625;
  color: var(--ink-faint);
}
.site-footer__meta {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-faint);
}
@media (min-width: 768px) {
  .site-footer__meta {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ─────────────────────────────────────────────
   Toast
───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--solid-bg);
  color: var(--solid-fg);
  padding: 0.75rem 1.25rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 3px solid var(--mint);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─────────────────────────────────────────────
   Animations
───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes numFlip {
  from { opacity: 0.5; transform: translateY(3px); }
  to   { opacity: 1;   transform: translateY(0); }
}

.reveal   { animation: fadeUp 0.5s ease forwards; }
.reveal-1 { animation-delay: 0.05s; opacity: 0; }
.reveal-2 { animation-delay: 0.15s; opacity: 0; }
.reveal-3 { animation-delay: 0.25s; opacity: 0; }
.pulse    { animation: pulse 2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-1, .reveal-2, .reveal-3 { opacity: 1; }
}

/* ─────────────────────────────────────────────
   Print
───────────────────────────────────────────── */
@media print {
  /* ── Fiche patient : ne garder que l'en-tête, les paramètres et le résultat ── */
  .site-header, .site-footer, .breadcrumb, .status-bar, .calc-toc,
  .calc-presets, .formula-section, .why-use-section, .pitfalls-section,
  .evidence-section, .stages-section, .next-steps-section, .faq-section,
  .related-section, .eeat-section, .search-modal, .no-print,
  .monitor__actions, .params-panel__footer { display: none !important; }

  body { background: #fff !important; }

  /* En-tête compact : on ne garde que le titre */
  .calc-hero { padding: 0 0 .5rem !important; background: #fff !important; background-image: none !important; }
  .calc-hero .badge, .calc-hero__subtitle, .calc-hero__ref,
  .calc-hero .smallcaps { display: none !important; }
  .calc-hero__title { font-size: 1.6rem !important; color: #000 !important; }

  /* Flux unique, pleine largeur */
  .calc-workspace { padding: .5rem 0 !important; }
  .calc-workspace .grid-12 { display: block !important; }
  .calc-workspace .col-7, .calc-workspace .col-5 {
    width: 100% !important; max-width: 100% !important; margin: 0 0 .75rem !important;
  }
  .params-panel { border: 1px solid #000 !important; box-shadow: none !important; }
  .params-panel__header { background: #f2f2f2 !important; }

  .monitor {
    background: #fff !important; color: #000 !important;
    border: 2px solid #000 !important; background-image: none !important;
  }
  .monitor__header, .monitor__live { color: #000 !important; }
  .monitor__header .icon-dot, .monitor .pulse { display: none !important; }
  .monitor-readout { color: #000 !important; text-shadow: none !important; }
  .monitor__faint, .monitor__footer { color: #444 !important; }
  .monitor__interp p { color: #000 !important; }
  .stage-bar__seg:not(.active) { opacity: .35 !important; }

  section, .monitor, .params-panel { break-inside: avoid; }

  /* Disclaimer + provenance en pied d'impression */
  main::after {
    content: "Outil d'aide à la décision destiné aux professionnels de santé — ne se substitue pas au jugement clinique. · medicalcul.com";
    display: block; margin: 1rem 0 0; padding-top: .5rem;
    border-top: 1px solid #999; font-size: .7rem; color: #555;
  }
  @page { margin: 1.5cm; }
}

/* ─────────────────────────────────────────────
   Pourquoi utiliser
───────────────────────────────────────────── */
.why-use-section {
  background: var(--teal-bg);
  border-top: 1px solid rgba(13, 148, 136, 0.15);
  border-bottom: 1px solid rgba(13, 148, 136, 0.15);
  padding-block: 2.5rem;
}
.why-use-inner {
  max-width: 52rem;
}
.why-use-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.why-use-icon {
  color: var(--teal-text);
  flex-shrink: 0;
  display: flex;
}
.why-use-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.why-use-body {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-soft);
  border-left: 3px solid var(--teal);
  padding-left: 1.25rem;
}

/* ─────────────────────────────────────────────
   Limites & Pièges
───────────────────────────────────────────── */
.pitfalls-section {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding-block: 3rem;
}
.pitfalls-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.pitfalls-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  color: var(--ink-faint);
  background: var(--surface-alt);
  border: 1px solid var(--rule);
  padding: 0.125rem 0.5rem;
}
.pitfalls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 1023px) { .pitfalls-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px)  { .pitfalls-grid { grid-template-columns: 1fr; } }

.pitfall-card {
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
  border-left-width: 3px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pitfall-card--warn  { border-left-color: var(--warn-border); }
.pitfall-card--error { border-left-color: var(--stage-5); }
.pitfall-card--info  { border-left-color: var(--teal); }

.pitfall-card__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.pitfall-card--warn  .pitfall-card__label { color: var(--warn-text); }
.pitfall-card--error .pitfall-card__label { color: var(--stage-5); }
.pitfall-card--info  .pitfall-card__label { color: var(--teal-text); }

.pitfall-card__text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ─────────────────────────────────────────────
   Référence & Evidence
───────────────────────────────────────────── */
.evidence-section {
  background: var(--ink);
  color: var(--monitor-text);
  padding-block: 3rem;
}
.evidence-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 767px) {
  .evidence-inner { grid-template-columns: 1fr; gap: 2rem; }
}
.evidence-citation {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--monitor-text);
  margin-bottom: 1rem;
}
.evidence-note {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--monitor-faint);
  border-left: 2px solid rgba(255,255,255,0.1);
  padding-left: 1rem;
}
.evidence-badge {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.05);
  white-space: nowrap;
}
.evidence-badge__level {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mint);
  letter-spacing: 0.05em;
}
.evidence-badge__sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  color: var(--monitor-faint);
}
.evidence-links { margin-top: 1rem; }
.evidence-link-placeholder {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  color: var(--monitor-faint);
  border: 1px dashed rgba(255,255,255,0.15);
  padding: 0.375rem 0.75rem;
  display: inline-block;
}

/* ─────────────────────────────────────────────
   Header sticky
───────────────────────────────────────────── */
.site-header--sticky {
  position: sticky;
  top: 0;
  z-index: 30;
}
.site-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ─────────────────────────────────────────────
   Hero section
───────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, var(--monitor-bg) 0%, #0F172A 100%);
  color: var(--monitor-text);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: 0; right: -20%;
  width: 60%; height: 100%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 5rem;
}
@media (min-width: 1024px) { .hero-content { padding-block: 7rem; } }
.hero-body { max-width: 48rem; }

.ecg-line {
  position: absolute;
  bottom: 30%;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--mint) 20%,
    var(--mint) 80%,
    transparent 100%);
  opacity: 0.3;
}
@keyframes ecgPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.6; }
}
.ecg-pulse { animation: ecgPulse 3s ease-in-out infinite; }

.hero-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.hero-badge__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.06);
  color: var(--mint);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero-sub {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--monitor-text);
  opacity: 0.85;
  max-width: 38rem;
}

/* Search hero */
.hero-search-wrap { margin-top: 2.5rem; }
.search-hero {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--monitor-surface);
  border: 1px solid rgba(255,255,255,0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-hero:focus-within {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}
.search-hero input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--monitor-text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.125rem;
  width: 100%;
}
.search-hero input::placeholder { color: var(--monitor-faint); }
.hero-kbd {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
@media (min-width: 768px) { .hero-kbd { display: flex; } }
.kbd {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  color: var(--monitor-text);
}
.hero-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--monitor-faint);
}
.hero-suggestion {
  padding: 0.25rem 0.625rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: var(--monitor-text);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s;
  text-decoration: none;
}
.hero-suggestion:hover { border-color: var(--mint); color: var(--mint); }

/* Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  max-width: 32rem;
}
.stat-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--mint);
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}

/* ─────────────────────────────────────────────
   Sections home communes
───────────────────────────────────────────── */
.home-section { padding-block: 5rem; }
.home-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
  gap: 1rem;
}
.home-section__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.home-section__sub {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  max-width: 36rem;
}
.home-section__more {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--teal-text);
  white-space: nowrap;
  flex-shrink: 0;
  display: none;
}
@media (min-width: 768px) { .home-section__more { display: inline-flex; align-items: center; gap: 0.5rem; } }

/* ─────────────────────────────────────────────
   Specialty cards
───────────────────────────────────────────── */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) { .spec-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .spec-grid { grid-template-columns: repeat(4, 1fr); } }

.spec-card {
  display: block;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.spec-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent-color, var(--teal));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.spec-card:hover {
  border-color: var(--accent-color, var(--teal));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.spec-card:hover::before { transform: scaleY(1); }

.spec-icon {
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-color, var(--teal));
  background: var(--accent-bg, var(--teal-bg));
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.spec-card__name {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.spec-card__desc {
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: 0.25rem;
}
.spec-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}
.spec-card__arrow {
  font-size: 0.875rem;
  color: var(--ink-faint);
  transition: color 0.15s, transform 0.15s;
}
.spec-card:hover .spec-card__arrow {
  color: var(--accent-color, var(--teal));
  transform: translateX(3px);
}

/* ─────────────────────────────────────────────
   Score cards (grille populaires)
───────────────────────────────────────────── */
.score-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px)  { .score-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .score-grid { grid-template-columns: repeat(3, 1fr); } }

.score-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.score-card:hover {
  border-color: var(--teal);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-3px);
}
.score-card--soon { opacity: 0.7; cursor: default; }
.score-card--soon:hover { transform: none; box-shadow: none; border-color: var(--rule); }
.score-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.score-card__arrow {
  color: var(--ink-faint);
  transition: transform 0.2s, color 0.2s;
}
.score-card:hover .score-card__arrow {
  transform: translateX(4px);
  color: var(--teal-text);
}
.score-card__name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}
.score-card__sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-bottom: 0.75rem;
}
.score-card__desc {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.5;
  flex: 1;
}
.score-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-soft);
}
.score-card__soon-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.125rem 0.5rem;
  background: var(--surface-alt);
  color: var(--ink-faint);
  border: 1px solid var(--rule);
}

/* Tag spécialité */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-alt);
  color: var(--ink-soft);
  border: 1px solid var(--rule);
}

/* Dots de stade */
.dot-row { display: flex; gap: 3px; }
.dot {
  width: 6px; height: 6px;
  background: var(--rule);
}
.dot--on { background: currentColor; }

/* ─────────────────────────────────────────────
   Notre approche (callouts)
───────────────────────────────────────────── */
.approach-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 1024px) {
  .approach-grid { grid-template-columns: 5fr 7fr; align-items: start; }
}
.callout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (max-width: 479px) { .callout-grid { grid-template-columns: 1fr; } }
.callout-card {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.callout-num {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.callout-card__text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ─────────────────────────────────────────────
   Avertissement médical
───────────────────────────────────────────── */
.disclaimer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .disclaimer-grid { grid-template-columns: 7fr 5fr; }
}
.disclaimer-note {
  border-left: 2px solid var(--teal);
  padding-left: 1.25rem;
}

/* ─────────────────────────────────────────────
   Footer colonnes
───────────────────────────────────────────── */
.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 768px)  {
  .site-footer__cols { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .site-footer__cols { grid-template-columns: 4fr 2fr 2fr 2fr 2fr; }
}
.site-footer__brand {}
.site-footer__tagline {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  max-width: 22rem;
}
.site-footer__nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.site-footer__nav-list a:hover { color: var(--ink); }

/* ─────────────────────────────────────────────
   Specialty Hero
───────────────────────────────────────────── */
.specialty-hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--sp-bg) 60%, white) 0%,
    white 60%
  );
}
.specialty-hero__body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.5rem;
}
@media (max-width: 640px) {
  .specialty-hero__body {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .specialty-hero__meta {
    grid-column: 1 / -1;
  }
}
.specialty-hero__icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background: var(--sp-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sp-color);
  border: 1px solid color-mix(in srgb, var(--sp-color) 20%, transparent);
  flex-shrink: 0;
}
.specialty-hero__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.specialty-hero__desc {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  max-width: 48rem;
  line-height: 1.6;
}
.specialty-hero__meta {
  text-align: right;
}
.specialty-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

/* Specialty empty state */
.specialty-empty {
  padding: 4rem 0;
  text-align: center;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal-text);
}

/* ─────────────────────────────────────────────
   Conduite à tenir (next steps)
───────────────────────────────────────────── */
.next-steps-section {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
  background: var(--teal-bg);
}
.next-steps-inner { max-width: 52rem; }
.next-steps-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}
.next-steps-icon {
  display: inline-flex;
  color: var(--teal-text);
}
.next-steps-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.next-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.next-steps-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}
.next-steps-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.next-steps-text {
  color: var(--ink);
  line-height: 1.55;
  font-size: 0.9375rem;
  padding-top: 0.1rem;
}

/* ─────────────────────────────────────────────
   Calculateurs liés (maillage interne)
───────────────────────────────────────────── */
.related-section {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}
/* La grille et les cartes réutilisent .score-grid / .score-card (style partagé). */

/* ─────────────────────────────────────────────
   Tableau d'interprétation (stades) — crawlable
───────────────────────────────────────────── */
.stages-section {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}
.stages-table {
  margin-top: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--surface);
}
.stages-table__head,
.stages-table__row {
  display: grid;
  grid-template-columns: minmax(8rem, 1.2fr) minmax(4.5rem, 0.8fr) 3fr;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  align-items: center;
}
.stages-table__head {
  background: var(--surface-alt);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.stages-table__row {
  border-top: 1px solid var(--rule-soft);
  font-size: 0.875rem;
}
.stages-table__stage {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stages-table__dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.stages-table__label {
  font-weight: 500;
  color: var(--ink);
}
.stages-table__range {
  color: var(--ink-soft);
  font-size: 0.8125rem;
}
.stages-table__interp {
  color: var(--ink-soft);
  line-height: 1.5;
}
@media (max-width: 640px) {
  .stages-table__head { display: none; }
  .stages-table__row {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }
}

/* ─────────────────────────────────────────────
   FAQ — visible + FAQPage schema
───────────────────────────────────────────── */
.faq-section {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}
.faq-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.faq-item {
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  background: var(--surface);
  overflow: hidden;
}
.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__chevron {
  color: var(--teal-text);
  font-size: 1.125rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item[open] .faq-item__chevron { transform: rotate(45deg); }
.faq-item__a {
  padding: 0 1.25rem 1.25rem;
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: 0.9375rem;
}

/* ─────────────────────────────────────────────
   E-E-A-T — dates + réviseur
───────────────────────────────────────────── */
.eeat-section {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  background: var(--surface-alt);
}
.eeat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
}
.eeat-bar__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.eeat-bar__source { flex: 1 1 16rem; min-width: 0; }
.eeat-reviewer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink);
}
.eeat-reviewer a { color: var(--teal-text); }
.eeat-reviewer a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────
   Pages statiques (À propos, légal, contact…)
───────────────────────────────────────────── */
.page-hero {
  padding: 2.5rem 0 1.75rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-alt);
}
.page-hero__eyebrow { color: var(--ink-faint); }
.page-hero__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 0.5rem;
}
.page-hero__sub {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  max-width: 46rem;
  line-height: 1.6;
}
.page-section { padding: 2.5rem 0 4rem; }
.page-prose {
  max-width: 46rem;
  color: var(--ink-soft);
}
.page-prose h2 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 2rem 0 0.75rem;
}
.page-prose h2:first-child { margin-top: 0; }
.page-prose h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.25rem 0 0.5rem;
}
.page-prose p { margin-bottom: 0.875rem; line-height: 1.7; }
.page-prose ul { margin: 0 0 0.875rem 1.25rem; }
.page-prose li { margin-bottom: 0.375rem; line-height: 1.6; }
.page-prose a { color: var(--teal-text); text-decoration: underline; }
.page-prose a:hover { color: var(--teal-bright); }
.page-prose strong { color: var(--ink); font-weight: 600; }
.page-prose .todo {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-border);
  color: var(--warn-text);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}
.page-prose__updated {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--ink-faint);
  font-family: 'IBM Plex Mono', monospace;
}
.page-callout {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 0.625rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--warn-text);
}

/* ─────────────────────────────────────────────
   Index A–Z des calculateurs
───────────────────────────────────────────── */
.az-nav {
  position: sticky;
  top: 3.5rem;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.az-nav__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
  padding: 0.5rem 0;
}
.az-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--teal-text);
  transition: background 0.15s, color 0.15s;
}
.az-letter:hover { background: var(--teal-bg); }
.az-letter--empty { color: var(--rule); pointer-events: none; }

.az-group { padding-top: 2rem; margin-top: -0.5rem; }
.az-group:first-of-type { padding-top: 0.5rem; }
.az-group__letter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--teal-text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0.75rem;
}
.az-list { list-style: none; }
.az-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 0.5rem;
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.15s;
}
.az-item:hover { background: var(--surface-alt); }
.az-item__main { flex: 1; min-width: 0; }
.az-item__name {
  display: block;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.az-item__full {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-top: 0.0625rem;
}
.az-item__spec { flex-shrink: 0; }
.az-item__arrow { color: var(--teal-text); flex-shrink: 0; }
@media (max-width: 640px) {
  .az-item__spec { display: none; }
}
[id^="lettre-"] { scroll-margin-top: 6.5rem; }

/* ─────────────────────────────────────────────
   Command palette de recherche (⌘K)
───────────────────────────────────────────── */
[x-cloak] { display: none !important; }
.search-palette__overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}
.search-palette__panel {
  position: fixed;
  z-index: 91;
  top: 12vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(40rem, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 0.875rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.search-palette__input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.search-palette__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: var(--ink);
}
.search-palette__input::placeholder { color: var(--ink-faint); }
.search-palette__esc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  border-radius: 0.3rem;
  padding: 0.1rem 0.4rem;
  cursor: pointer;
  background: var(--surface-alt);
}
.search-palette__results {
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.375rem;
}
.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
}
.search-result.active { background: var(--teal-bg); }
.search-result__main { min-width: 0; }
.search-result__name { display: block; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.search-result__full { display: block; font-size: 0.8125rem; color: var(--ink-soft); }
.search-palette__empty {
  padding: 1.5rem 0.75rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.search-palette__footer {
  display: flex;
  gap: 1.25rem;
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.6875rem;
  color: var(--ink-faint);
}
.search-palette__footer .kbd { margin-right: 0.15rem; }
button.search-hint { cursor: pointer; font-family: inherit; }
.search-hero { cursor: pointer; }
.search-hero__placeholder {
  flex: 1;
  min-width: 0;
  color: var(--monitor-faint);
  text-align: left;
  font-size: 1.125rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────
   Checklist de critères (CHA₂DS₂-VASc, etc.)
───────────────────────────────────────────── */
.crit-list { display: flex; flex-direction: column; gap: 0.5rem; }
.crit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.crit:hover { border-color: var(--ink-faint); }
.crit__check {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  border: 1.5px solid var(--rule);
  border-radius: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.crit__check::after {
  content: '✓';
  color: #fff;
  font-size: 0.8125rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.crit__label { flex: 1; font-size: 0.9375rem; color: var(--ink); line-height: 1.3; }
.crit__note {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: 0.125rem;
}
.crit__pts {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-faint);
  background: var(--surface-alt);
  border-radius: 0.3rem;
  padding: 0.1rem 0.45rem;
}
.crit__pts--off { opacity: 0.35; }
.crit.active {
  border-color: var(--teal);
  background: var(--teal-bg);
}
.crit.active .crit__check {
  background: var(--teal);
  border-color: var(--teal);
}
.crit.active .crit__check::after { opacity: 1; }
.crit.active .crit__pts { color: var(--teal-text); background: var(--surface); }
.crit:focus-within { outline: 2px solid var(--teal); outline-offset: 1px; }
