:root {
  --fond: #f4f6f8;
  --papier: #ffffff;
  --texte: #17202a;
  --discret: #52606d;
  --accent: #14365d;
  --accent-fort: #0d2440;
  --accent-texte: #f4f6f8;
  --filet: #d3dae2;
  --encadre: #e9eef4;
  --pied: #0d2440;
  --pied-texte: #e8edf3;
  --casaque: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0f151c;
    --papier: #151d26;
    --texte: #e6ebf0;
    --discret: #a9b4c0;
    --accent: #8db8e8;
    --accent-fort: #b5d2f2;
    --accent-texte: #0d2440;
    --filet: #2c3947;
    --encadre: #18222d;
    --pied: #0a1017;
    --pied-texte: #e6ebf0;
    --casaque: #f08a80;
  }
}
* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}
.conteneur { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }
.saut {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-texte); padding: .5rem 1rem; z-index: 10;
}
.saut:focus { left: 0; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* En-tête : la marque à gauche, le menu sur une seule ligne */
.entete { background: var(--papier); border-top: 5px solid var(--accent); border-bottom: 1px solid var(--filet); }
.entete .conteneur {
  max-width: 64rem; display: flex; align-items: baseline; justify-content: space-between;
  gap: .25rem 2rem; flex-wrap: wrap; padding-top: .9rem; padding-bottom: .7rem;
}
.marque { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; font-weight: bold; letter-spacing: -.01em; }
.marque a { color: var(--texte); text-decoration: none; }
.marque a::before {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .5em;
  background: var(--casaque); transform: rotate(45deg) translateY(-.05em);
}
nav[aria-label="Navigation principale"] { max-width: 100%; overflow-x: auto; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0 1.35rem; font-size: .95rem; white-space: nowrap; }
nav a { display: inline-block; padding: .35rem 0; color: var(--discret); text-decoration: none; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--accent); border-bottom-color: var(--filet); }
nav a[aria-current="page"] { color: var(--texte); font-weight: 600; border-bottom-color: var(--casaque); }

main { padding-top: 1.5rem; padding-bottom: 3.5rem; }
.fil { font-size: .85rem; color: var(--discret); margin: 0 0 .25rem; text-transform: uppercase; letter-spacing: .06em; }
.fil ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.fil li + li::before { content: "/"; margin: 0 .5rem; color: var(--filet); }
.fil a { color: var(--discret); }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; color: var(--texte); text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); margin: .5rem 0 .4rem; letter-spacing: -.015em; }
h2 { font-size: 1.5rem; margin: 2.6rem 0 .6rem; }
h2::before { content: ""; display: block; width: 2.5rem; height: 3px; background: var(--casaque); margin-bottom: .7rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 .3rem; color: var(--accent-fort); }
.maj { color: var(--discret); font-size: .88rem; margin: 0 0 1.5rem; }
.corps { max-width: 68ch; }
.corps p, .corps ul, .corps ol { margin: 0 0 1.05rem; }
.corps ul, .corps ol { padding-left: 1.3rem; }
.corps li { margin-bottom: .4rem; }
.corps li::marker { color: var(--casaque); }
.corps > p:first-child { font-size: 1.2rem; line-height: 1.55; color: var(--texte); }
.encadre { background: var(--encadre); border-left: 4px solid var(--accent); padding: .4rem 1.1rem .2rem; margin: 2rem 0; }
.encadre h2 { margin-top: .8rem; font-size: 1.2rem; }
.encadre h2::before { display: none; }
.tableau { overflow-x: auto; margin: 0 0 1.4rem; border: 1px solid var(--filet); background: var(--papier); }
table { border-collapse: collapse; width: 100%; min-width: 20rem; font-size: .95rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .5rem .8rem; border-bottom: 1px solid var(--filet); }
th { background: var(--accent); color: var(--accent-texte); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--encadre); }
/* tableau large (5 colonnes et plus) : la premiere colonne garde une largeur lisible, le tableau defile dans son cadre */
table:has(th:nth-child(5)) th:first-child { min-width: 10.5rem; }

/* Accueil : bandeau d'ouverture et guides en fiches */
.type-accueil main { padding-top: 2.5rem; }
.type-accueil h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.1rem); max-width: 18ch; }
.type-accueil .corps { max-width: none; }
.type-accueil .corps > p { max-width: 62ch; }
.type-accueil .corps > ul:first-of-type {
  list-style: none; padding: 0; margin: 1rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(18.5rem, 1fr)); gap: .9rem;
}
.type-accueil .corps > ul:first-of-type li {
  margin: 0; padding: 1rem 1.1rem 1.05rem; background: var(--papier);
  border: 1px solid var(--filet); border-top: 3px solid var(--accent);
  font-size: .97rem; line-height: 1.5; color: var(--discret);
}
.type-accueil .corps > ul:first-of-type li a {
  display: block; margin-bottom: .35rem; font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem; font-weight: bold; line-height: 1.3; color: var(--texte); text-decoration: none;
}
.type-accueil .corps > ul:first-of-type li a:hover { color: var(--accent); text-decoration: underline; }

.pied { background: var(--pied); color: var(--pied-texte); padding: 1.6rem 0 1.4rem; font-size: .9rem; }
.pied p { margin: 0 0 .5rem; }
.pied a { color: var(--pied-texte); }
@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .entete .conteneur { padding-top: .7rem; }
  .corps > p:first-child { font-size: 1.1rem; }
}
@media print {
  .entete nav, .pied a, .saut { display: none; }
  body { background: #fff; color: #000; }
}

/* habillage propre à ce site : texte en serif, titres en linéale, filet fin sous l'accent des intertitres */
body { font-family: Georgia, "Times New Roman", Times, serif; font-size: 1.09rem; }
h1, h2, h3, .marque, nav, .fil, .maj, table, .pied { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
h1 { letter-spacing: -.02em; font-weight: 800; }
h2 { font-weight: 700; padding-top: .9rem; border-top: 1px solid var(--filet); }
h2::before { width: 3.5rem; height: 4px; margin-top: -.95rem; margin-bottom: .8rem; }
