/* Tokens : palette et typographie dans le style de la documentation discord.js
   (neutres zinc, accent blurple Discord, Geist). Les composants ne consomment que des rôles. */

@font-face {
  font-family: "Geist";
  src: url("/docs/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/docs/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Typographie */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.625rem;
  --text-2xl: 2rem;
  --leading: 1.65;
  --measure: 72ch;

  /* Espacement (base 4) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Rayons : intérieur = extérieur - marge intérieure */
  --radius-lg: 10px;
  --radius-md: 6px;
  --radius-sm: 4px;
  --radius-xs: 3px;

  /* Dimensions */
  --topbar-h: 3.5rem;
  --sidebar-w: 17rem;
  --toc-w: 13rem;
  --content-max: 52rem;

  /* Profondeur */
  --z-sticky: 20;
  --z-drawer: 30;
  --z-backdrop: 29;
  --z-modal: 50;

  /* Mouvement */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-base: 220ms;

  /* Thème clair (base) */
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-2: #f4f4f5;
  --surface-hover: #f4f4f5;
  --code-bg: #f6f8fa;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-muted: #52525b;
  --text-faint: #6b6b74;
  --accent: #4752c4;
  --accent-strong: #5865f2;
  --on-accent: #ffffff;
  --accent-soft: rgb(88 101 242 / 0.1);
  --focus: #5865f2;

  --ok: #1a7f37;
  --warn: #9a6700;
  --danger: #cf222e;

  --tk-keyword: #cf222e;
  --tk-string: #0a3069;
  --tk-number: #0550ae;
  --tk-function: #8250df;
  --tk-type: #953800;
  --tk-decorator: #8250df;
  --tk-builtin: #0550ae;
  --tk-comment: #6e7781;
  --tk-punct: #24292f;

  --shadow-float: 0 1px 2px rgb(0 0 0 / 0.06), 0 12px 32px -8px rgb(0 0 0 / 0.2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121214;
    --surface: #161618;
    --surface-2: #1f1f23;
    --surface-hover: #232327;
    --code-bg: #18181b;
    --border: #27272a;
    --border-strong: #3f3f46;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-faint: #8d8d96;
    --accent: #8f99ff;
    --accent-strong: #5865f2;
    --on-accent: #ffffff;
    --accent-soft: rgb(88 101 242 / 0.16);
    --focus: #8f99ff;

    --ok: #3fb950;
    --warn: #d29922;
    --danger: #f85149;

    --tk-keyword: #ff7b72;
    --tk-string: #a5d6ff;
    --tk-number: #79c0ff;
    --tk-function: #d2a8ff;
    --tk-type: #ffa657;
    --tk-decorator: #d2a8ff;
    --tk-builtin: #79c0ff;
    --tk-comment: #8b949e;
    --tk-punct: #c9d1d9;

    --shadow-float: 0 1px 2px rgb(0 0 0 / 0.4), 0 16px 40px -8px rgb(0 0 0 / 0.7);
  }
}

:root[data-theme="dark"] {
  --bg: #121214;
  --surface: #161618;
  --surface-2: #1f1f23;
  --surface-hover: #232327;
  --code-bg: #18181b;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-faint: #8d8d96;
  --accent: #8f99ff;
  --accent-strong: #5865f2;
  --on-accent: #ffffff;
  --accent-soft: rgb(88 101 242 / 0.16);
  --focus: #8f99ff;

  --ok: #3fb950;
  --warn: #d29922;
  --danger: #f85149;

  --tk-keyword: #ff7b72;
  --tk-string: #a5d6ff;
  --tk-number: #79c0ff;
  --tk-function: #d2a8ff;
  --tk-type: #ffa657;
  --tk-decorator: #d2a8ff;
  --tk-builtin: #79c0ff;
  --tk-comment: #8b949e;
  --tk-punct: #c9d1d9;

  --shadow-float: 0 1px 2px rgb(0 0 0 / 0.4), 0 16px 40px -8px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

/* Base : reset, typographie, liens, focus. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + var(--space-4));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-2xl);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--text-lg);
}

h3 {
  font-size: var(--text-md);
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

:not(pre) > code {
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text);
}

a > code,
a:not(.nav-link) :not(pre) > code {
  color: inherit;
}

kbd {
  font-size: var(--text-xs);
  padding: 0.1em 0.45em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text-muted);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection {
  background: var(--accent-soft);
}

img,
svg {
  max-width: 100%;
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
}

.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;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  top: -4rem;
  z-index: var(--z-modal);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-strong);
  color: var(--on-accent);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-2);
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--dur-base);
  animation-timing-function: var(--ease-out);
}

.topbar {
  view-transition-name: topbar;
}

.sidebar {
  view-transition-name: sidebar;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Blocs de code : coloration, lignes mises en avant, bouton Copier. */

.code {
  position: relative;
  margin: 0 0 var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--code-bg);
  min-width: 0;
}

.code__file {
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font: 500 var(--text-xs) / 1.4 var(--font-mono);
}

.code pre {
  margin: 0;
  padding: var(--space-3) 0;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
  tab-size: 4;
  scrollbar-width: thin;
  border-radius: calc(var(--radius-md) - 1px);
}

.code pre:focus-visible {
  outline-offset: -2px;
}

.code code {
  display: block;
  min-width: max-content;
  padding: 0;
  background: none;
  color: var(--text);
}

.code .line {
  display: block;
  padding-inline: var(--space-4) var(--space-7);
  transition: filter var(--dur-base), opacity var(--dur-base);
}

/* Focus contextuel : les lignes utiles nettes, le contexte en retrait jusqu'au survol ou au focus */

.code[data-focus] .line:not(.is-focus) {
  filter: blur(1.2px);
  opacity: 0.5;
}

.code[data-focus]:is(:hover, :focus-within) .line {
  filter: none;
  opacity: 1;
}

.code .line.is-focus {
  background: var(--accent-soft);
}

@media (hover: none), (prefers-reduced-motion: reduce) {
  .code[data-focus] .line:not(.is-focus) {
    filter: none;
    opacity: 0.62;
  }
}

:root.low-perf .code .line {
  filter: none !important;
}

.code__copy {
  position: absolute;
  top: var(--space-2);
  inset-inline-end: var(--space-2);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}

.code__file + .code__copy {
  top: calc(var(--space-2) + 2.05rem);
}

.code__copy svg {
  width: 1rem;
  height: 1rem;
}

.code:hover .code__copy,
.code__copy:focus-visible,
.code__copy[data-copied] {
  opacity: 1;
}

.code__copy:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.code__copy[data-copied] {
  border-color: color-mix(in oklch, var(--ok) 50%, var(--border));
  color: var(--ok);
}

@media (hover: none) {
  .code__copy {
    opacity: 1;
  }
}

.tk-k {
  color: var(--tk-keyword);
}

.tk-s {
  color: var(--tk-string);
}

.tk-n {
  color: var(--tk-number);
}

.tk-f {
  color: var(--tk-function);
}

.tk-t {
  color: var(--tk-type);
}

.tk-d {
  color: var(--tk-decorator);
}

.tk-b {
  color: var(--tk-builtin);
}

.tk-c {
  color: var(--tk-comment);
}

.tk-o,
.tk-p {
  color: var(--tk-punct);
}

/* Site vitrine : mêmes tokens que la documentation (thème du système), plus les couleurs du rendu Discord. */

.landing {
  --page-pad: max(var(--space-4), env(safe-area-inset-left));
  --wrap: 76rem;
  --dc-bg: #313338;
  --dc-panel: #2b2d31;
  --dc-text: oklch(0.9 0.006 265);
  --dc-muted: oklch(0.72 0.01 265);
  --dc-green: #248046;
  --dc-grey: #4e5058;
  --dc-blurple: #5865f2;
  --dc-accent: #5865f2;
  background: var(--bg);
  overflow-x: hidden;
}

.landing h1,
.landing h2 {
  letter-spacing: -0.03em;
}

/* En-tête */

.l-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--space-4) var(--page-pad);
}

.l-top .brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  font: 650 var(--text-sm) / 1 var(--font-mono);
  text-decoration: none;
}

.l-top .brand__mark {
  width: 1.75rem;
  height: 1.75rem;
}

.brand__suffix {
  color: var(--accent);
}

.l-top__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  font-size: var(--text-sm);
}

.l-top__nav a,
.l-foot__nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.l-top__nav a:hover,
.l-foot__nav a:hover {
  color: var(--text);
}

@media (max-width: 40rem) {
  .l-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Héros */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--page-pad) clamp(3rem, 8vw, 6rem);
}

.hero__title {
  max-width: 16ch;
  font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero__lead {
  max-width: 54ch;
  margin: var(--space-5) 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.l-button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  background: var(--accent-strong);
  color: var(--on-accent);
  font-weight: 650;
  text-decoration: none;
  transition: background var(--dur-fast);
}

.l-button:hover {
  background: var(--accent);
}

.install {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 100%;
  min-height: 3rem;
  padding: 0 var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: border-color var(--dur-fast);
}

.install:hover {
  border-color: var(--border-strong);
}

.install code {
  overflow: hidden;
  padding: 0;
  background: none;
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install__prompt {
  color: var(--text-faint);
}

.install .icon {
  color: var(--text-muted);
}

.install[data-copied] .icon {
  color: var(--ok);
}

@media (min-width: 72rem) {
  .hero__text {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: var(--space-4) var(--space-7);
    align-items: end;
  }

  .hero__title {
    grid-row: span 2;
  }

  .hero__lead,
  .hero__actions {
    margin-top: 0;
  }
}

/* Démo : code et rendu liés */

.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  margin: 0;
  min-width: 0;
}

.demo .code {
  margin: 0;
}

.demo .line[data-part] {
  cursor: default;
  transition: background var(--dur-fast);
}

.demo .line[data-part]:focus-visible {
  outline: none;
  background: var(--accent-soft);
}

.demo[data-active] .line[data-part].is-linked {
  background: var(--accent-soft);
}

.demo__render,
.demo__code {
  min-width: 0;
}

@media (min-width: 48rem) {
  .demo {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: var(--space-5);
    align-items: center;
  }
}

/* Imitation fidèle d'un message Discord : ce que produit le code */

.dc {
  border-radius: var(--radius-lg);
  background: var(--dc-bg);
  color: var(--dc-text);
  font-size: 0.875rem;
  line-height: 1.375;
  box-shadow: var(--shadow-float);
}

.dc p {
  margin: 0;
}

.dc-msg {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
}

.dc-avatar {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 50%;
}

.dc-body {
  min-width: 0;
  flex: 1;
}

.dc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-2);
  margin-bottom: var(--space-2) !important;
}

.dc-user {
  font-weight: 600;
}

.dc-app {
  padding: 0 0.3rem;
  border-radius: 3px;
  background: var(--dc-blurple);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.5;
}

.dc-used {
  color: var(--dc-muted);
  font-size: 0.75rem;
}

/* Discord dessine l'accent du container comme une bande à gauche : on reproduit le rendu réel. */
.dc-card {
  display: grid;
  gap: var(--space-3);
  max-width: 26rem;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--dc-panel);
  box-shadow: inset 4px 0 0 var(--dc-accent);
  transition: box-shadow var(--dur-base), outline-color var(--dur-base);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.dc-section {
  display: flex;
  gap: var(--space-3);
  justify-content: space-between;
}

.dc-h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

.dc-thumb {
  width: 4.25rem;
  height: 4.25rem;
  flex: none;
  border-radius: var(--radius-md);
}

.dc-sep {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid oklch(0.36 0.01 265);
}

.dc-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.dc-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--dc-grey);
  color: white;
  font-weight: 500;
}

.dc-btn--success {
  background: var(--dc-green);
}

.dc-btn--primary {
  background: var(--dc-blurple);
}

[data-part] {
  border-radius: var(--radius-xs);
  transition: outline-color var(--dur-fast), background var(--dur-fast);
}

.demo__render [data-part].is-linked {
  outline: 2px solid var(--dc-accent);
  outline-offset: 3px;
}

/* Sections */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--page-pad);
  border-top: 1px solid var(--border);
}

.feature h2,
.facts h2,
.final h2 {
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
}

.feature__text p {
  max-width: 46ch;
  margin: var(--space-4) 0 0;
  color: var(--text-muted);
  font-size: var(--text-md);
}

.feature__points {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.feature__points li {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
}

.feature__points li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  border-radius: 2px;
  background: var(--accent);
  transform: translateY(-0.1em);
}

.feature__visual {
  min-width: 0;
}

.feature__visual .code {
  margin: 0;
}

.feature__visual--stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

@media (min-width: 60rem) {
  .feature {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }

  .feature--flip {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }

  .feature--flip .feature__text {
    order: 2;
  }

  .feature__text {
    position: sticky;
    top: var(--space-6);
  }
}

/* Modale */

.dc-modal {
  display: grid;
  gap: var(--space-4);
  max-width: 28rem;
  padding: var(--space-5);
}

.dc-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
}

.dc-field {
  display: grid;
  gap: var(--space-2);
}

.dc-label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.dc-input,
.dc-drop {
  padding: 0.6rem var(--space-3);
  border-radius: var(--radius-sm);
  background: oklch(0.2 0.01 265);
}

.dc-drop {
  border: 1px dashed oklch(0.42 0.012 265);
  color: var(--dc-muted);
  text-align: center;
}

.dc-choice {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.dc-radio,
.dc-check {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  border: 2px solid oklch(0.55 0.01 265);
  border-radius: 50%;
}

.dc-check {
  border-radius: 4px;
}

.dc-radio--on {
  border-color: var(--dc-blurple);
  box-shadow: inset 0 0 0 3px var(--dc-bg), inset 0 0 0 9px var(--dc-blurple);
}

.dc-check--on {
  border-color: var(--dc-blurple);
  background: var(--dc-blurple);
}

.dc-modal__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-4);
}

.dc-link {
  color: var(--dc-text);
}

/* Autocomplétion */

.dc-slash {
  display: grid;
  gap: var(--space-2);
  max-width: 28rem;
  padding: var(--space-3);
}

.dc-suggest {
  margin: 0;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--dc-panel);
  list-style: none;
}

.dc-suggest__item {
  padding: 0.45rem var(--space-3);
  border-radius: var(--radius-sm);
}

.dc-suggest__item--on {
  background: oklch(0.32 0.012 265);
}

.dc-option {
  padding: 0 var(--space-2);
  color: var(--dc-muted);
  font-size: 0.75rem;
}

.dc-option b {
  color: var(--dc-text);
}

.dc-composer {
  padding: 0.7rem var(--space-3);
  border-radius: var(--radius-md);
  background: oklch(0.3 0.01 265);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.dc-typed {
  color: var(--dc-text);
}

.dc-caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 1px;
  background: var(--dc-text);
  vertical-align: text-bottom;
}

@media (prefers-reduced-motion: no-preference) {
  :root:not(.low-perf) .dc-caret {
    animation: caret 1.1s steps(1) infinite;
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

/* Faits */

.facts {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--page-pad);
  border-top: 1px solid var(--border);
}

.facts__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  gap: var(--space-5) var(--space-6);
  margin: var(--space-6) 0 0;
}

.facts__list dt {
  color: var(--text-faint);
  font-size: var(--text-sm);
}

.facts__list dd {
  margin: var(--space-1) 0 0;
  font-weight: 600;
}

/* Appel final */

.final {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--page-pad) clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--border);
}

.final p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-md);
}

/* Pied de page */

.l-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--space-5) var(--page-pad) var(--space-7);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.l-foot p {
  margin: 0;
}

.l-foot__nav {
  display: flex;
  gap: var(--space-4);
}

/* Entrée de page : une seule chorégraphie, hors mouvement réduit et basse performance */

@media (prefers-reduced-motion: no-preference) {
  :root:not(.low-perf) .hero__text > * {
    animation: rise 620ms var(--ease-out) both;
  }

  :root:not(.low-perf) .hero__text > :nth-child(2) {
    animation-delay: 80ms;
  }

  :root:not(.low-perf) .hero__text > :nth-child(3) {
    animation-delay: 160ms;
  }

  :root:not(.low-perf) .demo {
    animation: rise 720ms 200ms var(--ease-out) both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
