/* ========================================
   SIG Antilles — App Page (Carte)
   Premium Design — app-specific styles
   ======================================== */

/* Reset + base (landing.css CSS variables are inherited) */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--off-white);
  overflow: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 190;
  background: var(--navy);
}

body::before {
  top: 0;
  height: var(--header-h);
}

body::after {
  bottom: 0;
  height: var(--footer-h);
}

.l-header,
.l-footer {
  isolation: isolate;
}

.l-header.is-scrolled {
  background: rgba(10, 25, 47, 0.98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.l-footer {
  background: rgba(6, 14, 27, 0.98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ========================================
   Main container — fills space between fixed header & footer
   ======================================== */

.main-container {
  display: flex;
  position: fixed;
  top: var(--header-h);
  bottom: var(--footer-h);
  left: 0;
  right: 0;
  z-index: 10;        /* below header (200) and footer (210) */
  overflow: hidden;   /* clip any Leaflet pane overflow */
}

/* ========================================
   Sidebar
   ======================================== */

.sidebar {
  width: 380px;
  background: rgba(17, 34, 64, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar.collapsed {
  transform: translateX(-340px);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(100, 255, 218, 0.04);
  flex-shrink: 0;
}

.sidebar-header h2 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toggle-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--off-white);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.toggle-btn:hover {
  background: var(--teal-dim);
  border-color: var(--teal);
  color: var(--teal);
}

.sidebar.collapsed .toggle-icon { transform: rotate(180deg); }

/* ========================================
   Search Panel
   ======================================== */

.search-panel {
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.search-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
  font-family: var(--font-body);
}

.tab-btn.active {
  background: var(--teal-dim);
  border-color: var(--teal);
  color: var(--teal);
}

.tab-btn:not(.active):hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--off-white);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.search-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-hint {
  margin-top: -0.2rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
}

.search-input {
  flex: 1;
  padding: 0.65rem 0.875rem;
  background: rgba(10, 25, 47, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--off-white);
  font-family: var(--font-body);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.search-input::placeholder { color: var(--muted); }

.search-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal-glow);
}

.search-btn {
  padding: 0.65rem 1rem;
  background: var(--teal);
  color: var(--navy);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.25s;
}

.search-btn:hover {
  background: rgba(100, 255, 218, 0.82);
  transform: scale(1.06);
}

.search-results {
  max-height: 260px;
  overflow-y: auto;
}

.result-item {
  padding: 0.7rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.83rem;
  color: var(--off-white);
  background: var(--glass);
}

.result-item:hover {
  background: var(--teal-dim);
  border-color: rgba(100, 255, 218, 0.35);
  transform: translateX(4px);
}

/* Parcel search */
.parcel-search {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Section + Numéro côte à côte */
.parcel-search .parcel-sub {
  flex: 1;
  min-width: 0;
}

.parcel-search:has(.parcel-sub) {
  flex-wrap: wrap;
}

.parcel-search .parcel-sub:first-of-type ~ .parcel-sub {
  display: flex;
}

/* Wrapper inline pour les deux selects sur une ligne */
.parcel-row {
  display: flex;
  gap: 0.5rem;
}

.parcel-row .form-select {
  flex: 1;
  min-width: 0;
}

.form-select,
.form-input {
  padding: 0.65rem 0.875rem;
  background: rgba(10, 25, 47, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--off-white);
  font-family: var(--font-body);
  transition: border-color 0.25s, box-shadow 0.25s;
  width: 100%;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238892b0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.25rem;
}

.form-select option {
  background: var(--navy-mid);
  color: var(--off-white);
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal-glow);
}

.form-input::placeholder { color: var(--muted); }

.btn-primary {
  padding: 0.75rem;
  background: var(--teal);
  color: var(--navy);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.25s;
  font-family: var(--font-body);
}

.btn-primary:hover {
  background: rgba(100, 255, 218, 0.82);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--teal-glow);
}

/* ========================================
   Results Panel
   ======================================== */

.results-panel {
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.results-header h3 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-clear {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-clear:hover {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.45);
  color: #ff6b6b;
}

.parcel-info {
  background: rgba(10, 25, 47, 0.5);
  border: 1px solid var(--glass-border);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.parcel-info h4 {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.constraints-inline-title {
  margin-top: 0.85rem;
}

.parcel-info p {
  font-size: 0.875rem;
  color: var(--off-white);
  margin-bottom: 0.3rem;
}

.constraints-section { margin-bottom: 1rem; }

.constraints-section h4 {
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--off-white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.constraint-item {
  padding: 0.7rem 0.875rem;
  border-left: 3px solid var(--teal);
  border-top: 1px solid var(--glass-border);
  border-right: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(10, 25, 47, 0.45);
  margin-bottom: 0.4rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.constraint-item.low    { border-left-color: #64ffda; }
.constraint-item.medium { border-left-color: #f3c74b; }
.constraint-item.high   { border-left-color: #ff6b6b; }

.constraint-item h5 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.83rem;
  margin-bottom: 0.3rem;
  color: var(--off-white);
}

/* Ligne de légende dans un bloc contrainte : pastille + libellé */
.constraint-legend-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.15rem 0 0.3rem 0;
}

/* Pastille couleur de zone (légende détaillée) */
.zone-swatch {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.35);
  flex-shrink: 0;
}

/* Pastille couleur de niveau (titre de contrainte) */
.level-swatch {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
  margin-right: 4px;
  vertical-align: middle;
}

/* Rectangle couleur dominante (PPRN / Défrichement) — mini-légende dans le titre */
.dominant-swatch {
  display: inline-block;
  width: 34px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.45);
  flex-shrink: 0;
  margin-right: 4px;
  vertical-align: middle;
}

.actions-section {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-action {
  flex: 1;
  padding: 0.6rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--off-white);
  transition: all 0.2s;
  font-family: var(--font-body);
}

.btn-action:hover {
  background: var(--teal-dim);
  border-color: rgba(100, 255, 218, 0.4);
  color: var(--teal);
}

.disclaimer {
  padding: 0.7rem 0.875rem;
  background: rgba(243, 199, 75, 0.07);
  border: 1px solid rgba(243, 199, 75, 0.28);
  border-radius: var(--radius-sm);
  font-size: 0.71rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ========================================
   Layers Panel
   ======================================== */

.layers-panel {
  padding: 1.125rem 1.25rem;
  flex: 1;
}

.layers-panel h3 {
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.layers-panel h4 {
  font-size: 0.68rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.base-layers-control { margin-bottom: 1rem; }

.layers-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.layer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.625rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  gap: 0.5rem;
}

.layer-item:hover {
  background: var(--teal-dim);
  border-color: rgba(100, 255, 218, 0.2);
}

.layer-info {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex: 1;
}

.layer-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.layer-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.layer-label {
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
  color: var(--off-white);
}

.layer-source-url {
  font-size: 0.62rem;
  line-height: 1.25;
  color: var(--muted);
  font-style: italic;
  cursor: help;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.layer-source-url:hover {
  color: var(--teal);
  text-decoration: underline;
}

.opacity-value {
  min-width: 45px;
  font-size: 0.75rem;
  color: #7f8c8d;
}

/* ── Badges statut cache ─────────────────────────────────── */
.layer-cache-badge {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 6px;
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 3px;
  line-height: 1.6;
  cursor: default;
  transition: opacity 0.3s;
}

.badge-hidden   { display: none; }

.badge-live     { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35); }
.badge-cache    { background: rgba(251, 191, 36, 0.13); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.badge-stale    { background: rgba(249, 115, 22, 0.13); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-error    { background: rgba(239,  68,  68, 0.13); color: #ef4444; border: 1px solid rgba(239,  68,  68, 0.3); }

.layer-cache-updated {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  line-height: 1.25;
  font-style: italic;
  color: var(--muted);
}

.layer-opacity {
  width: 72px;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: rgba(100, 255, 218, 0.18);
  border-radius: 2px;
  outline: none;
}

.layer-opacity::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  background: var(--teal);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 5px var(--teal-glow);
}

.layer-opacity::-moz-range-thumb {
  width: 11px;
  height: 11px;
  background: var(--teal);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 5px var(--teal-glow);
}

hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 0.875rem 0;
}

/* ========================================
   Map Container
   ======================================== */

.map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

.leaflet-container {
  background: #ffffff;
}

#map .leaflet-bottom.leaflet-left {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  z-index: 500;
}

#map .leaflet-bottom.leaflet-left .leaflet-control {
  margin-bottom: 10px;
}

.center-coordinates-control {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 5px 9px;
  background: rgba(10, 25, 47, 0.94);
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--off-white);
  font-size: 0.66rem;
  line-height: 1.2;
  min-height: 24px;
}

.center-coordinates-label {
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#centerCoordinatesValue {
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.map-controls {
  position: fixed;
  top: calc(var(--header-h) + 1rem);
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1200;
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.map-container:fullscreen .map-controls,
.map-container:-webkit-full-screen .map-controls {
  top: 1rem;
}

.control-btn {
  width: 42px;
  height: 42px;
  background: rgba(17, 34, 64, 0.9);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--off-white);
}

.control-btn:hover {
  background: var(--teal-dim);
  border-color: var(--teal);
  color: var(--teal);
  transform: scale(1.08);
  box-shadow: 0 0 16px var(--teal-glow);
}

.loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17, 34, 64, 0.94);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.45);
  text-align: center;
  z-index: 600;
  color: var(--off-white);
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 1rem;
  border: 3px solid var(--glass-border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

/* ========================================
   Modals
   ======================================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(6, 14, 27, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
  background: rgba(17, 34, 64, 0.97);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(100, 255, 218, 0.06);
  animation: modal-in 0.3s var(--spring) forwards;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--off-white);
  font-family: var(--font-display);
}

.modal-close {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.modal-close:hover {
  background: rgba(255, 107, 107, 0.14);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff6b6b;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  color: var(--off-white);
  line-height: 1.7;
  font-size: 0.88rem;
}

.modal-body h3 {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 1.25rem 0 0.5rem;
}

.modal-body h3:first-child { margin-top: 0; }

.modal-body ul,
.modal-body ol {
  padding-left: 1.25rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.modal-body li { margin-bottom: 0.3rem; }

.modal-body strong { color: var(--off-white); font-weight: 600; }

.modal-body p {
  margin-bottom: 0.75rem;
  color: var(--muted);
}

/* ========================================
   Leaflet overrides — premium dark skin
   ======================================== */

.leaflet-control-zoom a {
  background: rgba(17, 34, 64, 0.9) !important;
  color: var(--off-white) !important;
  border-color: var(--glass-border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--teal-dim) !important;
  color: var(--teal) !important;
}

.leaflet-bar {
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

.leaflet-control-attribution {
  background: rgba(6, 14, 27, 0.72) !important;
  color: var(--muted) !important;
  backdrop-filter: blur(6px);
  font-size: 0.7rem !important;
}

.leaflet-control-attribution a { color: var(--teal) !important; }

/* ========================================
   Parcel numbers labels
   ======================================== */

.parcel-num-icon {
  background: transparent;
  border: none;
}

.parcel-num-label {
  display: inline-block;
  transform: translate(-50%, -50%);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(168, 200, 232, 0.45);
  background: rgba(10, 25, 47, 0.82);
  color: #d0e4f7;
  font-size: 0.73rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

.parcel-num-label.is-selected {
  background: rgba(255, 107, 53, 0.95);
  border-color: rgba(255, 140, 80, 1);
  color: #0a192f;
  font-weight: 800;
  box-shadow: 0 0 7px rgba(255, 107, 53, 0.65);
}

.selected-parcel-caption-icon {
  background: transparent;
  border: none;
}

.selected-parcel-caption {
  transform: translate(-50%, -100%);
  margin-top: -8px;
  min-width: 120px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 128, 90, 0.75);
  background: rgba(12, 24, 40, 0.92);
  color: #ffe5dc;
  line-height: 1.2;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  white-space: nowrap;
}

.selected-parcel-caption-ref {
  letter-spacing: 0.02em;
}

.selected-parcel-caption-area {
  font-size: 0.78em;
  font-weight: 600;
  color: #ffd0c2;
  margin-top: 2px;
}

.selected-parcel-side-icon {
  background: transparent;
  border: none;
}

.selected-parcel-side-label {
  display: inline-block;
  padding: 0px 4px;
  border-radius: 3px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  font-weight: 500;
  text-shadow: 0 0 3px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.7);
  line-height: 1.15;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.parcel-sides-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

.parcel-side-item {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  color: #d7e7f6;
}

/* ========================================
   Utilities
   ======================================== */

.hidden { display: none !important; }

.text-danger  { color: #ff6b6b; }
.text-success { color: var(--teal); }
.text-warning { color: #f3c74b; }

/* Opacity value inline spans */
#opacity-osm-value,
#opacity-satellite-value,
#opacity-parcel-value,
#opacity-nearby-parcels-value {
  font-size: 0.7rem;
  color: var(--muted);
  min-width: 38px;
  text-align: right;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    height: 100%;
    width: 100%;
    max-width: 340px;
    z-index: 300;
  }

  .sidebar.collapsed {
    transform: translateX(-100%);
  }

  .modal-content {
    width: 94%;
    margin: 0 auto;
  }
}

/* ── Impression / Export PDF ─────────────────────────────────────────────── */
@media print {
  /* Forcer l'impression des couleurs de fond (swatches, badges) */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}


