.services {
  position: relative;
  padding: 100px 85px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.services__heading {
  width: 100%;
  max-width: 1270px;
  padding: 10px;
  margin: 0;
  font-size: 36px;
  font-weight: var(--fw-semibold);
  line-height: 54px;
  text-align: center;
  color: var(--color-text);
}

.services__heading-accent {
  color: var(--color-accent);
}

.services__cards {
  display: flex;
  justify-content: center;
  gap: 60px;
  width: 100%;
  max-width: 1270px;
}

.services-card-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

/* Soleils décoratifs (réutilisation du pattern audience). */
.services-card__sun {
  position: absolute;
  width: 408px;
  height: 408px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.services-card-wrap--regular .services-card__sun {
  top: 33%;
  left: 0;
  transform: translate(-50%, -50%);
  color: var(--color-accent);
}

.services-card-wrap--extras .services-card__sun {
  bottom: 33%;
  right: 0;
  transform: translate(50%, 50%);
  color: var(--color-mint);
}

.services-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px 30px;
  background-color: var(--color-bg);
  border: 2px solid var(--color-text);
  box-shadow: 8px 8px 0 0 var(--services-shadow-color, var(--color-accent));
  height: 100%;
}

.services-card--regular {
  --services-shadow-color: var(--color-accent);
}

.services-card--extras {
  --services-shadow-color: var(--color-mint-dark);
}

.services-card__icon {
  display: block;
  width: 160px;
  height: auto;
  margin: 0 auto 10px;
  color: var(--services-shadow-color);
}

/* Largeur spécifique à la carte "Le ménage régulier" (icône hand-good
   plus compacte que hand-carte). */
.services-card--regular .services-card__icon {
  width: 150px;
}

/* Les paths noirs des SVG doivent suivre la couleur de la fonte du
   site (pas le noir pur), pour cohérence avec le reste du design. */
.services-card__icon path[fill="black"] {
  fill: var(--color-text);
}

.services-card__title {
  margin: 0;
  font-size: 28px;
  font-weight: var(--fw-semibold);
  line-height: 36px;
  text-align: center;
  color: var(--color-text);
}

.services-card--regular .services-card__title {
  color: var(--color-accent);
}

.services-card--extras .services-card__title {
  color: var(--color-mint-dark);
}

.services-card__tagline {
  margin: 0;
  font-size: 18px;
  font-style: italic;
  line-height: 28px;
  color: var(--color-text);
}

.services-card__list {
  /* Icône de bullet en SVG inline data URL — recolorisé via mask-image
     pour suivre --services-shadow-color (saumon ou menthe).
     Override par .services-card--extras pour utiliser un + au lieu
     d'un check sur la 2e carte. */
  --bullet-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8 L7 12 L13 4' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 18px;
  line-height: 28px;
  color: var(--color-text);
}

.services-card__list li {
  position: relative;
  padding-left: 30px;
}

.services-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  background-color: var(--services-shadow-color, var(--color-accent));
  -webkit-mask: var(--bullet-icon) no-repeat center / contain;
          mask: var(--bullet-icon) no-repeat center / contain;
}

/* Carte "Prestations à la carte" : bullets = + au lieu de check. */
.services-card--extras .services-card__list {
  --bullet-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3 L8 13 M3 8 L13 8' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.services__note {
  max-width: 800px;
  margin: 0;
  padding: 0 10px;
  font-size: 18px;
  font-style: italic;
  line-height: 28px;
  text-align: center;
  color: var(--color-text);
}

/* CTA inverse avec ombre visible au repos (rétractée au hover), à
   l'inverse du comportement par défaut de .btn--inverse — même pattern
   que .guide__cta. */
.services__cta {
  align-self: center;
  padding: 12px 24px;
  background-color: var(--color-accent);
  box-shadow: 8px 8px 0 0 var(--color-text);
}

.services__cta:hover {
  box-shadow: 0 0 0 0 var(--color-text);
}

@media (max-width: 1199px) {
  .services {
    padding: 100px 50px;
  }

  .services__cards {
    gap: 40px;
  }

  .services-card__sun {
    width: 320px;
    height: 320px;
  }
}

@media (max-width: 767px) {
  .services {
    padding: 60px 20px;
    gap: 40px;
  }

  .services__heading {
    font-size: 32px;
    line-height: 48px;
    text-align: left;
    padding: 10px 20px;
  }

  .services__cards {
    flex-direction: column;
    gap: 60px;
  }

  .services-card {
    padding: 30px 20px;
  }

  .services-card__title {
    font-size: 22px;
    line-height: 30px;
  }

  .services-card__tagline,
  .services-card__list,
  .services__note {
    font-size: 16px;
    line-height: 24px;
  }

  .services-card__sun {
    width: 240px;
    height: 240px;
  }
}

/* Reveal au scroll : titre slide-up, 2 cartes slide-from-right en
   cascade. Note + CTA slide-up. Scoped sous .js. */
@keyframes services-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes services-slide-from-right {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

.js .services__heading[data-reveal],
.js .services__cards[data-reveal] .services-card-wrap,
.js .services__note[data-reveal],
.js .services__cta[data-reveal] {
  opacity: 0;
}

.services__heading.is-visible,
.services__note.is-visible,
.services__cta.is-visible {
  animation: services-slide-up 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.services__cards.is-visible .services-card-wrap {
  animation: services-slide-from-right 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.services__cards.is-visible .services-card-wrap--regular { animation-delay:   0ms; }
.services__cards.is-visible .services-card-wrap--extras  { animation-delay: 200ms; }

@media (prefers-reduced-motion: reduce) {
  .js .services__heading[data-reveal],
  .js .services__cards[data-reveal] .services-card-wrap,
  .js .services__note[data-reveal],
  .js .services__cta[data-reveal] {
    opacity: 1;
    animation: none;
  }
}

/* Rotation des soleils liée au scroll (réutilise sun-spin-* keyframes
   d'audience.css : translates identiques). */
.services {
  view-timeline-name: --services-view;
}

.services-card-wrap--regular .services-card__sun {
  animation: sun-spin-particulier linear;
  animation-timeline: --services-view;
}

.services-card-wrap--extras .services-card__sun {
  animation: sun-spin-professionnel linear;
  animation-timeline: --services-view;
}

@media (prefers-reduced-motion: reduce) {
  .services-card__sun {
    animation: none;
  }
}
