/* ==========================================================================
   Composants — halos, chargeur, cartes, frise, timeline et formulaire RSVP
   ========================================================================== */

/* HALOS DE LUMIÈRE DYNAMIQUES */
.light-orb-container { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.light-orb {
  position: absolute; border-radius: 50%; filter: blur(65px); opacity: 0.85;
  will-change: transform; transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
}
.orb-1 {
  width: 650px; height: 650px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(245, 235, 255, 0.6) 40%, rgba(155, 99, 199, 0) 70%);
  top: -8%; left: -5%;
}
.orb-2 {
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(140, 185, 245, 0.65) 0%, rgba(214, 230, 251, 0.3) 50%, rgba(123, 169, 230, 0) 75%);
  top: 28%; right: -10%;
}
.orb-3 {
  width: 620px; height: 680px;
  background: radial-gradient(circle, rgba(205, 165, 240, 0.6) 0%, rgba(155, 99, 199, 0.25) 50%, rgba(191, 147, 228, 0) 70%);
  bottom: 15%; left: 5%;
}
.orb-4 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(255, 250, 245, 0.9) 0%, rgba(220, 235, 252, 0.5) 45%, rgba(231, 211, 248, 0) 70%);
  bottom: -5%; right: 10%;
}

/* ÉCRAN DE CHARGEMENT */
#loader {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; min-height: 100vh;
  background: var(--bg-main); display: flex; flex-direction: column; justify-content: center; align-items: center;
  z-index: 9998; transition: opacity 0.6s ease, visibility 0.6s;
}
#loader.is-hidden { opacity: 0; visibility: hidden; }
#loader .monogram-small { font-size: 3.5rem; margin-bottom: 10px; }
.loader-ring {
  width: 75px; height: 75px; border: 2px solid rgba(191, 147, 228, 0.2);
  border-top: 2px solid var(--accent-blue); border-right: 2px solid var(--accent-lilas);
  border-bottom: 2px solid var(--accent-sky); border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; margin-bottom: 30px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loader-text {
  font-family: var(--font-serif); font-size: 1.1rem; letter-spacing: 5px;
  color: var(--accent-blue); text-transform: uppercase; animation: pulse 2s ease-in-out infinite; text-align: center;
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* CARTES */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(130%); -webkit-backdrop-filter: blur(24px) saturate(130%);
  padding: 40px; border-radius: 28px; box-shadow: var(--glass-shadow); border: 1px solid var(--glass-border);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(30, 43, 82, 0.08), 0 0 30px rgba(123, 169, 230, 0.3);
  border-color: rgba(123, 169, 230, 0.6);
}
.card-title { color: var(--accent-blue); font-family: var(--font-serif); font-size: 2rem; margin-bottom: 12px; line-height: 1.2; font-weight: 400; text-align: center; }
.card-img-fit {
  display: block; width: 100%; height: auto; border-radius: 18px; margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(123, 169, 230, 0.12); transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.card-img-fit:hover { transform: scale(1.03); }

.card-body { display: flex; flex-direction: column; flex-grow: 1; }
.card-actions { margin-top: auto; padding-top: 25px; display: flex; gap: 12px; flex-wrap: wrap; }
.card-actions .btn { flex: 1; }

.card-address { color: var(--accent-lilas); font-weight: 600; font-size: 0.95rem; text-align: center; margin-bottom: 15px; }
.card-text { color: var(--text-muted); font-size: 0.95rem; line-height: 1.8; }
.card-text--centered { text-align: center; line-height: 1.6; }
.card-list { color: var(--text-muted); font-size: 0.9rem; margin-top: 15px; line-height: 1.8; text-align: left; padding-left: 20px; }

/* Cartes « mises en avant » (liste de mariage, photographe) */
.card--highlight { text-align: center; }
.card--highlight .card-body { align-items: center; }
.card--highlight .card-actions { justify-content: center; }
.card--highlight .card-text { margin-bottom: 20px; }
.card--highlight .card-icon { margin-bottom: 15px; }
.card--parme { border: 2px solid var(--accent-parme); box-shadow: 0 15px 35px rgba(191, 147, 228, 0.2); }
.card--parme .card-icon { filter: drop-shadow(0 4px 6px rgba(191, 147, 228, 0.3)); }
.card--sky { border: 2px solid var(--accent-sky); box-shadow: 0 15px 35px rgba(123, 169, 230, 0.2); }
.card--sky .card-icon { filter: drop-shadow(0 4px 6px rgba(123, 169, 230, 0.3)); }

/* NOTRE HISTOIRE : FRISE EN VAGUE */
#histoire { overflow-x: hidden; }

.story-tracks-container {
  position: relative; display: flex; flex-direction: row; flex-wrap: wrap;
  align-items: center; justify-content: center; gap: 30px;
  margin-top: 40px; min-height: 40vh; padding: 5vh 0;
}
.story-track { position: relative; display: flex; justify-content: center; z-index: 2; }
.story-circle {
  width: 240px; height: 240px; border-radius: 50%;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  box-shadow: 0 30px 60px rgba(30, 43, 82, 0.08), inset 0 0 20px rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 25px; position: relative; z-index: 2; will-change: transform, opacity;
}

/* Halo délicat qui vibre derrière le cercle */
.story-circle::before {
  content: ''; position: absolute; inset: -20px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(123, 169, 230, 0.6), rgba(155, 99, 199, 0.4), rgba(191, 147, 228, 0.5));
  z-index: -1; opacity: 0; filter: blur(20px);
  animation: pulseStory 3s ease-in-out infinite alternate; transition: opacity 0.5s;
}
.story-circle.is-centered::before { opacity: 0.9; }
@keyframes pulseStory {
  0% { transform: scale(0.95); opacity: 0.6; }
  100% { transform: scale(1.05); opacity: 1; }
}

.story-date { font-family: var(--font-serif); font-size: 1.8rem; color: var(--accent-lilas); line-height: 1.1; font-style: italic; margin-bottom: 8px; }
.story-title { font-family: var(--font-sans); font-size: 1.05rem; color: var(--accent-blue); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
.story-sub { color: var(--text-muted); font-size: 0.8rem; margin-top: 8px; line-height: 1.4; }

/* LE PROGRAMME : TIMELINE ART NOUVEAU */
.timeline-art-nouveau { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline-art-nouveau::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent-lilas), var(--accent-parme), var(--accent-sky), transparent);
  transform: translateX(-50%);
}
.an-item { position: relative; width: 50%; margin-bottom: 60px; }
.an-item:last-child { margin-bottom: 0; }
.an-item:nth-child(odd) { left: 0; text-align: right; padding-right: 50px; }
.an-item:nth-child(even) { left: 50%; text-align: left; padding-left: 50px; }

.an-node {
  position: absolute; top: 50%; transform: translateY(-50%) rotate(45deg);
  width: 20px; height: 20px; background: linear-gradient(135deg, var(--accent-sky), var(--accent-lilas));
  border: 3px solid var(--white); box-shadow: 0 0 15px rgba(155, 99, 199, 0.6);
  border-radius: 50% 0 50% 0; z-index: 3;
}
.an-item:nth-child(odd) .an-node { right: -10px; }
.an-item:nth-child(even) .an-node { left: -10px; }

.an-content {
  background: var(--glass-bg); padding: 25px 35px; border-radius: 20px;
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  display: inline-block; max-width: 100%; text-align: center; position: relative;
}
.an-content::after {
  content: ''; position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px;
  border: 1px solid rgba(191, 147, 228, 0.3); border-radius: 16px; pointer-events: none;
}

.an-time { font-family: var(--font-serif); font-size: 2rem; color: var(--accent-lilas); line-height: 1.2; font-style: italic; }
.an-desc { color: var(--accent-blue); font-size: 1.1rem; font-weight: 500; margin-top: 5px; }
.an-subdesc { color: var(--text-muted); font-size: 0.9rem; margin-top: 8px; line-height: 1.4; }

/* FORMULAIRE RSVP EN CASCADE */
.rsvp-form-container { text-align: center; max-width: 750px; margin: 0 auto; }
.rsvp-step { display: none; margin-bottom: 30px; animation: fadeIn 0.5s ease forwards; }
.rsvp-step.is-active { display: block; }
.rsvp-question { color: var(--accent-blue); font-size: 1.3rem; }
.rsvp-step-title { color: var(--accent-blue); font-size: 1.3rem; margin-bottom: 20px; }
.rsvp-step-intro { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.rsvp-fields { display: grid; gap: 15px; text-align: left; }
.rsvp-fields .btn { margin-top: 15px; width: 100%; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Confirmation affichée une fois la réponse enregistrée, à la place des étapes. */
.rsvp-done { animation: fadeIn 0.5s ease forwards; }
.rsvp-done .btn { margin-top: 10px; width: auto; }

.radio-group { display: flex; gap: 20px; margin-top: 15px; justify-content: center; }
.radio-label {
  display: block; min-width: 130px; padding: 15px 25px; border: 1px solid rgba(191, 147, 228, 0.35); border-radius: 12px;
  text-align: center; cursor: pointer; transition: all 0.3s; background: #FFFFFF;
  font-weight: 500; font-size: 0.95rem; color: var(--accent-blue);
}
.radio-label:hover { border-color: var(--accent-sky); background: #FFFFFF; }
.radio-input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-input:checked + .radio-label {
  background: linear-gradient(135deg, var(--accent-sky-light), var(--white));
  border-color: var(--accent-blue); box-shadow: 0 5px 15px rgba(123, 169, 230, 0.2);
}
.radio-input:focus-visible + .radio-label { box-shadow: 0 0 0 4px rgba(123, 169, 230, 0.25); }

/* RÉVÉLATION AU DÉFILEMENT */
.reveal {
  opacity: 0; transform: translateY(50px);
  transition: opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1), transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  .card { padding: 35px 25px; }
  .card-title { font-size: 1.8rem; }
  .card-actions { flex-direction: column; width: 100%; }
  .card-actions .btn { width: 100%; }

  .radio-group { flex-direction: column; gap: 10px; align-items: stretch; }
  .radio-label { min-width: auto; }

  /* Timeline Art Nouveau sur une seule colonne */
  .timeline-art-nouveau::before { left: 20px; transform: none; }
  .an-item { width: 100%; left: 0; text-align: left; padding-left: 60px; padding-right: 0; }
  .an-item:nth-child(odd), .an-item:nth-child(even) { left: 0; text-align: left; padding-left: 60px; padding-right: 0; }
  .an-item:nth-child(odd) .an-node, .an-item:nth-child(even) .an-node { left: 10px; right: auto; }
  .an-content { text-align: left; }

  /* Cercles de la frise en grille 2x2 */
  .story-tracks-container { gap: 15px; }
  .story-circle { width: 160px; height: 160px; padding: 15px; margin: 0; }
  .story-date { font-size: 1.2rem; margin-bottom: 5px; }
  .story-title { font-size: 0.8rem; letter-spacing: 1px; }
  .story-sub { font-size: 0.7rem; margin-top: 3px; line-height: 1.2; }
}
