/* =================================================================
   SEO LOCAL — Composants pages Rennes & villes
   Chargé via head.php sur toutes les pages
   ================================================================= */

/* ── Fix footer position + animation max-height bloquée (GSAP était conçu pour position:absolute) ── */
.footer {
  position: relative !important;
  bottom: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin-top: -2rem;
  z-index: 1;
}

/* ── Fix before-footer (80rem padding prévu pour footer absolu — ramené à valeur naturelle) ── */
.before-footer {
  padding-bottom: 5rem !important;
}

/* ── Footer logos agrandis ── */
.footer-brand .logo {
  width: 10rem !important;
  height: 6rem !important;
}
@media screen and (min-width: 768px) {
  .footer-brand .logo { width: 15rem !important; height: 9rem !important; }
}
@media screen and (min-width: 1200px) {
  .footer-brand .logo { width: 20rem !important; height: 12rem !important; }
}
.footer-partners .logo-partner {
  width: 7rem !important;
}
@media screen and (min-width: 768px) {
  .footer-partners .logo-partner { width: 11rem !important; }
}

/* ── Hero CTAs : colonne auto sur très petits écrans (surcharge style.css nowrap) ── */
@media (max-width: 575px) {
  .hero-section-v3 .content .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .hero-section-v3 .content .hero-ctas .cta-primary {
    flex: none;
    white-space: nowrap;
  }
}

/* ── Cities block section ── */
.cities-block-section {
  padding: 4rem 0;
  background: #f9f7f4;
}

.cities-block-section .title {
  margin-bottom: 0.75rem;
}

.cities-intro {
  color: #555;
  margin-bottom: 2rem;
  max-width: 640px;
}

.cities-block {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.city-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  border: 1.5px solid #e2ddd8;
  background: #fff;
  min-width: 120px;
  text-decoration: none;
  transition: box-shadow 0.18s, border-color 0.18s;
}

.city-card--active {
  border-color: #046053;
  background: #f0faf8;
}

.city-card--active:hover {
  box-shadow: 0 4px 18px rgba(4, 96, 83, 0.14);
  border-color: #034d42;
}

.city-card--coming {
  opacity: 0.65;
  cursor: default;
}

.city-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
}

.city-card--active .city-name {
  color: #046053;
}

.city-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
}

.city-badge--active {
  background: rgba(4, 96, 83, 0.12);
  color: #046053;
}

.city-badge--coming {
  background: rgba(100, 100, 100, 0.1);
  color: #666;
}

.off-city-notice {
  margin-top: 1.5rem;
  max-width: 580px;
}

.off-city-notice p {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.off-city-notice a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #046053;
  text-decoration: none;
  border: 2px solid #046053;
  border-radius: 10px;
  padding: 0.65rem 1.3rem;
  transition: background 0.15s, color 0.15s;
}

.off-city-notice a:hover {
  background: #046053;
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════════
   CITY PULSE — Composant standardisé hub ville (dupliquable)
   Structure : image fond ville + overlay + stats glassmorphism + cards
   Pour une nouvelle ville : changer --city-bg-url, kicker, stats, cards
   ══════════════════════════════════════════════════════════════════ */

.city-pulse-section {
  padding: 5rem 0 4rem;
  background-image: url('../../assets/img/background.webp');
  background-size: 1280px 905px;
  background-repeat: repeat;
  background-position: center;
}

/* Card arrondie — contient la photo Rennes + overlay + tout le contenu */
.city-pulse-inner {
  position: relative;
  background-image: var(--city-bg-url, url('/assets/img/rennes/rennes-champjaque.jpg'));
  background-size: cover;
  background-position: center 60%;
  border-radius: 20px;
  overflow: hidden;
  padding: 6rem 3rem 5rem;
  isolation: isolate;
}

.city-pulse-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(3, 32, 28, 0.82) 0%, rgba(4, 70, 60, 0.75) 100%);
  z-index: 0;
}

.city-pulse-inner > * {
  position: relative;
  z-index: 1;
}

.city-pulse__title {
  font-size: 4rem;
  font-weight: 700;
  color: #f7f0ea;
  margin-bottom: 1rem;
  line-height: 4.7rem;
}
@media screen and (min-width: 769px) {
  .city-pulse__title {
    font-size: 5.5rem;
    line-height: 6.5rem;
  }
}

.city-pulse__desc {
  font-size: 1.7rem;
  font-weight: 400;
  color: rgba(247, 240, 234, 0.75);
  margin-bottom: 3rem;
  max-width: 760px;
  line-height: 2.3rem;
}
@media screen and (min-width: 769px) {
  .city-pulse__desc {
    font-size: 1.8rem;
    line-height: 2.5rem;
  }
}

/* ── Stats strip — fond beige transparent, texte vert pin ── */
.city-pulse-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(247, 240, 234, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(247, 240, 234, 0.55);
  border-radius: 16px;
  overflow: visible;
  margin-bottom: 1.5rem;
}

.city-pulse-stat {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  opacity: 0;
}

.city-pulse-stat + .city-pulse-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18%;
  height: 64%;
  width: 1px;
  background: rgba(4, 96, 83, 0.25);
}

.city-pulse-stat__num {
  font-size: 5rem;
  font-weight: 800;
  color: #f7f0ea;
  line-height: 1;
  margin-bottom: 0.8rem;
}

.city-pulse-stat__num small {
  font-size: 2rem;
  font-weight: 700;
  vertical-align: middle;
}

.city-pulse-stat__num sup {
  font-size: 1.4rem;
  font-weight: 700;
  vertical-align: super;
}

.city-pulse-stat__label {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 2.2rem;
  color: #f7f0ea;
}

/* ── Info cards — fond blanc opaque sur photo ── */
.city-pulse-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.city-pulse-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  padding: 2rem 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-left: 4px solid #046053;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1.2rem;
  row-gap: 0.8rem;
  align-items: center;
  align-content: start;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
}

.city-pulse-card__icon {
  grid-column: 1;
  grid-row: 1;
  width: 46px;
  height: 46px;
  background: rgba(4, 96, 83, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #046053;
  flex-shrink: 0;
}

.city-pulse-card__icon svg {
  width: 22px;
  height: 22px;
}

.city-pulse-card__title {
  grid-column: 2;
  grid-row: 1;
  font-size: 2rem;
  font-weight: 700;
  line-height: 2.6rem;
  color: #046053;
}

.city-pulse-card__text {
  grid-column: 2 / -1;
  grid-row: 2;
  font-size: 1.55rem;
  color: #1d4a44;
  line-height: 2.3rem;
}

/* ── Sources footnote ── */
.city-pulse__sources {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  line-height: 1.9rem;
}

/* ── Sources toggle — masqué sur desktop ── */
.sources-toggle {
  display: none;
}

/* ── Sources collapsible sur mobile (≤ 991px) ── */
@media (max-width: 991px) {
  .sources-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.55);
    padding: 0.6rem 0 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.25);
    font-style: italic;
  }
  .sources-toggle svg {
    transition: transform 0.25s ease;
    flex-shrink: 0;
  }
  .sources-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }
  .city-pulse__sources {
    display: none;
    margin-top: 0.8rem;
  }
  .city-pulse__sources.open {
    display: block;
  }
  /* Réduction du padding bas pour limiter l'espace vide */
  .city-pulse-inner {
    padding-bottom: 2.5rem;
  }
}

/* ── Responsive City Pulse ── */
@media (max-width: 768px) {
  .city-pulse-stats {
    grid-template-columns: 1fr;
  }
  .city-pulse-stat + .city-pulse-stat::before {
    top: 0;
    left: 15%;
    width: 70%;
    height: 1px;
  }
}

@media (min-width: 576px) and (max-width: 768px) {
  .city-pulse-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .city-pulse-stat + .city-pulse-stat::before {
    top: 18%;
    left: 0;
    width: 1px;
    height: 64%;
  }
}

/* ── Cards : 1 colonne collapsible dès 991px (tablet + mobile) ── */
@media (max-width: 991px) {
  .city-pulse-cards {
    grid-template-columns: 1fr;
  }
  .city-pulse-card {
    padding: 1.5rem;
  }
}

/* ── City blocs grid (section "Pourquoi Rennes") ── */
.city-blocs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.city-bloc {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}

.city-bloc img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.city-bloc__content {
  padding: 1.25rem 1.5rem 1.5rem;
}

.city-bloc__content .h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* ── Marché locatif Rennes ── */
.marche-local-section {
  padding: 4rem 0;
  background: #fff;
}

.marche-blocs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.marche-bloc {
  background: #f9f7f4;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
}

.marche-bloc__stat {
  font-size: 2.5rem;
  font-weight: 800;
  color: #046053;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.marche-bloc__stat span {
  font-size: 1.2rem;
  font-weight: 600;
}

.marche-bloc__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}

.marche-bloc__label--title {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.marche-bloc__source {
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.35rem;
}

.marche-bloc--text {
  text-align: left;
}

/* ── Section "Pourquoi Keymojo à Rennes" (local-why-section) ── */
.local-why-section {
  padding: 4rem 0;
}

.local-why-section .heading {
  margin-bottom: 0;
}

/* ── Service cards sur page hub /rennes ── */
.service-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1.5px solid #e2ddd8;
  background: #fff;
  padding: 1.5rem;
  text-decoration: none;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.15s;
}

.service-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #046053;
}

.service-card--secondary {
  background: #f9f7f4;
}

.service-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 96, 83, 0.1);
  margin-bottom: 1rem;
}

.service-card__icon svg {
  width: 22px;
  height: 22px;
  color: #046053;
}

.service-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
}

.service-card__desc {
  font-size: 0.875rem;
  color: #555;
  flex: 1;
  margin-bottom: 1rem;
}

.service-card__cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: #046053;
}

/* ── Steps grid (page hub /rennes) ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.step-item__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #046053;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-item__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
}

.step-item__desc {
  font-size: 0.875rem;
  color: #555;
}

/* ── Local contact block (page hub /rennes) ── */
.local-contact-block {
  background: linear-gradient(135deg, #046053 0%, #068571 100%);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
}

.local-contact-block__text h2 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.local-contact-block__text p {
  color: rgba(255,255,255,0.85);
}

.local-contact-block__ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .city-blocs-grid {
    grid-template-columns: 1fr;
  }

  .marche-blocs-grid {
    grid-template-columns: 1fr;
  }

  .service-cards-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .local-contact-block {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .cities-block {
    gap: 0.5rem;
  }

  .city-card {
    min-width: 90px;
    padding: 0.7rem 1rem;
  }
}

/* ─── Partenaires Rennes — heading sans pictogramme ni boite ─────────── */
#partenaires-rennes .heading {
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 0;
}

#partenaires-rennes .heading .title {
  padding: 0;
  width: auto !important;
}

#partenaires-rennes .heading .title:before {
  display: none;
}

.partenaires-desc {
  font-size: 1.6rem;
  color: #3d6b65;
  line-height: 1.65;
  margin: 0;
  max-width: 64rem;
}

/* ─── Partenaires Rennes — photo cards ───────────────────────────────── */
.partenaires-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

/* ── Quinquonce 3+2 : rangée 1 ── */
.partenaire-photo-card:nth-child(1) { grid-column: 1 / 3; }
.partenaire-photo-card:nth-child(2) { grid-column: 3 / 5; }
.partenaire-photo-card:nth-child(3) { grid-column: 5 / 7; }
/* ── Quinquonce 3+2 : rangée 2 décalée entre les cartes du dessus ── */
.partenaire-photo-card:nth-child(4) { grid-column: 2 / 4; }
.partenaire-photo-card:nth-child(5) { grid-column: 4 / 6; }

/* ── Légère rotation individuelle par carte ── */
.partenaire-photo-card:nth-child(1) { rotate: -1.5deg; }
.partenaire-photo-card:nth-child(2) { rotate:  1deg;   }
.partenaire-photo-card:nth-child(3) { rotate: -1deg;   }
.partenaire-photo-card:nth-child(4) { rotate:  1.5deg; }
.partenaire-photo-card:nth-child(5) { rotate: -0.8deg; }

.partenaire-photo-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 1.6rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  border: 1px solid #ede8e1;
  transition: translate 0.25s ease, rotate 0.25s ease, box-shadow 0.25s ease;
}

.partenaire-photo-card:hover {
  translate: 0 -6px;
  rotate: 0deg;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.13);
}

.partenaire-photo-card__photo {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.partenaire-photo-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.partenaire-photo-card:hover .partenaire-photo-card__photo img {
  transform: scale(1.06);
}

.partenaire-photo-card__body {
  padding: 1.6rem 1.8rem 2rem;
  border-top: 3px solid #046053;
}

.partenaire-photo-card__title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #046053;
  margin: 0 0 0.6rem;
  line-height: 1.3;
}

.partenaire-photo-card__text {
  font-size: 1.35rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.partenaires-cta {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
}

/* ── Steps-bloc sur fond vert — titre en blanc ── */
.steps-bloc.background .steps-header .title,
.steps-bloc.background .steps-header .h2 {
  color: #fff;
}

/* ── Responsive : supprime quinquonce + rotation sous 1024px ── */
@media (max-width: 1024px) {
  .partenaires-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .partenaire-photo-card:nth-child(n) {
    grid-column: auto;
    rotate: 0deg;
  }
  .partenaire-photo-card__photo {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 576px) {
  .partenaires-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.6rem;
    overflow: visible;
    padding-bottom: 0.5rem;
  }
}

/* ── Centre le CTA profil-bailleur + réduit l'espace vers le marquee ── */
.profil-bailleur__cta-wrapper {
  display: flex;
  justify-content: center;
}

.profil-bailleur__cta-wrapper .cta-primary {
  margin-bottom: 0;
}

.profil-bailleur {
  padding-bottom: 2.4rem;
}

/* ── Marquee "Pourquoi Keymojo" — bande séparatrice centrée verticalement ── */
.title-scroll {
  padding: 3rem 0;
  margin-top: -2px;
  position: relative;
}

/* Ralentit le marquee sur mobile (15s trop rapide) */
@media screen and (max-width: 991px) {
  .title-scroll .marquee-track {
    animation-duration: 28s;
  }
}

/* ── Hero hub city — remonte l'eyebrow au-dessus de l'entourage "Keymojo" ── */
@media screen and (min-width: 576px) {
  .hero-section-v3.multi .hero-eyebrow {
    margin-top: -2rem;
    margin-bottom: 2.4rem;
  }
}

/* ── Hero hub city — supprime la ligne de séparation entre hero et city-pulse ── */
.city-pulse-section {
  margin-top: -1px;
}

/* ── Hero hub city — H1 réduit sur mobile (texte long) ── */
@media screen and (max-width: 575px) {
  .hero-section-v3.multi .h1.title {
    font-size: 3.2rem;
    line-height: 4rem;
  }
}

/* ════════════════════════════════════════════════════════════════
   ZONES D'INTERVENTION — section carte + chips SEO (page hub ville)
   ════════════════════════════════════════════════════════════════ */

.zones-intervention-section {
  padding: 7rem 0 8rem;
  background: #f5f1ec;
}

.zones-heading {
  max-width: 100%;
  margin: 0 auto 5rem;
  text-align: center;
}

.zones-intro {
  margin-top: 2rem;
  color: #3d5a56;
}

/* Layout 2 colonnes : carte | chips */
.zones-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── Carte Leaflet ── */
.zones-leaflet-map {
  width: 100%;
  height: 46rem;
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
}

/* ── Groupes de chips ── */
.zones-chips-col {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.zones-chips-group {}

.zones-chips-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #046053;
  margin-bottom: 1.2rem;
}

.zones-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.zone-chip {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: #f0f7f6;
  border: 1px solid #c5deda;
  border-radius: 999px;
  font-size: 1.3rem;
  color: #046053;
  line-height: 2rem;
  white-space: nowrap;
}

.zone-chip:hover {
  background: #046053;
  color: #fff;
  border-color: #046053;
  cursor: default;
}

/* ── Note bas de chips ── */
.zones-note {
  font-size: 1.35rem;
  color: #6b8a87;
  margin-top: 0.5rem;
}

.zones-note-link {
  color: #046053;
  font-weight: 600;
  text-decoration: underline;
}

/* ── Marqueurs Leaflet custom ── */
.map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-family: inherit;
}

.map-marker--hq {
  width: 38px;
  height: 38px;
  background: #fff;
  border: 2.5px solid #046053;
  border-radius: 50%;
  overflow: hidden;
  padding: 5px;
  box-shadow: 0 3px 12px rgba(4, 96, 83, 0.5);
}

.map-marker--hq img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.map-marker--commune {
  width: 12px;
  height: 12px;
  background: #5ab5a6;
  border: 2px solid #046053;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .zones-layout {
    grid-template-columns: 1fr;
  }

  .zones-leaflet-map {
    height: 34rem;
  }
}

@media (max-width: 576px) {
  .zones-intervention-section {
    padding: 5rem 0 6rem;
  }

  .zones-leaflet-map {
    height: 26rem;
  }
}

/* ════════════════════════════════════════════════════════════════
   CITIES HUB — grille des villes avec cards actives / bientôt
   ════════════════════════════════════════════════════════════════ */

.cities-hub-section {
  padding: 7rem 0 8rem;
  /* background géré par la classe .background */
}

.cities-hub-heading {
  max-width: 64rem;
  margin: 0 auto 5rem;
  text-align: center;
}

.cities-hub-sub {
  margin-top: 1.6rem;
  opacity: 0.75;
}

.cities-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}

/* Toutes les cards — fond blanc sur texture verte */
.city-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 2.8rem 2.4rem;
  border-radius: 1.6rem;
  background: #fff;
  border: none;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.city-hub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

/* Card ville courante (page active) */
.city-hub-card--current {
  border-top: 3px solid #f05a2b;
}

.city-hub-pill {
  display: inline-flex;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  width: fit-content;
}

.city-hub-pill--current {
  background: rgba(240, 90, 43, 0.12);
  color: #f05a2b;
}

.city-hub-name {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  display: block;
  color: #0a2622;
}

.city-hub-dept {
  font-size: 1.25rem;
  line-height: 1.6;
  display: block;
  color: #6b8a87;
}

.city-hub-cta {
  margin-top: auto;
  padding-top: 1.2rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: #046053;
  border-top: 1px solid #e8e4df;
}

.cities-hub-note {
  margin-top: 3.5rem;
  text-align: center;
  font-size: 1.45rem;
  color: rgba(255, 255, 255, 0.65);
}

.cities-hub-link {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .cities-hub-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .cities-hub-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .cities-hub-grid { grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .city-hub-card { padding: 2rem 1.8rem; }
  .city-hub-name { font-size: 2rem; }
}

/* ════════════════════════════════════════════════════════════════
   LOCAL CONTACT — bloc NAP avec icônes (fond vert, page hub ville)
   ════════════════════════════════════════════════════════════════ */

.local-contact-section {
  padding: 7rem 0;
  background: #f5f1ec;
}

.local-contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 7rem;
  align-items: center;
}

.local-contact-left h2 em {
  font-style: normal;
  display: block;
  color: #6b8a87;
  font-weight: 400;
  font-size: 0.85em;
  margin-top: 0.3rem;
}

.local-contact-tagline {
  margin: 1.8rem 0 3.2rem;
  color: #3d5a56;
}

.local-contact-right {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.local-contact-item {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem 2.4rem;
  background: #fff;
  border: 1.5px solid #e0ddd8;
  border-radius: 1.4rem;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.local-contact-item:hover {
  border-color: #046053;
  box-shadow: 0 6px 20px rgba(4, 96, 83, 0.1);
}

.local-contact-icon {
  width: 46px;
  height: 46px;
  background: #f0f7f6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #046053;
  flex-shrink: 0;
}

.local-contact-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #aaa;
  margin-bottom: 0.4rem;
}

.local-contact-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 600;
  color: #0a2622;
  line-height: 2.2rem;
}

@media (max-width: 900px) {
  .local-contact-inner {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
}

@media (max-width: 576px) {
  .local-contact-section { padding: 4rem 0; }
  .local-contact-item { padding: 1.4rem 1.6rem; gap: 1.2rem; }
  .local-contact-icon { width: 38px; height: 38px; }
  .local-contact-value { font-size: 1.5rem; }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE OVERRIDES — toutes les sections SEO (≤ 768px)
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Paddings globaux réduits sur mobile ── */
@media (max-width: 768px) {
  .zones-intervention-section { padding: 4.5rem 0 5rem; }
  .cities-hub-section         { padding: 4.5rem 0 5rem; }
  .local-contact-section      { padding: 4rem 0; }
}

/* ── 2. Zones — H2 et intro ── */
@media (max-width: 768px) {
  .zones-intervention-section .h2.title {
    font-size: 2.8rem;
    line-height: 3.6rem;
  }
  .zones-heading {
    margin-bottom: 3rem;
  }
  .zones-intro {
    text-align: left;
    font-size: 1.45rem;
    line-height: 2.2rem;
  }
}

/* ── 3. Carte Leaflet — hauteur réduite mobile ── */
@media (max-width: 576px) {
  .zones-leaflet-map { height: 20rem; }
}

/* ── 4. Chips — tailles réduites ── */
@media (max-width: 576px) {
  .zone-chip {
    font-size: 1.2rem;
    padding: 0.4rem 1rem;
  }
  .zones-chips-title { font-size: 1.2rem; }
  .zones-chips-list  { gap: 0.6rem; }
}

/* ── 5. Accordion communes — masque après max-height sur mobile ── */
.zones-chips-collapse {
  position: relative;
}

@media (max-width: 768px) {
  .zones-chips-collapse.collapsed {
    max-height: 7.5rem;
    overflow: hidden;
  }
  .zones-chips-collapse.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3rem;
    background: linear-gradient(to bottom, transparent, #f5f1ec);
    pointer-events: none;
  }
}

.zones-chips-toggle {
  display: none;
}

@media (max-width: 768px) {
  .zones-chips-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.2rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: #f7f0ea;
    background: #046053;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    width: fit-content;
    margin-top: -1.8rem;
  }
  .zones-chips-toggle:hover {
    background: #034840;
  }
}

/* ── 6. Cities hub — compact mobile ── */
@media (max-width: 576px) {
  .cities-hub-heading { margin-bottom: 2.5rem; }
  .cities-hub-section .h2.title {
    font-size: 2.8rem;
    line-height: 3.6rem;
  }
  .cities-hub-sub { font-size: 1.4rem; }
  .city-hub-card  { padding: 1.6rem 1.4rem; gap: 0.6rem; }
  .city-hub-name  { font-size: 1.9rem; }
  .city-hub-dept  { font-size: 1.15rem; }
  .city-hub-cta   { font-size: 1.2rem; padding-top: 0.9rem; }
  .cities-hub-note { font-size: 1.3rem; }
}

/* ── 7. Cities hub — forcer 2 colonnes dès 576px ── */
@media (max-width: 576px) {
  .cities-hub-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE — City Pulse stats taille réduite + animation scroll
   ════════════════════════════════════════════════════════════════ */

/* Stats : réduire les chiffres sur mobile */
@media (max-width: 575px) {
  .city-pulse-stat {
    padding: 1.8rem 0.6rem;
  }
  .city-pulse-stat__num {
    font-size: 3rem;
    margin-bottom: 0.5rem;
  }
  .city-pulse-stat__num small {
    font-size: 1.3rem;
  }
  .city-pulse-stat__num sup {
    font-size: 1.1rem;
  }
  .city-pulse-stat__label {
    font-size: 1.2rem;
    line-height: 1.7rem;
  }
}

/* ── Stats : pop-in au scroll — chaque conteneur apparaît individuellement ── */
@keyframes statCardPopIn {
  0%   { opacity: 0; transform: scale(0.78) translateY(24px); }
  70%  { transform: scale(1.04) translateY(-3px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.city-pulse-stats.in-view .city-pulse-stat:nth-child(1) {
  animation: statCardPopIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.10s forwards;
}
.city-pulse-stats.in-view .city-pulse-stat:nth-child(2) {
  animation: statCardPopIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.28s forwards;
}
.city-pulse-stats.in-view .city-pulse-stat:nth-child(3) {
  animation: statCardPopIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.46s forwards;
}

/* ── Cards ancrage : apparition directionnelle au scroll ── */
@keyframes cardSlideLeft {
  0%   { opacity: 0; transform: translateX(-40px) translateY(16px) scale(0.96); }
  100% { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
}
@keyframes cardSlideUp {
  0%   { opacity: 0; transform: translateY(44px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cardSlideRight {
  0%   { opacity: 0; transform: translateX(40px) translateY(16px) scale(0.96); }
  100% { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
}

.city-pulse-cards.in-view .city-pulse-card:nth-child(1) {
  animation: cardSlideLeft  0.62s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s forwards;
}
.city-pulse-cards.in-view .city-pulse-card:nth-child(2) {
  animation: cardSlideUp    0.62s cubic-bezier(0.34, 1.56, 0.64, 1) 0.28s forwards;
}
.city-pulse-cards.in-view .city-pulse-card:nth-child(3) {
  animation: cardSlideRight 0.62s cubic-bezier(0.34, 1.56, 0.64, 1) 0.44s forwards;
}

/* Tablet + mobile : toutes les cartes en slide-up (deck positionné en absolu) */
@media (max-width: 991px) {
  .city-pulse-cards.in-view .city-pulse-card:nth-child(1),
  .city-pulse-cards.in-view .city-pulse-card:nth-child(3) {
    animation-name: cardSlideUp;
  }
}

@keyframes chevron-breathe {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(3px); opacity: 0.7; }
}

/* ── Chevron card — masqué sur desktop, visible sur mobile seulement ── */
.card-chevron {
  display: none;
}

/* ════════════════════════════════════════════════════════════════
   TABLET + MOBILE — City Pulse cards collapsibles (≤ 991px)
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
  .city-pulse-card {
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.2s ease;
    min-height: 8rem;
    align-content: center;
  }
  .city-pulse-card__text {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(4, 96, 83, 0.12);
  }
  .city-pulse-card.open .city-pulse-card__text {
    display: block;
  }
  .city-pulse-card.open {
    align-content: start;
  }
  .city-pulse-card__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
  .card-chevron {
    display: block;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 7px;
    border: 2px solid #f7f0ea;
    border-radius: 50%;
    background: rgba(247, 240, 234, 0.9);
    color: #046053;
    box-sizing: border-box;
    transition: transform 0.35s ease, box-shadow 0.2s ease;
    animation: chevron-breathe 2.2s ease-out infinite;
  }
  .city-pulse-card.open .card-chevron {
    transform: rotate(180deg);
    animation: none;
  }
  .city-pulse-section {
    padding-top: 2rem;
  }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE — Partenaires : quinquonce biais + modal (≤ 576px)
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 576px) {
  /* Quinquonce 3+2 — rangée 1 */
  .partenaire-photo-card:nth-child(1) { grid-column: 1 / 3; transform: rotate(-2.5deg); z-index: 1; }
  .partenaire-photo-card:nth-child(2) { grid-column: 3 / 5; transform: rotate(1.5deg);  z-index: 2; }
  .partenaire-photo-card:nth-child(3) { grid-column: 5 / 7; transform: rotate(-2deg);   z-index: 1; }
  /* Quinquonce 3+2 — rangée 2 décalée + chevauchement */
  .partenaire-photo-card:nth-child(4) { grid-column: 2 / 4; transform: translateY(-14px) rotate(2.5deg);  z-index: 3; }
  .partenaire-photo-card:nth-child(5) { grid-column: 4 / 6; transform: translateY(-14px) rotate(-1.5deg); z-index: 3; }

  /* Style carte compact */
  .partenaire-photo-card {
    display: block;
    position: relative;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    transition: box-shadow 0.2s ease;
  }
  .partenaire-photo-card__photo {
    aspect-ratio: 1 / 1;
    border-radius: 10px 10px 0 0;
  }
  .partenaire-photo-card__body {
    padding: 0.6rem 0.7rem 0.9rem;
    border-top: 2px solid #046053;
  }
  .partenaire-photo-card__title {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0;
  }
  .partenaire-photo-card__text { display: none; }
  /* Désactiver le hover translate desktop */
  .partenaire-photo-card:hover {
    translate: 0 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  }
}

/* ════════════════════════════════════════════════════════════════
   MODAL — Partenaires bottom sheet (mobile)
   ════════════════════════════════════════════════════════════════ */

.partner-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  align-items: flex-end;
  justify-content: center;
}
.partner-modal.open {
  display: flex;
}
.partner-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 20, 18, 0.55);
}
.partner-modal__panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalSlideUp 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.partner-modal__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(247, 240, 234, 0.95);
  color: #046053;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.partner-modal__photo {
  margin: 0;
  aspect-ratio: 16 / 9;
}
.partner-modal__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.partner-modal__body {
  padding: 2rem 2rem 4rem;
}
.partner-modal__title {
  font-size: 2rem;
  font-weight: 700;
  color: #046053;
  margin-bottom: 1.2rem;
  line-height: 1.3;
}
.partner-modal__text {
  font-size: 1.4rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 2rem;
}
.partner-modal__cta {
  width: 100%;
  justify-content: center;
}

/* =================================================================
   MODULES LOCAUX RÉUTILISABLES — local-why + local-market
   À dupliquer pour chaque nouvelle page ville service
   ================================================================= */

/* ── LOCAL-WHY — "Pourquoi Keymojo à [Ville] ?" ── */
.local-why-section {
  background: #f7f0ea;
  padding: 7rem 0 6rem;
}
.local-why-header {
  text-align: center;
  margin-bottom: 4rem;
}
.local-why-header .h2 {
  margin-bottom: 1.2rem;
}
.local-why-subtitle {
  font-size: 1.6rem;
  line-height: 1.6;
  color: rgba(4, 96, 83, 0.70);
  max-width: 60rem;
  margin: 0 auto;
}
.local-why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
  margin-bottom: 4rem;
}
.local-why-card {
  background: #fff;
  border: 1.5px solid #e2ddd8;
  border-radius: 1.6rem;
  padding: 2.4rem 2.4rem 2.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.local-why-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #046053;
  transition: background 0.22s ease;
}
.local-why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(4, 96, 83, 0.12);
}
.local-why-card:hover::before {
  background: #ff7348;
}
.local-why-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.local-why-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #046053;
  border-radius: 10px;
  color: #fff;
  flex-shrink: 0;
}
.local-why-card__num {
  font-size: 2.4rem;
  font-weight: 900;
  color: rgba(255, 115, 72, 0.18);
  line-height: 1;
  letter-spacing: -0.02em;
  user-select: none;
}
.local-why-card__title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #046053;
  line-height: 1.3;
  margin: 0;
}
.local-why-card__body {
  font-size: 1.38rem;
  line-height: 1.65;
  color: #4a6e69;
  margin: 0;
  flex: 1;
}
.local-why-card__link {
  font-size: 1.3rem;
  font-weight: 600;
  color: #046053;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
  transition: color 0.18s, gap 0.18s;
  align-self: flex-start;
}
.local-why-card__link:hover {
  color: #ff7348;
  gap: 0.6rem;
}
.local-why__cta-wrap {
  display: flex;
  justify-content: center;
}
@media (max-width: 900px) {
  .local-why-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  .local-why-section {
    padding: 5rem 0 4.5rem;
  }
  .local-why-header {
    margin-bottom: 2.8rem;
  }
  .local-why-subtitle {
    font-size: 1.5rem;
  }
  .local-why-grid {
    gap: 1.2rem;
    margin-bottom: 3rem;
  }
  .local-why-card {
    padding: 2rem 2rem 2.2rem 2.4rem;
  }
}

/* ── LOCAL-MARKET — "Le marché locatif à [Ville] en [Année]" ── */
.local-market-section {
  background: #f9f7f4;
  padding: 7rem 0;
}
.local-market-header {
  background: linear-gradient(135deg, #034840 0%, #046053 55%, #067260 100%);
  border-radius: 2rem;
  padding: 4rem 4.8rem;
  margin-bottom: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.local-market-header__tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(249, 187, 68, 0.90);
  margin: 0;
}
.local-market-header .h2 {
  color: #fff;
  margin: 0;
  line-height: 1.15;
}
.local-market-header__sub {
  font-size: 1.55rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  max-width: 56rem;
  margin: 0.4rem 0 0;
}
.local-market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.local-market-card {
  background: #fff;
  border: 1.5px solid #e8e4df;
  border-radius: 1.6rem;
  padding: 2.8rem 2.4rem 2.4rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.local-market-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #046053, #067260);
}
.local-market-card:hover {
  box-shadow: 0 8px 28px rgba(4, 96, 83, 0.12);
  transform: translateY(-3px);
}
.local-market-card__icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f0faf8;
  border-radius: 8px;
  color: #046053;
  margin-bottom: 1.2rem;
}
.local-market-card__stat {
  font-size: 3.8rem;
  font-weight: 900;
  color: #046053;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.local-market-card__stat-unit {
  font-size: 0.5em;
  font-weight: 700;
  color: #b4cfcb;
  vertical-align: middle;
}
.local-market-card__stat--badge {
  font-size: 2rem;
  display: inline-block;
  background: rgba(4, 96, 83, 0.08);
  color: #046053;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  margin-bottom: 0.4rem;
}
.local-market-card__label {
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b4cfcb;
  margin-bottom: 1.4rem;
}
.local-market-card__sep {
  border: none;
  border-top: 1px solid #ede9e4;
  margin: 0 0 1.4rem;
}
.local-market-card__body {
  font-size: 1.35rem;
  line-height: 1.65;
  color: #4a6e69;
  flex: 1;
}
.local-market-card__source {
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(4, 96, 83, 0.42);
  border-top: 1px solid #ede9e4;
  margin-top: 1.6rem;
  padding-top: 1rem;
}
@media (max-width: 991px) {
  .local-market-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}
@media (max-width: 767px) {
  .local-market-section {
    padding: 5rem 0;
  }
  .local-market-header {
    padding: 2.8rem 2.4rem;
    border-radius: 1.4rem;
    gap: 0.6rem;
  }
  .local-market-header .h2 {
    font-size: 2.6rem;
  }
  .local-market-header__sub {
    font-size: 1.45rem;
  }
  .local-market-card {
    padding: 2.4rem 2rem 2rem;
  }
  .local-market-card__stat {
    font-size: 3.2rem;
  }
}
