/* Sunu Ville — carte interactive */
.sv-carte {
  --sv-vert: #01723D; --sv-vert-fonce: #0B3D2A; --sv-vert-clair: #E8F3EC;
  --sv-soleil: #F4B42A; --sv-terre: #C8492B; --sv-encre: #1B1B18; --sv-gris: #6B6A63;
  --sv-bordure: #E6E1D6; --sv-sable: #F7F3EA; --sv-blanc: #fff;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--sv-encre);
  border: 1px solid var(--sv-bordure);
  border-radius: 20px;
  overflow: hidden;
  background: var(--sv-blanc);
}
.sv-carte__chargement { padding: 48px; text-align: center; color: var(--sv-gris); }

/* Barre de filtres */
.sv-barre { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--sv-bordure); }
.sv-carte .sv-select { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 32px 8px 12px; border: 1px solid var(--sv-bordure); border-radius: 999px; background: var(--sv-blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231B1B18' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; cursor: pointer; color: var(--sv-encre); }
.sv-carte .sv-select--petit { font-size: 13px; padding: 7px 30px 7px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.12); border-color: transparent; }
.sv-barre .sv-puces { display: flex; gap: 6px; flex-wrap: wrap; }
.sv-barre .sv-puce { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--sv-bordure); background: var(--sv-blanc); color: var(--sv-encre); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; }
.sv-barre .sv-puce:hover { border-color: var(--sv-vert); }
.sv-barre .sv-puce[aria-pressed="true"] { background: var(--sv-vert-fonce); border-color: var(--sv-vert-fonce); color: var(--sv-blanc); }
.sv-barre .sv-puce i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sv-barre .sv-puce b { font-weight: 700; opacity: .7; }
.sv-barre .sv-puce:focus-visible, .sv-carte .sv-select:focus-visible, .sv-carte .sv-btn-rond:focus-visible { outline: 3px solid var(--sv-soleil); outline-offset: 2px; }

/* Zone carte */
.sv-zone { position: relative; }
.sv-map { height: var(--sv-hauteur, 620px); max-height: 75vh; min-height: 280px; background: #EFE8D8; }
.sv-compteur { position: absolute; left: 50%; transform: translateX(-50%); top: 12px; z-index: 450; background: var(--sv-blanc); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,.12); pointer-events: none; white-space: nowrap; }
.sv-compteur--erreur { background: #FBE7E2; color: var(--sv-terre); white-space: normal; }
.sv-signaler { position: absolute; right: 16px; bottom: 24px; z-index: 450; background: var(--sv-terre); color: #fff !important; text-decoration: none; font-weight: 700; padding: 12px 20px; border-radius: 999px; box-shadow: 0 6px 18px rgba(200,73,43,.35); }
.sv-signaler:hover { filter: brightness(1.05); }
.sv-zone--fiche .sv-signaler { opacity: 0; pointer-events: none; }
.sv-signaler { transition: opacity .15s; }

/* Contrôles */
.sv-carte .leaflet-control-zoom { border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.15); border-radius: 12px; overflow: hidden; }
.sv-carte .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 40px; color: var(--sv-encre); }
.sv-carte .sv-btn-rond { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--sv-blanc); color: var(--sv-encre); box-shadow: 0 2px 10px rgba(0,0,0,.15); cursor: pointer; display: grid; place-items: center; }
.sv-carte .sv-btn-rond:hover { color: var(--sv-vert); }

/* Repères */
.sv-repere { background: none; border: 0; }
.sv-repere span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sv-blanc); border: 4px solid; box-sizing: border-box; box-shadow: 0 3px 8px rgba(0,0,0,.25); transition: transform .15s; }
.sv-repere span i { width: 10px; height: 10px; border-radius: 50%; }
.sv-repere:hover span, .sv-repere:focus span { transform: scale(1.15); }
.sv-groupe { background: none; }
.sv-groupe span { display: grid; place-items: center; border-radius: 50%; background: var(--sv-vert-fonce); color: #fff; font-weight: 700; border: 4px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25); box-sizing: border-box; }
.sv-groupe--s span { width: 40px; height: 40px; font-size: 14px; margin: -20px 0 0 -20px; }
.sv-groupe--m span { width: 48px; height: 48px; font-size: 15px; margin: -24px 0 0 -24px; }
.sv-groupe--l span { width: 58px; height: 58px; font-size: 16px; margin: -29px 0 0 -29px; background: var(--sv-vert); }

/* Fiche (popup) */
.sv-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 16px; overflow: hidden; }
.sv-popup .leaflet-popup-content { margin: 0; width: 280px !important; }
.sv-fiche__photo { display: block; width: 100%; height: 140px; object-fit: cover; background: #FDF0D5; }
.sv-fiche__corps { padding: 14px 16px 16px; }
.sv-fiche__puces { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sv-tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--sv-sable); border: 1px solid var(--sv-bordure); }
.sv-tag--statut { display: inline-flex; align-items: center; gap: 5px; background: color-mix(in srgb, var(--c) 14%, #fff); border-color: transparent; color: var(--c); }
.sv-tag--statut i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.sv-fiche__titre { font-family: "Bricolage Grotesque", "DM Sans", sans-serif; font-size: 17px; line-height: 1.25; margin: 0 0 4px; }
.sv-fiche__lieu { font-size: 13px; color: var(--sv-gris); margin: 0 0 12px !important; }
.sv-fiche__lieu em { font-size: 12px; }
.sv-fiche__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sv-fiche__actions > * { white-space: nowrap; }
.sv-soutien { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--sv-bordure); background: var(--sv-blanc); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.sv-soutien--ok { background: var(--sv-vert-clair); border-color: transparent; color: var(--sv-vert); }
.sv-voir { margin-left: auto; font-size: 13px; font-weight: 700; color: #fff !important; background: var(--sv-vert); padding: 9px 14px; border-radius: 999px; text-decoration: none; }

/* Légende et carte de chaleur */
.sv-carte-legende { background: var(--sv-blanc); padding: 10px 14px; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.12); font-size: 12px; line-height: 1.7; }
.sv-carte-legende strong { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--sv-gris); }
.sv-carte-legende span { display: flex; align-items: center; gap: 8px; }
.sv-carte-legende i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sv-carte-legende i.sv-carre { border-radius: 3px; }
.sv-carte-legende__notes { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--sv-bordure); }
.sv-infobulle { font-family: inherit; font-size: 13px; border-radius: 10px; }

@media (max-width: 640px) {
  .sv-carte { border-radius: 14px; }
  .sv-barre { flex-wrap: nowrap; overflow-x: auto; padding: 10px 12px; scrollbar-width: none; }
  .sv-barre::-webkit-scrollbar { display: none; }
  .sv-barre .sv-puces { flex-wrap: nowrap; }
  .sv-barre .sv-puce, .sv-carte .sv-select { white-space: nowrap; flex-shrink: 0; }
  .sv-carte-legende { display: none; }
  .sv-signaler { bottom: 16px; right: 12px; padding: 10px 16px; }
  .sv-compteur { top: 58px; left: 12px; transform: none; font-size: 12px; }
}

/* =========================================================
   Page carte plein écran — [sunuville_carte affichage="plein"]
   ========================================================= */
.sv-carte--plein {
  --sv-encre: #15211B; --sv-gris: #5B6B62; --sv-bordure: #E5E0D3; --sv-vert-clair: #E3F1E8;
  display: grid; grid-template-columns: 440px minmax(0, 1fr);
  height: calc(100vh - var(--entete, 88px)); height: calc(100dvh - var(--entete, 88px)); min-height: 520px;
  margin: 0 !important; border: 0; border-radius: 0; background: #fff;
}
.sv-carte--plein .sv-carte__chargement { grid-column: 1 / -1; }
.svp-m { display: none !important; }
.svp-panneau { display: flex; flex-direction: column; gap: 16px; padding: 28px 24px; border-right: 1px solid var(--sv-bordure); overflow-y: auto; min-height: 0; background: #fff; }
.svp-titre { margin: 0; font: 700 24px/1.2 "Bricolage Grotesque", "DM Sans", sans-serif; letter-spacing: -.5px; color: var(--sv-encre); }
.svp-sous { margin: 0; font-size: 14px; line-height: 1.5; color: var(--sv-gris); }
.svp-cherche { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1.5px solid var(--sv-bordure); border-radius: 999px; background: #fff; flex-shrink: 0; }
.svp-cherche:focus-within { border-color: var(--sv-vert); }
.svp-cherche__region { position: relative; display: inline-flex; align-items: center; gap: 6px; padding-right: 12px; border-right: 1.5px solid var(--sv-bordure); color: var(--sv-vert); font-weight: 600; font-size: 16px; line-height: 1.4; cursor: pointer; white-space: nowrap; }
.svp-cherche__val { color: var(--sv-vert-fonce); }
.svp-cherche__region select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.svp-cherche > .sv-ico { color: var(--sv-gris); flex-shrink: 0; }
.svp-cherche input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-family: inherit; font-weight: 400; font-size: 16px; line-height: 1.55; color: var(--sv-encre); padding: 0; }
.svp-cherche input::placeholder { color: var(--sv-gris); opacity: 1; }
.svp-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.svp-puce { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 999px; font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1.4; white-space: nowrap; cursor: pointer; text-decoration: none; }
.svp-puce i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.svp-puce b { font-weight: 600; }
.svp-puce--neutre { background: #fff; color: var(--sv-gris); box-shadow: inset 0 0 0 1px var(--sv-bordure); }
.svp-puce--terre { background: #F8E3DC; color: var(--sv-terre); }
.svp-puce--soleil { background: #FDF1D6; color: var(--sv-encre); }
.svp-puce--vert { background: var(--sv-vert-clair); color: var(--sv-vert-fonce); }
.svp-puce--sombre, .svp-puce--tous { background: var(--sv-vert-fonce); color: #fff; }
.svp-cats .svp-puce[aria-pressed="true"] { background: var(--sv-vert-fonce); color: #fff; box-shadow: none; }
.svp-cats .svp-puce--neutre:hover { color: var(--sv-vert); box-shadow: inset 0 0 0 1px var(--sv-vert); }
.svp-stats .svp-puce[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; }
.svp-stats .svp-puce--tous[aria-pressed="false"] { background: #fff; color: var(--sv-gris); box-shadow: inset 0 0 0 1px var(--sv-bordure); }
.svp-puce:focus-visible, .svp-cherche__region:focus-within, .svp-ctrl button:focus-visible { outline: 3px solid var(--sv-soleil); outline-offset: 2px; }
.svp-liste { display: flex; flex-direction: column; gap: 16px; }
.svp-liste .svp-sig { flex-shrink: 0; }
.svp-vide { margin: 0; padding: 24px; border: 1px dashed var(--sv-bordure); border-radius: 16px; text-align: center; color: var(--sv-gris); font-size: 14px; }
.svp-plus { font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1.4; padding: 12px; border: 1.5px solid var(--sv-vert); border-radius: 999px; background: #fff; color: var(--sv-vert); cursor: pointer; }

.svp-zone { position: relative; min-height: 0; }
.svp-zone .sv-map { height: 100%; max-height: none; min-height: 0; background: #EFE7D6; }
.svp-zone .leaflet-tile-pane { filter: sepia(.28) saturate(.75) brightness(1.03); }
.svp-surfiltres { position: absolute; top: 24px; left: 24px; z-index: 500; display: flex; gap: 8px; }
.svp-select { position: relative; cursor: pointer; }
.svp-select select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.svp-select small { font-size: 10px; }
.svp-ctrl { position: absolute; top: 24px; right: 24px; z-index: 500; display: flex; flex-direction: column; gap: 14px; }
.svp-zoom { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--sv-bordure); border-radius: 12px; overflow: hidden; }
.svp-zoom button { width: 44px; height: 44px; border: 0; background: #fff; font: 600 18px/1 "Bricolage Grotesque", sans-serif; color: var(--sv-encre); cursor: pointer; }
.svp-zoom button:hover, .svp-pos:hover { color: var(--sv-vert); }
.svp-pos { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--sv-bordure); border-radius: 12px; background: #fff; color: var(--sv-encre); cursor: pointer; }
.svp-legende { position: absolute; left: 24px; bottom: 21px; z-index: 500; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: #fff; border: 1px solid var(--sv-bordure); border-radius: 14px; font-size: 14px; line-height: 1.5; color: var(--sv-encre); }
.svp-legende strong { font-size: 12px; line-height: 1.3; letter-spacing: 1px; text-transform: uppercase; color: var(--sv-gris); }
.svp-legende span { display: flex; align-items: center; gap: 8px; }
.svp-legende i { width: 12px; height: 12px; border-radius: 50%; }
.svp-signaler { position: absolute; right: 62px; bottom: 26px; z-index: 500; padding: 14px 24px; border-radius: 999px; background: var(--sv-terre); color: #fff !important; font-weight: 600; font-size: 16px; line-height: 1.4; text-decoration: none; }
.svp-signaler:hover { filter: brightness(1.06); }
.svp-compteur { top: 72px; }
.svp-zone .leaflet-control-attribution { font-size: 10px; }

.svp-repere { background: none; border: 0; }
.svp-repere span { display: grid; place-items: center; width: 40px; height: 40px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 4px solid var(--c); color: var(--c); box-shadow: 0 3px 8px rgba(0,0,0,.18); transition: transform .15s; }
.svp-repere--terre { --c: #C8492B; } .svp-repere--soleil { --c: #F4B42A; } .svp-repere--vert { --c: #01723D; }
.svp-repere--soleil span { color: var(--sv-vert-fonce); }
.svp-repere:hover span, .svp-repere:focus span { transform: scale(1.12); }
.svp-groupe { background: none; }
.svp-groupe span { display: grid; place-items: center; width: 52px; height: 52px; box-sizing: border-box; border-radius: 50%; background: var(--sv-vert-fonce); border: 4px solid #fff; color: #fff; font-weight: 600; font-size: 16px; }

.svp-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.svp-popup .leaflet-popup-content { margin: 0; width: 300px !important; font-family: inherit; }
.svp-popup .leaflet-popup-tip-container { display: none; }
.svp-popup a.leaflet-popup-close-button { top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--sv-encre); font: 18px/28px sans-serif; }
.svp-bulle__photo { height: 130px; display: grid; place-items: center; background: #FDF1D6; color: var(--sv-vert); }
.svp-bulle__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svp-bulle__corps { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.svp-bulle h3, .svp-fiche h3 { margin: 0; font: 600 18px/1.3 "Bricolage Grotesque", "DM Sans", sans-serif; color: var(--sv-encre); }
.svp-bulle p, .svp-fiche p { margin: 0 !important; font-size: 14px; line-height: 1.5; color: var(--sv-gris); }
.svp-bulle .svp-puce, .svp-fiche .svp-puce { cursor: default; }
.svp-voir { display: flex; justify-content: center; padding: 14px 24px; border-radius: 999px; background: var(--sv-vert); color: #fff !important; font-weight: 600; font-size: 16px; line-height: 1.4; text-decoration: none; }
.svp-voir:hover { background: var(--sv-vert-fonce); }
.svp-bulle .svp-voir { margin-top: 0; }

@media (max-width: 1023px) and (min-width: 768px) {
  .sv-carte--plein { grid-template-columns: 360px minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .svp-d { display: none !important; }
  .svp-m { display: revert !important; }
  .sv-carte--plein { display: block; position: relative; height: calc(100vh - var(--onglets, 84px)); height: calc(100dvh - var(--onglets, 84px)); min-height: 480px; }
  .svp-panneau { position: absolute; top: 0; left: 0; right: 0; z-index: 600; padding: 14px 16px 12px; gap: 10px; border: 0; overflow: visible; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
  .svp-titre { font: 600 18px/1.3 "Bricolage Grotesque", "DM Sans", sans-serif; letter-spacing: 0; }
  .svp-sous, .svp-cats, .svp-liste { display: none; }
  .svp-cherche { padding: 14px 16px; }
  .svp-cherche__region { gap: 4px; padding-right: 10px; font-size: 14px; }
  .svp-stats { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .svp-stats::-webkit-scrollbar { display: none; }
  .svp-stats .svp-puce--soleil i { background: var(--sv-encre); }
  .svp-stats .svp-puce--vert i { background: var(--sv-vert-fonce); }
  .svp-zone { position: absolute; inset: 0; }
  .svp-ctrl { top: auto; bottom: 330px; right: 16px; }
  .svp-pos { border-radius: 22px; }
  .svp-fiche { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 600; padding: 10px 16px 16px; flex-direction: column; gap: 8px; background: #fff; border-radius: 18px; box-shadow: 0 6px 20px rgba(0,0,0,.16); }
  .svp-fiche:not([hidden]) { display: flex !important; }
  .svp-fiche__poignee { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--sv-bordure); }
  .svp-fiche__haut { display: flex; align-items: center; gap: 12px; }
  .svp-fiche__photo { width: 64px; height: 64px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: #FDF1D6; color: var(--sv-vert); }
  .svp-fiche__photo img { width: 100%; height: 100%; object-fit: cover; }
  .svp-fiche__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .svp-fiche h3 { font: 600 16px/1.4 "DM Sans", sans-serif; }
  .svp-fiche .svp-puces { gap: 6px; flex-wrap: nowrap; }
  .svp-compteur { top: 170px; }
  .svp-zone .leaflet-control-attribution { display: none; }
}
