@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
[hidden] { display: none !important; }
@font-face { font-family: "Atkinson"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --echelle: 1;
  --texte: #1b1b1b; --doux: #4a4a4a; --fond: #f5f6f8; --carte: #ffffff; --bord: #d4d7dd;
  --primaire: #0a58a6; --primaire-fonce: #07437f; --cyan: #009fe3;
  --loi: #1f4e9c; --instr: #3b4f66; --reco: #a35400; --va: #15773f;
  --ok: #15773f; --ok-fond: #e5f4ec; --pb: #b3261e; --pb-fond: #fdecea;
  --rayon: 14px; --interligne: 1.5; --police: Arial, Helvetica, "Liberation Sans", sans-serif;
}
html { font-size: calc(100% * var(--echelle)); }
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--police); line-height: var(--interligne); color: var(--texte); background: var(--fond); }
img { max-width: 100%; height: auto; }
a { color: var(--primaire); }
:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; box-shadow: 0 0 0 6px #1b1b1b; }
.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 8px; top: 8px; background: #fff; padding: .5rem 1rem; z-index: 10; }

.entete { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .6rem 1rem; background: #fff; border-bottom: 1px solid var(--bord); position: sticky; top: 0; z-index: 5; }
.entete-logo img { display: block; width: 180px; height: auto; }
.badge-loi { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; color: var(--loi); border: 1px solid var(--loi); border-radius: 999px; padding: .15rem .6rem .15rem .25rem; background: #eef3fb; }
.bouton-reglages { margin-left: auto; font: inherit; font-weight: 700; background: #fff; color: var(--primaire); border: 2px solid var(--primaire); border-radius: 999px; padding: .4rem .9rem; min-height: 44px; cursor: pointer; }

.progression { position: sticky; top: 64px; z-index: 4; display: flex; align-items: center; gap: .75rem; padding: .4rem 1rem; background: #fff; border-bottom: 1px solid var(--bord); }
.progression-barre { flex: 1; height: 12px; background: #e3e6eb; border-radius: 999px; overflow: hidden; }
.progression-barre div { height: 100%; width: 0; background: var(--ok); transition: width .3s; }
#progressionTexte { font-weight: 700; min-width: 3.5em; text-align: right; }

.reglages { position: fixed; right: .5rem; top: 70px; z-index: 20; width: min(360px, calc(100vw - 1rem)); max-height: calc(100vh - 90px); overflow: auto; background: #fff; border: 2px solid var(--primaire); border-radius: var(--rayon); padding: 1rem; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.reglages h2 { margin-top: 0; font-size: 1.2rem; }
.reglages fieldset { border: 0; padding: 0; margin: 0 0 .75rem; }
.reglages legend { font-weight: 700; margin-bottom: .3rem; }
.choix-ligne { display: flex; gap: .5rem; }
.choix-ligne label { flex: 1; text-align: center; border: 2px solid var(--bord); border-radius: 10px; padding: .4rem; cursor: pointer; font-weight: 700; }
.choix-ligne label:has(input:checked) { border-color: var(--primaire); background: #eef3fb; }
.interrupteur { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; min-height: 44px; cursor: pointer; }
.interrupteur input, .choix-ligne input { width: 1.3rem; height: 1.3rem; accent-color: var(--primaire); }

main { max-width: 760px; min-height: 100vh; margin: 0 auto; padding: 1rem 1rem 3rem; outline: none; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: .5rem 0 1rem; }
h2 { font-size: 1.25rem; }
.chapeau { font-size: 1.1rem; color: var(--doux); }

.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 700; font-size: 1.05rem; min-height: 52px; padding: .7rem 1.4rem; border-radius: 12px; border: 2px solid var(--primaire); background: var(--primaire); color: #fff; cursor: pointer; text-decoration: none; }
.bouton:hover { background: var(--primaire-fonce); }
.bouton.secondaire { background: #fff; color: var(--primaire); }
.bouton.lien { background: none; border: 0; color: var(--primaire); text-decoration: underline; min-height: 44px; padding: .3rem; }
.bouton.large { width: 100%; }
.cta { margin: 1.5rem 0; }

.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1rem; margin: 0 0 1rem; }
.accueil-visuel { display: flex; gap: .75rem; justify-content: center; margin: 1rem 0; }
.accueil-visuel img { width: 30%; max-width: 150px; border-radius: 12px; }
.liste-points { padding-left: 1.2rem; }
.liste-points li { margin: .3rem 0; }

.formulaire label.titre-champ { display: block; font-weight: 700; margin: 1rem 0 .3rem; }
.formulaire input[type=text], .formulaire input[type=number], .formulaire input[type=email], .formulaire textarea { width: 100%; font: inherit; padding: .7rem; border: 2px solid #8a8f98; border-radius: 10px; min-height: 48px; background: #fff; }
.formulaire .aide { font-size: .9rem; color: var(--doux); margin: .2rem 0; }
.radios { display: flex; flex-direction: column; gap: .4rem; }
.radios label { display: flex; gap: .6rem; align-items: center; border: 2px solid var(--bord); border-radius: 10px; padding: .6rem .8rem; cursor: pointer; }
.radios label:has(input:checked) { border-color: var(--primaire); background: #eef3fb; }
.radios input { width: 1.3rem; height: 1.3rem; accent-color: var(--primaire); }
.resultats-commune { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.resultats-commune button { text-align: left; font: inherit; padding: .6rem .8rem; border: 2px solid var(--bord); border-radius: 10px; background: #fff; cursor: pointer; }
.calcul { border-left: 6px solid var(--loi); background: #eef3fb; }
.calcul strong { font-size: 1.15rem; }
.erreur { color: var(--pb); font-weight: 700; }
.piege { position: absolute; left: -9999px; height: 1px; overflow: hidden; }

.section-carte { display: flex; gap: 1rem; align-items: center; text-decoration: none; color: inherit; }
.section-carte .lettre { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; color: #fff; background: var(--loi); }
.section-carte.va .lettre { background: var(--va); }
.section-carte.fin .lettre { background: var(--instr); }
.etapes-liste { list-style: none; padding: 0; margin: .5rem 0 0; }
.etapes-liste a { display: flex; align-items: center; gap: .75rem; padding: .55rem .4rem; border-top: 1px solid var(--bord); color: inherit; text-decoration: none; min-height: 52px; }
.etapes-liste img { width: 44px; height: 44px; object-fit: contain; }
.etapes-liste .etat { margin-left: auto; font-weight: 700; white-space: nowrap; }
.etat.fini { color: var(--ok); }

.etape-tete { display: flex; gap: 1rem; align-items: center; }
.etape-tete img { width: 96px; height: 96px; object-fit: contain; flex: none; background: #fff; border-radius: 12px; border: 1px solid var(--bord); padding: 4px; }
.fil { font-size: .9rem; color: var(--doux); margin: 0; }
.point { background: #fff; border: 2px solid var(--bord); border-radius: var(--rayon); padding: .9rem; margin: 0 0 .8rem; }
.point.ok { border-color: var(--ok); background: var(--ok-fond); }
.point.pb { border-color: var(--pb); background: var(--pb-fond); }
.point-corps { display: flex; gap: .8rem; align-items: flex-start; }
.point-corps img { width: 64px; height: 64px; object-fit: contain; flex: none; background: #fff; border-radius: 8px; }
.point p { margin: .3rem 0; font-size: 1.05rem; }
.etiquette { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #fff; border-radius: 6px; padding: .1rem .5rem; }
.t-loi { background: var(--loi); } .t-instr { background: var(--instr); } .t-reco { background: var(--reco); } .t-va { background: var(--va); }
.refs { font-size: .9rem; margin: .2rem 0 0; }
.refs a { margin-right: .6rem; }
.actions-point { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.actions-point button { flex: 1; min-width: 140px; font: inherit; font-weight: 700; min-height: 48px; border-radius: 10px; cursor: pointer; border: 2px solid var(--ok); background: #fff; color: var(--ok); }
.actions-point button.pb { border-color: var(--pb); color: var(--pb); }
.actions-point button[aria-pressed=true] { background: var(--ok); color: #fff; }
.actions-point button.pb[aria-pressed=true] { background: var(--pb); color: #fff; }
.conseil-pb { margin-top: .6rem; padding: .6rem .8rem; border-radius: 8px; background: #fff; border-left: 5px solid var(--pb); }
.navigation-etapes { display: flex; gap: .75rem; justify-content: space-between; margin-top: 1.5rem; flex-wrap: wrap; }
.navigation-etapes .bouton { flex: 1; }

.victoire { text-align: center; background: var(--ok); color: #fff; border-radius: var(--rayon); padding: 2rem 1rem; }
.victoire img { width: 120px; }
.victoire h1 { font-size: 2.6rem; margin: .5rem 0; }
.victoire p { font-size: 1.3rem; font-weight: 700; margin: 0; }
.manque li { margin: .4rem 0; }

.recherche { display: flex; gap: .5rem; }
.recherche input { flex: 1; }
.texte-liste { list-style: none; padding: 0; }
.texte-liste a { display: block; padding: .7rem .5rem; border-top: 1px solid var(--bord); text-decoration: none; color: inherit; }
.texte-liste .num { font-weight: 700; color: var(--loi); }
.article { white-space: pre-line; font-size: 1.05rem; }
.source { font-size: .9rem; color: var(--doux); border-top: 1px solid var(--bord); padding-top: .6rem; }

.pied { border-top: 1px solid var(--bord); background: #fff; padding: 1rem; text-align: center; }
.pied nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: center; }
.pied nav a { min-height: 44px; display: inline-flex; align-items: center; }
.signature { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--doux); margin: .6rem 0 0; }

/* Réglages */
body.contraste { --texte: #000; --doux: #000; --fond: #fff; --bord: #000; --primaire: #000; --primaire-fonce: #000; --ok-fond: #fff; --pb-fond: #fff; }
body.contraste a { text-decoration: underline; }
body.contraste .point, body.contraste .carte { border-width: 3px; }
body.police { --police: "Atkinson", Arial, sans-serif; }
body.espace { --interligne: 1.9; letter-spacing: .03em; word-spacing: .12em; }
body.simple .detail, body.simple .refs, body.simple .etiquette-detail { display: none; }
body.sans-anim *, body.sans-anim *::before { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  .entete .bouton-reglages, .progression, .reglages, .pied nav, .navigation-etapes, .no-print, .evitement { display: none !important; }
  body { background: #fff; }
  .point { break-inside: avoid; }
}
@media (max-width: 480px) {
  .badge-loi { order: 3; }
  .progression { top: 96px; }
  .etape-tete img { width: 72px; height: 72px; }
}
