/* ══════════════════════════════════════════
   Date Page — feuille de style
   ══════════════════════════════════════════ */

:root {
  --bg-1: #ff9a9e;
  --bg-2: #fad0c4;
  --bg-3: #fbc2eb;
  --bg-4: #a18cd1;
  --pink: #ff4d8d;
  --pink-deep: #e0306e;
  --purple: #a86be0;
  --cream: #fff6f9;
  --ink: #4a2c3d;
  --ink-soft: #7c5a6b;
  --white-glass: rgba(255, 255, 255, 0.55);
  --white-glass-strong: rgba(255, 255, 255, 0.78);
  --shadow: 0 20px 60px rgba(180, 60, 110, 0.28);
  --shadow-soft: 0 8px 24px rgba(180, 60, 110, 0.18);
  --radius: 26px;
  --radius-sm: 16px;
  --font-title: "Playfair Display", Georgia, serif;
  --font-body: "Poppins", system-ui, -apple-system, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
  background: linear-gradient(-45deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-4));
  background-size: 400% 400%;
  animation: gradientShift 18s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Canvas confettis / cœurs */
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* Cœurs flottants d'ambiance */
.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.floating-hearts .fh {
  position: absolute;
  bottom: -40px;
  font-size: 1.4rem;
  opacity: 0;
  animation: floatUp linear infinite;
  will-change: transform, opacity;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-115vh) rotate(360deg) scale(1.2); opacity: 0; }
}

/* Barre de progression */
.progress-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.35);
  z-index: 40;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 0 6px 6px 0;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scène & écrans */
.stage {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
}

.screen {
  display: none;
  width: 100%;
  max-width: 640px;
  animation: none;
}
.screen.is-active {
  display: block;
  animation: screenIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Carte glassmorphism */
.card {
  background: var(--white-glass-strong);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(26px, 5vw, 48px);
  text-align: center;
}

/* Typographie */
.title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.8rem, 5.5vw, 2.9rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 14px;
}
.step-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  margin-bottom: 6px;
}
.subtitle {
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 300;
}
.subtitle em { color: var(--pink-deep); font-style: italic; font-weight: 500; }
.subtitle-mini, .step-sub {
  font-size: 0.96rem;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: 22px;
}
.gradient-text {
  background: linear-gradient(90deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}
.her-name { color: var(--pink-deep); font-style: italic; }

.tiny-hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-top: 18px;
  font-weight: 300;
}
.tiny-hint code {
  background: rgba(0,0,0,0.06);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

/* Emojis animés */
.big-emoji { font-size: clamp(3.4rem, 12vw, 5rem); margin-bottom: 10px; }
.beating { animation: beat 1.3s ease-in-out infinite; display: inline-block; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.18); }
  40% { transform: scale(0.95); }
}
.wiggle { display: inline-block; animation: wiggle 2.2s ease-in-out infinite; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(14deg); }
  75% { transform: rotate(-10deg); }
}

/* ═══════ Boutons ═══════ */
.btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 999px;
  padding: 14px 30px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  user-select: none;
}
.btn:active { transform: scale(0.96); }
.btn-lg { padding: 17px 40px; font-size: 1.12rem; }

.btn-primary {
  background: linear-gradient(120deg, var(--pink), var(--pink-deep));
  color: #fff;
  box-shadow: 0 10px 26px rgba(224, 48, 110, 0.42);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 34px rgba(224, 48, 110, 0.5); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(0.3); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-soft);
  border: 1.5px solid rgba(124, 90, 107, 0.25);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.85); transform: translateY(-2px); }

.btn-emoji { transition: transform 0.2s ease; }
.btn-primary:hover .btn-emoji { transform: translateX(4px); }

/* Zone de réponse Oui / Non */
.answer-zone {
  position: relative;
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  min-height: 120px;
  margin-top: 12px;
}
.btn-yes {
  background: linear-gradient(120deg, #ff6aa2, var(--pink-deep));
  color: #fff;
  box-shadow: 0 10px 26px rgba(224, 48, 110, 0.45);
  transition: transform 0.2s ease, font-size 0.3s ease, padding 0.3s ease, box-shadow 0.25s ease;
  z-index: 2;
}
.btn-yes:hover { transform: translateY(-3px) scale(1.05); }
.btn-no {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  border: 1.5px solid rgba(124, 90, 107, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}
.btn-no.dodging {
  position: fixed;
  z-index: 60;
  margin: 0;
  transition: left 0.14s ease-out, top 0.14s ease-out;
}

/* ═══════ Formulaire multi-étapes ═══════ */
.form-card { text-align: center; position: relative; }
.step-counter {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.5);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 500;
}
.form-step { display: none; }
.form-step.is-active { display: block; animation: stepIn 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 4px;
}
.options[data-group="creneau"],
.options[data-group="activite"],
.options[data-group="repas"] { grid-template-columns: 1fr 1fr; }

.option {
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.option:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
  background: rgba(255, 255, 255, 0.85);
}
.option.selected {
  border-color: var(--pink);
  background: linear-gradient(160deg, rgba(255,77,141,0.12), rgba(168,107,224,0.1));
  box-shadow: 0 8px 22px rgba(224, 48, 110, 0.25);
}
.option.selected::after {
  content: "💖";
  position: absolute;
  top: 10px; right: 12px;
  font-size: 1.1rem;
  animation: pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop {
  from { transform: scale(0) rotate(-30deg); }
  to   { transform: scale(1) rotate(0); }
}
.option-emoji { font-size: 1.7rem; }
.option-label { font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.option-desc { font-size: 0.82rem; color: var(--ink-soft); font-weight: 300; line-height: 1.3; }

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}
.form-nav .btn { flex: 1; justify-content: center; }

/* ═══════ Récap ═══════ */
.recap-list {
  list-style: none;
  text-align: left;
  margin: 22px 0;
  display: grid;
  gap: 10px;
}
.recap-list li {
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.02rem;
  animation: stepIn 0.4s ease both;
}
.recap-list li .r-emoji { font-size: 1.5rem; }
.recap-list li .r-label { color: var(--ink-soft); font-size: 0.8rem; display: block; font-weight: 300; }
.recap-list li .r-value { font-weight: 600; color: var(--ink); }

/* ═══════ Succès ═══════ */
.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin: 24px 0 10px;
}
.success-actions .btn { width: 100%; max-width: 340px; justify-content: center; }
.send-status {
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-height: 20px;
  margin-top: 8px;
  font-weight: 400;
}
.send-status.ok { color: #2e9e6b; font-weight: 500; }
.send-status.err { color: var(--pink-deep); }

/* Responsive */
@media (max-width: 480px) {
  .options { grid-template-columns: 1fr !important; }
  .card { padding: 24px 20px; }
  .step-counter { top: 14px; right: 16px; }
  .btn-lg { padding: 15px 30px; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  body { animation: none; }
}
