/* Chargé après les thèmes pour préserver la visibilité du focus. */
.esd-acces-contenu { position: fixed; top: .5rem; left: .5rem; z-index: 10000; padding: .75rem 1rem; color: #17324d; background: white; border: 2px solid #17324d; transform: translateY(-200%); }
.esd-acces-contenu:focus { transform: none; }
body :focus-visible { outline: 3px solid #17324d; outline-offset: 3px; box-shadow: 0 0 0 6px white; }
main { scroll-margin-top: 8rem; }
:focus-visible { scroll-margin-top: 10rem; scroll-margin-bottom: 3rem; }
button, .btn, input:not([type="checkbox"]):not([type="radio"]), select { min-height: 44px; }
button, .btn { min-width: 44px; }
input.sr-only { min-height: 1px; }
label:has(input.sr-only:focus-visible) { outline: 3px solid #17324d; outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
.toasts { max-height: 45dvh; overflow: auto; }
.toast { display: flex; align-items: center; gap: 1rem; }
.toast span { overflow-wrap: anywhere; }
.toast button { background: #fff; color: #17324d; border: 1px solid #17324d; border-radius: .3rem; }
.esd-v5-graphiques { margin-top: 1.5rem; display: grid; gap: 1rem; min-width: 0; }
.esd-v5-graphiques > * { max-width: 100%; min-width: 0; }
.esd-v5-texte { grid-template-columns: 1fr !important; }
.esd-v5-graphiques img { max-width: 100%; height: auto; object-fit: contain; }
.esd-v5-graphiques .plan { width: 100%; }
.esd-v5-personnes { position: fixed; right: 1rem; bottom: 3.5rem; z-index: 80; width: min(32rem, calc(100vw - 2rem)); max-height: 55dvh; overflow: auto; background: #fff; color: #17324d; border: 2px solid #17324d; border-radius: .5rem; padding: 1rem; box-shadow: 0 4px 20px #0004; }
.esd-v5-personnes ul,.esd-v5-plan-liste ul { padding-left: 1.4rem; }
.esd-v5-personnes .btn { white-space: normal; text-align: left; }
.esd-v5-plan-liste { background: white; padding: .75rem; color: #17324d; }
.esd-v5-plan-liste summary { cursor: pointer; font-weight: 600; }
.esd-v5-plan-liste form { display: flex; gap: .75rem; flex-wrap: wrap; margin: .75rem 0; }
.esd-v5-plan-liste label { display: flex; flex-direction: column; gap: .3rem; }
.esd-v5-plan-liste input { max-width: 100%; }
body .carto-standard .carto-carre-numero,body .pl-standard .pl-division-number { fill: black !important; }
body .pl-standard .pl-sector { fill: #D8EBCB !important; stroke: #87CEEB; }
body[data-app="admin"] > header nav { color: #fff; }
body[data-app="admin"] > header nav a { color: #fff; }
.accueil-photo:has(+ .esd-v5-graphiques), .accueil-photo { min-height: auto; background: #fff; padding: 1.5rem; }
.accueil-photo::after { display: none; }
.accueil-photo-contenu h1 { color: #17324d; text-shadow: none; }
@media (max-width: 820px) {
  body .esd-version-live { position: static !important; margin: .5rem; max-width: calc(100% - 1rem); overflow-wrap: anywhere; }
  body .esd-header { position: static; }
  body[data-fond] main { width: calc(100% - 1rem); }


  .modal { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); overflow: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  body :focus-visible { outline: 3px solid Highlight; box-shadow: none; }
}

footer.esd-footer { color: #17324D; }

@media (max-height: 500px) {
  body .esd-header { position: static; }
  body .toasts { position: static; transform: none; margin: .5rem auto; max-width: calc(100% - 1rem); }
}

/* Texte foncé sur le bouton doré pour le contraste des petites tailles. */
body .btn.or { color: #111111; }

/* Les messages d’une modale restent dans son flux, sans couvrir ses commandes. */
.modal > .toasts { position: static; transform: none; width: auto; max-width: 100%; margin: .75rem; flex-shrink: 0; }

.urnes-personnes label { display: flex; align-items: center; gap: .5rem; min-height: 44px; min-width: 44px; }

/* Municipal forms and the register exchange link need a stable reading surface over photographs. */
body[data-app="collectivite"][data-fond] main { background: #faf8f3; }
body[data-app="collectivite"] > .esd-register-exchange { background:#faf8f3; color:#203246; padding:.6rem .8rem; border-radius:6px; width:fit-content; max-width:calc(100% - 2rem); }
body[data-app="collectivite"][data-fond] footer.esd-footer { background:#faf8f3; }
