.zone-intervention {
  padding-block: clamp(32px, 6vw, 88px);
  background: var(--accent);
  color: var(--paper);
}

.zone-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.86fr) minmax(0, 1fr);
  grid-template-areas: "eyebrow eyebrow" "map copy";
  align-items: center;
  gap: 28px clamp(28px, 4vw, 58px);
}

.zone-copy { grid-area: copy; }
.zone-lead h2, .zone-locations h3 { color: var(--paper); }
.zone-lead h2 span {
  white-space: nowrap;
  background: linear-gradient(transparent 77%, #c19b689c 77%, #c19b689c 91%, transparent 91%);
}
.zone-lead p { margin-top: 19px; max-width: 35ch; font-size: 17px; }
.zone-intervention p { color: #e0e6da; }
.zone-intervention .zone-eyebrow { grid-area: eyebrow; color: #e8c99c; }
.zone-lead .zone-summary + .zone-summary { margin-top: 10px; }
.zone-lead strong { color: var(--white); font-weight: 750; }
.zone-intervention :focus-visible { outline-color: var(--paper); }

.zone-locations {
  border-top: 1px solid #78918b70;
  margin-top: 24px;
  padding-top: 15px;
}
.zone-locations h3 { font-size: 16px; font-weight: 750; letter-spacing: 0; margin-bottom: 7px; }
.zone-locations p { font-size: 15px; line-height: 1.7; }

.zone-map { grid-area: map; min-width: 0; }
.zone-map-frame {
  position: relative;
  isolation: isolate;
  border: 1px solid #c19b68a8;
  border-radius: var(--radius-image);
  overflow: hidden;
}
.zone-map img { width: 100%; height: auto; background: #e9ece7; }
.zone-map figcaption { margin-top: 9px; color: #d5ded4; font-size: 11px; line-height: 1.4; }
.zone-map figcaption a { text-decoration: underline; text-underline-offset: 3px; }

.zone-anchors { padding: 0; margin: 22px 0 0; border: 0; min-inline-size: 0; }
.zone-anchors legend { font-size: 14px; font-weight: 740; margin-bottom: 9px; padding: 0; }
.zone-anchor-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.zone-anchor-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.zone-anchor-options label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  gap: 7px;
  padding: 5px 9px;
  border-radius: var(--radius-button);
  border: 1px solid #c19b68a8;
  background: #ffffff0a;
  color: var(--white);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.zone-department-code { color: #f0d6ad; font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.zone-anchor-options input:checked + label .zone-department-code { color: #63401e; }
.zone-anchor-options input:focus-visible + label { outline: 2px solid var(--white); outline-offset: 2px; }
.zone-anchor-options input:checked + label { background: #e1c89f; color: var(--accent); }

.zone-glow {
  position: absolute;
  pointer-events: none;
  top: var(--y);
  left: var(--x);
  width: clamp(14px, 2.2vw, 24px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid #a77339a0;
  box-shadow: 0 0 0 4px #c19b6840, 0 0 18px 5px #bd8b4a50;
  opacity: .35;
  transition: opacity .2s, box-shadow .2s;
}
.zone-glow-pau { --x: 38.084%; --y: 77.791%; }
.zone-glow-tarbes { --x: 44.192%; --y: 79.301%; }
.zone-glow-gers { --x: 45.415%; --y: 72.557%; }
.zone-layout:has(#zone-departement-64:is(:checked, :focus-visible)) .zone-glow-pau,
.zone-layout:has(#zone-departement-65:is(:checked, :focus-visible)) .zone-glow-tarbes,
.zone-layout:has(#zone-departement-32:is(:checked, :focus-visible)) .zone-glow-gers {
  opacity: 1;
  box-shadow: 0 0 0 5px #ad7c386a, 0 0 19px 7px #ad7c3880;
}

.zone-department {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--department-image) center / 100% 100% no-repeat;
  opacity: 0;
  transition: opacity .24s ease;
}
.zone-layout:has(input[value="64"]:is(:checked, :focus-visible)) .zone-department-64,
.zone-layout:has(input[value="65"]:is(:checked, :focus-visible)) .zone-department-65,
.zone-layout:has(input[value="40"]:is(:checked, :focus-visible)) .zone-department-40,
.zone-layout:has(input[value="32"]:is(:checked, :focus-visible)) .zone-department-32 {
  opacity: 1;
}

/* Each mask follows the coverage on the map, including the coastline. */
.zone-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mask: var(--zone-mask) center / 100% 100% no-repeat;
  background: #996127;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 420ms ease;
}
.zone-interieur { --zone-mask: url("zone-interieur.webp"); --zone-strength: .19; --zone-delay: 0ms; }
.zone-milieu { --zone-mask: url("zone-milieu.webp"); --zone-strength: .15; --zone-delay: 85ms; }
.zone-exterieur { --zone-mask: url("zone-exterieur.webp"); --zone-strength: .11; --zone-delay: 170ms; }
.zone-layout:has(.zone-anchor-options input:is(:checked, :focus-visible)) .zone-wash {
  opacity: var(--zone-strength);
  transition-delay: var(--zone-delay);
}

@media (hover: hover) and (pointer: fine) {
  .zone-layout:has(.zone-anchor-options label[for]:hover) .zone-department { opacity: 0; }
  .zone-layout:has(.zone-anchor-options label[for="zone-departement-64"]:hover) .zone-department-64,
  .zone-layout:has(.zone-anchor-options label[for="zone-departement-65"]:hover) .zone-department-65,
  .zone-layout:has(.zone-anchor-options label[for="zone-departement-40"]:hover) .zone-department-40,
  .zone-layout:has(.zone-anchor-options label[for="zone-departement-32"]:hover) .zone-department-32 { opacity: 1; }
  .zone-anchor-options label:hover .zone-department-code { color: #63401e; }
  .zone-layout:has(.zone-anchor-options label:hover) .zone-anchor-options input:checked + label:not(:hover) {
    background: #ffffff0a;
    color: var(--white);
  }
  .zone-layout:has(.zone-anchor-options label:hover) .zone-anchor-options input:checked + label:not(:hover) .zone-department-code {
    color: #f0d6ad;
  }
  .zone-anchor-options label:hover { background: #f0d6ad; color: var(--accent); }
  .zone-layout:has(.zone-anchor-options label:hover) .zone-glow { opacity: .35; }
  .zone-layout:has(label[for="zone-departement-64"]:hover) .zone-glow-pau,
  .zone-layout:has(label[for="zone-departement-65"]:hover) .zone-glow-tarbes,
  .zone-layout:has(label[for="zone-departement-32"]:hover) .zone-glow-gers {
    opacity: 1;
    box-shadow: 0 0 0 5px #ad7c386a, 0 0 19px 7px #ad7c3880;
  }
  .zone-map-frame:hover .zone-wash,
  .zone-layout:has(.zone-anchor-options label:hover) .zone-wash {
    opacity: var(--zone-strength);
    transition-delay: var(--zone-delay);
  }
}
@media (max-width: 850px) {
  .zone-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "eyebrow" "lead" "map" "locations"; gap: 19px; }
  .zone-copy { display: contents; }
  .zone-lead { grid-area: lead; }
  .zone-lead h2 { max-width: 16ch; }
  .zone-lead p { font-size: 16px; margin-top: 14px; }
  .zone-anchors { margin-top: 16px; }
  .zone-locations { grid-area: locations; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .zone-intervention :is(.zone-wash, .zone-glow, .zone-department, .zone-anchor-options label) {
    transition: none !important;
  }
}
