/* Explorateur de comptages : gabarit clair du prototype. */
#vue-travail.exp {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #f8fafc;
  color: #0f172a;
  font-family: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
}
#vue-travail.exp[hidden] { display: none !important; }

.exp-ico { width: 1rem; height: 1rem; flex: none; }
.exp-ico--sm { width: 0.85rem; height: 0.85rem; }

.exp-aside {
  width: 20rem;
  flex: none;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  z-index: 2;
}
.exp-aside__corps { flex: 1; overflow: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.35rem; }
.exp-marque { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.exp-marque strong { color: #4f46e5; font-weight: 800; }
.exp-pastille {
  width: 2rem; height: 2rem; border-radius: 0.6rem; background: #4f46e5; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}
.exp-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #94a3b8; }
.exp-bascule { position: relative; display: flex; padding: 0.25rem; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 0.75rem; }
.exp-bascule__pilule {
  position: absolute; top: 0.25rem; bottom: 0.25rem; left: 0.25rem; width: calc(50% - 0.25rem);
  background: #fff; border-radius: 0.55rem; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease;
}
.exp-bascule.is-articles .exp-bascule__pilule { transform: translateX(100%); }
.exp-bascule button {
  position: relative; z-index: 1; flex: 1; border: 0; background: transparent; cursor: pointer;
  padding: 0.45rem 0.2rem; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: #94a3b8; display: flex; align-items: center; justify-content: center; gap: 0.3rem;
}
.exp-bascule button.is-on { color: #4f46e5; }
.exp-recherche { position: relative; }
.exp-recherche .exp-ico { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.exp-recherche input, .exp-select {
  width: 100%; border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 0.75rem;
  padding: 0.55rem 0.8rem; font-size: 0.85rem; outline: none;
}
.exp-recherche input { padding-left: 2.1rem; }
.exp-recherche input:focus, .exp-select:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }
.exp-tags { display: flex; flex-direction: column; gap: 0.45rem; }
.exp-tag {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.45rem 0.7rem; border-radius: 0.6rem; border: 1px solid #e2e8f0; background: #f8fafc;
  color: #475569; font-size: 0.75rem; font-weight: 700; cursor: pointer; text-align: left;
}
.exp-tag span { display: flex; align-items: center; gap: 0.4rem; }
.exp-tag.is-on { border-color: #6366f1; background: #eef2ff; color: #4338ca; }
.exp-tag i { width: 0.7rem; height: 0.7rem; border-radius: 999px; border: 1px solid #cbd5e1; flex: none; }
.exp-tag.is-on i { background: #6366f1; border-color: #6366f1; }
.exp-bloc-titre { display: flex; align-items: center; justify-content: space-between; }
.exp-tout { border: 0; background: none; color: #4f46e5; font-size: 0.68rem; font-weight: 700; cursor: pointer; }
.exp-liste { max-height: 9.5rem; overflow: auto; display: flex; flex-direction: column; gap: 0.15rem; }
.exp-coche { display: flex; align-items: center; gap: 0.55rem; padding: 0.25rem 0.3rem; border-radius: 0.45rem; cursor: pointer; font-size: 0.75rem; font-weight: 600; color: #334155; }
.exp-coche:hover { background: #f1f5f9; }
.exp-coche input { accent-color: #4f46e5; }
.exp-pied { border-top: 1px solid #f1f5f9; background: rgba(248, 250, 252, 0.7); padding: 1rem 1.5rem 1.25rem; }
.exp-reset {
  width: 100%; padding: 0.55rem; border-radius: 0.75rem; border: 1px solid #e2e8f0; background: #fff;
  color: #64748b; font-size: 0.75rem; font-weight: 700; cursor: pointer;
}
.exp-reset:hover { background: #f1f5f9; }
.exp-legende { margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.35rem; }
.exp-legende p { display: flex; align-items: center; gap: 0.45rem; margin: 0; font-size: 0.68rem; color: #475569; }
.exp-puce { width: 1rem; height: 1rem; border-radius: 0.25rem; border: 1px solid #e2e8f0; background: #f1f5f9; flex: none; }
.exp-puce--bleu { background: #dbeafe; border-color: #bfdbfe; }
.exp-puce--vert { background: #d1fae5; border-color: #a7f3d0; color: #059669; display: flex; align-items: center; justify-content: center; }
.exp-puce--rose { background: #ffe4e6; border-color: #fecdd3; color: #e11d48; display: flex; align-items: center; justify-content: center; }

.exp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.exp-entete {
  height: 5rem; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 1.5rem; background: #fff; border-bottom: 1px solid #e2e8f0;
}
.exp-entete h1 { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem; }
.exp-badge { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 0.2rem 0.55rem; }
.exp-badge--valo { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.exp-badge--topo { background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.exp-sous { margin: 0.15rem 0 0; font-size: 0.75rem; color: #94a3b8; }
.exp-sous b { color: #64748b; }
.exp-sous em { font-style: normal; color: #4f46e5; font-weight: 800; }
.exp-kpis { display: flex; gap: 1.4rem; padding-left: 1.2rem; border-left: 1px solid #e2e8f0; }
.exp-kpis span { display: block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; }
.exp-kpis strong { font-size: 0.9rem; }
.exp-actions { display: flex; align-items: center; gap: 0.45rem; }
.exp-btn {
  display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 0.75rem; padding: 0.45rem 0.75rem;
  font-size: 0.75rem; font-weight: 700; cursor: pointer; text-decoration: none; border: 1px solid transparent;
}
.exp-btn--indigo { background: #eef2ff; color: #4338ca; border-color: #e0e7ff; }
.exp-btn--indigo:hover { background: #e0e7ff; }
.exp-btn--vert { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.exp-btn--neutre { background: #fff; color: #475569; border-color: #e2e8f0; }
.exp-etat { font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 0.25rem 0.6rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.exp-etat--cours { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.exp-etat--ok { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.exp-etat--err { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.exp-point { width: 0.45rem; height: 0.45rem; border-radius: 999px; background: currentColor; }

.exp-scroll { flex: 1; overflow: auto; padding: 1.25rem 1.5rem 2rem; }
.exp-vide { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; min-height: 16rem; color: #94a3b8; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; }

.exp-fam, .exp-loc, .exp-eq { background: #fff; border: 1px solid #e2e8f0; overflow: hidden; }
.exp-fam { border-radius: 1rem; margin-bottom: 0.8rem; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.exp-loc { border-radius: 0.75rem; }
.exp-eq { border-radius: 0.55rem; margin-bottom: 0.45rem; }
.exp-tete { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; cursor: pointer; }
.exp-tete--fam { padding: 0.9rem 1rem; background: #f8fafc; }
.exp-tete--fam:hover, .exp-tete--loc:hover { background: #f1f5f9; }
.exp-tete--loc { padding: 0.65rem 0.75rem; background: rgba(248, 250, 252, 0.7); }
.exp-tete--eq { padding: 0.5rem 0.65rem; }
.exp-tete--eq:hover { background: #f8fafc; }
.exp-tete__id { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.exp-chevron { color: #94a3b8; transition: transform 0.2s ease; }
.exp-tete.is-ouvert .exp-chevron { transform: rotate(90deg); }
.exp-rond { width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; display: flex; align-items: center; justify-content: center; background: #e0e7ff; color: #4f46e5; }
.exp-rond--sm { width: 2rem; height: 2rem; border-radius: 0.55rem; background: #eff6ff; color: #2563eb; }
.exp-tete h3 { margin: 0; font-size: 1.05rem; }
.exp-tete h4 { margin: 0; font-size: 0.85rem; }
.exp-meta { margin: 0; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; }
.exp-total { text-align: right; font-weight: 800; color: #4f46e5; }
.exp-total--bleu { color: #2563eb; font-size: 1.05rem; }
.exp-total small { display: block; font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; font-weight: 700; }
.exp-corps { display: none; }
.exp-tete.is-ouvert + .exp-corps { display: block; }
.exp-suite { margin: 0.7rem 0 0.2rem 1.6rem; padding-left: 1rem; border-left: 2px solid #f1f5f9; display: flex; flex-direction: column; gap: 0.55rem; }
.exp-chips { display: flex; align-items: center; gap: 0.35rem; }
.exp-chip { border-radius: 0.35rem; padding: 0.15rem 0.4rem; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.exp-chip--ardoise { background: #f1f5f9; color: #64748b; }
.exp-chip--indigo { background: #eef2ff; color: #4f46e5; }
.exp-chip--audit { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }

.exp-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; min-width: 920px; }
.exp-table th { text-align: left; padding: 0.4rem 0.7rem; background: #f8fafc; color: #94a3b8; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid #e2e8f0; }
.exp-table td { padding: 0.4rem 0.7rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.exp-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.exp-table .c { text-align: center; }
.exp-code { font-family: ui-monospace, monospace; font-weight: 700; color: #4f46e5; }
.exp-des { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-qte { border: 0; border-radius: 0.35rem; font-weight: 800; padding: 0.1rem 0.35rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.2rem; }
.exp-qte--gris { background: #f1f5f9; color: #334155; }
.exp-qte--bleu { background: #dbeafe; color: #1d4ed8; }
.exp-qte--vert { background: #d1fae5; color: #047857; }
.exp-qte--rose { background: #ffe4e6; color: #be123c; }
.exp-retenu { display: inline-flex; min-width: 1.8rem; justify-content: center; padding: 0.1rem 0.4rem; border-radius: 0.3rem; background: #4f46e5; color: #fff; font-weight: 800; }
.exp-niv { border-radius: 0.3rem; padding: 0.05rem 0.35rem; font-weight: 700; }
.exp-niv--1 { background: #d1fae5; color: #047857; }
.exp-niv--2 { background: #fef3c7; color: #b45309; }
.exp-niv--3 { background: #ffe4e6; color: #be123c; }
.exp-mandat {
  border: 0; border-radius: 0.45rem; padding: 0.3rem; cursor: pointer; color: #4f46e5; background: #eef2ff; border: 1px solid #e0e7ff;
}
.exp-origine { border: 0; border-radius: 0.4rem; color: #fff; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; padding: 0.2rem 0.4rem; cursor: pointer; text-transform: uppercase; }
.exp-origine--manuel { background: #e11d48; }
.exp-origine--alea { background: #9333ea; }
.exp-origine--ecart { background: #f59e0b; }
.exp-ligne--inconnu { background: rgba(254, 226, 226, 0.55); }
.exp-ligne--manuel { background: rgba(255, 228, 230, 0.7); box-shadow: inset 3px 0 0 #e11d48; }
.exp-ligne--alea { background: rgba(243, 232, 255, 0.7); box-shadow: inset 3px 0 0 #9333ea; }
.exp-ligne--ecart { background: rgba(254, 243, 199, 0.7); box-shadow: inset 3px 0 0 #f59e0b; }
.exp-sousligne { background: rgba(248, 250, 252, 0.8); color: #64748b; font-family: ui-monospace, monospace; font-size: 0.68rem; }
.exp-sousligne--audit { background: rgba(250, 245, 255, 0.8); color: #7e22ce; }
.exp-sousligne.is-rejete { text-decoration: line-through; opacity: 0.45; }
.exp-mini { display: inline-flex; align-items: center; gap: 0.2rem; margin-left: 0.3rem; border-radius: 0.3rem; padding: 0.05rem 0.3rem; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; background: #e2e8f0; color: #334155; }
.exp-mini--rej { background: #fee2e2; color: #b91c1c; }
.exp-mini--lieu { background: #eff6ff; color: #1d4ed8; }
mark { background: #fde68a; color: #92400e; padding: 0 0.1rem; border-radius: 0.15rem; }

.exp-voile { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, 0.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.exp-voile[hidden] { display: none !important; }
.exp-modale { width: 100%; max-width: 28rem; background: #fff; border-radius: 1.2rem; border: 1px solid #e2e8f0; box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25); overflow: hidden; }
.exp-modale header, .exp-modale form, .exp-modale .exp-modale__corps { padding: 1.1rem 1.25rem; }
.exp-modale header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f1f5f9; background: #f8fafc; }
.exp-modale h3 { margin: 0; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.exp-modale .exp-zone { display: flex; justify-content: space-between; align-items: center; background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 0.8rem; padding: 0.6rem 0.75rem; font-size: 0.75rem; }
.exp-modale .exp-zone b { color: #4f46e5; font-family: ui-monospace, monospace; }
.exp-modale__pied { display: flex; justify-content: flex-end; gap: 0.4rem; border-top: 1px solid #f1f5f9; padding-top: 0.8rem; }
.exp-toast {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 60; background: #10b981; color: #fff;
  border-radius: 0.9rem; padding: 0.7rem 1rem; font-size: 0.75rem; font-weight: 700;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}
.exp-toast[hidden] { display: none !important; }
