/* Petit Five: the plain pages (about, privacy, terms, accessibility). No fonts, scripts or images from
   anywhere else. "Patisserie at dusk": the same tokens as the app. */

:root {
  --bg: #fbf6ef;
  --surface: #ffffff;
  --ink: #2a2233;
  --muted: #6b6178;
  --line: #eadfd2;
  --accent: #b83f72;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14111c;
    --surface: #1e1929;
    --ink: #f3eefb;
    --muted: #b3a9c9;
    --line: #2e2740;
    --accent: #ee8fb4;
  }
}

/* With JS, only the chosen language shows (set in <head> before first paint). Without JS, both show. */
html[data-lang="en"] article[lang="fr"],
html[data-lang="fr"] article[lang="en"],
html[data-lang="en"] [data-l="fr"],
html[data-lang="fr"] [data-l="en"] { display: none; }
html:not([data-lang]) .site-footer [data-l="fr"]::before { content: " / "; }

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
}

@media (min-width: 600px) {
  body { font-size: 1.125rem; } /* 18px */
}

.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--ink); text-decoration: none;
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: 0.01em;
}
.brand img { display: block; border-radius: 9px; }

.lang-toggle {
  min-height: 44px; min-width: 44px; padding: 0 16px;
  font: inherit; font-size: 0.9rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); }
.lang-toggle[hidden] { display: none; }

/* content */
main { padding: 40px 0 56px; }
article + article { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); }
html[data-lang] article + article { margin-top: 0; padding-top: 0; border-top: 0; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--ink); }
h1 { font-size: 2.1rem; margin: 0 0 8px; letter-spacing: -0.005em; }
h2 { font-size: 1.35rem; margin: 40px 0 10px; }
h3 { font-size: 1.1rem; margin: 28px 0 6px; }

p, ul, ol, dl { margin: 0 0 16px; }
ul, ol { padding-left: 1.3em; }
li { margin: 0 0 6px; }
li::marker { color: var(--muted); }
strong { font-weight: 650; }

.updated { margin: 0 0 28px; color: var(--muted); font-size: 0.9rem; }
.lede { font-size: 1.1em; }

.summary {
  margin: 0 0 32px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.summary h2 { margin-top: 0; font-size: 1.1rem; }
.summary p:last-child { margin-bottom: 0; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; padding: 0.1em 0.35em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }

/* data tables become stacked cards on narrow screens */
.table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 0.95em; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table th { font-weight: 650; color: var(--muted); font-size: 0.85em; }
@media (max-width: 560px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 2px 0; }
  .table td:first-child { font-weight: 650; }
}

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 0 0 8px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--muted); }
.site-footer nav a:first-child { padding-left: 0; }
.site-footer nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.site-footer p { margin: 0; }

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

@media print {
  .lang-toggle { display: none; }
}
