/* Charte NSU (ANStat) : gabarit des pages de recherche d'offres de Société Générale.
   Rouge de marque unique (#e9041e), noir et blanc, police Montserrat, en-tête blanc, grand titre noir sur fond gris clair,
   cartes blanches à ombre douce et filet épais en bas, étiquettes pleines, boutons à contour arrondi. Vert réservé aux états de réussite. */
@font-face { font-family: 'Montserrat'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/montserrat-latin-700-normal.woff2') format('woff2'); }
:root {
  --marque: #e9041e; --marque-fonce: #b80318; --marque-pale: #fdecee;
  --noir: #1a1a1a; --orange: #f08c1e;
  --texte: #1a1a1a; --doux: #5e5e5e; --discret: #8c8c8c;
  --fond: #f4f4f4; --carte: #ffffff; --bord: #dcdcdc; --bord-fort: #9a9a9a;
  --succes: #1f8a57; --succes-pale: #e6f4ec;
  --rouge: #8f1d14; --rouge-pale: #fdecea; --bleu: #1f5f99; --bleu-pale: #e8f0f8; --ambre: #92560a; --ambre-pale: #fdf3e2;
  --rayon: 8px;
  --ombre: 0 6px 20px rgba(26,26,26,.09);
  --police: 'Montserrat', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --marge: max(clamp(16px, 2.6vw, 36px), calc((100vw - 1760px) / 2));   /* marges gauche et droite : les écrans de travail prennent toute la largeur */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 15.5px/1.55 var(--police); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* ---------------------------------------------------------------- en-tête : logos puis ligne de navigation, tous deux sur fond blanc */
.entete { background: #fff; padding: 8px var(--marge); }
.entete-logos { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; height: 44px; }
.logo img { max-height: 42px; width: auto; object-fit: contain; }
.entete-logos .logo:first-child { justify-self: start; }
.entete-logos .logo:last-child { justify-self: end; }
.entete-enquete { text-align: center; line-height: 1.3; font-size: 12.5px; color: var(--doux); }
.entete-enquete b { display: block; color: var(--texte); font-weight: 700; max-width: none; margin: 0; }
.entete-enquete span { display: inline; } .entete-enquete span + span::before { content: " · "; }
@media (max-width: 560px) {
  .entete { padding-top: 6px; padding-bottom: 6px; }
  .logo { height: 36px; } .logo img { max-height: 34px; }
  .entete-enquete { font-size: 12px; } .entete-enquete b { max-width: 150px; }
}

/* ligne de navigation : réseau, compte connecté, déconnexion (reste visible) */
.session { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 34px;
  margin: 0; padding: 2px var(--marge); background: #fff; color: var(--texte); font-size: 13px; border-bottom: 1px solid var(--bord); }
.session-gauche, .session-droite { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.reseau { display: inline-flex; align-items: center; gap: 7px; color: var(--doux); font-size: 12.5px; }
.reseau::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--discret); }
.reseau.ok::before { background: var(--succes); }
.reseau.off::before { background: var(--orange); }
.qui { font-weight: 700; font-size: 13px; }
.session-droite { flex: none; }
.lien-btn { white-space: nowrap; border: none; border-bottom: 2px solid transparent; background: none; padding: 5px 2px; color: var(--marque); font-weight: 600; cursor: pointer; }
.lien-btn:hover { border-bottom-color: var(--marque); }
.demo { margin: 0; padding: 3px var(--marge); color: var(--ambre); background: var(--ambre-pale); font-size: 12px; }

/* ---------------------------------------------------------------- structure : grand titre noir sur fond gris clair */
main { margin: 0; padding: 0 var(--marge) 130px; min-height: 60vh; }
h1 { font-size: 30px; line-height: 1.2; margin: 14px 0 4px; color: var(--noir); font-weight: 700; letter-spacing: -.01em; }
h1 .accent { color: var(--marque); }
h2 .accent { color: var(--marque); }
h2 { font-size: 19px; line-height: 1.25; margin: 0 0 10px; font-weight: 700; }
h3 { font-size: 17px; margin: 22px 0 8px; font-weight: 700; }
h4 { font-size: 15px; margin: 14px 0 4px; }
.sous-titre { color: var(--doux); margin: 8px 0 0; font-size: 14px; }
/* lignes d'information à icône (agents, département, superviseur, date) */
/* titre lu par les lecteurs d'écran, non affiché */
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.infos { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 10px 0 0; color: var(--texte); font-size: 14px; }
.infos .info { display: inline-flex; align-items: center; gap: 8px; }
.icone { flex: none; width: 18px; height: 18px; color: var(--noir); }
.aide { color: var(--doux); font-size: 13.5px; margin: 6px 0; }
.petit { font-size: 13px; }

/* cartes : blanches, coins arrondis, ombre douce, filet épais en bas */
.carte { background: var(--carte); border-radius: 10px; padding: 20px; margin: 16px 0; border: 0; border-bottom: 4px solid var(--marque); box-shadow: var(--ombre); }
.carte h2 { color: var(--marque); }
.carte.alerte, .carte.erreur { border-bottom-color: var(--rouge); } .carte.info { border-bottom-color: var(--bleu); } .carte.succes { border-bottom-color: var(--succes); }
.carte.alerte h2, .carte.erreur h2 { color: var(--rouge); }
blockquote { margin: 8px 0 0; padding: 0; font-size: 15.5px; white-space: pre-wrap; }
.chargement { display: flex; align-items: center; gap: 10px; color: var(--doux); padding: 40px 0; }
.chargement span { width: 18px; height: 18px; border: 2.5px solid #e4e4e4; border-right-color: var(--marque); border-radius: 50%; animation: tourne .8s linear infinite; }
/* ouverture de l'application : cercle seul, au centre */
.chargement.plein-ecran { justify-content: center; min-height: 55vh; padding: 0; font-size: 0; }
.chargement.plein-ecran span { width: 36px; height: 36px; border-width: 3px; animation-duration: .9s; }

/* ---------------------------------------------------------------- formulaires */
label { display: block; font-weight: 600; font-size: 13.5px; margin: 14px 0 6px; transition: color .2s; }
label:has(+ :focus) { color: var(--marque); }
.saisie, .champ-sobre { width: 100%; padding: 9px 12px; border: 1px solid var(--bord-fort); background: #fff; border-radius: var(--rayon); min-height: 42px; transition: border-color .15s, box-shadow .15s; }
.saisie:hover, .champ-sobre:hover { border-color: var(--noir); }
.saisie:focus, .champ-sobre:focus { outline: none; border-color: var(--noir); box-shadow: inset 0 0 0 1px var(--noir); }
.saisie:disabled { background: #efefef; border-color: var(--bord); color: var(--discret); }
textarea.saisie { resize: vertical; line-height: 1.45; }
.saisie.nombre { text-align: center; min-width: 78px; font-variant-numeric: tabular-nums; }
.valeur-fixe { padding: 9px 12px; background: #efefef; border: 1px solid var(--bord); border-radius: var(--rayon); font-weight: 600; min-height: 42px; display: flex; align-items: center; }
.fixe { margin: 0 0 10px; font-size: 15px; }
/* consigne : simple paragraphe ; question : intitulé en gras devant une série de choix */
.consigne { margin: 0; font-size: 15px; color: var(--texte); } .question { font-weight: 700; }
ul.liste-fixe { padding-left: 22px; font-size: 15px; } ul.liste-fixe li { margin: 5px 0; }
.section-corps > .fixe { margin-bottom: 8px; }
.section-corps > ul.liste-fixe { margin: 0 0 22px; }
/* début de phrase écrit d'office dans le rapport, suivi de la zone à remplir */
.phrase { display: grid; gap: 6px; }
.debut-phrase { font-size: 14px; color: var(--texte); }
.debut-phrase::after { content: ' …'; color: var(--discret); }
.grille { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grille.quatre { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 680px) { .grille.quatre { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .grille { grid-template-columns: 1fr; } }
.choix { display: grid; gap: 0; margin: 4px 0; }
.option { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 14.5px; margin: 0; padding: 7px 6px; cursor: pointer; transition: background-color .15s; }
.option:hover { background: #f0f0f0; }
/* cases à cocher et boutons radio : tracé net, encre noire */
.option input { appearance: none; -webkit-appearance: none; display: grid; place-content: center; width: 20px; height: 20px; margin: 1px 0 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--doux); background: #fff; border-radius: 3px; transition: background-color .12s, border-color .12s; }
.option input[type=radio] { border-radius: 50%; }
.option input::after { content: ''; width: 12px; height: 12px; background: #fff; transform: scale(0); transition: transform .12s ease-out;
  clip-path: polygon(14% 44%, 0 63%, 40% 100%, 100% 20%, 84% 4%, 40% 64%); }
.option input[type=radio]::after { width: 8px; height: 8px; border-radius: 50%; clip-path: none; }
.option input:checked { background: var(--noir); border-color: var(--noir); }
.option input:checked::after { transform: scale(1); }
.option input:focus-visible { outline: 2px solid var(--marque); outline-offset: 2px; }
details summary { cursor: pointer; color: var(--marque); font-weight: 600; padding: 8px 0; }
fieldset.plan { border: 1px solid var(--bord); border-radius: var(--rayon); margin: 12px 0; padding: 6px 14px 14px; }
fieldset.plan legend { font-weight: 700; padding: 0 6px; }
.liste-textes { display: grid; gap: 8px; margin: 10px 0; }
.ligne-liste { display: flex; gap: 8px; align-items: flex-start; }
.ligne-liste .saisie { flex: 1 1 auto; min-width: 0; }
.ligne-liste .btn { flex: none; margin-top: 4px; }
/* une ligne de texte qui s'agrandit avec la phrase : rien n'est caché, sur aucun écran */
textarea.saisie.auto { resize: none; overflow: hidden; min-height: 44px; line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .ligne-liste { flex-wrap: wrap; gap: 4px; }
  .ligne-liste .saisie { flex-basis: 100%; }
  .ligne-liste .btn { margin: 0 0 4px auto; }
}

/* ---------------------------------------------------------------- boutons : contour arrondi noir, bouton principal rouge */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--noir); background: #fff; color: var(--noir);
  border-radius: 999px; padding: 9px 22px; min-height: 42px; cursor: pointer; font-weight: 600; font-size: 14px;
  transition: background-color .18s, color .18s, border-color .18s; }
.btn:hover { background: #f0f0f0; }
.btn:active { background: #e4e4e4; }
.btn:focus-visible { outline: 2px solid var(--marque); outline-offset: 2px; }
.btn.principal { background: var(--marque); border-color: var(--marque); color: #fff; border-radius: 6px; }
.btn.principal:hover { background: var(--marque-fonce); border-color: var(--marque-fonce); }
/* bouton de téléchargement du rapport consolidé : vert ANStat (couleur des logos) */
.btn.anstat { background: #0e6751; border-color: #0e6751; } .btn.anstat:hover { background: #0a4d3c; border-color: #0a4d3c; }
.btn.danger { border-color: var(--rouge); color: var(--rouge); } .btn.danger:hover { background: var(--rouge-pale); }
.btn.petit { padding: 5px 14px; min-height: 34px; font-size: 13px; }
.btn.discret { border-color: var(--bord-fort); color: var(--doux); } .btn.discret:hover { background: #eeeeee; }
.btn.ajout { justify-self: start; }
.btn.large { width: 100%; margin-top: 18px; }
.btn[disabled] { opacity: .5; cursor: wait; }
.ligne { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.barre { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; justify-content: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--bord); z-index: 15; flex-wrap: wrap; }
.barre .btn { flex: 1 1 0; max-width: 300px; }
@media (max-width: 460px) { .barre { flex-wrap: nowrap; gap: 8px; } .barre .btn { padding: 10px 10px; font-size: 13.5px; } }

/* ---------------------------------------------------------------- statuts, progression */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 4px; font-size: 12.5px; font-weight: 600; background: var(--doux); color: #fff; white-space: nowrap; vertical-align: middle; }
.badge.brouillon { background: var(--ambre); } .badge.soumis { background: var(--bleu); }
.badge.rejete { background: var(--rouge); } .badge.valide { background: var(--succes); }
.sync { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--doux); }
.sync::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--succes); }
.sync.attente::before { background: var(--orange); }
.progression { height: 8px; background: #e4e4e4; margin: 10px 0 6px; overflow: hidden; border-radius: 4px; }
.progression > span { display: block; height: 100%; width: 0; background: var(--marque); border-radius: 4px; transition: width .35s ease-out; }

/* chiffres-clés : bloc plein rouge à coins arrondis, chiffres et textes blancs */
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; margin: 18px 0; padding: 16px 20px; background: var(--marque); color: #fff; border-radius: 10px; box-shadow: var(--ombre); }
.cle { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-height: 0; }
.cle > b { font-size: 26px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cle > b small { font-size: 17px; font-weight: 600; opacity: .85; }
.legende-cle { color: rgba(255,255,255,.88); font-weight: 600; font-size: 12.5px; }
.cle .badge { background: #fff; color: var(--noir); font-size: 12.5px; padding: 3px 10px; }
.cle .sync { color: #fff; font-size: 13px; white-space: nowrap; font-weight: 600; text-align: center; }
.chiffres .progression { grid-column: 1 / -1; height: 5px; margin: 2px 0 0; background: rgba(255,255,255,.3); }
.chiffres .progression > span { background: #fff; }

@media (max-width: 560px) {
  h1 { font-size: 24px; }
  .chiffres { padding: 14px 14px; gap: 10px 8px; grid-template-columns: repeat(2, 1fr); }
  .cle { min-height: 0; } .cle > b, .compteur b { font-size: 26px; } .legende-cle, .compteur span { font-size: 12px; }
  .chiffres.compteurs .compteur:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* fil d'Ariane au-dessus du titre */
.fil { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; padding: 12px 0 0; font-size: 12.5px; color: var(--doux); }
.fil > * + *::before { content: '›'; margin: 0 9px; color: var(--discret); font-weight: 400; }
.fil b { color: var(--texte); font-weight: 700; }

/* dossier du rapport : menu des parties à gauche, une seule partie affichée à droite */
.dossier { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 8px; }
.sommaire { position: sticky; top: 48px; background: #fff; border-radius: 10px; box-shadow: var(--ombre); overflow: hidden; }
.sommaire-titre { background: var(--marque); color: #fff; padding: 10px 14px; font-size: 13.5px; font-weight: 700; }
.sommaire ol { list-style: none; margin: 0; padding: 0; }
.sommaire li + li { border-top: 1px solid var(--bord); }
.sommaire a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-left: 4px solid transparent; color: var(--noir); text-decoration: none; font-size: 13.5px; font-weight: 600;
  transition: background-color .15s, border-color .2s, color .15s; }
.sommaire a::after { content: '›'; margin-left: auto; font-size: 20px; line-height: 1; color: var(--discret); }
.sommaire a:hover { background: #f4f4f4; }
.sommaire .num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; color: var(--doux); font-size: 12.5px; font-weight: 700; transition: background-color .3s, color .3s; }
.sommaire a.complet .num { background: var(--succes); color: #fff; border-radius: 3px; }
.sommaire a.actif { background: var(--marque-pale); border-left-color: var(--marque); color: var(--marque-fonce); }
.sommaire a.actif::after { color: var(--marque); }
@media (max-width: 1099px) {
  /* téléphone et tablette : le menu devient une rangée d'onglets défilants sous la ligne de navigation */
  .dossier { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 0; }
  .sommaire { top: 34px; z-index: 12; display: flex; overflow-x: auto; margin: 0 calc(-1 * var(--marge)); padding: 0 var(--marge); border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--bord); scrollbar-width: none; scroll-snap-type: x proximity; }
  .sommaire::-webkit-scrollbar { display: none; }
  .sommaire-titre { display: none; }
  .sommaire ol { display: flex; }
  .sommaire li + li { border-top: 0; }
  .sommaire a { flex: none; scroll-snap-align: start; padding: 11px 12px 8px; border-left: 0; border-bottom: 3px solid transparent; font-size: 13px; white-space: nowrap; }
  .sommaire a::after { display: none; }
  .sommaire a.actif { background: none; border-bottom-color: var(--marque); }
  .sommaire .num { width: 22px; height: 22px; font-size: 12px; }
  .formulaire { margin-top: 16px; }
}

/* une partie du rapport = un bloc : numéro, titre et état en en-tête, consignes, champs bien espacés, précédent / suivant en pied */
.section { padding: 0; scroll-margin-top: 90px; }
.section > h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding: 12px 20px 9px; border-bottom: 1px solid var(--bord); font-size: 19px; }
.titre-section { display: flex; align-items: baseline; gap: 10px; }
.rang { color: var(--marque); font-weight: 700; } .rang::after { content: '.'; }
.section .etat-section { font-size: 12.5px; font-weight: 600; color: var(--doux); white-space: nowrap; }
.section .etat-section.ok { color: var(--succes); }
.section-corps { padding: 22px 24px 26px; }
.section-corps > * { margin-top: 0; margin-bottom: 22px; }
.section-corps > *:last-child { margin-bottom: 0; }
.section-corps .champ + .champ { margin-top: 0; }
.pied-section { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px; border-top: 1px solid var(--bord); }
@media (max-width: 560px) {
  .section > h2 { padding: 10px 14px; font-size: 17px; } .section-corps { padding: 18px 16px 22px; } .pied-section { padding: 10px 14px; }
  .pied-section .btn { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------- tableaux et listes */
/* tableaux : relief sobre (ombre portée, en-tête sombre à liseré rouge, première colonne en retrait, champs en creux) */
.tablewrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--bord-fort); border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(26,26,26,.12), 0 8px 18px -10px rgba(26,26,26,.38); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 9px 11px; vertical-align: middle; border-bottom: 1px solid var(--bord); text-align: left; }
th { background: #f0f0f0; font-size: 12.5px; font-weight: 700; color: var(--noir); white-space: nowrap; }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: #fafafa; }
tbody tr:last-child td { border-bottom: none; }
.tablewrap table { border-collapse: separate; border-spacing: 0; }
.tablewrap thead th { background: var(--noir); color: #fff; font-size: 12px; line-height: 1.2; padding: 8px 10px; border-bottom: 2px solid var(--marque); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); white-space: normal; }
.tablewrap thead th + th { border-left: 1px solid rgba(255,255,255,.18); }
.tablewrap thead th:not(:first-child) { min-width: 122px; }
.empile:not(.tablesaisie) thead th { white-space: nowrap; }
.empile:not(.tablesaisie) thead th:not(:first-child) { min-width: 0; }
/* titres complets du tableau des statistiques : sur une ligne sur grand écran, sur deux lignes sur tablette */
@media (max-width: 1299px) { #sec-bilan thead th { white-space: normal; } }
.tablewrap td { padding: 10px 14px; }
.tablewrap td + td { border-left: 1px solid var(--bord); }
.tablewrap tbody td:first-child { background: #f1f1f1; border-left: 4px solid var(--marque); font-weight: 600; }
.tablewrap tbody tr:hover td + td { background: #fafafa; }
.tablewrap tfoot td { border-bottom: none; }
.tablewrap td.calcule { background: #f6f6f6; box-shadow: inset 0 2px 4px rgba(26,26,26,.07); }
.tablewrap td .saisie { background: #fcfcfc; border-color: #bdbdbd; box-shadow: inset 0 2px 4px rgba(26,26,26,.1); }
.tablewrap td .saisie:hover { border-color: var(--noir); }
.tablewrap td .saisie:focus { background: #fff; border-color: var(--marque); box-shadow: inset 0 1px 3px rgba(26,26,26,.1), 0 0 0 3px rgba(233,4,30,.14); }
.tablewrap td .saisie.nombre { min-height: 44px; font-size: 16px; font-weight: 600; }
/* tableau des difficultés : trois colonnes comme dans le rapport Word, champs de texte larges */
.tablesaisie table { table-layout: fixed; min-width: 600px; }
.tablesaisie th:first-child, .tablesaisie td:first-child { width: 21%; }
.tablesaisie td { vertical-align: top; }
.tablesaisie td:first-child { padding: 22px 8px 12px 12px; font-size: 13px; overflow-wrap: break-word; box-shadow: inset -6px 0 8px -8px rgba(26,26,26,.28); }
.tablesaisie td .saisie { min-height: 118px; }
tr.total td { font-weight: 700; background: #e7e7e7; border-top: 2px solid var(--noir); }
.tablewrap tfoot td:first-child { border-left: 4px solid var(--noir); }
td.calcule { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; } td.calcule.faux { color: var(--rouge); }
/* téléphone : chaque ligne d'un tableau de saisie devient un bloc, une rubrique par ligne avec son libellé */
@media screen and (max-width: 720px) {
  .empile table { min-width: 0; }
  .empile thead { display: none; }
  .empile tr { display: block; border-bottom: 1px solid var(--bord-fort); }
  .empile tbody tr:last-child { border-bottom: none; }
  .empile td, .empile td + td { display: block; border-left: 0; border-bottom: none; }
  .empile td:first-child { border-left: 4px solid var(--marque); padding: 12px 14px; box-shadow: none; }
  .empile td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 14px; }
  .empile td[data-label]::before { content: attr(data-label); flex: 1 1 auto; font-size: 12.5px; font-weight: 600; }
  .empile td .saisie.nombre { flex: none; width: 120px; min-width: 0; }
  .empile tbody tr td:last-child { padding-bottom: 12px; }
  .empile td:first-child[data-label] { display: block; }
  .empile td:first-child[data-label]::before { content: attr(data-label) ' '; flex: none; }
  .empile td > .btn { width: 100%; margin-top: 6px; }
  .empile tr.total { border-top: 2px solid var(--noir); }
  .empile tr.total td { border-top: 0; }
  .empile tfoot td:first-child { border-left: 4px solid var(--noir); }
  .tablesaisie td[data-label] { display: block; padding: 6px 14px; }
  .tablesaisie td[data-label]::before { display: block; margin-bottom: 5px; }
  .tablesaisie td .saisie { min-height: 96px; }
  .tablesaisie tbody tr td:last-child { padding-bottom: 14px; }
}
td.code { font-family: Consolas, "SF Mono", monospace; font-size: 15px; letter-spacing: 1.5px; }
/* compteurs de statuts (QG, superviseur) : posés sur le bloc de chiffres-clés */
.compteur { text-align: center; padding: 4px 8px; }
.compteur b { display: block; font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.compteur span { display: block; margin-top: 2px; font-size: 12.5px; color: rgba(255,255,255,.88); font-weight: 600; }
.chiffres .flash { animation: eclairBande 1.8s ease-out; }
@keyframes eclairBande { 0%, 25% { background-color: rgba(255,255,255,.25); } }
.telechargement { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.actions-qg { display: grid; gap: 8px; }
@media (max-width: 600px) { .telechargement { grid-template-columns: 1fr; } }

/* liste de résultats (rapports d'un superviseur) : une fiche par binôme, filet rouge au survol */
.resultats { margin-top: 24px; }
.titre-liste { font-size: 26px; color: var(--noir); margin: 8px 0 4px; letter-spacing: -.01em; }

/* ---------------------------------------------------------------- onglets, connexion */
.onglets { position: relative; display: flex; gap: 0; flex-wrap: wrap; margin: 16px 0 4px; border-bottom: 1px solid var(--bord-fort); }
.onglet { background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 7px 16px; cursor: pointer; font-weight: 700; color: var(--noir); }
.onglet:hover { background: #ececec; }
.onglet.actif { color: var(--marque); border-bottom-color: var(--marque); }
.connexion { max-width: 460px; margin: 22px auto 0; }
.etat { min-height: 22px; margin-top: 10px; font-size: 13.5px; } .etat.erreur { color: var(--rouge); font-weight: 600; }
.carte-unite { border: 1px solid var(--bord); border-radius: 6px; padding: 14px 16px; margin: 12px 0; }
.entete-unite { display: flex; justify-content: space-between; align-items: center; }
.apercu p, .apercu li { font-size: 14.5px; }
.apercu ul { padding-left: 20px; }
.apercu .legende { margin: 14px 0 6px; font-size: 13.5px; }
.apercu .legende b { text-decoration: underline; }
.dialogue { border: none; border-top: 4px solid var(--marque); border-radius: 10px; padding: 22px; max-width: 520px; width: calc(100% - 32px); box-shadow: 0 10px 34px rgba(0,0,0,.28); }
.dialogue::backdrop { background: rgba(26,26,26,.5); }
.dialogue .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.manques { padding-left: 20px; } .manques li { margin: 4px 0; } .manques a { color: var(--rouge); }
.toasts { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: min(92vw, 520px); }
.toast { background: var(--noir); color: #fff; padding: 12px 16px; border-radius: var(--rayon); box-shadow: 0 4px 16px rgba(0,0,0,.25); font-size: 14px; }
.toast.sort { opacity: 0; transition: opacity .25s; }
.toast.erreur { background: var(--rouge); } .toast.succes { background: var(--succes); }

/* ---------------------------------------------------------------- mouvement : seulement ce qui informe */
/* une valeur qui vient de changer est surlignée un instant (suivi des rapports) ; roue d'attente */
.flash { animation: eclair 1.8s ease-out; }
@keyframes eclair { 0%, 25% { background-color: #fff1bf; } }
@keyframes tourne { to { transform: rotate(360deg); } }
/* appareil réglé pour limiter les animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  .entete, .session, .demo, .onglets, .barre, .btn, .toasts, .sommaire { display: none !important; }
  body { background: #fff; } .carte { border: none; box-shadow: none; }
}
@media print {
  body:has(.imprimable) main > *:not(.imprimable):not(:has(.imprimable)) { display: none !important; }
  .imprimable .non-imprime, .imprimable .non-imprime * { display: none !important; }
  .imprimable { border: none; padding: 0; }
  .imprimable td, .imprimable th { border: 1px solid #999; }
  .tablewrap { box-shadow: none; border-radius: 0; }
  .tablewrap thead th { background: #e8e8e8; color: #000; box-shadow: none; border-bottom: 1px solid #999; }
  .tablewrap tbody td:first-child { background: none; border-left: 1px solid #999; }
}

/* ---------------------------------------------------------------- tablette et téléphone : confort tactile */
button, a, label, select, input, textarea, summary { touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 1100px) {
  .saisie, .champ-sobre, select, textarea, input { font-size: 16px; }
  .btn { min-height: 44px; }
  .btn.petit { min-height: 40px; }
  .session { min-height: 44px; }
  .lien-btn { padding: 10px 4px; }
  .option { min-height: 44px; padding: 9px 8px; align-items: center; font-size: 15.5px; }
  .option input { margin: 0; }
}

/* ---------------------------------------------------------------- tous les écrans : grands écrans, paysage, encoches */
/* écrans très larges : le contenu reste lisible (1760 px de large au plus, centré), les fonds restent pleine largeur */
@media (min-width: 1800px) { body { font-size: 16.5px; } }
/* encoches et coins arrondis en paysage */
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.barre { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
/* fenêtres basses (téléphone en paysage) : plus de barres fixes qui mangent la place du formulaire */
@media (max-height: 480px) and (orientation: landscape) {
  .session { position: static; }
  .barre { position: static; box-shadow: none; border-top: 0; background: transparent; }
  main { padding-bottom: 16px; }
  .sommaire { top: 0; }
}
@media (max-height: 480px) and (orientation: landscape) and (min-width: 1100px) { .dossier .sommaire { top: 8px; } }
.dialogue { max-height: calc(100vh - 24px); overflow-y: auto; }

/* ---------------------------------------------------------------- appréciation du superviseur (quatre notes sur 5, note finale sur 20) */
/* évaluation du binôme : même tableau que dans le rapport Word (en-têtes bleu pâle, une colonne par critère, note finale sur 20) */
.evaluation table { table-layout: fixed; min-width: 640px; }
.tablewrap.evaluation thead th, .tablewrap.evaluation thead th:not(:first-child) { background: var(--bleu-pale); color: var(--noir); white-space: normal; text-align: center; vertical-align: middle; min-width: 0;
  font-size: 12.5px; font-weight: 400; line-height: 1.3; padding: 10px 8px; border-bottom: 1px solid var(--bord-fort); box-shadow: none; }
.evaluation thead th + th { border-left: 1px solid var(--bord-fort); }
.evaluation thead th:last-child { width: 16%; }
.evaluation thead th b { display: block; font-weight: 700; }
.evaluation thead th .explication { display: block; margin: 2px 0; }
.evaluation tbody td, .evaluation tbody td:first-child { background: #fff; border-left: 1px solid var(--bord); font-weight: 400; text-align: center; padding: 12px 8px; }
.evaluation tbody td:first-child { border-left: none; }
.evaluation tbody tr:hover td + td { background: #fff; }
.evaluation select { width: 100%; max-width: 8rem; }
.evaluation td.calcule, .evaluation tbody td.calcule { background: #f6f6f6; }
.note-finale-valeur { font-size: 1.5rem; color: var(--marque); }
@media screen and (max-width: 720px) {
  .evaluation table { min-width: 0; }
  .evaluation tbody td[data-label], .evaluation tbody td:first-child[data-label] { display: flex; flex-wrap: wrap; text-align: left; padding: 9px 12px; gap: 6px 10px; }
  .evaluation tbody td[data-label]::before, .evaluation tbody td:first-child[data-label]::before { content: attr(data-label); flex: 1 1 9rem; min-width: 0; }
  .evaluation select { width: 6.5rem; flex: none; margin-left: auto; }
}
@media (max-width: 720px) {
  .appreciation-ligne { grid-template-columns: minmax(0, 1fr); }
  .appreciation-note select { width: 100%; }
}
.carte[hidden] { display: none; }

/* ---------------------------------------------------------------- accueil : trois espaces ; rapport de mission */
/* menu du bandeau, comme celui de l'INSEE : une barre gris foncé, des titres en majuscules séparés par un trait clair, la rubrique en cours en plein ;
   au survol, un panneau blanc sur toute la largeur : des intitulés soulignés d'un trait et de simples liens, sans aucun encadré */
:root { --insee-barre: #414c5c; --insee-gris: #757575; --insee-trait: #e0e0e0; --insee-regle: #7a7b7d; }
.insecable { white-space: nowrap; }
/* le bandeau du compte connecté tient sur une ligne (un nom trop long est abrégé) : les parties d'un rapport se placent juste dessous */
.session-gauche { flex-wrap: nowrap; min-width: 0; }
.session-gauche .reseau { flex: none; white-space: nowrap; }
.qui { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 460px) { .session-gauche { gap: 8px; } .session .qui, .session .lien-btn { font-size: 12px; } .session .reseau { font-size: 11.5px; } }
/* la barre est pleine sur tous les écrans de l'application */
.session { background: var(--insee-barre); color: #fff; border-bottom: 1px solid var(--insee-barre); }
.session .reseau, .session .qui, .session .lien-btn { color: #fff; }
.session .lien-btn:hover { border-bottom-color: #fff; }
.session .lien-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.session .reseau.ok::before { background: #8ff0b8; }
.session .reseau.off::before { background: #ffd24d; }
.session.avec-menu { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 18px; padding-top: 0; padding-bottom: 0; min-height: 46px; }
.session.avec-menu .menu { grid-column: 1; grid-row: 1; }
.session.avec-menu .session-gauche { grid-column: 2; grid-row: 1; justify-content: flex-end; }
.session.avec-menu .session-droite { grid-column: 3; grid-row: 1; justify-self: end; }
.session.avec-menu .menu[hidden], .menu[hidden] { display: none; }
.menu-liste { display: flex; margin: 0; padding: 0; list-style: none; }
.menu-item { position: static; }   /* le panneau se mesure sur toute la barre, pas sur son titre */
.menu-titre { position: relative; display: flex; align-items: center; gap: 9px; min-height: 47px; padding: 0 30px; border: 0; border-left: 1px solid var(--insee-trait); background: none; color: #fff; font-size: 12.5px; font-weight: 700; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: background-color .15s, color .15s; }
.menu-item:last-child .menu-titre { border-right: 1px solid var(--insee-trait); }
.menu-item.courant .menu-titre { background: var(--marque); }
.menu-titre:hover, .menu-item.ouvert .menu-titre, .menu-item.courant .menu-titre:hover, .menu-item.courant.ouvert .menu-titre { background: #fff; color: var(--insee-barre); }
.menu-titre:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
.menu-item.ouvert .menu-titre:focus-visible { outline-color: var(--marque); }
/* la flèche ne reste que là où un seul titre, sans voisin, ne dirait pas qu'il s'ouvre */
.menu.simple .menu-titre::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: translateY(-2px) rotate(45deg); }
.menu.simple .menu-item.ouvert .menu-titre::after { transform: translateY(1px) rotate(225deg); }
@media (min-width: 861px) {
  /* petite pointe blanche sous la rubrique de la page en cours */
  .menu-item.courant:not(.ouvert) .menu-titre:not(:hover) > span::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border: 6px solid transparent; border-top: 0; border-bottom-color: #fff; }
}
.menu-panneau { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; align-content: start;
  padding: 18px var(--marge) 24px; background: #fff; color: var(--texte); border-bottom: 1px solid var(--bord); box-shadow: 0 16px 22px -18px rgba(26,26,26,.45); opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; }
/* à l'ouverture, la liste est « visible » tout de suite (le clavier peut y entrer) ; seule l'opacité est animée */
.menu-item.ouvert .menu-panneau { opacity: 1; visibility: visible; transition: opacity .15s, visibility 0s; }
.menu-rubrique { grid-column: 1 / -1; margin: 0 0 12px; color: var(--texte); font-size: 17px; font-weight: 400; }
/* comme les colonnes de l'INSEE : un intitulé en majuscules souligné d'un trait, puis le lien */
.menu-lien { display: block; align-self: start; width: 100%; padding: 6px 0 14px; border: 0; border-radius: 0; background: none; text-align: left; cursor: pointer; }
.menu-lien b { display: block; padding-bottom: 6px; border-bottom: 1px solid var(--insee-regle); color: var(--texte); font-size: 12.5px; font-weight: 700; text-transform: uppercase; }
.menu-lien b::before { content: '›'; margin-right: 6px; }
.menu-lien span { display: block; margin-top: 6px; color: var(--marque-fonce); font-size: 13px; line-height: 1.45; }
.menu-lien:hover span { text-decoration: underline; text-underline-offset: 3px; }
.menu-lien.actif span { font-weight: 700; }
.menu-lien.actif b { border-bottom: 3px solid var(--marque); padding-bottom: 4px; }
.menu-lien:focus-visible { outline: 2px solid var(--marque); outline-offset: -2px; }
.menu-burger:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.menu-burger { display: none; }
@media (max-width: 860px) {
  .session.avec-menu { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; min-height: 46px; }
  .session.avec-menu .session-gauche { grid-column: 1; grid-row: 1; justify-content: flex-start; }
  .session.avec-menu .session-droite { grid-column: 2; grid-row: 1; }
  /* accueil : tout le menu se replie derrière « Menu » */
  .session.avec-menu .menu.repliable { grid-column: 3; grid-row: 1; }
  .menu.repliable .menu-rubrique { display: none; }   /* le titre est déjà juste au-dessus */
  .menu.repliable .menu-burger { display: inline-flex; align-items: center; gap: 10px; min-height: 45px; padding: 0 2px; border: 0; background: none; color: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer; }
  .menu-burger .traits, .menu-burger .traits::before, .menu-burger .traits::after { width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
  .menu-burger .traits { position: relative; }
  .menu-burger .traits::before, .menu-burger .traits::after { content: ''; position: absolute; left: 0; transition: top .2s, transform .2s; }
  .menu-burger .traits::before { top: -6px; } .menu-burger .traits::after { top: 6px; }
  .menu.deplie .menu-burger .traits { background: transparent; }
  .menu.deplie .menu-burger .traits::before { top: 0; background: #fff; transform: rotate(45deg); }
  .menu.deplie .menu-burger .traits::after { top: 0; background: #fff; transform: rotate(-45deg); }
  .menu.repliable .menu-liste { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; display: none; flex-direction: column; gap: 0; max-height: calc(100vh - 60px); overflow-y: auto;
    padding: 2px var(--marge) 10px; background: #fff; border-bottom: 1px solid var(--bord); box-shadow: 0 22px 34px -18px rgba(26,26,26,.38); }
  .menu.repliable.deplie .menu-liste { display: flex; }
  .menu.repliable .menu-item + .menu-item { border-top: 1px solid var(--bord); }
  /* dans la liste dépliée, sur fond blanc : titres en noir, avec une flèche qui indique ce qui s'ouvre */
  .menu.repliable .menu-item .menu-titre { justify-content: space-between; width: 100%; min-height: 52px; padding: 0 4px; border: 0; background: none; color: var(--insee-barre); font-size: 13px; }
  .menu.repliable .menu-item.courant .menu-titre, .menu.repliable .menu-item.ouvert .menu-titre { color: var(--marque-fonce); }
  .menu.repliable .menu-item .menu-titre:focus-visible { outline: 2px solid var(--marque); outline-offset: -2px; }
  .menu.repliable .menu-titre::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: translateY(-2px) rotate(45deg); }
  .menu.repliable .menu-item.ouvert .menu-titre::after { transform: translateY(1px) rotate(225deg); }
  .menu.repliable .menu-item .menu-panneau { position: static; display: none; grid-template-columns: 1fr; padding: 0 4px 8px; border: 0; box-shadow: none; opacity: 1; visibility: visible; transition: none; }
  .menu.repliable .menu-item.ouvert .menu-panneau { display: grid; }
  /* QG : la liste des vues passe sur une seconde ligne */
  .session.avec-menu .menu.simple { grid-column: 1 / -1; grid-row: 2; display: flex; border-top: 1px solid rgba(255,255,255,.35); }
  .menu.simple .menu-item .menu-titre { min-height: 42px; margin-left: -12px; padding: 0 12px; border: 0; }
  .menu.simple .menu-panneau { grid-template-columns: 1fr; }
}
/* petit ordinateur : les titres se resserrent pour tenir sur une ligne */
@media (min-width: 861px) and (max-width: 1060px) {
  .menu-titre { gap: 7px; padding: 0 10px; font-size: 11.5px; } .session.avec-menu { column-gap: 10px; }
  .session.avec-menu .reseau { font-size: 11.5px; } .session.avec-menu .lien-btn { font-size: 12px; }
}
.accueil h1 { margin-top: 34px; text-align: center; }
.accueil .connexion { margin-top: 18px; }
.carte .espace-choisi { margin: 0; font-size: 17px; color: var(--marque); }
.badge.non_commence { background: var(--doux); }
.photos-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 10px 0; }
.photos-grille > img, .photo-case img { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; border: 1px solid var(--bord); }
.photo-case { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px; min-height: 200px; padding: 10px; border: 1px dashed var(--bord-fort); border-radius: var(--rayon); background: #fcfcfc; }
.tablesaisie td:first-child .btn { display: block; margin-top: 10px; padding: 4px 8px; }
/* téléphone et tablette : la rangée des parties se place juste sous la ligne de navigation, qui y est plus haute */
@media (max-width: 1099px) and (min-height: 481px) { .sommaire { top: 46px; } }

/* ================================================================ présentation sobre
   Plus de « cartes » (boîtes arrondies, ombres, liserés épais, bloc de chiffres en couleur) : des sections à plat, séparées par de fins traits.
   Ce bloc remplace l'habillage défini plus haut ; le retirer suffit à retrouver l'ancien. */
:root { --fond: #ffffff; --rayon: 4px; --ombre: none; --filet: #e1e1e1; }
body { background: #fff; }
h1 { font-size: 25px; letter-spacing: 0; }
h1 .accent, h2 .accent { color: inherit; }
h2 { font-size: 17px; }
.carte { margin: 24px 0 0; padding: 18px 0 4px; background: transparent; border: 0; border-top: 1px solid var(--filet); border-radius: 0; box-shadow: none; }
.carte h2, .carte .espace-choisi { color: var(--noir); }
.carte.alerte, .carte.erreur, .carte.info, .carte.succes { padding: 4px 0 4px 16px; border-top: 0; border-left: 3px solid var(--rouge); }
.carte.info { border-left-color: var(--bleu); }
.carte.succes { border-left-color: var(--succes); }

/* accueil : le formulaire seul, dans une colonne étroite */
.accueil { max-width: 420px; margin: 0 auto; }
.accueil h1 { margin: 44px 0 0; text-align: left; font-size: 23px; }
.accueil .connexion { max-width: none; margin: 18px 0 0; padding-top: 18px; }
.carte .espace-choisi { margin: 0; font-size: 15px; }

/* chiffres : une rangée de nombres */
.chiffres { gap: 0; margin: 18px 0 0; padding: 14px 0; background: transparent; color: var(--noir); border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); border-radius: 0; box-shadow: none; }
.compteur { padding: 2px 18px; text-align: left; border-left: 1px solid var(--filet); }
.compteur:first-child { padding-left: 0; border-left: 0; }
.compteur b { font-size: 23px; }
.compteur span, .legende-cle { color: var(--doux); font-weight: 500; }
.cle .sync { color: var(--doux); }
.chiffres .flash { animation: eclair 1.8s ease-out; }
.chiffres .progression { background: #e4e4e4; }
.chiffres .progression > span, .progression > span { background: var(--noir); border-radius: 0; }
.progression { height: 4px; border-radius: 0; }
@media (max-width: 560px) { .compteur, .compteur:first-child { padding: 4px 0; border-left: 0; } }

/* tableaux : traits horizontaux, en-tête clair */
.tablewrap { border: 0; border-bottom: 1px solid var(--filet); border-radius: 0; box-shadow: none; }
.tablewrap thead th { background: #fff; color: var(--doux); border-bottom: 1px solid var(--noir); box-shadow: none; font-weight: 600; }
.tablewrap thead th + th, .tablewrap td + td { border-left: 0; }
.tablewrap tbody td:first-child { background: transparent; border-left: 0; }
.tablewrap tbody tr:hover td + td { background: transparent; }
.tablewrap td.calcule { background: transparent; box-shadow: none; }
.tablewrap td .saisie { background: #fff; box-shadow: none; }
.tablesaisie td:first-child { box-shadow: none; }
tr.total td { background: transparent; border-top: 1px solid var(--noir); }
.tablewrap tfoot td:first-child { border-left: 0; }
@media screen and (max-width: 720px) {
  .empile tr { border-bottom: 1px solid #bdbdbd; }
  .empile td:first-child, .empile tfoot td:first-child { background: #f6f6f6; border-left: 0; }
}

/* boutons : angles droits adoucis */
.btn, .btn.principal { border-radius: 4px; }
.btn:not(.principal):not(.danger) { border-color: #b5b5b5; }

/* parties d'un rapport */
.sommaire { border-radius: 0; box-shadow: none; }
@media (min-width: 1100px) {
  .sommaire { border-top: 1px solid var(--noir); }
  .sommaire-titre { padding: 10px 0 6px; background: transparent; color: var(--doux); font-weight: 600; }
  .sommaire li + li { border-top: 1px solid var(--filet); }
  .sommaire a { padding-left: 8px; border-left-width: 2px; }
  .sommaire a::after { display: none; }
  .sommaire a.actif { background: transparent; border-left-color: var(--noir); color: var(--noir); font-weight: 700; }
}
@media (max-width: 1099px) { .sommaire a.actif { color: var(--noir); border-bottom-color: var(--noir); } }
.section { padding: 0; }
.section > h2 { padding: 14px 0 10px; }
.rang { color: var(--noir); }
.section-corps { padding: 18px 0 22px; }
.pied-section { padding: 12px 0; }

/* liste du superviseur et sous-blocs */
.titre-liste { font-size: 18px; }
.carte-unite { padding: 14px 0 4px; border: 0; border-top: 1px solid var(--filet); border-radius: 0; }

/* fenêtres, messages */
.dialogue { border-top: 0; }

/* ================================================================ simplicité à la manière de l'INSEE : angles droits, plus de pastille, de tuile ni d'encadré à liseré */
:root { --rayon: 2px; }
.btn, .btn.principal, .dialogue, .toast { border-radius: 2px; }
.photos-grille > img, .photo-case img { border-radius: 0; }

/* statuts : le mot seul, en couleur */
.badge, .cle .badge { padding: 0; border-radius: 0; background: none; color: var(--doux); font-size: 13px; white-space: normal; }
.badge.non_commence { background: none; color: var(--doux); }
.badge.brouillon { background: none; color: var(--ambre); }
.badge.soumis { background: none; color: var(--bleu); }
.badge.rejete { background: none; color: var(--rouge); }
.badge.valide { background: none; color: var(--succes); }

/* parties d'un rapport : le numéro en simple texte ; une partie complète porte une coche */
.sommaire .num { display: block; width: auto; height: auto; min-width: 14px; font-size: 13px; }
.sommaire a { gap: 10px; }
.sommaire a.complet .num { background: none; color: var(--doux); border-radius: 0; }
.sommaire a.complet::after { content: '✓'; display: inline; margin-left: auto; color: var(--succes); font-size: 13px; font-weight: 700; }
@media (max-width: 1099px) { .sommaire a.complet::after { margin-left: 0; } }

/* compteurs : un petit tableau, intitulés sur fond gris et nombres dessous */
.chiffres.compteurs { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 0; margin: 16px 0 0; padding: 1px 0 0 1px; border: 0; }
.chiffres.compteurs .compteur, .chiffres.compteurs .compteur:first-child { display: flex; flex-direction: column-reverse; margin: -1px 0 0 -1px; padding: 0; border: 1px solid var(--bord); text-align: center; }
.chiffres.compteurs .compteur b { padding: 6px 8px; font-size: 17px; }
.chiffres.compteurs .compteur span { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; margin: 0; padding: 6px 8px; background: #efefef; border-bottom: 1px solid var(--bord); color: var(--texte); font-size: 12px; font-weight: 700; }

/* messages (renvoi, validation, erreur) : le texte seul, entre deux filets */
.carte.alerte, .carte.erreur, .carte.info, .carte.succes { padding: 14px 0 12px; border-left: 0; border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); }

/* ================================================================ habillage repris de l'INSEE, avec le rouge de l'application à la place de leur bleu :
   page centrée, titre sur un bandeau plein, intertitres soulignés d'un trait gris, tableaux quadrillés à en-tête gris, champs et boutons droits */
:root { --police: 'Open Sans', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; --noir: #414c5c; --texte: #45474a; --doux: #5f6164; --bord-fort: #8a8c8f; --filet: var(--insee-trait);
  --marge: max(clamp(16px, 2.6vw, 36px), calc((100vw - 1140px) / 2)); }
body { font-size: 15px; }
main h1:not(.cache) { margin: 12px calc(-1 * var(--marge)) 0; padding: 18px var(--marge) 20px; background: var(--marque-fonce); color: #fff; font-size: 26px; font-weight: 600; line-height: 1.25; letter-spacing: 0; text-align: left; }
main h1 .accent { color: inherit; }
@media (max-width: 560px) { main h1:not(.cache) { margin-top: 0; padding-top: 14px; padding-bottom: 16px; font-size: 20px; } }

/* intertitres : texte gris foncé, trait gris dessous */
main .carte { border-top: 0; }
main .carte > h2, main .telechargement h2, main .section > h2, main .titre-liste, main .accueil .espace-choisi {padding-bottom: 8px; border-bottom: 2px solid var(--insee-regle); color: var(--noir); font-size: 18px; font-weight: 600; }

/* page de connexion : alignée à gauche, comme les pages de l'INSEE */
main .accueil { max-width: none; margin: 0; }
main .accueil .connexion { max-width: 440px; margin: 10px 0 0; padding-top: 14px; border-top: 0; }

/* boutons : droits ; l'action principale en majuscules */
.btn { font-size: 13.5px; }
.btn.principal { font-size: 12.5px; font-weight: 700; text-transform: uppercase; }
@media (max-width: 460px) { .barre .btn.principal { font-size: 11.5px; } }

/* champs */
.saisie, .champ-sobre { border-color: var(--bord-fort); }
.saisie:disabled, .valeur-fixe { background: #f1f1f1; border-color: var(--insee-trait); }

/* tableaux : en-tête gris à texte blanc, quadrillage fin, totaux sur fond gris clair */
main .tablewrap { border-bottom: 0; }
main .tablewrap table { border-collapse: collapse; }
main .tablewrap thead th { padding: 8px; border: 1px solid var(--insee-trait); background: var(--insee-gris); color: #fff; font-size: 13px; font-weight: 600; text-align: center; }
main .tablewrap tbody td, main .tablewrap tfoot td, main .tablewrap tbody td:first-child, main .tablewrap tfoot td:first-child { border: 1px solid var(--insee-trait); }
main .tablewrap tbody td:first-child { font-weight: 700; }
main .tablewrap tr.total td { background: #f1f1f1; font-weight: 700; }
main .tablewrap.evaluation thead th, main .tablewrap.evaluation thead th:not(:first-child) { border: 1px solid var(--insee-trait); background: var(--insee-gris); color: #fff; }
main .tablewrap.evaluation tbody td:first-child { font-weight: 400; }
@media screen and (max-width: 720px) {
  /* sur téléphone, chaque ligne devient un petit tableau dont la première case sert d'en-tête */
  main .tablewrap.empile tr { margin-bottom: 14px; border: 1px solid var(--insee-trait); }
  main .tablewrap.empile tbody td, main .tablewrap.empile tfoot td { border: 0; border-top: 1px solid var(--insee-trait); }
  main .tablewrap.empile tbody td:first-child, main .tablewrap.empile tfoot td:first-child { border-top: 0; background: var(--insee-gris); color: #fff; }
}

/* chiffres de suivi : le même tableau */
.chiffres.compteurs .compteur, .chiffres.compteurs .compteur:first-child { border-color: var(--insee-trait); }
.chiffres.compteurs .compteur span { background: var(--insee-gris); border-bottom: 0; color: #fff; font-weight: 600; }
.chiffres.compteurs .compteur b { color: var(--texte); }

/* parties d'un rapport : la partie ouverte est pleine, comme la rubrique active chez l'INSEE */
@media (min-width: 1100px) {
  main .sommaire { border-top: 0; }
  main .sommaire-titre { padding: 8px 0; border-bottom: 2px solid var(--insee-regle); color: var(--noir); font-size: 12.5px; font-weight: 700; text-transform: uppercase; }
}
main .sommaire a.actif, main .sommaire a.actif:hover { background: var(--insee-barre); border-left-color: var(--insee-barre); border-bottom-color: var(--insee-barre); color: #fff; }
main .sommaire a.actif .num, main .sommaire a.actif.complet .num { color: #fff; }
main .sommaire a.actif.complet::after { color: #fff; }
main .rang { color: var(--noir); }

/* rapport de mission : tableau des départements (nom, erreurs signalées et corrigées), cases sur une ligne */
.tabledeps td { vertical-align: middle; }
.tabledeps td:first-child { padding: 8px; font-size: inherit; }
.tabledeps td .saisie { min-height: 0; height: auto; padding: 6px 8px; }
.tabledeps th:first-child, .tabledeps td:first-child { width: 34%; }
.tabledeps td:first-child .aide { display: block; margin-top: 4px; font-weight: normal; }
