/* Carte des membres (Leaflet) */
.map-container .map-canvas { position: absolute; inset: 0; z-index: 1; background: #E6ECF8; }
.map-container .leaflet-container { font-family: var(--font-body); }
.map-notice { z-index: 1100; max-width: calc(100% - 40px); }

/* Marqueurs : avatar rond + prénom, dans le style des pins live */
.lf-pin-wrap { background: none; border: 0; }
.lf-pin { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.lf-pin-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 3px solid #fff; overflow: hidden;
  box-shadow: 0 4px 12px rgba(32, 58, 124, 0.35); transition: transform 0.2s;
}
.lf-pin:hover .lf-pin-avatar { transform: scale(1.12); }
.lf-pin.me .lf-pin-avatar { border-color: var(--accent); }
.lf-pin-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lf-pin-label {
  font-size: 11px; font-weight: 600; color: var(--primary); background: rgba(255, 255, 255, 0.95); padding: 2px 8px;
  border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Regroupements */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(73, 55, 129, 0.25); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
  background: var(--grad-diagonal); color: #fff; font-family: var(--font-title); font-weight: 700; box-shadow: 0 4px 12px rgba(32, 58, 124, 0.3);
}

/* Bulle d'un membre */
.leaflet-popup-content-wrapper { border-radius: var(--radius-sm); box-shadow: var(--shadow-hover); }
.leaflet-popup-content { margin: 14px 16px; min-width: 170px; }
.map-popup-name { font-family: var(--font-title); font-weight: 600; font-size: 15px; color: var(--text-title); }
.map-popup-city { font-size: 12.5px; color: var(--text-muted); margin: 2px 0 10px; }
.map-popup .member-dm-btn { margin: 0; }

/* Panneau « Ma position » */
.map-panel {
  position: absolute; top: 16px; left: 16px; z-index: 1000; width: 270px; padding: 16px 18px;
  background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
}
.map-panel h4 { margin: 0 0 10px; font-family: var(--font-title); font-size: 14px; color: var(--text-title); }
.map-panel input[type="text"] {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; font-family: var(--font-body); outline: none; box-sizing: border-box;
}
.map-panel input[type="text"]:focus { border-color: var(--primary); }
.map-toggle { display: flex; align-items: center; gap: 10px; margin: 12px 0; font-size: 13px; color: var(--text-body); cursor: pointer; }
.map-toggle input { accent-color: var(--primary); width: 16px; height: 16px; }
.map-save {
  width: 100%; padding: 10px; border: 0; border-radius: var(--radius-full); background: var(--primary); color: #fff;
  font-weight: 600; font-size: 13px; cursor: pointer; transition: background 0.2s;
}
.map-save:hover:not(:disabled) { background: var(--secondary); }
.map-save:disabled { opacity: 0.6; cursor: default; }
.map-panel-hint { margin: 10px 0 0; font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.map-panel-hint.error { color: #B42318; }
.map-panel-hint.ok { color: var(--success); }
.map-empty {
  position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 1000; padding: 10px 18px;
  background: var(--background); border-radius: var(--radius-full); box-shadow: var(--shadow-card); font-size: 13px; color: var(--text-body);
}
.map-error { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--text-body); font-size: 14px; }
@media (max-width: 640px) { .map-panel { width: calc(100% - 32px); } }
