/* ============================
   VARIABLES & RESET
   ============================ */
:root {
  --bg-1: #060709;
  --bg-2: #0e1114;
  --card: rgba(255,255,255,0.03);
  --glass-border: rgba(255,255,255,0.06);
  --accent: #ff3b30;
  --muted: rgba(255,255,255,0.6);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

*, *::before, *::after {
  box-sizing: border-box;
}




html {
  height: 100%;
  filter: brightness(1.35);
}

body {
  height: 100%;
  margin: 0;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: #eaeef7;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}






/* ============================
   LOGIN SCREEN
   ============================ */

#password-container {
  position: fixed;
  inset: 0;
  background: #0f172a;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 999999;
  overflow: hidden;
}

.login-card {
  position: relative;
  width: min(1400px, 100%);
  height: min(900px, 92vh);
  border-radius: 18px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 25px 80px rgba(0,0,0,0.45);
}

#europe-map-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.login-overlay {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  width: max-content;
  max-width: calc(100% - 32px);
}

#password-input {
  width: 240px;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 15px;
  outline: none;
}

#password-input:focus {
  border-color: rgba(200,255,0,0.5);
}

#btn-login {
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ============================
   LAYOUT PRINCIPAL
   ============================ */

.dashboard {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ============================
   TOP TABS
   ============================ */

.top-tabs {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(10,10,12,0.98);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  gap: 0;
  overflow: hidden;
}

.browser-tabs {
  display: flex;
  gap: 4px;
  overflow: hidden;
}

.browser-tab {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.4);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.browser-tab:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
}

.browser-tab.active {
  background: rgba(255,255,255,0.08);
  color: #eaeef7;
}

.nav-back {
  margin-right: 12px;
  flex-shrink: 0;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-back:hover {
  background: rgba(255,255,255,0.09);
  color: #eaeef7;
}

/* ============================
   TAB PAGES
   ============================ */

.tab-page {
  display: none;
  flex: 1;
  min-height: 0;
}

.active-tab {
  display: flex;
}

/* ============================
   APP TAB — INNER LAYOUT (DESKTOP)
   ============================ */

#app-tab {
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  margin: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
}

/* ============================
   COLONNE GAUCHE
   ============================ */

.left {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  overflow-y: auto;
  padding: 4px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  transition: border-color 0.2s;
}

.left::-webkit-scrollbar { width: 4px; }
.left::-webkit-scrollbar-track { background: transparent; }
.left::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.left:hover { border-color: rgba(255,255,255,0.1); }

/* ============================
   BRAND
   ============================ */

.brand {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
  margin: 6px;
  flex-shrink: 0;
}

.brand h1 {
  margin: 0 0 4px 0;
  font-size: 17px;
  font-weight: 600;
  color: #ffd84d;
  letter-spacing: 0.2px;
}

.brand p {
  margin: 0;
  color: rgba(255,255,255,0.45);
  font-size: 12px;
}

/* ============================
   CONTROLS
   ============================ */

.controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px;
}

/* ============================
   BOUTONS
   ============================ */

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #eaeef7;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  text-align: center;
  width: 100%;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.45);
  font-size: 12px;
}

.btn.secondary:hover {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.1);
}

/* ============================
   CITY / THEME BUTTONS
   ============================ */

#btn-city,
#btn-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
}

/* ============================
   COLONNE CENTRE
   ============================ */

.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.map-card {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
}

.map-card::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(255,216,77,0.06), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.map-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 50px; 
  box-sizing: border-box; 
}



/* Circle map — desktop: use the smaller of width/height */
.map-circle {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: unset;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
  flex-shrink: 0;
  flex: 1;
}

#map {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  filter: brightness(1) saturate(1.4);
}

.map-status {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 5px 10px;
  font-size: 12px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
}

/* ============================
   COLONNE DROITE
   ============================ */

.right {
  width: 200px;
  min-width: 190px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 4px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  transition: border-color 0.2s;
}

.right::-webkit-scrollbar { width: 4px; }
.right::-webkit-scrollbar-track { background: transparent; }
.right::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.right:hover { border-color: rgba(255,255,255,0.1); }

/* ============================
   DROPDOWNS
   ============================ */

.dropdown {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: rgba(18,18,22,0.98);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  max-height: 55vh;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  backdrop-filter: blur(14px);
  margin-top: 4px;
}

.dropdown::-webkit-scrollbar { width: 3px; }
.dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ============================
   THEMES — ACCORDÉON
   ============================ */

.theme-group-toggle {
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: none;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  color: rgba(255,255,255,0.7);
  width: 100%;
  text-align: left;
}

.theme-group-toggle:hover {
  background: rgba(255,255,255,0.06);
  color: #eaeef7;
}

.theme-group-toggle.active { color: #eaeef7; }

.theme-submenu {
  display: none;
  padding-left: 8px;
  margin-top: 2px;
  flex-direction: column;
  gap: 2px;
}

.theme-submenu.open { display: flex; }

.theme-submenu div {
  padding: 6px 10px;
  border-radius: 7px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

.theme-submenu div:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

.theme-submenu div.selected {
  background: rgba(255, 59, 48, 0.15);
  color: #ff7b73;
}

/* ============================
   CITY DROPDOWN
   ============================ */

#city-dropdown div[data-city] {
  padding: 8px 10px;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

#city-dropdown div[data-city]:hover {
  background: rgba(255,255,255,0.06);
  color: #eaeef7;
}

#city-dropdown div.selected {
  background: rgba(255, 59, 48, 0.15);
  color: #ff7b73;
}

/* ============================
   LÉGENDE
   ============================ */

.legend {
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
}

/* ============================
   INFO PANEL
   ============================ */

#info-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  flex-direction: column;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.6;
}

/* ============================
   ADRESSE
   ============================ */

.address-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#address-input {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #eaeef7;
  font-weight: 400;
  font-size: 13px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, background 0.2s;
  font-family: 'Inter', sans-serif;
}

#address-input:focus {
  border-color: rgba(255, 59, 48, 0.45);
  background: rgba(255,255,255,0.06);
}

#address-input::placeholder {
  color: rgba(255,255,255,0.25);
}

.address-limit {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  text-align: right;
}

/* ============================
   MARKERS ADRESSE
   ============================ */

.address-marker { position: relative; }

.address-marker .dot {
  width: 10px;
  height: 10px;
  background: #ff3b30;
  border-radius: 50%;
  border: 2px solid white;
}

.address-marker .close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 14px;
  height: 14px;
  font-size: 10px;
  background: #111;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ============================
   ZOOM
   ============================ */

.custom-zoom-container {
  display: flex;
  flex-direction: row;
  gap: 6px;
}

.custom-zoom-container .btn {
  width: 44px;
  height: 40px;
  padding: 0;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

/* ============================
   TOOLTIPS LEAFLET
   ============================ */

.foliumtooltip,
.leaflet-tooltip {
  background: rgba(10,10,12,0.95) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  font-size: 12px;
  max-width: 220px;
  white-space: normal;
}

/* ============================
   PAGE CONTENT (TARIFS, ABOUT)
   ============================ */

.tab-page#pricing-tab,
.tab-page#about-tab {
  overflow-y: auto;
}

.page-content {
  padding: 40px 60px;
  color: white;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: min-content;
}

/* ============================
   PRICING
   ============================ */

.pricing-header {
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.pricing-header h1 {
  font-size: 28px;
  color: #ffd84d;
  margin: 0 0 8px;
}

.pricing-header p {
  color: rgba(255,255,255,0.6);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  width: 100%;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.plan-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}

.plan-card:hover { border-color: rgba(255,255,255,0.18); }

.plan-card.featured {
  border: 2px solid rgba(100,160,255,0.55);
}

.plan-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(100,160,255,0.15);
  color: #90c0ff;
  margin-bottom: 6px;
}

.plan-name {
  font-size: 15px;
  font-weight: 600;
  color: #ffd84d;
  margin-bottom: 2px;
}

.plan-price {
  font-size: 20px;
  font-weight: 700;
  color: #eaeef7;
}

.plan-price span {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
}

.plan-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  flex: 1;
  margin: 0;
}

.plan-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin: 0;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.plan-features li {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

.contact-btn { margin-top: 4px; }

.featured-cta {
  background: rgba(100,160,255,0.15) !important;
  border-color: rgba(100,160,255,0.4) !important;
  color: #90c0ff !important;
}

.pricing-note {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  flex-shrink: 0;
}

/* ============================
   ABOUT
   ============================ */

.about-hero {
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-shrink: 0;
}

.about-logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.about-hero-text h1 {
  font-size: 22px;
  font-weight: 600;
  color: #ffd84d;
  margin: 0 0 8px;
}

.about-hero-text p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin: 0;
}

.about-section {
  margin-bottom: 1.2rem;
  flex-shrink: 0;
}

.about-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: #eaeef7;
  margin: 0 0 1rem;
}

.about-section p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  margin-bottom: 10px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 1.2rem;
  flex-shrink: 0;
}

.pillar-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 1rem;
}

.pillar-icon {
  font-size: 22px;
  margin-bottom: 8px;
}

.pillar-card strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #eaeef7;
  margin-bottom: 5px;
}

.pillar-card p {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  margin: 0;
}

/* ============================
   SOCIAL SECTION
   ============================ */

.social-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.social-card {
  position: relative;
  display: block;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.social-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

.social-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 3px;
  height: 100%;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s ease;
}

.social-card:hover::after { transform: scaleY(1); }
.social-card.instagram::after { background: linear-gradient(180deg, #f9ce34, #ee2a7b, #6228d7); }
.social-card.linkedin::after  { background: #0A66C2; }
.social-card.website::after   { background: #ffd84d; }

.social-title {
  font-size: 14px;
  font-weight: 600;
  color: #eaeef7;
  margin-bottom: 4px;
}

.social-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
}

/* ============================
   CONTACT MODAL
   ============================ */

.contact-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.contact-modal.active {
  opacity: 1;
  visibility: visible;
}

.contact-modal-content {
  width: min(92%, 520px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 40px rgba(0,0,0,0.45), inset 0 1px 1px rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.35s ease, opacity 0.35s ease;
  position: relative;
}

.contact-modal.active .contact-modal-content {
  transform: translateY(0) scale(1);
}

.contact-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: white;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.contact-close:hover {
  background: rgba(255,255,255,0.14);
  transform: rotate(90deg);
}

.contact-modal-content h3 {
  font-size: 24px;
  margin: 0 0 10px;
  color: white;
}

.contact-modal-content p {
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  margin-bottom: 22px;
  font-size: 14px;
}

.contact-modal-content input,
.contact-modal-content textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: white;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.contact-modal-content textarea {
  min-height: 130px;
  resize: none;
}

.contact-modal-content input:focus,
.contact-modal-content textarea:focus {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
}

.contact-send-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  background: white;
  color: black;
  transition: opacity 0.2s, transform 0.2s;
}

.contact-send-btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

/* ============================
   VERROUS D'ACCÈS
   ============================ */

.theme-submenu div[data-theme].theme-locked {
  opacity: 0.38;
  cursor: not-allowed;
  position: relative;
}

.theme-submenu div[data-theme].theme-locked::after {
  content: "🔒";
  font-size: 0.7em;
  margin-left: 6px;
  opacity: 0.7;
}

#btn-scan-save:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
}

#city-dropdown div[data-city].city-locked {
  opacity: 0.38;
  cursor: not-allowed;
  position: relative;
  pointer-events: auto;
}

#city-dropdown div[data-city].city-locked::after {
  content: "🔒";
  font-size: 0.7em;
  margin-left: 6px;
  opacity: 0.7;
}

/* ============================
   RESPONSIVE — 1400px
   (grands écrans : pricing sur 1 ligne)
   ============================ */

@media (max-width: 1400px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================
   RESPONSIVE — 1200px
   (tablette paysage / petits laptops)
   ============================ */

@media (max-width: 1200px) {
  .left  { width: 230px; min-width: 230px; max-width: 230px; }
  .right { width: 180px; min-width: 170px; }

  .map-circle {
    width: min(100%, calc(100vh - 180px));
    height: min(100%, calc(100vh - 180px));
    max-width: 500px;
    max-height: 500px;
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-content { padding: 32px 40px; }
}

/* ============================
   RESPONSIVE — 1024px
   (tablette paysage)
   ============================ */

@media (max-width: 1024px) {
  #app-tab {
    gap: 10px;
    padding: 10px;
    margin: 8px;
  }

  .left  { width: 200px; min-width: 200px; max-width: 200px; }
  .right { width: 165px; min-width: 155px; }

  .map-circle {
    max-width: 420px;
    max-height: 420px;
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================
   RESPONSIVE — 900px
   (tablette portrait / mobile paysage large)
   ============================ */

@media (max-width: 900px) {

  /* App tab : bascule en colonne */
  #app-tab {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    margin: 8px;
    gap: 10px;
    height: auto;
    max-height: calc(100vh - 52px - 16px);
    border-radius: 14px;
  }

  /* Colonnes gauche / droite en bandes horizontales */
  .left {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    overflow: visible;
    flex-direction: column;
  }

  .right {
    width: 100%;
    min-width: 0;
    height: auto;
    overflow: visible;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
  }

  /* Éléments de la colonne droite en grille 2 col */
  .right .controls {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .right .controls .legend,
  .right .controls #info-panel,
  .right .controls .address-control {
    flex: 1 1 100%;
  }

  .right .controls .btn,
  .right .controls .custom-zoom-container {
    flex: 1 1 calc(50% - 4px);
    min-width: 120px;
  }

  .right .controls .custom-zoom-container {
    display: flex;
    gap: 6px;
  }

  /* Carte : rectangle plein sur tablette portrait */
  .center { width: 100%; order: -1; }

  .map-wrapper {
    width: 100%;
    height: auto;
    max-width: 100%;
    aspect-ratio: auto;
    padding: 0;
  }

  .map-circle {
    width: 100%;
    height: 50vw;
    min-height: 240px;
    max-width: 100%;
    max-height: 420px;
    border-radius: 14px;
    aspect-ratio: auto;
  }

  #map {
    border-radius: 14px;
    width: 100%;
    height: 100%;
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-content { padding: 28px 28px; }
}

/* ============================
   RESPONSIVE — 680px
   (mobile paysage / petite tablette)
   ============================ */

@media (max-width: 680px) {

  /* Top tabs */
  .top-tabs { padding: 0 8px; height: 48px; }
  .browser-tab { padding: 6px 10px; font-size: 12px; }
  .nav-back { width: 32px; height: 32px; font-size: 14px; margin-right: 8px; }

  /* App tab */
  #app-tab { margin: 6px; padding: 8px; gap: 8px; }

  /* Carte plus haute */
  .map-circle {
    height: 60vw;
    min-height: 220px;
    max-height: 360px;
  }

  /* Pricing : 1 colonne */
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .page-content { padding: 24px 20px; }
  .pricing-header h1 { font-size: 22px; }

  .social-section { grid-template-columns: 1fr; gap: 10px; }

  .about-hero { flex-direction: column; gap: 1rem; }
  .about-logo-mark { width: 48px; height: 48px; font-size: 22px; }
  .about-hero-text h1 { font-size: 19px; }
}

/* ============================
   RESPONSIVE — 480px
   (mobile portrait standard)
   ============================ */

@media (max-width: 480px) {

  /* Login */
  .login-card { border-radius: 12px; }

  .login-overlay {
    flex-direction: column;
    width: calc(100% - 24px);
    left: 12px;
    right: 12px;
    bottom: 16px;
    transform: none;
    gap: 10px;
  }

  #password-input { width: 100%; }
  #btn-login { width: 100%; }

  /* Top tabs */
  .browser-tab { padding: 5px 8px; font-size: 11px; }

  /* Dropdowns : plein écran */
  .dropdown {
    max-height: 50vh;
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    z-index: 9000;
    border-radius: 14px;
  }

  /* Carte */
  .map-circle {
    height: 70vw;
    min-height: 200px;
    max-height: 300px;
    border-radius: 12px;
  }

  #map { border-radius: 12px; }

  /* Colonne droite : boutons pleine largeur */
  .right .controls .btn,
  .right .controls .custom-zoom-container {
    flex: 1 1 100%;
  }

  /* Brand */
  .brand h1 { font-size: 15px; }

  /* Page content */
  .page-content { padding: 20px 16px; }
  .pricing-header h1 { font-size: 20px; }
  .plan-card { padding: 16px; }

  /* Modal contact */
  .contact-modal { padding: 12px; }
  .contact-modal-content { padding: 24px 20px; border-radius: 18px; }
  .contact-modal-content h3 { font-size: 20px; }

  .pillars-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================
   RESPONSIVE — 360px
   (très petits mobiles)
   ============================ */

@media (max-width: 360px) {
  .top-tabs { padding: 0 6px; }
  .browser-tab { padding: 5px 7px; font-size: 11px; }
  .nav-back { margin-right: 6px; }

  .map-circle {
    height: 72vw;
    min-height: 180px;
  }

  .page-content { padding: 16px 12px; }
  .pillars-grid { grid-template-columns: 1fr; }
}













/* ================================================
   PATCH UX CARTE — à ajouter à la fin de style.css
   ================================================ */

/* ============================
   PANNEAU THÈMES (remplace le dropdown)
   ============================ */

#theme-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100vh;
  background: rgba(12, 13, 18, 0.98);
  border-right: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 8000;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 40px rgba(0,0,0,0.5);
}

#theme-panel.open {
  transform: translateX(0);
}

.tp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tp-title {
  font-size: 15px;
  font-weight: 600;
  color: #eaeef7;
  letter-spacing: 0.2px;
}

.tp-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.tp-close:hover {
  background: rgba(255,255,255,0.1);
  color: #eaeef7;
}

.tp-search-wrap {
  padding: 10px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

#tp-search {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #eaeef7;
  font-size: 13px;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

#tp-search:focus {
  border-color: rgba(255,59,48,0.5);
  background: rgba(255,255,255,0.08);
}

#tp-search::placeholder {
  color: rgba(255,255,255,0.25);
}

.tp-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 20px;
}

.tp-body::-webkit-scrollbar { width: 4px; }
.tp-body::-webkit-scrollbar-track { background: transparent; }
.tp-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.tp-group {
  margin-bottom: 2px;
}

.tp-cat-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.tp-cat-toggle:hover {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.8);
}

.tp-cat-count {
  margin-left: auto;
  font-size: 10px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4);
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: 500;
}

.tp-chevron {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  transition: transform 0.2s;
}

.tp-cat-items {
  display: none;
  flex-direction: column;
  padding: 2px 8px 6px 16px;
}

.tp-cat-items.open {
  display: flex;
}

.theme-item {
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.12s, color 0.12s;
}

.theme-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

.theme-item.selected {
  background: rgba(255,59,48,0.15);
  color: #ff7b73;
}

.theme-item.theme-locked {
  opacity: 0.38;
  cursor: not-allowed;
}

.ti-label { flex: 1; }

.ti-lock {
  font-size: 11px;
  opacity: 0.7;
}

/* Backdrop pour fermer le panneau */
#theme-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 7999;
  display: none;
}

#theme-panel-backdrop.visible {
  display: block;
}

/* ============================
   INDICATEUR DE CHARGEMENT CARTE
   ============================ */

#map-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6,7,9,0.5);
  border-radius: inherit;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.map-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 28px;
  background: rgba(14,17,20,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
}

.map-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #ff3b30;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

#map-loading-label {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  font-family: 'Inter', sans-serif;
  max-width: 200px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================
   BADGE THÈME ACTIF (sur la carte)
   ============================ */

#active-theme-badge {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 14px;
  background: rgba(10,10,14,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  max-width: calc(100% - 48px);
  white-space: nowrap;
}

.badge-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255,59,48,0.85);
  background: rgba(255,59,48,0.12);
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.badge-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.badge-close {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.badge-close:hover {
  background: rgba(255,59,48,0.3);
  color: #ff7b73;
}

/* ============================
   LÉGENDE ENRICHIE
   ============================ */

.legend-empty {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  font-style: italic;
  line-height: 1.5;
}

.legend-header {
  margin-bottom: 10px;
}

.legend-cat {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,59,48,0.75);
  margin-bottom: 3px;
}

.legend-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  line-height: 1.3;
}

.legend-bar-wrap {
  margin-bottom: 10px;
}

.legend-bar {
  height: 8px;
  border-radius: 4px;
  width: 100%;
  margin-bottom: 4px;
}

.legend-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}

.legend-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.legend-step,
.legend-nd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
}

.legend-swatch {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.legend-range { flex: 1; }

.legend-nd {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ============================
   POPUP CARTE (clic)
   ============================ */

.smart-popup .leaflet-popup-content-wrapper {
  background: rgba(12,13,18,0.97) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6) !important;
  padding: 0 !important;
  backdrop-filter: blur(16px);
  min-width: 200px;
}

.smart-popup .leaflet-popup-tip-container {
  display: none;
}

.smart-popup .leaflet-popup-close-button {
  color: rgba(255,255,255,0.4) !important;
  font-size: 18px !important;
  top: 10px !important;
  right: 10px !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.smart-popup .leaflet-popup-close-button:hover {
  color: rgba(255,255,255,0.8) !important;
}

.smart-popup .leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
}

.popup-inner {
  padding: 16px 18px;
  font-family: 'Inter', sans-serif;
}

.popup-theme-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,59,48,0.8);
  margin-bottom: 6px;
}

.popup-value-big {
  font-size: 22px;
  font-weight: 700;
  color: #eaeef7;
  margin-bottom: 10px;
  line-height: 1;
}

.popup-pct-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 5px;
}

.popup-pct-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.popup-pct-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 10px;
}

.popup-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
}

.popup-key {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  padding: 3px 8px 3px 0;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popup-val {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  padding: 3px 0;
  text-align: right;
}

/* ============================
   TOOLTIP LEAFLET (survol amélioré)
   ============================ */

.leaflet-tooltip {
  background: rgba(10,10,14,0.95) !important;
  color: #eaeef7 !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  font-family: 'Inter', sans-serif !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
  max-width: 220px;
  white-space: normal;
}

.leaflet-tooltip-top::before,
.leaflet-tooltip-bottom::before,
.leaflet-tooltip-left::before,
.leaflet-tooltip-right::before {
  border-color: rgba(10,10,14,0.95) !important;
}

/* ============================
   HIGHLIGHT POLYGONE AU SURVOL
   ============================ */

.leaflet-interactive:hover {
  cursor: pointer;
}

/* ============================
   RESPONSIVE — PANNEAU THÈMES
   ============================ */

@media (max-width: 900px) {
  #theme-panel {
    width: 100vw;
    max-width: 360px;
  }
}

@media (max-width: 480px) {
  #theme-panel {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
  }

  #active-theme-badge {
    bottom: 10px;
    font-size: 11px;
    padding: 5px 10px;
  }

  .badge-label { max-width: 140px; }
}




/* ============================
   SECTION FREE ACCESS (panneau thèmes)
   ============================ */

.tp-free-section {
  padding: 6px 0 4px;
}

.tp-free-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 216, 77, 0.25),
    transparent
  );
  margin: 6px 14px;
}

.tp-free-badge {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #ffd84d;
  padding: 4px 12px 6px;
  opacity: 0.85;
}

.tp-free-items {
  padding: 2px 8px 4px 16px;
  display: flex;
  flex-direction: column;
}

.tp-free-items .theme-item {
  background: rgba(255, 216, 77, 0.04);
  border: 1px solid rgba(255, 216, 77, 0.12);
  border-radius: 8px;
  color: rgba(255, 216, 77, 0.8);
  margin-bottom: 2px;
}

.tp-free-items .theme-item:hover {
  background: rgba(255, 216, 77, 0.1);
  color: #ffd84d;
  border-color: rgba(255, 216, 77, 0.3);
}

.tp-free-items .theme-item.selected {
  background: rgba(255, 216, 77, 0.15);
  color: #ffd84d;
  border-color: rgba(255, 216, 77, 0.4);
}






.brightness-control {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 6px 10px;
  box-sizing: border-box;
}

.brightness-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: none;
  border-radius: 7px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

.brightness-value {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  font-family: 'Inter', sans-serif;
}


.action-btn {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;

  font: inherit;
  color: inherit;
}



.brightness-control {
  font-size: 12px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.55);
}

#btn-center {
  background: transparent;
  border: none;
  cursor: pointer;

  flex: 1;
  text-align: center;

  font-size: 12px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.55);
}
