/* Page Carto — plein écran mobile-first (chrome admin masqué) */

body.carto-page .site-header {
  display: none;
}

html:has(body.carto-page) {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.carto-page {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation; /* pas de double-tap zoom page */
  background: #1a1a1a;
}

body.carto-page main {
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

#carto-shell {
  position: relative;
  width: 100%;
  height: 100%;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: border-box;
  overflow: hidden;
  overscroll-behavior: none;
}

#map {
  position: relative;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  /* MapLibre gère pinch / pan ; ne pas hériter de manipulation. */
  touch-action: none;
}

body.carto-page .maplibregl-map,
body.carto-page .maplibregl-canvas-container,
body.carto-page .maplibregl-canvas {
  touch-action: none;
}

.map-fatal {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  box-sizing: border-box;
  text-align: center;
  color: #f5f2ec;
  background: #1a1a1a;
  font: 0.95rem/1.45 "IBM Plex Sans", "Segoe UI", sans-serif;
}

.map-fatal strong {
  font-size: 1.15rem;
}

.map-fatal p {
  margin: 0;
  max-width: 22rem;
  color: #c8c0b4;
}

.basemap-switch {
  position: absolute;
  top: calc(0.75rem + env(safe-area-inset-top));
  right: 0.75rem;
  left: auto;
  z-index: 2;
  display: flex;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.basemap-switch button {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}

.basemap-switch button + button {
  border-left: 1px solid var(--line);
}

.basemap-switch button.active {
  background: var(--ink);
  color: #fff;
}

.map-toolbar {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 2;
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
}

.map-fab {
  position: absolute;
  right: 0.75rem;
  top: calc(4.5rem + env(safe-area-inset-top));
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Boussole animée — parité Flutter MapCompassButton */
.compass-btn {
  position: relative;
}

.compass-needle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  transform-origin: 50% 50%;
  will-change: transform;
}

.compass-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #64748b;
  border: 1.5px solid #fff;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.ign-attribution {
  position: absolute;
  left: 0.5rem;
  bottom: 3.6rem; /* au-dessus de .map-toolbar (bottom: 0.5rem) */
  z-index: 2;
  margin: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  user-select: none;
}

.tb-toggle,
.tb-recenter,
.tb-action {
  font: inherit;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  padding: 0.45rem 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  position: relative;
}

.tb-toggle {
  flex: 1;
  color: var(--muted);
}

.tb-toggle.active {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 #ffeb3b;
}

#btn-obs.tb-toggle.active {
  box-shadow: inset 0 -3px 0 #ff9800;
}

#btn-odfci.tb-toggle.active {
  box-shadow: inset 0 -3px 0 #e65100;
}

.tb-action {
  flex: 0 0 auto;
  color: var(--ink);
}

.tb-label {
  font-size: 0.8rem;
  font-weight: 600;
}

.tb-help {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 1.25rem; /* 20px — aligné Flutter _ToolbarToggle */
  height: 1.25rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: transparent;
  color: rgba(0, 0, 0, 0.55);
  font-size: 0.75rem; /* 12px */
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tb-recenter {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  border-radius: 50%;
  border: none;
  /* AppColors.accent — état « recentrer » Flutter (_RecenterButton) */
  background: #009ee2;
  color: #000;
  padding: 3px;
  box-shadow: none;
}

.tb-recenter:hover {
  filter: brightness(1.05);
}

.tb-recenter .tb-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.repere-panel {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 3.6rem;
  z-index: 3;
  background: rgba(28, 27, 25, 0.92);
  color: #f5f2ec;
  border-radius: 8px;
  padding: 0.75rem 2rem 0.75rem 0.9rem;
  font-size: 0.9rem;
  max-height: calc(50% - env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.repere-panel .k {
  color: #b8b0a4;
  display: inline-block;
  min-width: 2.5rem;
}

.repere-panel .muted {
  color: #b8b0a4;
  margin-top: 0.35rem;
}

.repere-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.repere-actions button {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #f5f2ec;
  cursor: pointer;
}

.repere-actions button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.search-panel {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  top: calc(4.2rem + env(safe-area-inset-top));
  z-index: 4;
  background: rgba(28, 27, 25, 0.94);
  color: #f5f2ec;
  border-radius: 8px;
  padding: 0.75rem 2rem 0.9rem 0.9rem;
  font-size: 0.9rem;
  max-height: calc(100% - 5.5rem - env(safe-area-inset-top));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.search-panel[hidden] {
  display: none;
}

.search-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.search-label {
  display: block;
  color: #b8b0a4;
  font-size: 0.75rem;
  margin-top: 0.35rem;
}

.search-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}

.search-mode {
  flex: 1 1 auto;
  min-width: 3.2rem;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: #d8d0c4;
  cursor: pointer;
}

.search-mode.active {
  background: #009ee2;
  border-color: #009ee2;
  color: #fff;
}

.search-fields[hidden] {
  display: none;
}

.search-coord-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.35rem;
}

.search-coord-lab {
  width: 1.7rem;
  flex-shrink: 0;
  color: #b8b0a4;
  font-size: 0.75rem;
}

.search-sym {
  color: #b8b0a4;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.2rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: #f5f2ec;
  font: inherit;
}

.search-input.sm {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0;
  padding: 0.4rem 0.35rem;
  text-align: center;
}

.search-coord-row .search-input.sm {
  margin-top: 0;
}

.search-error {
  color: #ff8a80;
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
}

.search-submit {
  margin-top: 0.65rem;
  font: inherit;
  padding: 0.45rem 0.8rem;
  border: 0;
  border-radius: 6px;
  background: #009ee2;
  color: #fff;
  cursor: pointer;
}

/* Pavé custom DFCI / coords — bas d’écran, parité Flutter */
.search-keypad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  background: #2a2d32;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
  touch-action: manipulation;
}

.search-keypad[hidden] {
  display: none !important;
}

.search-keypad-pad {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: clamp(220px, 36vh, 320px);
}

.search-keypad-row {
  display: flex;
  flex: 1 1 0;
  gap: 6px;
  min-height: 0;
}

.search-keypad-key {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  background: #4a4e55;
  color: #fff;
  font: 600 1.35rem/1 "IBM Plex Sans", "Segoe UI", sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.search-keypad-key.action {
  background: #3a3d42;
  font-size: 1.15rem;
}

.search-keypad-key.done {
  background: #009ee2;
  font-size: 1.15rem;
}

.search-keypad-key.empty {
  visibility: hidden;
  pointer-events: none;
  background: transparent;
}

.search-keypad-key:disabled {
  opacity: 0.35;
  cursor: default;
}

.search-keypad-key:not(:disabled):active {
  filter: brightness(1.12);
}

/* Remonte le panneau recherche au-dessus du pavé */
html.carto-keypad-open .search-panel:not([hidden]) {
  max-height: calc(100% - clamp(220px, 36vh, 320px) - 4.5rem - env(safe-area-inset-bottom));
  bottom: auto;
}

.search-close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

.repere-close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

.carto-toast {
  position: absolute;
  top: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(28, 27, 25, 0.92);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  max-width: 90%;
}

.carto-toast[hidden] {
  display: none;
}

.geobaroud-fab {
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
}

.geobaroud-fab[hidden] {
  display: none !important;
}

.geobaroud-fab img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.share-install-dialog {
  border: 1px solid var(--line, #333);
  border-radius: 12px;
  padding: 0;
  max-width: min(20rem, calc(100vw - 2rem));
  background: rgba(28, 27, 25, 0.96);
  color: #f5f2ec;
}

.share-install-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.share-install-form {
  margin: 0;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.share-install-msg {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;
}

.share-install-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.share-btn {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  color: inherit;
  background: transparent;
}

.share-btn.primary {
  background: #009ee2;
  color: #fff;
  border-color: #009ee2;
}

.share-btn:not(.primary) {
  border-color: #666;
}

.legend-dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  max-width: 22rem;
  width: calc(100% - 2rem);
  background: #1c1b19;
  color: #f5f2ec;
}

.legend-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.pei-page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.5rem 0 2rem;
}

.pei-page h1 {
  margin-bottom: 0.35rem;
}

.pei-import-panel {
  margin-top: 1.25rem;
  border: 1px solid var(--line, #333);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: #1c1b19;
  color: #f5f2ec;
}

.tb-dept {
  display: inline-flex;
  align-items: center;
  margin-left: 0.25rem;
}

.tb-dept select {
  font: inherit;
  font-size: 0.8rem;
  max-width: 4.5rem;
  padding: 0.2rem 0.3rem;
}

.pei-import-success {
  color: #81c784;
  margin: 1rem 0 0;
}

.pei-import-dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  max-width: 34rem;
  width: calc(100% - 2rem);
  background: #1c1b19;
  color: #f5f2ec;
}

.pei-import-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.pei-import-dialog form {
  margin: 0;
  padding: 1rem 1.1rem;
}

.pei-import-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pei-import-header h2,
.pei-step h3 {
  margin: 0;
}

.pei-import-header button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.5rem;
}

.pei-import-dept,
.pei-help {
  color: #b8b0a4;
  font-size: 0.9rem;
}

.pei-dept-block {
  margin-top: 0.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pei-dept-block h3,
.pei-step h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.pei-import-dept {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f2ec;
  font-size: 0.95rem;
}

.pei-dept-row,
.pei-source-panel {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

/* display:grid ci-dessus écrase sinon l’attribut HTML hidden */
.pei-dept-row[hidden],
.pei-source-panel[hidden] {
  display: none !important;
}

.pei-field-label {
  color: #b8b0a4;
  font-size: 0.85rem;
}

.pei-step {
  margin-top: 1rem;
}

.pei-source-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0.6rem 0 0.85rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}

.pei-segment-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 2.4rem;
  border-radius: 8px;
  cursor: pointer;
  color: #b8b0a4;
  font-weight: 600;
  font-size: 0.9rem;
  user-select: none;
}

.pei-segment-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pei-segment-option.is-active {
  background: #3d342c;
  color: #fff8ef;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.pei-segment-option:focus-within {
  outline: 2px solid #ffb300;
  outline-offset: 1px;
}

.pei-step input[type="file"],
.pei-step input[type="url"],
.pei-step select,
#pei-dept {
  font: inherit;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #12110f;
  color: inherit;
}

#pei-dept {
  width: 100%;
  max-width: 100%;
}

.pei-mapping-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.pei-import-error {
  color: #ff8a80;
  margin: 1rem 0 0;
}

.pei-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.pei-import-actions button {
  font: inherit;
  cursor: pointer;
  padding: 0.45rem 0.7rem;
}

.pei-popup {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
}

.pei-popup dt {
  font-weight: 600;
}

.pei-popup dd {
  margin: 0;
}

.legend-dialog form {
  margin: 0;
  padding: 1rem 1.1rem 1rem;
}

.legend-dialog h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.legend-dialog p {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
}

.legend-note {
  color: #b8b0a4 !important;
  font-size: 0.82rem !important;
}

.legend-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}

/* Colonne symbole fixe — libellés alignés comme dans l’app. */
.legend-symbol {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.legend-list img {
  width: 28px;
  height: 28px;
  display: block;
}

.legend-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.legend-swatch {
  width: 28px;
  height: 6px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.legend-swatch.circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.legend-swatch.poly {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  border-style: solid;
  border-width: 2px;
  box-sizing: border-box;
}

.legend-list li.legend-heading {
  margin-top: 0.85rem;
  margin-bottom: 0.45rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #f0ebe3;
}

.eau-map-label {
  color: #007dff;
  font: 600 11px/1.2 "IBM Plex Sans", "Segoe UI", sans-serif;
  text-align: center;
  white-space: pre-line;
  pointer-events: none;
  text-shadow:
    0 0 2px #fff,
    0 0 3px #fff,
    1px 1px 0 #fff,
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff;
  max-width: 7rem;
}

.maplibregl-ctrl-attrib {
  font-size: 10px;
}

/* Tracé + échelle — parité Flutter TraceModeButtons / MapScaleBar / TracePanel */

.map-left-chrome {
  position: absolute;
  top: calc(0.75rem + env(safe-area-inset-top));
  left: 0.75rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  /* Laisse de l’air avant le switch Plan/Satellite (haut droite). */
  max-width: calc(100% - 9.25rem);
  margin-right: 0.75rem;
}

.loc-panel {
  background: rgba(28, 27, 25, 0.92);
  color: #f5f2ec;
  border-radius: 8px;
  padding: 0.35rem 0.55rem 0.4rem;
  font-size: 0.72rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  max-width: 100%;
  min-width: 9.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.loc-panel-title {
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 0.05rem;
}

.loc-k {
  color: #b8b0a4;
  font-size: 0.65rem;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 2.2rem;
}

.loc-v {
  font-weight: 600;
  letter-spacing: 0.02em;
  min-width: 0;
}

.loc-line {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
  min-width: 0;
}

.loc-line .loc-v {
  font-weight: 500;
  font-size: 0.7rem;
  white-space: normal;
}

.trace-controls {
  position: static;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
}

.trace-btn {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  padding: 0;
}

/* display:flex ci-dessus écrase sinon l’attribut HTML hidden */
.trace-btn[hidden] {
  display: none;
}

.trace-btn.sm {
  width: 44px;
  height: 44px;
}

.trace-btn.active {
  background: #009ee2;
  color: #fff;
}

.trace-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.trace-icon {
  display: block;
}

.trace-panel {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 3.6rem;
  z-index: 3;
  background: rgba(46, 46, 46, 0.95);
  color: #fff;
  border-radius: 10px;
  padding: 12px 2rem 12px 12px;
  max-height: calc(50% - env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.trace-panel .trace-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.trace-panel .trace-k {
  color: #aaaaaa;
  font-size: 12px;
  font-weight: 700;
}

.trace-panel .trace-v {
  font-size: 14px;
  margin-bottom: 4px;
}

.trace-close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

.map-scale {
  position: absolute;
  right: 12px;
  bottom: 3.6rem; /* au-dessus de .map-toolbar, comme .ign-attribution */
  z-index: 2;
  pointer-events: none;
}

.map-scale.panel-open {
  bottom: calc(3.6rem + 168px);
}

.map-scale-label {
  text-align: center;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 0 2px #fff, 0 0 3px #fff;
  margin-bottom: 2px;
}

.map-scale-bar {
  display: flex;
  height: 8px;
  border: 1.5px solid #000;
  box-sizing: border-box;
}

.map-scale-bar span {
  flex: 1;
  border-right: 1.5px solid #000;
}

.map-scale-bar span:last-child {
  border-right: 0;
}

.map-scale-bar span:nth-child(odd) {
  background: #fff;
}

.map-scale-bar span:nth-child(even) {
  background: #000;
}
