/* =========================================================================
   BDC Artist Network — styles de la carte du réseau.
   Charte 2026 : luxe minimaliste froid (gris métal / encre).
   Chargé uniquement sur bdc-map.html. Réutilise les tokens de style.css.
   ========================================================================= */

.tm { position: relative; }

/* --- Filtres --------------------------------------------------------- */
.tm-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1rem;
  padding-bottom: 1.4rem; margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.tm-search {
  display: inline-flex; align-items: center; gap: 0.6em;
  flex: 1 1 260px; min-width: 220px;
  padding: 0.7em 1.1em;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted);
  transition: border-color 0.25s var(--e);
}
.tm-search:focus-within { border-color: var(--ink); }
.tm-search svg { flex-shrink: 0; }
.tm-search input {
  flex: 1; background: none; border: 0; outline: none;
  color: var(--ink); font-family: var(--sans); font-size: 0.9rem;
}
.tm-search input::placeholder { color: var(--muted); }
.tm-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.tm-specs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tm-spec {
  padding: 0.5em 1.1em;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  color: var(--ink-2);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s var(--e), border-color 0.25s var(--e), background-color 0.25s var(--e);
}
.tm-spec:hover { border-color: var(--ink); color: var(--ink); }
.tm-spec.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

.tm-count { margin-left: auto; font-family: var(--sans); font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.tm-count [data-count-n] { color: var(--ink); font-weight: 700; }

/* --- Layout ---------------------------------------------------------- */
.tm-layout {
  display: grid; grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 1.5rem; align-items: start;
}
.tm-panel {
  max-height: min(74vh, 780px); overflow-y: auto; padding-right: 0.4rem;
  scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
}
.tm-list { display: flex; flex-direction: column; gap: 0.8rem; list-style: none; margin: 0; padding: 0; }

.tm-mapwrap { position: sticky; top: 1.5rem; }
.tm-map {
  height: min(74vh, 780px); min-height: 360px;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 30px 70px -40px rgba(2, 2, 2, 0.4);
}
.tm-map__fallback { display: grid; place-items: center; height: 100%; color: var(--muted); font-family: var(--sans); font-size: 0.85rem; }

/* --- Fiche technicienne --------------------------------------------- */
.tm-card {
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: 1.1rem 1.25rem;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.25s var(--e), background-color 0.25s var(--e), box-shadow 0.25s var(--e), transform 0.25s var(--e2);
}
.tm-card:hover { border-color: var(--ink); box-shadow: 0 14px 30px -18px rgba(2, 2, 2, 0.35); }
.tm-card.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tm-card__name { font-family: var(--serif); font-size: 1.2rem; line-height: 1.1; font-weight: 600; color: var(--ink); }
.tm-card__salon { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.03em; color: var(--accent-2); margin-top: 0.15rem; }
.tm-card__loc {
  display: flex; align-items: flex-start; gap: 0.5em;
  font-family: var(--sans); font-size: 0.85rem; color: var(--ink-2); margin: 0;
}
.tm-card__loc svg { color: var(--accent-2); flex-shrink: 0; margin-top: 0.15em; }
.tm-card__specs { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.tm-card__spec {
  padding: 0.25em 0.7em;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2);
  border: 1px solid var(--accent); border-radius: 999px;
}
.tm-card__contact { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin-top: 0.1rem; }
.tm-card__link {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--sans); font-size: 0.82rem; color: var(--ink-2);
  transition: color 0.25s var(--e);
}
.tm-card__link svg { color: var(--muted); transition: color 0.25s var(--e); }
.tm-card__link:hover, .tm-card__link:hover svg { color: var(--ink); }

.tm-empty { color: var(--muted); text-align: center; padding: 2.5rem 0; font-family: var(--sans); }

/* --- Marqueur (divIcon) — encre sur carte claire -------------------- */
.tm-pin { display: grid; place-items: center; }
.tm-pin__dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--bg);
  box-shadow: 0 0 0 1.5px rgba(2, 2, 2, 0.35), 0 2px 6px rgba(2, 2, 2, 0.45);
  transition: transform 0.2s var(--e2), box-shadow 0.2s ease, background 0.2s ease;
}
.tm-pin:hover .tm-pin__dot { transform: scale(1.25); }
.tm-pin--active .tm-pin__dot {
  transform: scale(1.5); background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(88, 88, 88, 0.4), 0 4px 12px rgba(2, 2, 2, 0.5);
}

/* --- Tuiles : réchauffer légèrement pour coller à l'ivoire ---------- */
.tm-map .leaflet-tile-pane { filter: saturate(0.82) brightness(1.02) contrast(0.96) sepia(0.06); }
.tm-map { background: var(--bg-2); }

/* --- Popup Leaflet (thème clair) ------------------------------------ */
.tm-popup .leaflet-popup-content-wrapper {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 24px 60px rgba(2, 2, 2, 0.28);
}
.tm-popup .leaflet-popup-tip { background: var(--panel); border: 1px solid var(--line); }
.tm-popup .leaflet-popup-content { margin: 0.9rem 1.1rem; font-family: var(--sans); }
.tm-popup a.leaflet-popup-close-button { color: var(--muted); }
.tm-popup a.leaflet-popup-close-button:hover { color: var(--ink); }
.tm-pop__name { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.tm-pop__salon { font-size: 0.8rem; color: var(--accent-2); margin-top: 0.1rem; }
.tm-pop__loc { font-size: 0.83rem; color: var(--ink-2); margin-top: 0.35rem; }
.tm-pop__specs { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.6rem; }
.tm-pop__spec {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2); padding: 0.2em 0.6em; border: 1px solid var(--accent); border-radius: 999px;
}
.tm-pop__links { display: flex; gap: 0.9rem; margin-top: 0.7rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.tm-pop__links a { font-size: 0.8rem; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tm-pop__links a:hover { color: var(--accent-2); }

/* --- Contrôles Leaflet ---------------------------------------------- */
.tm-map .leaflet-bar a {
  background: var(--panel); color: var(--ink); border-color: var(--line);
}
.tm-map .leaflet-bar a:hover { background: var(--panel-2); }

/* --- Bandeau « Candidatez au Network » ------------------------------ */
.joinmap__in { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.joinmap__title { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); margin: 0.3rem 0 0.7rem; }
.joinmap__title i { font-style: italic; color: var(--accent-soft); }
.joinmap__text { max-width: 60ch; color: var(--ink-2); }
.joinmap__note {
  max-width: 60ch; margin-top: 1rem; padding-left: 0.9rem;
  border-left: 2px solid var(--accent); color: var(--muted);
  font-size: 0.8rem; line-height: 1.6;
}

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 900px) {
  .tm-layout { grid-template-columns: 1fr; }
  .tm-mapwrap { position: static; order: -1; }
  .tm-map { height: 56vh; }
  .tm-panel { max-height: none; overflow: visible; padding-right: 0; }
  .tm-count { margin-left: 0; }
}
