/* Variables — couleur cœur = rouge romantique */
:root {
  --heart: #c73e54;
  --heart-light: #e85a6f;
  --bg: #fef8f9;
  --text: #1a1a1a;
  --btn-non-bg: #e8e8e8;
  --btn-non-text: #1a1a1a;
  --btn-oui-text: #fff;
  --font-script: 'Parisienne', cursive;
  --font-sans: 'Outfit', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

.content {
  text-align: center;
  max-width: 28rem;
  width: 100%;
}

/* Cœur animé */
.heart-wrap {
  margin-bottom: 1.5rem;
}

.heart {
  display: block;
  width: 8rem;
  height: 8rem;
  margin: 0 auto;
  object-fit: contain;
}

.heart-beat {
  animation: beat 1s ease-in-out infinite;
}

.heart-glow {
  animation: beat 1.3s ease-in-out infinite, glow 3s ease-in-out infinite;
}

@keyframes beat {

  0%,
  100% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.15);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.12);
  }

  56% {
    transform: scale(1);
  }
}

@keyframes glow {

  0%,
  100% {
    filter: drop-shadow(0 0 0 transparent);
  }

  50% {
    filter: drop-shadow(0 0 18px var(--heart-light));
  }
}

/* Typo — headings plus épais (Parisienne n'a qu'un poids, on simule avec ombre) */
.heading {
  font-family: var(--font-script);
  font-weight: 600;
  color: var(--heart);
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.2;
  text-shadow:
    0.02em 0 0 currentColor,
    -0.02em 0 0 currentColor,
    0 0.02em 0 currentColor,
    0 -0.02em 0 currentColor,
    0.01em 0.01em 0 currentColor;
}

.intro {
  font-weight: 300;
  font-size: 1.05rem;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.question {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 2rem;
  color: var(--text);
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  min-height: 3.5rem;
  position: relative;
}

.btn {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: scale(1.05);
}

.btn:focus {
  outline: 2px solid var(--heart);
  outline-offset: 3px;
}

.btn-oui {
  background: var(--heart);
  color: var(--btn-oui-text);
  box-shadow: 0 4px 14px rgba(199, 62, 84, 0.35);
}

.btn-oui:hover {
  box-shadow: 0 6px 20px rgba(199, 62, 84, 0.45);
}

.btn-non {
  background: var(--btn-non-bg);
  color: var(--btn-non-text);
}

/* Bouton "Non" qui fuit — position fixe pour sortir du flux */
.btn-non.runaway {
  position: fixed;
  transition: left 0.25s ease-out, top 0.25s ease-out;
  z-index: 10;
}

/* Scène "Oui" */
.scene-yes .heading-yes {
  font-family: var(--font-script);
  font-weight: 600;
  color: var(--heart);
  font-size: clamp(2rem, 6vw, 2.75rem);
  margin-bottom: 1rem;
  text-shadow:
    0.02em 0 0 currentColor,
    -0.02em 0 0 currentColor,
    0 0.02em 0 currentColor,
    0 -0.02em 0 currentColor,
    0.01em 0.01em 0 currentColor;
}

.scene-yes .love {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  margin: 0;
  color: var(--text);
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Visibilité des scènes */
.scene {
  animation: fadeIn 0.4s ease-out;
}

.scene.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Confettis / feu d'artifice — conteneur */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.confetti-container .particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: confetti-burst linear forwards;
  will-change: transform;
}

.confetti-container .particle.rect {
  width: 8px;
  height: 6px;
  border-radius: 1px;
}

/* Explosion : les particules partent du centre et vont vers --burst-tx, --burst-ty */
@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translate(var(--burst-tx), var(--burst-ty)) rotate(720deg);
    opacity: 0.9;
  }
}

/* Feux d'artifice — plus visibles : particules plus grosses, halo, traînées */
.firework {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--heart);
  box-shadow:
    0 0 10px 2px currentColor,
    0 0 20px 4px rgba(199, 62, 84, 0.4);
  animation: firework-burst 1.8s ease-out forwards;
  pointer-events: none;
}

.firework.firework-core {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 15px 3px currentColor;
}

@keyframes firework-burst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  70% {
    opacity: 0.95;
  }

  100% {
    transform: var(--fw-translate) scale(0.3);
    opacity: 0;
  }
}