:root{
  --bg:           oklch(99% 0.003 295);
  --surface:      oklch(100% 0 0);
  --fg:           oklch(14% 0.02 285);
  --fg-soft:      oklch(28% 0.02 285);
  --muted:        oklch(52% 0.015 285);
  --muted-2:      oklch(68% 0.012 285);
  --border:       oklch(92% 0.006 295);
  --border-soft:  oklch(95% 0.005 295);

  --mauve:        oklch(62% 0.22 295);
  --mauve-bright: oklch(72% 0.20 295);
  --mauve-deep:   oklch(48% 0.22 295);
  --mauve-glow:   oklch(70% 0.25 295);

  --ink:          oklch(8% 0.015 285);
  --ink-soft:     oklch(12% 0.018 285);

  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;

  --max:          1240px;
  --readable:     760px;
  --gut:          clamp(20px, 4vw, 40px);
  --radius:       18px;
  --radius-sm:    12px;

  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--mauve); color: white; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* ── Top bar ───────────────────────────────────────────── */
.lnav {
  position: fixed;
  inset: 14px 0 auto 0;
  z-index: 50;
  pointer-events: none;
}
.lnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.lnav-inner {
  pointer-events: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 11px 12px 11px 18px;
  border-radius: 999px;
  background: color-mix(in oklab, white 62%, transparent);
  backdrop-filter: saturate(190%) blur(26px);
  -webkit-backdrop-filter: saturate(190%) blur(26px);
  border: 1px solid color-mix(in oklab, white 70%, transparent);
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 10px 34px -14px rgba(80,40,140,.30);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 16px;
  color: var(--fg);
}
.brand-mark {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: radial-gradient(circle at 30% 30%, var(--mauve-bright), var(--mauve-deep) 70%);
  box-shadow: 0 4px 16px -4px var(--mauve);
  position: relative; overflow: hidden;
}
.brand-mark::after{
  content:''; position:absolute; inset:0;
  background: radial-gradient(circle at 70% 80%, rgba(255,255,255,.4), transparent 42%);
}
.brand-name b { font-weight: 600; }
.brand-name span { color: var(--muted); font-weight: 400; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg);
  background: color-mix(in oklab, white 55%, transparent);
  border: 1px solid var(--border);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.back-link:hover { transform: translateX(-2px); background: white; }
.back-link svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.back-link:hover svg { transform: translateX(-3px); }

/* ── Hero header (dark) ────────────────────────────────── */
.lhero {
  position: relative;
  background: var(--ink);
  color: white;
  overflow: hidden;
  isolation: isolate;
  padding-top: clamp(130px, 16vh, 180px);
  padding-bottom: clamp(56px, 8vw, 88px);
}
.lhero .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.lhero .orb-1 {
  width: 620px; height: 620px;
  top: -260px; right: -160px;
  background: radial-gradient(circle, var(--mauve) 0%, transparent 65%);
  opacity: .75;
}
.lhero .orb-2 {
  width: 420px; height: 420px;
  bottom: -240px; left: -140px;
  background: radial-gradient(circle, var(--mauve-deep) 0%, transparent 70%);
  opacity: .5;
}
.lhero .wrap { position: relative; z-index: 2; }
.lhero-kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mauve-bright);
  margin-bottom: 22px;
}
.lhero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0;
  max-width: 16ch;
}
.lhero-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 14px;
  color: color-mix(in oklab, white 55%, transparent);
}
.lhero-meta b { color: color-mix(in oklab, white 85%, transparent); font-weight: 500; }

/* ── Document body ─────────────────────────────────────── */
.doc {
  padding: clamp(56px, 8vw, 96px) 0 clamp(72px, 10vw, 120px);
}
.doc-inner {
  max-width: var(--readable);
  margin: 0 auto;
}
.doc-lead {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--fg-soft);
  margin: 0 0 clamp(40px, 6vw, 64px);
  padding-bottom: clamp(32px, 5vw, 48px);
  border-bottom: 1px solid var(--border);
}

.art {
  margin: 0 0 clamp(40px, 5vw, 56px);
  scroll-margin-top: 100px;
}
.art-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--mauve-deep);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.art h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 20px;
}
.art h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 28px 0 12px;
}
.art p {
  font-size: 16px;
  line-height: 1.72;
  color: var(--fg-soft);
  margin: 0 0 16px;
}
.art ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.art ul li {
  position: relative;
  padding-left: 26px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-soft);
}
.art ul li::before {
  content: '';
  position: absolute;
  left: 4px; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mauve);
}
.art a { color: var(--mauve-deep); text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--mauve) 35%, transparent); transition: border-color .2s var(--ease); }
.art a:hover { border-bottom-color: var(--mauve); }
.art strong { color: var(--fg); font-weight: 600; }

/* Inline “to complete” placeholder */
.todo {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 6px;
  font-size: 13px;
  font-style: normal;
  color: var(--mauve-deep);
  background: color-mix(in oklab, var(--mauve) 9%, transparent);
  border: 1px dashed color-mix(in oklab, var(--mauve) 32%, transparent);
  letter-spacing: 0.01em;
  vertical-align: baseline;
}

/* Identity / contact callout card */
.id-card {
  margin: 4px 0 8px;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(80,40,140,.02), 0 18px 40px -28px rgba(80,40,140,.18);
}
.id-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(140px, 0.4fr) 1fr;
  gap: 12px 24px;
}
.id-card dt {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}
.id-card dd {
  margin: 0;
  font-size: 15px;
  color: var(--fg);
}
.id-card dd a { color: var(--mauve-deep); border-bottom: 1px solid color-mix(in oklab, var(--mauve) 35%, transparent); }

/* Table (e.g. finalités / bases légales) */
.doc-table-wrap {
  margin: 8px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
table.doc-table th {
  text-align: left;
  font-weight: 600;
  color: var(--fg);
  background: oklch(98% 0.006 295);
  padding: 14px 18px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
table.doc-table td {
  padding: 14px 18px;
  border-top: 1px solid var(--border-soft);
  color: var(--fg-soft);
  line-height: 1.55;
  vertical-align: top;
}
table.doc-table tr td:first-child { color: var(--fg); font-weight: 500; }

/* In-page table of contents */
.toc {
  margin: 0 0 clamp(40px, 6vw, 60px);
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, oklch(99% 0.006 295), var(--surface));
}
.toc h4 {
  margin: 0 0 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol {
  margin: 0; padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
}
.toc li { margin-bottom: 9px; break-inside: avoid; }
.toc a {
  font-size: 14px;
  color: var(--fg-soft);
  display: inline-flex;
  gap: 8px;
  transition: color .2s var(--ease);
}
.toc a:hover { color: var(--mauve-deep); }
.toc a span { color: var(--mauve); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── Footer (shared with landing) ─────────────────────── */
footer.foot {
  background: var(--ink);
  color: color-mix(in oklab, white 70%, transparent);
  padding: 96px 0 40px;
  font-size: 14px;
}
.foot-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 72px;
}
.foot-brand { max-width: 36ch; }
.foot-brand .brand { color: white; margin-bottom: 18px; }
.foot-brand .brand .brand-name span { color: color-mix(in oklab, white 60%, transparent); }
.foot-brand p {
  font-size: 14px;
  color: color-mix(in oklab, white 55%, transparent);
  line-height: 1.55;
  margin: 0;
}
.foot-col h4 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: white;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.foot-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 12px;
}
.foot-col a {
  color: color-mix(in oklab, white 60%, transparent);
  transition: color .2s var(--ease);
}
.foot-col a:hover { color: white; }
.foot-bottom {
  padding-top: 32px;
  border-top: 1px solid color-mix(in oklab, white 8%, transparent);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: color-mix(in oklab, white 45%, transparent);
}
.foot-bottom a { color: color-mix(in oklab, white 60%, transparent); }
.foot-bottom a:hover { color: white; }

@media (max-width: 860px) {
  .foot-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .toc ol { columns: 1; }
  .id-card dl { grid-template-columns: 1fr; gap: 4px 0; }
  .id-card dt { margin-top: 12px; }
  .id-card dd { margin-bottom: 4px; }
}
@media (max-width: 600px) {
  .foot-top { grid-template-columns: 1fr; gap: 32px; }
  .foot-bottom { flex-direction: column; gap: 12px; }
  .lnav-inner { padding: 10px 10px 10px 16px; }
  .back-link span { display: none; }
  .back-link { padding: 9px 11px; }
}

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