/* =============================
   VARIABLES & RESET
============================= */
:root {
  --pink:       #e8849a;
  --pink-soft:  #f5c6d0;
  --pink-bg:    #fce8ec;
  --mauve:      #a06080;
  --mauve-dark: #7a3a55;
  --purple:     #9b72b0;
  --cream:      #fffaf8;
  --text:       #4a2535;
  --text-light: #9a6878;
  --white:      #ffffff;
  --shadow:     0 12px 40px rgba(160, 96, 128, 0.18);
  --radius:     24px;
}

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

html, body {
  height: 100%;
  font-family: 'Lora', Georgia, serif;
  background: linear-gradient(145deg, #fce8ec 0%, #f3e8f8 50%, #e8ecfc 100%);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
}

/* =============================
   PARTICLES BACKGROUND
============================= */
.particles {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
  position: absolute; border-radius: 50%; opacity: 0.35;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.35; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* =============================
   STEP SYSTEM
============================= */
.step {
  display: none; min-height: 100vh;
  align-items: center; justify-content: center;
  padding: 32px 16px; position: relative; z-index: 1;
}
.step.active {
  display: flex;
  animation: fadeSlideIn 0.55s cubic-bezier(.22,1,.36,1) both;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* =============================
   CARDS
============================= */
.card {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 48px 40px 44px;
  max-width: 460px; width: 100%;
  box-shadow: var(--shadow), 0 2px 0 rgba(255,255,255,0.8) inset;
  text-align: center; position: relative;
  border: 1px solid rgba(255,255,255,0.6);
}
.card-wide  { max-width: 560px; }
.card-final { max-width: 500px; background: rgba(255,255,255,0.92); }

/* Carte coquine */
.card-coquine {
  background: rgba(255,255,255,0.92);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.coquine-gif {
  width: 260px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto 24px auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(160,96,128,0.3);
}
.coquine-gif img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 20px;
}
.coquine-text {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--mauve-dark);
  margin-bottom: 24px;
}

/* =============================
   AVATAR
============================= */
.avatar-wrap {
  width: 110px; height: 110px; margin: 0 auto 24px;
  border-radius: 20px; overflow: hidden; background: #e8d0dc;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(160,96,128,0.22);
}
.avatar { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback {
  display: none; font-size: 48px;
  align-items: center; justify-content: center;
  width: 100%; height: 100%;
}

/* =============================
   TYPOGRAPHY
============================= */
.big-question {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 900;
  color: var(--mauve-dark); line-height: 1.3; margin-bottom: 32px;
}
.big-reaction {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 5vw, 1.9rem); font-weight: 900;
  color: var(--mauve-dark); margin: 16px 0 10px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 4vw, 1.85rem); font-weight: 700;
  color: var(--mauve-dark); margin-bottom: 8px;
}
.subtitle, .sub-label {
  font-size: 0.95rem; color: var(--text-light);
  margin-bottom: 24px; font-style: italic;
}
.step-icon   { font-size: 2.2rem; margin-bottom: 12px; }
.reaction-icon {
  font-size: 3rem; display: inline-block;
  background: #c0392b; border-radius: 18px; padding: 12px 18px;
  margin-bottom: 8px; box-shadow: 0 6px 16px rgba(192,57,43,0.25);
}

/* =============================
   BUTTONS
============================= */
.btn-row { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.btn {
  font-family: 'Lora', serif; font-size: 1rem; font-weight: 600;
  border: none; border-radius: 50px; padding: 14px 36px;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease;
  letter-spacing: 0.04em; text-decoration: none; display: inline-block;
}
.btn:active { transform: scale(0.96) !important; }
.btn-yes {
  background: linear-gradient(135deg, #e8849a, #c8547a);
  color: white; box-shadow: 0 6px 20px rgba(200,84,122,0.4);
}
.btn-yes:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 28px rgba(200,84,122,0.5); }
.btn-no {
  background: linear-gradient(135deg, #b39ddb, #9575cd);
  color: white; box-shadow: 0 6px 20px rgba(149,117,205,0.4);
  position: relative; transition: all 0.15s ease;
}
.btn-cal {
  background: linear-gradient(135deg, #6ec6ca, #3a9fa3);
  color: white; box-shadow: 0 6px 20px rgba(58,159,163,0.35);
  margin-bottom: 16px;
}
.btn-cal:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 28px rgba(58,159,163,0.45); }
.btn-back {
  position: absolute; top: 12px; left: 12px;
  background: none; color: var(--text-light);
  font-size: 1.1rem; padding: 4px 8px;
  box-shadow: none; border: none;
  border-radius: 50%; line-height: 1;
  opacity: 0.5;
}
.btn-back:hover { background: rgba(160,96,128,0.08); color: var(--mauve); transform: none; box-shadow: none; opacity: 1; }
.btn.full-width { width: 100%; margin-top: 20px; }

/* =============================
   FORMS
============================= */
.form-group { text-align: left; margin-bottom: 20px; }
.form-group label {
  display: block; font-weight: 600; font-size: 0.92rem;
  color: var(--mauve); margin-bottom: 8px; letter-spacing: 0.02em;
}
.form-group input[type="date"],
.form-group select {
  width: 100%; padding: 14px 18px;
  border: 1.5px solid #e8c8d4; border-radius: 12px;
  font-family: 'Lora', serif; font-size: 1rem; color: var(--text);
  background: rgba(255,255,255,0.9); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; appearance: auto;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232,132,154,0.2);
}
.error-msg { color: #c0392b; font-size: 0.87rem; margin-top: 8px; min-height: 20px; }

/* =============================
   ACTIVITY / FOOD GRID
============================= */
.food-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 8px;
}
.food-item {
  background: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(200,160,180,0.3); border-radius: 16px;
  padding: 20px 10px 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 2rem; transition: transform 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
  user-select: none;
}
.food-item span { font-size: 0.8rem; font-family: 'Lora', serif; color: var(--text); font-weight: 600; }
.food-item:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 20px rgba(160,96,128,0.15); }
.food-item.selected {
  border-color: var(--pink); background: rgba(248,200,215,0.45);
  box-shadow: 0 0 0 3px rgba(232,132,154,0.3); transform: scale(1.06);
}
.food-item.spicy { border-color: rgba(180,60,60,0.25); }
.food-item.spicy:hover { box-shadow: 0 8px 20px rgba(180,60,60,0.2); }

#food-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* =============================
   FINAL SCREEN
============================= */
.card-final { text-align: center; }
.final-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 3.5vw, 1.65rem); font-weight: 700;
  color: var(--mauve-dark); line-height: 1.5; margin-bottom: 18px;
}
.ps-text {
  font-size: 0.88rem; color: var(--text-light);
  font-style: italic; line-height: 1.6; margin-bottom: 20px;
}
.hearts-row {
  font-size: 1.3rem; color: var(--pink); letter-spacing: 8px;
  animation: pulse 1.8s ease infinite; margin-bottom: 12px;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
.email-status {
  font-size: 0.82rem; color: var(--text-light);
  font-style: italic; min-height: 18px;
}
.hearts-bg {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.floating-heart {
  position: absolute; font-size: 1.4rem;
  animation: heartFloat 4s ease-in-out infinite; opacity: 0.5;
}
@keyframes heartFloat {
  0%   { transform: translateY(0) scale(1); opacity: 0.5; }
  50%  { transform: translateY(-40px) scale(1.15); opacity: 0.8; }
  100% { transform: translateY(0) scale(1); opacity: 0.5; }
}

/* =============================
   CONFETTI
============================= */
.confetti-container { position: fixed; inset: 0; pointer-events: none; z-index: 99; overflow: hidden; }
.confetti-piece {
  position: absolute; width: 10px; height: 10px; border-radius: 2px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* =============================
   RESPONSIVE
============================= */
@media (max-width: 480px) {
  .card { padding: 36px 24px 32px; }
  .food-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .food-item { padding: 16px 6px 12px; font-size: 1.7rem; }
  .btn { padding: 13px 28px; }
  .btn-row { gap: 14px; }
}
