/* Pages juridiques de MAZL (cgu, cgv, confidentialite, mentions-legales, cookies).
   Même charte « Encre & Tekhelet » que la vitrine (landing/src/styles/tokens.css) :
   un seul accent, le tekhelet ; Geist pour le texte, Geist Mono pour les étiquettes.
   Clair par défaut, sombre selon le système. Les polices sont servies par la vitrine
   sous /l/fonts/ ; sans elles, la pile système prend le relais. Aucune ressource externe. */
@font-face { font-family: "Geist"; src: url("/l/fonts/Geist-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/l/fonts/Geist-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/l/fonts/Geist-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/l/fonts/Geist-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/l/fonts/GeistMono-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/l/fonts/GeistMono-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;
  --ink: #0b0b0f;
  --paper: #ffffff;
  --mist: #f3f3f5;
  --hairline: #e2e2e6;
  --muted: #6b6b76;
  --tekhelet: #2747f5;
  --tekhelet-light: #5b78ff;
  --tekhelet-dark: #1a35c9;
  --nav-glass: rgba(255, 255, 255, 0.78);
  --todo-bg: #fdecc8;
  --todo-ink: #6b3304;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 52px;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
}
/* Sombre : les teintes de l'application (mobile/lib/core/theme/app_colors.dart). */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f4f5;
    --paper: #0b0b0f;
    --mist: #141418;
    --hairline: #26262c;
    --muted: #a1a1aa;
    --tekhelet: #7f96ff;
    --nav-glass: rgba(11, 11, 15, 0.78);
    --todo-bg: #3a2508;
    --todo-ink: #fcd9a0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); background: var(--paper); }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--tekhelet-light); outline-offset: 3px; border-radius: 8px; }

.skip { position: fixed; left: 16px; top: -64px; z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-weight: 600; transition: top 0.2s; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.dot { color: var(--tekhelet); }
.eyebrow, .mono-label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.eyebrow { margin-bottom: 22px; }
.display { font-size: clamp(34px, 5vw, 64px); font-weight: 700; line-height: 1.04; letter-spacing: -0.05em; text-wrap: balance; }
.lead { margin-top: 24px; max-width: 34em; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; letter-spacing: -0.015em; color: var(--muted); text-wrap: pretty; }
.wordmark { font-weight: 700; letter-spacing: -0.055em; font-size: 26px; line-height: 1; }
.wordmark span { color: var(--tekhelet); }
.wordmark--small { font-size: 22px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 28px; border-radius: 999px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; border: 1.5px solid transparent; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); white-space: nowrap; }
.btn--small { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn--ink { background: var(--ink); color: var(--paper); }

/* Barre fine et floue, comme la vitrine ; les liens sont les cinq documents. */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); background: var(--nav-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline); }
.nav__inner { height: 100%; width: min(100% - 2 * var(--gutter), 1240px); margin-inline: auto; display: flex; align-items: center; gap: 28px; }
.nav__links { display: flex; gap: 24px; margin-inline: auto; font-size: 13px; letter-spacing: -0.005em; }
.nav__links a { color: var(--muted); padding-block: 14px; }
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--tekhelet); }
.nav__actions { display: flex; align-items: center; gap: 18px; }
.nav__links + .nav__actions { margin-left: 0; }

/* En-tête du document */
.doc-head { padding: calc(var(--nav-h) + clamp(48px, 9vh, 104px)) 0 clamp(28px, 5vh, 48px); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; }
.notice { margin-top: 28px; max-width: 46em; padding: 14px 18px; border: 1px solid var(--hairline); border-radius: 16px; background: var(--mist); font-size: 15px; line-height: 1.5; }
.notice__count { font-family: var(--mono); font-weight: 500; }

mark.todo { background: var(--todo-bg); color: var(--todo-ink); padding: 1px 6px; border-radius: 6px; font-weight: 600; font-size: 0.94em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Corps : sommaire à gauche (ordinateur), texte à largeur de lecture */
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: clamp(56px, 9vh, 104px); }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--ink); }
.toc ol ol { margin-top: 2px; }
.toc__num { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.6px; color: var(--tekhelet); display: inline-block; min-width: 2.6em; }
.toc--side { display: none; }
.toc--inline { border: 1px solid var(--hairline); border-radius: 18px; background: var(--mist); font-size: 15px; }
.toc--inline summary { cursor: pointer; padding: 14px 18px; min-height: 48px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 1.3px; text-transform: uppercase; color: var(--ink); }
.toc--inline nav { padding: 0 18px 16px; }
.toc--inline li > a, .toc--side li > a { display: block; padding: 7px 0; line-height: 1.35; }
.toc__sub { margin-left: 2.6em; font-size: 0.93em; }
.toc__sub a { padding-block: 4px; }

@media (min-width: 1000px) {
  .doc { grid-template-columns: 252px minmax(0, 44rem); gap: clamp(40px, 6vw, 88px); }
  .toc--inline { display: none; }
  .toc--side { display: block; position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; padding-right: 8px; font-size: 14px; overscroll-behavior: contain; }
  .toc__title { margin-bottom: 12px; }
  .toc--side li > a { padding: 5px 0; }
  .toc__sub a { padding-block: 3px; }
}

.prose { font-size: 17px; line-height: 1.7; min-width: 0; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 3.2rem; padding-top: 2rem; border-top: 1px solid var(--hairline); font-size: clamp(24px, 2.6vw, 31px); font-weight: 700; line-height: 1.15; letter-spacing: -0.035em; text-wrap: balance; }
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h2 .num { display: block; margin-bottom: 10px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 1.3px; text-transform: uppercase; color: var(--tekhelet); }
.prose h2 .num::before { content: "Article "; }
.prose h3 { margin-top: 2.1rem; font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.prose h3 .num { margin-right: 0.55em; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.8px; color: var(--tekhelet); }
.prose h2 + *, .prose h3 + * { margin-top: 1rem; }
.prose .anchor { margin-left: 0.4em; padding: 2px 6px; font-family: var(--mono); font-size: 0.7em; font-weight: 500; color: var(--muted); opacity: 0; transition: opacity 0.2s; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
.prose .anchor:hover { color: var(--tekhelet); }
@media (hover: none) { .prose .anchor { display: none; } }

.prose a { color: var(--tekhelet); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { padding-left: 0.3em; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--tekhelet); }
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--mist); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }

.prose blockquote { padding: 18px 22px; border-radius: 20px; background: var(--mist); font-size: 16px; line-height: 1.6; }
.prose blockquote p { margin: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: 18px; -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 2px; }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose th { background: var(--mist); font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.prose td:first-child { font-weight: 500; }

/* Les autres documents */
.related { padding-block: clamp(40px, 7vh, 72px) clamp(64px, 10vh, 112px); border-top: 1px solid var(--hairline); }
.related__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 20px; }
.card { display: grid; align-content: start; gap: 8px; height: 100%; padding: 22px; border-radius: 22px; background: var(--mist); transition: transform 0.35s var(--ease); }
.card:hover { transform: translateY(-2px); }
.card__title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.card__text { font-size: 15px; line-height: 1.45; color: var(--muted); }

.footer { background: var(--mist); padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hairline); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__links { display: flex; gap: 12px 28px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.footer__links a { padding-block: 6px; }
.footer__links a:hover, .footer__links a[aria-current="page"] { color: var(--ink); }
.footer__links a[aria-current="page"] { font-weight: 600; }
.footer__copy { font-family: var(--mono); font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }

@media (max-width: 1000px) { .nav__links { display: none; } .nav__actions { margin-left: auto; } }
@media (max-width: 640px) {
  /* Tableaux : une carte par ligne, chaque valeur sous le nom de sa colonne. */
  .table-wrap { overflow: visible; border: 0; border-radius: 0; }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; min-width: 0; width: 100%; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .prose tr { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: 18px; background: var(--mist); }
  .prose td { padding: 0; border: 0; }
  .prose td + td { margin-top: 10px; }
  .prose td:first-child { font-size: 16px; font-weight: 600; }
  .prose td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
}
@media (max-width: 600px) {
  .prose { font-size: 16.5px; }
  .prose blockquote { padding: 16px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .skip, .prose .anchor { transition: none; }
}

@media print {
  :root { --ink: #000; --paper: #fff; --mist: #fff; --hairline: #bbb; --muted: #333; --tekhelet: #000; }
  .nav, .toc, .related, .footer, .skip, .anchor, .btn { display: none !important; }
  .doc-head { padding-top: 0; }
  .doc { display: block; }
  .prose { max-width: none; font-size: 11pt; }
  .prose h2 { break-after: avoid; }
  .prose a { color: #000; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  .table-wrap { overflow: visible; }
  .prose table { min-width: 0; }
  mark.todo { background: none; color: #000; border: 1px dashed #000; }
}
