/* sertelet.fr — page Carte : toutes les photos géolocalisées, sans fournisseur de tuiles. */
:root {
  --encre: #ece8df; --doux: #a39e93; --pale: #6f6b62; --nuit: #0b0b0a;
  --terre: #1b1a17; --cote: rgba(236, 232, 223, .16); --or: #d9b77a;
  --g: clamp(16px, 4vw, 56px);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --mh: max(var(--g), 24px, env(safe-area-inset-top));
  --md: max(var(--g), 24px, env(safe-area-inset-right));
  --mb: max(var(--g), 24px, env(safe-area-inset-bottom));
  --mg: max(var(--g), 24px, env(safe-area-inset-left));
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--nuit); color: var(--encre); font-family: var(--sans); font-weight: 300; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.petit { font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; }

svg#carte { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; display: block; }
svg#carte.glisse { cursor: grabbing; }
.terre { fill: var(--terre); stroke: var(--cote); stroke-width: .6; vector-effect: non-scaling-stroke; }
.trace { fill: none; stroke: var(--or); stroke-opacity: .35; stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
body.sans-traces .trace { display: none; }
.point { fill: var(--or); stroke: var(--nuit); vector-effect: non-scaling-stroke; stroke-width: 1.5; cursor: pointer; }
.halo { fill: var(--or); fill-opacity: .12; stroke: var(--or); stroke-opacity: .6; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; cursor: pointer; }
.amas { fill: rgba(217, 183, 122, .18); stroke: var(--or); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; }
.amas-n { fill: var(--encre); font-family: var(--sans); text-anchor: middle; dominant-baseline: central; pointer-events: none; }

header { position: fixed; top: var(--mh); left: var(--mg); right: var(--md); display: flex; justify-content: space-between; align-items: center; color: var(--doux); pointer-events: none; }
header > * { pointer-events: auto; }
header a { text-decoration: none; }
header a:hover { color: var(--encre); }
h1 { position: fixed; left: var(--mg); bottom: var(--mb); font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; pointer-events: none; }
h1 small { display: block; margin-top: .6rem; font-family: var(--sans); color: var(--pale); }

.filtres { position: fixed; right: var(--md); bottom: var(--mb); display: flex; flex-direction: column; align-items: flex-end; gap: .9rem; color: var(--doux); transition: opacity .3s; }
.filtres .ligne { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.filtres button:hover, .filtres button[aria-pressed="true"] { color: var(--encre); }
.filtres button[aria-pressed="true"] { border-bottom: 1px solid var(--or); }
.zoom { display: flex; gap: .4rem; }
.zoom button { width: 2.2rem; height: 2.2rem; border: 1px solid var(--cote); border-radius: 50%; font-size: 1rem; letter-spacing: 0; }
.zoom button:hover { border-color: var(--doux); }

.fiche { position: fixed; width: min(280px, calc(100vw - 48px)); background: rgba(11, 11, 10, .92); border: 1px solid var(--cote); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; pointer-events: none; }
.fiche.ouverte { opacity: 1; transform: none; pointer-events: auto; }
.fiche img { display: block; width: 100%; height: 170px; object-fit: cover; background: #222; }
.fiche .corps { padding: 1rem 1.1rem 1.1rem; }
.fiche .t { font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; }
.fiche .s { margin-top: .45rem; color: var(--pale); }
.fiche .approx { margin-top: .5rem; color: var(--doux); font-size: .95rem; font-style: italic; font-family: var(--serif); }
.fiche .voir { display: inline-block; margin-top: .9rem; text-decoration: none; border-bottom: 1px solid var(--or); padding-bottom: 2px; }
.fiche .fermer { position: absolute; top: .3rem; right: .45rem; font-size: 1.3rem; color: var(--encre); text-shadow: 0 0 6px #000; }
.fiche ul { list-style: none; max-height: 260px; overflow: auto; }
.fiche li a { display: flex; gap: .8rem; align-items: center; padding: .45rem 1.1rem; text-decoration: none; }
.fiche li a:hover { background: rgba(236, 232, 223, .06); }
.fiche li img { width: 52px; height: 38px; flex: none; }
.fiche li span { font-family: var(--serif); font-size: 1.05rem; }
.vide { position: fixed; inset: 0; display: grid; place-items: center; color: var(--doux); font-family: var(--serif); font-size: 1.4rem; pointer-events: none; }

@media (max-width: 640px) {
  h1 { bottom: auto; top: calc(var(--mh) + 2rem); font-size: 1.9rem; }
  .fiche { left: 50% !important; top: auto !important; bottom: var(--mb); transform: translate(-50%, 8px); }
  .fiche.ouverte { transform: translate(-50%, 0); }
  .filtres.cache { opacity: 0; pointer-events: none; }
}
