/* ==========================================
   CARDS (Services)
   ========================================== */

.carte-container {
  perspective: 1000px;
  width: 210px;
  height: 360px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.carte {
  width: 210px;
  height: 360px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s;
  cursor: pointer;
  margin: 0 auto;
}

.carte-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 210px;
  height: 360px;
  backface-visibility: hidden;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.carte-face p,
.carte-face h3 {
  margin: 5px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Front face */
.carte-front {
  transform: rotateY(0deg);
  background-image: url("../../images/MurmuresAnais_card_verso4.webp");
  background-size: cover;
  border-radius: 20px;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  text-shadow: 0 1px 2px rgb(255, 0, 212);
  position: relative;
  overflow: hidden;
}

.carte-front p {
  font-size: 1rem;
  text-align: center;
  line-height: 1.3;
}

.carte-front .prix {
  font-size: 2.5rem;
  margin: 15px 0;
  font-weight: 400;
  color: rgba(255, 215, 0);
}

/* Back face */
.carte-back {
  transform: rotateY(180deg);
  background-image: url("../../images/MurmuresAnais_card_recto2.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  backface-visibility: hidden;
  color: rgb(188, 0, 188);
  text-shadow: 0 1px 2px rgb(255, 255, 255);
}

.carte-back h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-family: "Great Vibes", cursive;
  color: rgb(138, 43, 226);
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
  font-weight: 600;
}

.carte-back p {
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
}

.carte.flipped {
  transform: rotateY(180deg);
}

/* Effet shimmer */
.carte-front::before {
  content: "";
  position: absolute;
  top: 0;
  left: -90%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 215, 0, 0.5) 40%,
    rgba(255, 215, 0, 0.2) 60%,
    transparent 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  opacity: 0;
}

.carte:not(.flipped):hover .carte-front::before {
  opacity: 1;
  animation: shimmer 1s forwards;
}

@keyframes shimmer {
  0% {
    left: -90%;
    opacity: 1;
  }
  100% {
    left: 110%;
    opacity: 0;
  }
}

/* Carte front enrichie */
.carte-nom {
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.3;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(255, 0, 212, 0.8);
  margin-bottom: 0 !important;
}

.carte-sep {
  display: block;
  font-size: 1.1rem;
  color: rgba(255, 215, 0, 0.85);
  margin: 12px 0;
  letter-spacing: 4px;
}

.carte-sous {
  font-size: 0.82rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  font-style: italic;
  line-height: 1.4;
  margin-top: 0 !important;
}

/* Card scroll animations */
.carte-from-left,
.carte-from-right {
  opacity: 0;
  transform: translateY(50px);
}

.carte-from-left.carte-visible,
.carte-from-right.carte-visible {
  animation: carteFromBottom 0.8s ease-out forwards;
}

@keyframes carteFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
