/*
 * Demo help-centre pages (index.html, charte-donnees.html): nayu-culture identity.
 * Colours are the hex values of admin/src/theme/tokens.ts; contrast ratios are listed in
 * docs/charte-graphique.md. Corail, menthe and safran are decorative only (never text on a
 * light background). Fonts are self-hosted (fonts/, copied from @fontsource-variable at build
 * time): no request leaves the page's origin.
 */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations"),
    url(fonts/inter-latin-wght-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: "Bricolage Grotesque Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2-variations"),
    url(fonts/bricolage-grotesque-latin-wght-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 {
  --nc-encre: #16123a;
  --nc-encre-soft: #2a2456;
  --nc-violet: #5a3fe0;
  --nc-violet-hover: #4a30cf;
  --nc-violet-tint: #eeebfd;
  --nc-violet-clair: #b9aef7;
  --nc-corail: #ff6f59;
  --nc-corail-tint: #ffece8;
  --nc-menthe: #12b5a5;
  --nc-menthe-tint: #e3f6f3;
  --nc-safran: #f5b83d;
  --nc-safran-tint: #fef3c7;
  --nc-success: #0f766e;
  --nc-danger: #b42318;
  --nc-warning: #92400e;
  --nc-warning-soft: #fef3c7;
  --nc-papier: #f8f6f2;
  --nc-surface: #ffffff;
  --nc-ligne: #e7e2da;
  --nc-ligne-forte: #857f95;
  --nc-texte: #1d1a2e;
  --nc-texte-doux: #5b566e;
  --nc-sur-encre: #d4cfea;

  --font-sans: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque Variable", "Inter Variable", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono",
    monospace;

  --radius-card: 1.125rem;
  --radius-control: 0.875rem;
  --shadow-soft: 0 1px 2px rgb(22 18 58 / 0.04), 0 6px 20px -8px rgb(22 18 58 / 0.08);
  --shadow-lift: 0 2px 4px rgb(22 18 58 / 0.06), 0 16px 40px -12px rgb(22 18 58 / 0.25);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--nc-texte);
  background: var(--nc-papier);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

.nowrap {
  white-space: nowrap;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--nc-encre);
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-wrap: balance;
}

a {
  color: var(--nc-violet);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--nc-violet-hover);
  text-decoration-thickness: 2px;
}

svg {
  flex-shrink: 0;
}

/* Visible focus: violet ring (6.0:1 on papier); violet-clair on encre areas (8.9:1). */
:focus-visible {
  outline: 2px solid var(--nc-violet);
  outline-offset: 2px;
  border-radius: 0.375rem;
}

.on-encre :focus-visible {
  outline-color: var(--nc-violet-clair);
}

main:focus {
  outline: none;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-control);
  background: var(--nc-surface);
  color: var(--nc-violet);
  font-weight: 600;
  box-shadow: var(--shadow-lift);
}

.skip-link:focus {
  top: 1rem;
}

/* The skip link appears over the encre header: violet-clair ring (8.9:1 on encre). */
.skip-link:focus-visible {
  outline-color: var(--nc-violet-clair);
}

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2.5rem;
  }
}

/* ------------------------------------------------------------------ logo */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 2.25rem;
  height: 2.25rem;
}

.logo-mark .mark-body {
  fill: var(--nc-violet);
}

.logo-mark .mark-spark {
  fill: var(--nc-corail);
}

.logo .word-a {
  color: var(--nc-surface);
}

.logo .word-b {
  color: var(--nc-violet-clair);
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: relative;
  z-index: 2;
  background: var(--nc-encre);
  color: var(--nc-surface);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.875rem;
  color: var(--nc-surface);
  text-decoration: none;
}

.brand:hover {
  color: var(--nc-surface);
}

.brand-section {
  padding-left: 0.875rem;
  border-left: 1px solid rgb(255 255 255 / 0.22);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--nc-sur-encre);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.75rem;
  color: var(--nc-sur-encre);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  background: rgb(255 255 255 / 0.1);
  color: var(--nc-surface);
}

.site-nav svg {
  width: 1rem;
  height: 1rem;
}

/* "Menu" disclosure button (index page, below 1024px, like the back-office). demo.js
   un-hides it and adds .has-menu to the header; without JS the nav stays visible. */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.06);
  color: var(--nc-surface);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle:hover {
  background: rgb(255 255 255 / 0.12);
}

.menu-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.menu-toggle[hidden] {
  display: none !important;
}

@media (max-width: 1023px) {
  .has-menu .menu-toggle {
    display: inline-flex;
  }

  .has-menu .site-nav {
    display: none;
    width: 100%;
  }

  .has-menu.menu-open .site-nav {
    display: block;
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid rgb(255 255 255 / 0.12);
  }

  .has-menu .site-nav ul {
    flex-direction: column;
    margin: 0 -0.75rem;
  }

  .has-menu .site-nav a {
    display: flex;
    min-height: 2.75rem;
  }
}

/* Phones: the section label would wrap under the logo with a stray border. */
@media (max-width: 479px) {
  .brand-section {
    display: none;
  }

  .header-inner {
    column-gap: 0.75rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .page-narrow .site-nav {
    width: 100%;
  }

  .site-nav ul {
    margin: 0 -0.75rem;
  }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--nc-encre);
  color: var(--nc-surface);
}

/* Static decorative shapes (no animation), like the back-office login panel. */
.hero-shapes {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
}

.glow-violet {
  top: -8rem;
  right: -6rem;
  width: 28rem;
  height: 28rem;
  background: rgb(90 63 224 / 0.5);
}

.glow-corail {
  bottom: -12rem;
  right: 18%;
  width: 22rem;
  height: 22rem;
  background: rgb(255 111 89 / 0.3);
}

.glow-clair {
  bottom: 10%;
  left: -8rem;
  width: 18rem;
  height: 18rem;
  background: rgb(185 174 247 / 0.14);
}

.orbits {
  position: absolute;
  top: -12rem;
  right: -12rem;
  width: 24rem;
  color: rgb(255 255 255 / 0.08);
}

.orbits .spark-halo {
  fill: rgb(255 111 89 / 0.2);
}

.orbits .spark {
  fill: var(--nc-corail);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 4rem;
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.3125rem 0.75rem 0.3125rem 0.5rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
  color: var(--nc-sur-encre);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
}

@media (max-width: 399px) {
  .eyebrow-long {
    display: none;
  }
}

.eyebrow-dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--nc-corail);
  box-shadow: 0 0 0 4px rgb(255 111 89 / 0.2);
}

.hero h1 {
  margin: 0;
  color: var(--nc-surface);
  font-size: clamp(1.875rem, 1.2rem + 3vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: wrap;
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .hero h1 {
    font-size: 2.75rem;
  }
}

.hero h1 .accent {
  display: block;
  color: var(--nc-violet-clair);
}

.hero .lead {
  max-width: 36rem;
  margin: 1.25rem 0 2rem;
  color: var(--nc-sur-encre);
  font-size: 1.125rem;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.cta-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--nc-sur-encre);
  font-size: 0.9375rem;
}

.bubble-hint {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  color: var(--nc-violet-clair);
}

.bubble-hint svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

.assistant-status {
  margin: 0.75rem 0 0;
  font-weight: 500;
}

.assistant-status:empty {
  display: none;
}

.hero .assistant-status {
  color: var(--nc-surface);
}

.trust {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.625rem 1.5rem;
  margin: 2.5rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  list-style: none;
  color: var(--nc-sur-encre);
  font-size: 0.875rem;
}

.trust li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .trust {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.trust svg {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.05rem;
  color: var(--nc-violet-clair);
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* White on violet 6.5:1, on violet-hover 8.0:1. */
.btn-primary {
  background: var(--nc-violet);
  color: var(--nc-surface);
  box-shadow: 0 1px 2px rgb(22 18 58 / 0.2), 0 8px 24px -8px rgb(90 63 224 / 0.6);
}

.btn-primary:hover {
  background: var(--nc-violet-hover);
  color: var(--nc-surface);
  transform: translateY(-1px);
}

.btn-lg {
  min-height: 3.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 1.0625rem;
  border-radius: 1rem;
}

.btn-lg svg {
  width: 1.375rem;
  height: 1.375rem;
}

/* Secondary: white, ligne-forte border (3.8:1), hover violet-tint. */
.btn-outline {
  background: var(--nc-surface);
  border-color: var(--nc-ligne-forte);
  color: var(--nc-encre);
}

.btn-outline:hover {
  background: var(--nc-violet-tint);
  color: var(--nc-encre);
}

/* ------------------------------------------------------------------ steps (hero) */

.steps-wrap {
  position: relative;
  width: 100%;
  max-width: 26rem;
  justify-self: end;
}

.steps {
  padding: 1.75rem;
  border-color: transparent;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.15), 0 30px 60px -20px rgb(0 0 0 / 0.55);
}

.steps h2 {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
}

.steps ol {
  display: grid;
  gap: 1.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  color: var(--nc-texte-doux);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.steps li strong {
  display: block;
  margin-bottom: 0.125rem;
  color: var(--nc-encre);
  font-size: 1rem;
  font-weight: 600;
}

/* violet on violet-tint 5.6:1 (decorative duplicate of the list numbering). */
.step-num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: var(--nc-violet-tint);
  color: var(--nc-violet);
  font-family: var(--font-display);
  font-weight: 700;
}

.steps-foot {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 1.5rem 0 0;
  padding-top: 1.125rem;
  border-top: 1px solid var(--nc-ligne);
  color: var(--nc-texte-doux);
  font-size: 0.8125rem;
}

.steps-foot svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  color: var(--nc-violet);
}

.steps-deco {
  position: absolute;
  z-index: -1;
}

.steps-deco-a {
  top: -1.25rem;
  right: -1.25rem;
  width: 5rem;
  height: 5rem;
  border-radius: 1.5rem;
  background: var(--nc-safran);
  transform: rotate(12deg);
}

.steps-deco-b {
  bottom: -1.25rem;
  left: -1.25rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--nc-menthe);
}

/* Two-column hero at 1024-1279: the orbits' spark would land on the steps card. */
@media (max-width: 1279px) {
  .hero .orbits {
    display: none;
  }
}

@media (max-width: 1023px) {
  .steps-wrap {
    justify-self: stretch;
    max-width: 36rem;
  }

  .steps-deco,
  .orbits {
    display: none;
  }
}


/* ------------------------------------------------------------------ sections */

.section {
  padding: 4rem 0;
}

.section + .section {
  padding-top: 0;
}

.section-head {
  max-width: 44rem;
  margin: 0 0 2rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  color: var(--nc-violet);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 1.25rem;
  height: 3px;
  border-radius: 3px;
  background: var(--nc-corail);
}

.section h2 {
  margin: 0;
  font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
}

.section-head p:not(.kicker) {
  margin: 0.75rem 0 0;
  color: var(--nc-texte-doux);
  font-size: 1.0625rem;
}

.card {
  border: 1px solid var(--nc-ligne);
  border-radius: var(--radius-card);
  background: var(--nc-surface);
  box-shadow: var(--shadow-soft);
}

/* Category cards. */
.categories {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 1 column on phones, 2 + 1 (the last card spans the row) on tablets, 3 on desktop. */
@media (min-width: 640px) {
  .categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .category:last-child:nth-child(odd) .topics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .category:last-child:nth-child(odd) .topics {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Informative cards (no link inside): no hover effect that would suggest a click target. */
.category {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.125rem;
  border-radius: 0.875rem;
}

.icon-tile svg {
  width: 1.375rem;
  height: 1.375rem;
}

.tone-violet {
  background: var(--nc-violet-tint);
  color: var(--nc-violet);
}

.tone-corail {
  background: var(--nc-corail-tint);
  color: var(--nc-danger);
}

.tone-menthe {
  background: var(--nc-menthe-tint);
  color: var(--nc-success);
}

.tone-safran {
  background: var(--nc-safran-tint);
  color: var(--nc-warning);
}

.category h3 {
  margin: 0 0 0.375rem;
  font-size: 1.25rem;
}

.category > p {
  margin: 0 0 1.125rem;
  color: var(--nc-texte-doux);
  font-size: 0.9375rem;
}

.topics {
  display: grid;
  gap: 0.125rem;
  margin: 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--nc-ligne);
  list-style: none;
  font-size: 0.9375rem;
}

.topics li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.375rem 0;
}

.topics li::before {
  content: "";
  flex: none;
  width: 0.375rem;
  height: 0.375rem;
  margin-top: 0.6em;
  border-radius: 50%;
  background: var(--nc-violet-clair);
}

/* Assistant section. */
.assistant-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .assistant-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 3.5rem;
  }
}

.assistant-text p:not(.kicker) {
  margin: 0 0 1rem;
}

.assistant-text .section-head {
  margin-bottom: 1.25rem;
}

.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 1.25rem;
}

.feature .icon-tile {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.875rem;
  border-radius: 0.75rem;
}

.feature .icon-tile svg {
  width: 1.25rem;
  height: 1.25rem;
}

.feature h3 {
  margin: 0 0 0.375rem;
  font-size: 1.0625rem;
}

.feature p {
  margin: 0;
  color: var(--nc-texte-doux);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* warning on warning-soft 6.4:1. */
.feature-warning {
  border-color: rgb(245 184 61 / 0.45);
  background: var(--nc-warning-soft);
}

.feature-warning h3 {
  color: var(--nc-warning);
}

.feature-warning p {
  color: var(--nc-texte);
}

/* Integration section. */
.integration {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .integration {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 3rem;
  }
}

.code-card {
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--nc-encre);
  box-shadow: var(--shadow-lift);
}

.code-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
  color: var(--nc-sur-encre);
  font-size: 0.8125rem;
  font-weight: 500;
}

.dots {
  display: inline-flex;
  gap: 0.375rem;
  margin-right: 0.5rem;
}

.dots span {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
}

.dots span:nth-child(1) {
  background: var(--nc-corail);
}

.dots span:nth-child(2) {
  background: var(--nc-safran);
}

.dots span:nth-child(3) {
  background: var(--nc-menthe);
}

.code-card pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  color: var(--nc-surface);
  font-size: 0.875rem;
  line-height: 1.7;
}

.code-card pre code {
  font-size: 1em;
}

.code-card pre:focus-visible {
  outline-color: var(--nc-violet-clair);
  outline-offset: -4px;
}

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

/* Inline code chips: violet-hover on violet-tint 6.9:1. */
p code,
li code,
dt code {
  padding: 0.0625rem 0.375rem;
  border-radius: 0.375rem;
  background: var(--nc-violet-tint);
  color: var(--nc-violet-hover);
  font-size: 0.85em;
}

/* Tokens on encre: sur-encre 11.8:1, violet-clair 8.9:1, safran 10.0:1. */
.code-card .tok-tag {
  color: var(--nc-sur-encre);
}

.code-card .tok-attr {
  color: var(--nc-violet-clair);
}

.code-card .tok-val {
  color: var(--nc-safran);
}

.attributes {
  margin: 0;
  padding: 1.25rem 1.5rem;
  list-style: none;
}

.attributes li {
  padding: 0.75rem 0;
  font-size: 0.9375rem;
}

.attributes li + li {
  border-top: 1px solid var(--nc-ligne);
}

.note {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 1rem 1.125rem;
  border: 1px solid var(--nc-ligne);
  border-left: 4px solid var(--nc-violet);
  border-radius: var(--radius-control);
  background: var(--nc-surface);
  font-size: 0.9375rem;
}

.note svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: var(--nc-violet);
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--nc-encre);
  color: var(--nc-sur-encre);
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  /* Bottom room so that the widget bubble never covers the footer text. */
  padding-top: 2.75rem;
  padding-bottom: 6.5rem;
}

@media (min-width: 1024px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding-bottom: 3rem;
    padding-right: 6rem;
  }
}

.footer-brand p {
  margin: 0.875rem 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--nc-surface);
}

.footer-links a:hover {
  color: var(--nc-violet-clair);
}

.footer-legal {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------ data charter */

/* Header, title band, content and footer share one 56rem column on the charter. */
.page-narrow .container {
  max-width: 56rem;
}

.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--nc-encre);
  color: var(--nc-surface);
}

.page-hero .container {
  max-width: 56rem;
  padding-top: 2.75rem;
  padding-bottom: 4.5rem;
}

.page-hero .orbits {
  top: -14rem;
  right: -14rem;
}

.page-hero .glow-violet {
  top: -10rem;
  right: -10rem;
}

.page-hero h1 {
  margin: 0;
  color: var(--nc-surface);
  font-size: clamp(1.875rem, 1.3rem + 2.4vw, 2.75rem);
  line-height: 1.12;
}

.page-hero .eyebrow {
  margin-bottom: 1rem;
}

.legal-wrap {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin-top: -2.5rem;
  padding-bottom: 4rem;
}

.legal {
  padding: 1.5rem 1.25rem;
  line-height: 1.7;
}

@media (min-width: 640px) {
  .legal {
    padding: 2.5rem 3rem;
  }
}

.legal > :first-child {
  margin-top: 0;
}

.legal h2 {
  margin: 2.75rem 0 0.875rem;
  font-size: 1.375rem;
  scroll-margin-top: 1.5rem;
}

.legal section {
  border-top: 1px solid var(--nc-ligne);
  margin-top: 2.25rem;
}

.legal section h2 {
  margin-top: 2.25rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin: 0.375rem 0;
}

.legal li::marker {
  color: var(--nc-violet);
}

/* warning on warning-soft 6.4:1; text on warning-soft 14.6:1. */
.warning {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--nc-warning);
  border-radius: var(--radius-control);
  background: var(--nc-warning-soft);
}

.warning strong {
  color: var(--nc-warning);
}

.placeholder {
  padding: 0 0.375em;
  border: 1px dashed var(--nc-ligne-forte);
  border-radius: 0.375rem;
  background: var(--nc-papier);
  font-style: italic;
}

nav.toc {
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-control);
  background: var(--nc-papier);
  border: 1px solid var(--nc-ligne);
}

nav.toc h2 {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
}

nav.toc ol {
  margin: 0;
  padding-left: 1.5rem;
  columns: 1;
}

@media (min-width: 640px) {
  nav.toc ol {
    columns: 2;
    column-gap: 2.5rem;
  }
}

nav.toc li {
  margin: 0 0 0.375rem;
  break-inside: avoid;
}

nav.toc li::marker {
  color: var(--nc-texte-doux);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1rem;
  border: 1px solid var(--nc-ligne);
  border-radius: var(--radius-control);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

caption {
  padding: 0.875rem 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--nc-encre);
  text-align: left;
  border-bottom: 1px solid var(--nc-ligne);
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--nc-papier);
  color: var(--nc-texte-doux);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

tbody th {
  font-weight: 500;
}

tbody td {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

tbody tr {
  border-top: 1px solid var(--nc-ligne);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-weight: 600;
}

.back-link svg {
  width: 1rem;
  height: 1rem;
}

/* ------------------------------------------------------------------ motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .btn-primary:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Windows high contrast: keep the boundaries of cards and buttons. */
@media (forced-colors: active) {
  .btn,
  .card,
  .code-card {
    border: 1px solid CanvasText;
  }
}

/* app.html: start screen of the mobile app WebView, full height, then the widget panel
   fills the screen (layout="fullscreen"). */
.app-webview {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--nc-encre);
}

.app-start {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.app-legal {
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.app-legal a {
  color: inherit;
}
