:root {
  --fond: #f3f5f8; --carte: #ffffff; --texte: #1b2430; --discret: #5f6b7a; --bord: #dde3ea; --bord-fort: #c6d0db;
  --marque: #1d4470; --marque-clair: #e7eef7; --accent: #0b6bcb; --accent-clair: #e6f1fc;
  --tete: #16212e; --tete-texte: #e8eef5; --nav: #ffffff; --survol: #f1f5f9;
  --erreur: #b3261e; --ok: #1e6b3a; --ombre: 0 8px 24px rgba(16, 24, 40, .12);
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; font-size: 14px;
  color: var(--texte); background: var(--fond);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--fond); }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1 { font-size: 1.35rem; margin: 0; font-weight: 650; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
h3 { font-size: .8rem; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .05em; color: var(--discret); }
label { display: block; font-size: .82rem; color: var(--discret); margin: 12px 0 4px; }
input, select { width: 100%; padding: 8px 10px; border: 1px solid var(--bord-fort); border-radius: 6px; background: #fff; }
input:focus, select:focus { outline: 2px solid var(--accent-clair); border-color: var(--accent); }
button { cursor: pointer; border: 1px solid var(--bord-fort); background: #fff; border-radius: 6px; padding: 7px 13px; }
button:hover { background: var(--survol); }
button.principal { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
button.principal:hover { background: #095aab; }
button.danger { color: var(--erreur); border-color: #e7b7b3; }
button.large { width: 100%; margin-top: 16px; padding: 10px; }
button.lien { border: 0; background: none; color: var(--accent); padding: 0; }
button.lien:hover { text-decoration: underline; background: none; }
button.icone { border: 0; background: none; color: inherit; padding: 6px 8px; }
.message { min-height: 1.2em; font-size: .88rem; color: var(--ok); margin: 10px 0 0; }
.message.erreur { color: var(--erreur); }
.discret { color: var(--discret); font-size: .86rem; }
.pastille { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--marque-clair); color: var(--marque); white-space: nowrap; font-weight: 600; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 18px; }
.marque { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.logo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--marque); color: #fff; font-weight: 700; }
.marque.grande { font-size: 1.1rem; margin-bottom: 18px; }
.marque em { font-style: normal; font-weight: 300; opacity: .8; }

/* ---------- connexion */
.ecran-connexion { min-height: 100%; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, #16212e 0%, #1d4470 60%, #245a91 100%); }
.etroite { width: 100%; max-width: 410px; box-shadow: var(--ombre); }
.liens-connexion { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 0; }

/* ---------- application */
#app { height: 100%; display: flex; flex-direction: column; }
.entete { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 14px; background: var(--tete); color: var(--tete-texte); flex: 0 0 auto; }
.entete .logo { background: #fff; color: var(--tete); }
.nom-app { font-weight: 650; }
.choix-espace { display: flex; align-items: center; gap: 8px; }
.choix-espace select { width: auto; min-width: 180px; max-width: 260px; background: #223246; color: #fff; border-color: #33475e; }
.choix-espace .pastille { background: #2c4460; color: #cfe0f3; }
.recherche-globale { flex: 1; max-width: 520px; margin-left: auto; }
.recherche-globale input { background: #223246; border-color: #33475e; color: #fff; padding-left: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239fb3c8' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px center; }
.recherche-globale input::placeholder { color: #9fb3c8; }
.compte { position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-weight: 700; padding: 0; }
.avatar:hover { background: #095aab; }
.menu { position: absolute; right: 0; top: 42px; background: #fff; color: var(--texte); border: 1px solid var(--bord); border-radius: 8px; box-shadow: var(--ombre); min-width: 230px; z-index: 30; padding: 6px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; border-radius: 5px; padding: 8px 10px; }
.menu-tete { padding: 8px 10px 10px; border-bottom: 1px solid var(--bord); margin-bottom: 6px; font-size: .85rem; color: var(--discret); overflow: hidden; text-overflow: ellipsis; }
#bascule-nav { display: none; font-size: 18px; }

.corps { flex: 1; display: flex; min-height: 0; }
.nav { position: relative; width: var(--largeur-nav, 220px); flex: 0 0 auto; transition: width .15s; background: var(--nav); border-right: 1px solid var(--bord); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px; color: var(--texte); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--survol); }
.nav a.actif { background: var(--accent-clair); color: var(--accent); font-weight: 650; }
.nav .ic { width: 18px; text-align: center; opacity: .85; }
.nav-bas { margin-top: 18px; border-top: 1px solid var(--bord); padding-top: 12px; }
.nav-sites-titre { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); padding: 0 12px 6px; }
#nav-sites button { display: flex; justify-content: space-between; width: 100%; text-align: left; border: 0; padding: 7px 12px; border-radius: 6px; background: none; font-size: .9rem; }
#nav-sites button:hover { background: var(--survol); }
#nav-sites button.actif { background: var(--accent-clair); color: var(--accent); font-weight: 600; }
#nav-sites .nb { color: var(--discret); font-size: .8rem; }

main#contenu { flex: 1; overflow: auto; min-width: 0; }
.page { padding: 22px 26px 40px; }
.barre-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.actions-page { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions-page select { width: auto; }
.fil { color: var(--discret); font-size: .85rem; margin-top: 3px; }
.segmente { display: inline-flex; border: 1px solid var(--bord-fort); border-radius: 6px; overflow: hidden; }
.segmente button { border: 0; border-radius: 0; padding: 7px 11px; }
.segmente button.actif { background: var(--accent-clair); color: var(--accent); }

/* ---------- plans : grille et liste, regroupés par site */
.groupe { margin-bottom: 26px; }
.groupe-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer; user-select: none; }
.groupe-tete h2 { margin: 0; font-size: 1rem; }
.groupe-tete .nb { color: var(--discret); font-size: .85rem; }
.groupe-tete .fleche { transition: transform .15s; color: var(--discret); }
.groupe.replie .fleche { transform: rotate(-90deg); }
.groupe.replie .groupe-corps { display: none; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.vignette-carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; cursor: pointer; transition: box-shadow .15s, border-color .15s; display: flex; flex-direction: column; }
.vignette-carte:hover { box-shadow: var(--ombre); border-color: var(--bord-fort); }
.vignette-carte.choisi { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-clair); }
.apercu { aspect-ratio: 4 / 3; background: #f8fafc; border-bottom: 1px solid var(--bord); display: grid; place-items: center; overflow: hidden; }
.apercu svg { width: 100%; height: 100%; display: block; }
.apercu .sans { color: #9aa7b6; font-size: 2rem; }
.vc-corps { padding: 10px 12px 12px; }
.vc-titre { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.vc-titre .version { margin-left: auto; }
.vc-meta { color: var(--discret); font-size: .8rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version { font-size: .72rem; font-weight: 700; color: var(--accent); background: var(--accent-clair); border-radius: 4px; padding: 1px 6px; }
.tableau { width: 100%; border-collapse: collapse; background: var(--carte); }
.tableau th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--discret); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--bord); background: #fafbfc; }
.tableau td { padding: 9px 12px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.tableau tbody tr:hover { background: var(--survol); }
.tableau tr.choisi { background: var(--accent-clair); }
.liste-plans-table { border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; }
.mini { width: 54px; height: 40px; border: 1px solid var(--bord); border-radius: 4px; background: #f8fafc; overflow: hidden; }
.mini svg { width: 100%; height: 100%; display: block; }
.cellule-nom { display: flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.vide-etat { text-align: center; padding: 60px 20px; color: var(--discret); }
.vide-ic { font-size: 3rem; opacity: .4; }
.vide-etat h2 { color: var(--texte); }

/* ---------- panneau de détails */
.details { width: 340px; flex: 0 0 auto; background: var(--carte); border-left: 1px solid var(--bord); overflow: auto; padding: 16px 18px 24px; }
.details-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.details-tete h2 { margin: 4px 0 12px; }
.details-vignette { border: 1px solid var(--bord); border-radius: 8px; aspect-ratio: 4 / 3; overflow: hidden; background: #f8fafc; }
.details-vignette svg { width: 100%; height: 100%; display: block; }
.details-actions { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.infos { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; margin: 8px 0; font-size: .88rem; }
.infos dt { color: var(--discret); }
.infos dd { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.versions { list-style: none; padding: 0; margin: 0 0 16px; }
.versions li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--bord); cursor: pointer; border-radius: 5px; }
.versions li:hover { background: var(--survol); }
.versions .qui { color: var(--discret); font-size: .8rem; }
.versions .courante { font-size: .7rem; color: var(--ok); font-weight: 700; }

/* ---------- activité, membres */
.fil-activite { max-width: 760px; }
.evt { display: flex; gap: 12px; padding: 12px 14px; background: var(--carte); border: 1px solid var(--bord); border-radius: 9px; margin-bottom: 8px; cursor: pointer; }
.evt:hover { border-color: var(--bord-fort); }
.evt .puce { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-clair); color: var(--accent); flex: 0 0 auto; font-weight: 700; }
.evt .puce.annot { background: #fdecea; color: #b3261e; }
.evt .quand { color: var(--discret); font-size: .8rem; }
.deux-colonnes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.liste-simple { list-style: none; padding: 0; margin: 0; }
.liste-simple li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--bord); font-size: .9rem; }
.liste-simple li span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* ---------- visionneuse */
.visionneuse { position: fixed; inset: 0; background: var(--fond); z-index: 20; display: flex; flex-direction: column; }
.vis-barre { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 12px; background: var(--tete); color: var(--tete-texte); flex: 0 0 auto; }
.vis-barre button { background: #223246; border-color: #33475e; color: #fff; }
.vis-barre button:hover { background: #2c4460; }
.vis-barre button.actif { background: var(--accent); border-color: var(--accent); }
.vis-titre { min-width: 0; flex: 1; }
.vis-titre .fil { color: #9fb3c8; margin: 0; font-size: .78rem; }
.vis-titre strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#vis-version { width: auto; background: #223246; color: #fff; border-color: #33475e; }
.vis-actions { display: flex; gap: 6px; }
.compteur { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: var(--tete); font-size: .72rem; font-weight: 700; margin-left: 4px; }
.bandeau-licence { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 9px 20px; font-size: .9rem; border-bottom: 1px solid #f0d9a8; background: #fff4e0; color: #6b4200; }
.bandeau-licence.fini { background: #fdecec; border-color: #f3c1c1; color: #8a1c1c; }
.bandeau-licence a { font-weight: 650; color: inherit; }
.bandeau-licence .jours { font-weight: 700; }
.demarrer { max-width: 620px; margin: 18px auto 0; text-align: left; color: var(--texte); }
.demarrer ol { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 12px; }
.demarrer li { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--bord, #e2e8f0); border-radius: 10px; padding: 14px 16px; }
.demarrer .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #e8500a; color: #fff; font-weight: 700; display: grid; place-items: center; }
.demarrer .bouton-principal { display: inline-block; margin-top: 8px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 650; padding: 8px 14px; border-radius: 8px; }
.bandeau { background: #fff4e0; color: #7a4b00; padding: 7px 14px; font-size: .88rem; border-bottom: 1px solid #f0d9a8; }
.bandeau button { margin-left: 10px; padding: 3px 9px; }
.vis-corps { flex: 1; display: flex; min-height: 0; }
.vis-cadre { flex: 1; position: relative; background: #fff; }
.vis-cadre iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.chargement { position: absolute; inset: 0; display: grid; place-items: center; color: var(--discret); background: #fff; }
.panneau-annot { width: 320px; flex: 0 0 auto; border-left: 1px solid var(--bord); background: var(--carte); display: flex; flex-direction: column; min-height: 0; }
.pa-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 4px; }
.pa-tete h3 { margin: 0; }
.pa-tete select { width: auto; padding: 4px 8px; font-size: .85rem; }
.pa-aide { padding: 0 14px; margin: 4px 0 8px; }
.pa-liste { list-style: none; margin: 0; padding: 0 8px 16px; overflow: auto; flex: 1; }
.pa-liste li { padding: 9px 10px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; }
.pa-liste li:hover { background: var(--survol); border-color: var(--bord); }
.pa-liste .l1 { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.pa-liste .puce-c { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.pa-liste .l2 { color: var(--discret); font-size: .8rem; margin-top: 2px; }
.pa-liste .l3 { font-size: .86rem; margin-top: 3px; white-space: pre-wrap; }
.pa-liste .suppr { margin-left: auto; border: 0; background: none; color: var(--discret); padding: 0 4px; }
.pa-liste .suppr:hover { color: var(--erreur); }

/* ---------- fenêtres, notifications */
.dlg { border: 0; border-radius: 12px; padding: 22px; width: min(460px, 94vw); box-shadow: var(--ombre); }
.dlg::backdrop { background: rgba(16, 24, 40, .45); }
.dlg-boutons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--tete); color: #fff; padding: 10px 18px; border-radius: 8px; box-shadow: var(--ombre); z-index: 50; font-size: .9rem; }

/* ---------- téléphone et tablette */
@media (max-width: 900px) {
  .details { position: fixed; right: 0; top: 52px; bottom: 0; z-index: 15; box-shadow: var(--ombre); width: min(360px, 92vw); }
  .panneau-annot { position: absolute; right: 0; top: 0; bottom: 0; z-index: 5; box-shadow: var(--ombre); }
  .vis-corps { position: relative; }
  .deux-colonnes { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  #bascule-nav { display: block; }
  .nav { position: fixed; left: 0; top: 52px; bottom: 0; z-index: 16; box-shadow: var(--ombre); transform: translateX(-105%); transition: transform .2s; }
  .nav.ouvert { transform: none; }
  .recherche-globale { display: none; }
  .choix-espace select { min-width: 0; max-width: 150px; }
  .choix-espace .pastille, .nom-app em { display: none; }
  .page { padding: 16px; }
  .vis-titre .fil, #vis-lien, #vis-plein { display: none; }
  .tableau .opt { display: none; }
}
.versions .suppr-version { margin-left: auto; border: 0; background: none; color: var(--discret); padding: 2px 6px; }
.versions .suppr-version:hover { color: var(--erreur); background: #fdecea; }

/* ---------- hiérarchie en poupées russes : bâtiments dans la navigation, métiers */
#nav-sites .nom { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav-sites .fleche { color: var(--discret); font-size: .75rem; transition: transform .15s; }
#nav-sites button.ouvert .fleche { transform: rotate(90deg); }
#nav-sites button.sous { padding-left: 30px; font-size: .86rem; }
#nav-sites button.sous[hidden] { display: none; }
.metier { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 650; padding: 1px 8px; border-radius: 999px; white-space: nowrap;
  color: var(--m); background: color-mix(in srgb, var(--m) 12%, white); border: 1px solid color-mix(in srgb, var(--m) 30%, white); }
.apercu { position: relative; }
.apercu .metier { position: absolute; top: 8px; left: 8px; }
.vignette-carte { border-top: 3px solid var(--m, var(--bord)); }
.point { width: 9px; height: 9px; border-radius: 50%; background: var(--m); flex: 0 0 auto; display: inline-block; }
.puces-metiers { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.puce-filtre { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--bord); background: var(--carte); border-radius: 999px; padding: 5px 12px; font-size: .85rem; }
.puce-filtre .nb { color: var(--discret); font-size: .78rem; }
.puce-filtre:hover { background: var(--survol); }
.puce-filtre.actif { border-color: var(--m, var(--accent)); background: color-mix(in srgb, var(--m, var(--accent)) 10%, white); font-weight: 600; }
.sous-groupe { margin: 0 0 18px; }
.sous-groupe-tete { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; padding-left: 2px; }
.sous-groupe-tete h3 { margin: 0; font-size: .9rem; color: var(--discret); font-weight: 650; }
.sous-groupe-tete .nb { color: var(--discret); font-size: .8rem; }
.vis-titre .fil a { color: inherit; text-decoration: none; opacity: .8; }
.vis-titre .fil a:hover { text-decoration: underline; opacity: 1; }
.vis-metiers { display: flex; align-items: flex-end; gap: 2px; padding: 6px 12px 0; background: #1d2a3a; flex: 0 0 auto; overflow-x: auto; }
.vis-metiers[hidden] { display: none; }
.onglet-metier { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 6px 6px 0 0; padding: 7px 14px; background: #26384d; color: #c9d6e4; font-size: .86rem; white-space: nowrap; }
.onglet-metier:hover { background: #2e4560; color: #fff; }
.onglet-metier.actif { background: #f3f5f8; color: var(--texte); font-weight: 650; box-shadow: inset 0 3px 0 var(--m); }
.onglet-metier .version { font-size: .68rem; }
.vis-metiers .aide { color: #93a5b8; font-size: .78rem; padding: 0 0 8px 12px; white-space: nowrap; }
#details-classer { display: block; margin: 4px 0 14px; font-size: .86rem; text-align: left; }
#details-classer[hidden] { display: none; }
.onglet-metier.calcule { background: transparent; border: 1px dashed #4a627d; border-bottom: 0; }
.onglet-metier.calcule.actif { background: #f3f5f8; border-style: solid; border-color: transparent; }
.onglet-metier .nb { font-size: .7rem; opacity: .75; }

/* ---------- dossiers et documents */
.fil-liens a { color: inherit; text-decoration: none; }
.fil-liens a:hover { text-decoration: underline; }
#page-dossiers { position: relative; min-height: 70vh; }
.ligne-dossier .cellule-nom { font-weight: 600; }
.ic-dossier { width: 34px; text-align: center; font-size: 1.25rem; }
.ic-doc { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 24px; border-radius: 4px; font-size: .62rem; font-weight: 800;
  letter-spacing: .02em; color: #fff; background: #7b8794; flex: 0 0 auto; }
.ic-doc.pdf { background: #c62828; } .ic-doc.dwg { background: #1d4470; } .ic-doc.doc { background: #2a5bd7; } .ic-doc.xls { background: #1e7b43; }
.ic-doc.ppt { background: #c4501b; } .ic-doc.img { background: #7b3fa0; } .ic-doc.zip { background: #6d5a2b; } .ic-doc.plan { background: var(--accent); }
.envois { background: var(--carte); border: 1px solid var(--bord); border-radius: 8px; padding: 8px 12px; margin: 0 0 14px; font-size: .86rem; }
.envoi { display: flex; gap: 12px; align-items: center; padding: 4px 0; }
.envoi .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.envoi .poids { color: var(--discret); }
.envoi.ok .etat { color: var(--ok); } .envoi.echec .etat { color: var(--erreur); }
.glisser { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11, 107, 203, .08); border: 2px dashed var(--accent);
  border-radius: 12px; color: var(--accent); font-weight: 650; font-size: 1.05rem; pointer-events: none; }
.glisser[hidden] { display: none; }
.dd-apercu { border: 1px solid var(--bord); border-radius: 8px; background: #f8fafc; min-height: 140px; display: grid; place-items: center; overflow: hidden; }
.dd-apercu img { max-width: 100%; max-height: 360px; display: block; }
.dd-apercu iframe { width: 100%; height: 380px; border: 0; background: #fff; }
.dd-apercu .sans-apercu { color: var(--discret); font-size: .86rem; padding: 18px; text-align: center; }
.apercu-texte { margin: 0; padding: 10px; width: 100%; max-height: 360px; overflow: auto; font-size: .78rem; white-space: pre-wrap; }
fieldset.acces { border: 1px solid var(--bord); border-radius: 8px; margin: 14px 0 0; padding: 8px 12px 10px; }
fieldset.acces legend { font-size: .82rem; color: var(--discret); padding: 0 4px; }
label.radio { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--texte); font-size: .92rem; }
label.radio input, label.personne input { width: auto; }
.personnes { max-height: 180px; overflow: auto; border-top: 1px solid var(--bord); margin-top: 6px; padding-top: 6px; }
label.personne { display: flex; align-items: center; gap: 8px; margin: 4px 0; color: var(--texte); font-size: .88rem; }
label.personne span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dlg-boutons .gauche { margin-right: auto; }
.pa-liste .suppr + .suppr { margin-left: 0; }
.evt .puce.doc { background: #e8f3ec; color: var(--ok); }

/* ---------- sélection de plans, arbre des dossiers, déplacements */
.coche-plan { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.cellule-nom .coche-plan { position: static; width: 16px; height: 16px; flex: 0 0 auto; }
.vignette-carte.coche { outline: 2px solid var(--accent); outline-offset: -2px; }
.tableau tr.coche { background: var(--accent-clair); }
.barre-selection { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--accent-clair); border: 1px solid #b8d6f5; border-radius: 8px; padding: 8px 12px; margin: -4px 0 16px; position: sticky; top: 0; z-index: 3; }
.barre-selection[hidden] { display: none; }
.barre-selection #selection-nb { font-weight: 650; color: var(--accent); margin-right: 6px; }
.details-dossiers { margin: -6px 0 12px; font-size: .84rem; }
.details-dossiers a { color: var(--accent); }
#details-dossier { display: block; margin: 0 0 10px; font-size: .86rem; text-align: left; }
#details-dossier[hidden] { display: none; }
.arbre-dossiers { max-height: 320px; overflow: auto; border: 1px solid var(--bord); border-radius: 8px; padding: 4px; margin: 10px 0 8px; }
.arbre-dossiers .noeud { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; border-radius: 6px; padding: 7px 10px; font-size: .9rem; }
.arbre-dossiers .noeud:hover:not(:disabled) { background: var(--survol); }
.arbre-dossiers .noeud.choisi { background: var(--accent-clair); color: var(--accent); font-weight: 650; }
.arbre-dossiers .noeud:disabled { opacity: .45; cursor: not-allowed; }
.actions-ligne { width: 40px; text-align: right; }
.actions-ligne button { border: 0; background: none; color: var(--discret); padding: 2px 8px; border-radius: 5px; font-size: 1rem; }
.actions-ligne button:hover { background: var(--accent-clair); color: var(--accent); }
.actions-ligne { width: 72px; white-space: nowrap; }
.actions-ligne button[title^="Retirer"]:hover { background: #fdecea; color: var(--erreur); }
.barre-selection .danger { margin-left: auto; }

/* ---------- menu réduit (barre d'icônes) ou élargi à la souris */
.nav .lib { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav.redim { transition: none; user-select: none; }
.nav { overflow-x: hidden; overflow-y: auto; }
.reduire-nav { margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--discret); padding: 9px 12px; border-radius: 7px; font-size: .86rem; text-align: left; }
.reduire-nav:hover { background: var(--survol); color: var(--texte); }
.poignee-nav { position: absolute; top: 0; right: 0; width: 5px; height: 100%; cursor: col-resize; z-index: 2; }
.poignee-nav:hover, .nav.redim .poignee-nav { background: var(--accent); opacity: .35; }
.nav.reduit { width: 58px; padding: 12px 6px; }
.nav.reduit .lib, .nav.reduit .nav-bas { display: none; }
.nav.reduit a, .nav.reduit .reduire-nav { justify-content: center; padding: 10px 0; gap: 0; }
.nav.reduit .ic { width: auto; font-size: 1.1rem; }
.nav.reduit .poignee-nav { display: none; }
/* noms de sites et de bâtiments longs : coupés proprement, nom complet au survol */
#nav-sites button > .nom { flex: 1; min-width: 0; }
#nav-sites .nom > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav-sites .nb { flex: 0 0 auto; margin-left: 8px; }
@media (max-width: 720px) {
  .reduire-nav, .poignee-nav { display: none; }
  .nav, .nav.reduit { width: 240px; padding: 12px 8px; }
  .nav.reduit .lib { display: inline; }
  .nav.reduit .nav-bas { display: block; }
  .nav.reduit a { justify-content: flex-start; padding: 9px 12px; gap: 10px; }
}
.essai-connexion { margin-top: 14px; text-align: center; font-size: .85rem; }
.essai-connexion a { color: var(--accent); font-weight: 600; }
