/* Closed-trails pages (/sentiers-fermes/…), generated by scripts/build-closures.mjs. On top of
   randonnees.css: same reading page, same palette, light by default and dark with the system. */
:root {
  --closed: #dc2626;
  --closed-bg: #fdecec;
  --discouraged: #c2410c;
  --discouraged-bg: #fff1e6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --closed: #f87171;
    --closed-bg: #3a1214;
    --discouraged: #fb923c;
    --discouraged-bg: #3a2010;
  }
}

/* Sector links, with their counts: a jump bar on the island page, the way out of a sector page. */
.sector-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.sector-chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: border-color 0.15s;
}

.sector-chips a:hover {
  border-color: var(--action);
}

.sector-chips a span {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--closed-bg);
  color: var(--closed);
  font-size: 13px;
  text-align: center;
}

.sector-chips a.is-empty span {
  background: var(--canvas);
  color: var(--muted);
}

/* The pitch right under the lead: smaller than the closing one, the list stays the page. */
.app-cta-top {
  margin: 24px 0 28px;
  padding: 20px 22px;
}

.app-cta-top h2 {
  font-size: 19px;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 6px;
}

.app-cta-top p {
  margin: 0 0 14px;
  font-size: 16px;
}

.app-cta-top .stores img {
  height: 40px;
}

.app-cta-top .stores .store-play img {
  height: 51px;
  margin: -6px 0;
}

/* The map box is reserved before MapLibre loads, so nothing below it moves. */
.closures-map {
  margin: 0 0 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
}

.closures-map figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--canvas);
  color: var(--muted);
  font-size: 14px;
}

.map-ready .map-placeholder {
  visibility: hidden;
}

.sector h2 a {
  color: inherit;
  text-decoration: none;
}

.sector h2 a:hover {
  text-decoration: underline;
}

.count {
  display: inline-block;
  min-width: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--closed-bg);
  color: var(--closed);
  font-size: 15px;
  line-height: 26px;
  text-align: center;
  vertical-align: middle;
}

.closures {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.closure {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 16px;
}

.closure:first-child {
  border-top: 0;
}

/* Landing on a trail from the map popup or a shared link. */
.closure:target {
  background: var(--closed-bg);
}

.closure-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.closure h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}

.status {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-blocked {
  background: var(--closed-bg);
  color: var(--closed);
}

.status-discouraged {
  background: var(--discouraged-bg);
  color: var(--discouraged);
}

.closure-note {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

.closure-note b {
  color: var(--ink);
}

.closure-also {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.hikes-link {
  margin: 24px 0 0;
  font-weight: 700;
}

.before {
  margin-top: 8px;
}

.closure-popup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font: 400 14px/1.4 Manrope, system-ui, sans-serif;
  color: #0b1730;
}

.closure-popup strong {
  font-weight: 800;
}

@media (max-width: 600px) {
  .closure {
    padding: 12px 14px;
  }

  .closure-head {
    flex-direction: column;
    gap: 4px;
  }
}
