/* Pages statiques (communes, fiches) : mêmes couleurs que la carte, mise en page de lecture */
:root {
  --bg: #fff7ed; --surface: #fff; --ink: #1c1917; --muted: #57534e; --line: #f1e3d3;
  --primary: #c2410c; --primary-hover: #9a3412; --on-primary: #fff; --primary-soft: #ffedd5;
  --radius: 14px;
  --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120f; --surface: #211a16; --ink: #f5f0eb; --muted: #b8aca2; --line: #3a2f28;
    --primary: #fb923c; --primary-hover: #fdba74; --on-primary: #1c1917; --primary-soft: #3d2416;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font-body); }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
h1, h2 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: .3em 0 .2em; }
h2 { font-size: 1.25rem; margin: 1.6em 0 .5em; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand strong { display: block; font: 800 1.15rem/1.1 var(--font-display); }
.brand small { color: var(--muted); font-weight: 700; }
.logo { display: block; width: 52px; height: 42px; flex: none; }
.langs { display: flex; gap: 4px; }
.langs a { min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 10px;
  font-weight: 800; text-decoration: none; color: var(--muted); }
.langs a[aria-current] { background: var(--primary-soft); color: var(--primary); }

.wrap { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.lead { font-size: 1.1rem; color: var(--muted); margin-top: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 2px solid var(--primary); color: var(--primary); font-weight: 800; text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li { padding: 4px 12px; border-radius: 999px; background: var(--primary-soft); font-weight: 700; }
.facts { display: grid; gap: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.facts div { display: grid; grid-template-columns: minmax(110px, 35%) 1fr; gap: 12px; padding: 10px 14px; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; }

.map { display: block; width: 100%; height: 320px; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); z-index: 0; }
.map .leaflet-popup-content a { font-weight: 800; }
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.improve { color: var(--muted); }

.places, .communes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.places a { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.places a:hover { border-color: var(--primary); }
.places span { color: var(--muted); font-size: .92rem; }
.places .eq { color: var(--primary); font-weight: 700; }
.communes { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.communes li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; }
.communes a { font-weight: 700; }
.communes span { color: var(--muted); font-size: .88rem; white-space: nowrap; }

.foot { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.foot .heart { color: var(--primary); }
.foot .src { font-size: .82rem; }

/* Photos */
.gallery { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); }
.gallery li { position: relative; }
.gallery li:first-child { grid-column: 1 / -1; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--line); }
.gallery li:first-child img { aspect-ratio: 16 / 9; }
.gallery span { position: absolute; right: 8px; bottom: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(28, 25, 23, .65); color: #fff; font-size: .75rem; font-weight: 700; }
.gallery li:not(:first-child) span { display: none; }
.places a.with-photo { grid-template-columns: 96px 1fr; column-gap: 12px; }
.places a.with-photo img { grid-row: 1 / span 3; width: 96px; height: 72px; object-fit: cover; border-radius: 10px; }
