/* Routes et Réseaux — Console de pilotage (Ville de Mamoudzou) */
:root {
  --bleu: #182882;
  --bleu-fonce: #101c5e;
  --bleu-clair: #e6e9f6;
  --orange-arretes: #c25e00;
  --bleu-dict: #1f6fb2;
  --violet-voirie: #6b3fa0;
  --p1: #d7191c;
  --p2: #f28c28;
  --p3: #ffd92f;
  --fond: #f3f4f8;
  --surface: #ffffff;
  --texte: #1c2233;
  --texte-doux: #4a5266;
  --bordure: #d9dde7;
  --bordure-forte: #b9c0d0;
  --succes: #1d6b34;
  --succes-fond: #e2f3e7;
  --alerte: #7a4a00;
  --alerte-fond: #fff2d6;
  --erreur: #9b1114;
  --erreur-fond: #fde4e4;
  --focus: #1f6fb2;
  --rayon: 8px;
  --ombre: 0 1px 2px rgba(16, 28, 94, .06), 0 2px 8px rgba(16, 28, 94, .05);
  --police: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 15px;
  line-height: 1.45;
  color: var(--texte);
  background: var(--fond);
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
p { margin: 0 0 .6em; }
a { color: var(--bleu-dict); }
a:hover { color: var(--bleu); }
code, .mono { font-family: Consolas, "Cascadia Mono", "Liberation Mono", monospace; font-size: .92em; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.laterale :focus-visible { outline-color: var(--p3); }

.masque {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.evitement {
  position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--bleu); color: #fff;
  padding: 8px 14px; border-radius: 6px; text-decoration: none; font-weight: 600;
}
.evitement:focus { top: 8px; color: #fff; }
.noscript { padding: 24px; text-align: center; }

/* ------------------------------------------------------------ activité / chargement */
.barre-activite { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 90; overflow: hidden; background: rgba(24, 40, 130, .12); }
.barre-activite span { position: absolute; top: 0; bottom: 0; width: 35%; background: var(--p2); animation: glisse 1.1s ease-in-out infinite; }
@keyframes glisse { from { left: -35%; } to { left: 100%; } }
.roue {
  display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: tourne .8s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .roue, .barre-activite span { animation-duration: 3s; }
}
.chargement { display: flex; align-items: center; gap: 10px; color: var(--texte-doux); padding: 18px 4px; margin: 0; }
.demarrage { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--texte-doux); }

/* ------------------------------------------------------------ boutons et champs */
button, input, select, textarea { font: inherit; color: inherit; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 7px 16px; border-radius: 6px; border: 1px solid var(--bleu);
  background: var(--bleu); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.bouton:hover { background: var(--bleu-fonce); color: #fff; }
.bouton[disabled], .bouton[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.bouton-secondaire { background: #fff; color: var(--bleu); border-color: var(--bordure-forte); }
.bouton-secondaire:hover { background: var(--bleu-clair); color: var(--bleu); }
.bouton-danger { background: #fff; color: var(--erreur); border-color: #e3a5a6; }
.bouton-danger:hover { background: var(--erreur-fond); color: var(--erreur); }
.bouton-danger-plein { background: var(--erreur); border-color: var(--erreur); color: #fff; }
.bouton-danger-plein:hover { background: #7a0c0f; color: #fff; }
.bouton-petit { min-height: 32px; padding: 4px 10px; font-size: .9em; }
.bouton-lien {
  background: none; border: 0; padding: 0; color: var(--bleu-dict); font-weight: 600; cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px; text-align: left;
}
.bouton-lien:hover { color: var(--bleu); }

.champ { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.champ > label, .champ > .etiquette, legend { font-weight: 600; font-size: .92em; color: var(--texte); }
.aide { font-size: .86em; color: var(--texte-doux); margin: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--bordure-forte); border-radius: 6px; background: #fff;
}
textarea { min-height: 70px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); }
input[aria-invalid="true"] { border-color: var(--erreur); }
.case { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.case input { width: 18px; height: 18px; margin: 0; accent-color: var(--bleu); }
fieldset { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 12px 14px 6px; margin: 0 0 14px; min-width: 0; }
legend { padding: 0 6px; }
.ligne-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions-fin { justify-content: flex-end; }

/* ------------------------------------------------------------ messages */
.message { border-radius: 6px; padding: 10px 14px; margin: 0 0 14px; border: 1px solid; font-size: .95em; }
.message p:last-child { margin-bottom: 0; }
.message-erreur { background: var(--erreur-fond); border-color: #f0b4b5; color: var(--erreur); }
.message-succes { background: var(--succes-fond); border-color: #a9d9b6; color: var(--succes); }
.message-alerte { background: var(--alerte-fond); border-color: #f1d18a; color: var(--alerte); }
.message-info { background: var(--bleu-clair); border-color: #c3cbea; color: var(--bleu-fonce); }
.code-activation {
  display: inline-block; font-family: Consolas, "Cascadia Mono", monospace; font-size: 1.35em; font-weight: 700; letter-spacing: .18em;
  background: #fff; border: 1px dashed var(--bordure-forte); border-radius: 6px; padding: 2px 10px; color: var(--bleu-fonce);
}
.code-activation.petit { font-size: 1.02em; letter-spacing: .12em; padding: 0 6px; }

/* ------------------------------------------------------------ connexion */
.ecran-connexion {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px;
  background: linear-gradient(160deg, var(--bleu) 0%, var(--bleu) 38%, var(--fond) 38%);
}
.carte-connexion { width: 100%; max-width: 440px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(16, 28, 94, .18); overflow: hidden; }
.connexion-entete { display: flex; gap: 14px; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--bordure); }
.connexion-entete h1 { font-size: 1.45em; color: var(--bleu); }
.connexion-collectivite { margin: 0; font-size: .82em; text-transform: uppercase; letter-spacing: .08em; color: var(--texte-doux); font-weight: 600; }
.connexion-sous-titre { margin: 0; color: var(--texte-doux); }
.connexion-corps { padding: 22px 24px 24px; }
.connexion-corps h2 { font-size: 1.1em; margin-bottom: 12px; }
.connexion-pied { color: var(--texte-doux); font-size: .85em; margin-top: 16px; text-align: center; }
.connexion-corps .bouton { width: 100%; margin-top: 4px; }
.rappel-email { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--fond); border-radius: 6px; padding: 8px 12px; margin-bottom: 14px; font-size: .93em; overflow-wrap: anywhere; }
.champ-mdp { position: relative; display: flex; }
.champ-mdp input { padding-right: 92px; }
.champ-mdp button { position: absolute; right: 4px; top: 4px; bottom: 4px; border: 0; border-radius: 4px; background: var(--bleu-clair); color: var(--bleu); font-weight: 600; font-size: .85em; padding: 0 10px; cursor: pointer; }
.regles { list-style: none; padding: 0; margin: 0 0 14px; font-size: .9em; }
.regles li { display: flex; gap: 8px; align-items: center; padding: 2px 0; color: var(--texte-doux); }
.regles li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--bordure-forte); }
.regles li.ok { color: var(--succes); }
.regles li.ok::before { border-color: var(--succes); background: var(--succes) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='%23fff' stroke-width='2' fill='none'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ------------------------------------------------------------ marque */
.marque-logo {
  flex: none; width: 42px; height: 42px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: var(--bleu); color: #fff; font-weight: 800; letter-spacing: .02em; border: 2px solid var(--p3);
}
.laterale .marque-logo { background: #fff; color: var(--bleu); border-color: var(--p3); width: 38px; height: 38px; }

/* ------------------------------------------------------------ console */
.console { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.laterale {
  background: var(--bleu); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.laterale-entete { display: flex; gap: 10px; align-items: center; padding: 18px 16px 16px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.marque-texte { display: flex; flex-direction: column; min-width: 0; }
.marque-nom { font-weight: 700; font-size: 1.04em; }
.marque-sous { font-size: .82em; color: #c9cee8; }
.bouton-menu { display: none; margin-left: auto; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .5); border-radius: 6px; padding: 6px 12px; font-weight: 600; cursor: pointer; }
.navigation { padding: 10px 10px 16px; flex: 1; }
.nav-section { margin: 16px 8px 6px; font-size: .74em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b8bfe3; }
.nav-liste { list-style: none; padding: 0; margin: 0; }
.nav-lien {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 1px 0; border-radius: 6px; color: #fff; text-decoration: none; font-weight: 500;
}
.nav-lien:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-lien[aria-current="page"] { background: #fff; color: var(--bleu); font-weight: 700; }
.nav-pastille { flex: none; width: 10px; height: 10px; border-radius: 3px; background: #c9cee8; }
.nav-lien[aria-current="page"] .nav-pastille { background: var(--bleu); }
.nav-pastille.arretes { background: var(--orange-arretes); box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.nav-lien[aria-current="page"] .nav-pastille.arretes { background: var(--orange-arretes); }
.nav-pastille.dict { background: var(--bleu-dict); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.nav-pastille.voirie { background: var(--violet-voirie); box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.nav-pastille.signalements { background: #4caf7a; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.nav-inactif { display: flex; align-items: center; gap: 10px; padding: 7px 10px; color: #aeb5dc; cursor: default; }
.nav-inactif small { display: block; font-size: .78em; color: #a3aad3; font-style: italic; }
.nav-inactif .nav-pastille { opacity: .55; }
.laterale-pied { border-top: 1px solid rgba(255, 255, 255, .14); padding: 14px 16px 18px; font-size: .9em; }
.laterale-pied .utilisateur { font-weight: 600; overflow-wrap: anywhere; }
.laterale-pied .profil { color: #c9cee8; font-size: .9em; margin-bottom: 10px; }
.laterale-pied .bouton { width: 100%; background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.laterale-pied .bouton:hover { background: rgba(255, 255, 255, .12); }

.contenu { padding: 22px 28px 48px; min-width: 0; }
.contenu:focus { outline: none; }
.entete-page {
  display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between;
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--bordure);
}
.entete-page h1 { font-size: 1.55em; color: var(--bleu); }
.entete-page h1:focus { outline: none; }
.entete-page .fil { font-size: .8em; text-transform: uppercase; letter-spacing: .08em; color: var(--texte-doux); font-weight: 600; margin: 0 0 2px; }
.entete-page .description { color: var(--texte-doux); margin: 4px 0 0; max-width: 70ch; }
.entete-page.arretes h1 { border-left: 5px solid var(--orange-arretes); padding-left: 10px; }
.entete-outils { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.champ-annee { display: flex; flex-direction: column; gap: 3px; }
.champ-annee label { font-size: .82em; font-weight: 700; color: var(--texte-doux); text-transform: uppercase; letter-spacing: .06em; }
.champ-annee select { width: auto; min-width: 110px; font-weight: 700; color: var(--bleu); }

/* ------------------------------------------------------------ blocs */
.bloc { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 16px 18px; margin-bottom: 18px; min-width: 0; }
.bloc > h2 { font-size: 1.08em; margin-bottom: 10px; color: var(--texte); }
.bloc-entete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.bloc-entete h2 { font-size: 1.08em; }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grille-2 > .bloc { margin-bottom: 0; }
.vide { color: var(--texte-doux); font-style: italic; margin: 6px 0; }

/* indicateurs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi {
  position: relative; background: #fff; border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 12px 14px 12px 16px; box-shadow: var(--ombre);
  display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--texte); min-height: 96px;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--kpi, var(--bleu)); }
a.kpi:hover { border-color: var(--bordure-forte); background: #fafbff; color: var(--texte); }
.kpi-libelle { font-size: .86em; color: var(--texte-doux); font-weight: 600; }
.kpi-valeur { font-size: 1.85em; font-weight: 700; line-height: 1.1; color: var(--bleu-fonce); font-variant-numeric: tabular-nums; }
.kpi-detail { font-size: .82em; color: var(--texte-doux); }

/* barres qualité */
.barres { list-style: none; padding: 0; margin: 0; }
.barres li { display: grid; grid-template-columns: minmax(120px, 32%) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #eef0f5; }
.barres li:last-child { border-bottom: 0; }
.barre-nom { font-weight: 600; overflow-wrap: anywhere; }
.barre-nom small { display: block; font-weight: 400; color: var(--texte-doux); }
.barre-piste { height: 12px; border-radius: 6px; background: #eceef4; overflow: hidden; }
.barre-remplie { height: 100%; border-radius: 6px; background: var(--bleu); min-width: 2px; }
.barre-remplie.moyen { background: var(--p2); }
.barre-remplie.faible { background: var(--p1); }
.barre-valeur { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 4.5em; text-align: right; }

/* ------------------------------------------------------------ tableaux */
.cadre-tableau { overflow-x: auto; border: 1px solid var(--bordure); border-radius: var(--rayon); background: #fff; -webkit-overflow-scrolling: touch; }
.bloc .cadre-tableau { border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: .93em; }
caption { text-align: left; padding: 10px 12px; font-weight: 600; color: var(--texte-doux); caption-side: top; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #e9ecf2; }
thead th { background: #f6f7fb; font-size: .84em; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-doux); font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.cliquable { cursor: pointer; }
tbody tr.cliquable:hover td { background: #f7f8fd; }
tbody tr.selectionne td { background: #eef1fb; }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
.tableau-registre { min-width: 1180px; }
.tableau-comptes { min-width: 1150px; }
.tableau-comptes td { vertical-align: middle; }
.tableau-comptes select { min-height: 32px; padding: 4px 6px; font-size: .92em; min-width: 108px; }
.tableau-comptes input[type="text"] { min-height: 32px; padding: 4px 8px; min-width: 150px; }
.cellule-sec { color: var(--texte-doux); font-size: .9em; }
.objet-loc strong { display: block; font-weight: 600; }
.objet-loc span { display: block; color: var(--texte-doux); font-size: .9em; max-width: 42ch; }
.numeros { margin: 0; padding: 0; list-style: none; font-size: .9em; }
.numeros li { white-space: nowrap; }
.compteur { color: var(--texte-doux); font-size: .92em; margin: 0 0 8px; }

/* puces de statut (contraste texte / fond ≥ 4,5:1) */
.puce { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .84em; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.puce-instruction { background: #e4e8f8; color: #182882; border-color: #c9d0ef; }
.puce-attente { background: #fff1d6; color: #6e4300; border-color: #f0d394; }
.puce-signature { background: #efe6fa; color: #4b2a7a; border-color: #d9c6f1; }
.puce-signe { background: #e1f3e6; color: #1b5c2c; border-color: #b6dfc2; }
.puce-termine { background: #eceef1; color: #384050; border-color: #d4d8df; }
.puce-rouvert { background: #fde7d4; color: #853a00; border-color: #f4c59c; }
.puce-refus { background: #fbe1e1; color: #8e1215; border-color: #f0b8b9; }
.puce-neutre { background: #eef0f4; color: #384050; border-color: #d4d8df; }
.gravite-bloquant { background: #fbe1e1; color: #8e1215; border-color: #f0b8b9; }
.gravite-majeur { background: #fde7d4; color: #853a00; border-color: #f4c59c; }
.gravite-vigilance { background: #fff6cc; color: #5c4a00; border-color: #eedb7a; }
.priorite { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .9em; }
.priorite::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #a7adb8; border: 1px solid rgba(0, 0, 0, .2); }
.priorite.urgente::before { background: var(--p1); }
.priorite.haute::before { background: var(--p2); }
.priorite.normale::before { background: var(--p3); }
.conflits-n { display: inline-block; min-width: 26px; text-align: center; padding: 1px 7px; border-radius: 999px; font-weight: 700; font-size: .85em; }
.conflits-n.oui { background: #fbe1e1; color: #8e1215; }
.conflits-n.non { background: #eef0f4; color: #4a5266; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; }
.etiquette-info { background: var(--bleu-clair); color: var(--bleu-fonce); border-radius: 4px; padding: 1px 8px; font-size: .85em; font-weight: 600; }
.delai-depasse { color: var(--erreur); font-weight: 700; }
.delai-proche { color: var(--alerte); font-weight: 700; }

/* filtres */
.filtres { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1.1fr) minmax(200px, 1.6fr) auto; gap: 0 12px; align-items: end; }
.filtres .champ { margin-bottom: 8px; }
.filtres-cases { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 2px; }

/* ------------------------------------------------------------ panneau de détail */
.voile { position: fixed; inset: 0; z-index: 50; background: rgba(12, 18, 48, .42); display: flex; justify-content: flex-end; }
.voile-centre { justify-content: center; align-items: center; padding: 16px; z-index: 60; }
.panneau {
  width: min(760px, 100%); height: 100%; background: var(--fond); overflow-y: auto; box-shadow: -8px 0 30px rgba(12, 18, 48, .25);
  display: flex; flex-direction: column;
}
.panneau-entete {
  position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid var(--bordure); padding: 14px 18px;
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; border-top: 4px solid var(--orange-arretes);
}
.panneau-entete h2 { font-size: 1.25em; color: var(--bleu); }
.panneau-entete h2:focus { outline: none; }
.panneau-entete p { margin: 4px 0 0; color: var(--texte-doux); }
.panneau-corps { padding: 16px 18px 32px; }
.panneau .bloc { padding: 14px 16px; margin-bottom: 14px; }
.panneau .bloc > h3 { font-size: 1em; margin-bottom: 10px; color: var(--bleu-fonce); text-transform: uppercase; letter-spacing: .05em; font-size: .86em; }
.definitions { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 6px 14px; margin: 0; }
.definitions dt { color: var(--texte-doux); font-size: .9em; font-weight: 600; }
.definitions dd { margin: 0; overflow-wrap: anywhere; }
.tiers { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.tiers-carte { border: 1px solid var(--bordure); border-radius: 6px; padding: 10px 12px; background: #fbfbfd; min-width: 0; overflow-wrap: anywhere; }
.tiers-carte h4 { font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); margin-bottom: 4px; }
.tiers-carte strong { display: block; }
.tiers-carte span { display: block; font-size: .9em; color: var(--texte-doux); }
.tiers-fleche { align-self: center; font-size: 1.4em; color: var(--texte-doux); }
.liste-simple { list-style: none; padding: 0; margin: 0; }
.liste-simple > li { padding: 8px 0; border-bottom: 1px solid #eceef4; }
.liste-simple > li:last-child { border-bottom: 0; }
.ligne-piece { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ligne-piece .meta { color: var(--texte-doux); font-size: .86em; }
.manquantes { margin-top: 10px; }
.points li { display: flex; gap: 8px; align-items: baseline; }
.chronologie { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--bordure); }
.chronologie li { position: relative; padding: 0 0 12px 12px; }
.chronologie li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--bleu); }
.chronologie time { display: block; font-size: .82em; color: var(--texte-doux); font-weight: 600; }
.chronologie .par { color: var(--texte-doux); font-size: .88em; }
.cycle { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.cycle li { border: 1px solid var(--bordure); border-radius: 6px; padding: 8px 10px; background: #fff; font-size: .9em; }
.cycle li strong { display: block; font-size: .95em; }
.cycle li span { color: var(--texte-doux); font-size: .88em; }
.cycle li.fait { border-color: #b6dfc2; background: #f1f9f3; }
.cycle li.courant { border: 2px solid var(--bleu); background: var(--bleu-clair); }
.cycle li.courant strong::after { content: " · étape actuelle"; font-weight: 400; color: var(--bleu-fonce); }
.liens-docs { display: flex; gap: 8px; flex-wrap: wrap; }
.controles { margin: 6px 0 0; padding-left: 18px; font-size: .88em; color: var(--texte-doux); }

/* ------------------------------------------------------------ fenêtre */
.fenetre { background: #fff; border-radius: 10px; width: min(520px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 16px 40px rgba(12, 18, 48, .3); padding: 20px 22px; }
.fenetre h2 { font-size: 1.2em; margin-bottom: 10px; color: var(--bleu); }
.fenetre .actions { margin-top: 18px; justify-content: flex-end; }

/* ------------------------------------------------------------ administration */
.grille-droits { width: 100%; min-width: 620px; }
.grille-droits th, .grille-droits td { text-align: center; vertical-align: middle; }
.grille-droits th[scope="row"] { text-align: left; }
.grille-droits input { width: 18px; height: 18px; accent-color: var(--bleu); }
.etat-mdp { display: inline-block; font-size: .9em; font-weight: 600; max-width: 13em; }
.etat-mdp.defini { color: var(--succes); }
.etat-mdp.a-definir { color: var(--alerte); }
.inactif td { color: #6b7385; background: #fafafb; }
.pastilles { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; min-height: 30px; }
.pastille { display: inline-flex; align-items: center; gap: 4px; background: var(--bleu-clair); color: var(--bleu-fonce); border: 1px solid #c3cbea; border-radius: 999px; padding: 2px 4px 2px 12px; font-size: .9em; overflow-wrap: anywhere; }
.pastille button { border: 0; background: transparent; color: var(--bleu-fonce); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 1.05em; line-height: 1; }
.pastille button:hover { background: #fff; color: var(--erreur); }
.ajout-adresse { display: flex; gap: 8px; }
.ajout-adresse input { flex: 1; min-width: 0; }
.grille-copies { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.grille-copies fieldset { background: #fff; margin: 0; padding-bottom: 12px; }
.bareme input { min-height: 34px; }
.bareme td { vertical-align: middle; }
.bareme .col-prix { width: 150px; }
.bareme .col-code { width: 210px; }
.apercu-numero { font-family: Consolas, "Cascadia Mono", monospace; background: var(--fond); border-radius: 6px; padding: 6px 10px; display: inline-block; overflow-wrap: anywhere; }
.etat-service { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eceef4; flex-wrap: wrap; }
.etat-service:last-of-type { border-bottom: 0; }
.etat-service p { margin: 2px 0 0; color: var(--texte-doux); font-size: .9em; max-width: 60ch; }
.progression { height: 10px; background: #eceef4; border-radius: 5px; overflow: hidden; margin: 8px 0 4px; }
.progression span { display: block; height: 100%; background: var(--bleu); transition: width .3s; }
.depot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.depot code { background: var(--fond); padding: 6px 10px; border-radius: 6px; overflow-wrap: anywhere; }
.procedure { margin: 0; padding-left: 20px; }
.procedure li { margin-bottom: 4px; }
.modifie { color: var(--alerte); font-weight: 600; font-size: .9em; }

/* ------------------------------------------------------------ adaptation aux petits écrans */
@media (max-width: 1100px) {
  .grille-2 { grid-template-columns: 1fr; }
  .filtres { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .console { display: block; }
  .laterale { position: static; height: auto; overflow: visible; }
  .laterale-entete { padding: 12px 16px; border-bottom: 0; }
  .bouton-menu { display: inline-block; }
  .navigation { display: none; padding: 0 10px 10px; }
  .navigation.ouverte { display: block; }
  .laterale-pied { display: none; }
  .laterale.ouverte .laterale-pied { display: block; }
  .contenu { padding: 16px 16px 40px; }
  .entete-page h1 { font-size: 1.3em; }
}
@media (max-width: 620px) {
  body { font-size: 14.5px; }
  .filtres { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { min-height: 84px; padding: 10px 10px 10px 14px; }
  .kpi-valeur { font-size: 1.5em; }
  .bloc { padding: 14px 12px; }
  .definitions { grid-template-columns: 1fr; gap: 0; }
  .definitions dd { margin-bottom: 8px; }
  .tiers { grid-template-columns: 1fr; }
  .tiers-fleche { transform: rotate(90deg); justify-self: center; }
  .barres li { grid-template-columns: 1fr auto; }
  .barres .barre-piste { grid-column: 1 / -1; grid-row: 2; }
  .panneau-corps { padding: 12px 12px 28px; }
  .grille-copies { grid-template-columns: 1fr; }
  .entete-outils { width: 100%; }
}

@media print {
  .laterale, .entete-outils, .voile .panneau-entete button, .barre-activite { display: none !important; }
  .console { display: block; }
  body { background: #fff; }
}
