body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("heart-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: "Pixelify Sans", sans-serif;
  color: #3b1024;
}

/* Enveloppe */
#envelope-container {
  text-align: center;
  cursor: pointer;
}

.envelope-text {
  margin-top: 12px;
  font-size: 20px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

#envelope {
  width: 200px;
  animation: pulse 1.5s infinite;
  cursor: pointer;
}

#letter-container {
  display: none;
  position: fixed;
  inset: 0;
  justify-content: center;
  align-items: center;
}

.letter-window {
  width: 90vw;
  max-width: 800px;
  aspect-ratio: 3/2;
  padding: 20px 20px 0 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-image: url("window.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 12px;
  gap: 8px;
  padding-top: 180px;

  transform: scale(1.2);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.letter-window.open {
  transform: scale(1);
  opacity: 1;
}

h1 {
  font-size: 30px;
  margin: 0;
}

p {
  font-size: 20px;
}

/* Cat */

.cat {
  width: 250px;
  margin: 10px 0;
  transition: width 0.4s ease;
}

.letter-window.final .cat {
  width: 180px;
}

/* buttons */
.buttons {
  display: flex;
  justify-content: center;
  gap: 30px;
  position: relative;
}

.no-wrapper {
  position: relative;
}

.btn {
  width: 120px;
  cursor: pointer;
  user-select: none;
}

.yes-btn,
.no-btn {
  width: 120px;
  height: auto;
  display: inline-block;
}

.yes-btn {
  position: relative;
  z-index: 2;
  transform-origin: center center;
  transition: transform 0.3s ease;
}

.no-btn {
  z-index: 1;
  position: relative;
  transition: transform 0.15s ease;
  cursor: default;
}

/* Animation quand on est "obligée" de cliquer sur Oui */
@keyframes wiggle-yes {
  0% {
    transform: scale(1.1) rotate(0deg);
  }
  25% {
    transform: scale(1.12) rotate(-4deg);
  }
  50% {
    transform: scale(1.15) rotate(4deg);
  }
  75% {
    transform: scale(1.12) rotate(-2deg);
  }
  100% {
    transform: scale(1.1) rotate(0deg);
  }
}

.wiggle-yes {
  animation: wiggle-yes 0.5s ease-in-out infinite;
}

/* Glow autour du bouton Oui à la fin du jeu */
.yes-glow {
  box-shadow: 0 0 18px 4px rgba(255, 105, 180, 0.9);
  border-radius: 999px;
}

/* Coeurs / textes flottants */
.floating-heart {
  position: fixed;
  pointer-events: none;
  color: #ff4da6;
  font-size: 18px;
  font-family: "Pixelify Sans", sans-serif;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  animation: float-up 1.2s ease-out forwards;
  z-index: 9999;
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(1.05);
  }
}

/* Shake de la fenêtre quand elle insiste sur Non */
@keyframes shake {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(3px);
  }
  100% {
    transform: translateX(0);
  }
}

.shake {
  animation: shake 0.4s ease;
}

.final-text {
  font-size: 22px;
  line-height: 1.4;
  text-align: center;
  display: inline-block;
  padding: 10px 20px;
  background-color: rgba(255, 240, 240, 0.7);
  border-radius: 12px;
}

/* ---- Layout pages intérieures ---- */
.page {
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  padding: 24px 22px 26px;
  max-width: 620px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
  backdrop-filter: blur(10px);
}

.page-title {
  font-size: 28px;
  margin: 0 0 8px;
}

.page-subtitle {
  margin: 0 0 20px;
  font-size: 18px;
}

.primary-button,
.secondary-button {
  border: none;
  border-radius: 999px;
  padding: 10px 24px;
  font-family: "Pixelify Sans", sans-serif;
  font-size: 18px;
  cursor: pointer;
  margin-top: 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.primary-button {
  background: linear-gradient(135deg, #ff50a8, #ff8bbd);
  color: white;
  box-shadow: 0 8px 18px rgba(255, 80, 168, 0.5);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(255, 80, 168, 0.6);
}

.secondary-button {
  background: white;
  color: #c2155a;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.secondary-button:hover {
  transform: translateY(-1px);
  background: #ffe5f1;
}

/* ---- Page choix resto ---- */
.choices {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.choice {
  border: 3px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  padding: 8px 10px 12px;
  transition: 0.2s;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
  min-width: 140px;
}

.choice img {
  width: 140px;
  border-radius: 12px;
  display: block;
}

.choice p {
  margin-top: 8px;
  font-size: 18px;
}

.choice.selected {
  border-color: hotpink;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 20px rgba(255, 105, 180, 0.35);
}

/* ---- Formulaire dates ---- */
.dates-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 4px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.checkbox-row input[type="checkbox"] {
  transform: scale(1.3);
}

/* ---- Page finale ---- */
.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.final-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 26px 26px 28px;
  max-width: 640px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.final-gif {
  width: 260px;
  margin: 14px 0;
  border-radius: 14px;
}

.final-details {
  margin-top: 6px;
  font-size: 18px;
}
