/* ===================================================================
   Horizon Peinture — pages prestations (hérite de style.css)
   =================================================================== */

/* --- Hero prestation (plus court que le hero d'accueil) --- */
.service-hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.service-hero .hero-media,
.service-hero .hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.service-hero .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-hero .hero-scrim {
  z-index: 1;
  background: linear-gradient(180deg, rgba(16, 24, 32, 0.35) 0%, rgba(16, 24, 32, 0.25) 35%, rgba(16, 24, 32, 0.78) 100%);
}
.service-hero-inner {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding-top: calc(var(--header-h) + 20px);
  padding-bottom: 70px;
}
.service-hero .eyebrow {
  color: var(--horizon-glow);
}
.service-hero h1 {
  color: var(--horizon-day);
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  max-width: 16ch;
  opacity: 0;
  transform: translateY(24px);
  animation: line-reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.15s;
}
.service-hero .hero-lede {
  color: rgba(246, 243, 236, 0.9);
  max-width: 56ch;
  font-size: 1.08rem;
  opacity: 0;
  animation: fade-in 0.8s ease forwards;
  animation-delay: 0.4s;
}
.service-hero .hero-actions {
  opacity: 0;
  animation: fade-in 0.8s ease forwards;
  animation-delay: 0.55s;
}

@media (prefers-reduced-motion: reduce) {
  .service-hero h1,
  .service-hero .hero-lede,
  .service-hero .hero-actions {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --- Lede / intro --- */
.intro {
  background: var(--horizon-day);
}
.intro-text {
  max-width: 68ch;
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
}

/* --- Bloc alterné texte / image --- */
.feature-block {
  background: #fff;
}
.feature-block .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.feature-block.is-reversed .wrap {
  direction: rtl;
}
.feature-block.is-reversed .wrap > * {
  direction: ltr;
}
.feature-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(16, 24, 32, 0.14);
}
.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.feature-copy p {
  color: #454b52;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
}
.chip-list li {
  list-style: none;
}
.chip {
  font: inherit;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--horizon-day);
  border: 1px solid var(--stone);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--horizon-dusk);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.chip:hover {
  border-color: var(--horizon-dusk);
  transform: translateY(-1px);
}
.chip:focus-visible {
  outline: 2px solid var(--horizon-glow);
  outline-offset: 2px;
}
.chip[aria-pressed="true"] {
  background: var(--horizon-dusk);
  border-color: var(--horizon-dusk);
  color: var(--horizon-day);
}

/* --- Panneau de description qui s'ouvre sous les bulles cliquées --- */
.chip-detail {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.35s ease;
}
.chip-detail.is-open {
  grid-template-rows: 1fr;
  margin-top: 16px;
}
.chip-detail-inner {
  overflow: hidden;
  min-height: 0;
}
.chip-detail-card {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--stone);
  border-left: 3px solid var(--horizon-glow);
  box-shadow: 0 8px 20px rgba(16, 24, 32, 0.06);
}
.chip-detail-text {
  margin: 0;
  font-size: 0.94rem;
  color: #454b52;
  transition: opacity 0.2s ease;
}

/* --- Bande image pleine largeur avec citation --- */
.quote-band {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.quote-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.quote-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(16, 24, 32, 0.72) 0%, rgba(16, 24, 32, 0.35) 60%, rgba(16, 24, 32, 0.15) 100%);
}
.quote-band blockquote {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 620px;
  font-family: var(--font-title);
  font-style: italic;
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  color: var(--horizon-day);
  line-height: 1.4;
}

/* --- Galerie 2 colonnes (revêtement mural) --- */
.gallery-two {
  background: var(--horizon-day);
}
.gallery-two-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 44px rgba(16, 24, 32, 0.12);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}
.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px;
  background: linear-gradient(0deg, rgba(16, 24, 32, 0.75), transparent);
  color: var(--horizon-day);
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Points de conseil (3 colonnes) --- */
.advice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.advice-card {
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--horizon-day);
  border: 1px solid var(--stone);
}
.advice-card .num {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--horizon-glow);
  margin-bottom: 10px;
}
.advice-card h3 {
  margin-bottom: 8px;
}
.advice-card p {
  color: #4a5058;
  font-size: 0.94rem;
  margin: 0;
}

.map-instructions {
  color: #5b6570;
  font-size: 0.92rem;
  margin-top: -8px;
}

/* --- Carte illustrative de la métropole --- */
.gironde-map-wrap {
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 24px);
  margin-top: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--stone);
  box-shadow: 0 20px 44px rgba(16, 24, 32, 0.08);
}
.gironde-map {
  display: block;
  width: 100%;
  height: auto;
}
.map-bg {
  fill: url(#mapBgGradient);
}
.map-bg-stop-a {
  stop-color: #fbf9f3;
}
.map-bg-stop-b {
  stop-color: var(--horizon-day);
}
.map-bg-stop-c {
  stop-color: #e9e0cd;
}
.map-dots-layer {
  fill: url(#mapDots);
  pointer-events: none;
}
.map-dot {
  fill: var(--horizon-dusk);
  opacity: 0.16;
}
.map-glow {
  fill: url(#mapGlow);
  pointer-events: none;
}
.map-glow-stop-a {
  stop-color: rgba(225, 154, 92, 0.3);
}
.map-glow-stop-b {
  stop-color: rgba(225, 154, 92, 0);
}
.map-river {
  fill: none;
  stroke: var(--horizon-dusk);
  stroke-opacity: 0.18;
  stroke-width: 16;
  stroke-linecap: round;
}

.map-marker {
  cursor: pointer;
}
.map-marker-hit {
  fill: transparent;
}
.map-marker-dot {
  fill: var(--horizon-dusk);
  stroke: var(--horizon-day);
  stroke-width: 2;
  transition: r 0.2s ease, fill 0.2s ease;
}
.map-marker-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  fill: #5b6570;
  transition: fill 0.2s ease, font-weight 0.2s ease;
}
.map-marker-pulse {
  fill: none;
  stroke: var(--horizon-glow);
  stroke-width: 2;
  opacity: 0;
}
.map-marker:hover .map-marker-dot,
.map-marker:focus-visible .map-marker-dot {
  fill: var(--horizon-glow);
  r: 8;
}
.map-marker:hover .map-marker-label,
.map-marker:focus-visible .map-marker-label {
  fill: var(--ink);
  font-weight: 700;
}
.map-marker:focus-visible .map-marker-hit {
  stroke: var(--horizon-glow);
  stroke-width: 2;
  fill: none;
}
.map-marker.is-active .map-marker-dot {
  fill: var(--horizon-glow);
  r: 9;
}
.map-marker.is-active .map-marker-label {
  fill: var(--ink);
  font-weight: 700;
}
.map-marker.is-active .map-marker-pulse {
  animation: marker-ripple 1.8s ease-out infinite;
}
@keyframes marker-ripple {
  0% { r: 7; opacity: 0.55; }
  100% { r: 22; opacity: 0; }
}

.map-marker-main .map-marker-dot {
  fill: var(--horizon-glow);
}
.map-marker-main .map-marker-label {
  font-size: 16px;
  font-weight: 700;
  fill: var(--ink);
}
.map-marker-main:hover .map-marker-dot,
.map-marker-main.is-active .map-marker-dot {
  r: 12;
}

@media (prefers-reduced-motion: reduce) {
  .map-marker.is-active .map-marker-pulse {
    animation: none;
  }
}

/* --- Modale centrée : message dédié à la commune sélectionnée --- */
.city-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.city-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}
.city-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 32, 0.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* Wrapper : gère uniquement l'animation d'entrée (fade + scale depuis le centre) */
.city-card-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  opacity: 0;
  transform: translateY(20px) scale(0.94);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.city-modal.is-open .city-card-shell {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Panneau visuel : verre dépoli + lévitation continue une fois ouvert */
.city-card {
  position: relative;
  padding: 34px 32px 30px;
  border-radius: calc(var(--radius) + 8px);
  background: rgba(16, 24, 32, 0.92);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(246, 243, 236, 0.16);
  box-shadow:
    0 30px 70px -12px rgba(16, 24, 32, 0.55),
    0 12px 30px rgba(16, 24, 32, 0.35),
    inset 0 1px 0 rgba(246, 243, 236, 0.08);
  outline: none;
}
.city-modal.is-open .city-card {
  animation: city-card-float 6s ease-in-out 0.35s infinite;
}
@keyframes city-card-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.city-card-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(246, 243, 236, 0.1);
  border: 1px solid rgba(246, 243, 236, 0.16);
  border-radius: 50%;
  color: var(--horizon-day);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.city-card-close:hover,
.city-card-close:focus-visible {
  background: rgba(246, 243, 236, 0.22);
  transform: scale(1.06);
}
.city-card-zone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(225, 154, 92, 0.14);
  border: 1px solid rgba(225, 154, 92, 0.4);
}
.city-card-zone-icon {
  width: 13px;
  height: 13px;
  fill: var(--horizon-glow);
  flex-shrink: 0;
}
.city-card-zone-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--horizon-glow);
}
.city-card-eyebrow {
  color: rgba(246, 243, 236, 0.55);
  margin-bottom: 6px;
}
.city-card-name {
  color: var(--horizon-day);
  font-size: 1.5rem;
  margin: 0 0 12px;
  padding-right: 28px;
}
.city-card-text {
  color: rgba(246, 243, 236, 0.88);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 22px;
}
@media (prefers-reduced-motion: reduce) {
  .city-modal,
  .city-card-shell {
    transition: opacity 0.2s ease;
  }
  .city-card-shell {
    transform: none;
  }
  .city-modal.is-open .city-card {
    animation: none;
  }
}

/* Bordeaux : mise en avant, la commune principale */
.commune-highlight {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px 30px;
  border-radius: var(--radius);
  background: var(--horizon-dusk);
  background-image: linear-gradient(135deg, var(--horizon-dusk) 0%, #1f3a54 100%);
  margin-top: 40px;
}
.commune-highlight h3 {
  color: var(--horizon-day);
  margin: 0;
  font-size: 1.3rem;
}
.commune-highlight p {
  color: rgba(246, 243, 236, 0.85);
  margin: 0;
  font-size: 0.94rem;
  flex: 1;
  min-width: 220px;
}
.commune-highlight .btn {
  flex-shrink: 0;
}
.commune-highlight-btn {
  color: var(--horizon-day) !important;
  border-color: rgba(246, 243, 236, 0.5) !important;
}
.commune-highlight-btn:hover {
  background: rgba(246, 243, 236, 0.18) !important;
  border-color: rgba(246, 243, 236, 0.7) !important;
}

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 860px) {
  .feature-block .wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .feature-block.is-reversed .wrap {
    direction: ltr;
  }
  .feature-media img {
    aspect-ratio: 16 / 10;
  }
  .gallery-two-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item img {
    aspect-ratio: 16 / 10;
  }
  .quote-band {
    min-height: 38vh;
  }
  .commune-highlight {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .service-hero {
    min-height: 78vh;
  }
  .city-modal {
    padding: 16px;
    align-items: flex-end;
  }
  .city-card-shell {
    max-width: none;
  }
  .city-card {
    padding: 26px 22px 24px;
  }
  .city-card-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
  }
  .city-card-name {
    font-size: 1.3rem;
  }
  .city-card-cta {
    width: 100%;
  }
  .map-marker-label {
    font-size: 13px;
  }
}
