/* ═══════════════════════════════════════════
   DAN & MERIEM — WEDDING INVITATION
   ═══════════════════════════════════════════ */

:root {
  --primary: #1a5276;
  --primary-light: #2471a3;
  --primary-dark: #0e3a56;
  --secondary: #f0f6fa;
  --accent: #c4a35a;
  --text: #0c2340;
  --text-light: #6b8299;
  --bg: #f8fbfd;
  --white: #ffffff;
  --font-display: 'Playfair Display', serif;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'Cormorant Garamond', serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

.script-font {
  font-family: var(--font-script);
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 110px 0;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 500;
  text-align: center;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 16px auto 0;
}

.section-subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 50px;
}

.hidden {
  display: none !important;
}

/* ═══════════ BUTTONS ═══════════ */

.btn {
  display: inline-block;
  padding: 15px 40px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.35s ease;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(26, 82, 118, 0.2);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26, 82, 118, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 82, 118, 0.2);
}

/* ═══════════ INTRO OVERLAY ═══════════ */

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  transition: opacity 1s ease, visibility 1s ease;
}

.intro-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.poster-phase {
  position: absolute;
  inset: 0;
  cursor: pointer;
  overflow: hidden;
}

.poster-phase.hidden {
  display: none;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.poster-phase:hover .poster-img {
  transform: scale(1.02);
}

.poster-hint {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.poster-hint span {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  padding: 12px 32px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: hintPulse 2.5s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.video-phase {
  position: absolute;
  inset: 0;
  background: #000;
  display: none;
}

.video-phase.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.envelope-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ═══════════ HERO ═══════════ */

.main-hidden {
  display: none;
}

.main-visible {
  display: block;
  animation: fadeInUp 1.2s ease forwards;
}

.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
}

.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 35, 64, 0.3) 0%,
    rgba(12, 35, 64, 0.5) 40%,
    rgba(12, 35, 64, 0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 20px;
  max-width: 700px;
}

.hero-save-the-date {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 20px;
}

.hero-names {
  font-size: 5rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-names .amp {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.5rem;
  display: inline-block;
  margin: 0 16px;
  opacity: 0.7;
  vertical-align: middle;
  color: var(--accent);
}

.hero-divider {
  margin-bottom: 24px;
  opacity: 0.6;
}

.hero-date-place {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.hero-venue {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 300;
  opacity: 0.75;
  letter-spacing: 0.08em;
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-indicator span {
  display: block;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 13px;
  position: relative;
}

.scroll-indicator span::after {
  content: '';
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.2; transform: translateX(-50%) translateY(16px); }
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(196,163,90,0.05) 50%, transparent 60%);
  background-size: 200% 200%;
  animation: shimmer 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

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

/* ═══════════ COUNTDOWN ═══════════ */

.countdown-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 70px 0;
}

.countdown-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.countdown-unit {
  text-align: center;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 600;
  color: var(--white);
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  backdrop-filter: blur(4px);
}

.countdown-number.tick {
  animation: countTick 0.35s ease;
}

@keyframes countTick {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.countdown-label {
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
}

.countdown-separator {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--accent);
  padding-bottom: 36px;
  opacity: 0.6;
}

/* ═══════════ PROGRAMME DU JOUR ═══════════ */

.program-section {
  background: var(--secondary);
}

.timeline {
  position: relative;
  margin-top: 50px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  border-radius: 1px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 44px;
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-time {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  width: 52px;
  text-align: right;
  padding-top: 3px;
  flex-shrink: 0;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(196, 163, 90, 0.15);
  z-index: 1;
  flex-shrink: 0;
  margin: 5px 18px 0 18px;
}

.timeline-content {
  flex: 1;
  background: var(--white);
  padding: 20px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(26, 82, 118, 0.06);
  border: 1px solid rgba(26, 82, 118, 0.04);
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ═══════════ RSVP ═══════════ */

.rsvp-section {
  background: linear-gradient(160deg, var(--secondary) 0%, #e4eef5 100%);
}

.rsvp-form {
  max-width: 540px;
  margin: 0 auto;
  background: var(--white);
  padding: 48px 40px;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(26, 82, 118, 0.08);
  border: 1px solid rgba(26, 82, 118, 0.04);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label:not(.radio-label) {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid rgba(26, 82, 118, 0.12);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1.08rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 82, 118, 0.08);
  background: var(--white);
}

.radio-group {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 1.05rem;
  color: var(--text);
  padding: 14px 20px;
  border-radius: 10px;
  border: 1.5px solid rgba(26, 82, 118, 0.1);
  transition: all 0.3s ease;
  flex: 1;
  justify-content: center;
}

.radio-label:hover {
  border-color: var(--primary);
  background: rgba(26, 82, 118, 0.03);
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(26, 82, 118, 0.25);
  position: relative;
  transition: border-color 0.3s ease;
  flex-shrink: 0;
}

.radio-label input[type="radio"]:checked ~ .radio-custom {
  border-color: var(--primary);
}

.radio-label input[type="radio"]:checked ~ .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.radio-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(26, 82, 118, 0.04);
}

.rsvp-form .btn {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
}

.rsvp-success {
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
  background: var(--white);
  padding: 60px 40px;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(26, 82, 118, 0.08);
}

.success-icon {
  margin-bottom: 24px;
}

.rsvp-success h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.rsvp-success p {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ═══════════ CADEAUX ═══════════ */

.gifts-section {
  background: var(--secondary);
}

.gift-card {
  max-width: 580px;
  margin: 50px auto 0;
  text-align: center;
  background: var(--white);
  border-radius: 20px;
  padding: 52px 44px;
  box-shadow: 0 12px 40px rgba(26, 82, 118, 0.06);
  border: 1px solid rgba(26, 82, 118, 0.04);
}

.gift-icon {
  margin-bottom: 24px;
}

.gift-message {
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.9;
  font-style: italic;
}

/* ═══════════ LIEU ═══════════ */

.location-section {
  background: var(--white);
}

.venue-card {
  text-align: center;
  background: var(--bg);
  border: 1px solid rgba(26, 82, 118, 0.06);
  border-radius: 16px;
  padding: 40px 32px;
  margin-top: 50px;
  margin-bottom: 28px;
}

.venue-pin {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(196, 163, 90, 0.1);
  border-radius: 50%;
}

.venue-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.venue-address {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

.map-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(26, 82, 118, 0.1);
  border: 1px solid rgba(26, 82, 118, 0.06);
}

.map-wrap iframe {
  display: block;
}

.map-link-wrap {
  text-align: center;
  margin-top: 28px;
}

.map-link-btn {
  font-size: 1rem;
}

/* ═══════════ FOOTER ═══════════ */

.footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  text-align: center;
  padding: 70px 20px;
}

.footer-flower {
  margin-bottom: 24px;
  opacity: 0.4;
}

.footer-names {
  font-family: var(--font-script);
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.footer-date {
  font-family: var(--font-body);
  font-size: 1.05rem;
  opacity: 0.6;
  letter-spacing: 0.12em;
}

/* ═══════════ MUSIC TOGGLE ═══════════ */

.music-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(26, 82, 118, 0.3);
  transition: transform 0.3s ease, background 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.music-toggle.visible {
  opacity: 1;
  pointer-events: auto;
  animation: fadeInUp 0.5s ease;
}

.music-toggle:hover {
  transform: scale(1.1);
  background: var(--primary-light);
}

.music-toggle.playing {
  animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(26, 82, 118, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(26, 82, 118, 0.3), 0 0 0 8px rgba(26, 82, 118, 0.1); }
}

/* ═══════════ ANIMATIONS ═══════════ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 768px) {
  .hero-names {
    font-size: 3.2rem;
  }

  .hero-names .amp {
    font-size: 1.8rem;
    margin: 0 10px;
  }

  .section-title {
    font-size: 2rem;
  }

  .section {
    padding: 80px 0;
  }

  .countdown-number {
    width: 80px;
    height: 84px;
    font-size: 2.4rem;
    border-radius: 10px;
  }

  .countdown-separator {
    font-size: 2rem;
    padding-bottom: 28px;
  }

  .countdown-clock {
    gap: 8px;
  }

  .radio-group {
    flex-direction: column;
    gap: 10px;
  }

  .rsvp-form {
    padding: 36px 24px;
  }

  .gift-card {
    padding: 36px 24px;
  }

  .poster-hint {
    bottom: 40px;
  }

  .poster-hint span {
    font-size: 0.85rem;
    padding: 10px 24px;
  }
}

@media (max-width: 480px) {
  .hero-names {
    font-size: 2.5rem;
  }

  .hero-names .amp {
    font-size: 1.4rem;
    margin: 0 8px;
  }

  .countdown-clock {
    gap: 6px;
  }

  .countdown-number {
    width: 64px;
    height: 68px;
    font-size: 1.9rem;
    border-radius: 8px;
  }

  .countdown-separator {
    font-size: 1.6rem;
    padding-bottom: 24px;
  }

  .countdown-label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }

  .timeline::before {
    left: 48px;
  }

  .timeline-time {
    width: 40px;
    font-size: 0.85rem;
  }

  .timeline-dot {
    width: 14px;
    height: 14px;
    margin: 5px 12px 0 12px;
  }

  .timeline-content {
    padding: 16px 18px;
  }
}
