:root {
  color-scheme: light dark;
  --navy: #08133d;
  --blue: #3683eb;
  --blue-strong: #215fbf;
  --cyan: #38b6ff;
  --ink: #0d1838;
  --muted: #56627e;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-soft: #edf7ff;
  --line: rgba(8, 19, 61, 0.12);
  --background: #f4faff;
  --shadow: 0 24px 70px rgba(31, 82, 148, 0.13);
  --shadow-soft: 0 12px 36px rgba(31, 82, 148, 0.09);
  --radius-large: 2rem;
  --radius-medium: 1.25rem;
  --page-width: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  min-width: 18rem;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -5%, rgba(56, 182, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 20%, rgba(54, 131, 235, 0.13), transparent 30rem),
    var(--background);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue-strong);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--blue);
}

a:focus-visible,
button:focus-visible {
  outline: 0.2rem solid var(--cyan);
  outline-offset: 0.25rem;
  border-radius: 0.5rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: white;
  background: var(--navy);
  border-radius: 0.75rem;
  transform: translateY(-200%);
  transition: transform 160ms ease-out;
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(8, 19, 61, 0.07);
  background: rgba(244, 250, 255, 0.78);
  backdrop-filter: blur(1.25rem) saturate(160%);
  -webkit-backdrop-filter: blur(1.25rem) saturate(160%);
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(calc(100% - 2.5rem), var(--page-width));
  margin-inline: auto;
}

.header-inner {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  width: 8.5rem;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-nav a {
  padding: 0.62rem 0.85rem;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(54, 131, 235, 0.09);
  transform: translateY(-1px);
}

.site-nav a[aria-current="page"] {
  color: white;
  background: var(--navy);
}

.page-shell {
  padding-block: 4.5rem 5rem;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.5rem);
  color: white;
  background:
    linear-gradient(135deg, rgba(8, 19, 61, 0.98), rgba(19, 69, 139, 0.94)),
    var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 24rem;
  height: 24rem;
  top: -14rem;
  right: -6rem;
  background: rgba(56, 182, 255, 0.28);
  filter: blur(0.2rem);
}

.hero::after {
  width: 15rem;
  height: 15rem;
  right: 18%;
  bottom: -11rem;
  background: rgba(54, 131, 235, 0.42);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: #bcecff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 0.55rem;
  height: 0.55rem;
  content: "";
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 0.35rem rgba(56, 182, 255, 0.13);
}

h1,
h2,
h3 {
  margin-top: 0;
  font-weight: 820;
  text-wrap: balance;
}

h1 {
  max-width: 14ch;
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 46rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.58;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0.5rem 0.8rem;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}

.toc {
  position: sticky;
  top: 7rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
}

.toc-title {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.toc a {
  display: block;
  padding: 0.5rem 0.6rem;
  color: var(--muted);
  border-radius: 0.65rem;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover {
  color: var(--blue-strong);
  background: rgba(54, 131, 235, 0.08);
}

.legal-document,
.request-panel {
  min-width: 0;
  padding: clamp(1.35rem, 4vw, 3rem);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
}

.spaced-panel {
  margin-top: 2rem;
}

.legal-section {
  scroll-margin-top: 7rem;
}

.legal-section + .legal-section {
  margin-top: 2.7rem;
  padding-top: 2.7rem;
  border-top: 1px solid var(--line);
}

.section-number {
  display: inline-grid;
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 0.8rem;
  place-items: center;
  color: var(--blue-strong);
  background: var(--surface-soft);
  border-radius: 0.7rem;
  font-size: 0.78rem;
  font-weight: 850;
}

h2 {
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.35;
}

p,
li {
  color: var(--muted);
}

.legal-section p:last-child,
.step-card p:last-child,
.info-card p:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  display: grid;
  gap: 0.65rem;
  padding-left: 1.25rem;
}

.legal-section li::marker {
  color: var(--blue);
}

.notice {
  margin-top: 1.35rem;
  padding: 1rem 1.1rem;
  background: var(--surface-soft);
  border-left: 0.22rem solid var(--cyan);
  border-radius: 0 0.9rem 0.9rem 0;
}

.notice strong {
  color: var(--ink);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.step-card,
.info-card {
  padding: 1.25rem;
  background: var(--surface-soft);
  border: 1px solid rgba(54, 131, 235, 0.12);
  border-radius: var(--radius-medium);
}

.step-index {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 1rem;
  place-items: center;
  color: white;
  background: var(--navy);
  border-radius: 0.8rem;
  font-size: 0.86rem;
  font-weight: 850;
}

.request-block {
  margin-top: 2rem;
  padding: clamp(1.35rem, 4vw, 2.2rem);
  color: white;
  background: var(--navy);
  border-radius: var(--radius-medium);
}

.request-block h2,
.request-block p {
  color: white;
}

.request-block p {
  max-width: 44rem;
  opacity: 0.76;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.05rem;
  color: var(--navy);
  background: white;
  border: 1px solid white;
  border-radius: 0.9rem;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover {
  color: var(--navy);
  background: #eef9ff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
}

.button-secondary {
  color: white;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
}

.button-secondary:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  min-height: 6rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  font-weight: 700;
  text-decoration: none;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(0.8rem) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Les entrées ne jouent que si le système accepte le mouvement : la règle de
   la vitrine, que `scripts/verify-dist.mjs` vérifie sur toute feuille publiée
   sur wherely.be. */
@media (prefers-reduced-motion: no-preference) {
  .hero {
    animation: page-in 430ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }

  .legal-document,
  .request-panel {
    animation: lift-in 440ms 80ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
}

@media (max-width: 52rem) {
  .header-inner {
    min-height: auto;
    padding-block: 0.8rem;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.1rem;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .page-shell {
    padding-top: 2rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 36rem) {
  .header-inner,
  .page-shell,
  .footer-inner {
    width: min(calc(100% - 1.5rem), var(--page-width));
  }

  .brand img {
    width: 7.6rem;
  }

  .site-nav {
    overflow: visible;
  }

  .site-nav a {
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
  }

  .site-nav a:first-child {
    display: none;
  }

  .page-shell {
    padding-bottom: 3.5rem;
  }

  .hero {
    border-radius: 1.5rem;
  }

  .hero-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-grid {
    gap: 1rem;
  }

  .toc ol,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .legal-document,
  .request-panel {
    border-radius: 1.5rem;
  }

  .footer-inner {
    padding-block: 1.5rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f7ff;
    --muted: #aab6d1;
    --surface: rgba(15, 24, 52, 0.84);
    --surface-solid: #0f1834;
    --surface-soft: #142445;
    --line: rgba(180, 210, 255, 0.13);
    --background: #060a17;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.25);
  }

  body {
    background:
      radial-gradient(circle at 8% -5%, rgba(56, 182, 255, 0.13), transparent 28rem),
      radial-gradient(circle at 92% 20%, rgba(54, 131, 235, 0.11), transparent 30rem),
      var(--background);
  }

  a {
    color: #80c7ff;
  }

  .site-header {
    background: rgba(6, 10, 23, 0.78);
    border-bottom-color: rgba(180, 210, 255, 0.08);
  }

  .site-nav a[aria-current="page"] {
    color: var(--navy);
    background: #dff4ff;
  }

  .notice {
    background: rgba(56, 182, 255, 0.08);
  }
}

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

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

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .toc {
    background: var(--surface-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: currentColor;
  }

  .site-header,
  .toc,
  .legal-document,
  .request-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
