/* Égide — interface noir et blanc, une couleur d'accent (surchargeable par entité) */

:root {
  --fond: #ffffff;
  --fond-alt: #f4f4f4;
  --texte: #0a0a0a;
  --texte-doux: #5c5c5c;
  --bord: #d4d4d4;
  --bord-fort: #0a0a0a;
  --inverse-fond: #0a0a0a;
  --inverse-texte: #ffffff;
  --focus: #0f5e7a;
  --accent: #0f5e7a;
  --accent-texte: #ffffff;
  --accent-pale: #e6f1f5;
  --succes: #1d6b3a;
  --alerte: #8a4b00;
  --rayon: 2px;
  --police: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

:root[data-theme="sombre"] {
  --fond: #0a0a0a;
  --fond-alt: #161616;
  --texte: #f2f2f2;
  --texte-doux: #a3a3a3;
  --bord: #2e2e2e;
  --bord-fort: #f2f2f2;
  --inverse-fond: #f2f2f2;
  --inverse-texte: #0a0a0a;
  --focus: #6cc3dd;
  --accent: #6cc3dd;
  --accent-texte: #0a0a0a;
  --accent-pale: #10272f;
  --succes: #6fcf97;
  --alerte: #f2b366;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    --fond: #0a0a0a;
    --fond-alt: #161616;
    --texte: #f2f2f2;
    --texte-doux: #a3a3a3;
    --bord: #2e2e2e;
    --bord-fort: #f2f2f2;
    --inverse-fond: #f2f2f2;
    --inverse-texte: #0a0a0a;
    --focus: #6cc3dd;
    --accent: #6cc3dd;
    --accent-texte: #0a0a0a;
    --accent-pale: #10272f;
    --succes: #6fcf97;
    --alerte: #f2b366;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--fond);
  color: var(--texte);
  font: 14px/1.5 var(--police);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
h3 { font-size: 15px; font-weight: 600; }

p { margin: 0 0 12px; }

.doux { color: var(--texte-doux); }
.mono { font-family: var(--mono); font-size: 13px; }
td.mono { white-space: nowrap; }

/* --- Mise en page ------------------------------------------------------- */

.bandeau {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 52px;
  padding: 0 20px;
  background: var(--bandeau-fond, var(--inverse-fond));
  color: var(--bandeau-texte, var(--inverse-texte));
  border-bottom: 1px solid var(--bandeau-bord, transparent);
}

.marque {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.32em;
  text-decoration: none;
}

.bandeau .espace { flex: 1; }

.bandeau select,
.bandeau button {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: var(--rayon);
  font: inherit;
  font-size: 13px;
  padding: 4px 8px;
  cursor: pointer;
}

.bandeau select option { color: #0a0a0a; background: #ffffff; }

.bandeau form { margin: 0; }

.bandeau .utilisateur { font-size: 13px; opacity: 0.85; }
.bandeau .bascule-menu { display: none; }

.cadre { display: flex; min-height: calc(100vh - 52px); }

.navigation {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--bord);
  padding: 20px 0;
}

.navigation .groupe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 14px 6px 20px;
  margin: 10px 0 2px;
  border: 0;
  border-radius: 0;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--texte-doux);
  cursor: default;
}

/* Flèche de repli : visible seulement avec JavaScript (sinon tout reste déplié). */
.navigation .chevron { display: none; }
html.js .navigation .groupe { cursor: pointer; }
html.js .navigation .groupe:hover { color: var(--texte); background: var(--fond-alt); }
html.js .navigation .chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}
.navigation .groupe-menu.replie .chevron { transform: rotate(-45deg); }
.navigation .groupe-menu.replie[data-actif] .groupe { color: var(--accent); }
.navigation .tout-replier {
  display: block;
  margin: 18px 20px 0;
  padding: 4px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--texte-doux);
  text-decoration: underline;
  cursor: pointer;
}
.navigation .tout-replier[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { html.js .navigation .chevron { transition: none; } }

.navigation a {
  display: block;
  padding: 6px 20px;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.navigation a:hover { background: var(--fond-alt); }
.navigation a.actif { border-left-color: var(--accent); font-weight: 600; background: var(--accent-pale); }

.contenu { flex: 1; min-width: 0; padding: 28px 32px 48px; max-width: var(--largeur-contenu, 1200px); }

.entete {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--bord-fort);
}

/* En-tête de page fixe : titre et actions restent visibles au défilement (grands écrans). */
@media screen and (min-width: 801px) and (min-height: 560px) {
  .entete { position: sticky; top: var(--hauteur-bandeau); z-index: 5; background: var(--fond); padding-top: 12px; margin-top: -12px; }
}

.entete h1 { margin: 0; }
.entete .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.fil { font-size: 12px; color: var(--texte-doux); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }

section { margin-bottom: 32px; }

/* --- Boutons ------------------------------------------------------------ */

.bouton, button.bouton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--bord-fort);
  border-radius: var(--rayon);
  background: var(--fond);
  color: var(--texte);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.bouton:hover { background: var(--fond-alt); }

.bouton.principal { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.bouton.principal:hover { opacity: 0.88; }

.bouton.discret { border-color: var(--bord); font-weight: 500; }

.bouton.danger { border-style: dashed; }

/* --- Tableaux ----------------------------------------------------------- */

table { width: 100%; border-collapse: collapse; }

th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--bord); vertical-align: top; }

th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--texte-doux);
  border-bottom: 1px solid var(--bord-fort);
}

tbody tr:hover { background: var(--fond-alt); }

td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; }

.vide { padding: 32px; text-align: center; color: var(--texte-doux); border: 1px dashed var(--bord); }

/* --- Étiquettes --------------------------------------------------------- */

.etiquette {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--bord-fort);
  border-radius: var(--rayon);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.etiquette.pleine { background: var(--inverse-fond); color: var(--inverse-texte); }
.etiquette.pointillee { border-style: dashed; }

/* --- Indicateurs -------------------------------------------------------- */

.indicateurs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--bord-fort);
  margin-bottom: 32px;
}

.indicateur { display: block; padding: 16px 20px; border-right: 1px solid var(--bord); color: inherit; text-decoration: none; }
.indicateur .valeur, .indicateur .libelle { display: block; }
a.indicateur:hover { background: var(--fond-alt); }
a.indicateur:hover .libelle { text-decoration: underline; }
.titre-indicateurs { margin: 0 0 10px; }
.indicateur:last-child { border-right: 0; }
.indicateur .valeur { font-size: 32px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.indicateur .libelle { font-size: 12px; color: var(--texte-doux); text-transform: uppercase; letter-spacing: 0.06em; }

/* --- Fiches ------------------------------------------------------------- */

.fiche { display: grid; grid-template-columns: 220px 1fr; border-top: 1px solid var(--bord-fort); }
.fiche dt, .fiche dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--bord); }
.fiche dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texte-doux); }

.besoins { display: inline-flex; gap: 4px; font-family: var(--mono); font-size: 12px; }
.besoins span { border: 1px solid var(--bord); padding: 0 5px; }

/* --- Formulaires -------------------------------------------------------- */

.formulaire { max-width: 640px; }

.champ { margin-bottom: 18px; }

.champ label,
.champ > .libelle {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.champ input[type="text"],
.champ input[type="email"],
.champ input[type="password"],
.champ input[type="number"],
.champ select,
.champ textarea,
.filtres input,
.filtres select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--bord-fort);
  border-radius: var(--rayon);
  background: var(--fond);
  color: var(--texte);
  font: inherit;
}

.champ textarea { resize: vertical; }

.champ .aide { font-size: 12px; color: var(--texte-doux); margin-top: 4px; }

.champ .erreur, .erreurs { font-size: 13px; font-weight: 600; margin-top: 4px; }
.champ .erreur::before, .erreurs li::before { content: "✕ "; }

.champ ul.cases, .champ div.cases { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow: auto; border: 1px solid var(--bord); }
.champ .cases label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; padding: 6px 10px; margin: 0; border-bottom: 1px solid var(--bord); }

.champ input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: -3px; margin-right: 8px; }

.erreurs { list-style: none; padding: 12px 14px; border: 2px solid var(--bord-fort); margin: 0 0 18px; }

.boutons { display: flex; gap: 8px; margin-top: 24px; }

.filtres { display: flex; gap: 8px; margin-bottom: 16px; }
.filtres input { max-width: 320px; }
.filtres select { max-width: 200px; }

/* --- Messages ----------------------------------------------------------- */

.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.messages li { padding: 10px 14px; border: 1px solid var(--bord-fort); border-left-width: 4px; margin-bottom: 8px; }

/* --- Pages d'authentification ------------------------------------------ */

.page-seule {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.carte { width: 100%; max-width: 400px; border: 1px solid var(--bord-fort); padding: 32px; }
.carte.large { max-width: 600px; }
.carte h2 { margin-top: 28px; }
.carte .marque { display: block; margin-bottom: 28px; font-size: 18px; }
.carte .bouton { width: 100%; justify-content: center; }
.separateur { display: flex; align-items: center; gap: 12px; color: var(--texte-doux); font-size: 12px; margin: 20px 0; text-transform: uppercase; letter-spacing: 0.08em; }
.separateur::before, .separateur::after { content: ""; flex: 1; border-top: 1px solid var(--bord); }

.qr { background: #ffffff; padding: 12px; border: 1px solid var(--bord-fort); display: inline-block; line-height: 0; }
.qr svg { width: 200px; height: 200px; }

.codes { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: var(--mono); font-size: 15px; padding: 16px; border: 1px dashed var(--bord-fort); margin: 16px 0; }

.pagination { display: flex; gap: 12px; align-items: center; margin-top: 16px; }

@media (max-width: 800px) {
  .cadre { flex-direction: column; }
  .navigation { width: auto; border-right: 0; border-bottom: 1px solid var(--bord); padding: 8px 0; }
  .contenu { padding: 20px 16px 40px; }
  .fiche { grid-template-columns: 1fr; }
  .fiche dt { border-bottom: 0; padding-bottom: 0; }
  .bandeau .utilisateur { display: none; }
  .bandeau { height: auto; min-height: 52px; flex-wrap: wrap; gap: 8px 14px; padding: 8px 16px; }
  .bandeau .espace { flex-basis: 0; }
  .bandeau .lien-entete { font-size: 13px; }
  html.js .bascule-menu { display: inline-block; }
  html.js .navigation:not(.ouverte) { display: none; }
  .cadre { min-height: 0; }
  table { display: block; overflow-x: auto; }
}

/* --- EBIOS RM ----------------------------------------------------------- */

.entete .actions form { margin: 0; }

.onglets { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--bord); margin: -8px 0 24px; }
.onglets a { padding: 8px 14px; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--texte-doux); }
.onglets a:hover { color: var(--texte); }
.onglets a.actif { border-bottom-color: var(--accent); color: var(--texte); font-weight: 600; }

.bandeau-info { padding: 10px 14px; border: 1px solid var(--bord); border-left: 4px solid var(--accent); background: var(--accent-pale); }

.deux-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }

.centre { text-align: center; }

.matrice { table-layout: fixed; }
.matrice caption { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding-bottom: 8px; }
.matrice th { font-size: 10.5px; }
.matrice tbody th { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--texte); border-bottom: 1px solid var(--bord); width: 34%; }
.matrice td { height: 52px; border: 1px solid var(--fond); text-align: center; vertical-align: middle; }
.matrice tbody tr:hover { background: none; }

/* Niveaux de risque : du blanc au noir, lisibles sans couleur. */
:root { --niv-faible: #ffffff; --niv-modere: #dcdcdc; --niv-eleve: #8a8a8a; --niv-critique: #0a0a0a; --niv-texte-fort: #ffffff; }
:root[data-theme="sombre"] { --niv-faible: #1c1c1c; --niv-modere: #4a4a4a; --niv-eleve: #9a9a9a; --niv-critique: #f2f2f2; --niv-texte-fort: #0a0a0a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) { --niv-faible: #1c1c1c; --niv-modere: #4a4a4a; --niv-eleve: #9a9a9a; --niv-critique: #f2f2f2; --niv-texte-fort: #0a0a0a; }
}
.niv-faible { background: var(--niv-faible); outline: 1px solid var(--bord); outline-offset: -1px; }
.niv-modere { background: var(--niv-modere); color: #0a0a0a; }
.niv-eleve { background: var(--niv-eleve); color: var(--niv-texte-fort); }
.niv-critique { background: var(--niv-critique); color: var(--niv-texte-fort); }
.etiquette.niv-faible, .etiquette.niv-modere, .etiquette.niv-eleve, .etiquette.niv-critique { border-color: var(--bord-fort); }

.puce-risque { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 0 4px; margin: 1px; border: 1px solid currentColor; }
.puce-risque.non-reevalue { border-style: dashed; opacity: .75; }

.sequence { margin-top: 6px; font-size: 13px; color: var(--texte-doux); }
.sequence strong { display: inline-block; min-width: 72px; color: var(--texte); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }

/* Référentiels détaillés et correspondances */
tr.groupe th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texte-doux); padding-top: 14px; }
.correspondances { margin-top: 6px; font-size: 13px; }
.correspondances .etiquette { margin: 2px 2px 2px 0; }
details.attendus { margin-top: 6px; font-size: 13px; }
details.attendus > summary { cursor: pointer; color: var(--texte-doux); }
details.attendus p { margin: 6px 0; }
.matrice-correspondance td { vertical-align: top; }

/* EBIOS RM : guide des ateliers et bibliothèque méthodologique */
details.guide-atelier { border: 1px solid var(--bord); padding: 10px 14px; margin: 12px 0 18px; }
details.guide-atelier > summary { cursor: pointer; font-weight: 600; }
details.guide-atelier[open] > summary { margin-bottom: 10px; }
details.guide-atelier h3 { font-size: 14px; margin: 16px 0 6px; }
details.guide-atelier ol, details.guide-atelier ul { margin: 4px 0 8px; padding-left: 20px; }
.grille-pertinence td, .grille-pertinence th { text-align: center; }
.formulaire.large { max-width: 900px; }
.correspondances .etiquette, .matrice-correspondance .etiquette { text-transform: none; }


/* --- Homologation ------------------------------------------------------- */

.parcours { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--bord-fort); margin: -8px 0 24px; }
.parcours span { padding: 10px 14px; font-size: 13px; color: var(--texte-doux); border-right: 1px solid var(--bord); }
.parcours span:last-child { border-right: 0; }
.parcours span.fait { color: var(--texte); }
.parcours span.fait::before { content: "✓ "; }
.parcours span.actif { background: var(--accent); color: var(--accent-texte); font-weight: 600; }
.champ ul#id_decision, .champ div#id_decision { list-style: none; padding: 0; margin: 0; }
.champ #id_decision label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; }
@media (max-width: 800px) { .parcours { grid-template-columns: 1fr 1fr; } }

/* Conformité et plan d'actions */
.jauge { display: inline-block; vertical-align: middle; width: 90px; height: 8px; border: 1px solid var(--bord-fort); }
.jauge > span { display: block; height: 100%; background: var(--texte); }
table.evaluation td { vertical-align: top; }
table.evaluation select, table.evaluation textarea, table.evaluation input[type="text"] { width: 100%; box-sizing: border-box; }
table.evaluation textarea { margin-bottom: 4px; min-height: 2.6em; font-family: inherit; }
.filtres label { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.erreur { font-size: 0.85em; }

/* Pilotage */
table.barres { width: 100%; }
table.barres th { font-weight: normal; text-transform: none; letter-spacing: 0; font-size: inherit; color: var(--texte); width: 40%; padding-left: 0; }
table.barres td:last-child { width: 70px; text-align: right; }
table.barres td { border: 0; padding: 6px 8px; }
table.barres th { border: 0; }
table.barres td:nth-child(2) { position: relative; }
.barre { display: block; height: 10px; background: var(--texte); }
.barre.claire { background: transparent; border: 1px solid var(--texte); box-sizing: border-box; margin-bottom: 3px; }
.legende .barre { display: inline-block; width: 18px; vertical-align: middle; margin: 0 4px 0 10px; }
.legende .barre:first-child { margin-left: 0; }
.histogramme { display: flex; align-items: flex-end; gap: 6px; height: 180px; border-bottom: 1px solid var(--bord-fort); padding-top: 18px; }
.histogramme .colonne { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.histogramme .colonne .barre { width: 100%; min-height: 0; }
.histogramme .colonne .mono { font-size: 0.75em; }
.histogramme .mois { position: absolute; bottom: -22px; font-size: 0.7em; color: var(--texte-doux); white-space: nowrap; }
.histogramme + p { margin-top: 30px; }
h3 { font-size: 1em; margin: 16px 0 8px; }
.champ label:has(input[type="radio"]), .champ label:has(input[type="checkbox"]) { text-transform: none; letter-spacing: 0; font-weight: normal; font-size: inherit; }

/* --- Connecteurs ---------------------------------------------------------- */

.encadre { border: 2px solid var(--bord-fort); padding: 14px 16px; margin: 0 0 20px; }
.encadre pre { background: var(--fond-alt); padding: 10px; margin: 8px 0; }
.entete .actions form { margin: 0; }
.en-ligne { display: flex; gap: 8px; align-items: center; margin: 0; }
.en-ligne select { width: auto; }

/* --- Classes utilitaires (aucun attribut style : CSP sans 'unsafe-inline') --- */

.m-0 { margin: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-28 { margin-top: 28px; }
.mt-40 { margin-top: 40px; }
.w-80 { width: 80px; }
.w-90 { width: 90px; }
.w-130 { width: 130px; }
.w-150 { width: 150px; }
.w-180 { width: 180px; }
.w-200 { width: 200px; }
.entete.entete-section { border-bottom-width: 1px; margin-bottom: 12px; }
.coupure { word-break: break-all; }
.jeton-clair { user-select: all; white-space: pre-wrap; word-break: break-all; }
.aucun-choix { padding: 8px 10px; margin: 0; }
.milieu { vertical-align: middle; }
.case-catalogue { width: 16px; height: 16px; accent-color: currentColor; }
.une-colonne { grid-template-columns: 1fr; }
.l-0 { width: 0%; }
.l-1 { width: 1%; }
.l-2 { width: 2%; }
.l-3 { width: 3%; }
.l-4 { width: 4%; }
.l-5 { width: 5%; }
.l-6 { width: 6%; }
.l-7 { width: 7%; }
.l-8 { width: 8%; }
.l-9 { width: 9%; }
.l-10 { width: 10%; }
.l-11 { width: 11%; }
.l-12 { width: 12%; }
.l-13 { width: 13%; }
.l-14 { width: 14%; }
.l-15 { width: 15%; }
.l-16 { width: 16%; }
.l-17 { width: 17%; }
.l-18 { width: 18%; }
.l-19 { width: 19%; }
.l-20 { width: 20%; }
.l-21 { width: 21%; }
.l-22 { width: 22%; }
.l-23 { width: 23%; }
.l-24 { width: 24%; }
.l-25 { width: 25%; }
.l-26 { width: 26%; }
.l-27 { width: 27%; }
.l-28 { width: 28%; }
.l-29 { width: 29%; }
.l-30 { width: 30%; }
.l-31 { width: 31%; }
.l-32 { width: 32%; }
.l-33 { width: 33%; }
.l-34 { width: 34%; }
.l-35 { width: 35%; }
.l-36 { width: 36%; }
.l-37 { width: 37%; }
.l-38 { width: 38%; }
.l-39 { width: 39%; }
.l-40 { width: 40%; }
.l-41 { width: 41%; }
.l-42 { width: 42%; }
.l-43 { width: 43%; }
.l-44 { width: 44%; }
.l-45 { width: 45%; }
.l-46 { width: 46%; }
.l-47 { width: 47%; }
.l-48 { width: 48%; }
.l-49 { width: 49%; }
.l-50 { width: 50%; }
.l-51 { width: 51%; }
.l-52 { width: 52%; }
.l-53 { width: 53%; }
.l-54 { width: 54%; }
.l-55 { width: 55%; }
.l-56 { width: 56%; }
.l-57 { width: 57%; }
.l-58 { width: 58%; }
.l-59 { width: 59%; }
.l-60 { width: 60%; }
.l-61 { width: 61%; }
.l-62 { width: 62%; }
.l-63 { width: 63%; }
.l-64 { width: 64%; }
.l-65 { width: 65%; }
.l-66 { width: 66%; }
.l-67 { width: 67%; }
.l-68 { width: 68%; }
.l-69 { width: 69%; }
.l-70 { width: 70%; }
.l-71 { width: 71%; }
.l-72 { width: 72%; }
.l-73 { width: 73%; }
.l-74 { width: 74%; }
.l-75 { width: 75%; }
.l-76 { width: 76%; }
.l-77 { width: 77%; }
.l-78 { width: 78%; }
.l-79 { width: 79%; }
.l-80 { width: 80%; }
.l-81 { width: 81%; }
.l-82 { width: 82%; }
.l-83 { width: 83%; }
.l-84 { width: 84%; }
.l-85 { width: 85%; }
.l-86 { width: 86%; }
.l-87 { width: 87%; }
.l-88 { width: 88%; }
.l-89 { width: 89%; }
.l-90 { width: 90%; }
.l-91 { width: 91%; }
.l-92 { width: 92%; }
.l-93 { width: 93%; }
.l-94 { width: 94%; }
.l-95 { width: 95%; }
.l-96 { width: 96%; }
.l-97 { width: 97%; }
.l-98 { width: 98%; }
.l-99 { width: 99%; }
.l-100 { width: 100%; }
.h-0 { height: 0%; }
.h-1 { height: 1%; }
.h-2 { height: 2%; }
.h-3 { height: 3%; }
.h-4 { height: 4%; }
.h-5 { height: 5%; }
.h-6 { height: 6%; }
.h-7 { height: 7%; }
.h-8 { height: 8%; }
.h-9 { height: 9%; }
.h-10 { height: 10%; }
.h-11 { height: 11%; }
.h-12 { height: 12%; }
.h-13 { height: 13%; }
.h-14 { height: 14%; }
.h-15 { height: 15%; }
.h-16 { height: 16%; }
.h-17 { height: 17%; }
.h-18 { height: 18%; }
.h-19 { height: 19%; }
.h-20 { height: 20%; }
.h-21 { height: 21%; }
.h-22 { height: 22%; }
.h-23 { height: 23%; }
.h-24 { height: 24%; }
.h-25 { height: 25%; }
.h-26 { height: 26%; }
.h-27 { height: 27%; }
.h-28 { height: 28%; }
.h-29 { height: 29%; }
.h-30 { height: 30%; }
.h-31 { height: 31%; }
.h-32 { height: 32%; }
.h-33 { height: 33%; }
.h-34 { height: 34%; }
.h-35 { height: 35%; }
.h-36 { height: 36%; }
.h-37 { height: 37%; }
.h-38 { height: 38%; }
.h-39 { height: 39%; }
.h-40 { height: 40%; }
.h-41 { height: 41%; }
.h-42 { height: 42%; }
.h-43 { height: 43%; }
.h-44 { height: 44%; }
.h-45 { height: 45%; }
.h-46 { height: 46%; }
.h-47 { height: 47%; }
.h-48 { height: 48%; }
.h-49 { height: 49%; }
.h-50 { height: 50%; }
.h-51 { height: 51%; }
.h-52 { height: 52%; }
.h-53 { height: 53%; }
.h-54 { height: 54%; }
.h-55 { height: 55%; }
.h-56 { height: 56%; }
.h-57 { height: 57%; }
.h-58 { height: 58%; }
.h-59 { height: 59%; }
.h-60 { height: 60%; }
.h-61 { height: 61%; }
.h-62 { height: 62%; }
.h-63 { height: 63%; }
.h-64 { height: 64%; }
.h-65 { height: 65%; }
.h-66 { height: 66%; }
.h-67 { height: 67%; }
.h-68 { height: 68%; }
.h-69 { height: 69%; }
.h-70 { height: 70%; }
.h-71 { height: 71%; }
.h-72 { height: 72%; }
.h-73 { height: 73%; }
.h-74 { height: 74%; }
.h-75 { height: 75%; }
.h-76 { height: 76%; }
.h-77 { height: 77%; }
.h-78 { height: 78%; }
.h-79 { height: 79%; }
.h-80 { height: 80%; }
.h-81 { height: 81%; }
.h-82 { height: 82%; }
.h-83 { height: 83%; }
.h-84 { height: 84%; }
.h-85 { height: 85%; }
.h-86 { height: 86%; }
.h-87 { height: 87%; }
.h-88 { height: 88%; }
.h-89 { height: 89%; }
.h-90 { height: 90%; }
.h-91 { height: 91%; }
.h-92 { height: 92%; }
.h-93 { height: 93%; }
.h-94 { height: 94%; }
.h-95 { height: 95%; }
.h-96 { height: 96%; }
.h-97 { height: 97%; }
.h-98 { height: 98%; }
.h-99 { height: 99%; }
.h-100 { height: 100%; }
.bandeau .lien-entete { color: inherit; font-size: 13px; text-decoration: none; border-bottom: 1px solid transparent; }
.bandeau .lien-entete:hover, .bandeau .lien-entete:focus-visible { border-bottom-color: currentColor; }

/* Accessibilité : texte réservé aux lecteurs d'écran. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Préavis d'expiration du mot de passe. */
.bandeau-alerte { padding: 10px 14px; border: 1px solid var(--bord); border-left: 4px solid var(--alerte); margin: 0 0 20px; }
.notes-version { white-space: pre-wrap; font-family: var(--mono); font-size: 13px; padding: 12px; border: 1px solid var(--bord); max-height: 360px; overflow: auto; }

/* Clés de sécurité (WebAuthn). */
.cle-webauthn .cle-statut:empty { display: none; }
.cle-webauthn .cle-statut { margin-top: 8px; }

/* Parcours d'homologation d'un système. */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--bord); }
.etape { display: flex; gap: 14px; padding: 10px 0 10px 16px; position: relative; }
.etape-numero { flex: 0 0 28px; height: 28px; border: 1px solid var(--bord-fort); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; margin-left: -31px; background: var(--fond); }
.etape-corps { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.etape-titre { font-weight: 600; }
.etape-detail { color: var(--texte-doux); }
.etape.fait .etape-numero { background: var(--succes); border-color: var(--succes); color: var(--fond); }
.etape.actif .etape-numero { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.etape.actif { background: var(--accent-pale); }
.etape.a_faire .etape-titre, .etape.facultatif .etape-titre { color: var(--texte-doux); font-weight: 500; }
.etape-lien { font-size: 13px; }
.parcours-systeme { border: 1px solid var(--bord); padding: 10px 14px; margin: 0 0 24px; }
.parcours-systeme > summary { cursor: pointer; font-weight: 600; }
.parcours-systeme[open] > summary { margin-bottom: 12px; }
.bandeau-suite { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.etiquette.succes { background: var(--succes); color: var(--fond); border-color: var(--succes); }

/* --- Accessibilité (RGAA 4.1) ------------------------------------------- */

/* Lien d'évitement : visible dès qu'il reçoit le focus (critère 12.7). */
.lien-evitement { position: absolute; left: 8px; top: -60px; z-index: 10; padding: 8px 14px; background: var(--fond); color: var(--texte); border: 2px solid var(--accent); font-weight: 600; }
.lien-evitement:focus { top: 8px; }
.contenu:focus { outline: none; }

/* Focus visible sur le bandeau sombre (critère 10.7). */
.bandeau :focus-visible { outline-color: currentColor; }

/* Champs obligatoires et regroupements (critères 11.5, 11.6, 11.10). */
fieldset.champ { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset.champ > legend.libelle { padding: 0; display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.obligatoire { color: var(--alerte); }
.mention-obligatoire { font-size: 12px; }
.erreurs-resume { font-weight: 600; border-left: 4px solid var(--alerte); padding: 8px 12px; }
.champ [aria-invalid="true"] { border-color: var(--alerte); border-width: 2px; }

.pied { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--bord); font-size: 12px; color: var(--texte-doux); }
.carte.carte-large { max-width: 760px; }
.pied-simple { text-align: center; font-size: 12px; color: var(--texte-doux); margin-top: 12px; }

/* Personnalisation de l'entité. */
.logo-entite { height: 28px; width: auto; background: #ffffff; padding: 2px 6px; border-radius: var(--rayon); }
.apercu-logo { max-height: 80px; width: auto; border: 1px solid var(--bord); padding: 8px; background: #ffffff; }
.message-accueil { border-left: 4px solid var(--accent); background: var(--accent-pale); padding: 12px 16px; margin: 0 0 24px; white-space: pre-line; }
table input[type="text"], table input[type="number"] { font: inherit; padding: 6px 8px; border: 1px solid var(--bord-fort); background: var(--fond); color: var(--texte); border-radius: var(--rayon); width: 100%; }
.premiers-pas { border: 1px solid var(--bord); padding: 16px 20px; margin: 0 0 24px; }
.premiers-pas ol { margin: 8px 0 12px; padding-left: 20px; }
.premiers-pas li { margin: 6px 0; }
.premiers-pas li.fait { color: var(--texte-doux); text-decoration: line-through; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* Rôles et droits */
.etiquette.accent { border-color: var(--accent); color: var(--accent); }
.defilement { overflow-x: auto; max-width: 100%; }
.defilement:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
table.droits { min-width: 640px; }
table.droits { table-layout: auto; }
table.droits thead th { text-align: center; vertical-align: bottom; min-width: 84px; max-width: 120px; }
table.droits thead th:first-child { text-align: left; min-width: 300px; max-width: none; }
table.droits tbody th[scope="row"] { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; min-width: 300px; }
table.droits tr.domaine th { padding-top: 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
table.droits td { text-align: center; }
.accorde { color: var(--accent); }
.grille-droits { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.carte-droits { border: 1px solid var(--bord) !important; padding: 12px 14px !important; margin: 0 !important; }
.carte-droits > legend.libelle { padding: 0 6px !important; }
.carte-droits label { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 14px; }
.carte-droits input[type="checkbox"] { flex: none; width: 16px; height: 16px; margin: 2px 0 0; }
.h-domaine { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 6px; }
.droits-lecture { list-style: none; padding: 0; margin: 0; }
.droits-lecture li { padding: 3px 0; }

/* Import Excel */
.etapes-import { margin: 0 0 22px; padding-left: 20px; }
.etapes-import li { padding: 2px 0; }
.cartes-import { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.bloc-import { border: 1px solid var(--bord); padding: 16px 18px; }
.bloc-import h2 { margin: 0 0 6px; font-size: 15px; }
.bloc-import .boutons { margin-top: 12px; flex-wrap: wrap; }
.etiquette.alerte { background: var(--alerte); color: var(--fond); border-color: var(--alerte); }
.texte-alerte { color: var(--alerte); }
.erreurs-ligne { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.mb-18 { margin-bottom: 18px; }
.bloc-cartographie { margin: 0 0 24px; border-left: 4px solid var(--accent); }
.choix-table { flex-wrap: wrap; align-items: flex-end; }
.choix-table .champ { margin: 0; min-width: 220px; }
.choix-table .champ select { max-width: none; }
html.js .js-masque { display: none; }
table.correspondance th[scope="row"] { font-weight: 600; min-width: 160px; }
table.correspondance th[scope="row"] .aide { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; margin-top: 2px; }
table.correspondance td.champ { margin: 0; min-width: 190px; }
table.correspondance td.exemples .etiquette, .colonnes-fichier .etiquette { font-weight: 400; text-transform: none; letter-spacing: 0; margin: 1px 0; }
.colonnes-fichier { margin-top: 28px; }
.colonnes-fichier summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

/* Paramètres de l'instance */
.groupe-parametres { border: 1px solid var(--bord); padding: 16px 20px 20px; margin: 0 0 24px; min-width: 0; }
.groupe-parametres > legend { padding: 0 6px; font-weight: 700; }
.groupe-parametres .aide .etiquette { margin-right: 6px; }

/* --- Tableau de bord : points à traiter --------------------------------- */
.a-traiter { border: 1px solid var(--bord-fort); border-left: 4px solid var(--accent); padding: 16px 20px; margin: 0 0 32px; }
.a-traiter h2 { margin-top: 0; }
.a-traiter ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 24px; }
.a-traiter a { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; }
.a-traiter .nombre { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
/* Bouton d'un formulaire présenté comme un lien (action secondaire dans un tableau) */
button.lien { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.liens-supports { padding-left: 18px; }

/* --- Thème de l'entité et préférences d'affichage (attributs data-* sur <html>) --- */

html[data-police="marianne"] { --police: "Marianne", Arial, "Helvetica Neue", sans-serif; }
html[data-police="arial"] { --police: Arial, "Helvetica Neue", Helvetica, sans-serif; }
html[data-police="verdana"] { --police: Verdana, Tahoma, "DejaVu Sans", sans-serif; }
html[data-police="luciole"] { --police: "Luciole", Verdana, Tahoma, sans-serif; }
html[data-police="georgia"] { --police: Georgia, "Times New Roman", "DejaVu Serif", serif; }

html[data-arrondis="doux"] { --rayon: 6px; }
html[data-arrondis="arrondi"] { --rayon: 12px; }
html[data-arrondis="doux"] .champ input, html[data-arrondis="doux"] .champ select, html[data-arrondis="doux"] .champ textarea,
html[data-arrondis="arrondi"] .champ input, html[data-arrondis="arrondi"] .champ select, html[data-arrondis="arrondi"] .champ textarea,
html[data-arrondis="doux"] .messages li, html[data-arrondis="arrondi"] .messages li,
html[data-arrondis="doux"] .vide, html[data-arrondis="arrondi"] .vide { border-radius: var(--rayon); }
html[data-arrondis="arrondi"] .navigation a.actif { border-radius: 0 var(--rayon) var(--rayon) 0; }

html[data-largeur="large"] { --largeur-contenu: 1600px; }
html[data-largeur="pleine"] { --largeur-contenu: none; }

html[data-taille="grande"] { --zoom: 1.12; }
html[data-taille="tres-grande"] { --zoom: 1.25; }
html[data-taille="grande"] body { zoom: 1.12; }
html[data-taille="tres-grande"] body { zoom: 1.25; }

html[data-bandeau="fin"] .bandeau { height: 40px; }
html[data-bandeau="fin"] .cadre { min-height: calc(100vh - 40px); }

html[data-densite="compacte"] .contenu { padding: 18px 24px 32px; }
html[data-densite="compacte"] th, html[data-densite="compacte"] td { padding: 5px 10px; }
html[data-densite="compacte"] .navigation { padding: 10px 0; }
html[data-densite="compacte"] .navigation a { padding: 3px 20px; }
html[data-densite="compacte"] .navigation .groupe { margin-top: 4px; padding-top: 4px; padding-bottom: 4px; }
html[data-densite="compacte"] .entete { padding-bottom: 10px; margin-bottom: 16px; }
html[data-densite="compacte"] .bouton { padding: 4px 10px; }
html[data-densite="compacte"] .champ { margin-bottom: 12px; }
html[data-densite="compacte"] .fiche dt, html[data-densite="compacte"] .fiche dd { padding: 5px 0; }
html[data-densite="compacte"] section { margin-bottom: 22px; }

html[data-contraste="renforce"] { --texte-doux: #333333; --bord: #8a8a8a; }
html[data-contraste="renforce"][data-theme="sombre"] { --texte-doux: #d6d6d6; --bord: #6b6b6b; }
@media (prefers-color-scheme: dark) { html[data-contraste="renforce"]:not([data-theme="clair"]) { --texte-doux: #d6d6d6; --bord: #6b6b6b; } }
html[data-contraste="renforce"] a { text-decoration-thickness: 2px; }

html[data-mouvement="reduit"] *, html[data-mouvement="reduit"] *::before, html[data-mouvement="reduit"] *::after {
  transition: none !important; animation: none !important; scroll-behavior: auto !important;
}

/* Page « Thème et affichage » : formulaire et aperçu côte à côte. */
.theme-reglages { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.apercu-theme { position: sticky; top: 16px; }
.apercu-theme > div { border: 1px solid var(--bord); }
.apercu-bandeau { display: flex; gap: 14px; align-items: center; padding: 10px 12px; font-size: 13px; background: var(--apercu-bandeau); color: var(--apercu-bandeau-texte); border: 1px solid var(--bord); }
.apercu-bandeau b { letter-spacing: 0.25em; }
.apercu-corps { display: grid; grid-template-columns: 110px 1fr; gap: 0; border: 1px solid var(--bord); border-top: 0; }
.apercu-menu { border-right: 1px solid var(--bord); padding: 10px 0; display: flex; flex-direction: column; font-size: 13px; }
.apercu-menu span { padding: 4px 10px; border-left: 3px solid transparent; }
.apercu-menu .apercu-actif { border-left-color: var(--apercu-accent); font-weight: 600; }
.apercu-corps > div:last-child { padding: 12px; }
.apercu-titre { font-weight: 700; }
.apercu-bouton { display: inline-block; padding: 6px 12px; border-radius: var(--rayon); background: var(--apercu-accent); color: var(--apercu-accent-texte); font-weight: 600; font-size: 13px; }
@media (max-width: 1000px) { .theme-reglages { grid-template-columns: minmax(0, 1fr); } .apercu-theme { position: static; order: -1; } }

/* Recherche globale */
.recherche-bandeau { position: relative; display: flex; align-items: center; }
.recherche-bandeau input {
  width: 220px; padding: 5px 58px 5px 10px; font: inherit; font-size: 13px;
  color: inherit; background: color-mix(in srgb, currentColor 10%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: var(--rayon);
}
.recherche-bandeau input::placeholder { color: inherit; opacity: 0.75; }
.recherche-bandeau input:focus { width: 300px; }
.recherche-bandeau .raccourci { position: absolute; right: 8px; font: 11px var(--police); opacity: 0.7; border: 1px solid currentColor; padding: 0 4px; border-radius: 2px; pointer-events: none; }
html:not(.js) .recherche-bandeau .raccourci { display: none; }
kbd { font: 12px var(--mono); border: 1px solid var(--bord); padding: 0 4px; border-radius: 2px; }
.recherche-page { display: flex; gap: 8px; margin-bottom: 20px; max-width: 640px; }
.recherche-page input { flex: 1; min-width: 0; padding: 8px 10px; font: inherit; border: 1px solid var(--bord-fort); border-radius: var(--rayon); background: var(--fond); color: var(--texte); }
.resultats-recherche ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--bord); }
.resultats-recherche li { padding: 8px 0; border-bottom: 1px solid var(--bord); }
@media (max-width: 800px) {
  .recherche-bandeau { order: 10; flex-basis: 100%; }
  .recherche-bandeau input, .recherche-bandeau input:focus { width: 100%; }
}

/* Documentation de l'API (/api/v1/documentation/) */
.doc-api pre { background: var(--fond-alt); padding: 10px 12px; overflow-x: auto; white-space: pre; margin: 8px 0; }
.doc-api code.mono { background: var(--fond-alt); padding: 0 3px; }
.sommaire-api { border: 1px solid var(--bord); padding: 10px 14px; margin: 16px 0 24px; }
.sommaire-api ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 20px; }
.sommaire-api .groupe { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--texte-doux); margin-bottom: 2px; }
.sommaire-api a { display: block; padding: 2px 0; text-decoration: none; }
.sommaire-api a:hover .mono { text-decoration: underline; }
.methode { display: inline-block; min-width: 4.6em; font-family: var(--mono); font-size: 12px; font-weight: 700; text-align: center; padding: 1px 4px; border: 1px solid var(--bord-fort); border-radius: var(--rayon); }
.methode-post { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.methode-patch { border-style: dashed; }
.operation-api { border-top: 1px solid var(--bord); padding: 14px 0 8px; scroll-margin-top: 16px; }
.operation-api h3 { margin: 0 0 6px; overflow-wrap: anywhere; }
.operation-api h4 { font-size: 13px; margin: 14px 0 6px; color: var(--texte-doux); }
table.champs-api td { vertical-align: top; }
table.champs-api td:first-child { white-space: nowrap; }
.requis { color: var(--alerte); font-weight: 700; }
.valeurs-api { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; }
.valeurs-api li { padding: 1px 0; }
.retours-api { margin: 0; padding-left: 18px; }
.exemple-api { margin-top: 10px; }
.exemple-api > summary { cursor: pointer; color: var(--texte-doux); }
.petit { font-size: 12px; }
@media (max-width: 800px) { table.champs-api td:first-child { white-space: normal; } }

/* Avertissement de l'instance (version bêta), en haut de toutes les pages. */
.avertissement-instance { margin: 0; padding: 8px 16px; background: var(--alerte); color: var(--fond); text-align: center; font-size: .95em; }
.avertissement-instance strong { display: inline-block; margin-right: 8px; padding: 0 6px; border: 1px solid currentColor; border-radius: 3px; text-transform: uppercase; letter-spacing: .05em; font-size: .85em; }

/* Barre du haut et menu latéral fixes au défilement (écran seulement, pas à l'impression).
   --zoom compense le grossissement du texte (Affichage), qui agrandit aussi 100vh.
   --hauteur-bandeau suit la hauteur réelle de la barre (theme.js) : barre fine, barre sur deux lignes sur mobile.
   L'avertissement « bêta », au-dessus de la barre, défile avec la page pour ne pas réduire la zone utile. */
:root { --hauteur-bandeau: 52px; }
html[data-bandeau="fin"] { --hauteur-bandeau: 40px; }
@media screen and (min-height: 480px) {
  html { scroll-padding-top: calc(var(--hauteur-bandeau) + 12px); }
  .bandeau { position: sticky; top: 0; z-index: 20; }
}
@media screen and (min-width: 801px) and (min-height: 480px) {
  .navigation {
    position: sticky; top: var(--hauteur-bandeau); align-self: flex-start;
    max-height: calc(100vh / var(--zoom, 1) - var(--hauteur-bandeau)); overflow-y: auto; overscroll-behavior: contain;
  }
}
@media screen and (max-width: 800px) and (min-height: 480px) {
  /* Menu ouvert sur mobile : panneau sous la barre, visible où que l'on soit dans la page. */
  html.js .navigation.ouverte {
    position: fixed; top: var(--hauteur-bandeau); left: 0; right: 0; z-index: 15;
    max-height: calc(100vh / var(--zoom, 1) - var(--hauteur-bandeau)); overflow-y: auto; overscroll-behavior: contain;
    background: var(--fond); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  }
}
@media print { .entete, .bandeau, .navigation { position: static; } }
