/* Wrapper des cartes */
.services-cards-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: auto;
  gap: clamp(1.875rem, 5vh, 3.75rem);
  flex-wrap: wrap;
  width: 100%;
  max-width: 1400px;
}

/* Containers des cartes */
.services-card-container {
  flex: 1 1 300px;
  max-width: 320px;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.services-card-container.visible {
  opacity: 1;
  transform: translateX(0);
}
.services-card-container.hiding {
  opacity: 0;
  transform: translateX(-30px);
}

/* Cartes */
.services-card {
  width: 100%;
  height: 100%;
  min-height: clamp(400px, 55vh, 550px);
  background-color: #fff;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.services-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 #000;
}

.services-card-image {
  width: 100%;
  height: clamp(10rem, 20vh, 12.5rem);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 48px;
  position: relative;
}
.services-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.services-card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.5vh, 1rem);
}

.services-card-title {
  font-size: clamp(1.5rem, 3vh, 1.875rem);
  text-align: center;
  margin: 0;
  color: #333;
}

.services-card-text {
  flex: 1;
  overflow-y: auto;
  font-size: clamp(0.875rem, 2vh, 1rem);
  color: #4e4e4e;
  line-height: 1.5;
}

/* Chevron caché sur desktop */
.scroll-chevron {
  display: none;
}

/* === RESPONSIVE (Tablette) === */
@media (max-width: 1024px) {
  .services-card {
    min-height: auto;
  }
  .services-card-image {
    height: 200px;
  }
  .services-card-title,
  .services-card-text {
    font-size: unset;
  }
}

/* === RESPONSIVE (Mobile) === */
@media (max-width: 768px) {
  .services-cards-wrapper {
    height: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 20px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    padding: 20vh 0;
  }
  .services-cards-wrapper::-webkit-scrollbar {
    display: none;
  }

  .services-card-container {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
    height: auto;
    scroll-snap-align: center;
    justify-content: center;
    padding: 0 20px;
  }

  .services-card {
    min-height: auto;
    height: auto;
    overflow: hidden;
  }
  .services-card:hover {
    transform: none;
    box-shadow: 4px 4px 0 #000;
  }

  .services-card-image {
    height: 150px;
  }
  .services-card-title {
    font-size: 1.4rem;
  }
  .services-card-text {
    font-size: 0.7rem;
    overflow-y: hidden;
  }

  .scroll-chevron {
    display: block;
    position: relative;
    width: 25px;
    height: 25px;
    opacity: 0.5;
    margin: 20px auto 0 auto;
    animation: pulse-fade 2.5s infinite ease-in-out;
  }

  .scroll-chevron span {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.4s ease;
  }

  .scroll-chevron span::before,
  .scroll-chevron span::after {
    content: "";
    position: absolute;
    width: 50%;
    height: 3px;
    background: #0006ff;
    top: 50%;
    transform-origin: center;
  }
  .scroll-chevron span::before {
    left: 0;
    transform: rotate(45deg);
  }
  .scroll-chevron span::after {
    right: 0;
    transform: rotate(-45deg);
  }

  .scroll-chevron.is-flipped span {
    transform: rotate(180deg);
  }

  @keyframes pulse-fade {
    0%,
    100% {
      opacity: 0.5;
    }
    50% {
      opacity: 0;
    }
  }
}
