/* Des petits bisous — styles */

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

html, body { height: 100%; }

body {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(170deg, #fff0f5 0%, #ffd6e4 55%, #ffb8cf 100%);
  color: #7a1037;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 20px;
}

/* ---------- Petits cœurs qui montent en fond ---------- */
#coeurs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.coeur {
  position: absolute;
  bottom: -40px;
  color: #ff6b9a;
  line-height: 1;
  animation: monte linear forwards;
  will-change: transform, opacity;
}
@keyframes monte {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: var(--o); }
  50%  { transform: translate(var(--dx), -55vh) rotate(var(--r)); }
  90%  { opacity: var(--o); }
  100% { transform: translate(0, -112vh) rotate(0deg); opacity: 0; }
}

/* ---------- Vidéo au centre ---------- */
.cadre {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 10px 10px 12px;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(166, 30, 77, 0.25), 0 0 0 6px rgba(255, 255, 255, 0.5);
  transform: rotate(-1.5deg);
}
.cadre.smack { animation: smack 0.35s ease-out; }
@keyframes smack {
  0%   { transform: rotate(-1.5deg) scale(1); }
  30%  { transform: rotate(1deg) scale(1.04); }
  60%  { transform: rotate(-2.5deg) scale(0.98); }
  100% { transform: rotate(-1.5deg) scale(1); }
}
video {
  display: block;
  height: min(58vh, 520px);
  aspect-ratio: 478 / 850;
  object-fit: cover;
  border-radius: 14px;
  background: #ffe3ec;
}
#son {
  position: absolute;
  right: 18px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
#son:focus-visible { outline: 3px solid #d6336c; outline-offset: 2px; }

/* ---------- Bouton bisous ---------- */
#bisous {
  position: relative;
  z-index: 1;
  font: inherit;
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  color: #fff;
  background: #d6336c;
  border: none;
  border-radius: 999px;
  padding: 0.7em 2.2em;
  cursor: pointer;
  box-shadow: 0 7px 0 #a61e4d, 0 12px 24px rgba(166, 30, 77, 0.3);
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
#bisous:hover { background: #e64980; }
#bisous:active { transform: translateY(5px); box-shadow: 0 2px 0 #a61e4d, 0 6px 12px rgba(166, 30, 77, 0.3); }
#bisous:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* ---------- Marques de bisous (lèvres) ---------- */
.marque {
  position: fixed;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--r)) scale(1.35);
  animation: apparait 5.5s ease-out forwards;
  filter: drop-shadow(0 2px 2px rgba(122, 16, 55, 0.18));
}
@keyframes apparait {
  0%   { opacity: 0;    transform: translate(-50%, -50%) rotate(var(--r)) scale(1.35); }
  8%   { opacity: 0.95; transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
  70%  { opacity: 0.9;  transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
  100% { opacity: 0;    transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
}

footer {
  position: fixed;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.55;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .coeur { display: none; }
  .cadre.smack { animation: none; }
}
