:root {
  --encre: #1c1914;
  --encre-douce: #4a453c;
  --papier: #f6f3ec;
  --carte: #fffdf8;
  --filet: #ddd4c4;
  --vert: #0f3d32;
  --vert-clair: #1f6b52;
  --or: #8a6d3b;
  --rouge: #8c2f2f;
  --ambre: #8a5a12;
  --ambre-fond: #f6e7c8;
  --ombre: 0 1px 0 rgba(28, 25, 20, 0.04);
  --serif: "Liberation Serif", "Nimbus Roman", Georgia, "Times New Roman", serif;
  --sans: "Liberation Sans", "Nimbus Sans", "DejaVu Sans", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--encre);
  background: var(--papier);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.5;
}

.tricolore { display: flex; height: 8px; }
.tricolore i { display: block; flex: 1; }
.tricolore i:nth-child(1) { background: #ce1126; }
.tricolore i:nth-child(2) { background: #fcd116; }
.tricolore i:nth-child(3) { background: #009460; }

.entete {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.4rem 0.9rem;
  background: var(--carte);
  border-bottom: 1px solid var(--filet);
  text-align: center;
}

.marque {
  width: 100%;
  text-align: center;
}

.pays {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--or);
}

.ministere {
  margin: 0.15rem auto 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.25;
  max-width: 40rem;
}

.ministere a { color: var(--vert); text-decoration: none; }
.ministere a:hover { text-decoration: underline; }

.navigation { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 0.9rem; }
.navigation a {
  color: var(--encre);
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 2px solid transparent;
}
.navigation a.actif { border-bottom-color: var(--vert); color: var(--vert); font-weight: 700; }
.navigation a.nav-accueil {
  background: var(--vert);
  color: #fff;
  border-radius: 4px;
  padding: 0.35rem 0.8rem;
  border-bottom: none;
  font-weight: 700;
}
.navigation a.nav-accueil.actif { background: var(--vert-clair); color: #fff; }

.session { display: flex; align-items: center; gap: 0.8rem; }
.session p { margin: 0; color: var(--encre-douce); }

main { max-width: 1120px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.2rem 2rem;
  color: var(--encre-douce);
  font-size: 0.9rem;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2rem; margin: 0.2rem 0 0.6rem; }
h2 { font-size: 1.35rem; margin: 1.6rem 0 0.5rem; }

.chapeau { font-size: 1.05rem; max-width: 46rem; }
.rubrique { margin-top: 1.6rem; }
.publication {
  background: var(--carte);
  border: 1px solid var(--filet);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  margin: 0.7rem 0;
}
.publication h3 { margin: 0.2rem 0 0.4rem; font-size: 1.2rem; }
.publication .meta, .formulaire .meta { margin: 0; color: var(--or); font-size: 0.88rem; }
.note, .aide, .lecture, .intitule { color: var(--encre-douce); }
.lecture { margin: 0.2rem 0 0; font-size: 0.92rem; }
.intitule { margin: 0.15rem 0 0; }
.intitule-titre { display: block; font-family: var(--sans); font-size: 1rem; color: var(--encre-douce); font-weight: 400; }

a { color: var(--vert); }
a:hover { color: var(--vert-clair); }

button, .bouton {
  display: inline-block;
  background: var(--vert);
  color: #fff;
  border: 1px solid var(--vert);
  border-radius: 4px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .bouton:hover { background: var(--vert-clair); color: #fff; }
button.secondaire, .bouton.secondaire, a.secondaire {
  background: transparent;
  color: var(--vert);
}
button.danger { background: var(--rouge); border-color: var(--rouge); color: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 2px;
}

.formulaire, .filtres { display: grid; gap: 0.35rem 0.8rem; max-width: 36rem; margin: 1rem 0; }
.filtres { max-width: none; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); align-items: end; }
label { font-weight: 700; font-size: 0.92rem; }
label.case { font-weight: 400; display: flex; gap: 0.45rem; align-items: center; }
input, select, textarea {
  font: inherit;
  padding: 0.4rem 0.5rem;
  border: 1px solid #c9bfae;
  border-radius: 4px;
  background: #fff;
  color: var(--encre);
}
textarea { min-height: 7rem; resize: vertical; }
fieldset { border: 1px solid var(--filet); border-radius: 4px; display: grid; gap: 0.3rem; }
fieldset.compte {
  background: var(--carte);
  border-radius: 8px;
  padding: 1rem 1.1rem 1.2rem;
  max-width: 36rem;
}
fieldset.compte legend {
  font-family: var(--serif);
  font-size: 1.25rem;
  padding: 0 0.35rem;
}
optgroup { font-weight: 700; }

.cartes, .indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.8rem; }
.carte, .carte-chiffre, .domaine {
  background: var(--carte);
  border: 1px solid var(--filet);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  box-shadow: var(--ombre);
}
.carte h2 { margin-top: 0.3rem; }
.etat { margin: 0; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }
.etat-ouvert { color: var(--vert); }
.etat-ferme { color: var(--ambre); }
.carte-chiffre .libelle { margin: 0; color: var(--encre-douce); font-size: 0.88rem; }
.carte-chiffre .valeur { margin: 0.25rem 0 0; font-family: var(--serif); font-size: 1.7rem; }

.schema {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem 2rem;
  margin: 0.6rem 0 1.4rem;
}
.branche { display: flex; flex-direction: column; align-items: center; min-width: 8rem; }
.boite {
  background: var(--carte);
  border: 2px solid var(--vert);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  text-align: center;
  min-width: 7.5rem;
}
.boite-racine { background: var(--vert); color: #fff; }
.boite-racine a { color: #fff; }
.boite .intitule { margin: 0.2rem 0 0; color: var(--encre-douce); font-size: 0.85rem; }
.boite-racine .intitule { color: #f6f3ec; }
.enfants {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 2px solid var(--or);
}
.menu-direction {
  background: var(--carte);
  border: 1px solid var(--filet);
  border-radius: 6px;
  margin: 0.45rem 0;
  padding: 0.35rem 0.85rem 0.6rem;
}
.menu-direction summary { cursor: pointer; font-weight: 700; }
.menu-direction .intitule { font-weight: 400; color: var(--encre-douce); }
.attributions { margin: 0.6rem 0; }
.attributions li { margin: 0.45rem 0 0.8rem; }

.domaine { margin-bottom: 0.8rem; }
.domaine h2 { margin-top: 0; }
.structures { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.structures > li { padding-top: 0.45rem; border-top: 1px solid var(--filet); }
.structures a { font-weight: 700; }

.fil { color: var(--encre-douce); font-size: 0.92rem; }
.fil .sep { padding: 0 0.2rem; }
.privileges { font-size: 0.92rem; }

.contenu, .membres { list-style: none; padding: 0; }
.contenu li, .membres li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--filet);
}
.genre { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--or); min-width: 4.5rem; }
.actions, .ligne-form { display: flex; gap: 0.4rem; align-items: center; }
.ligne-form input { max-width: 16rem; }

.catalogue { background: #fbf8f1; border-left: 3px solid var(--or); padding: 0.2rem 0 0.2rem 0.9rem; margin: 1rem 0; }

.alerte, .avis, .bandeau { padding: 0.7rem 0.9rem; border-radius: 4px; }
.alerte { background: #f8e4e4; color: var(--rouge); }
.avis { background: #e5f0ea; color: var(--vert); }
.bandeau-exemple, .bandeau-mixte { background: var(--ambre-fond); color: #5c3e0d; }
.bandeau-vide, .bandeau-saisie { background: #ece7dc; }

.badge-exemple, .badge-saisie {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-family: var(--sans);
}
.badge-exemple { background: var(--ambre-fond); color: var(--ambre); }
.badge-saisie { background: #e5f0ea; color: var(--vert); }

.statut { font-size: 0.85rem; font-weight: 700; }
.statut-retard { color: var(--rouge); }
.statut-risque { color: var(--ambre); }
.statut-delais { color: var(--vert); }
.statut-termine { color: #1d4e89; }
.statut-suspendu, .statut-preparation { color: var(--encre-douce); }

table { width: 100%; border-collapse: collapse; background: var(--carte); }
caption { text-align: left; font-weight: 700; padding: 0.4rem 0; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--filet); vertical-align: top; }
th { font-size: 0.82rem; color: var(--encre-douce); font-weight: 700; }
.defilement { overflow-x: auto; }

.barre { display: block; height: 8px; background: #e6e1d6; border-radius: 99px; min-width: 5rem; }
.barre i { display: block; height: 8px; background: var(--vert-clair); border-radius: 99px; }

dl { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: 0.35rem 1rem; }
dt { color: var(--encre-douce); }
dd { margin: 0; }
.outils { display: grid; gap: 0.5rem; }
.vide { color: var(--encre-douce); }

.b-0 { width: 0%; }
.b-5 { width: 5%; }
.b-10 { width: 10%; }
.b-15 { width: 15%; }
.b-20 { width: 20%; }
.b-25 { width: 25%; }
.b-30 { width: 30%; }
.b-35 { width: 35%; }
.b-40 { width: 40%; }
.b-45 { width: 45%; }
.b-50 { width: 50%; }
.b-55 { width: 55%; }
.b-60 { width: 60%; }
.b-65 { width: 65%; }
.b-70 { width: 70%; }
.b-75 { width: 75%; }
.b-80 { width: 80%; }
.b-85 { width: 85%; }
.b-90 { width: 90%; }
.b-95 { width: 95%; }
.b-100 { width: 100%; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.ecran {
  background: var(--vert);
  color: #f6f3ec;
  padding: 2rem 1.5rem;
  margin: 0 0 1.5rem;
}
.ecran h1 { color: #f6f3ec; font-size: 2.4rem; margin: 0.2rem 0; }
.ecran-ministere { letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; }
.ecran-sous { font-size: 1.15rem; }
.circuit { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.circuit li {
  background: rgba(255, 253, 248, 0.08);
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.circuit strong { font-size: 1.25rem; }
.instruction {
  border-top: 1px solid var(--filet);
  padding: 0.8rem 0;
}
.meta { color: var(--encre-douce); font-size: 0.9rem; }

@media (max-width: 720px) {
  .entete { align-items: center; }
  .ministere { font-size: 1.05rem; }
  h1 { font-size: 1.6rem; }
  dl { grid-template-columns: 1fr; }
  .session { width: 100%; }
}

.menu-public { width: 100%; }
.menu-public ul { list-style: none; margin: 0; padding: 0; }
.menu-public > ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1.2rem;
}
.menu-item { position: relative; }
.menu-item > a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0;
  color: var(--encre);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.menu-item > a:hover, .menu-item.actif > a { color: var(--vert); border-bottom-color: var(--vert); }
.sous-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 16rem;
  background: var(--carte);
  border: 1px solid var(--filet);
  box-shadow: var(--ombre);
  z-index: 30;
  text-align: left;
}
.sous-menu a { display: block; padding: 0.55rem 0.9rem; color: var(--encre); text-decoration: none; }
.sous-menu a:hover { background: var(--papier); }
.menu-item:hover .sous-menu, .menu-item:focus-within .sous-menu { display: block; }

.heros {
  margin: 0 0 1.5rem;
  padding: 1.6rem 1.4rem;
  background: var(--vert);
  color: #f6f3ec;
}
.heros h1, .heros p, .heros-titre { color: #f6f3ec; }
.heros-sur {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #fcd116;
}
.heros-titre { font-family: var(--serif); font-size: 1.7rem; line-height: 1.25; margin: 0.3rem 0 0.8rem; }
.heros .bouton { margin-right: 0.5rem; }
.trois-domaines { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.domaine-carte {
  display: block;
  background: var(--carte);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--encre);
  border-top: 4px solid var(--vert);
}
.domaine-carte h2 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.d-ass { border-color: #ce1126; }
.d-hyd { border-color: #1f5fa8; }
.d-hyc { border-color: #8a6d3b; }
.actus { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.actu { background: var(--carte); padding: 0.9rem 1rem; border-left: 4px solid var(--vert); }
.actu h3 { margin: 0.2rem 0 0.4rem; font-size: 1.05rem; }
.fil { font-size: 0.9rem; color: var(--encre-douce); }
.a-completer {
  background: var(--ambre-fond);
  border-left: 4px solid var(--or);
  padding: 0.6rem 0.9rem;
}

.carte-svg { width: 100%; height: auto; border: 1px solid var(--filet); margin: 1rem 0; background: var(--carte); }
.carte-fond { fill: #eef4ee; }
.carte-svg circle { stroke: #fff; stroke-width: 2; }
.c-point { fill: #ce1126; }
.c-abonne { fill: #b8860b; }
.c-seg { fill: #1f5fa8; }
.c-snape { fill: #009460; }
.legende { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.pastille { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; margin-right: 0.4rem; vertical-align: middle; }
.pastille.c-point { background: #ce1126; }
.pastille.c-abonne { background: #b8860b; }
.pastille.c-seg { background: #1f5fa8; }
.pastille.c-snape { background: #009460; }
.gps { display: block; margin: 0.3rem 0; }

.instruction .suivi { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 1rem; font-size: 0.85em; font-weight: 600; }
.suivi-en-cours { background: #fff3cd; color: #6b4e00; }
.suivi-executee { background: #d4edda; color: #145523; }
.suivi-retard { background: #f8d7da; color: #7a1020; }
.bilan { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.bilan div { border: 1px solid var(--filet); background: var(--carte); padding: 0.8rem 1.1rem; min-width: 10rem; }
.bilan strong { display: block; font-size: 1.8rem; }
.instruction form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; margin-top: 0.4rem; }
