/* ===== RESTAURATION CSS ORIGINAL (encapsulé dans .tv-home-map) ===== */

/* Variables globales (pas encapsulées, déjà protégées par :root) */
:root {
  --c1: #5E7A6B;
  --c2: #6A8D9B;
  --c3: #C97253;
  --c4: #D19A44;
  --c5: #E2A44B;
  --bg-page: #FAF7F2;
  --bg-panel: #FFFFFF;
  --text-main: #332822;
  --text-muted: #8A7B72;
  --border: #EBE3DB;
  --border-dark: #D4C9BF;
  --accent: #D97A35;
  --font-title: 'Dahlia', 'Playfair Display', serif;
  --font-text: 'Inter Tight', sans-serif;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

.tv-home-map *, .tv-home-map *::before, .tv-home-map *::after { box-sizing: border-box; }

.tv-home-map .container {
  font-family: var(--font-text);
  background: transparent;
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip !important;
  width: 100vw !important;
  max-width: 100vw !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 20px 20px 0 20px !important;
  box-sizing: border-box !important;
}

.tv-home-map .header {
  margin-bottom: 24px;
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
}

.tv-home-map .kicker {
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  color: var(--text-main) !important;
  margin-bottom: 16px !important;
  display: inline-flex !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(51, 40, 34, 0.2) !important;
  border-radius: 20px !important;
  padding: 4px 12px !important;
  text-transform: none !important;
  align-items: center !important;
  height: 28px;
}

.tv-home-map .title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin-top: 0 !important;
}

.tv-home-map .subtitle {
  margin-top: 12px;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
}

.tv-home-map .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 40px;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.tv-home-map .map-section {
  height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.tv-home-map .svg-container {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.6s var(--ease);
}

.tv-home-map .svg-container svg {
  height: 100%;
  width: auto;
  max-width: 100%;
  overflow: visible;
  filter: drop-shadow(0 16px 32px rgba(51, 40, 34, 0.08));
}

.tv-home-map path[data-district] {
  transition: all 0.4s var(--ease);
  cursor: pointer;
  stroke: var(--bg-page);
  stroke-width: 0.75px;
  transform-origin: center center;
  opacity: 0.9;
}

.tv-home-map path[data-district="district-1"] { fill: var(--c1); }
.tv-home-map path[data-district="district-2"] { fill: var(--c2); }
.tv-home-map path[data-district="district-3"] { fill: var(--c3); }
.tv-home-map path[data-district="district-4"] { fill: var(--c4); }
.tv-home-map path[data-district="district-5"] { fill: var(--c5); }

.tv-home-map .map-section.has-selection .svg-container { transform: scale(0.92) translateX(-10px); }

.tv-home-map path[data-district].selected {
  transform: translate(-3px, -4px) scale(1.04);
  stroke-width: 2px;
  stroke: #FFFFFF;
  opacity: 1 !important;
  z-index: 20;
}

.tv-home-map path[data-district="district-1"].selected { filter: drop-shadow(0 12px 24px rgba(94, 122, 107, 0.7)); }
.tv-home-map path[data-district="district-2"].selected { filter: drop-shadow(0 12px 24px rgba(106, 141, 155, 0.7)); }
.tv-home-map path[data-district="district-3"].selected { filter: drop-shadow(0 12px 24px rgba(201, 114, 83, 0.7)); }
.tv-home-map path[data-district="district-4"].selected { filter: drop-shadow(0 12px 24px rgba(209, 154, 68, 0.7)); }
.tv-home-map path[data-district="district-5"].selected { filter: drop-shadow(0 12px 24px rgba(226, 164, 75, 0.7)); }

.tv-home-map path[data-district].unselected {
  opacity: 0.3 !important;
  filter: grayscale(0.8) brightness(1.05);
  transform: scale(0.98);
  z-index: 0;
}

.tv-home-map .tour-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  pointer-events: auto !important;
}

.tv-home-map .btn-tour {
  background: #FFFFFF !important;
  border: 1px solid #D4C9BF !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
  border-radius: 99px !important;
  padding: 10px 20px !important;
  font-family: var(--font-text) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #332822 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  -webkit-appearance: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.tv-home-map .btn-tour svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: fill 0.3s;
}

.tv-home-map .btn-tour:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  transform: translateY(-1px);
}

.tv-home-map .map-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(51, 40, 34, 0.12), inset 0 0 0 1px rgba(255,255,255,0.4);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 30px;
  font-family: var(--font-text);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  opacity: 0;
  transform: translate(-50%, -15px) scale(0.9);
  transition: opacity 0.15s ease, transform 0.15s var(--ease);
}

.tv-home-map .map-tooltip.visible { opacity: 1; transform: translate(-50%, -35px) scale(1); }

.tv-home-map .content-panel {
  position: relative;
  height: 600px;
  width: 100%;
  max-width: 100%;
  background: var(--bg-panel);
  border-radius: 20px;
 border: 1px solid var(--border);   
  overflow-x: hidden !important;
  display: flex;
  flex-direction: column;
}

.tv-home-map .view.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.tv-home-map .view::-webkit-scrollbar { display: none; }
.tv-home-map .view {
  -ms-overflow-style: none;
  scrollbar-width: none;
  position: absolute;
  inset: 0;
  padding: 18px 20px 20px 20px !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-panel);
}

.tv-home-map .index-header {
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 20px !important;
  margin-top: 4px !important;
  line-height: 1.4;
}

.tv-home-map .region-list {
  list-style: none;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  flex-grow: 1 !important;
  justify-content: space-evenly !important;
  margin-bottom: 24px !important;
}

.tv-home-map .region-item {
  background: rgba(0,0,0,0.02);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 16px !important;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.tv-home-map .r-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.tv-home-map .r-name {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
  transition: color 0.3s ease;
  white-space: normal;
  word-break: break-word;
  line-height: 1.2;
}

.tv-home-map .r-tag {
  margin-left: auto;
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-panel);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: normal;
  text-align: center;
  flex-shrink: 0;
}

.tv-home-map .index-footer-card {
  margin-top: auto !important;
  background: rgba(140, 130, 122, 0.05);
  border: 1px solid rgba(140, 130, 122, 0.1);
  border-radius: 12px;
  padding: 0 !important;
  display: grid !important;
  gap: 16px;
  align-items: center;
  box-sizing: border-box !important;
  position: relative;
  overflow: hidden;
  min-height: unset !important;
  transition: all 0.3s ease;
  flex-shrink: 0 !important;
}

.tv-home-map .ifc-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #FFF !important;
  color: #F5A623 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  min-width: 36px !important;
  min-height: 36px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.tv-home-map .ifc-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tv-home-map .ifc-title {
  font-family: var(--font-text);
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  margin-bottom: 2px;
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 0 2px 0 !important;
  line-height: 1.2 !important;
}

.tv-home-map .ifc-desc {
  font-family: var(--font-text);
  font-size: 0.7rem !important;
  color: var(--text-muted) !important;
  line-height: 1.3 !important;
  display: block !important;
  white-space: normal !important;
  margin: 0 !important;
  opacity: 0.8 !important;
  margin-top: 2px !important;
}

.tv-home-map .top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  position: sticky;
  top: 0px;
  background: var(--bg-panel);
  padding-top: 12px;
  padding-bottom: 12px;
  z-index: 10;
  margin-top: 0px;
  width: 100%;
}

.tv-home-map .btn-back {
  background: transparent !important;
  border: none !important;
  font-family: var(--font-text) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 !important;
  margin-left: -4px;
  -webkit-appearance: none !important;
  box-shadow: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  transition: opacity 0.2s ease;
}

.tv-home-map .btn-back svg {
  width: 18px !important;
  height: 18px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tv-home-map .btn-back:hover { color: var(--accent) !important; opacity: 0.7; }

.tv-home-map .detail-title {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.tv-home-map .detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  width: 100%;
}

.tv-home-map .d-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tv-home-map .d-lbl {
  font-size: 0.75rem;
  font-family: var(--font-text);
  font-weight: 500;
  color: var(--text-muted);
}

.tv-home-map .d-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-text);
  word-wrap: break-word;
}

.tv-home-map .detail-section-title {
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-main);
}

.tv-home-map .detail-facts {
  list-style: none;
  margin-bottom: 20px;
  padding-right: 8px;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.tv-home-map .detail-facts li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
  font-family: var(--font-text);
}

.tv-home-map .detail-facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  background: var(--theme-color);
  border-radius: 50%;
}

.tv-home-map .history-icon svg {
  width: 10px;
  height: 10px;
  stroke-width: 1.5;
}

.tv-home-map #scrollFade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to top, var(--bg-panel) 40%, transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  pointer-events: none;          /* jamais cliquable */
  transition: opacity 0.3s ease;
  z-index: 10;                   /* au‑dessus des vues */
  border-radius: 0 0 20px 20px;  /* épouse l’arrondi du bas */
}

.tv-home-map .scroll-arrow-wrapper {
  width: 44px;
  height: 44px;
  background: #FFFFFF !important;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(51, 40, 34, 0.12), 0 0 0 1px rgba(0,0,0,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tv-bounce-arrow 2s infinite;
  pointer-events: none;
  cursor: pointer;
}

.tv-home-map .scroll-arrow-wrapper svg {
  width: 20px;
  height: 20px;
  color: #D97A35;
  background: transparent !important;
  margin-top: 2px;
}

.tv-home-map .detail-hero-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-text);
  opacity: 0.95;
  width: 100%;
  overflow: hidden;
  color: #FFFFFF !important;
}

.tv-home-map .meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tv-home-map .meta-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.9;
}

.tv-home-map .detail-cta {
  display: block;
  width: 100%;
  text-align: center;
  color: #FFFFFF !important;
  font-family: var(--font-text);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 16px 24px;
  border-radius: 12px;
  margin-top: 24px;
  margin-bottom: 32px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: all 0.3s var(--ease);
  box-sizing: border-box;
  border: none;
  cursor: pointer;
}

.tv-home-map .detail-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  filter: brightness(1.1);
}

.tv-home-map .detail-hero-wrapper {
  position: relative;
  width: 100%;
  height: clamp(190px, 26vh, 240px);
  margin-top: 0;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(51,40,34,0.10);
  background-color: #EBE3DB;
  flex-shrink: 0;
  display: flex;
}

.tv-home-map .detail-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
  padding: 0 14px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  color: #FFFFFF !important;
  pointer-events: none;
}

.tv-home-map .detail-hero-title {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: clamp(1.25rem, 4.4vw, 1.75rem);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  width: 100%;
  color: #FFFFFF !important;
}

.tv-home-map .detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center;
  display: block;
  border: none;
  margin: 0;
  padding: 0;
  opacity: 1;
}

/* Tooltip (déjà dans le HTML, mais on s'assure de son style) */
.tv-home-map #mapTooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -140%);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
  border: 1px solid rgba(255,255,255,0.6);
}

.tv-home-map #mapTooltip.visible { opacity: 1; transform: translate(-50%, -140%) scale(1); }

.tv-home-map .tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.tv-home-map .hero-glass-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF !important;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 10;
  transition: background 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  pointer-events: auto;
}

.tv-home-map .hero-glass-btn:hover { background: rgba(255, 255, 255, 0.25); border-color: rgba(255, 255, 255, 0.5); }

.tv-home-map .hero-glass-btn svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.tv-home-map .panel-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
  margin-bottom: 24px;
  border-top: 1px solid rgba(51, 40, 34, 0.05);
  padding-top: 24px;
}

.tv-home-map .panel-nav-btn {
  display: flex;
  flex-direction: column;
  background: #F9F7F5;
  border: 1px solid rgba(51, 40, 34, 0.04);
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s var(--ease);
  text-decoration: none;
  color: var(--text-main);
}

.tv-home-map .panel-nav-btn:hover {
  background: #FFFFFF;
  border-color: rgba(51, 40, 34, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(51, 40, 34, 0.05);
}

.tv-home-map .panel-nav-btn.next { text-align: right; align-items: flex-end; }

.tv-home-map .panel-nav-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
}

.tv-home-map .panel-nav-title {
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-text);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.tv-home-map .panel-nav-title svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.tv-home-map .nav-arrows-top {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tv-home-map .btn-nav-top {
  background: #FFFFFF !important;
  border: 1px solid rgba(51, 40, 34, 0.2) !important;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main) !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

.tv-home-map .btn-nav-top:hover { background: #F9F7F5 !important; color: var(--accent) !important; }

.tv-home-map .btn-nav-top svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

/* Styles globaux limités à la carte */
.tv-home-map #viewIndex {
  overflow-y: auto !important;
  padding-bottom: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.tv-home-map .swipe-dots-container { display: none; }

.tv-home-map #topNavArrows button svg path,
.tv-home-map .btn-nav-top svg path { stroke: var(--text-main) !important; transition: stroke 0.2s ease !important; }

.tv-home-map #topNavArrows button:hover svg path,
.tv-home-map .btn-nav-top:hover svg path { stroke: #F5A623 !important; }

.tv-home-map #topNavArrows button:hover,
.tv-home-map .btn-nav-top:hover { border-color: #F5A623 !important; background: transparent !important; }

.tv-home-map .index-footer-card:hover { background: rgba(140, 130, 122, 0.08); }

/* Lead Magnet layers */
.tv-home-map .lm-state-layer {
  position: relative !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s !important;
  transform: translateY(10px);
  grid-area: 1 / 1 !important;
  visibility: hidden;
}

.tv-home-map .lm-state-layer.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  position: relative;
  z-index: 2;
  visibility: visible;
  width: 100%;
}

.tv-home-map .lm-content {
  flex-wrap: nowrap !important;
  gap: 12px !important;
  width: 100% !important;
  justify-content: space-between !important;
}

.tv-home-map .lm-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-direction: column;
  justify-content: center;
}

.tv-home-map .lm-btn {
  background: #FFF !important;
  border: 1px solid rgba(245, 166, 35, 0.4) !important;
  color: #F5A623 !important;
  border-radius: 20px !important;
  padding: 5px 12px !important;
  font-family: var(--font-text) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  height: auto !important;
  line-height: 1.2 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
}

.tv-home-map .lm-btn:hover {
  background: #F5A623 !important;
  color: #FFF !important;
  border-color: #F5A623 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(245, 166, 35, 0.2) !important;
}

.tv-home-map .lm-form {
  flex-wrap: nowrap !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  justify-content: center !important;
}

.tv-home-map .lm-form input[type="email"].lm-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 8px !important;
  margin: 0 !important;
  height: 34px !important;
  font-family: var(--font-text) !important;
  font-size: 0.8rem !important;
  color: var(--text-main) !important;
  outline: none !important;
  line-height: 34px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.tv-home-map .lm-form input[type="email"].lm-input::placeholder { color: rgba(140, 130, 122, 0.6) !important; font-weight: normal !important; }

.tv-home-map .lm-form input[type="email"].lm-input.error-shake {
  color: red !important;
  font-weight: bold !important;
  animation: tv-shake 0.4s ease;
}

.tv-home-map .lm-form button.lm-submit {
  background: #F5A623 !important;
  color: #FFF !important;
  border: none !important;
  border-radius: 8px !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  line-height: 0 !important;
  box-shadow: 0 2px 6px rgba(245, 166, 35, 0.3) !important;
}

.tv-home-map .lm-form button.lm-submit:hover { filter: brightness(1.05) !important; transform: translateY(-1px) !important; }

.tv-home-map .lm-form button.lm-cancel {
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 0px !important;
  min-width: 30px !important;
  padding: 0 !important;
  margin: 0 0 0 4px !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  line-height: 0 !important;
  border-radius: 50% !important;
}

.tv-home-map .lm-form button.lm-cancel:hover { color: var(--text-main) !important; background: rgba(140, 130, 122, 0.1) !important; }

.tv-home-map .lm-success {
  gap: 8px !important;
  width: 100% !important;
  font-family: var(--font-text) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #F5A623 !important;
}

/* Hover desktop */
@media (hover: hover) {
  .tv-home-map path[data-district]:hover {
    opacity: 1 !important;
    transform: translate(-2px, -3px) scale(1.025);
    stroke-width: 2px;
    stroke: #FFFFFF;
    filter: drop-shadow(4px 8px 12px rgba(0,0,0,0.3)) brightness(1.05);
    z-index: 10;
  }
  .tv-home-map .region-item:hover { background: #FFFFFF; border-color: var(--border); box-shadow: 0 8px 16px rgba(51, 40, 34, 0.04); transform: translateX(4px); }
  .tv-home-map .region-item:hover .r-dot { transform: scale(1.3); }
  .tv-home-map .region-item:hover .r-name { color: var(--accent); }
  .tv-home-map .region-item:hover .r-tag { background: var(--bg-page); }
}

/* Désactive tooltip sur tactile */
@media (hover: none) and (pointer: coarse) {
  .tv-home-map .map-tooltip { display: none !important; }
}

/* Responsive mobile */
@media (max-width: 480px) {
  .tv-home-map .view { padding: 18px; }
  .tv-home-map .detail-hero-wrapper { height: 200px; margin-bottom: 16px; }
}

/* Perspective 3D pour la carte (desktop large) */
@media (min-width: 1px) {
  .tv-home-map .svg-container { perspective: 1200px; }
  .tv-home-map .svg-container svg {
    transform: rotateX(50deg) rotateZ(-25deg) scale(0.95);
    transition: transform 0.8s var(--ease), filter 0.8s var(--ease);
    filter: drop-shadow(-20px 40px 15px rgba(0,0,0,0.12));
    transform-style: preserve-3d;
  }
  .tv-home-map .svg-container:hover svg {
    transform: rotateX(50deg) rotateZ(-25deg) scale(0.98) translateY(-10px);
    filter: drop-shadow(-30px 50px 20px rgba(0,0,0,0.18));
  }
}

@media (max-width: 1100px) {
  .tv-home-map .layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    max-width: 960px;
    margin: 0 auto;
  }
  .tv-home-map .svg-container { padding-right: 20px; }
}

@media (max-width: 900px) {
  .tv-home-map .layout {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    padding: 0 10px !important;
    max-width: 100% !important;
  }
  .tv-home-map .content-panel {
    width: 100% !important;
    max-width: 550px !important;
    margin: 0 auto !important;
    height: auto !important;
    min-height: 50vh !important;
    border-radius: 20px !important;
    overflow-y: visible !important;
    box-shadow: none;
    padding-top: 8px; 
     position: relative;
  }
  .tv-home-map .map-section {
    height: 45vh !important;
    min-height: 400px !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
  }
  .tv-home-map .map-section.has-selection .svg-container { transform: none !important; }
  .tv-home-map .tour-controls { position: relative !important; top: auto !important; left: auto !important; display: flex !important; justify-content: center !important; width: 100% !important; margin-top: 10px !important; margin-bottom: 0px !important; z-index: 10 !important; }
  .tv-home-map .svg-container { width: 100% !important; height: 100% !important; display: flex !important; align-items: center !important; justify-content: center !important; perspective: 1000px !important; padding-right: 0 !important; }
  .tv-home-map .svg-container svg {
    width: 110% !important;
    max-width: 600px !important;
    height: auto !important;
    transform: rotateX(45deg) rotateZ(-20deg) scale(1.1) translateY(-10%) !important;
    transform-origin: center center !important;
  }
  .tv-home-map .svg-container:hover svg { transform: rotateX(45deg) rotateZ(-20deg) scale(1.15) translateY(-12%) !important; }
  .tv-home-map .panel-nav { display: none !important; }
  .tv-home-map .swipe-dots-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 6px !important;
    margin-bottom: 18px !important;
  }
  .tv-home-map .swipe-dots-container::before {
    content: 'Glissez pour découvrir';
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 8px;
    opacity: 0.8;
  }
  .tv-home-map .swipe-dots-container .dot {
    display: inline-block !important;
    width: 7px !important;
    height: 7px !important;
    border-radius: 999px !important;
    background: rgba(140,130,122,0.30) !important;
    transition: all 0.2s ease !important;
  }
  .tv-home-map .swipe-dots-container .dot.active {
    width: 22px !important;
    background: var(--accent) !important;
    box-shadow: 0 2px 6px rgba(217, 122, 53, 0.3) !important;
  }
  .tv-home-map #topNavArrows { display: none !important; }
}

@media (max-width: 600px) {
  .tv-home-map .layout { padding: 0 10px !important; }
  .tv-home-map .map-section { height: 45vh !important; min-height: 350px !important; }
  .tv-home-map .svg-container svg {
    width: 230% !important;
    transform: rotateX(50deg) rotateZ(-25deg) scale(1.5) translateY(-5%) !important;
  }
  .tv-home-map .svg-container:hover svg { transform: rotateX(50deg) rotateZ(-25deg) scale(1.6) translateY(-8%) !important; }
}

/* Quadrillage discret */
.tv-home-map .map-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: 50px 50px;
  background-image:
    linear-gradient(to right, rgba(140, 130, 122, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140, 130, 122, 0.15) 1px, transparent 1px);
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.8) 15%, rgba(0,0,0,0) 65%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.8) 15%, rgba(0,0,0,0) 65%);
}

/* Animations */
@keyframes tv-bounce-arrow {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  60% { transform: translateY(-3px); }
}

@keyframes tv-imageFadeIn {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes tv-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Note historique */
.tv-home-map .history-card {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 8px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tv-home-map .history-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-home-map .history-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-home-map .history-icon svg {
  width: 14px;
  height: 14px;
}

.tv-home-map .history-title {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.tv-home-map .history-txt {
  font-family: var(--font-text);
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
  font-weight: 400;
  margin: 0;
}

/* Libère les bords arrondis du panneau droit */
.tv-home-map .content-panel {
  height: calc(600px - 10px);   /* réduit de 10 pixels la hauteur */
  margin-bottom: 5px;           /* donne de l'air en bas */
}

/* Scroll‑fade interne à la vue, avec une flèche */
.tv-home-map #viewDetail .scroll-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to top, var(--bg-panel) 40%, transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  pointer-events: none;
}

/* La flèche reste cliquable */
.tv-home-map .scroll-arrow-wrapper {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tv-bounce-arrow 2s infinite;
}

.tv-home-map .scroll-arrow-wrapper svg {
  width: 18px;
  height: 18px;
  color: #D97A35;
}

/* Cache le scroll‑fade quand il n’y a pas de défilement ou qu’on est en bas */
.tv-home-map #viewDetail .scroll-fade {
  opacity: 0;
  transition: opacity 0.3s ease;
}
/* La classe .visible est ajoutée par le JavaScript, on laisse le JS gérer l’opacité */

.tv-home-map #viewDetail {
  position: relative;   /* indispensable pour que le scroll-fade suive le scroll */
}