:root {
  --paper: #faf6ea;
  --panel: #fffdf7;
  --ink: #1d2620;
  --quiet: #4b564e;
  --bar: #0f3d2e;
  --on-bar: #f7f2e2;
  --link: #0f5132;
  --spot: #8a6a10;
  --rule: #ddd5bd;
  --wash: #f0ead6;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101914;
    --panel: #16221a;
    --ink: #e8e4d4;
    --quiet: #b4bcae;
    --bar: #0a1710;
    --on-bar: #e8e4d4;
    --link: #8fd3a9;
    --spot: #f0a36b;
    --rule: #2c3b30;
    --wash: #1a281f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1.0625rem/1.7 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.frame { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
.frame-wide { max-width: 66rem; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: var(--spot); }
:focus-visible { outline: 3px solid var(--spot); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 10; padding: .6rem 1rem; background: var(--spot); color: #fff; }
.skip:focus { left: 0; }

/* Masthead */
.masthead { background: var(--bar); color: var(--on-bar); border-bottom: 4px solid var(--spot); }
.masthead .frame { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 2rem; padding-top: 1rem; padding-bottom: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: bold 1.55rem/1.2 var(--serif); letter-spacing: .01em; color: var(--on-bar); text-decoration: none; }
.brand img { display: block; width: 40px; height: 40px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(201,162,39,.55); }
.masthead { border-bottom: 3px solid #c9a227; }
.brand:hover { color: var(--on-bar); text-decoration: underline; }
.menu { max-width: 100%; overflow-x: auto; }
.menu ul { display: flex; gap: 0 1.4rem; margin: 0; padding: 0; list-style: none; white-space: nowrap; font-size: .94rem; }
.menu a { display: inline-block; padding: .4rem 0; color: var(--on-bar); text-decoration: none; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--on-bar); border-bottom-color: var(--on-bar); }
.menu a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--spot); }
.masthead :focus-visible { outline-color: var(--on-bar); }

main { padding-top: 1.75rem; padding-bottom: 4rem; }
.crumbs { font-size: .85rem; color: var(--quiet); }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "\203A"; margin: 0 .55rem; }
.crumbs a { color: var(--quiet); }
.headline { margin: .6rem 0 .5rem; font: bold clamp(1.9rem, 1.3rem + 2.6vw, 2.7rem)/1.15 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.stamp { margin: 0 0 1.6rem; padding-bottom: .9rem; border-bottom: 1px solid var(--rule); font-size: .88rem; color: var(--quiet); }
.prose h2, .guides h2 { margin: 2.4rem 0 .6rem; font: bold 1.55rem/1.25 var(--serif); color: var(--link); }
.prose h3 { margin: 1.6rem 0 .3rem; font: bold 1.18rem/1.3 var(--serif); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--spot); }
.prose > p:first-child { font: 1.25rem/1.55 var(--serif); }
.callout { margin: 1.8rem 0; padding: .5rem 1.2rem .25rem; background: var(--wash); border: 1px solid var(--rule); border-left: 5px solid var(--spot); border-radius: 0 6px 6px 0; }
.scroller { margin: 0 0 1.5rem; overflow-x: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); }
table { width: 100%; min-width: 22rem; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { padding: .6rem .9rem; text-align: left; border-bottom: 1px solid var(--rule); }
th { background: var(--bar); color: var(--on-bar); font-weight: 600; }
tbody tr:nth-child(even) { background: var(--wash); }
/* wide table (5 columns or more): keep the first column readable, the table scrolls inside its frame */
table:has(th:nth-child(5)) th:first-child { min-width: 10.5rem; }
tbody tr:last-child td { border-bottom: 0; }

/* Home: guides as cards */
.layout-home .frame { max-width: 52rem; }
.layout-home .headline { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.4rem); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.card { padding: 1.1rem 1.2rem; background: var(--panel); border: 1px solid var(--rule); border-top: 4px solid var(--bar); border-radius: 6px; font-size: .95rem; line-height: 1.5; color: var(--quiet); }
.card p { margin: .4rem 0 0; }
.card-link { font: bold 1.15rem/1.3 var(--serif); color: var(--ink); text-decoration: none; }
.card-link:hover { color: var(--spot); text-decoration: underline; }

.basement { padding: 1.6rem 0; background: var(--bar); color: var(--on-bar); font-size: .9rem; }
.basement p { margin: 0 0 .5rem; }
.basement a { color: var(--on-bar); }
.basement :focus-visible { outline-color: var(--on-bar); }
@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .prose > p:first-child { font-size: 1.12rem; }
}
@media print {
  .menu, .skip { display: none; }
  body, .masthead, .basement { background: #fff; color: #000; }
}

/* accueil : le bandeau garde la largeur du menu (sinon le dernier libellé est rogné) */
.layout-home .masthead .frame { max-width: 66rem; }
