/* ──────────────── FOND ARISTOCHATS ──────────────── */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Georgia', serif;
  background-color: #fce4ec;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,192,203,0.6) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,182,193,0.5) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Ctext y='40' font-size='32' opacity='0.12'%3E🐱%3C/text%3E%3Ctext x='40' y='80' font-size='32' opacity='0.12'%3E🌸%3C/text%3E%3C/svg%3E");
  background-size: auto, auto, 80px 80px;
}

/* ──────────────── CONTAINER ──────────────── */
.container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 20px;
}

/* ──────────────── CARTE ──────────────── */
.scene {
  width: 400px;
  height: 520px;
  perspective: 1000px;
  cursor: pointer;
}

.card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

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

/* ──────────────── FACES ──────────────── */
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
}

/* Face avant : photo */
.card-front {
  background: #fff;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* Face arrière : texte */
.card-back {
  background: linear-gradient(135deg, #f8bbd0, #f48fb1);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  box-sizing: border-box;
  text-align: center;
  font-family: 'Georgia', serif;
}

.card-back .paw {
  font-size: 3rem;
  margin-bottom: 16px;
}

.card-back h2 {
  color: #880e4f;
  font-size: 1.7rem;
  margin: 0 0 12px;
}

.card-back p {
  color: #4a0025;
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
}

.card-back .back-hint {
  margin-top: 20px;
  font-size: 0.72rem;
  color: rgba(74, 0, 37, 0.6);
  letter-spacing: 0.5px;
}

/* ──────────────── RESPONSIVE TABLETTE ──────────────── */
@media (max-width: 768px) {
  .container {
    gap: 24px;
  }

  .scene {
    width: 280px;
    height: 370px;
  }

  .card-back h2 {
    font-size: 1.2rem;
  }

  .card-back p {
    font-size: 0.9rem;
  }

  .card-back .paw {
    font-size: 2.5rem;
  }
}

/* ──────────────── RESPONSIVE TÉLÉPHONE ──────────────── */
@media (max-width: 480px) {
  .container {
    flex-direction: column;
    gap: 30px;
  }

  .scene {
    width: 90vw;
    height: 117vw;
    max-width: 400px;
    max-height: 520px;
  }

  .card-back {
    padding: 22px;
  }

  .card-back .paw {
    font-size: 2.4rem;
    margin-bottom: 8px;
  }

  .card-back h2 {
    font-size: 1.3rem;
  }

  .card-back p {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .card-back .back-hint {
    margin-top: 14px;
    font-size: 0.78rem;
  }

  .hint {
    font-size: 0.75rem;
    padding: 3px 10px;
  }
}

/* ──────────────── TRÈS PETITS ÉCRANS (< 360px) ──────────────── */
@media (max-width: 360px) {
  .scene {
    width: 95vw;
    height: 125vw;
  }

  .card-back h2 {
    font-size: 1.1rem;
  }

  .card-back p {
    font-size: 0.85rem;
    line-height: 1.6;
  }
}
