/* Feuille de style de la consultation. Aucune dépendance, aucun build.
 *
 * Deux règles qui ne sont pas esthétiques :
 *
 * 1. aucun état n'est signalé par la seule couleur. Chaque pastille porte un
 *    libellé lisible — le contrat produit exige que l'interface reste lisible
 *    « y compris sans perception des couleurs » ;
 * 2. les tableaux larges défilent dans leur propre conteneur : la page ne
 *    défile jamais horizontalement.
 */

:root {
  --fond: #fbfbfa;
  --encre: #1d1d1b;
  --doux: #5c5c58;
  --trait: #d8d8d2;
  --bloc: #ffffff;
  --accent: #1b4965;
  --present: #1b5e20;
  --absent: #6d4c00;
  --retenu: #4a148c;
  --alerte: #8e1b1b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 3rem;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--encre);
  background: var(--fond);
}

header, main, footer, .limites { max-width: 72rem; margin: 0 auto; }

h1 { font-size: 1.45rem; margin: 1.5rem 0 .25rem; }
h2 { font-size: 1.1rem; margin: 1.75rem 0 .5rem; }
h3 { font-size: .95rem; margin: 1.25rem 0 .4rem; color: var(--doux); text-transform: uppercase; letter-spacing: .04em; }

.sous-titre { color: var(--doux); margin: 0 0 1rem; max-width: 50rem; }
.note { color: var(--doux); font-size: .85rem; margin: .4rem 0 0; }

#acces {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  padding: .75rem; background: var(--bloc);
  border: 1px solid var(--trait); border-radius: 6px;
}
#acces label { font-size: .85rem; color: var(--doux); }
#acces input { padding: .4rem .5rem; border: 1px solid var(--trait); border-radius: 4px; font: inherit; }
#acces input[type=url] { min-width: 15rem; }
#acces input[type=password] { min-width: 14rem; }
button {
  padding: .4rem .8rem; border: 1px solid var(--accent); border-radius: 4px;
  background: var(--accent); color: #fff; font: inherit; cursor: pointer;
}
button#oublier { background: transparent; color: var(--accent); }
button:hover { opacity: .88; }

.etat { font-size: .85rem; color: var(--doux); }
.etat.ok { color: var(--present); }
.etat.ko { color: var(--alerte); }

nav { display: flex; flex-wrap: wrap; gap: .25rem; margin: 1.25rem 0 0; border-bottom: 2px solid var(--trait); }
nav a {
  padding: .5rem .9rem; text-decoration: none; color: var(--accent);
  border: 1px solid transparent; border-bottom: none; border-radius: 5px 5px 0 0;
}
nav a[aria-current=page] { background: var(--bloc); border-color: var(--trait); font-weight: 600; }

.limites {
  margin: 1.25rem auto; padding: .9rem 1.1rem;
  background: #fff8e6; border: 1px solid #e0c97a; border-radius: 6px;
}
.limites h2 { margin-top: 0; font-size: .95rem; }
.limites ol { margin: .5rem 0 0; padding-left: 1.3rem; }
.limites li { margin-bottom: .55rem; }

main { margin-top: 1.5rem; }
.vide { color: var(--doux); font-style: italic; }

.defilant { overflow-x: auto; border: 1px solid var(--trait); border-radius: 6px; background: var(--bloc); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: .45rem .6rem; text-align: left; border-bottom: 1px solid var(--trait); white-space: nowrap; }
th { background: #f2f2ee; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--doux); }
tbody tr:hover { background: #f7f7f3; }
td.numerique { text-align: right; font-variant-numeric: tabular-nums; }

.fiche { background: var(--bloc); border: 1px solid var(--trait); border-radius: 6px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
dl.paires { display: grid; grid-template-columns: minmax(10rem, max-content) 1fr; gap: .3rem .9rem; margin: 0; }
dl.paires dt { color: var(--doux); font-size: .85rem; }
dl.paires dd { margin: 0; overflow-wrap: anywhere; }

code, .empreinte { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .85em; }
.empreinte { color: var(--doux); }

.pastille {
  display: inline-block; padding: .1rem .45rem; border-radius: 3px;
  font-size: .78rem; font-weight: 600; border: 1px solid;
}
.pastille.present       { color: var(--present); border-color: var(--present); background: #eef6ee; }
.pastille.not_measured  { color: var(--absent);  border-color: var(--absent);  background: #fdf6e3; }
.pastille.not_applicable{ color: var(--doux);    border-color: var(--trait);   background: #f4f4f0; }
.pastille.not_attested  { color: var(--absent);  border-color: var(--absent);  background: #fdf6e3; }
.pastille.withheld      { color: var(--retenu);  border-color: var(--retenu);  background: #f5eefa; }
.pastille.alerte        { color: var(--alerte);  border-color: var(--alerte);  background: #fdeeee; }

a.lien { color: var(--accent); cursor: pointer; text-decoration: underline; }
.note-inline { color: var(--doux); font-size: .82rem; margin-left: .35rem; }
hr { border: none; border-top: 1px dashed var(--trait); margin: .9rem 0; }

ul.limitations { margin: .4rem 0 0; padding-left: 1.2rem; font-size: .88rem; color: var(--doux); }
ul.limitations li { margin-bottom: .25rem; }

.pagination { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .75rem; font-size: .88rem; color: var(--doux); }
.page-pas { padding: .25rem .7rem; border: 1px solid var(--accent); border-radius: 4px; color: var(--accent); text-decoration: none; font-weight: 600; }
.page-pas:hover { background: #eef3f7; }
.page-pas.inerte { border-color: var(--trait); color: var(--trait); cursor: default; }
.pagination strong { color: var(--encre); font-variant-numeric: tabular-nums; }

footer { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--trait); color: var(--doux); font-size: .85rem; }

@media (max-width: 40rem) {
  dl.paires { grid-template-columns: 1fr; }
  dl.paires dt { margin-top: .5rem; }
}
