/* Nya Design System (cœur, chargé partout dont /pay) — voir NYA_DESIGN_SYSTEM.md et
   assets/nya-console.css (styles propres à la console admin). Aucune ressource tierce (FR-013). */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  font-synthesis-weight: none;

  /* Jetons de rôle (contracts/design-tokens.md §1) */
  --nya-ink: #17181d;
  --nya-on-ink: #faf7f2;
  --nya-on-ink-muted: #c9c7bd;
  --nya-paper: #faf7f2;
  --nya-surface: #ffffff;
  --nya-surface-2: #f2eee5;
  --nya-text: #17181d;
  --nya-muted: #625f57;
  --nya-border: #e4ddcd;
  --nya-border-strong: #8f897c;
  --nya-accent: #b4441c;
  --nya-accent-ink: #963817;
  --nya-accent-soft: #f6e2d6;
  --nya-accent-on-ink: #e07a4f;
  --nya-ok: #1f6f4a;
  --nya-ok-soft: #dcefe4;
  --nya-warn: #8a5a06;
  --nya-warn-soft: #f6ead1;
  --nya-bad: #b3261e;
  --nya-bad-soft: #f7e1df;
  /* 032: voile des boîtes de dialogue et du tiroir mobile (non-texte). */
  --nya-scrim: rgba(23, 24, 29, 0.45);

  /* 031 (D-017): values already in use, now named. --op-* belong to the operator badges only
     (.operator-badge, .pv-badge); --nya-ink-* are the hover/hairline on an ink background. */
  --op-mtn: #ffcc00;
  --op-orange: #ff6600;
  --nya-ink-hover: rgba(250, 247, 242, 0.08);
  --nya-ink-border: rgba(250, 247, 242, 0.12);

  --nya-font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --nya-font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Courier New",
    monospace;

  --nya-text-xs: 0.75rem;
  --nya-text-sm: 0.875rem;
  --nya-text-base: 1rem;
  --nya-text-lg: 1.125rem;
  --nya-text-xl: 1.25rem;
  --nya-text-2xl: 1.5rem;
  --nya-text-3xl: 1.875rem;
  --nya-text-4xl: 2.25rem;

  /* Spacing (base 4px) */
  --nya-spacing-1: 0.25rem;
  --nya-spacing-2: 0.5rem;
  --nya-spacing-3: 0.75rem;
  --nya-spacing-4: 1rem;
  --nya-spacing-5: 1.25rem;
  --nya-spacing-6: 1.5rem;
  --nya-spacing-8: 2rem;
  --nya-spacing-10: 2.5rem;
  --nya-spacing-12: 3rem;
  --nya-spacing-16: 4rem;

  --nya-radius: 8px;
  --nya-radius-lg: 12px;
  --nya-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --nya-shadow-menu: 0 10px 30px rgba(23, 24, 29, 0.14);
  --nya-shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  :root {
    --nya-text-2xl: 1.75rem;
    --nya-text-3xl: 2.25rem;
    --nya-text-4xl: 3rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* 023 (P0-06, FR-010): native controls take the palette — radios and checkboxes no longer render in
   the browser's blue, and text typed in a field is ink, not pure black. */
:root {
  accent-color: var(--nya-accent);
}
input,
select,
textarea {
  color: var(--nya-text);
}
/* 040: the WhatsApp opt-in (pay page and cart) is a checkbox beside its words, never a full-width field. */
.wa-optin label { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; }
.wa-optin input[type="checkbox"] { flex: none; width: 1.125rem; height: 1.125rem; min-height: 0; margin: 0.15rem 0 0; padding: 0; }
.wa-optin small { display: block; margin-top: 0.25rem; }
/* A browser-autofilled field keeps the surface colour instead of its pale blue/yellow wash. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--nya-surface) inset;
  -webkit-text-fill-color: var(--nya-ink);
  caret-color: var(--nya-ink);
}

body {
  margin: 0;
  font-family: var(--nya-font-sans);
  font-size: var(--nya-text-base);
  line-height: 1.6;
  color: var(--nya-text);
  background: var(--nya-paper);
  overflow-wrap: anywhere; /* SC-011 — a long email/token must never force horizontal scroll */
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--nya-text);
  margin: 0 0 var(--nya-spacing-4);
  font-weight: 600;
}

h1 {
  font-size: var(--nya-text-3xl);
}
h2 {
  font-size: var(--nya-text-2xl);
}
h3 {
  font-size: var(--nya-text-lg);
}

p {
  margin: 0 0 var(--nya-spacing-4);
}

a {
  color: var(--nya-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
/* 023 (P0-02, FR-006): Blazor's <FocusOnNavigate Selector="h1"> focuses the page title after each
   navigation (tabindex="-1") so screen readers announce it — that programmatic focus must not draw
   the browser's outline. Interactive elements keep theirs (rule below). */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible {
  outline: none;
}

a:focus-visible,
button:focus-visible,
.nya-btn:focus-visible,
.nya-input:focus-visible,
.nya-select:focus-visible {
  outline: 2px solid var(--nya-accent);
  outline-offset: 2px;
}

code,
.nya-mono {
  font-family: var(--nya-font-mono);
  font-size: 0.9em;
}

/* Layout */
.nya-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: var(--nya-spacing-6) var(--nya-spacing-4);
}

.nya-container--wide {
  max-width: 960px;
}

.nya-hero {
  background: var(--nya-ink);
  color: var(--nya-on-ink);
  padding: var(--nya-spacing-12) var(--nya-spacing-4);
  text-align: center;
}
.nya-hero h1 {
  color: var(--nya-on-ink);
}
.nya-hero a {
  color: var(--nya-on-ink);
}

/* Cards */
.nya-card {
  background: var(--nya-surface);
  border-radius: var(--nya-radius-lg);
  padding: var(--nya-spacing-6);
  box-shadow: var(--nya-shadow-card);
}

.nya-card + .nya-card {
  margin-top: var(--nya-spacing-4);
}

/* Buttons */
/* 023 (P0-06, FR-010): a .nya-btn without a variant IS the secondary button — it used to fall back to
   the browser's grey (rgb(240,240,240) on black), in the portal and the admin console alike. */
.nya-btn {
  display: inline-block;
  width: 100%;
  padding: 12px 24px;
  border-radius: var(--nya-radius);
  font-family: inherit;
  font-weight: 600;
  font-size: var(--nya-text-base);
  border: 2px solid var(--nya-border);
  background: var(--nya-surface-2);
  color: var(--nya-ink);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  text-align: center;
}

.nya-btn-primary {
  background: var(--nya-accent);
  border-color: transparent;
  color: var(--nya-surface);
}
.nya-btn-primary:hover {
  background: var(--nya-accent-ink);
  text-decoration: none;
}
.nya-btn-primary:active {
  transform: translateY(1px);
}
.nya-btn-primary:disabled {
  background: var(--nya-border);
  cursor: not-allowed;
}

/* 031 (D-018, FR-020): one rule for a disabled button, every variant — surface-2 / muted / border
   (couple #6, 5.5:1), never a bare opacity. */
.nya-btn:disabled,
.nya-btn[aria-disabled="true"] {
  background: var(--nya-surface-2);
  border-color: var(--nya-border);
  color: var(--nya-muted);
  cursor: not-allowed;
}

/* 031 (FR-019): a list without bullets — article and link lists. */
.nya-list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 023 (P0-06, FR-010): the one secondary button — surface-2 and ink, never a latérite outline
   (latérite marks the primary action only, 021/FR-003). */
.nya-btn-secondary {
  background: var(--nya-surface-2);
  color: var(--nya-ink);
  border-color: var(--nya-border);
}
.nya-btn:not([class*="nya-btn-"]):hover,
.nya-btn-secondary:hover {
  border-color: var(--nya-border-strong);
  text-decoration: none;
}
.nya-btn:not([class*="nya-btn-"]):disabled,
.nya-btn-secondary:disabled {
  color: var(--nya-muted);
  cursor: not-allowed;
}

.nya-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--nya-accent);
  width: auto;
  padding: 8px 12px;
}
.nya-btn-ghost:hover {
  border-color: transparent;
  text-decoration: underline; /* never --nya-accent on --nya-accent-soft: 4.43:1, a forbidden couple (§2) */
}

/* 031 (D-019, P5-23): a field in error is framed in rust (--nya-bad, 6.54:1 on white) as well as described by its message. */
.nya-input[aria-invalid="true"],
.nya-select[aria-invalid="true"] {
  border-color: var(--nya-bad);
}

/* Forms */
.nya-field {
  margin-bottom: var(--nya-spacing-4);
}
.nya-field label {
  display: block;
  font-size: var(--nya-text-sm);
  font-weight: 600;
  color: var(--nya-text);
  margin-bottom: var(--nya-spacing-2);
}
.nya-input,
.nya-select {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: var(--nya-text-base);
  color: var(--nya-text);
  background: var(--nya-surface);
  border: 2px solid var(--nya-border-strong);
  border-radius: var(--nya-radius);
}
.nya-input:focus,
.nya-select:focus {
  outline: none;
  border-color: var(--nya-accent);
}
.nya-field--error .nya-input,
.nya-field--error .nya-select {
  border-color: var(--nya-bad);
}
.nya-field-error {
  display: block;
  margin-top: var(--nya-spacing-2);
  font-size: var(--nya-text-sm);
  color: var(--nya-bad);
}

/* Alerts / callouts */
.nya-alert {
  padding: var(--nya-spacing-4);
  border-radius: var(--nya-radius);
  font-size: var(--nya-text-sm);
  margin-bottom: var(--nya-spacing-4);
}
.nya-alert-success {
  background: var(--nya-ok-soft);
  color: var(--nya-ok);
}
.nya-alert-warning {
  background: var(--nya-warn-soft);
  color: var(--nya-warn);
}
.nya-alert-error {
  background: var(--nya-bad-soft);
  color: var(--nya-bad);
}
.nya-alert-info {
  background: var(--nya-surface-2);
  color: var(--nya-text);
}

/* Credential / copy row */
.nya-copy-row {
  display: flex;
  gap: var(--nya-spacing-2);
  align-items: center;
  margin-bottom: var(--nya-spacing-3);
}
.nya-copy-row .nya-mono {
  flex: 1;
  overflow-wrap: anywhere;
  background: var(--nya-surface-2);
  padding: 10px 12px;
  border-radius: var(--nya-radius);
  font-size: var(--nya-text-sm);
}
.nya-copy-row button {
  flex: 0 0 auto;
  width: auto;
  padding: 10px 14px;
}

/* Collapsible ("accès technique") */
.nya-collapse > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--nya-text);
  padding: var(--nya-spacing-3) 0;
  list-style: none;
}
.nya-collapse > summary::-webkit-details-marker {
  display: none;
}
.nya-collapse > summary::before {
  content: "▸ ";
  color: var(--nya-muted);
}
.nya-collapse[open] > summary::before {
  content: "▾ ";
}

/* Utilities */
.nya-muted {
  color: var(--nya-muted);
}
.nya-text-sm {
  font-size: var(--nya-text-sm);
}
.nya-mt-6 {
  margin-top: var(--nya-spacing-6);
}
.nya-center {
  text-align: center;
}
[hidden] {
  display: none !important;
}

/* Steps (vitrine — parcours en 3 temps) */
.nya-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: var(--nya-spacing-6) 0;
}
.nya-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin-bottom: var(--nya-spacing-5);
}
.nya-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--nya-surface-2);
  color: var(--nya-text);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Composants ajoutés (contracts/design-tokens.md §5) */
.nya-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--nya-text-sm);
  font-weight: 600;
  white-space: nowrap;
}
.nya-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.nya-pill--ok {
  color: var(--nya-ok);
  background: var(--nya-ok-soft);
}
.nya-pill--warn {
  color: var(--nya-warn);
  background: var(--nya-warn-soft);
}
.nya-pill--bad {
  color: var(--nya-bad);
  background: var(--nya-bad-soft);
}
.nya-pill--neutral {
  color: var(--nya-muted);
  background: var(--nya-surface-2);
}
/* 035 (FR-035) : « Prête » et « En route » - encre sur le fond d'accent doux (jamais --nya-accent dessus : 4,43:1, couple interdit). */
.nya-pill--accent {
  color: var(--nya-text);
  background: var(--nya-accent-soft);
}

.nya-text-ok {
  color: var(--nya-ok);
}
.nya-text-bad {
  color: var(--nya-bad);
}

/* 045 (FR-060): amounts, dates, settings and counters use the text font with tabular figures; the fixed-width font is for identifiers only (.nya-id). */
.nya-num {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; /* an id/date/amount reads worse broken than overflowing (SC-011, recette.md) */
}

/* 045 (FR-060): an identifier (a reference, a code, a fingerprint). */
.nya-id {
  font-family: var(--nya-font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 045 (P11-26): a copy button never breaks its label across two lines, whatever the language. */
.nya-copy {
  white-space: nowrap;
}

/* 045 (FR-059): from 768 px a button is as wide as its text in the merchant space and the console; full width is for narrower screens. */
@media (min-width: 768px) {
  .nya-container--wide .nya-btn,
  .nya-shell-main .nya-btn {
    width: auto;
  }
}

/* Tableaux de données — MerchantApp (tableau de bord) et console admin. La colonne défile (pas la
   page) si trop large (SC-011) — jamais de casse au milieu d'un mot. */
.nya-table-scroll {
  overflow-x: auto;
}
.nya-table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: var(--nya-text-sm);
}
.nya-table th,
.nya-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--nya-border);
  overflow-wrap: normal;
}
.nya-table th {
  background: var(--nya-surface-2);
  color: var(--nya-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.nya-table tbody tr:hover {
  background: var(--nya-surface-2);
}
.nya-table a {
  font-weight: 600;
}

/* Applications connectées — en-tête et navigation partagés */
.nya-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--nya-spacing-3);
  padding: var(--nya-spacing-4) 0;
}

.nya-app-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: var(--nya-text-lg);
  color: var(--nya-text);
  text-decoration: none;
}
.nya-app-brand:hover {
  text-decoration: none;
}

.nya-app-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--nya-spacing-1);
}

.nya-app-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--nya-radius);
  font-size: var(--nya-text-sm);
  font-weight: 600;
  color: var(--nya-muted);
  text-decoration: none;
}
.nya-app-nav a:hover {
  background: var(--nya-surface-2);
  text-decoration: none;
}
/* NavLink applies "active" automatically (Blazor router). */
.nya-app-nav a.active {
  color: var(--nya-accent-ink);
  background: var(--nya-accent-soft);
}

/* Page de paiement — /pay/{linkId} (contracts/pay-page.md). Aucune règle n'emploie --nya-accent
   (FR-007). Pile système locale : aucune police téléchargée sur cette page (FR-009, SC-004). */
body.nya-pay {
  --nya-font-sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --nya-font-mono: ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nya-paper);
  font-family: var(--nya-font-sans);
  color: var(--nya-text);
  padding: var(--nya-spacing-4);
}
body.nya-pay .card {
  width: 100%;
  max-width: 420px;
  background: var(--nya-surface);
  border-radius: var(--nya-radius-lg);
  box-shadow: var(--nya-shadow-card);
  padding: 28px 24px;
}
body.nya-pay .brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--nya-text-sm);
  color: var(--nya-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--nya-spacing-1);
}
body.nya-pay h1 {
  font-size: 20px;
  margin: 0 0 4px;
  color: var(--nya-text);
}
body.nya-pay .description {
  color: var(--nya-muted);
  margin: 0 0 20px;
  font-size: 15px;
}
/* 023 (P0-04, FR-008): the isolated amount uses the system sans stack, not the mono one — without
   IBM Plex Mono (FR-009) the mono fallback was a terminal font (Consolas, Courier). Tabular figures
   keep digits aligned; the mono rule of 021/FR-014 is for tables and records, not this figure. */
body.nya-pay .amount {
  font-family: var(--nya-font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 20px;
  color: var(--nya-text);
}
body.nya-pay .amount .currency {
  margin-left: 0.3em;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--nya-muted);
}
/* 023 (P0-03, FR-007): no link on /pay may take the browser's default blue. */
body.nya-pay a {
  color: var(--nya-muted);
  text-decoration: none;
}
body.nya-pay .fields {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}
body.nya-pay .field-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--nya-muted);
  border-bottom: 1px dashed var(--nya-border);
  padding-bottom: 6px;
}
body.nya-pay label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--nya-text);
}
body.nya-pay input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  border: 1px solid var(--nya-border-strong);
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 14px;
  color: var(--nya-text);
  background: var(--nya-surface);
}
body.nya-pay input:focus {
  outline: none;
  border-color: var(--nya-ink);
  box-shadow: 0 0 0 2px var(--nya-border-strong);
}
body.nya-pay .operator-badge {
  display: none;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin: -8px 0 14px;
  width: fit-content;
}
/* 041 (FR-010, D-002): only the primary action of each screen is a filled button; the operator cards, "Copier" and any other
   button keep their own, outlined look. */
body.nya-pay #submit-btn,
body.nya-pay #sim-pin-submit,
body.nya-pay #retry-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--nya-ink);
  color: var(--nya-on-ink);
  font-size: 16px;
  font-weight: 600;
  /* 031 (D-009): the same stack as .amount, so the narrow no-break space of "1 500 FCFA" is drawn the same. */
  font-family: var(--nya-font-sans);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
/* 031 (P5-A, FR-020): a disabled button stays legible — surface-2 / muted (couple #6), never a bare opacity. */
body.nya-pay #submit-btn:disabled,
body.nya-pay #sim-pin-submit:disabled {
  background: var(--nya-surface-2);
  color: var(--nya-muted);
  cursor: not-allowed;
}
/* 031 (P5-02): a hairline between who is paid and how much. */
body.nya-pay .amount-zone {
  border-top: 1px solid var(--nya-border);
  padding-top: 16px;
  margin-top: 16px;
}
body.nya-pay .amount-zone .amount {
  margin-bottom: 4px;
}
/* 031 (P5-01): the free amount, with its currency inside the field. */
body.nya-pay .amount-field {
  position: relative;
}
body.nya-pay .amount-field input {
  padding-right: 64px;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
body.nya-pay .amount-suffix {
  position: absolute;
  right: 14px;
  top: 12px;
  color: var(--nya-muted);
  font-weight: 600;
  pointer-events: none;
}
/* 031 (P5-03): the copy button next to the reference is a text button, not the page's primary action. */
body.nya-pay button.copy-btn {
  width: auto;
  padding: 4px 10px;
  margin-left: 6px;
  background: var(--nya-surface-2);
  color: var(--nya-ink);
  border: 1px solid var(--nya-border);
  border-radius: 10px;
  font-family: var(--nya-font-sans);
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}
body.nya-pay .status {
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
body.nya-pay .status.pending {
  color: var(--nya-warn);
  background: var(--nya-warn-soft);
}
body.nya-pay .status.pending::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--nya-warn-soft);
  border-top-color: var(--nya-warn);
}
@media (prefers-reduced-motion: no-preference) {
  body.nya-pay .status.pending::before {
    animation: nya-pay-spin 0.8s linear infinite;
  }
}
@keyframes nya-pay-spin {
  to {
    transform: rotate(360deg);
  }
}
body.nya-pay .status.success {
  color: var(--nya-ok);
  background: var(--nya-ok-soft);
}
body.nya-pay .status.error {
  color: var(--nya-bad);
  background: var(--nya-bad-soft);
}
/* 028 (FR-004): deliberately loud and distinct from every real-flow style on this page — a
   simulated screen must never be mistaken for the real payment screen, even glanced at quickly. */
body.nya-pay .simulation-badge {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 2px dashed var(--nya-warn);
  border-radius: 10px;
  color: var(--nya-warn);
  background: var(--nya-warn-soft);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}
body.nya-pay .guidance {
  font-size: 13px;
  color: var(--nya-muted);
  text-align: center;
  margin: 10px 0 0;
}
body.nya-pay .reference {
  font-size: 13px;
  color: var(--nya-muted);
  text-align: center;
  margin: 10px 0 0;
}
body.nya-pay #retry-btn {
  margin-top: 16px;
}
body.nya-pay .hidden {
  display: none;
}
/* 045 (FR-032): the information notice, in the secondary text token - no colour of its own - and its link is a real link. */
body.nya-pay .legal-notice {
  margin: 4px 0;
  font-size: var(--nya-text-xs);
  line-height: 1.35;
  color: var(--nya-muted);
}
body.nya-pay .legal-notice a {
  color: var(--nya-accent);
  text-decoration: underline;
}
body.nya-pay .footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--nya-muted);
}

/* feature 022 (D-012): pre-production signal, inserted by /env-banner.js. Amber, not the latérite
   reserved for actions (021/FR-003); --nya-ink on --nya-warn-soft comfortably clears AA. */
.nya-env-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  overflow-wrap: anywhere;
  background: var(--nya-warn-soft);
  color: var(--nya-ink);
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
}

/* feature 029 (US2, D-001): the banner is fixed, so the host reserves its height (published by
   /env-banner.js). Every rule is prefixed by the marker the script sets on <html>: without a label
   none of them applies. */
html[data-nya-env-banner] body {
  padding-top: var(--nya-env-banner-h, 0px);
}
html[data-nya-env-banner] body.nya-pay {
  padding-top: calc(var(--nya-spacing-4) + var(--nya-env-banner-h, 0px));
  min-height: calc(100vh - var(--nya-env-banner-h, 0px));
}

/* ---------------------------------------------------------------------------------------------
   023 — composants partagés (contracts/ui-components.md). Jetons de rôle uniquement.
   --------------------------------------------------------------------------------------------- */

/* Masqué à l'écran, lu par les technologies d'assistance. */
.nya-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;
}

/* Préférences du système (cas limites de la spec 023). */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .nya-pill,
  .nya-chip,
  .nya-alert,
  .nya-app-nav a.active,
  .nya-segmented [aria-checked="true"] {
    border: 1px solid CanvasText;
  }
}

/* Page de paiement — lot P1 (FR-013 à FR-016, D-013). Aucune règle n'emploie --nya-accent. */
body.nya-pay .brand {
  text-transform: none;
  letter-spacing: 0;
  gap: 8px;
  margin-bottom: var(--nya-spacing-4);
}
body.nya-pay .brand-tile {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 5px;
  background: var(--nya-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.nya-pay .brand-tile img {
  width: 14px;
  height: 14px;
}
body.nya-pay .brand-wordmark {
  height: 12px;
  width: auto;
  color: var(--nya-ink);
}
body.nya-pay .payee {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
body.nya-pay .payee-initials {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--nya-radius);
  background: var(--nya-surface-2);
  color: var(--nya-ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 029 (US6): the merchant's logo, in place of the initials. Same box as the tile; the image keeps its
   proportions, on the surface colour with a thin border so a transparent or dark logo stays legible. */
body.nya-pay .payee-logo {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--nya-radius);
  object-fit: contain;
  background: var(--nya-surface);
  border: 1px solid var(--nya-border);
}
body.nya-pay .payee-text {
  min-width: 0;
}
body.nya-pay .payee-name {
  font-weight: 700;
  font-size: 17px;
  color: var(--nya-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.nya-pay .payee-text h1 {
  font-size: 15px;
  font-weight: 400;
  color: var(--nya-muted);
  margin: 0;
}
body.nya-pay .phone-field {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-bottom: 14px;
}
body.nya-pay .phone-prefix {
  flex: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--nya-border-strong);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: var(--nya-surface-2);
  color: var(--nya-text);
  font-variant-numeric: tabular-nums;
}
body.nya-pay .phone-field input {
  margin-bottom: 0;
  border-radius: 0 10px 10px 0;
  padding-left: 10px;
  padding-right: 112px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
body.nya-pay .phone-field .operator-badge {
  font-size: 12px;
  padding: 3px 8px;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  pointer-events: none;
}
body.nya-pay .footer {
  margin-top: 16px;
}
@media (max-width: 767.98px) {
  body.nya-pay {
    align-items: flex-start;
    padding-top: 20px;
  }
  body.nya-pay .card {
    padding: 22px 18px;
  }
}

/* 045 (T061): the language picker of /pay (nya-lang.js). Same look as the one of nya-components.css, which this page does not load: two plain links, the current one bold. */
body.nya-pay .pay-lang { text-align: right; margin: 0.25rem 0 0; }
body.nya-pay .nya-lang { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8125rem; color: #555; }
body.nya-pay .nya-lang a { color: #555; text-decoration: underline; text-underline-offset: 3px; padding: 4px 2px; }
body.nya-pay .nya-lang a.nya-lang-active { color: #111; font-weight: 600; text-decoration: none; }
body.nya-pay .nya-lang a:focus-visible { outline: 2px solid #111; outline-offset: 2px; border-radius: 2px; }
@media (max-width: 767.98px) { body.nya-pay .nya-lang a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; } }
