/* Module Analyse : styles limités au module, aucune règle de masquage de calque. */
#liste-selecteurs.analyse-active { position:relative; }
.analyse-contour { position:absolute; pointer-events:none; border-radius:7px; padding:2px; background:linear-gradient(100deg,#3b82f6,#8b5cf6,#ef8dc5,#14b8a6,#3b82f6); background-size:300% 100%; animation:analyse-couleurs 5s linear infinite; mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite:exclude; }
@keyframes analyse-couleurs { to { background-position:300% 0; } }
.analyse-commandes { position:absolute; z-index:4; top:60px; left:56px; width:min(320px,calc(100% - 124px)); display:flex; flex-direction:column; gap:5px; }
.analyse-commandes[hidden] { display:none; }
.analyse-barre { position:relative; width:100%; min-width:0; display:flex; align-items:center; gap:8px; min-height:34px; padding:6px 10px; border:0; border-radius:10px; color:var(--texte); background:var(--surface); cursor:pointer; font-size:12px; font-weight:650; box-shadow:var(--ombre); text-align:left; }
.analyse-barre[hidden] { display:none; }
.analyse-barre::before { content:''; position:absolute; inset:0; pointer-events:none; border-radius:inherit; padding:2px; background:linear-gradient(100deg,#3b82f6,#8b5cf6,#ef8dc5,#14b8a6,#3b82f6); background-size:300% 100%; animation:analyse-couleurs 5s linear infinite; mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); mask-composite:exclude; }
.analyse-barre-icone { font-size:19px; color:var(--comp); }
.analyse-barre-libelle { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.analyse-barre-pourcent { flex:none; max-width:52%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10.5px; font-variant-numeric:tabular-nums; }
.analyse-barre.en-cours .analyse-barre-icone { animation:analyse-pulse 1.4s ease-in-out infinite; }
@keyframes analyse-pulse { 50% { opacity:.55; } }
.analyse-dialog { box-sizing:border-box; position:absolute; z-index:6; inset:var(--analyse-haut,110px) auto auto var(--analyse-gauche,56px); margin:0; width:max(var(--analyse-largeur,320px),390px); max-width:calc(100% - var(--analyse-gauche,56px) - 8px); max-height:min(72%,calc(100% - var(--analyse-haut,110px) - 12px)); padding:0; border:1px solid var(--bord); border-radius:13px; color:var(--texte); background:var(--fond); box-shadow:0 8px 32px #0003; overflow:hidden; transform-origin:top left; }
.analyse-dialog[open] { display:flex; flex-direction:column; animation:analyse-tiroir .2s ease-out both; }
@keyframes analyse-tiroir { from { opacity:0; transform:translateY(-10px) scaleY(.96); } to { opacity:1; transform:translateY(0) scaleY(1); } }
.analyse-entete { display:flex; flex:none; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; background:var(--surface); border-bottom:1px solid var(--bord); }
.analyse-entete h2 { font-size:22px; margin:5px 0 0; letter-spacing:-.7px; }
.analyse-surtitre { font-size:10px; letter-spacing:1.7px; font-weight:750; }
.analyse-fermer { background:var(--surface-2); border:1px solid var(--bord); border-radius:50%; width:36px; height:36px; font-size:25px; flex-shrink:0; cursor:pointer; }
.analyse-contenu { padding:16px; overflow:auto; overscroll-behavior:contain; min-height:0; }
.analyse-contexte { margin:0 0 10px; color:var(--texte-2); font-size:11px; }
.analyse-methode,.analyse-note { font-size:12px; color:var(--texte-2); line-height:1.6; }
.analyse-methode { margin:8px 0 12px; }
.analyse-fiche { background:var(--surface); border:1px solid var(--bord); border-radius:11px; margin-top:8px; padding:12px; }
.analyse-metres-liste { margin-top:10px; padding:10px 12px; border:1px solid #b8d9d2; border-radius:9px; background:#edf7f4; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.analyse-metres-liste strong { color:#08745f; }
.analyse-metres-liste p { margin:4px 0 0; color:var(--texte-2); }
.analyse-metres-liste .commun { color:var(--texte); font-weight:650; }
.analyse-fiche-titre { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; }
.analyse-fiche h3 { margin:0; font-size:16px; overflow-wrap:anywhere; }
.analyse-statut { border-radius:20px; background:var(--succes-doux); color:var(--succes); font-size:11px; font-weight:700; padding:5px 10px; }
.analyse-statut.attention { background:var(--accent-doux); color:var(--texte); }
.analyse-type { display:flex; flex-wrap:wrap; align-items:end; gap:9px; margin-top:9px; }
.analyse-type label { display:flex; flex-direction:column; gap:4px; color:var(--texte-2); font-size:11px; }
.analyse-type select,.analyse-type input { max-width:100%; min-width:110px; padding:5px 7px; border:1px solid var(--bord); border-radius:6px; color:var(--texte); background:var(--surface); font:inherit; }
.analyse-type input { width:100px; }
.analyse-profil { font-size:12px; color:var(--texte-2); padding:4px 9px; border:1px solid var(--bord); border-radius:999px; background:var(--surface-2); }
.analyse-complements { margin-top:10px; padding:9px 11px; border:1px solid var(--bord); border-radius:8px; background:var(--surface-2); font-size:12px; line-height:1.55; }
.analyse-complements p { margin:0; }
.analyse-complements p + p { margin-top:4px; }
.analyse-cubature { font-weight:600; color:var(--texte); }
.analyse-cubature.attention { font-weight:500; color:var(--danger); }
.analyse-fiche-corps { display:grid; grid-template-columns:1fr; gap:10px; align-items:center; margin-top:10px; }
.analyse-jauge { height:10px; margin-top:8px; background:var(--surface-2); border-radius:9px; overflow:hidden; }
.analyse-jauge > span { display:block; height:100%; background:linear-gradient(90deg,#0e9181,#54c6a3); border-radius:9px; }
.analyse-kpis { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
.analyse-indicateur:last-child { grid-column:1 / -1; padding-top:10px; border-top:1px solid var(--bord); }
.analyse-indicateur span { display:block; font-size:11px; color:var(--texte-2); }
.analyse-indicateur strong { font-size:17px; font-variant-numeric:tabular-nums; }
.analyse-indicateur.rec strong { color:#059669; }
.analyse-indicateur.exe strong { color:#3b82f6; }
.analyse-apercu { min-width:0; margin:0; padding:10px; background:var(--fond); border:1px solid var(--bord); border-radius:12px; background-image:radial-gradient(var(--bord) .8px,transparent .8px); background-size:14px 14px; }
.analyse-apercu svg { display:block; width:100%; height:auto; }
.analyse-trace { fill:none; stroke-linejoin:round; stroke-linecap:round; }
.analyse-trace.exe { stroke:#3b82f6; stroke-width:3; stroke-dasharray:7 5; }
.analyse-trace.rec { stroke:#059669; stroke-width:4; }
.analyse-zone { stroke-width:1.2; stroke-linejoin:round; }
.analyse-zone.exe { fill:rgba(59,130,246,.12); stroke:#3b82f6; stroke-dasharray:4 3; }
.analyse-zone.dessin { fill:rgba(147,51,234,.55); stroke:#6b21a8; }
.analyse-zone.points { fill:rgba(147,51,234,.22); stroke:#7e22ce; stroke-dasharray:5 3; }
.analyse-zone.exe { fill:none; }
.analyse-point { fill:#7c2d12; }
.analyse-apercu .legende-dessin { color:#6b21a8; } .analyse-apercu .legende-points { color:#7e22ce; }
.analyse-origine { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin:10px 0 0; font-size:12px; color:var(--texte-2); }
.analyse-origine .origine-surface { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:999px; color:var(--texte); border:1px solid var(--bord); background:var(--surface); }
.analyse-origine .origine-surface::before { content:""; width:12px; height:12px; border-radius:3px; flex:none; }
.analyse-origine .origine-surface.dessin::before { background:rgba(147,51,234,.6); border:1.5px solid #6b21a8; }
.analyse-origine .origine-surface.points::before { border:1.5px dashed #7e22ce; background:repeating-linear-gradient(135deg, rgba(147,51,234,.18) 0 3px, rgba(126,34,206,.9) 3px 4.5px); }
.analyse-legende-carte { position:absolute; z-index:7; right:64px; bottom:34px; display:flex; flex-direction:column; gap:5px; max-width:min(360px, calc(100% - 24px)); padding:10px 12px; background:var(--surface); color:var(--texte); border:1px solid var(--bord); border-radius:12px; box-shadow:0 6px 18px rgba(0,0,0,.18); font-size:12px; }
.analyse-legende-carte[hidden] { display:none; }
.analyse-legende-carte strong { font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:var(--texte-2); }
.analyse-legende-carte .legende-ligne { display:flex; align-items:center; gap:8px; }
.analyse-legende-carte .legende-selecteur { margin-top:3px; font-weight:600; font-size:12px; }
.analyse-legende-carte i { width:18px; height:12px; border-radius:3px; flex:none; }
.analyse-legende-carte .dessin i { background:rgba(147,51,234,.6); border:2px solid #6b21a8; }
.analyse-legende-carte .points i { border:2px dashed #7e22ce; background:repeating-linear-gradient(135deg, rgba(147,51,234,.18) 0 3px, rgba(126,34,206,.9) 3px 4.5px); }
.analyse-legende-carte .exe i { border:2px dashed #1d4ed8; }
.analyse-legende-carte .rec i { border-bottom:4px solid #059669; height:6px; }
@media (max-width:760px) { .analyse-legende-carte { right:auto; left:12px; bottom:auto; top:64px; font-size:11px; } }
.analyse-apercu figcaption { display:flex; flex-wrap:wrap; justify-content:center; gap:15px; font-size:11px; padding:4px 0; }
.analyse-apercu .exe { color:#3b82f6; } .analyse-apercu .rec { color:#059669; }
.analyse-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; padding:10px 0; }
.analyse-actions button,.analyse-contenu > button { border:1px solid var(--bord); background:var(--surface-2); border-radius:8px; padding:8px 12px; cursor:pointer; font-weight:650; }
.analyse-actions .analyse-document { color:#08745f; background:#e9f6f1; border-color:#a9ddce; }
.analyse-actions .analyse-document:disabled { color:var(--texte-2); background:var(--surface-2); }
.analyse-export-etat { flex-basis:100%; color:var(--texte-2); }
.analyse-actions small { font-size:11px; color:var(--texte-2); }
.analyse-alertes,.analyse-alerte { padding:12px 12px 12px 28px; background:var(--accent-doux); font-size:12px; border-radius:8px; overflow-wrap:anywhere; }
.analyse-alertes li + li { margin-top:5px; }
.analyse-details { border-top:1px solid var(--bord); padding-top:12px; font-size:12px; }
.analyse-details summary { cursor:pointer; font-weight:650; padding:2px 0; }
.analyse-filtre { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:16px; }
.analyse-filtre input,.analyse-source select { border:1px solid var(--bord); border-radius:6px; background:var(--surface); padding:6px 8px; min-width:0; max-width:100%; }
.analyse-source { display:flex; gap:15px; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid var(--bord); }
.analyse-source > div { min-width:0; overflow-wrap:anywhere; }
.analyse-source small { display:block; margin-top:3px; color:var(--texte-2); }
.analyse-source label { flex-shrink:0; display:flex; flex-direction:column; gap:3px; }
.analyse-table { border-collapse:collapse; width:100%; margin-top:14px; table-layout:fixed; }
.analyse-table th,.analyse-table td { padding:8px 4px; border-bottom:1px solid var(--bord); text-align:right; overflow-wrap:anywhere; }
.analyse-table th:first-child,.analyse-table td:first-child { text-align:left; width:34%; }
.analyse-attente { padding:50px 20px; text-align:center; color:var(--texte-2); }
.analyse-quitter { position:absolute; z-index:7; left:12px; bottom:85px; background:var(--surface); color:var(--texte); border:1px solid var(--bord); border-radius:24px; padding:10px 18px; box-shadow:var(--ombre); cursor:pointer; white-space:nowrap; }
.analyse-dialog button:focus-visible,.analyse-dialog input:focus-visible,.analyse-dialog select:focus-visible,.analyse-dialog summary:focus-visible,.analyse-barre:focus-visible { outline:3px solid #3b82f6; outline-offset:3px; }
.analyse-dialog button:disabled { cursor:default; opacity:.5; }
/* Fiche : pourcentage en tête, une ligne par mesure, pastilles « comment c'est compté ». */
.analyse-tete { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; }
.analyse-tete-pct { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.analyse-tete-pct strong { font-size:34px; line-height:1; font-weight:780; letter-spacing:-1px; font-variant-numeric:tabular-nums; color:#0b806b; }
.analyse-tete-info { display:flex; flex-direction:column; align-items:flex-end; gap:2px; font-size:11px; color:var(--texte-2); text-align:right; }
.analyse-statut.ok { background:var(--succes-doux); color:var(--succes); }
.analyse-statut:not(.ok):not(.attention) { background:var(--surface-2); color:var(--texte-2); }
.analyse-jauge.depasse > span, .analyse-mesure-barre.depasse > span { background:linear-gradient(90deg,#d97706,#f59e0b); }
.analyse-mesures { list-style:none; margin:12px 0 0; padding:0; display:grid; gap:10px; }
.analyse-mesure { padding:9px 10px; border:1px solid var(--bord); border-radius:9px; background:var(--fond); }
.analyse-mesure-haut { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.analyse-mesure-nom { font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--texte-2); min-width:62px; }
.analyse-mesure-valeurs { flex:1; font-size:13px; font-variant-numeric:tabular-nums; color:var(--texte-2); }
.analyse-mesure-valeurs .rec { color:#059669; font-size:15px; }
.analyse-mesure-valeurs .exe { color:#2563eb; }
.analyse-mesure-pct { font-size:14px; font-variant-numeric:tabular-nums; }
.analyse-mesure-barre { height:5px; margin-top:6px; border-radius:5px; background:var(--surface-2); overflow:hidden; }
.analyse-mesure-barre > span { display:block; height:100%; border-radius:5px; background:linear-gradient(90deg,#0e9181,#54c6a3); }
.analyse-mesure.volume .analyse-mesure-barre > span { background:linear-gradient(90deg,#7c3aed,#a78bfa); }
.analyse-mesure-detail { display:block; margin-top:6px; font-size:11px; line-height:1.45; color:var(--texte-2); }
.analyse-mesure.attention .analyse-mesure-detail { color:var(--danger); }
.analyse-mesures-legende { margin:5px 2px 0; font-size:10.5px; color:var(--texte-2); text-align:right; }
.analyse-mesures-legende .rec { color:#059669; } .analyse-mesures-legende .exe { color:#2563eb; }
.analyse-methode-pastilles { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0 2px; }
.analyse-pastille { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:999px; border:1px solid var(--bord); background:var(--surface); font-size:11.5px; line-height:1.4; color:var(--texte); }
.analyse-pastille::before { content:""; width:11px; height:11px; border-radius:3px; flex:none; }
.analyse-pastille.profil { color:var(--texte-2); background:var(--surface-2); } .analyse-pastille.profil::before { display:none; }
.analyse-pastille.dessin::before { background:rgba(147,51,234,.6); border:1.5px solid #6b21a8; }
.analyse-pastille.points::before { border:1.5px dashed #7e22ce; background:repeating-linear-gradient(135deg, rgba(147,51,234,.18) 0 3px, rgba(126,34,206,.9) 3px 4.5px); }
.analyse-pastille.ilots { color:#6b21a8; background:#f3e8ff; border-color:#e9d5ff; } .analyse-pastille.ilots::before { border:2px solid #6b21a8; border-radius:50%; background:radial-gradient(circle, #fff 0 35%, transparent 36%), rgba(147,51,234,.5); }
.analyse-pastille.imbriques { color:var(--texte-2); border-style:dashed; } .analyse-pastille.imbriques::before { border:1.5px solid var(--texte-2); box-shadow:inset 0 0 0 2px var(--surface), inset 0 0 0 3.5px var(--texte-2); }
.analyse-fiche > .analyse-apercu { margin-top:12px; }
.analyse-actions { padding:10px 0 4px; justify-content:flex-start; }
.analyse-actions .analyse-voir { color:#fff; background:#2563eb; border-color:#2563eb; }
.analyse-remarques { margin-top:6px; font-size:12px; }
.analyse-remarques > summary { cursor:pointer; color:#92400e; font-weight:650; padding:4px 0; }
.analyse-remarques .analyse-alertes { margin:6px 0 4px; }
@media(max-width:760px) {
  .analyse-dialog { width:var(--analyse-largeur,calc(100% - 12px)); max-width:calc(100% - var(--analyse-gauche,6px) - 6px); max-height:min(46%,calc(100% - var(--analyse-haut,110px) - 12px)); border-radius:12px; }
  .analyse-entete { padding:12px; } .analyse-entete h2 { font-size:17px; }
  .analyse-contenu { padding:10px; } .analyse-fiche { padding:10px; }
  .analyse-fiche-corps { grid-template-columns:1fr; gap:10px; }
  .analyse-source { flex-direction:column; align-items:stretch; gap:6px; }
  .analyse-quitter { bottom:12px; font-size:11px; padding:7px 10px; }
  .analyse-mesure-valeurs { order:3; flex-basis:100%; }
  .analyse-mesure-nom { flex:1; }
  .analyse-tete-pct strong { font-size:28px; }
  /* La légende de carte recouvrirait la barre d'analyse : masquée tant que la fiche est ouverte. */
  .analyse-dialog[open] ~ .analyse-legende-carte { display:none; }
}
@media(prefers-reduced-motion:reduce) { .analyse-contour,.analyse-barre::before,.analyse-barre.en-cours .analyse-barre-icone { animation:none; } .analyse-dialog[open] { animation:none; } }
