/* Les jetons de l'identité (§20.6) : Carnet le jour, Loge le soir. */
:root {
  --bg: #F5F0E6; --side: #EEE7D9; --raised: #FFFCF5; --line: #DED3C0; --control: #8C8273;
  --ink: #1E2433; --muted: #565A65; --tint: #E6DECD; --laugh: #A0701E; --laugh-ink: #7A4F0C;
  --focus: #1E2433; --red: #A83636;
  --font-ui: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --font-text: "Literata", Georgia, serif;
  --font-code: "Bricolage Grotesque", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130F; --side: #110E0B; --raised: #1C1814; --line: #3A3128; --control: #8A7A66;
    --ink: #DED4C4; --muted: #B3A794; --tint: #2A231B; --laugh: #C98B2E; --laugh-ink: #F0C36E;
    --focus: #F6CF8A; --red: #F2958A;
  }
}
:root[data-theme="dark"] {
  --bg: #16130F; --side: #110E0B; --raised: #1C1814; --line: #3A3128; --control: #8A7A66;
  --ink: #DED4C4; --muted: #B3A794; --tint: #2A231B; --laugh: #C98B2E; --laugh-ink: #F0C36E;
  --focus: #F6CF8A; --red: #F2958A;
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 1.0625rem; line-height: 1.5; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip-link { position: absolute; left: 0.5rem; top: -3rem; padding: 0.5rem 0.75rem; background: var(--raised); border: 1px solid var(--control); border-radius: 0.5rem; }
.skip-link:focus { top: 0.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.layout { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--side); border-bottom: 1px solid var(--line); }
.logo { font-family: var(--font-code); font-weight: 700; font-stretch: 75%; font-size: 1.625rem; text-decoration: none; }
.env-banner { padding: 0.25rem 0.75rem; border: 1.5px solid var(--ink); border-radius: 0.5rem; font-weight: 700; font-size: 0.8125rem; }
main { width: 100%; max-width: 70rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; display: flex; flex-direction: column; gap: 1.25rem; }
h1 { margin: 0; font-size: 2.125rem; line-height: 1.15; }
h2 { margin: 0; font-size: 1.1875rem; }
.muted { color: var(--muted); }
.card { padding: 1rem 1.125rem; border-radius: 1rem; background: var(--raised); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.75rem; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1rem; border-radius: 0.75rem; border: 1px solid var(--control); background: transparent; color: var(--ink); font: inherit; font-size: 0.9375rem; cursor: pointer; text-decoration: none; }
.button.primary { border: 1.5px solid var(--ink); font-weight: 700; }

.field { display: flex; flex-direction: column; gap: 0.375rem; font-weight: 600; font-size: 0.9375rem; }
.field input { min-height: 2.75rem; padding: 0 0.75rem; border-radius: 0.75rem; border: 1px solid var(--control); background: var(--raised); color: var(--ink); font: inherit; font-weight: 400; }
.field .help { font-weight: 400; color: var(--muted); }
.errors { color: var(--red); font-weight: 700; }
.form { display: flex; flex-direction: column; gap: 1rem; max-width: 26rem; }

.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.files li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 0.75rem; }
.files audio { width: min(100%, 22rem); }
progress { width: 100%; height: 0.5rem; }
.qr svg { width: 12rem; height: 12rem; background: #fff; padding: 0.5rem; border-radius: 0.5rem; }
code.secret { font-size: 0.9375rem; word-break: break-all; }
