/* The /legal page, generated by tools/build-legal.mjs from tools/legal-template.html.
   site.css belongs to the home page, so the few site tokens used here are copied from the design
   system handoff (docs/design/handoff/site-vitrine-wallet-v2/design-system/tokens/, the light
   cream theme the site uses). Font files are the home page's, same /fonts/ paths. */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/fonts/HankenGrotesk-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F3F0E8;
  --surface: #FBF9F3;
  --surface-2: #E9E5DB;
  --text: #1C1C1A;
  --text-muted: #5C594F;
  --primary: #1C1C1A;
  --on-primary: #F5F3EC;
  --line: rgba(26, 25, 23, 0.12);
  --line-strong: rgba(26, 25, 23, 0.24);
  --focus: #0E8A7E;
  --link-hover: #06544C; /* --on-accent-soft: 7.7:1 on --bg, where the site's #0E8A7E is 3.7:1 */
  --font-display: 'Space Grotesk', 'Hanken Grotesk', system-ui, sans-serif;
  --font-text: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* The apps deep-link to #mentions-legales, #politique-de-confidentialite and #cgu: land clear of
   the sticky header. */
[id] { scroll-margin-top: 96px; }

.skip {
  position: absolute;
  top: -200px;
  left: 12px;
  z-index: 60;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header and footer: the home page's lockup, links and pill. */
.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.bar-in,
.foot-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
}
.bar-in { padding: 14px 24px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img { display: block; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.pill:hover { color: var(--on-primary); }

.foot {
  padding: 40px 24px 48px;
  border-top: 1px solid var(--line);
}
.foot-in { flex-wrap: wrap; align-items: flex-start; gap: 28px; }
.foot .brand { font-size: 17px; }
.foot p { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 14px; font-weight: 500; }
.foot nav a { color: var(--text-muted); text-decoration: none; }
.foot nav a.lead { color: var(--text); }
.foot nav a:hover { color: var(--link-hover); }

@media (max-width: 860px) {
  .foot-in { flex-direction: column; }
  .foot nav { flex-direction: column; gap: 14px; font-size: 16px; }
}

/* The reading column. */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 88px;
}

.doc h1,
.doc h2,
.doc h3,
.doc h4,
.doc h5,
.doc h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.doc h1 {
  margin: 0 0 32px;
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.doc h2 {
  margin: 72px 0 24px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.doc h3 { margin: 44px 0 14px; font-size: 24px; }
.doc h4 { margin: 32px 0 10px; font-size: 20px; }
.doc h5,
.doc h6 { margin: 24px 0 8px; font-size: 18px; }

.doc p,
.doc ul,
.doc ol,
.doc blockquote { margin: 0 0 18px; }
.doc ul,
.doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: 8px; }
.doc li > ul,
.doc li > ol { margin: 8px 0 0; }
.doc strong { font-weight: 600; }
.doc code { font-family: ui-monospace, 'SF Mono', monospace; font-size: 0.9em; overflow-wrap: anywhere; }
.doc blockquote {
  margin-left: 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--line-strong);
  color: var(--text-muted);
}
.doc hr { margin: 40px 0; border: 0; border-top: 1px solid var(--line); }

.toc {
  margin: 0 0 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li + li { margin-top: 6px; }
.toc a { font-family: var(--font-display); font-size: 19px; font-weight: 600; }

/* Wide tables scroll inside their own box, never the page (360 px screens). */
.table-scroll {
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.table-scroll table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}
.table-scroll th,
.table-scroll td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table-scroll th { background: var(--surface-2); font-weight: 600; }
.table-scroll th + th,
.table-scroll td + td { border-left: 1px solid var(--line); }
.table-scroll tr:last-child td { border-bottom: 0; }
