/* ============================================================
   Notamicro — maquettes statiques (wireframe Shibui)
   Editorial serif + sober Shibui palette, square corners
   Accent: Indigo Shibui #4A3F5C
   ============================================================ */

:root {
  /* Shibui palette */
  --shibui-red: #762D38;
  --shibui-ochre: #B8A04A;
  --shibui-green: #687A3A;
  --shibui-blue: #7A8FA3;
  --shibui-indigo: #4A3F5C;

  /* Surfaces (light mode default) */
  --bg: #F8F6F2;
  --surface: #EFECE8;
  --border: #DDD8CE;
  --text: #2C2832;
  --text-2: #686570;
  --text-3: #6B6973;

  /* Accent (Notamicro = Indigo) */
  --accent: var(--shibui-indigo);
  --accent-soft: color-mix(in oklab, var(--accent) 14%, var(--bg));

  /* Backoffice surfaces (héritent du thème — pas de contraste sombre) */
  --sidebar-bg: var(--surface);
  --sidebar-text: var(--text-2);
  --sidebar-text-active: var(--text);
  --sidebar-border: var(--border);

  /* Semantic — palette graphique (fills, dots, bordures décoratives) */
  --success: var(--shibui-green);
  --warning: var(--shibui-ochre);
  --error: var(--shibui-red);
  --info: var(--shibui-blue);

  /* Semantic textual — couleurs lisibles en texte (≥ 4.5:1 sur --bg et --surface, WCAG AA) */
  --success-text: #5C6B33;
  --warning-text: #6B5A22;
  --error-text: var(--shibui-red);
  --info-text: #4D617A;
  --indigo-text: var(--shibui-indigo);

  /* Typography */
  --serif: 'Lora', 'PT Serif', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --maxw: 1240px;
  --gut: clamp(20px, 4vw, 56px);
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --topbar-search-max: 480px;
  --drawer-z: 60;
  --menu-elevation: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.06);

  /* Force le rendu UA des contrôles natifs (icône datepicker, spinners…)
     en clair. Sans ça, Chrome déduit le schéma de l'OS : en dark OS,
     ::-webkit-calendar-picker-indicator passe en blanc et disparaît sur
     notre fond clair. */
  color-scheme: light;
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg: #1E1924;
  --surface: #2A2632;
  --border: #3D384A;
  --text: #EFECE8;
  --text-2: #ABA9AE;
  --text-3: #95929A;
  --accent-soft: color-mix(in oklab, var(--accent) 22%, var(--bg));

  /* Variantes textuelles éclaircies pour rester ≥ 4.5:1 sur fond sombre */
  --success-text: #B0C575;
  --warning-text: #D9C275;
  --error-text: #D88A95;
  --info-text: #A3B5C8;
  --indigo-text: #ABA0BD;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  transition: background-color .25s ease, color .25s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ---------- Logo *nota*micro ---------- */
.nm-logo {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--text);
  display: inline-block;
}
.nm-logo em {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
  font-family: var(--serif);
}
.nm-logo--sm { font-size: 20px; }

/* ---------- Nav (site public) ---------- */
.nm-nav {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.nm-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  gap: 40px;
}
.nm-nav__links {
  display: flex;
  gap: 36px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-2);
}
.nm-nav__links a:hover { color: var(--text); }
.nm-nav__links a.is-active { color: var(--text); }
.nm-nav__cta { display: flex; gap: 12px; align-items: center; }

/* ---------- Buttons (wireframe, square corners) ---------- */
.nm-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.nm-btn[hidden] { display: none; }
.nm-btn--sm { padding: 6px 12px; font-size: 12px; }
.nm-btn--md { padding: 10px 18px; font-size: 14px; }
.nm-btn--lg { padding: 14px 22px; font-size: 15px; }
.nm-btn:hover { border-color: var(--text); }

.nm-btn--ghost { background: transparent; }
.nm-btn--solid {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.nm-btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.nm-btn--accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.nm-btn--accent:hover { filter: brightness(.92); }
.nm-btn--danger {
  color: var(--error-text);
  border-color: color-mix(in oklab, var(--error-text) 40%, var(--border));
}
.nm-btn--danger:hover { background: var(--error-text); color: #fff; border-color: var(--error-text); }
.nm-btn--link {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text);
  padding: 4px 0;
  font-style: italic;
  font-family: var(--serif);
  font-size: 15px;
}
.nm-btn--icon {
  padding: 0;
  width: 32px;
  height: 32px;
  justify-content: center;
  background: transparent;
}
.nm-btn--icon:disabled,
.nm-btn--icon[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Hero ---------- */
.nm-hero { padding: 88px 0 64px; position: relative; }
.nm-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.nm-hero__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  color: var(--text);
  text-wrap: balance;
}
.nm-hero__title em { font-style: normal; }
.nm-hero__sub {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
  margin: 0 0 20px;
  color: var(--text);
  max-width: 520px;
  text-wrap: pretty;
}
.nm-hero__lede {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 0 32px;
}
.nm-hero__cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nm-hero__meta {
  margin-top: 32px;
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
  flex-wrap: wrap;
}

/* Hero diagram */
.nm-hero__diagram {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 32px;
  position: relative;
  min-height: 380px;
}
.nm-hero__diagram-overline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.nm-hero__flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 12px;
}
.nm-flow-node {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 16px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.nm-flow-node--strong {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}
.nm-flow-arrow {
  font-family: var(--mono);
  color: var(--text-3);
  font-size: 14px;
}
.nm-hero__legend {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  font-size: 12px;
  color: var(--text-2);
}
.nm-hero__legend > div { border-top: 1px solid var(--border); padding-top: 10px; }
.nm-hero__legend strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; font-size: 13px; }

/* ---------- Trust band ---------- */
.nm-trust {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  background: var(--surface);
}
.nm-trust__inner {
  display: flex;
  align-items: center;
  gap: 48px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.nm-trust__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  text-transform: uppercase;
  white-space: nowrap;
}
.nm-trust__items {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--text);
}
.nm-trust__items span {
  display: inline-flex; align-items: center; gap: 10px;
}
.nm-trust__items span::before {
  content: ''; width: 10px; height: 10px;
  border: 1px solid var(--text-2); display: inline-block;
}

/* ---------- Section générique ---------- */
.nm-section { padding: 96px 0; border-top: 1px solid var(--border); }
.nm-section--alt { background: var(--surface); }

.nm-overline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.nm-shead { margin-bottom: 56px; max-width: 720px; }
.nm-shead--center { margin-left: auto; margin-right: auto; text-align: center; }
.nm-shead__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  color: var(--text);
  text-wrap: balance;
}
.nm-shead__title.is-italic { font-style: italic; font-weight: 400; }
.nm-shead__lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
  max-width: 60ch;
}

/* ---------- Steps ---------- */
.nm-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  position: relative;
}
.nm-steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 8%;
  right: 8%;
  border-top: 1px dashed var(--border);
  z-index: 0;
}
.nm-step { position: relative; z-index: 1; }
.nm-step__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}
.nm-step__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  margin: 16px 0 10px;
  color: var(--text);
}
.nm-step__body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 0;
  max-width: 32ch;
}

/* ---------- Placeholders hatched ---------- */
.nm-ph { display: inline-flex; flex-direction: column; gap: 10px; }
.nm-ph--center { align-items: center; text-align: center; }
.nm-ph--left { align-items: flex-start; }
.nm-ph__box {
  background: repeating-linear-gradient(
    -45deg,
    var(--surface) 0 8px,
    color-mix(in oklab, var(--surface) 70%, var(--border)) 8px 9px
  );
  border: 1px solid var(--border);
}
.nm-ph__cap { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.nm-ph__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.nm-ph__caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- Split panel (Émission / Réception) ---------- */
.nm-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
}
.nm-split > article {
  padding: 56px;
  border-right: 1px solid var(--border);
}
.nm-split > article:last-child { border-right: none; }
.nm-split__h {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 12px;
}
.nm-split__sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
}
.nm-split__body { font-size: 15px; color: var(--text-2); line-height: 1.65; max-width: 38ch; margin-bottom: 32px; }
.nm-split__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
  font-size: 14px;
}
.nm-split__list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.nm-split__list li:last-child { border-bottom: 1px solid var(--border); }
.nm-split__list li::before {
  content: attr(data-i);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
}

/* ---------- Dashboard preview (landing) ---------- */
.nm-preview {
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  grid-template-columns: 220px 1fr;
}
.nm-preview__side {
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  background: var(--surface);
  font-size: 13px;
}
.nm-preview__side h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 12px;
  font-weight: 500;
}
.nm-preview__side ul {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 4px;
}
.nm-preview__side li {
  padding: 8px 10px;
  color: var(--text-2);
  border: 1px solid transparent;
}
.nm-preview__side li.is-active {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
  font-weight: 500;
}
.nm-preview__main { padding: 28px 32px; }
.nm-preview__title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  margin: 0 0 4px;
}
.nm-preview__crumbs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* ---------- Row (table simplifiée landing) ---------- */
.nm-row {
  display: grid;
  grid-template-columns: 80px 1fr 100px 110px;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  align-items: center;
  font-size: 13px;
}
.nm-row:last-child { border-bottom: 1px solid var(--border); }
.nm-row__ref { font-family: var(--mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.05em; }
.nm-row__client { color: var(--text); }
.nm-row__amount { font-family: var(--mono); font-size: 13px; text-align: right; color: var(--text); }

/* ---------- Pills (badges statut) ---------- */
.nm-pill {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  justify-self: start;
}
.nm-pill[hidden] { display: none; }
.nm-pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.nm-pill--olive { color: var(--success-text); border-color: color-mix(in oklab, var(--success-text) 30%, var(--border)); }
.nm-pill--olive .nm-pill__dot { background: var(--success-text); }
.nm-pill--ochre { color: var(--warning-text); border-color: color-mix(in oklab, var(--warning-text) 30%, var(--border)); }
.nm-pill--ochre .nm-pill__dot { background: var(--warning-text); }
.nm-pill--red { color: var(--error-text); border-color: color-mix(in oklab, var(--error-text) 30%, var(--border)); }
.nm-pill--red .nm-pill__dot { background: var(--error-text); }
.nm-pill--blue { color: var(--info-text); border-color: color-mix(in oklab, var(--info-text) 30%, var(--border)); }
.nm-pill--blue .nm-pill__dot { background: var(--info-text); }
.nm-pill--indigo { color: var(--indigo-text); border-color: color-mix(in oklab, var(--indigo-text) 30%, var(--border)); }
.nm-pill--indigo .nm-pill__dot { background: var(--indigo-text); }
.nm-pill--accent { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 30%, var(--border)); }
.nm-pill--accent .nm-pill__dot { background: var(--accent); }
/* Alias utilitaire — badge = pill sans dot, utilisé dans les templates dynamiques */
.badge { font-family: var(--sans); font-size: 11px; font-weight: 500; display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2); text-transform: lowercase; letter-spacing: 0.02em; }
.badge--olive { color: var(--success-text); border-color: color-mix(in oklab, var(--success-text) 30%, var(--border)); }
.badge--ochre { color: var(--warning-text); border-color: color-mix(in oklab, var(--warning-text) 30%, var(--border)); }
.badge--red { color: var(--error-text); border-color: color-mix(in oklab, var(--error-text) 30%, var(--border)); }
.badge--blue { color: var(--info-text); border-color: color-mix(in oklab, var(--info-text) 30%, var(--border)); }

/* ---------- Compliance grid ---------- */
.nm-comply {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.nm-comply > div { padding: 32px 28px; border-right: 1px solid var(--border); }
.nm-comply > div:last-child { border-right: none; }
.nm-comply__k {
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  line-height: 1;
  margin: 0 0 12px;
  color: var(--accent);
}
.nm-comply__l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.nm-comply__d { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.5; }

/* ---------- Pricing ---------- */
.nm-pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
}
.nm-pricing--two { grid-template-columns: repeat(2, 1fr); }
.nm-pricing__plan {
  padding: 40px 32px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
}
.nm-pricing__plan:last-child { border-right: none; }
.nm-pricing__plan--featured { background: var(--accent-soft); }
.nm-pricing__name { font-family: var(--serif); font-style: italic; font-size: 22px; margin: 0; }
.nm-pricing__price {
  font-family: var(--serif); font-size: 44px; margin: 0;
  line-height: 1; letter-spacing: -0.02em;
}
.nm-pricing__price small { font-family: var(--sans); font-size: 13px; color: var(--text-2); font-weight: 400; }
.nm-pricing__desc { font-size: 13px; color: var(--text-2); margin: 0; min-height: 60px; }
.nm-pricing__feats { list-style: none; padding: 0; margin: 0 0 16px; font-size: 13px; }
.nm-pricing__feats li { padding: 8px 0; border-top: 1px solid var(--border); color: var(--text-2); }
.nm-pricing__feats li::before { content: '— '; color: var(--text-3); }
.nm-pricing--selectable .nm-pricing__plan:has(input[data-subscription-radio]:checked) .nm-pricing__feats li { border-color: #C0C0C0; }

/* Pricing — variante sélectionnable (radio cards, ex: onboarding) */
.nm-pricing--selectable {
  border: 1px solid var(--border);
  padding: 0;
  margin: 0;
}
.nm-pricing--selectable .nm-pricing__plan {
  position: relative;
  cursor: pointer;
  transition: background 120ms, box-shadow 120ms;
  margin: 0;
}
.nm-pricing--selectable .nm-pricing__plan:hover {
  background: var(--surface);
}
.nm-pricing--selectable .nm-pricing__plan:has(input[data-subscription-radio]:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.nm-pricing--selectable .nm-pricing__plan:has(input[data-subscription-radio]:checked) {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.nm-pricing__state {
  font-size: 13px;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.nm-pricing__state::before {
  content: '';
  width: 18px; height: 18px;
  border: 1.5px solid var(--text-3);
  border-radius: 50%;
  flex: 0 0 18px;
  background: transparent;
  transition: background 120ms, border-color 120ms;
}
.nm-pricing--selectable .nm-pricing__plan:has(input:checked) .nm-pricing__state {
  color: var(--accent);
  font-weight: 500;
}
.nm-pricing--selectable .nm-pricing__plan:has(input:checked) .nm-pricing__state::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px #fff;
}
.nm-pricing__badge {
  display: inline-block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 10px;
  vertical-align: middle;
}

/* ---------- FAQ ---------- */
.nm-faq { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; }
.nm-faq--full { grid-template-columns: 1fr; gap: 0; }
.nm-faq__list { display: flex; flex-direction: column; }
.nm-faq__item { border-top: 1px solid var(--border); padding: 0; }
.nm-faq__item:last-child { border-bottom: 1px solid var(--border); }
.nm-faq__item summary {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}
.nm-faq__item summary::-webkit-details-marker { display: none; }
.nm-faq__item summary::after {
  content: '+';
  font-family: var(--sans);
  color: var(--text-3);
  font-weight: 300;
  font-size: 22px;
}
.nm-faq__item[open] summary::after { content: '−'; }
.nm-faq__a { font-size: 14px; color: var(--text-2); margin: 0 0 24px; line-height: 1.6; max-width: 70ch; }

/* ---------- Final CTA ---------- */
.nm-final { text-align: center; padding: 120px 0 100px; border-top: 1px solid var(--border); }
.nm-final__h {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.05;
  margin: 0 0 20px;
  text-wrap: balance;
}
.nm-final__sub { font-size: 16px; color: var(--text-2); margin: 0 auto 36px; max-width: 50ch; }
.nm-final__cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Footer ---------- */
.nm-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 36px;
  font-size: 13px;
  color: var(--text-2);
}
.nm-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.nm-footer__col h5 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 16px;
  font-weight: 500;
}
.nm-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.nm-footer__col a:hover { color: var(--text); }
.nm-footer__about { font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.5; max-width: 38ch; color: var(--text-2); margin: 12px 0 0; }
.nm-footer__base {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Tableau comparatif (pages tarifs/régimes) ---------- */
.nm-compare {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  font-size: 14px;
}
.nm-compare th, .nm-compare td {
  padding: 16px 20px;
  text-align: left;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.nm-compare th:last-child, .nm-compare td:last-child { border-right: none; }
.nm-compare tr:last-child td { border-bottom: none; }
.nm-compare thead th {
  background: var(--surface);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  color: var(--text);
}
.nm-compare thead th .nm-overline { margin-bottom: 6px; }
.nm-compare tbody th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  background: color-mix(in oklab, var(--surface) 50%, var(--bg));
}
.nm-compare td.is-strong { font-weight: 500; color: var(--text); }
.nm-compare .nm-compare__check { color: var(--success-text); font-weight: 600; }
.nm-compare .nm-compare__cross { color: var(--text-3); }

/* ============================================================
   BACKOFFICE
   ============================================================ */

/* ---------- App layout ---------- */
.nm-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  min-height: 100vh;
}
.nm-app__sidebar { grid-row: 1 / 3; grid-column: 1; }
.nm-app__topbar  { grid-row: 1; grid-column: 2; }
.nm-app__main    { grid-row: 2; grid-column: 2; padding: 32px 40px; max-width: 1320px; }

/* ---------- Sidebar ---------- */
.nm-sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
}
.nm-sidebar__head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--sidebar-border);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}
.nm-sidebar__nav { padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; flex: 1; }
.nm-sidebar__group h6 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 10px;
  padding: 0 10px;
  font-weight: 500;
}
.nm-sidebar__group ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.nm-sidebar__group a {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--sidebar-text);
  border: 1px solid transparent;
}
.nm-sidebar__group a:hover { color: var(--text); }
.nm-sidebar__group a.is-active {
  background: var(--bg);
  border-color: var(--border);
  color: var(--sidebar-text-active);
  font-weight: 500;
}
.nm-sidebar__foot {
  padding: 16px 24px;
  border-top: 1px solid var(--sidebar-border);
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Topbar (backoffice) ---------- */
.nm-topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nm-topbar__center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nm-topbar__crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.nm-topbar__crumbs .sep { opacity: 0.5; }
.nm-topbar__crumbs .is-current { color: var(--text); }
.nm-topbar__crumbs-favorite-wrap { display: inline-flex; align-items: center; }
.nm-topbar__crumbs-favorite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  background: transparent;
  border: 0;
  padding: 0;
  line-height: 0;
  color: var(--text-3);
  cursor: pointer;
  transition: color 120ms;
}
.nm-topbar__crumbs-favorite svg { display: block; }
.nm-topbar__crumbs-favorite:hover { color: var(--text); }
.nm-topbar__right { display: flex; align-items: center; gap: 16px; }
.nm-topbar__org {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--text-2);
}
.nm-topbar__avatar {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.05em;
  color: var(--text-2);
}

/* ---------- Topbar — Hamburger (mobile) ---------- */
.nm-topbar__hamburger {
  display: none;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nm-topbar__hamburger:hover { border-color: var(--text); color: var(--text); }

/* ---------- Topbar — Search ---------- */
.nm-topbar__search {
  flex: 1;
  max-width: var(--topbar-search-max);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.nm-topbar__search:focus-within { border-color: var(--text-2); }
.nm-topbar__search-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-3);
}
.nm-topbar__search-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  min-width: 0;
}
.nm-topbar__search-input::placeholder { color: var(--text-3); }
.nm-topbar__search-kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  color: var(--text-3);
  background: var(--bg);
  flex-shrink: 0;
}

/* ---------- Topbar — Action wrap & buttons ---------- */
.nm-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nm-topbar__action-wrap { position: relative; display: inline-block; }
.nm-topbar__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
}
.nm-topbar__action:hover { border-color: var(--text); color: var(--text); }
.nm-topbar__action--icon {
  width: 36px;
  padding: 0;
  justify-content: center;
  position: relative;
}
.nm-topbar__action-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  pointer-events: none;
}
.nm-topbar__avatar-trigger {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.05em;
  color: var(--text-2);
  cursor: pointer;
}
.nm-topbar__avatar-trigger:hover { border-color: var(--text); color: var(--text); }

/* ---------- Dropdown menu (Create / Avatar) ---------- */
.nm-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--menu-elevation);
  padding: 6px 0;
  z-index: 50;
  display: none;
}
.nm-menu[aria-hidden="false"], .nm-menu.is-open { display: block; }
.nm-menu__heading {
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.nm-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
}
.nm-menu__item:hover { background: var(--surface); color: var(--text); }
.nm-menu__sep {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ---------- Sidebar — Sections (icône + séparateur horizontal) ---------- */
.nm-sidebar__section { display: flex; flex-direction: column; }
.nm-sidebar__section.is-empty { display: none; }
.nm-sidebar__section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0 10px;
  color: var(--text-3);
}
.nm-sidebar__section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--sidebar-border);
}
.nm-sidebar__section-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-3);
  display: inline-flex;
}
.nm-sidebar__section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nm-sidebar__section a {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--sidebar-text);
  border: 1px solid transparent;
}
.nm-sidebar__section a:hover { color: var(--text); }
.nm-sidebar__section a.is-active {
  background: var(--bg);
  border-color: var(--border);
  color: var(--sidebar-text-active);
  font-weight: 500;
}
/* Screen-reader only (libellés de section masqués visuellement) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nm-sidebar__section-empty {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
}

/* ---------- Hub tiles (pages Suivi / Pilotage / Registres / Déclarations) ---------- */
.nm-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.nm-hub-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.nm-hub-tile:hover { border-color: var(--text); }
.nm-hub-tile__header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
}
.nm-hub-tile__header .nm-card__h { margin: 0; }
.nm-hub-tile__body {
  padding: 20px 24px;
  flex: 1;
}
.nm-hub-tile .nm-card__h {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
}
.nm-hub-tile__name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--text);
  margin: 0 0 12px;
}
.nm-hub-tile__status {
  font-size: 14px;
  color: var(--text-2);
  margin: 0 0 8px;
}
.nm-hub-tile__sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin: 0;
  text-transform: uppercase;
}
.nm-hub-tile__footer {
  border-top: 1px solid transparent;
  padding: 12px 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nm-hub-tile:hover .nm-hub-tile__footer {
  color: var(--text);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.nm-hub-tile__footer-arrow {
  flex-shrink: 0;
}

/* ---------- Search results (page recherche.html) ---------- */
.nm-search-results { margin-bottom: 24px; }
.nm-search-results__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  background: var(--bg);
}
.nm-search-results__item { border-top: 1px solid var(--border); }
.nm-search-results__item:first-child { border-top: 0; }
.nm-search-results__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
}
.nm-search-results__link:hover { background: var(--surface); }
.nm-search-results__link:hover .nm-search-results__title { text-decoration: underline; }
.nm-search-results__chevron {
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.nm-search-results__title {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}
.nm-search-results__meta {
  font-size: 13px;
  color: var(--text-2);
  margin-left: auto;
}
.nm-search-results__more {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
}
.nm-search-results__more:hover { color: var(--text); text-decoration: underline; }

/* ---------- Sidebar — Drawer backdrop (mobile) ---------- */
.nm-sidebar__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: var(--drawer-z);
}
.nm-sidebar__backdrop.is-open { display: block; }

/* ---------- Page header (backoffice) ---------- */
.nm-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.nm-page-head[hidden] { display: none; }
.nm-page-head__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.nm-page-head__sub {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
}
.nm-page-head__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- Cards (KPI, blocs) ---------- */
.nm-card {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 24px;
}
.nm-card--surface { background: var(--surface); }
.nm-card--filigree {
  background: transparent;
  border-style: dashed;
  opacity: 0.6;
}
.nm-card__h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 12px;
  font-weight: 500;
}
.nm-card__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 16px;
  color: var(--text);
}

/* ---------- Bloc alertes (dashboard §15.B et autres pages) ---------- */
/* Fond accent plein + titre blanc : porté par .nm-card--solid-accent (cf. variantes accent plus bas). */
/* Le panneau intérieur reste un fond clair pour isoler la liste des nm-banner. */
[data-dashboard-payant-target="alertsList"] {
  background: var(--bg);
  padding: 1rem;
}

/* ---------- Stats (dashboard KPI) ---------- */
.nm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}
.nm-stat {
  padding: 24px 28px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nm-stat:last-child { border-right: none; }
.nm-stat__l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.nm-stat__v {
  font-family: var(--serif);
  font-style: italic;
  font-size: 36px;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nm-stat__v small {
  font-family: var(--sans);
  font-style: normal;
  font-size: 14px;
  color: var(--text-2);
  font-weight: 400;
  letter-spacing: 0;
}
.nm-stat__d {
  font-size: 12px;
  color: var(--text-2);
  margin: 0;
}
.nm-stat__d.is-warning { color: var(--warning-text); }
.nm-stat__d.is-error { color: var(--error-text); }
.nm-stat__d.is-success { color: var(--success-text); }

/* ---------- Jauge (seuils) ---------- */
.nm-jauge { margin-bottom: 12px; }
.nm-jauge__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 13px;
}
.nm-jauge__label { color: var(--text); font-weight: 500; }
.nm-jauge__amount { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.nm-jauge__bar {
  height: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.nm-jauge__fill {
  height: 100%;
  background: var(--accent);
  border-right: 1px solid color-mix(in oklab, var(--accent) 60%, black);
}
.nm-jauge__fill.is-warning { background: var(--warning); border-right-color: color-mix(in oklab, var(--warning) 60%, black); }
.nm-jauge__fill.is-error { background: var(--error); border-right-color: color-mix(in oklab, var(--error) 60%, black); }
.nm-jauge__foot {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-transform: uppercase;
}

/* ---------- Table de données (backoffice) ---------- */
.nm-table-wrap {
  border: 1px solid var(--border);
  background: var(--bg);
  overflow-x: auto;
}
.nm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.nm-table thead th {
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.nm-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.nm-table tbody tr:last-child td { border-bottom: none; }
.nm-table tbody tr:hover td { background: color-mix(in oklab, var(--surface) 50%, var(--bg)); }
.nm-table .is-mono { font-family: var(--mono); font-size: 12px; color: var(--text-2); letter-spacing: 0.04em; }
.nm-table .is-amount { font-family: var(--mono); text-align: right; }
.nm-table .is-right { text-align: right; }
.nm-table .is-center { text-align: center; }
.nm-table .is-muted { color: var(--text-2); }
.nm-table thead .is-right, .nm-table thead .is-amount { text-align: right; }
.nm-table tbody a { color: var(--text); font-weight: 500; }
.nm-table tbody a:hover { text-decoration: underline; text-underline-offset: 2px; }
.nm-table thead th .nm-th-sort {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nm-table thead th .nm-th-sort:hover { color: var(--text); }
.nm-table thead th .nm-th-sort::after { content: "↕"; font-size: 11px; opacity: 0.5; }
.nm-table thead th .nm-th-sort[aria-sort="ascending"]::after { content: "↑"; opacity: 1; }
.nm-table thead th .nm-th-sort[aria-sort="descending"]::after { content: "↓"; opacity: 1; }
.nm-table tbody tr.is-archived td { color: var(--text-3); }
.nm-table tbody tr.is-archived td a { color: var(--text-3); }
/* Ligne vide de tableau (template dynamique data-slot="message") */
.table-empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; font-style: italic; }

/* ---------- Filters bar ---------- */
.nm-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 16px;
}
.nm-filters__group { display: flex; gap: 8px; align-items: center; }
.nm-filters__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.nm-filters__spacer { flex: 1; }

/* ---------- Forms ---------- */
.nm-form { display: flex; flex-direction: column; gap: 24px; }
.nm-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.nm-form__row--3 { grid-template-columns: repeat(3, 1fr); }
.nm-field { display: flex; flex-direction: column; gap: 6px; }
.nm-field[hidden] { display: none; }
.nm-field--full { grid-column: 1 / -1; }
.nm-field__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.nm-field__hint { font-size: 12px; color: var(--text-3); margin: 4px 0 0; }
.nm-field__error { font-size: 12px; color: var(--danger, #c0392b); margin: 2px 0 0; }
.nm-field__static {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  margin: 0;
  padding: 9px 0;
  letter-spacing: 0.02em;
}
.nm-input, .nm-select, .nm-textarea {
  font-family: var(--sans);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 12px;
  width: 100%;
  font-feature-settings: 'tnum';
}
.nm-input:focus, .nm-select:focus, .nm-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* Wrapper label + checkbox natif (pattern <label class="nm-checkbox"><input type="checkbox"/><span>…</span></label>) */
.nm-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.nm-checkbox input[type="checkbox"] {
  margin: 3px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.nm-checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Anneau de focus clavier (WCAG 2.4.7 — focus visible) */
.nm-btn:focus-visible,
.nm-wizard__step-btn:focus-visible,
.nm-recap__edit:focus-visible,
.nm-lines__del:focus-visible,
.nm-pagination__pages button:focus-visible,
.nm-faq__item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link (WCAG 2.4.1 — bypass blocks) — visible uniquement au focus clavier */
.nm-skip {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1px solid var(--text);
  transform: translateY(-200%);
  transition: transform .15s ease;
}
.nm-skip:focus { transform: translateY(0); outline: 2px solid var(--accent); outline-offset: 2px; }

/* Visually-hidden — texte réservé au lecteur d'écran (WCAG 1.3.1) */
.nm-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.nm-textarea { min-height: 90px; resize: vertical; }
.nm-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
                    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) center, calc(100% - 11px) center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.nm-input--mono { font-family: var(--mono); font-size: 13px; }

/* Sous-form inline dans une <tr> (ex. table « pending » : voie « Identifier sans facturer ») */
.nm-row-subform > td { background: var(--surface); padding: 16px; border-top: 0; }
.nm-inline-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.nm-fieldset {
  border: 1px solid var(--border);
  padding: 24px;
  background: var(--bg);
}
.nm-fieldset legend {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 10px;
}

/* ---------- Sticky actions bar ---------- */
.nm-actions {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 16px 0;
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.nm-actions__hint { font-size: 12px; color: var(--text-3); font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.nm-actions__group { display: flex; gap: 12px; align-items: center; }

/* ---------- Layout app sections ---------- */
.nm-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.nm-grid-2--inv { grid-template-columns: 1fr 2fr; }
.nm-grid-2--equal { grid-template-columns: 1fr 1fr; }
.nm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ---------- Lignes de facture (édition) ---------- */
.nm-lines {
  border: 1px solid var(--border);
  background: var(--bg);
}
.nm-lines__head, .nm-lines__row {
  display: grid;
  grid-template-columns: 1fr 130px 80px 110px 110px 40px;
  gap: 12px;
  padding: 12px 16px;
  align-items: center;
}
.nm-lines__head {
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.nm-lines__row {
  border-bottom: 1px solid var(--border);
}
.nm-lines__row:last-of-type { border-bottom: none; }
.nm-lines__row .nm-input { padding: 6px 8px; font-size: 13px; }
.nm-lines__row .nm-input.is-amount { text-align: right; font-family: var(--mono); }
.nm-lines__del {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  line-height: 1;
}
.nm-lines__del:hover { color: var(--error-text); border-color: var(--error-text); }
.nm-lines__add {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ---------- Bloc totaux ---------- */
.nm-totals {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 20px 24px;
  font-size: 14px;
}
.nm-totals__row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.nm-totals__row:first-child { border-top: none; }
.nm-totals__row.is-total {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 2px solid var(--text);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
}
.nm-totals__row .nm-totals__v { font-family: var(--mono); }
.nm-totals__row.is-total .nm-totals__v { font-family: var(--serif); font-style: italic; }

/* ---------- Bloc info (client info, etc.) ---------- */
.nm-infoblock {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 20px 24px;
}
.nm-infoblock__h {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 8px;
}
.nm-infoblock__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  margin: 0 0 6px;
  color: var(--text);
}
.nm-infoblock__lines { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.nm-infoblock__lines .is-mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; }

/* ---------- Pagination ---------- */
.nm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-top: none;
  background: var(--surface);
  font-size: 12px;
  color: var(--text-2);
  font-family: var(--mono);
  letter-spacing: 0.05em;
}
.nm-pagination__pages { display: flex; gap: 4px; }
.nm-pagination__pages button {
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
}
.nm-pagination__pages button.is-current {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
/* Alias utilitaires pagination — structure simplifiée prev/info/next dans templates dynamiques */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border: 1px solid var(--border); border-top: none; background: var(--surface); font-size: 12px; color: var(--text-2); font-family: var(--mono); letter-spacing: 0.05em; }
.pagination-btn { padding: 6px 12px; background: var(--bg); border: 1px solid var(--border); font-family: var(--mono); font-size: 12px; color: var(--text-2); cursor: pointer; }
.pagination-btn:hover { color: var(--text); border-color: var(--text); }
.pagination-btn:disabled { opacity: 0.4; cursor: default; }
.pagination-info { font-family: var(--mono); font-size: 12px; color: var(--text-2); letter-spacing: 0.05em; }

/* ---------- Historique d'actions (timeline) ---------- */
.nm-timeline { list-style: none; padding: 0; margin: 0; }
.nm-timeline li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.nm-timeline li:last-child { border-bottom: 1px solid var(--border); }
.nm-timeline__when { font-family: var(--mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.04em; }
.nm-timeline__what { color: var(--text); }
.nm-timeline__who { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; font-style: italic; font-family: var(--serif); }

/* ---------- Wireframe tags (gardés en option pour la revue) ---------- */
.nm-wireframe-tag {
  position: absolute;
  top: 24px;
  right: var(--gut);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px dashed var(--border);
  padding: 4px 10px;
}
[data-wire-tags='off'] .nm-wireframe-tag { display: none; }

/* ---------- Tweaks panel (revue design) ---------- */
.tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 240px;
  background: var(--bg);
  border: 1px solid var(--text);
  font-family: var(--sans);
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 16px 48px -12px rgba(0,0,0,0.18);
}
.tweaks__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tweaks__close { background: none; border: none; cursor: pointer; color: var(--text-2); font-size: 16px; line-height: 1; }
.tweaks__body { padding: 16px; display: flex; flex-direction: column; gap: 18px; max-height: 70vh; overflow-y: auto; }
.tweaks__sect h6 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 8px;
  font-weight: 500;
}
.tweaks__radio { display: flex; flex-wrap: wrap; gap: 4px; }
.tweaks__radio button {
  font-family: var(--sans);
  font-size: 12px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
}
.tweaks__radio button.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tweaks__toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.tweaks__open {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 14px;
  cursor: pointer;
  z-index: 100;
}

/* ---------- Misc ---------- */
.muted { color: var(--text-2); }
.mono { font-family: var(--mono); }
.serif-italic { font-family: var(--serif); font-style: italic; }
.no-mb { margin-bottom: 0 !important; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

/* ---------- Index navigable des maquettes ---------- */
.nm-index { padding: 64px 0; }
.nm-index__h {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 48px;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.nm-index__sub { font-size: 16px; color: var(--text-2); margin: 0 0 56px; max-width: 60ch; }
.nm-index__group { margin-bottom: 56px; }
.nm-index__group-h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.nm-index__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.nm-index__card {
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}
.nm-index__card:hover { border-color: var(--text); }
.nm-index__card-thumb {
  height: 160px;
  background: repeating-linear-gradient(
    -45deg,
    var(--surface) 0 8px,
    color-mix(in oklab, var(--surface) 70%, var(--border)) 8px 9px
  );
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nm-index__card-body { padding: 20px 24px; }
.nm-index__card-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  margin: 0 0 6px;
}
.nm-index__card-desc { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.5; }
.nm-index__card-path {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
}

/* ---------- Wizard (création de facture / devis / formalité) ---------- */
.nm-wizard { display: flex; flex-direction: column; gap: 32px; }
.nm-wizard__body { display: block; }

.nm-wizard__steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  background: var(--bg);
}
.nm-wizard__step {
  border-right: 1px solid var(--border);
  position: relative;
}
.nm-wizard__step:last-child { border-right: none; }
.nm-wizard__step-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background-color .15s ease;
}
.nm-wizard__step-btn:disabled {
  cursor: not-allowed;
  opacity: 1;
}
.nm-wizard__step-num {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
  background: var(--bg);
  flex-shrink: 0;
  transition: all .15s ease;
}
.nm-wizard__step-meta {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.nm-wizard__step-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.nm-wizard__step-title {
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nm-wizard__step.is-current .nm-wizard__step-btn { background: var(--accent-soft); }
.nm-wizard__step.is-current .nm-wizard__step-num {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg);
}
.nm-wizard__step.is-current .nm-wizard__step-title { color: var(--text); font-weight: 500; }
.nm-wizard__step.is-current .nm-wizard__step-label { color: var(--accent); }

.nm-wizard__step.is-done .nm-wizard__step-btn:hover,
.nm-wizard__step.is-done .nm-wizard__step-btn:focus-visible { background: var(--surface); }
.nm-wizard__step.is-done .nm-wizard__step-num {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.nm-wizard__step.is-done .nm-wizard__step-title { color: var(--text); }

.nm-wizard__panel { display: none; }
.nm-wizard__panel.is-active { display: block; }
.nm-wizard__panel-head { margin-bottom: 32px; max-width: 720px; }
.nm-wizard__panel-h {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.25;
  margin: 8px 0 12px;
  letter-spacing: -0.01em;
}
.nm-wizard__panel-lede {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
  max-width: 60ch;
}

/* Formulaire « nouveau client » : caché par défaut, déployé via JS */
.nm-wizard__new-client { display: none; margin-bottom: 24px; }
.nm-wizard__new-client.is-open { display: block; }

/* Barre de navigation du wizard (sticky en bas du main) */
.nm-wizard__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  position: sticky;
  bottom: 0;
  background: var(--bg);
  z-index: 5;
  padding-bottom: 4px;
}
.nm-wizard__nav-progress {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.nm-wizard__nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nm-wizard__nav .nm-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Récapitulatif (étape 4) */
.nm-recap { border: 1px solid var(--border); background: var(--bg); }
.nm-recap__row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.nm-recap__row:first-child { border-top: none; }
.nm-recap__l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: 4px;
}
.nm-recap__v { font-size: 14px; color: var(--text); line-height: 1.55; }
.nm-recap__edit {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.nm-recap__edit:hover { border-color: var(--text); color: var(--text); }

/* Listes informatives dans les cartes (contraste AA garanti) */
.nm-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.nm-checklist li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
}
.nm-checklist li::before {
  content: '✓';
  font-family: var(--mono);
  font-weight: 600;
  color: var(--success-text);
}

.nm-steplist {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.nm-steplist li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
}
.nm-steplist li::before {
  content: counter(step);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding-top: 2px;
}

/* ---------- Wizards onboarding (variantes nombre d'étapes) ---------- */
.nm-wizard__steps--5 { grid-template-columns: repeat(5, 1fr); }
.nm-wizard__steps--6 { grid-template-columns: repeat(6, 1fr); }

/* ---------- Help sidebar (wizards d'onboarding) ---------- */
.nm-help {
  position: sticky;
  top: 88px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nm-help__body { font-size: 13px; line-height: 1.55; color: var(--text); }
.nm-help__body p { margin: 0 0 10px; }
.nm-help__body p:last-child { margin-bottom: 0; }
.nm-help__body ul { margin: 0; padding-left: 20px; line-height: 1.55; }
.nm-help__body strong { color: var(--text); }
.nm-help [data-help-active-content] {
  transition: opacity 120ms ease;
  border-left: 3px solid var(--info-text);
}
.nm-help [data-help-active-content] .nm-card__h { color: var(--info-text); }
[data-help-trigger] { transition: outline 120ms ease; }
[data-help-trigger]:hover {
  outline: 1px dashed var(--info-text);
  outline-offset: 2px;
}

/* ---------- Card — variantes accent (filet de gauche coloré) ---------- */
.nm-card--accent-info { border-left: 3px solid var(--info-text); }
.nm-card--accent-info .nm-card__h { color: var(--info-text); }
.nm-card--accent-success { border-left: 3px solid var(--success-text); }
.nm-card--accent-success .nm-card__h { color: var(--success-text); }

/* ---------- Pièces justificatives (rangées de fichiers) ---------- */
.nm-row--pj { grid-template-columns: 1.5fr 1fr 120px; font-size: inherit; }
.nm-pj__title { display: block; font-size: 14px; }
.nm-pj__title .nm-pill { margin-left: 6px; }
.nm-pj__desc {
  font-size: 12px;
  color: var(--text-2);
  font-style: italic;
  font-family: var(--serif);
}
.nm-pj__status { font-size: 13px; }
.nm-pj__status--empty { color: var(--text-3); }
.nm-pj__legend-tag {
  font-weight: 400;
  font-size: 12px;
  font-family: var(--serif);
  font-style: italic;
}
.nm-pj__intro { margin: 0 0 4px; }

/* ---------- Engagement / cases CGU (fieldset[data-inline-links]) ---------- */
[data-inline-links] a { text-decoration: underline; color: inherit; }
.nm-engage {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  line-height: 1.5;
  padding: 8px 0;
}
.nm-engage > input[type="checkbox"] { margin: 3px 0 0; }
.nm-engage--block {
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}

/* ---------- Recap & totals — sous-libellés discrets ---------- */
.nm-recap__sub { font-size: 12px; color: var(--text-2); }
.nm-totals__sub { font-size: 11px; color: var(--text-2); }

/* ---------- Tabs (vraies tabs JS, masquage des panneaux) ---------- */
.nm-tabs {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  margin: -32px -40px 32px;
  padding: 0 40px;
  display: flex;
  gap: 0;
  font-size: 13px;
  overflow-x: auto;
  overflow-y: hidden;
}
.nm-tabs__tab {
  background: transparent;
  border: none;
  padding: 14px 20px;
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.nm-tabs__tab:hover { color: var(--text); }
.nm-tabs__tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.nm-tabs__tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.nm-tabs__spacer { flex: 1; }
.nm-tabs__meta {
  align-self: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Edit-block (progressive disclosure : résumé ↔ formulaire) ---------- */
.nm-edit-block {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 20px 24px;
  margin: 0 0 16px;
}
.nm-edit-block:last-child { margin-bottom: 0; }
.nm-edit-block[data-edit-state="editing"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.nm-edit-block[data-edit-state="editing"] [data-edit-open] { display: none; }
.nm-edit-block__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
}
.nm-edit-block__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  margin: 0;
  color: var(--text);
}
.nm-edit-block__summary {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}
.nm-edit-block__summary strong { color: var(--text); font-weight: 500; }
.nm-edit-block__form {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nm-edit-block__form[hidden] { display: none; }
.nm-edit-block[data-edit-state="editing"] .nm-edit-block__form {
  border-top-color: color-mix(in oklab, var(--accent) 30%, var(--border));
}
.nm-edit-block__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border: none;
  padding: 0;
  margin: 0;
}

/* En-tête de panneau (sans cadre, juste overline + meta) */
.nm-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 16px;
}
.nm-panel-head .nm-card__h { margin: 0; }
.nm-panel-head__meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nm-panel-intro {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 75ch;
  margin: 0 0 20px;
}

/* ============================================================
   Utilitaires & composants partagés (factorisation des inline)
   ============================================================ */

/* ---------- Typographie : tailles ---------- */
.fs-9  { font-size: 9px; }
.fs-10 { font-size: 10px; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-15 { font-size: 15px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-22 { font-size: 22px; }
.fs-24 { font-size: 24px; }
.fs-28 { font-size: 28px; }
.fs-32 { font-size: 32px; }
.fs-36 { font-size: 36px; }
.fs-44 { font-size: 44px; }

/* ---------- Couleurs sémantiques ---------- */
.text-default { color: var(--text); }
.text-muted   { color: var(--text-2); }
.text-subtle  { color: var(--text-3); }
.text-success { color: var(--success-text); }
.text-error   { color: var(--error-text); }
.text-warning { color: var(--warning-text); }
.text-info    { color: var(--info-text); }
.text-accent  { color: var(--accent); }

/* ---------- Flex & gap ---------- */
.flex          { display: flex; }
.flex-col      { display: flex; flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-baseline{ align-items: baseline; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end   { justify-content: flex-end; }
.justify-center{ justify-content: center; }
.gap-4  { gap: 4px; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

/* ---------- Boîte générique encadrée ---------- */
.nm-box {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
}
.nm-box--lg { padding: 20px 24px; }
.nm-box--sm { padding: 12px 14px; }

/* ---------- Cartes accent (compléments) ---------- */
.nm-card--accent-error   { border-left: 3px solid var(--error-text); }
.nm-card--accent-error   .nm-card__h { color: var(--error-text); }
.nm-card--accent-warning { border-left: 3px solid var(--warning-text); }
.nm-card--accent-warning .nm-card__h { color: var(--warning-text); }
.nm-card--accent-accent  { border-left: 3px solid var(--accent); }
.nm-card--accent-accent  .nm-card__h { color: var(--accent); }

/* ---------- Label monospace en majuscules ---------- */
.label-mono-upper {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   Composants migrés depuis les blocs <style> locaux
   ============================================================ */

/* ---------- Pages auth (login / signup / forgot) ---------- */
.auth-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
.auth-aside {
  background: var(--surface);
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  border-right: 1px solid var(--border);
}
.auth-aside__quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 480px;
}
.auth-form-col {
  background: var(--bg);
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Pill « source » dans les tableaux (Auto / Manuel) ---------- */
.nm-pill--src {
  font-size: 10px;
  padding: 2px 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Coffre-fort : aperçu PDF ---------- */
.nm-pdf-preview {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0;
  overflow: hidden;
}
.nm-pdf-preview__chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  font-size: 12px;
  color: var(--text-2);
}
.nm-pdf-preview__viewer {
  height: 720px;
  background: #fafafa;
  background-image:
    repeating-linear-gradient(
      135deg,
      var(--border) 0,
      var(--border) 1px,
      transparent 1px,
      transparent 14px
    );
}

/* ---------- Coffre-fort : quota de stockage ---------- */
.nm-quota {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 24px;
}
.nm-quota__label {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  margin: 0 0 8px;
}
.nm-quota__bar {
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.nm-quota__fill {
  height: 100%;
  background: var(--text);
}
.nm-quota__hint {
  font-size: 11px;
  color: var(--text-2);
  margin: 6px 0 0;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.nm-quota__cta { white-space: nowrap; }

/* ---------- Coffre-fort : import (dropzone + mini-quota) ---------- */
.nm-dropzone {
  border: 1px dashed var(--border);
  padding: 32px 24px;
  text-align: center;
  background: var(--surface);
}
.nm-dropzone__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-2);
}
.nm-dropzone__formats {
  margin: 14px 0 0;
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nm-quota-mini__bar {
  height: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  margin: 8px 0 6px;
}
.nm-quota-mini__fill {
  height: 100%;
  background: var(--text);
}

/* ---------- Page publique (dossier-public) ---------- */
.nm-public {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
/* Layout racine pour les formulaires publics légers (ex. recu-form §7.K.E) —
   styles de gabarit appliqués inline dans la maquette. */
.nm-public__form {}
.nm-public__head {
  border-top: 4px solid var(--text);
  padding-top: 24px;
  margin-bottom: 32px;
}
.nm-public__brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-bottom: 24px;
}
.nm-public__title {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.nm-public__sub {
  color: var(--text-2);
  font-size: 14px;
  margin: 0;
}
.nm-public__group { margin-bottom: 40px; }
.nm-public__group-h {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 16px;
  color: var(--text);
}
.nm-public__doc {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.nm-public__doc:last-child { border-bottom: 1px solid var(--border); }
.nm-public__doc-icon {
  width: 40px;
  height: 48px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-3);
}
.nm-public__doc-name {
  font-weight: 500;
  font-size: 15px;
  margin: 0 0 4px;
}
.nm-public__doc-meta {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.nm-public__foot {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}
.nm-public__foot a {
  color: var(--text-2);
  text-decoration: underline;
}

/* ---------- Modale mock (livre-recettes) ---------- */
.nm-modal-mock {
  position: relative;
  border: 1px solid var(--text);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  background: var(--bg);
  padding: 0;
  margin-bottom: 24px;
}
.nm-modal-mock__chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.nm-modal-mock__title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}
.nm-modal-mock__body { padding: 20px; }
.nm-modal-mock__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  gap: 12px;
}
.nm-modal-mock__hint { font-size: 12px; color: var(--text-2); }
.nm-mock-tag {
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--bg);
  padding: 0 8px;
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nm-rr-row--correction {
  background: color-mix(in oklab, var(--warning-text) 7%, transparent);
}
.nm-rr-row--correction .is-amount {
  color: var(--error-text);
}

/* ---------- Bouton désactivé ---------- */
.nm-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: auto;
}
.nm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.nm-btn:disabled:hover { border-color: var(--border); }
.nm-btn--solid:disabled:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ---------- Registre achats : fournisseur repliable ---------- */
.nm-rg-supplier {
  border: 1px solid var(--border);
  margin-bottom: 16px;
  background: var(--bg);
}
.nm-rg-supplier__head {
  display: grid;
  grid-template-columns: 24px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.nm-rg-supplier__head::-webkit-details-marker { display: none; }
.nm-rg-supplier__chevron {
  font-size: 12px;
  color: var(--text-3);
  transition: transform 0.15s;
}
.nm-rg-supplier[open] > .nm-rg-supplier__head .nm-rg-supplier__chevron {
  transform: rotate(90deg);
}
.nm-rg-supplier__name {
  font-weight: 500;
  font-size: 14px;
}
.nm-rg-supplier__meta {
  font-size: 12px;
  color: var(--text-2);
  font-family: var(--mono);
  letter-spacing: 0.04em;
}
.nm-rg-supplier__count {
  font-size: 12px;
  color: var(--text-2);
}
.nm-rg-supplier__total {
  font-family: var(--mono);
  font-weight: 500;
}
.nm-rg-supplier__body {
  padding: 4px 16px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.nm-rg-supplier__pay {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

/* ---------- Spinner ---------- */
.nm-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: nm-spin 0.8s linear infinite;
}
@keyframes nm-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .auth-grid       { grid-template-columns: 1fr; min-height: auto; }
  .auth-aside      { padding: 40px 24px; gap: 32px; }
  .auth-aside__quote { font-size: 28px; }
  .auth-form-col   { padding: 40px 24px; }
}
@media (max-width: 960px) {
  .nm-hero__grid,
  .nm-split,
  .nm-faq { grid-template-columns: 1fr; }
  .nm-split > article { border-right: none; border-bottom: 1px solid var(--border); }
  .nm-split > article:last-child { border-bottom: none; }
  .nm-steps { grid-template-columns: 1fr; gap: 32px; }
  .nm-steps::before { display: none; }
  .nm-comply, .nm-pricing { grid-template-columns: 1fr; }
  .nm-comply > div, .nm-pricing__plan { border-right: none; border-bottom: 1px solid var(--border); }
  .nm-preview { grid-template-columns: 1fr; }
  .nm-preview__side { border-right: none; border-bottom: 1px solid var(--border); }
  .nm-footer__grid { grid-template-columns: 1fr 1fr; }
  .nm-nav__links { display: none; }

  .nm-stats { grid-template-columns: 1fr 1fr; }
  .nm-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .nm-stat:nth-child(2n) { border-right: none; }
  .nm-grid-2, .nm-grid-2--inv, .nm-grid-2--equal, .nm-grid-3 { grid-template-columns: 1fr; }
  .nm-form__row, .nm-form__row--3 { grid-template-columns: 1fr; }
  .nm-index__grid { grid-template-columns: 1fr; }
  .nm-lines__head, .nm-lines__row { grid-template-columns: 1fr; gap: 6px; }

  .nm-wizard__steps { grid-template-columns: 1fr; }
  .nm-wizard__step { border-right: none; border-bottom: 1px solid var(--border); }
  .nm-wizard__step:last-child { border-bottom: none; }
  .nm-wizard__panel-h { font-size: 24px; }
  .nm-wizard__nav { flex-direction: column; align-items: stretch; }
  .nm-wizard__nav-actions { justify-content: stretch; }
  .nm-wizard__nav-actions .nm-btn { flex: 1; }
  .nm-recap__row { grid-template-columns: 1fr; gap: 8px; }
  .nm-recap__edit { justify-self: start; }

  .nm-tabs {
    margin: -24px -20px 24px;
    padding: 0 20px;
    overflow-x: auto;
  }
  .nm-tabs__tab { padding: 12px 14px; white-space: nowrap; }
  .nm-tabs__meta { display: none; }
}

/* ---------- Responsive — App drawer (mobile) ---------- */
@media (max-width: 768px) {
  .nm-app {
    grid-template-columns: 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
  }
  .nm-app__topbar { grid-row: 1; grid-column: 1; }
  .nm-app__main   { grid-row: 2; grid-column: 1; padding: 24px 20px; }

  .nm-app__sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: calc(var(--drawer-z) + 1);
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
    overflow-y: auto;
  }
  .nm-app__sidebar.is-open { transform: translateX(0); }

  .nm-topbar { padding: 0 16px; gap: 12px; }
  .nm-topbar__hamburger { display: inline-flex; }
  .nm-topbar__search { display: none; }
  .nm-topbar__crumbs { display: none; }
  .nm-topbar__org { display: none; }
  .nm-topbar__action--create .nm-topbar__action-label { display: none; }
}

/* ===========================================================
   État vide neutre — widgets dont le contenu sera fourni par un
   EPIC aval (ex. dashboard-prospect : Activité récente, Mes
   scénarios, Aides identifiées, Conseil éditorial). On grise le
   contenu placeholder et on superpose un badge "À venir".
   =========================================================== */
[data-empty="true"] {
  position: relative;
}

[data-empty="true"] > *:not([data-empty-overlay]) {
  opacity: 0.45;
  filter: grayscale(0.6);
  pointer-events: none;
}

[data-empty="true"]::after {
  content: "À venir";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px dashed var(--border);
  padding: 8px 16px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  pointer-events: none;
}

/* ===========================================================
   Bandeau d.information générique — utilisé pour signaler aux
   utilisateurs un état non câblé ou une information transverse
   à un écran (ex. onboarding pages : "Activation bientôt
   disponible"). Style sobre, cohérent avec --info-text.
   =========================================================== */
.nm-banner {
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-2);
  background: var(--surface);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.nm-banner strong { color: var(--text); }

.nm-banner--info {
  border-left-color: var(--info-text);
}

/* ---------- EPIC-006/6.1 — Activités micro-entreprise ---------- */

/* Pills supplémentaires : activité principale et activité réglementée. */
.nm-pill--principal {
  color: var(--accent);
  border-color: color-mix(in oklab, var(--accent) 35%, var(--border));
  background: var(--accent-soft);
}
.nm-pill--principal .nm-pill__dot { background: var(--accent); }
.nm-pill--regulated {
  color: var(--warning-text);
  border-color: color-mix(in oklab, var(--warning-text) 35%, var(--border));
}
.nm-pill--regulated .nm-pill__dot { background: var(--warning-text); }

/* Liste verticale de cards d'activités (1 principale + N secondaires + archivées). */
.nm-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Variante card pour une activité ; héritage de .nm-card avec un padding cohérent. */
.nm-card--activity {
  padding: 16px 18px;
}
.nm-card--activity[data-activity-archived] {
  opacity: 0.72;
  background: var(--surface);
}

/* Sub-fieldset visuel (RC Pro / décennale conditionnels dans la page edit activité). */
.nm-fieldset__sub {
  border-left: 2px solid color-mix(in oklab, var(--accent) 35%, var(--border));
  padding: 12px 0 4px 16px;
  margin-left: 4px;
}

/* Variantes nm-field. */
.nm-field--toggle {
  display: block;
}
.nm-field--toggle > label {
  margin: 0;
}
.nm-field--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.nm-field--inline > input { flex: 0 0 auto; }

/* ===========================================================
   EPIC-007/7.1 — Médiation B2C, documents publics, fin de relation
   =========================================================== */

/* Variante warning du bandeau d'info (compte résilié, archivage). */
.nm-banner--warning {
  border-left-color: var(--warning-text);
}

/* EPIC-032/32.4 — Variante critical du bandeau (alertes dashboard payant). */
.nm-banner--critical {
  border-left-color: var(--error-text);
}

/* EPIC-032/32.4 — Variante teintée des cartes accent (utilisée pour blocs prioritaires : Alertes dashboard, Livre recettes ritual). À combiner avec .nm-card--accent-*. */
.nm-card--tinted.nm-card--accent-accent  { background: color-mix(in oklab, var(--accent) 4%, var(--bg)); }
.nm-card--tinted.nm-card--accent-info    { background: color-mix(in oklab, var(--info-text) 4%, var(--bg)); }
.nm-card--tinted.nm-card--accent-success { background: color-mix(in oklab, var(--success-text) 4%, var(--bg)); }
.nm-card--tinted.nm-card--accent-warning { background: color-mix(in oklab, var(--warning-text) 4%, var(--bg)); }
.nm-card--tinted.nm-card--accent-error   { background: color-mix(in oklab, var(--error-text) 4%, var(--bg)); }

/* EPIC-032/32.4 — Variante solid accent : fond accent plein pour les blocs d'urgence (Alertes dashboard). Le titre passe en blanc ; la barre latérale .nm-card--accent-accent devient invisible mais le marqueur sémantique reste utile. */
.nm-card--solid-accent {
  background: var(--accent);
  border-color: var(--accent);
}
.nm-card--solid-accent .nm-card__title,
.nm-card--solid-accent .nm-card__h {
  color: #fff;
}

/* EPIC-032/32.4 — Pill accent rempli (livre des recettes notamment). Le fond teinté distingue ce pill métier des pills d'état. */
.nm-pill--accent { background: color-mix(in oklab, var(--accent) 12%, transparent); }

/* EPIC-032/32.4 — Ligne d'actions à l'intérieur d'un nm-banner (CTA + lien sous le message d'alerte). */
.nm-banner__actions { display: flex; gap: 12px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

/* EPIC-032/32.4 — Layout d'un nm-banner pleine largeur (résiliation, invitation N+1) : message à gauche, actions à droite, wrap mobile. */
.nm-banner__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.nm-banner__row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* EPIC-030/30.4 — Variante du timeline-what affichée en bloc sous un pill (timeline À venir, échéances). */
.nm-timeline__what--block { display: block; margin-top: 4px; }

/* EPIC-032/32.4 — Liste compacte "Aides en cours" (dashboard payant) : 1 ligne par aide active, séparateurs fins. */
.nm-aid-list { list-style: none; padding: 0; margin: 0; }
.nm-aid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.nm-aid-row:last-child { border-bottom: 1px solid var(--border); }

/* Modale prod (HTML5 <dialog>). Distincte de .nm-modal-mock (revue maquette). */
.nm-modal {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0;
  max-width: 600px;
  width: 90vw;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.18);
}
.nm-modal::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}
.nm-modal__head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.nm-modal__head h2 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nm-modal__body {
  padding: 24px;
  font-size: 14px;
  line-height: 1.55;
}
.nm-modal__foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--surface);
}

/* Modifier de .nm-card pour panneau de modale autonome (page de review §25). */
.nm-modal__panel { max-width: 600px; width: 100%; margin-inline: auto; padding: 0; }

/* Sections additionnelles du dossier public (cohérent avec .nm-public__doc). */
.nm-public__cgv {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.nm-public__mediation {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.55;
}
.nm-public__mediation a { color: var(--accent); }

/* ============================================================
 * EPIC-026.6 — Impression (export PDF natif via window.print()).
 * Scope sélectionné par data-print-scope sur <body> au moment
 * du clic sur "Exporter PDF" (cf. simulator_print_controller).
 * ============================================================ */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .nm-sidebar,
  .nm-topbar,
  .nm-sidebar__backdrop,
  .nm-page-head__actions,
  .nm-banner,
  #toast-container,
  dialog.nm-modal {
    display: none !important;
  }
  .nm-app {
    display: block;
  }
  .nm-app__main {
    padding: 0;
    margin: 0;
  }
  .nm-page-head {
    margin-bottom: 16px;
  }
  .nm-card,
  .nm-fieldset,
  .nm-stat {
    break-inside: avoid;
    box-shadow: none !important;
  }
  a {
    color: inherit;
    text-decoration: none;
  }

  body[data-print-scope="simulator"] .nm-grid-2--inv {
    display: block;
  }
  body[data-print-scope="simulator"] .nm-grid-2--inv > aside {
    display: none !important;
  }

  body[data-print-scope="comparator"] [data-scenario-comparator-target="filters"],
  body[data-print-scope="comparator"] [data-scenario-comparator-target="emptyState"] {
    display: none !important;
  }
}

/* ===========================================================
   EPIC-038/38.1 — Compte démo : composants partagés
   (modale #restricted-feature, badge démo, bandeaux démo)
   =========================================================== */

/* Badge « Démo » — variante neutre du nm-pill, distincte des statuts métier. */
.nm-pill--demo {
  color: var(--text-3);
  border-color: color-mix(in oklab, var(--text-3) 30%, var(--border));
  background: var(--surface);
}
.nm-pill--demo .nm-pill__dot { background: var(--text-3); }

/* EPIC-009/9.7 — Affichage conditionnel des éléments réservés au compte démo.
   Les éléments porteurs de `[data-demo-only]` (badges « démo » dans les listes
   clients §3, articles §10, devis §12, factures §13) sont masqués par défaut
   et n'apparaissent que sous un ancêtre `[data-demo="true"]` (posé par les
   controllers Stimulus quand `organization.onboardingStage === 'pre_inpi_payment'`).
   Pattern à point d'autorité unique — réutilisé par 10.8 / 12.9 / 13.10. */
[data-demo-only] { display: none; }
[data-demo="true"] [data-demo-only] { display: inline-flex; }

/* Bandeau d'avertissement liste/détail (vue détail devis/facture en démo). */
.nm-banner--demo-warning {
  border-left-color: var(--warning-text);
  background: color-mix(in oklab, var(--warning-text) 8%, var(--surface));
}

/* Bandeau global permanent (dashboard prospect §15.A). */
.nm-banner--demo-global {
  border-left-color: var(--text-2);
  background: var(--surface);
}

/* Élément BEM pour un groupe de 2+ boutons alignés à droite dans une modal-mock.
   Distinct de __footer (pattern « hint à gauche + bouton à droite »). */
.nm-modal-mock__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  gap: 12px;
}

/* Bouton de fermeture dans le chrome de la modal-mock. */
.nm-modal-mock__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-2);
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
}
.nm-modal-mock__close:hover { color: var(--text); }

/* ===========================================================
   EPIC-042.5 — Paiements : autocomplete factures
   Liste de suggestions déroulante sous un champ de saisie.
   =========================================================== */

.nm-autocomplete {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--menu-elevation);
  max-height: 240px;
  overflow-y: auto;
}

.nm-autocomplete__item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}

.nm-autocomplete__item:hover,
.nm-autocomplete__item[aria-selected="true"] {
  background: color-mix(in oklab, var(--accent) 10%, var(--surface));
  color: var(--indigo-text);
}

/* ===========================================================
   EPIC-047.1 — Trajectoire CA + conseil humain
   Containers de page (scope pour CSS futur si besoin) + alias
   d'erreur de formulaire global aligné sur .nm-field__error.
   =========================================================== */

.nm-form__error { font-size: 13px; color: var(--danger, #c0392b); margin: 2px 0 0; }

.nm-trajectoire,
.nm-trajectoire-edition,
.adm-followups,
.adm-followup-detail { display: block; }

/* ===========================================================
   EPIC-099.12 — Historique d'audit `payment_transaction_event`
   Timeline discrète affichée en pleine largeur sous le formulaire
   d'édition d'un paiement (§7.I.G). Pas de surface (transparente),
   typographie ramassée — la timeline doit céder le pas au formulaire.
   =========================================================== */

.nm-history { margin-top: 24px; }
.nm-history__title { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.nm-history__empty { margin: 0; }
.nm-history__list { list-style: none; margin: 0; padding: 0; }
.nm-history__item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border, #e5e7eb);
  font-size: 13px;
}
.nm-history__item:first-child { border-top: none; }
.nm-history__when { color: var(--text-muted, #6b7280); white-space: nowrap; }
.nm-history__what { color: var(--text, #111827); }
