/* ==========================================
   LAXOU MAP APP - DESIGN SYSTEM & STYLES
   ========================================== */

:root {
  /* Color Palette - Dark Mode (Default) */
  --bg-primary: #0f172a;
  --bg-secondary: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.75);
  --glass-border: rgba(255, 255, 255, 0.12);
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-hover: rgba(51, 65, 85, 0.85);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Accent Colors */
  --accent-primary: #6366f1; /* Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --accent-secondary: #06b6d4; /* Cyan */
  --accent-success: #10b981;
  --accent-warning: #f59e0b;

  /* Fonts */
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Layout Dimensions */
  --header-height: 70px;
  --footer-height: 40px;
  --sidebar-width: 380px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-main: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --backdrop-blur: blur(16px);
}

/* Light Theme Overrides */
body.light-mode {
  --bg-primary: #f1f5f9;
  --bg-secondary: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.08);
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-hover: #ffffff;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --shadow-main: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

/* Reset & Global Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* App Main Container */
#app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* ==========================================
   HEADER / NAVBAR
   ========================================== */
.glass-header {
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

.brand-text h1 span {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text .subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Search Box */
.search-box {
  position: relative;
  width: 320px;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 2.6rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

body.light-mode .search-box input {
  background: rgba(0, 0, 0, 0.04);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255, 255, 255, 0.12);
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

#clear-search-btn {
  position: absolute;
  right: 0.8rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 50%;
}

#clear-search-btn:hover {
  color: var(--text-primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.action-btn:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px var(--accent-glow);
}

.action-btn.icon-only {
  padding: 0.55rem;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  justify-content: center;
}

.badge {
  background: var(--accent-primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

/* ==========================================
   MAIN CONTENT & MAP
   ========================================== */
.main-content {
  flex: 1;
  position: relative;
  display: flex;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  width: 100%;
}

#map-view {
  flex: 1;
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 1;
  background-color: var(--bg-primary);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

#map-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  cursor: grab;
}

#map-canvas:active {
  cursor: grabbing;
}

.marker-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.map-zoom-controls {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 900;
}

.map-ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-main);
  transition: all 0.25s ease;
}

.map-ctrl-btn:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* Category Filter Floating Bar */
.categories-wrapper {
  position: absolute;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  max-width: 90%;
}

.categories-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  padding: 0.4rem;
  border-radius: 40px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-main);
  overflow-x: auto;
  scrollbar-width: none;
}

.categories-container::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 30px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-chip:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.category-chip.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ==========================================
   SIDEBAR (PLACES LIST)
   ========================================== */
.glass-sidebar {
  position: absolute;
  right: 1.2rem;
  top: 1.2rem;
  bottom: 1.2rem;
  width: var(--sidebar-width);
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
  z-index: 950;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
  overflow: hidden;
}

.glass-sidebar:not(.open) {
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.2rem 0.8rem 1.2rem;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-header h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.sidebar-stats {
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.1);
}

.places-grid {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Place Card Item */
.place-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.place-card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.place-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.place-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.category-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.56rem;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  white-space: nowrap;
}

.place-address {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.place-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================
   DETAIL DRAWER / PANEL
   ========================================== */
.detail-drawer {
  position: absolute;
  left: 1.2rem;
  bottom: 1.2rem;
  width: 360px;
  max-height: 75%;
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
  z-index: 960;
  padding: 1.5rem;
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-drawer.hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

.drawer-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.detail-header {
  margin-bottom: 1rem;
}

.detail-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.detail-info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.detail-info-row i {
  color: var(--accent-primary);
  margin-top: 0.2rem;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.tag-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-secondary);
}

/* ==========================================
   FOOTER
   ========================================== */
.glass-footer {
  height: var(--footer-height);
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  z-index: 1000;
}

.dot-separator {
  margin: 0 0.5rem;
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-success);
  margin-right: 0.4rem;
  box-shadow: 0 0 8px var(--accent-success);
}

.hidden {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .search-box {
    width: 180px;
  }
  .brand-text .subtitle {
    display: none;
  }
  .glass-sidebar {
    left: 0.8rem;
    right: 0.8rem;
    width: auto;
  }
  .detail-drawer {
    left: 0.8rem;
    right: 0.8rem;
    width: auto;
  }
}

/* ==========================================
   MARKER OVERLAY STYLES (M3)
   ========================================== */

.marker-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.map-marker {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
  /* Centrer le marqueur sur son point géographique */
  transform-origin: center bottom;
  will-change: transform;
  transition: filter 0.2s ease;
}

/* Pin du marqueur - cercle coloré avec icône */
.marker-pin {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  background: var(--marker-color, var(--accent-primary));
  transform: rotate(-45deg) translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(255, 255, 255, 0.15);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.marker-pin i {
  transform: rotate(45deg);
  color: white;
  font-size: 0.82rem;
}

/* Effet de survol du marqueur */
.map-marker:hover .marker-pin,
.map-marker.hovered .marker-pin {
  transform: rotate(-45deg) translateX(-50%) scale(1.2);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 0 4px rgba(255, 255, 255, 0.25),
    0 0 20px
      color-mix(
        in srgb,
        var(--marker-color, var(--accent-primary)) 50%,
        transparent
      );
  z-index: 20;
}

/* Marqueur actif / sélectionné - Mise au premier plan absolue */
.leaflet-marker-icon:has(.map-marker.active),
.map-marker.active {
  z-index: 99999 !important;
}

.map-marker.active .marker-pin {
  transform: rotate(-45deg) translateX(-50%) scale(1.35) !important;
  background: var(--accent-secondary, #3b82f6) !important;
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 8px #2563eb,
    0 0 25px #2563eb,
    0 8px 30px rgba(37, 99, 235, 0.6) !important;
  animation: marker-active-glow 1.8s ease-in-out infinite alternate !important;
}

/* Animation de halo bleu néon pour le marqueur actif */
@keyframes marker-active-glow {
  0% {
    box-shadow:
      0 0 0 4px #ffffff,
      0 0 0 8px #2563eb,
      0 0 25px #2563eb,
      0 8px 30px rgba(37, 99, 235, 0.6);
  }
  100% {
    box-shadow:
      0 0 0 5px #ffffff,
      0 0 0 11px #3b82f6,
      0 0 40px #3b82f6,
      0 12px 40px rgba(59, 130, 246, 0.8);
  }
}

/* Label du marqueur - masqué par défaut */
.marker-label {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  transform: translateX(-50%) translateY(-100%) scale(0.85);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

/* Afficher le label UNIQUEMENT au survol ou à la sélection */
.map-marker:hover .marker-label,
.map-marker.hovered .marker-label,
.map-marker.active .marker-label {
  opacity: 1;
  transform: translateX(-50%) translateY(-100%) scale(1);
}

/* Custom MarkerCluster Styles (Leaflet) */
.custom-marker-cluster {
  background: transparent;
  border: none;
}

.custom-cluster-inner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.9),
    rgba(147, 51, 234, 0.9)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 6px 20px rgba(37, 99, 235, 0.4),
    0 0 15px rgba(147, 51, 234, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  font-family: var(--font-heading);
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease;
  cursor: pointer;
}

.custom-cluster-inner:hover {
  transform: scale(1.18);
  box-shadow:
    0 8px 25px rgba(37, 99, 235, 0.6),
    0 0 25px rgba(147, 51, 234, 0.5);
}

.marker-cluster-medium .custom-cluster-inner {
  background: linear-gradient(
    135deg,
    rgba(234, 88, 12, 0.95),
    rgba(217, 119, 6, 0.95)
  );
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

.marker-cluster-large .custom-cluster-inner {
  background: linear-gradient(
    135deg,
    rgba(225, 29, 72, 0.95),
    rgba(147, 51, 234, 0.95)
  );
  box-shadow: 0 6px 25px rgba(225, 29, 72, 0.5);
}

/* Focus visible pour la navigation clavier */
.map-marker:focus-visible {
  outline: none;
}

.map-marker:focus-visible .marker-pin {
  outline: 3px solid var(--accent-secondary);
  outline-offset: 3px;
  transform: rotate(-45deg) translateX(-50%) scale(1.15);
}

/* Badge NPRNU sur les marqueurs */
.map-marker.nprnu .marker-pin::after {
  content: "★";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: var(--accent-warning);
  border-radius: 50%;
  font-size: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transform: rotate(45deg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   SIDEBAR CONTROLLER STYLES (M3)
   ========================================== */

/* Carte de lieu sélectionnée */
.place-card.selected {
  border-left: 3px solid var(--accent-primary);
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

/* Focus visible pour les cartes clavier */
.place-card:focus-visible {
  outline: 3px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* Badge NPRNU dans les cartes */
.nprnu-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Tag de catégorie avec couleur dynamique */
.category-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.56rem;
  border-radius: 12px;
  background: color-mix(
    in srgb,
    var(--cat-color, var(--accent-primary)) 15%,
    transparent
  );
  color: var(--cat-color, var(--accent-primary));
  border: 1px solid
    color-mix(in srgb, var(--cat-color, var(--accent-primary)) 30%, transparent);
  white-space: nowrap;
}

/* Image d'en-tête du tiroir de détails */
.detail-image-header {
  width: calc(100% + 3rem);
  height: 160px;
  margin: -1.5rem -1.5rem 1rem -1.5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.detail-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg-glass) 100%);
}

.detail-body {
  position: relative;
}

.detail-description {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.detail-coords {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: "SF Mono", "Cascadia Code", monospace;
}

.detail-coords i {
  color: var(--accent-secondary);
}

.detail-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.detail-link:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

/* Message aucun résultat */
.empty-results {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.empty-results i {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  opacity: 0.4;
  display: block;
}

.empty-results p {
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ==========================================
   ADMIN INTERFACE & MODALS STYLES
   ========================================== */

/* Bouton d'action Admin connecté */
.action-btn.admin-active {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.4);
}

/* Bannière d'administration dans le panneau latéral */
.admin-banner {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.15),
    rgba(16, 185, 129, 0.15)
  );
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.8rem;
  margin: 0.5rem 0.8rem 0.8rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-banner-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-sm-btn {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.admin-sm-btn.success {
  background: rgba(16, 185, 129, 0.25);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.admin-sm-btn.success:hover {
  background: #10b981;
  color: white;
}

.admin-sm-btn.primary {
  background: rgba(37, 99, 235, 0.25);
  color: #3b82f6;
  border: 1px solid rgba(37, 99, 235, 0.4);
}

.admin-sm-btn.primary:hover {
  background: #3b82f6;
  color: white;
}

.admin-sm-btn.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.admin-sm-btn.danger:hover {
  background: #ef4444;
  color: white;
}

/* Boutons d'édition Admin sur les cartes */
.admin-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--glass-border);
}

.btn-admin-edit,
.btn-admin-delete {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.2s ease;
}

.btn-admin-edit {
  background: rgba(37, 99, 235, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.btn-admin-edit:hover {
  background: #2563eb;
  color: white;
}

.btn-admin-delete {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-admin-delete:hover {
  background: #ef4444;
  color: white;
}

.admin-drawer-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.btn-admin-primary,
.btn-admin-danger {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-admin-primary {
  background: var(--accent-primary);
  color: white;
}

.btn-admin-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-admin-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-admin-danger:hover {
  background: #ef4444;
  color: white;
}

/* Modales d'administration */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  width: 100%;
  max-width: 440px;
  background: var(--bg-glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content.modal-lg {
  max-width: 680px;
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-help {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.login-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.1);
}

.checkbox-group label {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-primary-full {
  width: 100%;
  padding: 0.75rem 1.2rem;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
  margin-top: 0.5rem;
}

.btn-primary-full:hover {
  background: var(--accent-primary-hover);
}

.btn-primary-full:active {
  transform: scale(0.98);
}
