:root { --ink:#243447; --accent:#246b62; }
body { color:var(--ink); background:#f7f8fa; }
.hero { color:white; background:linear-gradient(120deg,#1d5b54,#397c70); }
.card { border:0; border-radius:1rem; overflow:hidden; }
.listing-photo { height:190px; object-fit:cover; }
.detail-photo { max-height:430px; width:100%; object-fit:cover; }
.map { height:390px; width:100%; z-index:1; }
.preserve-lines { white-space:normal; line-height:1.7; }

.filter-panel { border: 1px solid #e5e9ee; border-radius: 1rem; }
.filter-panel .form-select, .filter-panel .form-control { min-height: 44px; }

.gallery-photo { width:100%; height:190px; object-fit:cover; }
textarea.form-control { line-height:1.55; }

/* Lien Wikipédia dédié, mis en évidence au-dessus de la photo principale. */
.wiki-feature-row { display:flex; justify-content:flex-end; margin:0 0 .65rem; }
.wiki-feature { display:inline-flex; flex-direction:column; align-items:center; gap:.25rem; padding:.45rem .7rem; border:1px solid #e3e7eb; border-radius:.85rem; background:#fff; color:#243447; text-decoration:none; box-shadow:0 .15rem .5rem rgba(0,0,0,.07); }
.wiki-feature:hover { background:#f1f5f8; color:#1d5b54; }
.wiki-feature img { width:76px; height:76px; object-fit:contain; }
.wiki-feature span { font-size:.82rem; font-weight:600; }
/* ========================================
   CARTE OPENSTREETMAP EN PLEIN ÉCRAN
======================================== */

.map-shell {
    position: relative;
    width: 100%;
}

.map-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.map-shell:fullscreen,
.map-shell.map-fullscreen-fallback {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 15px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.map-shell:fullscreen #map,
.map-shell.map-fullscreen-fallback #map {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
}

.map-shell:fullscreen .leaflet-container,
.map-shell.map-fullscreen-fallback .leaflet-container {
    height: 100%;
}

/* Cartes générales des annuaires (patrimoine et EHPAD). */
.overview-map { height: 520px; }
.map-shell:fullscreen .overview-map,
.map-shell.map-fullscreen-fallback .overview-map {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
}
.map-shell:fullscreen,
.map-shell.map-fullscreen-fallback { z-index: 9999; }
@media (max-width: 767px) {
    .overview-map { height: 420px; }
}
