/* Lille : enveloppe à rabats + ruban noué (accueil), héros animé (2e page) */

/* ---------- Accueil : l'enveloppe ---------- */
.lille-accueil {
  position: fixed;
  inset: 0;
  z-index: 50;
  cursor: pointer;
  overflow: hidden;
  background: #f6f1e7;
  transition: background-color 0.6s ease 0.7s;
}
.lille-accueil.lille-ouvre { background-color: transparent; cursor: default; }

/* fond flou/crème qui remplit les côtés sur grand écran */
.lille-flou {
  position: absolute;
  inset: -60px;
  background-color: #f6f1e7;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(1.05);
  opacity: 0.3;
  transition: opacity 0.8s ease 0.8s;
}
.lille-ouvre .lille-flou { opacity: 0; }

.lille-env {
  position: absolute;
  inset: 0;
  perspective: 1600px;
}
@media (min-aspect-ratio: 4/5) {
  .lille-env {
    left: 50%;
    right: auto;
    width: 56.25vh;
    transform: translateX(-50%);
  }
}

/* les 4 rabats : la même image, découpée en triangles */
.lille-rabat {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.lille-rabat-g { clip-path: polygon(0 0, 50% 50%, 0 100%); transform-origin: 0 50%; }
.lille-rabat-d { clip-path: polygon(100% 0, 50% 50%, 100% 100%); transform-origin: 100% 50%; }
.lille-rabat-b { clip-path: polygon(0 100%, 50% 47%, 100% 100%); }
.lille-rabat-h { clip-path: polygon(0 0, 100% 0, 50% 55%); }
.lille-ombre {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.lille-ombre-b { filter: drop-shadow(0 -3px 6px rgba(70, 45, 25, 0.38)); transform-origin: 50% 100%; }
.lille-ombre-h { filter: drop-shadow(0 5px 9px rgba(70, 45, 25, 0.45)); transform-origin: 50% 0; }
.lille-ombre .lille-rabat { position: absolute; }

/* ruban vertical */
.lille-bande {
  position: absolute;
  left: 50%;
  width: 12%;
  margin-left: -6%;
  background-image: url(/assets/bande-lille.webp);
  background-size: 100% auto;
  background-repeat: repeat-y;
  filter: brightness(1.1) drop-shadow(0 2px 3px rgba(60, 40, 25, 0.3));
}
.lille-bande-haut { top: -2%; height: 52%; background-position: center bottom; }
.lille-bande-bas { top: 50%; height: 52%; background-position: center top; }

/* le nœud : son centre (24 % de la hauteur de l'image) tombe au milieu de l'écran */
.lille-noeud {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80%;
  max-width: none;
  transform: translate(-50%, -24%);
  transform-origin: 50% 24%;
  filter: drop-shadow(0 6px 10px rgba(60, 40, 25, 0.35));
  animation: lille-noeud-vit 3.2s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}
@keyframes lille-noeud-vit {
  0%, 100% { transform: translate(-50%, -24%) scale(1) rotate(0deg); }
  50% { transform: translate(-50%, -24%) scale(1.025) rotate(-0.6deg); }
}

/* bouton « Ouvrir l'invitation » : sur le nœud */
.lille-bouton {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(201, 123, 84, 0.45);
  color: #5b4a3f;
  font-family: 'Antic Didone', serif;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(80, 50, 30, 0.22);
  pointer-events: none;
  user-select: none;
  animation: lille-appel 2.6s ease-in-out infinite;
}
@keyframes lille-appel {
  0%, 100% { box-shadow: 0 8px 30px rgba(80, 50, 30, 0.22), 0 0 0 0 rgba(255, 252, 246, 0.6); }
  50% { box-shadow: 0 8px 30px rgba(80, 50, 30, 0.22), 0 0 0 14px rgba(255, 252, 246, 0); }
}

/* ---------- Ouverture ---------- */
.lille-ouvre .lille-bouton { animation: lille-fondu 0.35s ease forwards; }
.lille-ouvre .lille-noeud { animation: lille-denoue 0.9s cubic-bezier(0.5, 0, 0.75, 0.4) forwards; }
.lille-ouvre .lille-bande-haut { animation: lille-bande-monte 0.9s cubic-bezier(0.6, 0, 0.8, 0.3) 0.3s forwards; }
.lille-ouvre .lille-bande-bas { animation: lille-bande-tombe 0.9s cubic-bezier(0.6, 0, 0.8, 0.3) 0.3s forwards; }
.lille-ouvre .lille-ombre-h { animation: lille-ouvre-haut 1.1s cubic-bezier(0.45, 0, 0.3, 1) 0.75s forwards; }
.lille-ouvre .lille-rabat-g { animation: lille-ouvre-gauche 1.1s cubic-bezier(0.45, 0, 0.3, 1) 1.05s forwards; }
.lille-ouvre .lille-rabat-d { animation: lille-ouvre-droite 1.1s cubic-bezier(0.45, 0, 0.3, 1) 1.05s forwards; }
.lille-ouvre .lille-ombre-b { animation: lille-ouvre-bas 1.1s cubic-bezier(0.45, 0, 0.3, 1) 1.2s forwards; }

@keyframes lille-fondu { to { opacity: 0; } }
@keyframes lille-denoue {
  0% { transform: translate(-50%, -24%) scale(1) rotate(0deg); opacity: 1; }
  25% { transform: translate(-50%, -24%) scale(1.1, 0.94) rotate(-4deg); opacity: 1; }
  100% { transform: translate(-50%, 30%) scale(0.75, 0.55) rotate(14deg); opacity: 0; }
}
@keyframes lille-bande-monte { to { transform: translateY(-105%); opacity: 0.6; } }
@keyframes lille-bande-tombe { to { transform: translateY(105%); opacity: 0.6; } }
@keyframes lille-ouvre-haut {
  0% { transform: rotateX(0deg); }
  100% { transform: rotateX(-180deg); }
}
@keyframes lille-ouvre-bas {
  0% { transform: rotateX(0deg); opacity: 1; }
  100% { transform: rotateX(180deg); opacity: 0; }
}
@keyframes lille-ouvre-gauche {
  0% { transform: rotateY(0deg); opacity: 1; }
  100% { transform: rotateY(160deg); opacity: 0; }
}
@keyframes lille-ouvre-droite {
  0% { transform: rotateY(0deg); opacity: 1; }
  100% { transform: rotateY(-160deg); opacity: 0; }
}

/* ---------- Héros (2e page) ---------- */
.lille-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* écran en largeur : on montre le tableau entier, les côtés sont flous */
@media (min-aspect-ratio: 4/5) {
  .lille-hero-video { object-fit: contain; }
}

.lille-hero-texte {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 16px 96px;
  pointer-events: none;
  transition: opacity 1.8s ease-out;
}
.lille-carte {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(94vw, 54vh, 600px);
  padding: clamp(40px, 7vh, 70px) clamp(18px, min(5vw, 2.35vh), 44px);
  /* voile crème, net au centre et fondu sur les bords : le cadre fleuri reste visible */
  background: radial-gradient(ellipse farthest-side at 50% 50%, rgba(252, 248, 240, 0.9) 0%, rgba(252, 248, 240, 0.84) 72%, rgba(252, 248, 240, 0.4) 90%, rgba(252, 248, 240, 0) 100%);
  text-shadow: 0 0 6px rgba(252, 248, 240, 0.95), 0 0 18px rgba(252, 248, 240, 0.9), 0 0 34px rgba(252, 248, 240, 0.75);
}
.lille-noms {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: 400;
  font-size: clamp(40px, min(14vw, 6.58vh), 100px);
  line-height: 0.95;
  margin: 0 0 clamp(14px, 2.2vh, 24px);
}
.lille-et {
  font-style: italic;
  font-size: 0.5em;
  line-height: 1;
  margin: 6px 0;
}
.lille-invite {
  font-size: clamp(12.5px, min(3.5vw, 1.65vh), 17px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.6;
  max-width: 330px;
  margin: 0;
}
.lille-date {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: clamp(16px, 3vh, 30px) 0 clamp(10px, 2vh, 18px);
}
.lille-date-mot {
  font-size: clamp(14px, min(3.9vw, 1.83vh), 19px);
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  text-transform: uppercase;
  opacity: 0.88;
}
.lille-date-jour {
  font-size: clamp(48px, min(18vw, 8.46vh), 112px);
  line-height: 1;
  margin: 2px 0 4px;
}
.lille-date-annee {
  font-size: clamp(13px, min(3.6vw, 1.69vh), 17px);
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  margin-top: 6px;
  opacity: 0.85;
}
.lille-brin {
  position: absolute;
  top: 50%;
  width: clamp(46px, min(12vw, 5.64vh), 64px);
  max-width: none;
  pointer-events: none;
  user-select: none;
}
.lille-brin-g { left: clamp(-100px, calc(-1 * min(22vw, 10.34vh)), -76px); transform: translateY(-50%) rotate(-105deg); }
.lille-brin-d { right: clamp(-100px, calc(-1 * min(22vw, 10.34vh)), -76px); transform: translateY(-50%) scaleX(-1) rotate(105deg); }
.lille-bord {
  font-size: clamp(12.5px, min(3.4vw, 1.6vh), 16px);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 0;
}
.lille-lieu {
  font-size: clamp(24px, min(8.4vw, 3.95vh), 48px);
  line-height: 1.15;
  margin: 6px 0 0;
}
.lille-ville {
  font-size: clamp(13px, min(3.6vw, 1.69vh), 17px);
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  text-transform: uppercase;
  margin: 8px 0 0;
}

/* texte plus foncé et plus épais (la police n'existe qu'en un seul poids : on l'épaissit d'un trait) */
.lille-carte { color: #39401a; }
.lille-carte .lille-noms, .lille-carte .lille-date-jour, .lille-carte .lille-lieu {
  -webkit-text-stroke: 0.03em currentColor;
}
.lille-carte .lille-invite, .lille-carte .lille-date-mot, .lille-carte .lille-date-annee,
.lille-carte .lille-bord, .lille-carte .lille-ville {
  -webkit-text-stroke: 0.6px currentColor;
  opacity: 1;
}
.lille-invite { white-space: nowrap; max-width: none; }

/* ---------- La Célébration : aquarelles de Lille ---------- */
.lille-celeb-haut {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  max-width: none;
  width: 104vw;
  margin-top: -265px;
}
@media (min-width: 768px) {
  .lille-celeb-haut { width: min(92vw, 1000px); margin-top: -360px; }
}

/* RSVP : mention sur les enfants */
.lille-note-enfants {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.55;
  font-style: italic;
  color: hsl(var(--foreground) / 0.75);
}

/* RSVP : petite carte d'invitation (image de l'accueil) */
.lille-rsvp-img {
  border-radius: 999px 999px 14px 14px / 160px 160px 14px 14px;
  box-shadow: 0 14px 34px rgba(90, 55, 30, 0.22);
  border: 1px solid rgba(201, 123, 84, 0.35);
}

/* ---------- Dernière page : scène du soir animée ---------- */
.lille-pied { padding: 0 14px; }
.lille-pied-cadre {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 810 / 1208;
}
.lille-pied-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply; /* le blanc du papier se fond dans le crème de la page */
}
.lille-pied-texte {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 14.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff7ea;
  text-shadow: 0 0 10px rgba(20, 30, 70, 0.85), 0 0 24px rgba(20, 30, 70, 0.6);
}
.lille-pied-nom {
  font-size: clamp(30px, 8.6vw, 50px);
  line-height: 1;
  white-space: nowrap;
  -webkit-text-stroke: 0.02em currentColor;
}
.lille-pied-et {
  font-style: italic;
  font-size: clamp(17px, 4.6vw, 26px);
  line-height: 1;
  margin: 4px 0;
}
.lille-pied-date {
  margin-top: 12px;
  font-size: clamp(13px, 3.6vw, 17px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
