/* ══════════════════════════════════════════════════
   Localisation outil sur le panneau — viewer.php
══════════════════════════════════════════════════ */

/* ── Bouton dans le header ─────────────────────── */
.btn-localiser {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
  flex-shrink: 0;
}

.btn-localiser:hover { color: var(--text-primary); }

/* ── Overlay fond ──────────────────────────────── */
#loc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#loc-overlay.visible {
  display: flex;
}

/* ── Modal ─────────────────────────────────────── */
.loc-modal {
  background: var(--color-surface, #1e2a3a);
  border-radius: 20px;
  overflow: hidden;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: loc-modal-in 0.18s ease-out;
}

@keyframes loc-modal-in {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ── Header du modal ───────────────────────────── */
.loc-modal-header {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panneau-loc-link {
  margin-left: auto;
  font-size: 12px;
  color: #e5a000;
  text-decoration: none;
  font-weight: 600;
}

.panneau-loc-link:hover { text-decoration: underline; }

.loc-close {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
  padding: 2px;
  margin-left: 4px;
}

.loc-close:hover { opacity: 1; }

/* ── Thème clair ─────────────────────────────────── */
[data-theme="light"] .loc-modal {
  background: var(--color-surface, #ffffff);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .loc-modal-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .loc-close {
  color: var(--text-primary);
}

/* ── Image panneau ─────────────────────────────── */
.panneau-loc-wrap {
  position: relative;
  line-height: 0;
}

.panneau-loc-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Hotspot surligné ──────────────────────────── */
.panneau-loc-spot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--text-primary);
  background: #e53535;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
}

@keyframes loc-pulse {
  0%   { box-shadow: 0 0 0 0px  rgba(229,53,53,0.8),
                     0 0 0 0px  rgba(229,53,53,0.4); }
  70%  { box-shadow: 0 0 0 24px rgba(229,53,53,0),
                     0 0 0 36px rgba(229,53,53,0); }
  100% { box-shadow: 0 0 0 0px  rgba(229,53,53,0),
                     0 0 0 0px  rgba(229,53,53,0); }
}

.panneau-loc-pulse {
  animation: loc-pulse .5s ease-out infinite;
}
