/* ToilettesPubliques.fr — feuille de style */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --ink: #1e293b;
  --ink-strong: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--sky-dark); }
img { max-width: 100%; }

.container { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
.container.narrow { max-width: 46rem; }
.center { text-align: center; }
.center-block { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.desktop-only { display: none; }
@media (min-width: 640px) { .desktop-only { display: block; } }

/* --- entête / pied --- */
.site-header {
  position: sticky; top: 0; z-index: 1200;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 3.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  font-weight: 700; color: var(--ink-strong); text-decoration: none;
  display: flex; align-items: center; gap: .5rem; font-size: 1.05rem;
}
.brand em { font-style: normal; color: var(--sky); }
.brand .tld { color: var(--faint); font-weight: 400; }
.site-header nav a {
  color: var(--muted); text-decoration: none; font-size: .9rem;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .brand { font-size: .95rem; gap: .35rem; }
  .site-header nav a { font-size: .78rem; }
}
.site-header nav a:hover { color: var(--sky-dark); }
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 4rem; }
.footer-inner {
  padding: 2rem 1rem; font-size: .875rem; color: var(--muted);
  display: flex; flex-direction: column; gap: 1rem; justify-content: space-between;
}
@media (min-width: 640px) { .footer-inner { flex-direction: row; } }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--sky-dark); }

/* --- typographie --- */
h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-strong); line-height: 1.2; margin: 1rem 0 0; }
@media (min-width: 640px) { h1 { font-size: 2.6rem; } }
h2 { font-size: 1.5rem; font-weight: 700; color: var(--ink-strong); margin: 0 0 .5rem; }
.h-small { font-size: 1.2rem; }
.hero { padding: 3rem 0 2rem; text-align: center; }
.hero h1 { font-size: 2rem; }
@media (min-width: 640px) { .hero h1 { font-size: 3rem; } }
.lead { margin: 1rem auto 0; max-width: 42rem; color: var(--muted); font-size: 1.1rem; }
.lead-page { margin-top: .75rem; max-width: 48rem; color: var(--muted); }
.breadcrumb { padding-top: 1.5rem; font-size: .875rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--sky-dark); }
.breadcrumb span { color: var(--ink); }
.block { margin-top: 2.5rem; }
.link { color: var(--sky-dark); }
.emoji-xl { font-size: 4rem; margin: 3rem 0 0; }

/* --- recherche + actions --- */
.hero-actions {
  margin-top: 2rem;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
}
@media (min-width: 640px) { .hero-actions { flex-direction: row; justify-content: center; } }
.searchbox { position: relative; width: 100%; max-width: 36rem; }
.searchbox input {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 9999px;
  background: var(--card); padding: .95rem 1.5rem; font-size: 1.05rem;
  color: var(--ink); outline: none; box-shadow: 0 1px 2px rgb(0 0 0 / .05);
}
.searchbox input:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgb(2 132 199 / .15); }
.search-results {
  position: absolute; z-index: 1100; left: 0; right: 0; top: calc(100% + .5rem);
  margin: 0; padding: 0; list-style: none; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 1rem;
  box-shadow: 0 10px 25px rgb(0 0 0 / .08); overflow: hidden;
}
.search-results button {
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
  width: 100%; padding: .65rem 1rem; border: 0; background: none;
  font: inherit; font-size: .9rem; cursor: pointer; text-align: left;
}
.search-results button:hover, .search-results li.active button { background: #f0f9ff; }
.search-results .r-dept { color: var(--faint); }
.search-results .r-count { font-size: .75rem; color: var(--faint); white-space: nowrap; }
.btn-primary, .btn-secondary {
  display: inline-block; border: 0; border-radius: 9999px; cursor: pointer;
  padding: .95rem 1.5rem; font-size: 1.05rem; font-weight: 600;
  text-decoration: none; text-align: center; transition: background .15s, transform .1s;
  white-space: nowrap;
}
.btn-primary { background: var(--sky); color: #fff; box-shadow: 0 2px 6px rgb(2 132 199 / .3); }
.btn-primary:hover { background: var(--sky-dark); }
.btn-primary:active { transform: scale(.97); }
.btn-secondary { background: var(--card); color: var(--ink); border: 1px solid #cbd5e1; font-size: .95rem; }
.btn-secondary:hover { background: var(--bg); }

/* --- carte --- */
.map-section { scroll-margin-top: 5rem; }
.map { height: 380px; border-radius: 1rem; position: relative; z-index: 0; }
.map-tall { height: 420px; }
@media (min-width: 640px) { .map { height: 460px; } .map-tall { height: 520px; } }
.map-hint { margin-top: .5rem; font-size: .75rem; color: var(--faint); text-align: right; }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.locate-btn {
  position: absolute; top: .75rem; right: .75rem; z-index: 1000;
  border: 1px solid var(--line); border-radius: 9999px; background: var(--card);
  padding: .5rem .9rem; font-size: .875rem; font-weight: 500; color: var(--ink);
  cursor: pointer; box-shadow: 0 2px 6px rgb(0 0 0 / .12);
}
.locate-btn:hover { background: var(--bg); }
.tp-pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--sky); border: 2px solid #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / .35);
  display: flex; align-items: center; justify-content: center;
}
.tp-pin > span { transform: rotate(45deg); font-size: 15px; line-height: 1; }
.tp-pin-fee { background: #b45309; }
.tp-cluster {
  width: 40px; height: 40px; border-radius: 9999px;
  background: rgb(2 132 199 / .88); color: #fff; border: 3px solid #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / .3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.tp-user {
  width: 18px; height: 18px; border-radius: 9999px;
  background: #2563eb; border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgb(37 99 235 / .25);
}

/* --- badges --- */
.badges { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.badge { border-radius: 9999px; padding: .1rem .6rem; font-size: .72rem; font-weight: 600; }
.badge-ok { background: #dcfce7; color: #15803d; }
.badge-warn { background: #fef3c7; color: #b45309; }

/* --- cartes / grilles --- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 1rem;
  padding: 1.25rem;
}
.seo-text { padding: 1.5rem 2rem; color: var(--muted); }
.city-grid {
  margin: 1.5rem 0 0; padding: 0; list-style: none;
  display: grid; gap: .5rem; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .city-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 800px) { .city-grid { grid-template-columns: repeat(4, 1fr); } }
.city-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: .8rem; padding: .75rem 1rem; text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.city-card:hover { border-color: var(--sky); box-shadow: 0 1px 4px rgb(0 0 0 / .06); }
.city-name { font-weight: 500; color: var(--ink); display: block; }
.city-count { font-size: .75rem; color: var(--faint); }
.toilet-grid { margin-top: 1.25rem; display: grid; gap: .75rem; }
@media (min-width: 640px) { .toilet-grid { grid-template-columns: 1fr 1fr; } }
.toilet-card h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.toilet-card > a { text-decoration: none; }
.toilet-card p { margin: .4rem 0 0; font-size: .875rem; }
.card-links { display: flex; gap: .8rem; }
.pill-list { margin: 1rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  display: inline-block; border: 1px solid var(--line); border-radius: 9999px;
  background: var(--card); padding: .35rem 1rem; font-size: .875rem;
  color: var(--ink); text-decoration: none; transition: border-color .15s;
}
.pill:hover { border-color: var(--sky); }
.pill-count { font-size: .72rem; color: var(--faint); margin-left: .3rem; }

/* --- pages légales --- */
.legal p, .legal li { color: var(--muted); font-size: .95rem; }
.legal h2 { margin-top: 2rem; }
.legal h3 { font-size: 1.02rem; font-weight: 600; color: var(--ink-strong); margin: 1.5rem 0 .25rem; }
.legal ul { padding-left: 1.25rem; }

/* --- fiche toilette --- */
.detail-layout { margin-top: 1.5rem; display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 900px) { .detail-layout { grid-template-columns: 1fr 22.5rem; } }
.info-panel dl { margin: .75rem 0 0; }
.info-panel dl > div {
  display: flex; justify-content: space-between; gap: .75rem;
  padding: .3rem 0; font-size: .875rem;
}
.info-panel dt { color: var(--muted); }
.info-panel dd { margin: 0; text-align: right; color: var(--ink); }
.panel-actions { margin-top: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
