@import url('./tokens.css');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--dl-font-sans);
  background-color: #F4F1EA;
  color: var(--dl-ink);
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- SVG Vector Icons & Status Dots --- */
.ui-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-green { background-color: #059669; }
.dot-amber { background-color: #f59e0b; }
.dot-red { background-color: #ef4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25); }
.dot-gray { background-color: #94a3b8; }

/* --- Container Application --- */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  background: #F4F1EA;
  position: relative;
}

@media (min-width: 960px) {
  .app-container {
    max-width: 1200px;
  }
}

@media (min-width: 1200px) {
  .app-container {
    max-width: 1440px;
  }
}

@media (min-width: 1600px) {
  .app-container {
    max-width: 1680px;
  }
}

/* --- Header Card Container (Fond Blanc, Coins Arrondis & Respiration) --- */
.header-card-container {
  background: #FFFFFF;
  border: 1px solid #EAE7E1;
  border-radius: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  margin: 12px 16px 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

@media (max-width: 639px) {
  .header-card-container {
    margin: 8px 10px 14px;
    padding: 14px 14px;
    border-radius: 18px;
    gap: 12px;
  }
}

.header-divider {
  height: 1px;
  background: #F0EEE8;
  width: 100%;
  margin: 0;
}

/* --- Passerelle vers le site principal --- */
.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-back-to-site {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #475569 !important;
  text-decoration: none !important;
  background: #FAF8F5 !important;
  border: 1px solid #EAE7E1 !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  transition: all 0.18s ease !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  outline: none !important;
}

.btn-back-to-site:hover {
  background: #FFFFFF !important;
  color: #064E3B !important;
  border-color: #3EC99A !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
  transform: translateY(-1px) !important;
  text-decoration: none !important;
}

@media (max-width: 639px) {
  .app-header {
    align-items: flex-start !important;
  }
  .brand {
    height: 22px;
  }
  .brand-group {
    gap: 8px !important;
  }
  .brand-app-badge,
  .brand-pro-badge {
    height: 20px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
  }
  .header-right-group {
    align-items: center !important;
    height: 22px;
  }
  .lang-switch-toggle {
    height: 20px;
    padding: 1.5px;
    box-sizing: border-box;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
  }
  .lang-toggle-btn {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1;
    height: 16px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
  }
  .btn-back-to-site {
    font-size: 11.5px !important;
    padding: 3.5px 8px !important;
  }
}

/* --- Header Charte Divine Loire --- */
.app-header {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: none;
  z-index: 100;
  min-height: auto;
  box-sizing: border-box;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  user-select: none;
  cursor: pointer;
  gap: 8px;
}

.brand-logo-text {
  font-family: var(--dl-font-serif);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.brand-word-divine { 
  color: #1c1a17;
}

.brand-word-loire { 
  color: var(--dl-green);
}

.brand-app-badge {
  background: #DEF4EC;
  color: #064E3B !important;
  font-family: var(--dl-font-sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2.5px 6px;
  border-radius: 4px;
  border: 1px solid #A7F3D0;
  line-height: 1.1;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  margin: 0;
  vertical-align: middle;
}

.brand-pro-badge {
  background: #064E3B;
  color: #FFFFFF !important;
  font-family: var(--dl-font-sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2.5px 7px 2.5px 5px;
  border-radius: 4px;
  line-height: 1.1;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 4px rgba(6, 78, 59, 0.25);
  margin: 0;
  vertical-align: middle;
}

.brand-pro-badge .brand-pro-crown {
  fill: #F59E0B;
  color: #F59E0B;
  flex-shrink: 0;
}

.brand-pro-badge span {
  color: #FFFFFF !important;
}

.header-search-wrap {
  flex: 1;
  max-width: 620px;
  display: none;
}

@media (min-width: 680px) {
  .header-search-wrap {
    display: block;
  }
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 38px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 13.5px;
  outline: none;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 13px center;
  transition: all 0.2s ease;
  color: var(--dl-ink);
  box-sizing: border-box;
}

.search-input:focus-visible {
  border-color: var(--dl-green);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(62, 201, 154, 0.2);
}

/* Header Right Group */
.header-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switch-toggle {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 2.5px;
  border-radius: var(--radius-pill);
  border: 1px solid #cbd5e1;
}

.lang-toggle-btn {
  background: none;
  border: none;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--dl-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.lang-toggle-btn.active {
  background: #ffffff;
  color: var(--dl-ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Badge Pass Header (3 États selon Mockup Officiel Claude 2026) */
.pass-badge {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
}

/* État 1: ACTIF (Pass PRO Actif à vie) */
.pass-badge.is-active {
  background: #f4f9f6;
  border: 1.5px solid rgba(62, 201, 154, 0.45);
  color: #064e3b;
}

.pass-badge.is-active .pass-crown-svg {
  fill: #c05621;
  color: #c05621;
}

.pass-badge.is-active:hover {
  background: #eaf5ef;
  border-color: #3ec99a;
  transform: translateY(-1px);
}

/* État 2: INACTIF (Non Connecté / Visiteur) */
.pass-badge.is-inactive {
  background: #f2f1ed;
  border: 1.5px solid #e2e0d8;
  color: #8c857b;
}

.pass-badge.is-inactive .pass-crown-svg {
  fill: none;
  stroke: #8c857b;
  stroke-width: 2;
  color: #8c857b;
}

/* État 3: SURVOL INACTIF */
.pass-badge.is-inactive:hover {
  background: #f4f9f6;
  border-color: #3ec99a;
  color: #064e3b;
  transform: translateY(-1px);
}

.pass-badge.is-inactive:hover .pass-crown-svg {
  stroke: #3ec99a;
  color: #3ec99a;
}

/* --- Zone de Contrôles & Filtres Unifiée --- */
.controls-panel {
  background: transparent;
  padding: 0;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 90;
  box-sizing: border-box;
  width: 100%;
}

.controls-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.view-toggle-with-count {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.view-toggle {
  display: flex;
  background: #EDE9E1;
  padding: 2.5px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  height: 38px;
  align-items: center;
  box-sizing: border-box;
}

.toggle-btn {
  flex: 1 1 0px;
  min-width: 86px;
  border: none;
  background: none;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.toggle-btn svg,
.toggle-btn .toggle-icon {
  flex-shrink: 0;
  margin-right: 2px;
}

.toggle-btn.active {
  background: #1C1A17;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.results-count-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 12px;
  border-right: 1px solid #EAE7E1;
  min-width: max-content;
}

.results-count-title {
  font-size: 14.5px;
  font-weight: 500;
  color: #4B5563;
  line-height: 1.2;
  font-family: inherit;
}

.results-count-title span:first-child,
#results-count-num,
#map-results-count-num {
  font-weight: 800;
  color: #1C1A17;
}

.results-count-sub {
  font-size: 11.5px;
  color: #8C857B;
  font-weight: 500;
  line-height: 1.2;
  transition: all 0.15s ease;
  user-select: none;
}

.results-count-sub.is-active-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 5px;
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FFEDD5;
  border-radius: 6px;
  padding: 2.5px 8.5px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 2px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-sizing: border-box;
}

.results-count-sub.is-active-btn:hover {
  background: #C2410C;
  color: #FFFFFF;
  border-color: #C2410C;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 5px rgba(194, 65, 12, 0.22);
}

.results-count-sub.is-active-btn .count-sub-icon {
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.controls-search-bar {
  background: #FFFFFF;
  border: 1.5px solid #083324;
  box-shadow: 0 2px 8px rgba(8, 51, 36, 0.08);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  height: 38px;
  display: flex; /* Ouvert en permanence sur Desktop */
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 0;
  animation: fadeInSearch 0.18s ease;
}

.controls-search-bar.is-open {
  display: flex !important;
}

.controls-search-bar:focus-within {
  background: #FFFFFF;
  border-color: #083324;
  box-shadow: 0 0 0 3px rgba(8, 51, 36, 0.12);
}

.controls-search-bar .search-icon {
  color: #083324;
  flex-shrink: 0;
}

.controls-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dl-ink);
  font-family: inherit;
  min-width: 0;
}

.controls-search-input::placeholder {
  color: #8C857B;
  font-size: 13px;
}

.mobile-search-toggle-btn {
  display: none; /* Masqué sur Desktop car recherche déjà ouverte */
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid #EAE7E1;
  color: #1C1A17;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  padding: 0;
  box-sizing: border-box;
}

.mobile-search-toggle-btn:hover {
  background: #F4F3EF;
  border-color: #083324;
  color: #083324;
}

.mobile-search-toggle-btn.active {
  background: #083324;
  border-color: #083324;
  color: #FFFFFF;
}

.search-bar-close-btn {
  display: none;
  background: none;
  border: none;
  color: #8C857B;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.search-bar-close-btn:hover {
  color: #1C1A17;
}

.controls-chips-row {
  width: 100%;
  overflow: hidden;
}

/* Scroll Container des Chips avec Chevrons */
.chips-scroll-container {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.chips-scroll-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.2px solid #1C1A17;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1C1A17;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  padding: 0;
  z-index: 5;
}

.chips-scroll-btn:hover {
  background: #F8FAFC;
  border-color: #1C1A17;
  transform: scale(1.06);
}

.chips-scroll-btn:active {
  transform: scale(0.94);
}

.chips-scroll-btn svg {
  color: #1C1A17;
  flex-shrink: 0;
}

.key-filters-scroll,
.map-fullscreen-chips-row {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
  width: 100%;
  min-width: 0;
  flex: 1;
  flex-wrap: nowrap !important;
}

.key-filters-scroll::-webkit-scrollbar,
.map-fullscreen-chips-row::-webkit-scrollbar {
  display: none;
}

@media (max-width: 639px) {
  .controls-top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0;
  }
  .view-toggle-with-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .results-count-block {
    border-right: none;
    padding-right: 0;
    text-align: right;
    flex: 1;
  }
  .mobile-search-toggle-btn {
    display: inline-flex;
  }
  .controls-search-bar {
    display: none;
    width: 100%;
    margin-top: 6px;
    order: 3;
  }
  .controls-search-bar.is-open {
    display: flex !important;
  }
  .controls-chips-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
  }
  .search-bar-close-btn {
    display: inline-flex;
  }
}

@keyframes fadeInSearch {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-more-filters-pill {
  background: #FFFFFF;
  border: 1.5px solid #1C1A17;
  color: #1C1A17;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: inherit;
  flex-shrink: 0;
  height: 32px;
  box-sizing: border-box;
}

.btn-more-filters-pill:hover {
  background: #F8FAFC;
  transform: translateY(-1px);
}

.btn-more-filters-pill.has-active {
  background: #064E3B;
  border-color: #064E3B;
  color: #FFFFFF;
}

.btn-more-filters-pill.has-active svg {
  color: #3EC99A;
  stroke: #3EC99A;
}

.btn-more-filters-pill .filter-count-badge {
  background: #1C1A17;
  color: #FFFFFF;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  box-sizing: border-box;
  margin-left: 2px;
}

.btn-more-filters-pill.has-active .filter-count-badge {
  background: #3EC99A;
  color: #064E3B;
}

.btn-clear-all-link {
  background: none;
  border: none;
  color: #5A5243;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px 6px;
  white-space: nowrap;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
  font-family: inherit;
  flex-shrink: 0;
}

.btn-clear-all-link:hover {
  color: #064E3B;
}

.chip-filter-btn {
  background: #FFFFFF;
  border: 1.5px solid #1C1A17;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: #1C1A17;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
  box-shadow: none;
  font-family: inherit;
  height: 32px;
  box-sizing: border-box;
}

.chip-filter-btn:hover {
  background: #F8FAF5;
  border-color: #D8D4CA;
}

.chip-filter-btn svg {
  color: #8C857B;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.chip-filter-btn.active {
  background: #064E3B !important;
  border-color: #064E3B !important;
  color: #FFFFFF !important;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.25);
}

.chip-filter-btn.active svg {
  color: #3EC99A !important;
  stroke: #3EC99A;
}

.chip-close-x {
  color: #3EC99A;
  font-size: 11px;
  font-weight: 800;
  margin-left: 3px;
  display: inline-block;
  line-height: 1;
}

.chip-filter-btn.btn-fav.active {
  background: #064E3B !important;
  border-color: #064E3B !important;
  color: #FFFFFF !important;
}

.chip-filter-btn.btn-fav.active svg {
  color: #E11D48 !important;
  fill: #E11D48 !important;
  stroke: #E11D48 !important;
}

.chip-filter-btn.btn-fav.active svg path {
  fill: #E11D48 !important;
  stroke: #E11D48 !important;
}

.fav-count-badge {
  background: #BE123C;
  color: #FFFFFF !important;
  border-radius: 50%;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  box-sizing: border-box;
  margin-left: 5px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(190, 18, 60, 0.3);
}

.chip-filter-btn.btn-fav.active .fav-count-badge {
  background: #FFFFFF;
  color: #BE123C !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* --- Contenu & Grille de Cartes (Mockup 01) --- */
.content-area {
  flex: 1;
  position: relative;
  overflow-y: auto;
  padding: 16px 18px 80px;
}

.cards-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .cards-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 1100px) {
  .cards-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1540px) {
  .cards-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

/* --- CARTE VIGNERON (Vue Liste - Nouveau Design 2026 Desktop & Mobile) --- */
.winery-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 20px;
  border: 1px solid #EAE7E1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 11px;
  cursor: default;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.winery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  border-color: #D6D3CC;
}

/* Ligne 1 : En-tête (Logo + Titre + Commune/Distance + Cœur) */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.card-logo-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #F4F3EF;
  border: 1px solid #EAE7E1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.card-logo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.logo-fallback-text,
.logo-fallback-initial {
  font-family: var(--dl-font-serif, 'Merriweather', serif);
  font-size: 17px;
  font-weight: 700;
  color: #064E3B;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #F4F3EF;
  user-select: none;
}

.logo-fallback-text {
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  color: #8C857B;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.card-domaine-title {
  font-family: var(--dl-font-serif);
  font-size: 18.5px;
  font-weight: 800;
  color: #1C1A17;
  line-height: 1.25;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.card-domaine-title:hover {
  color: var(--dl-btn-forest);
}

.card-commune-dist {
  font-size: 13.5px;
  color: #718096;
  line-height: 1.3;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-card-fav {
  background: #FFFFFF;
  border: 1.2px solid #E2E8F0;
  color: #64748B;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.btn-card-fav:hover {
  background: #FFF1F2;
  border-color: #FECDD3;
  color: #E11D48;
  transform: scale(1.08);
}

.btn-card-fav.is-favorite {
  background: #FFF1F2;
  border-color: #FDA4AF;
}

.btn-card-fav.is-favorite svg {
  fill: #E11D48;
  stroke: #E11D48;
}

/* Ligne 2 : Citation Slogan (Italique sans barre rouge) */
.card-slogan-quote {
  font-family: var(--dl-font-serif);
  font-style: italic;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.45;
  color: #374151;
  margin: 1px 0 3px;
}

/* Ligne 3 : Ligne AOP, Vins & Mode de culture */
.card-aop-wine-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.card-aop-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FAF8F5;
  border: 2px solid transparent;
  border-radius: 9999px;
  padding: 4px 11px;
  font-size: 13px;
  font-weight: 700;
  color: #1C1A17;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-family: inherit;
}

.card-aop-pill:hover {
  background: #EAE7E1;
}

.card-aop-pill.active {
  background: #FAF8F5;
  border: 2px solid #064E3B;
  color: #064E3B;
  font-weight: 700;
}

.card-aop-dots {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
}

.card-wine-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-blanc-sec { background-color: var(--wine-blanc-sec); border: 0.8px solid #E5E7EB; }
.dot-blanc { background-color: var(--wine-blanc-sec); border: 0.8px solid #E5E7EB; }
.dot-doux { background-color: var(--wine-moelleux); }
.dot-tendre { background-color: var(--wine-tendre); }
.dot-moelleux { background-color: var(--wine-moelleux); }
.dot-petillant { background-color: var(--wine-petillant); }
.dot-rose { background-color: var(--wine-rose); }
.dot-rouge { background-color: var(--wine-rouge); }

.card-aop-overflow {
  font-size: 12.5px;
  font-weight: 700;
  color: #718096;
  margin-left: 1px;
}

.card-culture-pill,
.card-culture-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
  background: #ecfdf5;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  padding: 3.5px 9px;
  margin-left: 2px;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.card-culture-pill:hover,
.card-culture-tag:hover {
  background: #d1fae5;
}

.card-culture-pill.active,
.card-culture-tag.active {
  background: #ecfdf5;
  border: 2px solid #059669;
  color: #065f46;
  font-weight: 700;
}

.card-culture-pill svg,
.card-culture-tag svg {
  color: #059669;
}

/* Ligne 4 : Bandeau Badges Divine Loire (Fond Vert Clair Doux) */
.card-badges-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--dl-badge-green-bg);
  border: 1px solid var(--dl-badge-green-border);
  border-radius: 14px;
  padding: 8px 14px;
  cursor: default;
  user-select: none;
}

.badge-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-text-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
}

.badge-count-title {
  font-weight: 800;
  color: var(--dl-badge-green-title);
  white-space: nowrap;
}

.badge-details-names {
  color: var(--dl-badge-green-desc);
  font-weight: 500;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 639px) {
  .badge-names-desktop {
    display: none;
  }
}

/* Ligne 5 : Triplet de Métriques (Dégustation / Bouteille / Sur place avec Séparateurs Verticaux Fins) */
.card-triplet-metrics {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 0;
  padding: 4px 0 2px;
}

.card-metric-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 12px;
}

.card-metric-col:first-child {
  padding-left: 0;
}

.card-metric-col:not(:first-child) {
  border-left: 1px solid #EAE7E1;
}

@media (max-width: 480px) {
  .card-metric-col {
    padding: 0 8px;
  }
  .card-metric-col:first-child {
    padding-left: 0;
  }
  .card-metric-label {
    font-size: 9.5px;
  }
  .card-metric-value {
    font-size: 13.5px;
  }
}

.card-metric-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #8C857B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-metric-value {
  font-size: 14px;
  font-weight: 800;
  color: #1C1A17;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

.card-degust-pill {
  display: inline-flex;
  align-items: center;
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
  border-radius: var(--radius-pill);
  padding: 1.5px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  font-family: inherit;
}

.card-degust-pill.clickable {
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-degust-pill.clickable:hover {
  background: #d1fae5;
  border-color: #34d399;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(6, 95, 70, 0.15);
}

/* Ligne 6 : Footer avec Séparateur Faint (Statut à gauche | Boutons à droite) */
.card-bottom-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #F3F4F6;
  margin-top: 2px;
  min-width: 0;
  width: 100%;
}

.card-status-pill {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.status-2lines-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
  min-width: 0;
  width: 100%;
  line-height: 1.25;
}

.status-line-1 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #1C1A17;
  white-space: nowrap;
}

.status-line-1-text {
  font-weight: 800;
  color: #1C1A17;
}

.status-line-2 {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 14px;
}

.status-text-green { color: #047857; }
.status-text-amber { color: #B45309; }
.status-text-red { color: #B91C1C; }

.card-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-card-call {
  background: #FFFFFF;
  border: 1.2px solid #D1D5DB;
  color: #1C1A17 !important;
  font-size: 13px;
  font-weight: 700;
  height: 36px;
  padding: 0 16px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-card-call:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
}

.btn-card-locate {
  background: #FFFFFF;
  border: 1.2px solid #D1D5DB;
  color: #1C1A17 !important;
  font-size: 13px;
  font-weight: 700;
  height: 36px;
  padding: 0 14px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-card-locate:hover {
  background: #F9FAFB;
  border-color: #083324;
  color: #083324 !important;
  transform: translateY(-1px);
}

.btn-card-view {
  background: var(--dl-btn-forest);
  border: none;
  color: #FFFFFF !important;
  font-size: 13px;
  font-weight: 700;
  height: 36px;
  padding: 0 18px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.2);
  flex-shrink: 0;
}

.btn-card-view:hover {
  background: var(--dl-btn-forest-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(6, 78, 59, 0.3);
}

/* Visibilité Desktop par défaut */
.commune-desktop { display: inline; }
.commune-mobile { display: none; }
.label-desktop { display: inline; }
.label-mobile { display: none; }
.val-desktop { display: inline; }
.val-mobile { display: none; }
.status-desktop { display: inline-flex; align-items: center; gap: 5px; }
.status-mobile { display: none; }
.overflow-desktop { display: inline; }
.overflow-mobile { display: none; }
.card-aop-desktop-only { display: inline-flex; }

/* Responsive Mobile (Max 480px) */
@media (max-width: 480px) {
  .content-area {
    padding: 10px 10px 80px !important;
  }

  .cards-container {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .winery-card {
    padding: 14px 14px !important;
    border-radius: 16px !important;
    gap: 9px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .card-header-left {
    min-width: 0 !important;
    gap: 10px !important;
  }

  .card-domaine-title {
    font-size: 16.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .card-commune-dist {
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .card-aop-wine-row {
    gap: 5px !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .card-aop-pill {
    padding: 3px 9px !important;
    font-size: 12px !important;
  }

  .card-triplet-metrics {
    padding: 2px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .card-metric-col {
    padding: 0 6px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .card-metric-label {
    font-size: 9.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .card-metric-value {
    font-size: 12.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .card-bottom-footer {
    padding-top: 10px !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .card-status-pill {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .status-line-1 {
    font-size: 12.5px !important;
  }

  .status-line-2 {
    font-size: 11px !important;
    padding-left: 14px !important;
  }

  .card-actions-group {
    flex-shrink: 0 !important;
  }

  .btn-card-call { display: none !important; }

  .btn-card-locate {
    padding: 0 10px !important;
    font-size: 11.5px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    gap: 4px !important;
  }

  .btn-card-view {
    padding: 0 12px !important;
    font-size: 12px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .commune-desktop { display: none; }
  .commune-mobile { display: inline; }
  .label-desktop { display: none; }
  .label-mobile { display: inline; }
  .val-desktop { display: none; }
  .val-mobile { display: inline; }
  .status-desktop { display: none; }
  .status-mobile { display: inline; }
  .card-aop-desktop-only { display: none !important; }
  .overflow-desktop { display: none; }
  .overflow-mobile { display: inline; }
  .badge-details-names { display: none; }
}

/* --- CARTE VIGNERON SUR CARTE LEAFLET (Vue Map) --- */
.map-winery-card {
  padding: 18px 20px 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.map-domaine-title {
  font-family: var(--dl-font-serif);
  font-size: 21px;
  font-weight: 800;
  color: var(--dl-ink);
  line-height: 1.2;
}

.map-aoc-highlight {
  color: var(--dl-aoc);
  font-weight: 800;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.card-meta-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: #334155;
  line-height: 1.4;
}

.map-meta-lines-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.card-bottom-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.btn-card-call-full {
  background: var(--dl-btn-forest);
  border: none;
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(6,78,59,0.25);
}

.btn-card-call-full:hover {
  background: var(--dl-btn-forest-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-card-view-full {
  background: var(--dl-btn-mint);
  border: none;
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(43,182,135,0.25);
}

.btn-card-view-full:hover {
  background: var(--dl-btn-mint-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.map-winery-card {
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 18px 20px 16px !important;
  background: #ffffff !important;
}

/* --- MODALE DE DÉTAIL / FICHE DOMAINE (Refonte Visuelle Exacte Desktop & Mobile) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(28, 26, 23, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 16px)) 12px calc(16px + env(safe-area-inset-bottom, 16px));
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
  .modal-overlay {
    padding: 36px 20px;
  }
}

.modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 660px;
  height: auto;
  max-height: calc(100dvh - max(32px, env(safe-area-inset-top, 32px)) - 24px);
  max-height: calc(100vh - 56px);
  border-radius: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 18px 24px;
  position: relative;
  box-sizing: border-box;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: fadeInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .modal-content {
    border-radius: 24px;
    padding: 0 28px 28px;
  }
}

@keyframes fadeInModal {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#modal-body {
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

/* 1. Barre de Navigation Haute de la Modale (Mobile & Desktop) */
.modal-top-bar-new {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 14px 0 12px;
  margin-bottom: 8px;
}

.modal-nav-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f4f3ef;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1c1a17;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.modal-nav-circle-btn:hover,
.modal-nav-circle-btn:active {
  background: #e7e5e0;
  transform: scale(1.05);
}

.modal-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: #1c1a17;
  letter-spacing: -0.01em;
}

.modal-nav-fav-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-nav-close-desktop {
  display: none;
  background: #f4f3ef;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.15s;
}
.modal-nav-close-desktop:hover {
  background: #e2e8f0;
  color: #1c1a17;
}

@media (min-width: 640px) {
  .modal-top-bar-new {
    padding: 18px 0 14px;
  }
  .modal-nav-title {
    display: none;
  }
  .modal-nav-circle-btn.modal-back-btn {
    display: none;
  }
  .modal-nav-close-desktop {
    display: inline-flex;
    margin-left: auto;
  }
}

/* 2. En-tête : Logo, Titre & Commune / Distance */
.modal-header-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-header-main-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.modal-logo-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f4f3ef;
  border: 1px solid #eae7e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  flex-shrink: 0;
  overflow: hidden;
}

.modal-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.modal-header-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.modal-domaine-title {
  font-family: var(--dl-font-serif);
  font-size: 21px;
  font-weight: 700;
  color: #1c1a17;
  line-height: 1.2;
  margin: 0;
}

@media (min-width: 640px) {
  .modal-domaine-title {
    font-size: 25px;
  }
  .modal-logo-box {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }
}

.modal-subtitle-loc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.modal-subtitle-loc {
  font-size: 13.5px;
  color: #64748b;
  flex: 1;
  min-width: 0;
}

.modal-subtitle-loc .loc-desktop {
  display: none;
}
.modal-subtitle-loc .loc-mobile {
  display: inline;
}

@media (min-width: 640px) {
  .modal-subtitle-loc .loc-desktop {
    display: inline;
  }
  .modal-subtitle-loc .loc-mobile {
    display: none;
  }
}

/* Bouton Itinéraire Compact Inline (à droite de l'adresse) */
.modal-btn-itinerary-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--dl-btn-forest);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  height: 28px;
  padding: 0 12px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: 0 1.5px 5px rgba(6, 78, 59, 0.2);
}
.modal-btn-itinerary-inline:hover {
  background: var(--dl-btn-forest-hover);
  transform: translateY(-0.5px);
}
.modal-btn-itinerary-inline svg {
  width: 12px;
  height: 12px;
}

/* 3. Slogan Éditorial avec Barre Verte Verticale */
.modal-slogan-quote {
  border-left: 3px solid #3ec99a;
  padding: 2px 0 2px 14px;
  margin: 12px 0 14px;
  font-family: var(--dl-font-serif);
  font-style: italic;
  font-weight: 400;
  color: #374151;
  font-size: 15px;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .modal-slogan-quote {
    font-size: 16px;
    margin: 14px 0 18px;
  }
}

/* Actions Visite du domaine (RDV + Téléphones) */
.modal-visit-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 14px;
  flex-wrap: wrap;
}

/* Liens Site web & Instagram sous la présentation */
.modal-web-links-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.modal-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid #EAE7E1;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #083324;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
}
.modal-social-pill:hover {
  background: #F4FBF7;
  border-color: #0D9488;
  color: #083324;
  transform: translateY(-1px);
}
.modal-social-pill svg {
  color: #083324;
  flex-shrink: 0;
}

.modal-btn-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #334155 !important;
  font-size: 13.5px;
  font-weight: 600;
  padding: 4px 6px;
  text-decoration: none;
  cursor: default;
  pointer-events: none;
  user-select: text;
}
.modal-btn-phone svg {
  color: #064E3B;
  flex-shrink: 0;
}

.modal-btn-rdv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DEF4EC;
  border: 1.5px solid #064E3B;
  color: #064E3B !important;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 15px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.modal-btn-rdv:hover {
  background: #064E3B;
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.2);
}

@media (max-width: 768px) {
  .modal-btn-phone {
    pointer-events: auto !important;
    cursor: pointer !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1c1a17 !important;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  }
  .modal-btn-phone:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
  }
}

@media (max-width: 480px) {
  .modal-btn-itinerary,
  .modal-btn-phone {
    font-size: 12.5px;
    padding: 7px 12px;
  }
}

/* 5. Séparateur Élégant */
.modal-divider {
  border-bottom: 1px solid #f1f5f9;
  margin: 16px 0;
}

/* 6. Titres de Sections */
.modal-section-heading {
  font-size: 16px;
  font-weight: 700;
  color: #1c1a17;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.modal-section-heading-sm {
  font-size: 14.5px;
  font-weight: 700;
  color: #1c1a17;
  margin: 0 0 10px 0;
}

/* 7. Métadonnées Vigneron & Hectares */
.modal-meta-line {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
  color: #374151;
  margin-bottom: 10px;
}

.modal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1e293b;
}

.modal-meta-item svg {
  color: #64748b;
}

.modal-editorial-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: #374151;
}

.modal-editorial-body p {
  margin: 0 0 10px 0;
}
.modal-editorial-body p:last-child {
  margin-bottom: 0;
}

/* 8. Conteneur Badges Divine Loire (Fond Vert Clair Doux) */
.modal-badges-green-box {
  background: #eaf7f2;
  border-radius: 14px;
  padding: 16px 18px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-badges-green-title {
  font-size: 11px;
  font-weight: 800;
  color: #047857;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-badges-green-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
}

@media (max-width: 540px) {
  .modal-badges-green-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.modal-badge-green-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.modal-badge-green-item:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: #a7f3d0;
  transform: translateY(-1px);
}

.modal-badge-circle-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #10b981;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-badge-circle-icon svg {
  width: 16px;
  height: 16px;
  stroke: #059669;
}

.modal-badge-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #064e3b;
  line-height: 1.2;
}

.modal-badge-desc {
  font-size: 12px;
  color: #047857;
  line-height: 1.35;
  margin-top: 2px;
}

.modal-badges-green-footer {
  font-size: 11.5px;
  font-style: italic;
  color: #047857;
  margin-top: 2px;
  opacity: 0.9;
}

/* 9. Grille Visite du Domaine (3 Colonnes avec Séparateurs Verticaux Fins) */
.modal-visit-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 8px 0 4px;
}

.modal-visit-metric-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 14px;
}

.modal-visit-metric-col:first-child {
  padding-left: 0;
}

.modal-visit-metric-col:not(:first-child) {
  border-left: 1px solid #EAE7E1;
}

@media (max-width: 540px) {
  .modal-visit-metric-col {
    padding: 0 8px;
  }
  .modal-visit-metric-col:first-child {
    padding-left: 0;
  }
  .modal-visit-metric-col .metric-col-val {
    font-size: 13.5px;
  }
}

@media (max-width: 380px) {
  .modal-visit-metric-col {
    padding: 0 5px;
  }
  .modal-visit-metric-col:first-child {
    padding-left: 0;
  }
  .modal-visit-metric-col .metric-col-val {
    font-size: 12px;
  }
  .modal-visit-metric-col .metric-col-label {
    font-size: 9px;
  }
  .modal-visit-metric-col .metric-col-sub {
    font-size: 10px;
  }
}

.modal-visit-metric-col .metric-col-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.modal-visit-metric-col .metric-col-val {
  font-size: 15px;
  font-weight: 800;
  color: #1c1a17;
  line-height: 1.2;
}

.modal-visit-metric-col .metric-col-sub {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.25;
}

/* 10. Flux de Pastilles (Vins proposés & Activités) */
.modal-pills-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.modal-aop-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FAF8F5;
  border: 1px solid #EAE7E1;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #1C1A17;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  user-select: none;
}

.modal-aop-pill:hover {
  background: #EAE7E1;
  transform: translateY(-1px);
}

.modal-aop-pill.active {
  background: #FAF8F5 !important;
  border: 2px solid #064E3B !important;
  color: #064E3B !important;
  font-weight: 700;
}
.modal-aop-pill.active .modal-aop-name {
  color: #064E3B !important;
}

/* Pills Activités & Services : Conformes à la vue web et aux cartes actives */
.modal-activity-pill,
.modal-service-pill {
  background: #ffffff;
  border: 1px solid #EAE7E1;
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #083324;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  user-select: none;
  box-shadow: none;
}

.modal-activity-pill:hover,
.modal-service-pill:hover {
  background: #f4fbf7;
  border-color: #0D9488;
  color: #083324;
  transform: translateY(-1px);
}

.modal-activity-pill svg,
.modal-service-pill svg {
  color: #083324;
  flex-shrink: 0;
}

.modal-activity-pill.active,
.modal-service-pill.active {
  background: #FAF8F5 !important;
  border: 2px solid #064E3B !important;
  color: #064E3B !important;
  font-weight: 700;
}

.modal-activity-pill.active svg,
.modal-service-pill.active svg {
  color: #064E3B !important;
  stroke: #064E3B !important;
}

.modal-culture-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  user-select: none;
}

.modal-culture-pill.pill-biodynamie,
.modal-culture-pill.pill-bio {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.modal-culture-pill.pill-biodynamie.active,
.modal-culture-pill.pill-bio.active {
  background: #ecfdf5 !important;
  border: 2px solid #059669 !important;
  color: #065f46 !important;
  font-weight: 700;
}
.modal-culture-pill.pill-biodynamie.active svg,
.modal-culture-pill.pill-bio.active svg {
  color: #059669 !important;
  stroke: #059669 !important;
}

.modal-culture-pill.pill-nature {
  background: #f0fdf4;
  color: #15803d;
}

.modal-culture-pill:hover {
  background: #d1fae5;
  transform: translateY(-1px);
}

.modal-degust-btn {
  background: transparent;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.modal-degust-btn:hover {
  background: #ecfdf5;
  border-color: #059669;
  transform: translateY(-1px);
}

/* 11. Section Horaires & Alerte */
.modal-schedule-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-schedule-today-row {
  background: #f3f1ec;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: #1c1a17;
}

.modal-schedule-week-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 6px;
}

.modal-schedule-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #4b5563;
  padding: 4px 0;
}

.modal-schedule-day-row .schedule-day-name {
  color: #6b7280;
  text-transform: lowercase;
}

.modal-schedule-day-row .schedule-day-val {
  color: #1f2937;
  font-weight: 500;
}

.modal-schedule-day-row.is-dimanche {
  color: #94a3b8;
}
.modal-schedule-day-row.is-dimanche .schedule-day-name,
.modal-schedule-day-row.is-dimanche .schedule-day-val {
  color: #94a3b8;
}

.modal-schedule-season-box {
  background: #FEF3C7;
  border: none !important;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.modal-schedule-season-box .season-box-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #92400E;
}

.modal-schedule-season-box .season-box-header svg {
  color: #B45309;
}

.modal-schedule-season-box .season-box-text {
  font-size: 13px;
  color: #78350F;
  line-height: 1.45;
  font-weight: 500;
}

.modal-schedule-alert-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  margin-top: 6px;
}

.modal-schedule-alert-box svg {
  color: #64748b;
  flex-shrink: 0;
  margin-top: 1px;
}

/* 12. Pieds de Page (Bouton Fermer Desktop) */
.modal-footer-close-desktop {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 0 0;
  border-top: 1px solid #f1f5f9;
  margin-top: 14px;
}

.modal-footer-btn-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s ease;
}

.modal-footer-btn-close:hover {
  color: #1c1a17;
}

@media (max-width: 639px) {
  .modal-footer-close-desktop {
    display: none;
  }
}

/* Bouton Favoris Modale */
.modal-fav-btn {
  background: #f4f3ef;
  border: none;
  color: #64748b;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  margin: 0;
}

.modal-fav-btn:hover {
  background: #fff1f2;
  color: #e11d48;
  transform: scale(1.08);
}

.modal-fav-btn.is-favorite {
  background: #fff1f2;
  color: #e11d48;
}

.modal-fav-btn.is-favorite svg {
  fill: #e11d48;
  stroke: #e11d48;
  transform: scale(1.1);
}

/* --- PANNEAU DE FILTRES REPLIABLE (Mockup 05) --- */
.filter-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 23, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: max(40px, env(safe-area-inset-top, 40px)) 12px max(24px, env(safe-area-inset-bottom, 24px)) 12px;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  .filter-drawer-overlay {
    align-items: center;
    padding: 24px;
  }
}

.filter-drawer-content {
  background: #ffffff;
  width: 100%;
  max-width: 680px;
  max-height: calc(100dvh - env(safe-area-inset-top, 40px) - 60px);
  border-radius: 20px;
  overflow-y: auto;
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: slideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  position: relative;
}

.filter-drawer-header-row {
  position: sticky;
  top: -18px;
  background: #ffffff;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0 12px;
  margin-top: -4px;
  border-bottom: 1px solid #f1f5f9;
}

.filter-drawer-main-title {
  font-family: var(--dl-font-serif);
  font-size: 26px;
  font-weight: 700;
  color: #1C1A17;
  margin: 0;
  line-height: 1.1;
}

.filter-drawer-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.drawer-reset-top-link {
  background: none;
  border: none;
  color: #C2410C;
  font-family: var(--dl-font-sans);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  transition: opacity 0.15s ease;
}

.drawer-reset-top-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.filter-drawer-close-btn {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dl-muted);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.filter-drawer-close-btn:hover {
  background: #e2e8f0;
  color: #1c1a17;
}

.filter-group-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.filter-group-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.filter-group-header {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8C857B;
  margin: 0;
}

.filter-group-header-val {
  font-size: 15px;
  font-weight: 800;
  color: #1C1A17;
}

.filter-header-action-btn {
  background: none;
  border: none;
  color: #064E3B;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s ease;
}

.filter-header-action-btn:hover {
  text-decoration: underline;
}

.filter-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Format standard des tags du tiroir (Calé sur les pastilles des cartes vigneron) */
.filter-chip-btn {
  background: #FFFFFF;
  border: 1.5px solid #EAE7E1;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: #1C1A17;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.filter-chip-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.filter-chip-btn.active {
  background: #FAF8F5 !important;
  border: 2px solid #064E3B !important;
  color: #064E3B !important;
  font-weight: 700;
  box-shadow: none;
}

.filter-chip-btn.active svg {
  color: #064E3B !important;
  stroke: #064E3B !important;
}

/* Pastilles de couleur du vin */
.wine-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-rouge { background-color: #BA2A29; }
.dot-blanc, .dot-blanc-sec { background-color: #FFFA81; border: 0.8px solid #E5E7EB; }
.dot-rose { background-color: #FFC6D0; }
.dot-petillant { background-color: #5EB35F; }
.dot-moelleux { background-color: #FFDE59; }

.filter-chip-btn.active .dot-rouge { background-color: #BA2A29; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6); }
.filter-chip-btn.active .dot-blanc, .filter-chip-btn.active .dot-blanc-sec { background-color: #FFFA81; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6); }
.filter-chip-btn.active .dot-rose { background-color: #FFC6D0; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6); }
.filter-chip-btn.active .dot-petillant { background-color: #5EB35F; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6); }
.filter-chip-btn.active .dot-moelleux { background-color: #FFDE59; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6); }

/* Curseur de distance */
.filter-distance-slider-wrap {
  width: 100%;
  padding: 8px 0 4px;
}

.filter-distance-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #EAE7E1;
  outline: none;
  cursor: pointer;
  margin: 0;
}

.filter-distance-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #064E3B;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.filter-distance-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.filter-distance-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #064E3B;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

/* Barre Sticky Horizontale en Bas du Tiroir (Mockup 05) */
.filter-drawer-sticky-footer {
  position: sticky;
  bottom: -24px;
  background: #ffffff;
  z-index: 20;
  margin: 14px -20px -24px -20px;
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.drawer-footer-left {
  display: flex;
  align-items: center;
}

.drawer-footer-right {
  display: flex;
  align-items: center;
}

.drawer-btn-apply {
  background: #064E3B;
  color: #ffffff !important;
  border: none;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.drawer-btn-apply:hover {
  background: #04382a;
  transform: translateY(-0.5px);
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.25);
}

/* --- VUE CARTE LEAFLET (Mockup 04 & Fullscreen Claude 2026) --- */
#map-view-container {
  display: none;
  width: 100%;
  height: calc(100vh - 180px);
  min-height: 520px;
  position: relative;
}

.content-area.in-map-view #map-view-container,
#map-view-container.fullscreen-mode {
  display: block !important;
}

#map-view,
.leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border-radius: var(--radius-md);
  background-color: #FAF8F5 !important;
}

.leaflet-tile-container img {
  background-color: #FAF8F5 !important;
}

/* Full Bleed (Bord à bord) sur Mobile */
@media (max-width: 680px) {
  .content-area.in-map-view {
    padding: 0 !important;
  }
  #map-view-container {
    height: calc(100vh - 185px);
    min-height: 480px;
    border-radius: 0;
    margin: 0;
  }
  #map-view {
    border-radius: 0;
  }
}

/* --- MODE PLEIN ÉCRAN CARTE (FULLSCREEN) --- */
body.map-is-fullscreen {
  overflow: hidden !important;
}

body.map-is-fullscreen .app-header,
body.map-is-fullscreen .controls-panel,
body.map-is-fullscreen #cards-container,
body.map-is-fullscreen #unlock-banner {
  display: none !important;
}

#map-view-container.fullscreen-mode {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100% !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  z-index: 500 !important;
  display: block !important;
}

#map-view-container.fullscreen-mode #map-view {
  border-radius: 0 !important;
  height: 100% !important;
  height: 100dvh !important;
}

/* Header Flottant en Mode Plein Écran (Fond Blanc, Bords Arrondis & Respiration) */
.map-fullscreen-header {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 850;
  display: none;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
  max-width: 860px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid #EAE7E1;
  border-radius: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 14px 18px;
  box-sizing: border-box;
}

@media (max-width: 639px) {
  .map-fullscreen-header {
    top: 10px;
    left: 10px;
    right: 10px;
    padding: 12px 14px;
    border-radius: 18px;
    gap: 8px;
  }
}

#map-view-container.fullscreen-mode .map-fullscreen-header {
  display: flex !important;
}

#map-view-container.fullscreen-mode .map-floating-controls {
  display: none !important;
}

.map-header-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.map-close-view-btn {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #475569;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.map-close-view-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: scale(1.06);
}

.map-view-toggle {
  background: #EDE9E1;
  padding: 2.5px;
  border-radius: var(--radius-pill);
  height: 38px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.map-view-toggle .toggle-btn {
  border: none;
  background: none;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.map-view-toggle .toggle-btn.active {
  background: #1C1A17;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.map-toggle-count-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.map-results-count-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 12px;
  border-right: 1px solid #EAE7E1;
  min-width: max-content;
}

.map-floating-search-bar {
  background: #FFFFFF;
  border: 1.5px solid #083324;
  border-radius: var(--radius-pill);
  padding: 0 14px;
  height: 38px;
  display: flex; /* Ouvert en permanence sur Desktop */
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 0;
  box-shadow: 0 2px 8px rgba(8, 51, 36, 0.08);
  animation: fadeInSearch 0.18s ease;
}

.map-floating-search-bar.is-open {
  display: flex !important;
}

.map-floating-search-bar:focus-within {
  background: #FFFFFF;
  border-color: #083324;
  box-shadow: 0 0 0 3px rgba(8, 51, 36, 0.12);
}

.map-search-icon {
  color: #083324;
  flex-shrink: 0;
}

.map-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dl-ink);
  font-family: inherit;
  min-width: 0;
}

.map-search-input::placeholder {
  color: #8C857B;
  font-size: 13px;
}

@media (max-width: 639px) {
  .map-header-top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0;
  }
  .map-toggle-count-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    gap: 6px;
  }
  .map-results-count-block {
    border-right: none !important;
    padding-right: 0 !important;
    text-align: right;
    flex: 1;
    min-width: 0;
  }
  .map-close-view-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 13px;
    margin-left: 6px;
    flex-shrink: 0;
  }
  .map-floating-search-bar {
    display: none;
    width: 100%;
    margin-top: 6px;
    order: 3;
  }
  .map-floating-search-bar.is-open {
    display: flex !important;
  }
}

.map-fullscreen-chips-row {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
  scrollbar-width: none;
  width: 100%;
  flex-wrap: nowrap;
}

.map-fullscreen-chips-row::-webkit-scrollbar {
  display: none;
}

/* Rangée Légende des Statuts & Badge Démo (Alignée à l'aplomb du bloc des filtres avec 10px d'écart) */
.map-sub-bar-row {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  flex-wrap: wrap;
  max-width: 100%;
}

.map-legend-bar {
  background: #FFFFFF;
  border-radius: 9999px;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  border: 1px solid #E2E8F0;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  pointer-events: auto;
}

/* Badge Version Démo Vue Carte (Fond vert clair comme vue liste) */
.map-demo-pill {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 9999px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
  white-space: nowrap;
}
.map-demo-pill svg {
  color: #059669;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .map-sub-bar-row {
    top: calc(100% + 10px);
    left: 0;
    gap: 6px;
  }
  .map-legend-bar {
    padding: 4.5px 10px;
    font-size: 11px;
    gap: 7px;
  }
  .map-demo-pill {
    padding: 4.5px 10px;
    font-size: 11px;
    gap: 5px;
  }
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
}

.legend-marker {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Positionner les contrôles de zoom Leaflet à gauche sous la légende */
.leaflet-top.leaflet-left {
  top: 170px !important;
  left: 14px !important;
}

.leaflet-control-zoom {
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

/* Boutons Flottants Contrôle Carte (Recentrer + Plein écran) EN HAUT À DROITE symétrique au zoom */
.map-floating-controls {
  position: absolute;
  top: 170px;
  right: 14px;
  bottom: auto;
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 639px) {
  .leaflet-top.leaflet-left {
    top: 165px !important;
    left: 10px !important;
  }
  .map-floating-controls {
    top: 165px;
    right: 10px;
  }
}

.map-ctrl-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dl-ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-ctrl-btn:hover {
  background: #f8fafc;
  border-color: var(--dl-ink);
  transform: scale(1.05);
}

/* User Location Pulsing Dot */
.user-gps-marker {
  width: 16px;
  height: 16px;
  background: #2563eb;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35);
  animation: pulseUserGps 2s infinite;
}

@keyframes pulseUserGps {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Clusters Leaflet personnalisés aux couleurs Divine Loire */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(62, 201, 154, 0.25) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: #3EC99A !important;
  color: #ffffff !important;
  font-family: var(--dl-font-sans) !important;
  font-weight: 800 !important;
  font-size: 12px !important;
}

/* Carte Flottante Leaflet (Bottom Sheet Épurée Alignée sur la Carte Vigneron 2026) */
.map-floating-card {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom, 14px));
  left: 12px;
  right: 12px;
  max-width: 440px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.25), 0 4px 12px -2px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.9);
  z-index: 1000;
  display: none;
  overflow: hidden;
  max-height: calc(100dvh - 130px);
  animation: slideUpSheet 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpSheet {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.map-winery-card {
  padding: 12px 16px 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-sheet-drag-handle {
  width: 36px;
  height: 4px;
  border-radius: 3px;
  background: #cbd5e1;
  margin: 0 auto 2px;
}

.map-card-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #f1f5f9;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
}

.map-card-close-btn:hover {
  background: #e2e8f0;
  color: #1c1a17;
}

/* Ligne 1 : Logo + Titre + Commune/km + Statut Ouverture + Cœur Favoris */
.map-card-header-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-right: 28px; /* place pour la croix */
}

.map-card-logo-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f4f3ef;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid #eae7e1;
  margin-top: 1px;
}

.map-card-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.map-card-logo-placeholder {
  font-family: var(--dl-font-serif);
  font-size: 18px;
  font-weight: 700;
  color: #064e3b;
}

.map-card-title-group {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-card-title {
  font-family: var(--dl-font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--dl-ink);
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-card-sub-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.3;
}

.map-card-commune {
  color: #64748b;
  font-weight: 500;
}

.map-card-sep {
  color: #cbd5e1;
}

.map-card-distance {
  color: #64748b;
  font-weight: 500;
}

.map-card-status-row {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.map-card-fav-wrap {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Ligne 2 : Pastilles Appellations */
.map-card-aop-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Ligne 4 : Actions (Itinéraire + Voir la fiche + Appel) */
.map-card-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.map-card-btn-itinerary {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1c1a17 !important;
  font-size: 13px;
  font-weight: 700;
  height: 38px;
  padding: 0 12px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.map-card-btn-itinerary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.map-card-btn-view {
  flex: 1.2;
  background: var(--dl-btn-forest);
  border: none;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  height: 38px;
  padding: 0 14px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.25);
}

.map-card-btn-view:hover {
  background: var(--dl-btn-forest-hover);
  transform: translateY(-1px);
}

.map-card-btn-call {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 5px;
  background: #ffffff;
  border: 1.5px solid #064E3B;
  color: #064E3B;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

@media (max-width: 768px) {
  .map-card-btn-call {
    display: inline-flex;
  }
}

.map-card-btn-call:hover {
  background: #f0fdf4;
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .map-floating-card {
    bottom: calc(10px + env(safe-area-inset-bottom, 10px));
    left: 8px;
    right: 8px;
    border-radius: 16px;
  }

  .map-winery-card {
    padding: 10px 12px 12px;
    gap: 7px;
  }

  .map-card-logo-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .map-card-title {
    font-size: 15px;
  }

  .map-card-sub-line {
    font-size: 11.5px;
  }

  .map-card-aop-row {
    gap: 4px;
  }

  .map-card-status-row {
    font-size: 12px;
  }

  .map-card-actions-row {
    gap: 6px;
    margin-top: 0;
  }

  .map-card-btn-itinerary {
    height: 34px;
    font-size: 12px;
    padding: 0 10px;
  }

  .map-card-btn-view {
    height: 34px;
    font-size: 12px;
    padding: 0 12px;
  }

  .map-card-btn-call {
    width: 34px;
    height: 34px;
  }
}

/* --- BLOC INFORMATIF VERSION DE DÉMO (1ère carte en mode Non-PRO) --- */
.dl-demo-info-card {
  grid-column: 1 / -1;
  background: #EAF7F2;
  border: none !important;
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: none !important;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.dl-demo-info-icon-wrap {
  width: auto !important;
  height: auto !important;
  min-width: auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-demo-info-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.dl-demo-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dl-demo-info-title {
  font-family: var(--dl-font-serif);
  font-size: 15px;
  font-weight: 800;
  color: #064E3B;
  margin: 0;
}

.dl-demo-info-pill {
  background: #D1FAE5;
  color: #065F46;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  border: 1px solid #A7F3D0;
}

.dl-demo-info-text {
  font-size: 13px;
  line-height: 1.45;
  color: #064E3B;
  font-weight: 500;
  margin: 0;
}

@media (max-width: 640px) {
  .dl-demo-info-card {
    padding: 14px 16px;
    gap: 12px;
  }
  .dl-demo-info-title {
    font-size: 14px;
  }
  .dl-demo-info-text {
    font-size: 12.5px;
  }
}

/* --- CARTE PROMO PAYWALL (Look & Contenu Page Archive Vignerons) --- */
.dl-promo-pro-card-mockup {
  background: #052B1E !important;
  border-radius: 20px !important;
  padding: 22px 20px !important;
  color: #FFFFFF !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 16px !important;
  border: 1px solid rgba(45, 212, 191, 0.25) !important;
  box-shadow: 0 10px 30px rgba(5, 43, 30, 0.25) !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 320px !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
}

.dl-promo-pro-card-mockup:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 36px rgba(5, 43, 30, 0.35) !important;
}

.dl-promo-card-top-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
}

.dl-promo-badge-pro {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #2DD4BF !important;
  background: rgba(45, 212, 191, 0.08) !important;
  border: 1.5px solid #2DD4BF !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
}

.dl-promo-price-block {
  display: flex !important;
  align-items: baseline !important;
}

.dl-promo-price-val {
  font-family: var(--dl-font-serif) !important;
  font-size: 26px !important;
  font-weight: 900 !important;
  color: #FFFFFF !important;
}

.dl-promo-main-title {
  font-family: var(--dl-font-serif) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  color: #FFFFFF !important;
  margin: 0 !important;
  text-align: left !important;
}

.dl-promo-checklist {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  text-align: left !important;
}

.dl-promo-check-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
}

.dl-promo-check-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  border-radius: 50% !important;
  background: #0D9488 !important;
  color: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

.dl-promo-actions-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
}

.dl-promo-btn-mint {
  background: #2DD4BF !important;
  color: #042116 !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  padding: 12px 18px !important;
  border-radius: 9999px !important;
  text-align: center !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.3) !important;
}

.dl-promo-btn-mint:hover {
  background: #14B8A6 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
}

.dl-promo-btn-ghost {
  background: transparent !important;
  color: #FFFFFF !important;
  border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  padding: 9px 16px !important;
  border-radius: 9999px !important;
  text-align: center !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

.dl-promo-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: #FFFFFF !important;
}

.btn-restore-link {
  background: none;
  border: none;
  color: #A7F3D0 !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s ease;
}

.btn-restore-link:hover {
  color: #FFFFFF !important;
}
