@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; font-style: normal; font-display: swap; src: url("/police-400.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 600; font-style: normal; font-display: swap; src: url("/police-600.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 700; font-style: normal; font-display: swap; src: url("/police-700.woff2") format("woff2"); }

:root {
  --fond: #edf0f4;
  --papier: #ffffff;
  --encre: #17233b;
  --encre-douce: #51607a;
  --trait: #d3d9e2;
  --oui: #1c6b50;
  --non: #a83a2a;
  --attente: #8a5a12;
  --attente-fond: #f6ead2;
  --neuf: #2456c9;
  --police: "Atkinson Hyperlegible Next", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font: 400 1.0625rem/1.5 var(--police);
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; line-height: 1.25; font-weight: 700; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 600; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--neuf); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.saut { position: absolute; left: -999px; top: 0; background: var(--encre); color: #fff; padding: 0.75rem 1rem; min-height: 44px; }
.saut:focus { left: 0; z-index: 10; }

.tete {
  position: sticky; top: 0; z-index: 5; background: var(--encre); color: #fff;
  display: flex; align-items: center; gap: 1rem; padding: 0.625rem 1rem;
  padding-top: calc(0.625rem + env(safe-area-inset-top));
}
.marque { font-weight: 700; }
.tete nav { display: flex; gap: 0.25rem; margin-left: auto; }
.tete nav a { text-decoration: none; padding: 0.5rem 0.625rem; border-radius: 6px; min-height: 44px; display: inline-flex; align-items: center; gap: 0.375rem; }
.tete nav a:hover { background: #26365a; }
.tete .lien { color: #c9d3e6; }
.pastille { background: #ffd166; color: var(--encre); font-weight: 700; font-size: 0.875rem; min-width: 1.5rem; height: 1.5rem; border-radius: 0.75rem; display: inline-flex; align-items: center; justify-content: center; padding: 0 0.375rem; }

#contenu { max-width: 46rem; margin: 0 auto; padding: 1.75rem 1rem 3rem; }
section + section { margin-top: 3rem; }
.sous-titre { color: var(--encre-douce); margin-top: 0.5rem; max-width: 34rem; }
.pile { display: grid; gap: 1rem; margin-top: 1.5rem; }
.rang { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }

.demande { background: var(--papier); border: 2px solid var(--attente); border-radius: 10px; padding: 1.125rem 1.125rem 1rem; }
.demande.repondue { border-color: var(--oui); }
.titre-demande { font-size: 1.125rem; line-height: 1.3; font-weight: 600; }
.demande .origine { color: var(--encre-douce); font-size: 0.9375rem; margin-bottom: 0.25rem; }
.demande details { margin-top: 0.75rem; }
.demande details.autre { margin-top: 0.25rem; }
.demande summary { cursor: pointer; color: var(--neuf); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.corps { border-top: 1px solid var(--trait); margin-top: 0.25rem; padding-top: 0.75rem; overflow-wrap: anywhere; }
.corps p, .corps ul { margin: 0 0 0.625rem; }
.corps ul { padding-left: 1.25rem; }
.corps h4 { font-size: 1rem; margin: 0.75rem 0 0.25rem; }
.corps code { background: var(--fond); padding: 0 0.25rem; border-radius: 3px; font-size: 0.9375rem; }
.echange { background: var(--fond); border-radius: 6px; padding: 0.5rem 0.75rem; margin-top: 0.5rem; font-size: 0.9375rem; }
.echange b { font-weight: 600; }
.etat-reponse { margin-top: 0.75rem; color: var(--oui); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.bouton {
  font: inherit; font-weight: 600; min-height: 44px; padding: 0 1rem; border-radius: 8px; cursor: pointer;
  background: var(--papier); color: var(--encre); border: 1.5px solid var(--encre);
}
.bouton:hover { background: var(--fond); }
.bouton.oui { background: var(--oui); border-color: var(--oui); color: #fff; }
.bouton.non { color: var(--non); border-color: var(--non); }
.bouton.plein { background: var(--encre); color: #fff; }
.bouton[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.lien { font: inherit; background: none; border: 0; color: var(--neuf); cursor: pointer; text-decoration: underline; min-height: 44px; padding: 0 0.25rem; }

.reponse-libre { margin-top: 0.75rem; display: grid; gap: 0.5rem; }
.reponse-libre label { font-weight: 600; }
.reponse-libre textarea { font: inherit; width: 100%; min-height: 5.5rem; padding: 0.625rem; border: 1.5px solid var(--encre-douce); border-radius: 8px; background: var(--papier); color: var(--encre); }
.erreur { color: var(--non); font-weight: 600; }

.vide { background: var(--papier); border: 1px dashed var(--trait); border-radius: 10px; padding: 1.25rem; color: var(--encre-douce); }

.projet { margin-top: 1.5rem; }
.projet h3 { color: var(--encre-douce); font-size: 1rem; }
.resultat { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--trait); padding: 0.75rem 0 0.75rem 1rem; cursor: pointer; position: relative; }
.resultat::before { content: ""; position: absolute; left: 0; top: 1.25rem; width: 8px; height: 8px; border-radius: 50%; background: var(--neuf); }
.resultat.lu::before { background: transparent; }
.resultat.lu .quoi { font-weight: 400; color: var(--encre-douce); }
.resultat .quoi { font-weight: 600; display: block; }
.resultat .qui { color: var(--encre-douce); font-size: 0.9375rem; }
.resultat .resume { display: block; margin-top: 0.375rem; color: var(--encre); overflow-wrap: anywhere; }

.grille-agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.5rem; margin-top: 1rem; }
.agent { background: var(--papier); border: 1px solid var(--trait); border-radius: 8px; padding: 0.625rem 0.75rem; }
.agent .nom { font-weight: 600; overflow-wrap: anywhere; }
.agent .chiffres { color: var(--encre-douce); font-size: 0.9375rem; }
.agent .bloque { color: var(--attente); font-weight: 600; }

.alerte { background: var(--attente-fond); color: #5b3a08; border-radius: 8px; padding: 0.75rem 1rem; margin-bottom: 1.5rem; }
.maj { margin-top: 2.5rem; color: var(--encre-douce); font-size: 0.9375rem; }

.connexion { max-width: 30rem; margin: 0 auto; padding: 18vh 1.25rem 3rem; display: grid; gap: 1.25rem; justify-items: start; }
.connexion p { color: var(--encre-douce); }
.message { min-height: 1.5rem; color: var(--encre); font-weight: 600; }

@media (max-width: 30rem) {
  .tete #sortir { display: none; }
  .actions .bouton { flex: 1 1 calc(50% - 0.5rem); }
  .actions .bouton.large { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.extrait { margin-top: 0.5rem; color: var(--encre); }
#reessayer { margin-top: 1.25rem; }
.actions.principales .bouton { flex: 1 1 8rem; max-width: 14rem; }
.actions:empty { display: none; }
#tout-lu { padding-left: 0; padding-right: 0; }
@media (max-width: 30rem) { .actions.principales .bouton { max-width: none; } }
