:root {
  --encre: #14213d;
  --papier: #f6f2e9;
  --blanc: #fffdf8;
  --trait: #d8ceb8;
  --accent: #9a4a23;
  --vert: #1f6f4a;
  --rouge: #a4161a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, .marque { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 .5rem; }
h1:focus, main:focus { outline: none; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .6rem; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.evitement { position: absolute; left: -999px; }
.evitement:focus { left: .5rem; top: .5rem; background: var(--blanc); padding: .5rem; z-index: 3; }
.bandeau { margin: 0; padding: .35rem 1rem; background: var(--rouge); color: #fff; text-align: center; font-weight: 600; font-size: .9rem; position: sticky; top: 0; z-index: 2; }
header { background: var(--encre); color: #fff; padding: .8rem max(1rem, calc((100% - 66rem) / 2)); }
header a { color: #fff; }
.marque { font-size: 1.3rem; font-weight: 700; text-decoration: none; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: .7rem 0 0; }
nav li a { display: block; padding: .35rem .7rem; border-radius: 6px; text-decoration: none; }
nav li a[aria-current="page"] { background: #fff; color: var(--encre); font-weight: 600; }
.session { margin: .5rem 0 0; font-size: .9rem; }
main { max-width: 66rem; margin: 0 auto; padding: 1.5rem 1rem; min-height: 60vh; }
footer { max-width: 66rem; margin: 0 auto; padding: 1rem; border-top: 1px solid var(--trait); font-size: .85rem; }
footer p { margin: .2rem 0; }
.chapeau { font-size: 1.05rem; max-width: 45rem; }
.note { font-size: .9rem; }
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; margin: 1rem 0; }
.carte, .encadre, details { background: var(--blanc); border: 1px solid var(--trait); border-radius: 10px; padding: 1rem; }
.encadre, details { margin: 1rem 0; }
.encadre h2 { margin-top: 0; }
.choix { display: flex; flex-direction: column; gap: .3rem; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.choix:hover { border-color: var(--accent); }
.chiffre { margin: 0; }
.chiffre dd { margin: 0; font: 700 2.2rem/1.2 Georgia, serif; }
.pages { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pastille { display: inline-block; border: 1px solid var(--trait); border-radius: 999px; padding: .35rem .85rem; background: var(--papier); }
.pastille.alerte { border-color: var(--rouge); color: var(--rouge); }
.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; align-items: start; }
figure { margin: 0; min-width: 0; }
figcaption { font-weight: 600; margin-bottom: .3rem; }
img { display: block; width: 100%; height: auto; border: 1px solid var(--trait); }
.scan { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: auto; }
.scan.grand { cursor: zoom-out; max-height: 75vh; }
.scan.grand img { width: 200%; max-width: none; }
.defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--blanc); }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
code { font-size: .82rem; overflow-wrap: anywhere; }
.champ { display: flex; flex-direction: column; margin-bottom: .6rem; min-width: 0; }
label { font-weight: 600; }
.option { display: block; font-weight: 400; padding: .3rem 0; }
fieldset { border: 1px solid var(--trait); border-radius: 8px; margin: 0 0 .8rem; background: var(--blanc); }
legend { font-weight: 600; }
input:not([type="radio"]), select { font: inherit; padding: .45rem .6rem; border: 1px solid #8c8270; border-radius: 6px; background: #fff; color: inherit; max-width: 100%; }
.recherche { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; }
.recherche .bouton { margin-bottom: .6rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0; }
.bouton { display: inline-block; font: inherit; font-weight: 600; padding: .5rem 1rem; border-radius: 6px; border: 1px solid var(--encre); background: var(--encre); color: #fff; cursor: pointer; text-decoration: none; }
.bouton.secondaire { background: transparent; color: var(--encre); }
.bouton.danger { background: var(--rouge); border-color: var(--rouge); }
.lienbouton { font: inherit; background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; }
.erreur { color: var(--rouge); font-weight: 600; }
.succes { color: var(--vert); font-weight: 600; }
.alarme { border: 3px solid var(--rouge); background: #fdecec; border-radius: 10px; padding: 0 1rem; }
.alarme h2 { color: var(--rouge); margin-top: 1rem; }
.fiche { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.fiche dt { font-weight: 600; }
.fiche dd { margin: 0; }
summary { cursor: pointer; font-weight: 600; }
