/* 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; }
.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: center; }

/* ---------------------------------------------------------------- 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: 8px; }
.titre-liste { font-size: 26px; color: var(--noir); margin: 8px 0 4px; letter-spacing: -.01em; }
.carte.resultat { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: center; cursor: pointer; border-bottom-color: var(--bord); transition: border-bottom-color .2s, box-shadow .2s; }
.carte.resultat:hover, .carte.resultat:focus-visible { border-bottom-color: var(--marque); box-shadow: 0 10px 28px rgba(26,26,26,.14); outline: none; }
.resultat-titre { margin: 0 0 8px; font-size: 20px; color: var(--marque); }
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
@media (max-width: 560px) { .carte.resultat { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- 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; }
