:root {
  --color-fond-nocturne: #120d19;
  --color-fond-encre: #0a0710;
  --color-prune-panneau: #29172f;
  --color-prune-surface: #38203f;
  --color-blanc-froid: #f0eef4;
  --color-lavande-cendre: #c8bece;
  --color-violet-sorcier: #a96bff;
  --color-violet-profond: #6e35a8;
  --color-orange-oranger: #d78358;
  --color-ligne-fumee: #604665;
  --color-focus-lumineux: #e7b7ff;

  --font-heading: "Cormorant Garamond SemiBold", "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-meta: 0.75rem;
  --text-small: 0.875rem;
  --text-body: 1rem;
  --text-intro: 1.125rem;
  --text-heading-small: 1.5rem;
  --text-heading-section: clamp(2rem, 4vw, 3.5rem);
  --text-heading-hero: clamp(3rem, 8vw, 7rem);

  --line-meta: 1rem;
  --line-small: 1.35rem;
  --line-body: 1.6rem;
  --line-intro: 1.55rem;
  --line-heading-small: 1.2;
  --line-heading-section: 1.05;
  --line-heading-hero: 0.92;

  --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;
  --space-9: 5rem;
  --space-10: 7.5rem;

  --container-max: 77.5rem;
  --container-padding: 2rem;
  --section-space: clamp(5rem, 9vw, 7.5rem);

  --surface-gradient: linear-gradient(135deg, var(--color-fond-nocturne), var(--color-prune-panneau));
  --surface-elevated: var(--color-prune-surface);
  --border-subtle: 1px solid var(--color-ligne-fumee);
  --border-accent: 1px solid color-mix(in srgb, var(--color-violet-profond) 72%, transparent);

  --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.35);
  --glow-violet: 0 0 24px rgba(169, 107, 255, 0.22);

  --radius-none: 0;
  --radius-small: 0.25rem;
  --radius-medium: 0.5rem;

  --transition-fast: 180ms ease-out;
  --transition-editorial: 420ms ease-out;
}

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

html {
  min-width: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-8);
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--color-fond-nocturne);
  color: var(--color-blanc-froid);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--line-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--color-violet-profond);
  color: var(--color-blanc-froid);
}

:target {
  scroll-margin-top: var(--space-8);
}

img,
picture,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

img {
  object-fit: cover;
}

svg {
  fill: currentColor;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  appearance: none;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--color-ligne-fumee);
  border-radius: var(--radius-small);
  background: var(--color-fond-encre);
  color: var(--color-blanc-froid);
  line-height: 1.5;
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

input,
select {
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
}

textarea {
  min-height: 8rem;
  padding: 0.75rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--color-lavande-cendre) 72%, transparent);
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-violet-sorcier);
  background: var(--color-prune-panneau);
  outline: none;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  padding: 0;
  accent-color: var(--color-violet-sorcier);
}

fieldset {
  min-width: 0;
  margin: 0 0 var(--space-5);
  padding: var(--space-5);
  border: var(--border-subtle);
}

legend {
  padding: 0 var(--space-2);
  color: var(--color-blanc-froid);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
}

label {
  display: inline-block;
  margin-bottom: var(--space-3);
  color: var(--color-blanc-froid);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: var(--line-small);
}

output {
  color: var(--color-lavande-cendre);
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

th,
td {
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-subtle);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--color-blanc-froid);
  font-size: var(--text-small);
  font-weight: 700;
}

caption {
  margin-bottom: var(--space-3);
  color: var(--color-lavande-cendre);
  font-size: var(--text-small);
  text-align: left;
}

a {
  color: var(--color-blanc-froid);
  text-decoration-color: color-mix(in srgb, var(--color-violet-sorcier) 78%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition:
    color var(--transition-fast),
    text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-violet-sorcier);
  text-decoration-color: currentColor;
}

a:visited {
  color: color-mix(in srgb, var(--color-violet-sorcier) 78%, var(--color-blanc-froid));
}

a[aria-current="page"],
a[aria-current="true"] {
  color: var(--color-violet-sorcier);
  text-decoration-thickness: 2px;
}

a[aria-disabled="true"] {
  color: var(--color-lavande-cendre);
  cursor: not-allowed;
  opacity: 0.58;
  pointer-events: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus-lumineux);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: var(--space-4);
  color: var(--color-blanc-froid);
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--text-heading-hero);
  line-height: var(--line-heading-hero);
}

h2 {
  font-size: var(--text-heading-section);
  line-height: var(--line-heading-section);
}

h3 {
  font-size: var(--text-heading-small);
  line-height: var(--line-heading-small);
}

h4 {
  font-size: 1.25rem;
  line-height: 1.2;
}

h5,
h6 {
  font-size: 1rem;
  line-height: 1.35;
}

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

small {
  font-size: var(--text-meta);
  line-height: var(--line-meta);
}

strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

mark {
  padding: 0 0.15em;
  background: color-mix(in srgb, var(--color-orange-oranger) 48%, transparent);
  color: var(--color-blanc-froid);
}

hr {
  height: 1px;
  margin: var(--space-6) 0;
  border: 0;
  background: var(--color-ligne-fumee);
}

blockquote {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) 0 var(--space-4) var(--space-5);
  border-left: 2px solid var(--color-violet-sorcier);
  color: var(--color-lavande-cendre);
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.3;
}

blockquote p:last-child {
  margin-bottom: 0;
}

figure {
  margin: 0 0 var(--space-5);
}

figcaption {
  margin-top: var(--space-3);
  color: var(--color-lavande-cendre);
  font-size: var(--text-small);
  line-height: var(--line-small);
}

ul,
ol {
  margin-top: 0;
  margin-bottom: var(--space-5);
  padding-left: 1.25rem;
}

main ul:not([class]),
main ol:not([class]),
article ul:not([class]),
article ol:not([class]) {
  display: grid;
  gap: var(--space-2);
}

dl {
  margin: 0 0 var(--space-5);
}

dt {
  color: var(--color-blanc-froid);
  font-weight: 700;
}

dd {
  margin: 0 0 var(--space-3);
  color: var(--color-lavande-cendre);
}

pre,
code,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  overflow: auto;
  border: var(--border-subtle);
  background: var(--color-fond-encre);
  color: var(--color-lavande-cendre);
}

code {
  padding: 0.08em 0.3em;
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--color-prune-surface) 84%, transparent);
}

pre code {
  padding: 0;
  background: transparent;
}

address {
  margin: 0 0 var(--space-5);
  color: var(--color-lavande-cendre);
  font-style: normal;
}

main,
header,
footer,
section,
article,
aside,
nav,
form,
div {
  min-width: 0;
}

.container {
  width: min(100% - (var(--container-padding) * 2), var(--container-max));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-space);
}

.surface {
  border: var(--border-subtle);
  background: var(--surface-gradient);
  color: var(--color-blanc-froid);
}

.surface--elevated {
  border: var(--border-accent);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-elevated);
}

.panel {
  padding: clamp(var(--space-5), 4vw, var(--space-7));
  border: var(--border-subtle);
  background: var(--surface-gradient);
}

.panel > :last-child,
.surface > :last-child,
.surface--elevated > :last-child,
.card > :last-child,
.stack > :last-child,
.cluster > :last-child {
  margin-bottom: 0;
}

.stack {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
}

.stack > * {
  min-width: 0;
}

.cluster {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.cluster > * {
  min-width: 0;
}

.cluster--tight {
  gap: var(--space-2);
}

.cluster--actions {
  gap: var(--space-4);
}

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--color-lavande-cendre);
  font-size: var(--text-meta);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: var(--line-meta);
  text-transform: uppercase;
}

.intro {
  margin-bottom: var(--space-5);
  color: var(--color-lavande-cendre);
  font-size: var(--text-intro);
  line-height: var(--line-intro);
}

.muted {
  color: var(--color-lavande-cendre);
}

.divider {
  width: 100%;
  height: 1px;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-ligne-fumee) 15%,
    var(--color-violet-profond) 50%,
    var(--color-ligne-fumee) 85%,
    transparent
  );
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-violet-sorcier);
  border-radius: var(--radius-small);
  background: var(--color-violet-sorcier);
  color: var(--color-fond-encre);
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.button:hover {
  background: color-mix(in srgb, var(--color-violet-sorcier) 88%, white);
  border-color: color-mix(in srgb, var(--color-violet-sorcier) 88%, white);
  color: var(--color-fond-encre);
  transform: translateY(-2px);
  box-shadow: var(--glow-violet);
}

.button:visited {
  color: var(--color-fond-encre);
}

.button--secondary {
  border-color: var(--color-ligne-fumee);
  background: transparent;
  color: var(--color-blanc-froid);
}

.button--secondary:hover {
  border-color: var(--color-violet-sorcier);
  background: var(--color-prune-surface);
  color: var(--color-blanc-froid);
  box-shadow: none;
}

.button--quiet {
  border-color: transparent;
  background: transparent;
  color: var(--color-blanc-froid);
  text-decoration: underline;
  text-decoration-color: var(--color-violet-profond);
  text-underline-offset: 0.2em;
}

.button--quiet:hover {
  border-color: transparent;
  background: transparent;
  color: var(--color-violet-sorcier);
  box-shadow: none;
}

.card {
  min-width: 0;
  padding: var(--space-5);
  border: var(--border-subtle);
  background: var(--color-prune-panneau);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-small);
  background: var(--color-focus-lumineux);
  color: var(--color-fond-encre);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 47.5rem) {
  :root {
    --container-padding: 1.25rem;
    --section-space: clamp(3.5rem, 12vw, 4.5rem);
  }

  h1 {
    font-size: clamp(3rem, 14vw, 4.5rem);
    line-height: 0.96;
  }

  h2 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .cluster--actions {
    align-items: stretch;
  }

  .cluster--actions .button {
    width: 100%;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --border-subtle: 1px solid var(--color-blanc-froid);
    --border-accent: 1px solid var(--color-focus-lumineux);
  }

  .surface,
  .panel,
  .card {
    background: var(--color-fond-encre);
  }
}