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

:root {
  --rose:   #c0395e;
  --rose-l: #f4c2ce;
  --cream:  #fff9f5;
  --gold:   #c9a84c;
  --dark:   #3a1a2a;
}

body {
  min-height: 100vh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Lato', sans-serif;
  overflow: hidden;
  position: relative;
}

/* ── floating hearts (fond normal) ── */
.hearts-bg {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.heart-float {
  position: absolute;
  bottom: -60px;
  font-size: 1.4rem;
  animation: floatUp linear infinite;
  opacity: 0.18;
}
@keyframes floatUp {
  to { transform: translateY(-110vh) rotate(20deg); opacity: 0; }
}

/* ── main card ── */
.card {
  position: relative; z-index: 1;
  background: white;
  border-radius: 24px;
  padding: 48px 56px;
  text-align: center;
  box-shadow: 0 8px 48px rgba(192,57,94,.15);
  max-width: 520px;
  width: 90%;
  transition: transform .4s;
}

.title-small {
  font-family: 'Dancing Script', cursive;
  color: var(--rose);
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.title-big {
  font-family: 'Dancing Script', cursive;
  color: var(--dark);
  font-size: 2.6rem;
  line-height: 1.2;
  margin-bottom: 32px;
}

/* ── countdown ── */
.countdown {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 28px;
}
.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--rose-l);
  border-radius: 14px;
  padding: 16px 18px;
  min-width: 70px;
}
.unit-num {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--rose);
  line-height: 1;
  font-family: 'Lato', sans-serif;
}
.unit-label {
  font-size: .68rem;
  color: var(--rose);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}

.sub {
  color: #888;
  font-size: .9rem;
  line-height: 1.6;
}

/* ══════════════════════════════════════════
   CELEBRATION OVERLAY
══════════════════════════════════════════ */
#celebration {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at center, #fff5f8 0%, #fff9f5 60%, #ffe8f0 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  overflow: hidden;
}
#celebration.show { display: flex; }

/* gros cœur déco derrière le texte */
#celebration::before {
  content: '✦';
  position: absolute;
  font-size: 38vw;
  color: rgba(192,57,94,.04);
  pointer-events: none;
  animation: heartBeat 2.5s ease-in-out infinite;
  z-index: 0;
}
@keyframes heartBeat {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

/* sparkle ring autour du titre */
.cele-ring {
  position: relative;
  display: inline-block;
  z-index: 1;
  margin-bottom: 8px;
}
.cele-ring::before,
.cele-ring::after {
  content: '✨';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 1.8rem;
  animation: sparkleSwing 2s ease-in-out infinite;
}
.cele-ring::before { left: -48px; animation-delay: 0s; }
.cele-ring::after  { right: -48px; animation-delay: .4s; }
@keyframes sparkleSwing {
  0%,100% { transform: translateY(-50%) rotate(-15deg) scale(1); }
  50%      { transform: translateY(-50%) rotate(15deg) scale(1.3); }
}

/* titre principal avec shimmer */
.cele-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  color: var(--rose);
  margin-bottom: 4px;
  position: relative; z-index: 1;
  animation: titleEntrance .8s cubic-bezier(.34,1.56,.64,1) both;
  background: linear-gradient(90deg, #c0395e 0%, #e8658a 40%, #c9a84c 60%, #c0395e 100%);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleEntrance .8s cubic-bezier(.34,1.56,.64,1) both,
             shimmer 3s 1s linear infinite;
}
@keyframes titleEntrance {
  from { opacity: 0; transform: scale(.5) rotate(-6deg); }
  to   { opacity: 1; transform: scale(1)  rotate(0deg); }
}
@keyframes shimmer {
  from { background-position: 200% center; }
  to   { background-position: -200% center; }
}

/* sous-titre */
.cele-sub {
  font-size: 1.1rem;
  color: var(--dark);
  max-width: 440px;
  line-height: 1.8;
  margin-bottom: 40px;
  position: relative; z-index: 1;
  animation: slideUp .7s .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* bouton avec pulsation */
.btn-enter {
  background: linear-gradient(135deg, var(--rose), #e8658a);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 16px 52px;
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(192,57,94,.45);
  position: relative; z-index: 1;
  animation: slideUp .7s .9s cubic-bezier(.34,1.56,.64,1) both,
             btnPulse 2s 1.6s ease-in-out infinite;
  transition: transform .2s, box-shadow .2s;
}
.btn-enter:hover {
  transform: scale(1.07);
  box-shadow: 0 8px 36px rgba(192,57,94,.6);
}
@keyframes btnPulse {
  0%,100% { box-shadow: 0 6px 28px rgba(192,57,94,.45); }
  50%      { box-shadow: 0 8px 40px rgba(192,57,94,.75), 0 0 0 8px rgba(192,57,94,.1); }
}

/* cœurs flottants pendant la célébration */
.cele-heart {
  position: absolute;
  bottom: -10%;
  pointer-events: none;
  z-index: 2;
  animation: floatCele linear forwards;
  opacity: 0;
}
@keyframes floatCele {
  0%   { opacity: 0;   transform: translateY(0)    scale(.6) rotate(-10deg); }
  10%  { opacity: 1; }
  80%  { opacity: .9; }
  100% { opacity: 0;   transform: translateY(-110vh) scale(1.2) rotate(20deg); }
}

/* ── canvas unique pour tous les effets ── */
#fx-canvas {
  position: fixed; inset: 0; z-index: 98;
  pointer-events: none;
}

/* ── flash blanc initial ── */
#flash {
  position: fixed; inset: 0; z-index: 200;
  background: white;
  opacity: 0;
  pointer-events: none;
}

/* ── shake ── */
@keyframes shake {
  0%        { transform: translate(0,0) rotate(0); }
  10%       { transform: translate(-8px, -6px) rotate(-.5deg); }
  20%       { transform: translate(8px,  6px) rotate(.5deg); }
  30%       { transform: translate(-10px, 4px) rotate(-.4deg); }
  40%       { transform: translate(10px, -4px) rotate(.4deg); }
  50%       { transform: translate(-6px,  8px) rotate(-.3deg); }
  60%       { transform: translate(6px,  -8px) rotate(.3deg); }
  70%       { transform: translate(-4px,  4px) rotate(-.2deg); }
  80%       { transform: translate(4px,  -4px) rotate(.2deg); }
  90%       { transform: translate(-2px,  2px) rotate(0); }
  100%      { transform: translate(0,0) rotate(0); }
}
body.shake { animation: shake .6s cubic-bezier(.36,.07,.19,.97) both; }
