/* Console de supervision — complète le shell GesInv.
   Les classes du shell posent display:flex, ce qui annule l'attribut hidden. */

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sup-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.sup-login__carte {
  width: min(100%, 28rem);
  padding: 2rem 1.75rem 1.5rem;
}

.sup-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
  flex: 0 0 auto;
}

.sup-kpi {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 8.4rem;
  padding: 1.05rem 1.15rem;
  border-radius: 1.5rem;
}

.sup-kpi__haut {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.sup-kpi__icone {
  display: inline-flex;
  padding: 0.4rem;
  border-radius: 0.65rem;
  background: #eef6fb;
  color: #2a6fa0;
}

.sup-kpi__icone.is-heure { background: #f4f3ff; color: #5925dc; }
.sup-kpi__icone.is-ok { background: #ecfdf3; color: #027a48; }
.sup-kpi__icone.is-alerte { background: #fef3f2; color: #b42318; }
.sup-kpi__sur { font-size: 0.9rem; font-weight: 700; color: rgba(22, 58, 92, 0.45); }
.sup-kpi__valeur--alerte { color: #b42318; }

.sup-kpi__label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.sup-kpi__valeur {
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}

.sup-kpi__note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.sup-jauge {
  margin-top: 0.65rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(22, 58, 92, 0.08);
  overflow: hidden;
}

.sup-jauge > span {
  display: block;
  height: 100%;
  background: var(--brand);
  width: 0;
}

.sup-bandeau {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.sup-bandeau--phase {
  border-color: rgba(61, 143, 196, 0.45);
  background: rgba(61, 143, 196, 0.08);
}

.sup-bandeau--alerte {
  border-color: rgba(180, 35, 24, 0.25);
  background: var(--danger-bg);
  color: var(--danger);
}

.sup-bandeau p { margin: 0; }

.sup-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft, rgba(22, 58, 92, 0.65));
}

.sup-legende span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.sup-pastille {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 0.15rem;
  border: 1px solid rgba(22, 58, 92, 0.25);
  background: #fff;
}

.sup-pastille.is-ouverte {
  background: #027a48;
  border-color: #027a48;
}

.sup-pastille.is-comptee {
  background: #2a6fa0;
  border-color: #2a6fa0;
}

#vue-tableau {
  height: 100vh;
  overflow: auto;
}

.sup-repli.ges-panel { padding: 0; }

.sup-repli {
  flex: 0 0 auto;
  overflow: visible;
}

.sup-repli[open] {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  display: block;
  overflow: visible;
}

.sup-repli[open]::details-content {
  display: block;
  content-visibility: visible;
}

.sup-repli__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: #f7fafc;
}

.sup-repli__barre::-webkit-details-marker { display: none; }
.sup-repli__barre:hover { background: rgba(61, 143, 196, 0.1); }
.sup-repli[open] > .sup-repli__barre { border-bottom: 1px solid rgba(22, 58, 92, 0.14); }

.sup-repli__barre svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.sup-repli[open] > .sup-repli__barre svg { transform: rotate(180deg); }

.sup-repli__corps {
  display: block;
  padding: 0.85rem 1.15rem 1rem;
}

.sup-duo {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0.9rem;
  flex: 0 0 auto;
  align-items: start;
}

@media (min-width: 961px) {
  .sup-duo:has(#repli-equipes[open]) #repli-alertes[open] {
    height: 0;
    min-height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .sup-duo:has(#repli-equipes[open]) #repli-alertes[open] > .sup-repli__barre {
    flex: none;
  }

  .sup-duo:has(#repli-equipes[open]) #repli-alertes[open]::details-content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .sup-duo:has(#repli-equipes[open]) #repli-alertes[open] > .sup-repli__corps {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .sup-duo:has(#repli-equipes[open]) #repli-alertes[open] .ges-panel__head {
    flex: none;
  }

  .sup-duo:has(#repli-equipes[open]) #repli-alertes[open] .sup-alertes {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-color: #3d8fc4 #edf2f7;
  }

  .sup-duo:has(#repli-equipes[open]) #repli-alertes[open] .sup-alertes:empty {
    flex: none;
  }
}

@media (max-width: 960px) {
  .sup-duo { grid-template-columns: 1fr; }
}

.sup-repli,
.sup-fil-panneau,
.sup-kpi { border-radius: 1.5rem; }

.sup-fil-panneau {
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #163a5c;
  color: #f2f7fb;
  border-color: #10283f;
}

.sup-fil-panneau .sup-fil {
  flex: 0 0 auto;
  min-height: 0;
  overflow: auto;
}

.sup-couverture {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sup-groupe {
  background: #fff;
  border: 1px solid rgba(22, 58, 92, 0.1);
  border-radius: 1.15rem;
  padding: 0.85rem;
}

.sup-groupe__titre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #163a5c;
}

.sup-groupe__compte {
  font-size: 0.68rem;
  background: #f2f7fb;
  border: 1px solid rgba(22, 58, 92, 0.12);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.sup-zones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.65rem;
}

.sup-zone {
  position: relative;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  min-height: 5.1rem;
}

.sup-zone__bulle {
  position: absolute;
  bottom: calc(100% + 0.55rem);
  left: 50%;
  transform: translateX(-50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: max-content;
  padding: 0.7rem 0.9rem 0.55rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(22, 58, 92, 0.18);
  background: #fff;
  box-shadow: 0 12px 28px rgba(22, 58, 92, 0.18);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.sup-zone__bulle::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: -0.35rem;
  margin-top: -0.35rem;
  background: #fff;
  border-right: 1px solid rgba(22, 58, 92, 0.18);
  border-bottom: 1px solid rgba(22, 58, 92, 0.18);
  transform: rotate(45deg);
}

.sup-zone__bulle-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #163a5c;
}

.sup-zone__barcode-cible {
  display: block;
  max-width: 14rem;
  height: auto;
}

.sup-zone:hover .sup-zone__bulle,
.sup-zone:focus-visible .sup-zone__bulle {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.sup-zone:hover,
.sup-zone.is-filtre {
  border-color: var(--brand);
  background: rgba(61, 143, 196, 0.08);
}

.sup-zone.is-ouverte {
  background: #ecfdf3;
  border-color: #027a48;
  border-left: 4px solid #027a48;
}

.sup-zone.is-ouverte:hover,
.sup-zone.is-ouverte.is-filtre {
  background: #d1fadf;
  border-color: #027a48;
}

.sup-zone.is-comptee {
  background: #e7f3fb;
  border-color: #3d8fc4;
  border-left: 4px solid #2a6fa0;
}

.sup-zone.is-comptee:hover,
.sup-zone.is-comptee.is-filtre {
  background: #d3e8f6;
  border-color: #2a6fa0;
}

.sup-zone.is-comptee .sup-zone__presence {
  color: #2a6fa0;
}

.sup-zone__presence {
  margin-top: 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #163a5c;
}

#suivi-cadence-range {
  width: 100%;
  accent-color: #3d8fc4;
}

.sup-suivi__cadence { margin: 0; }

.sup-radar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.85rem;
}

.sup-radar th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fafc;
  color: rgba(22, 58, 92, 0.55);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(22, 58, 92, 0.1);
}

.sup-radar td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(22, 58, 92, 0.08);
  vertical-align: middle;
}

.sup-equipe { cursor: pointer; }
.sup-equipe:hover td { background: rgba(61, 143, 196, 0.08); }
.sup-equipe.is-filtre td { background: rgba(61, 143, 196, 0.14); }
.sup-equipe td:first-child { display: flex; align-items: center; gap: 0.65rem; }
.sup-equipe__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: #eef6fb;
  color: #2a6fa0;
  font-size: 0.62rem;
  font-weight: 800;
  flex: none;
}
.sup-equipe__identite { display: flex; flex-direction: column; min-width: 0; }
.sup-equipe__nom { font-weight: 800; }
.sup-equipe__meta { color: rgba(22, 58, 92, 0.55); font-size: 0.72rem; }
.sup-equipe__score { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.sup-equipe__heure { font-variant-numeric: tabular-nums; color: rgba(22, 58, 92, 0.65); white-space: nowrap; }
.sup-rythme { font-size: 0.75rem; font-weight: 700; }
.sup-rythme.is-vif { color: #027a48; }
.sup-rythme.is-lent { color: #b54708; }
.sup-rythme.is-silence { color: #b42318; }

.sup-batt {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.45rem;
  border-radius: 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sup-batt svg { width: 1rem; height: 1rem; flex: none; }
.sup-batt.is-pleine { color: #027a48; background: #ecfdf3; }
.sup-batt.is-moyenne { color: #b54708; background: #fffaeb; }
.sup-batt.is-faible { color: #b42318; background: #fef3f2; animation: sup-batt-pulse 1.4s ease-in-out infinite; }
.sup-batt.is-inconnu { color: rgba(22, 58, 92, 0.35); font-weight: 700; background: transparent; padding: 0; }

@keyframes sup-batt-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.sup-alertes { display: flex; flex-direction: column; gap: 0.5rem; }

.sup-alerte {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  text-align: left;
  width: 100%;
  border: 1px solid rgba(180, 35, 24, 0.28);
  border-radius: 1rem;
  background: #fef3f2;
  padding: 0.85rem 0.95rem;
  color: #163a5c;
  font-family: inherit;
  cursor: pointer;
}

.sup-alerte.is-inconnu { border-color: rgba(181, 71, 8, 0.35); background: #fffaeb; }
.sup-alerte.is-ecart { background: #fef3f2; }
.sup-alerte:hover { border-color: #3d8fc4; }
.sup-alerte__type { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #b42318; }
.sup-alerte.is-inconnu .sup-alerte__type { color: #b54708; }
.sup-alerte__ref { font-family: ui-monospace, monospace; font-size: 0.78rem; font-weight: 800; color: #2a6fa0; }
.sup-alerte__desi { font-weight: 700; font-size: 0.85rem; }
.sup-alerte__detail { color: #b42318; font-size: 0.75rem; }
.sup-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }

.sup-badge {
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  background: #f2f7fb;
  color: #163a5c;
}

.sup-badge.is-rebut { background: #fef3f2; color: #b42318; }
.sup-badge.is-dlc { background: #eef6fb; color: #2a6fa0; }
.sup-badge.is-dluo { background: #f4f3ff; color: #5925dc; }
.sup-badge.is-lot, .sup-badge.is-sn { background: #f7fafc; color: #163a5c; }
.sup-badge.is-dur { background: #fef3f2; color: #b42318; }
.sup-badge.is-moyen { background: #fffaeb; color: #b54708; }
.sup-badge.is-facile { background: #ecfdf3; color: #027a48; }
.sup-badge.is-inconnu { background: #fffaeb; color: #b54708; }
.sup-badge.is-audit { background: #eef6fb; color: #2a6fa0; }
.sup-fil__table { font-size: 0.875rem; }
.sup-fil__col-heure { width: 10.5rem; }
.sup-fil__col-equipe { width: 8rem; }
.sup-fil__col-ref { width: 12rem; }
.sup-fil__col-qte { width: 5.5rem; }
.sup-fil__col-lieu { width: 16rem; }
.sup-fil__heure {
  white-space: nowrap;
  color: rgba(22, 58, 92, 0.65);
  font-variant-numeric: tabular-nums;
}
.sup-fil__ref {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sup-fil__desi { min-width: 16rem; }
.sup-fil th.sup-fil__qte,
.sup-fil td.sup-fil__qte {
  width: 5.5rem;
  min-width: 5.5rem;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border-left: 1px solid rgba(22, 58, 92, 0.14);
}
.sup-fil th.sup-fil__lieu,
.sup-fil td.sup-fil__lieu {
  min-width: 14rem;
  white-space: nowrap;
  border-left: 1px solid rgba(22, 58, 92, 0.14);
  padding-left: 1rem;
}
#fil tr.is-signal td { background: #fef3f2; }
#fil tr.is-signal:hover td { background: #fde8e6; }
#fil tr.is-signal td:first-child { box-shadow: inset 4px 0 0 #b42318; }
#fil tr.is-nouveau td { animation: sup-neuf 1.6s ease; }

@keyframes sup-neuf {
  from { background: rgba(61, 143, 196, 0.28); }
  to { background: transparent; }
}

.sup-zone__code {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.sup-zone__meta {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--ink-soft);
}

.sup-fil-panneau .ges-panel__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
}

.sup-fil-panneau .ges-session { color: rgba(242, 247, 251, 0.62); }

.sup-fil-panneau .ges-btn {
  background: #1e4668;
  color: #d7ecf8;
  border-color: rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
}

.sup-fil-panneau .ges-btn.is-courant,
.sup-fil-panneau .ges-btn.is-courant:hover {
  background: #3d8fc4;
  border-color: #3d8fc4;
  color: #fff;
}

.sup-fil-panneau .ges-field input,
.sup-fil-panneau .ges-field select {
  background: #1e4668;
  color: #f2f7fb;
  border-color: rgba(255, 255, 255, 0.14);
}

.sup-fil__choix { margin: 0; }
.sup-fil-panneau .sup-fil__choix select {
  margin-top: 0;
  width: auto;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.sup-fil-panneau .sup-fil {
  background: #10283f;
  border-color: rgba(255, 255, 255, 0.08);
}

.sup-fil thead th {
  background: #1e4668;
  color: rgba(242, 247, 251, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sup-fil tbody td {
  color: #e7f3fb;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.78rem;
}

.sup-fil td.sup-fil__ref { color: #8ec4e4; font-weight: 800; }
.sup-fil td.sup-fil__qte,
.sup-fil th.sup-fil__qte { color: #d7ecf8; border-left-color: rgba(255, 255, 255, 0.12); }
.sup-fil td.sup-fil__lieu,
.sup-fil th.sup-fil__lieu { color: rgba(242, 247, 251, 0.75); border-left-color: rgba(255, 255, 255, 0.12); }
.sup-fil tbody tr:hover td { background: rgba(255, 255, 255, 0.06); }
.sup-fil-panneau #fil tr.is-signal td { background: rgba(180, 35, 24, 0.28); }
.sup-fil-panneau #fil tr.is-signal:hover td { background: rgba(180, 35, 24, 0.38); }
.sup-fil-panneau .sup-vide { color: rgba(242, 247, 251, 0.65); }
.sup-point.is-vif { background: #12b76a; }

.sup-point {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(22, 58, 92, 0.25);
  display: inline-block;
}

.sup-point.is-actif { background: #027a48; }
.sup-point.is-erreur { background: var(--danger); }

.sup-dialogue {
  position: fixed;
  inset: 0;
  background: rgba(22, 58, 92, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 40;
}

.sup-dialogue[hidden] { display: none; }

.sup-dialogue__carte {
  width: min(100%, 28rem);
  padding: 1.25rem;
}

.sup-dialogue__carte--large {
  width: min(100%, 36rem);
}

.sup-dialogue__carte--suivi {
  width: min(100%, 56rem);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

.sup-suivi {
  position: fixed;
  z-index: 40;
  top: 1rem;
  right: 1rem;
  width: min(36rem, calc(100vw - 2rem));
  height: min(70vh, 40rem);
  min-width: 18rem;
  min-height: 8rem;
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  resize: both;
  overflow: hidden;
  display: flex;
}

.sup-suivi[hidden] { display: none; }

.sup-suivi__carte {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 1rem;
  overflow: hidden;
}

.sup-suivi__barre {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: grab;
  user-select: none;
}

.sup-suivi__barre:active { cursor: grabbing; }

.sup-suivi__barre h2 { margin: 0; white-space: nowrap; }

.sup-suivi__etat {
  flex: 1;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sup-suivi__reduire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  flex: none;
}

.sup-suivi__corps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.sup-suivi.est-reduite {
  height: auto;
  min-height: 0;
  resize: none;
  width: min(32rem, calc(100vw - 2rem));
}

.sup-suivi.est-reduite .sup-suivi__carte { height: auto; }

.sup-suivi.est-reduite .sup-suivi__corps { display: none; }

.sup-suivi.est-reduite .sup-suivi__icone-reduire,
.sup-suivi:not(.est-reduite) .sup-suivi__icone-agrandir { display: none; }

.sup-journal {
  max-height: 50vh;
  overflow-y: auto;
  margin: 0;
  padding: 0.75rem;
  background: #f7fafc;
  border: 1px solid rgba(22, 58, 92, 0.15);
  border-radius: 0.5rem;
  color: #163a5c;
  font-size: 0.8rem;
  white-space: pre-wrap;
}

.sup-filtres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sup-vide {
  margin: 0;
  padding: 1rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.plan {
  position: relative;
  min-width: 2200px;
  min-height: 1400px;
  background-image: radial-gradient(rgba(22, 58, 92, 0.18) 1px, transparent 1px);
  background-size: 40px 40px;
  background-color: #f7fafc;
}

.plan-zone {
  position: absolute;
  width: 140px;
  min-height: 64px;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: grab;
  font-size: 0.75rem;
  box-shadow: var(--shadow);
}

.plan-zone.is-mural { border-style: dashed; }
.plan-zone.is-choisi { outline: 2px solid var(--brand-deep); z-index: 2; }
.plan-zone strong { display: block; }

.topo-grille {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.topo-colonne {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 8rem);
  overflow: auto;
}

.topo-total {
  background: #163a5c;
  color: #fff;
  border-radius: 1.25rem;
  padding: 1.25rem 1.35rem;
}

.topo-total__chiffre {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
}

.topo-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.topo-types span {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.7rem;
  padding: 0.4rem 0.45rem;
  font-size: 0.68rem;
  line-height: 1.25;
}

.topo-ia {
  background: #163a5c;
  color: #fff;
  border-radius: 1.25rem;
  padding: 1.25rem;
}

.topo-depot {
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  background: transparent;
  color: inherit;
  width: 100%;
}

.topo-depot:hover { background: rgba(255, 255, 255, 0.06); }

.topo-cadre {
  position: relative;
  height: min(78vh, 920px);
  overflow: auto;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: #f7fafc;
}

.topo-palette {
  position: sticky;
  top: 0.75rem;
  left: 0.75rem;
  float: left;
  width: 16.5rem;
  max-height: calc(100% - 1.5rem);
  margin: 0.75rem;
  overflow: auto;
  z-index: 4;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.topo-palette__poignee {
  position: sticky;
  top: 0;
  background: #f7fafc;
  padding: 0.55rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(22, 58, 92, 0.65);
  border-bottom: 1px solid var(--line);
  cursor: grab;
}

.topo-outils {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.65rem;
}

.topo-outil {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 0.7rem;
  padding: 0.4rem 0.25rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: #163a5c;
  cursor: grab;
  text-align: center;
  line-height: 1.2;
}

.topo-outil:hover { border-color: var(--brand); }

.topo-groupe {
  grid-column: 1 / -1;
  margin: 0.35rem 0 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(22, 58, 92, 0.55);
}

.topo-arbre details {
  margin-bottom: 0.6rem;
}

.topo-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.15rem;
  color: #163a5c;
  cursor: pointer;
}

.topo-ligne.is-choisi { background: rgba(61, 143, 196, 0.12); }

.topo-menu {
  position: fixed;
  z-index: 40;
  min-width: 11rem;
  background: #163a5c;
  color: #fff;
  border-radius: 0.8rem;
  padding: 0.35rem;
  box-shadow: var(--shadow);
}

.topo-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.45rem 0.6rem;
  font-weight: 600;
  cursor: pointer;
}

.topo-menu button:hover { background: rgba(255, 255, 255, 0.1); }

.topo-voile {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(22, 58, 92, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.topo-modal {
  width: min(100%, 32rem);
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.25rem;
}

@media (max-width: 1024px) {
  .topo-grille { grid-template-columns: 1fr; }
  .topo-colonne { max-height: none; }
}

.sup-chat {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.sup-chat__bouton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 0;
  border-radius: 1.1rem;
  background: #3d8fc4;
  color: #fff;
  box-shadow: 0 8px 24px rgba(22, 58, 92, 0.25);
  cursor: pointer;
}

.sup-chat__bouton:hover { background: #2a6fa0; }

.sup-chat__badge {
  position: absolute;
  top: -0.4rem;
  right: -0.4rem;
  min-width: 1.3rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.sup-chat__panneau {
  display: flex;
  flex-direction: column;
  width: min(24rem, calc(100vw - 2rem));
  height: min(34rem, calc(100vh - 7rem));
  background: #fff;
  border: 1px solid rgba(22, 58, 92, 0.14);
  border-radius: 1.25rem;
  box-shadow: 0 16px 40px rgba(22, 58, 92, 0.18);
  overflow: hidden;
}

.sup-chat__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: #163a5c;
  color: #f2f7fb;
}

.sup-chat__titre {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.sup-chat__sous {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: rgba(242, 247, 251, 0.75);
}

.sup-chat__icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.sup-chat__icone:hover { background: rgba(255, 255, 255, 0.12); }

.sup-chat__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.9rem;
  background: #f2f7fb;
}

.sup-chat__bulle {
  max-width: 85%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid rgba(22, 58, 92, 0.12);
  color: #163a5c;
}

.sup-chat__bulle.is-moi {
  align-self: flex-end;
  background: #3d8fc4;
  border-color: #2a6fa0;
  color: #fff;
}

.sup-chat__bulle.is-systeme {
  align-self: center;
  max-width: 92%;
  text-align: center;
  background: #fff;
}

.sup-chat__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.75;
}

.sup-chat__repondre {
  border: 0;
  border-radius: 0.35rem;
  background: rgba(22, 58, 92, 0.08);
  color: #2a6fa0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
}

.sup-chat__prive {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.8;
}

.sup-chat__corps {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sup-chat__heure {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: right;
  opacity: 0.6;
}

.sup-chat__saisie {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border-top: 1px solid rgba(22, 58, 92, 0.14);
  background: #fff;
}

.sup-chat__envoi {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
}

.sup-chat__texte { flex: 1 1 auto; min-width: 0; }

.sup-chat__envoyer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
}
