/* ImmoTopo — même charte / arbre que Immoparc (consultation.css). */

:root {
  --ink: #163a5c;
  --ink-soft: rgba(22, 58, 92, 0.65);
  --ink-faint: rgba(22, 58, 92, 0.45);
  --brand: #3d8fc4;
  --brand-deep: #2a6fa0;
  --mist: #f2f7fb;
  --paper: #ffffff;
  --line: rgba(22, 58, 92, 0.14);
  --ok-bg: #ecfdf5;
  --ok-ink: #065f46;
  --ok-line: #a7f3d0;
  --warn-bg: #fffbeb;
  --warn-ink: #92400e;
  --warn-line: #fde68a;
  --danger: #b42318;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(22, 58, 92, 0.06);
  --font-body: Outfit, "Segoe UI", system-ui, sans-serif;
  --font-display: Syne, "Segoe UI", system-ui, sans-serif;
  --tree-w: 320px;
}

*, *::before, *::after { box-sizing: border-box; }

body.parc-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(61, 143, 196, 0.14), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, var(--mist) 100%);
}

.parc-shell {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.1rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.parc-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.parc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.parc-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.parc-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.parc-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.parc-title {
  margin: 0.1rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.parc-session {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.parc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.parc-meta {
  display: none;
  gap: 1rem;
  font-size: 0.82rem;
}

@media (min-width: 640px) {
  .parc-meta { display: flex; }
}

.parc-meta-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  font-weight: 700;
}

.parc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--mist);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* display:inline-flex ci-dessus écrase sinon l’attribut HTML hidden */
.parc-btn[hidden],
.topo-detail-actions [hidden] {
  display: none !important;
}

.parc-btn:hover { background: #fff; }
.parc-btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.parc-btn--primary:hover { background: var(--brand-deep); }
.parc-btn--ghost {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ink-soft);
  text-decoration: underline;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
}
.parc-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.parc-nav { padding: 0.85rem 1rem; }

.parc-nav__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 0.55rem;
}

.parc-nav__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .parc-nav__grid--topo { grid-template-columns: 1fr 1fr; }
  .parc-nav__grid--topo-simple { grid-template-columns: 1fr 1.6fr; align-items: end; }
}

@media (min-width: 1100px) {
  .parc-nav__grid--topo { grid-template-columns: 1fr 1fr 1.4fr auto; align-items: end; }
}

.topo-config-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.topo-config-bar[hidden] {
  display: none !important;
}

.topo-config-hint {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.topo-config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.topo-gen-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.tree-node__right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.tree-acts {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

.tree-node:hover .tree-acts,
.tree-node-selected .tree-acts {
  display: inline-flex;
}

.tree-act {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 0.15rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  min-width: 1.35rem;
  min-height: 1.35rem;
}

.tree-act:hover { background: rgba(61, 143, 196, 0.18); color: var(--brand-deep); }
.tree-act--danger:hover { background: #fef3f2; color: var(--danger); }
.tree-act svg { width: 0.85rem; height: 0.85rem; }

.tree-check {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.tree-check input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--brand);
  cursor: pointer;
}

.tree-node--peri {
  background: rgba(236, 253, 245, 0.65);
}

body.topo-mode-config .topo-detail-actions { display: none !important; }

.topo-tuile {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f7fafc;
  overflow: hidden;
}

.topo-tuile + .topo-tuile { margin-top: 0.55rem; }

.topo-tuile__sum {
  list-style: none;
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
  background: #f7fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.topo-tuile__sum::-webkit-details-marker { display: none; }

.topo-tuile__sum::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--brand-deep);
  border-bottom: 2px solid var(--brand-deep);
  transform: rotate(45deg);
  transition: transform 0.15s;
  opacity: 0.7;
}

.topo-tuile[open] > .topo-tuile__sum::after {
  transform: rotate(225deg);
}

.topo-tuile__body {
  padding: 0.45rem 0.65rem 0.65rem;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  /* Site / bâtiment / étage : ascenseur si le contenu déborde */
  max-height: min(52vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #3d8fc4 #edf2f7;
}

.topo-tuile__body::-webkit-scrollbar {
  width: 10px;
}
.topo-tuile__body::-webkit-scrollbar-track {
  background: #edf2f7;
  border-radius: 8px;
}
.topo-tuile__body::-webkit-scrollbar-thumb {
  background: #3d8fc4;
  border-radius: 8px;
  border: 2px solid #edf2f7;
}
.topo-tuile__body::-webkit-scrollbar-thumb:hover {
  background: #2a6fa0;
}

.topo-tuile--bat { background: #fff; }
.topo-tuile--bat > .topo-tuile__sum {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-deep);
  background: rgba(61, 143, 196, 0.06);
}

.topo-tuile--bat > .topo-tuile__body {
  max-height: min(48vh, 500px);
}

.topo-tuile--et > .topo-tuile__sum {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #edf2f7;
}

.topo-tuile__locaux {
  max-height: min(42vh, 420px);
}

.parc-select,
.parc-input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--mist);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  font-family: inherit;
}

.parc-select:focus,
.parc-input:focus { border-color: var(--brand); background: #fff; }

.parc-input-wrap { position: relative; }
.parc-input-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--ink-faint);
  pointer-events: none;
}
.parc-input-wrap .parc-input { padding-left: 2.25rem; }

.topo-nav-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.topo-modes {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  align-self: stretch;
}

.topo-mode {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.topo-mode.is-active {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 1px 2px rgba(22, 58, 92, 0.08);
}

.topo-banner {
  margin: 0;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(61, 143, 196, 0.35);
  background: rgba(61, 143, 196, 0.1);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-deep);
}

.topo-banner.is-warn {
  border-color: rgba(180, 35, 24, 0.25);
  background: #fef3f2;
  color: var(--danger);
}

.parc-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .parc-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
  }
}

.parc-tree {
  width: 100%;
  padding: 0.85rem;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(78vh, 820px);
}

@media (min-width: 1024px) {
  .parc-tree {
    width: var(--tree-w);
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
    z-index: 10;
    align-self: flex-start;
    max-height: calc(100vh - 2rem);
  }
}

.parc-tree__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.parc-tree__head-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.parc-tree__title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin: 0;
}

.parc-tree__title svg { width: 1rem; height: 1rem; }

.parc-tree__body {
  flex: 1 1 auto;
  min-height: 10rem;
  max-height: none;
  overflow-x: auto;
  overflow-y: auto;
  font-size: 0.78rem;
  /* Ascenseur collé au bord droit du panneau arbre */
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #3d8fc4 #edf2f7;
}

.parc-tree__body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.parc-tree__body::-webkit-scrollbar-track {
  background: #edf2f7;
  border-radius: 8px;
}
.parc-tree__body::-webkit-scrollbar-thumb {
  background: #3d8fc4;
  border-radius: 8px;
  border: 2px solid #edf2f7;
}
.parc-tree__body::-webkit-scrollbar-thumb:hover {
  background: #2a6fa0;
}

.parc-tree-empty {
  padding: 1.25rem 0.5rem;
  text-align: center;
  color: var(--ink-faint);
  font-style: italic;
  font-weight: 600;
  font-size: 0.78rem;
}

.parc-resizer { display: none; }

@media (min-width: 1024px) {
  .parc-resizer {
    display: block;
    width: 10px;
    margin: 0.5rem 0.45rem;
    align-self: stretch;
    border-radius: 999px;
    background: rgba(22, 58, 92, 0.1);
    cursor: col-resize;
  }
  .parc-resizer:hover { background: rgba(61, 143, 196, 0.35); }
}

.parc-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  /* Pas de sticky ici : la liste a son propre ascenseur (sinon le panneau grandit avec le contenu). */
}

.parc-perimetre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid rgba(61, 143, 196, 0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.parc-perimetre__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.parc-perimetre__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 143, 196, 0.12);
  color: var(--brand-deep);
  flex-shrink: 0;
}

.parc-perimetre__icon svg { width: 1.1rem; height: 1.1rem; }

.parc-perimetre__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.parc-perimetre__path {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.topo-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.topo-btn-danger {
  background: #fef3f2;
  border-color: rgba(180, 35, 24, 0.25);
  color: #b42318;
}

.parc-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ——— Arbre nœuds (identique Immoparc) ——— */
.tree-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
}

.tree-node:hover { background: rgba(61, 143, 196, 0.1); }

.tree-node.tree-node--sans-etiquette {
  background: #fff6e8;
  box-shadow: inset 3px 0 0 #c2410c;
}
.tree-node.tree-node--sans-etiquette:hover,
.tree-node.tree-node-selected.tree-node--sans-etiquette {
  background: #ffedd5;
}

.tree-node-selected {
  background: rgba(61, 143, 196, 0.16);
  border-left: 2px solid var(--brand);
  color: var(--brand-deep);
  font-weight: 700;
}

.tree-node__left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.tree-node__left > span:last-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-chevron {
  border: 0;
  background: transparent;
  padding: 0.1rem;
  color: var(--ink-faint);
  cursor: pointer;
  display: inline-flex;
}

.tree-chevron svg {
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 0.15s;
}

.tree-chevron.is-collapsed svg { transform: rotate(-90deg); }

.tree-spacer { width: 1rem; flex-shrink: 0; }

.tree-niv {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-deep);
  flex-shrink: 0;
}

.tree-count {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tree-count--empty {
  background: #edf2f7;
  color: var(--ink-faint);
  border: 1px solid rgba(22, 58, 92, 0.08);
}
.tree-count--mid {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
}
.tree-count--hot {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border: 1px solid var(--ok-line);
}

.tree-code {
  padding: 0.1rem 0.35rem;
  background: #edf2f7;
  border-radius: 6px;
  font-size: 0.62rem;
  font-family: ui-monospace, monospace;
  color: var(--ink-soft);
  border: 1px solid rgba(22, 58, 92, 0.08);
}

.tree-children {
  padding-left: 0.7rem;
  margin-left: 0.45rem;
  border-left: 1px solid var(--line);
  margin-top: 0.15rem;
}

.tree-children.is-collapsed { display: none; }

.topo-gen-box {
  margin-top: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
  flex-shrink: 0;
  max-height: min(42vh, 360px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3d8fc4 #edf2f7;
}

.topo-gen-box::-webkit-scrollbar { width: 8px; }
.topo-gen-box::-webkit-scrollbar-track { background: #edf2f7; border-radius: 8px; }
.topo-gen-box::-webkit-scrollbar-thumb {
  background: #3d8fc4;
  border-radius: 8px;
  border: 2px solid #edf2f7;
}

.topo-gen-box > summary {
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-deep);
  list-style: none;
}

.topo-gen-box > summary::-webkit-details-marker { display: none; }

.topo-gen {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.topo-gen-contexte {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
}

.topo-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.topo-field[hidden] {
  display: none !important;
}

.topo-msg {
  margin: 0;
  min-height: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--danger);
  text-transform: none;
  letter-spacing: 0;
}

.topo-liste-wrap {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topo-liste-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.topo-liste-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.topo-lignes { display: flex; flex-direction: column; gap: 0.35rem; }

.topo-ligne {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--ink, #163a5c);
  font: inherit;
}
.topo-ligne:hover { background: rgba(61, 143, 196, 0.08); }
.topo-ligne.is-selected {
  background: rgba(61, 143, 196, 0.16);
  border-color: rgba(61, 143, 196, 0.45);
}
.topo-ligne__nom { font-weight: 700; }
.topo-ligne__meta {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: rgba(22, 58, 92, 0.65);
}
.topo-ligne__manque { color: #c2410c; font-weight: 700; }

.topo-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.topo-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fafc;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(22, 58, 92, 0.65);
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(22, 58, 92, 0.14);
}
.topo-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(22, 58, 92, 0.1);
  font-size: 0.86rem;
  cursor: pointer;
}
.topo-table tbody tr:hover td { background: rgba(61, 143, 196, 0.08); }
.topo-table tr.is-selected td {
  background: rgba(61, 143, 196, 0.16);
  font-weight: 700;
}
.topo-table tr.is-sans-etiquette td { background: #fff6e8; }
.topo-table tr.is-sans-etiquette td:first-child { box-shadow: inset 3px 0 0 #c2410c; }
.topo-table tr.is-sans-etiquette:hover td,
.topo-table tr.is-sans-etiquette.is-selected td { background: #ffedd5; }

.topo-liste {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  /* Hauteur plafonnée = ascenseur visible (même logique que l’arbre) */
  max-height: min(65vh, 720px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #3d8fc4 #edf2f7;
}

@media (min-width: 1024px) {
  .topo-liste {
    max-height: calc(100vh - 16rem);
  }
}

.topo-liste::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.topo-liste::-webkit-scrollbar-track {
  background: #edf2f7;
  border-radius: 8px;
}
.topo-liste::-webkit-scrollbar-thumb {
  background: #3d8fc4;
  border-radius: 8px;
  border: 2px solid #edf2f7;
}
.topo-liste::-webkit-scrollbar-thumb:hover {
  background: #2a6fa0;
}

.topo-card-local {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  background: #fff;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.topo-card-local.is-sans-etiquette {
  background: #fff6e8;
  box-shadow: inset 3px 0 0 #c2410c;
}
.topo-card-local.is-sans-etiquette:hover,
.topo-card-local.is-sans-etiquette.is-selected {
  background: #ffedd5;
}

.topo-card-local:hover {
  background: rgba(61, 143, 196, 0.06);
  border-color: rgba(61, 143, 196, 0.35);
}

.topo-card-local.is-selected {
  background: rgba(61, 143, 196, 0.12);
  border-color: rgba(61, 143, 196, 0.45);
}

.topo-card-local__name {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.topo-card-local__path {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.topo-card-local__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.topo-chip {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--ink-soft);
  border: 1px solid rgba(22, 58, 92, 0.08);
}

.topo-groupe__titre {
  margin: 0.35rem 0 0.4rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.parc-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(22, 58, 92, 0.55);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.parc-modal.is-open { display: flex; }

.parc-modal__panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 100%;
  max-width: 28rem;
  box-shadow: 0 20px 50px rgba(22, 58, 92, 0.2);
  margin: auto;
}

.parc-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
}

.parc-modal__title { margin: 0; font-size: 1rem; font-weight: 700; }
.parc-modal__sub { margin: 0.25rem 0 0; font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); }
.parc-modal__body { padding: 1rem 1.1rem; }
.parc-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--line);
}

.topo-ctx {
  position: fixed;
  z-index: 70;
  min-width: 11rem;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(22, 58, 92, 0.12);
}

.topo-ctx button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.topo-ctx button:hover { background: rgba(61, 143, 196, 0.1); }
.topo-ctx button.is-danger { color: var(--danger); }
