/* =========================================================
   GY CODING — zone d'intervention : explorateur carte + liste
   Thème d'origine (variables de style.css, clair / sombre)
   ========================================================= */
.zx { display: grid; grid-template-columns: 380px minmax(0, 1fr); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); overflow: hidden; background: var(--bg-card); box-shadow: 0 30px 60px -36px var(--shadow-soft); }

/* panneau de gauche */
.zx-panel { display: flex; flex-direction: column; border-right: 1px solid var(--border); min-height: 0; height: 620px; }
.zx-search { position: relative; padding: 1rem 1rem .6rem; }
.zx-search svg { position: absolute; left: 1.9rem; top: 50%; margin-top: -.1rem; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.zx-search input { width: 100%; padding: .8rem 1rem .8rem 2.6rem; border-radius: 999px; border: 1px solid var(--border-light); background: var(--bg-alt-2); color: var(--text); font: inherit; font-size: .92rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.zx-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.zx-tabs { display: flex; gap: .4rem; padding: .2rem 1rem .7rem; flex-wrap: wrap; }
.zx-tabs button { font-family: var(--font-head); font-weight: 600; font-size: .76rem; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); background: transparent; cursor: pointer; transition: all .2s; }
.zx-tabs button:hover { border-color: var(--accent); color: var(--accent); }
.zx-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.zx-count { padding: 0 1.1rem .5rem; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); font-family: ui-monospace, Consolas, monospace; }
.zx-list { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 0 .5rem .5rem; scrollbar-width: thin; scrollbar-color: var(--border-light) transparent; }
.zx-row { width: 100%; display: grid; grid-template-columns: 1.1rem 1fr auto 1rem; gap: .65rem; align-items: center; text-align: left; padding: .72rem .7rem; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--text); cursor: pointer; font: inherit; transition: background .18s, border-color .18s; }
.zx-row:hover { background: var(--bg-alt-2); }
.zx-row.on { background: rgba(226,16,42,.08); border-color: rgba(226,16,42,.3); }
.zx-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.zx-name { font-family: var(--font-head); font-weight: 600; font-size: .95rem; }
.zx-d { font-size: .74rem; color: var(--text-dim); white-space: nowrap; }
.zx-row svg { color: var(--text-dim); transition: transform .2s, color .2s; }
.zx-row:hover svg, .zx-row.on svg { color: var(--accent); transform: translateX(3px); }
.zx-none { padding: 1.2rem; font-size: .9rem; color: var(--text-muted); }
.zx-priv { padding: .7rem 1.1rem 1rem; font-size: .72rem; color: var(--text-dim); border-top: 1px solid var(--border); }

/* carte */
.zx-mapwrap { position: relative; height: 620px; min-width: 0; }
.zx-map { position: absolute; inset: 0; background: var(--bg-alt-2); z-index: 1; }
.zx-map .leaflet-tile-pane { transition: filter .3s; }
.zx-map .leaflet-control-attribution { font-size: .62rem; background: color-mix(in srgb, var(--bg-card) 80%, transparent); color: var(--text-dim); }
.zx-map .leaflet-control-attribution a { color: var(--text-muted); }
.zx-map .leaflet-bar { border: 1px solid var(--border-light); box-shadow: none; border-radius: 10px; overflow: hidden; }
.zx-map .leaflet-bar a { background: var(--bg-card); color: var(--text); border-bottom-color: var(--border); }
.zx-map .leaflet-bar a:hover { background: var(--bg-alt-2); }

/* repères */
.zx-pin-wrap, .zx-hq-wrap, .zx-me-wrap { background: none !important; border: 0 !important; }
.zx-pin { display: block; width: 14px; height: 14px; margin: 4px; border-radius: 50%; background: var(--accent); border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: transform .2s; }
.zx-pin-wrap:hover .zx-pin { transform: scale(1.35); }
.zx-pin.on { transform: scale(1.6); box-shadow: 0 0 0 6px rgba(226,16,42,.28), 0 2px 8px rgba(0,0,0,.4); }
.zx-hq { position: relative; display: block; width: 34px; height: 34px; }
.zx-hq b { position: absolute; inset: 9px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.zx-hq i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: zx-ping 2.4s ease-out infinite; }
.zx-hq i + i { animation-delay: 1.2s; }
@keyframes zx-ping { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.zx-me { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-2); border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(0,180,220,.25); }

/* bulle d'info */
.zx-popup .leaflet-popup-content-wrapper { border-radius: 14px; background: var(--bg-card); color: var(--text); border: 1px solid var(--border-light); box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); padding: 0; }
.zx-popup .leaflet-popup-tip { background: var(--bg-card); border: 1px solid var(--border-light); }
.zx-popup .leaflet-popup-content { margin: 0; }
.zx-popup a.leaflet-popup-close-button { color: var(--text-dim); }
.zx-pop { display: grid; gap: .25rem; padding: 1rem 1.1rem 1rem; min-width: 220px; }
.zx-pop strong { font-family: var(--font-head); font-size: 1.05rem; }
.zx-pop > span { font-size: .78rem; color: var(--text-muted); }
.zx-pop-b { display: grid; gap: .45rem; margin-top: .6rem; }
.zx-pop-b a { display: block; text-align: center; padding: .55rem .8rem; border-radius: 999px; font-family: var(--font-head); font-weight: 600; font-size: .8rem; text-decoration: none; }
.zx-pop-call { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff !important; }
.zx-pop-req { border: 1px solid var(--border-light); color: var(--text) !important; }
.zx-pop-req:hover { border-color: var(--accent); color: var(--accent) !important; }

/* outils + légende */
.zx-tools { position: absolute; z-index: 500; left: .8rem; top: .8rem; display: flex; gap: .4rem; flex-wrap: wrap; max-width: calc(100% - 4.5rem); }
.zx-tools button { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 999px; font-family: var(--font-head); font-weight: 600; font-size: .76rem; border: 1px solid var(--border-light); background: var(--bg-card); color: var(--text); cursor: pointer; box-shadow: 0 6px 18px -8px rgba(0,0,0,.35); transition: all .2s; }
.zx-tools button:hover { border-color: var(--accent); color: var(--accent); }
.zx-tools button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.zx-tools button.busy { opacity: .6; pointer-events: none; }
.zx-legend { position: absolute; z-index: 500; left: .8rem; bottom: 1.6rem; display: grid; gap: .3rem; padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--border-light); background: color-mix(in srgb, var(--bg-card) 90%, transparent); backdrop-filter: blur(6px); font-size: .72rem; color: var(--text-muted); }
.zx-legend span { display: flex; align-items: center; gap: .5rem; }
.zx-legend i { width: .9rem; height: .9rem; border-radius: 50%; border: 1.5px dashed var(--accent); display: inline-block; }
.zx-legend span:nth-child(1) i { background: rgba(226,16,42,.28); }
.zx-legend span:nth-child(2) i { background: rgba(226,16,42,.16); }
.zx-legend span:nth-child(3) i { background: rgba(226,16,42,.07); }
.zx-msg { position: absolute; z-index: 600; left: 50%; bottom: 1.4rem; transform: translateX(-50%); max-width: min(92%, 520px); padding: .8rem 1.1rem; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-light); box-shadow: 0 18px 40px -14px rgba(0,0,0,.5); font-size: .85rem; color: var(--text); }
.zx-msg[hidden] { display: none; }
.zx-msg.ok { border-color: var(--success); }
.zx-msg.far { border-color: var(--warning); }

@media (max-width: 1020px) {
  .zx { grid-template-columns: 1fr; }
  .zx-mapwrap { order: -1; height: 460px; }
  .zx-panel { height: auto; max-height: 560px; border-right: 0; border-top: 1px solid var(--border); }
  .zx-legend { display: none; }
}
@media (max-width: 560px) { .zx-mapwrap { height: 400px; } .zx-tools button span { display: none; } .zx-tools button { padding: .55rem .7rem; } }
