/* Regnabit — feuille de style commune (archives statiques) */
:root {
  --bg: #f7f3ea;
  --paper: #fffdf8;
  --ink: #2a1d17;
  --muted: #6b5a4e;
  --line: #e2d8c6;
  --accent: #6d1616;
  --accent-ink: #fff8ef;
  --gold: #a47c2c;
  --shadow: 0 1px 2px rgba(60, 30, 10, .06), 0 4px 16px rgba(60, 30, 10, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110e;
    --paper: #211915;
    --ink: #efe6da;
    --muted: #b7a796;
    --line: #3a2d25;
    --accent: #c9574b;
    --accent-ink: #1a0f0c;
    --gold: #d2aa5c;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.site-head { background: var(--accent); color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { .site-head { background: #3a1512; color: var(--ink); } }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { color: inherit; text-decoration: none; font-size: 26px; letter-spacing: .12em; font-variant: small-caps; }
.site-head nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.site-head nav a { color: inherit; text-decoration: none; opacity: .9; }
.site-head nav a:hover, .site-head nav a[aria-current] { opacity: 1; text-decoration: underline; }

.archive-note { background: var(--paper); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.archive-note .wrap { padding-top: 8px; padding-bottom: 8px; }

main { padding: 32px 0 48px; }
h1, h2, h3 { font-weight: normal; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: 24px; margin-top: 1.6em; }
h3 { font-size: 19px; }
.lead { font-size: 19px; color: var(--muted); max-width: 46em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* Cartes de la page d'accueil */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card h3 { margin: 0 0 6px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .domain { margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--gold); letter-spacing: .02em; }
.group-title { font-size: 14px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); margin: 36px 0 0; }

/* Listes de documents */
.filter { width: 100%; max-width: 420px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; margin: 8px 0 18px; }
.doclist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doclist li { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.doclist a.t { font-size: 18px; text-decoration: none; }
.doclist a.t:hover { text-decoration: underline; }
.doclist .meta { font-size: 14px; color: var(--muted); }
.sections { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sections a { display: block; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.sections a:hover { border-color: var(--accent); }
.sections .n { display: block; font-size: 13px; color: var(--muted); }

/* Fiche document */
.doc { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 24px; box-shadow: var(--shadow); }
.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0; }
.doc dt { color: var(--muted); font-size: 15px; }
.doc dd { margin: 0; }
@media (max-width: 560px) { .doc dl { grid-template-columns: 1fr; } .doc dd { margin-bottom: 8px; } }
.desc { margin: 18px 0; }
.desc h3 { font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 10px 18px; border-radius: 8px; font-size: 16px; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.notice { background: var(--paper); border-left: 4px solid var(--gold); padding: 12px 16px; margin: 18px 0; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 12px 0 28px; }
.gallery a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px; text-decoration: none; }
.gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--line); }
.figure { text-align: center; margin: 12px 0 20px; }
.figure img { max-height: 80vh; border-radius: 6px; box-shadow: var(--shadow); }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; font-size: 15px; }

.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 20px 0 32px; }
.site-foot a { color: var(--muted); }
