/* ══════════════════════════════════════════════════════════════
   JOYEUX ANNIVERSAIRE MME SARIOU ESTEVE - GÉRANTE DIGIWEB SARL
   Alternance de sections claires et sombres, pleine de vie
   Palette  : turquoise #2CC5DB · perle #F7F8FA · or #D4AF37
   Polices  : Fraunces (titres) + Outfit (texte)
   ══════════════════════════════════════════════════════════════ */

:root {
  /* Les deux couleurs de sa tenue */
  --turquoise: #2cc5db;
  --pearl: #f7f8fa;
  /* Déclinaisons */
  --turquoise-soft: #7edce9;
  --teal-deep: #0b6b7e;
  --ink: #10333d;
  --ink-soft: #48626c;
  /* Sections sombres */
  --night: #052330;
  --night-2: #06303f;
  /* L'or de ses bijoux */
  --gold: #d4af37;
  --gold-soft: #f0dfa4;
  --gold-deep: #a16207;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;

  --radius: 22px;
  --shadow-soft: 0 18px 50px rgba(11, 107, 126, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--pearl);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 780px;
}

/* ─── Canvas confettis ─────────────────────────────────────── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ─── Étincelles dorées (étoiles à 4 branches) ─────────────── */
.spark {
  position: absolute;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  clip-path: polygon(
    50% 0%,
    62% 38%,
    100% 50%,
    62% 62%,
    50% 100%,
    38% 62%,
    0% 50%,
    38% 38%
  );
  animation: twinkle 3.2s ease-in-out infinite;
  pointer-events: none;
}

.spark--1 {
  top: 16%;
  left: 46%;
  animation-delay: 0s;
}
.spark--2 {
  top: 64%;
  left: 6%;
  width: 14px;
  height: 14px;
  animation-delay: 1.1s;
}
.spark--3 {
  top: 24%;
  right: 7%;
  width: 17px;
  height: 17px;
  animation-delay: 2s;
}
.spark--4 {
  top: 22%;
  left: 12%;
  animation-delay: 0.6s;
}
.spark--5 {
  bottom: 20%;
  right: 10%;
  width: 15px;
  height: 15px;
  animation-delay: 1.7s;
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(0.55) rotate(0deg);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.15) rotate(24deg);
    opacity: 1;
  }
}

/* ══════════════════════════════════════════════════════════════
   HERO - CLAIR ET VIVANT
   ══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse 60% 55% at 78% 82%,
      rgba(44, 197, 219, 0.22),
      transparent 70%
    ),
    radial-gradient(
      ellipse 45% 40% at 10% 12%,
      rgba(212, 175, 55, 0.14),
      transparent 70%
    ),
    linear-gradient(160deg, #ffffff 0%, var(--pearl) 55%, #dff4f8 100%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(14px);
}

.hero__glow--turquoise {
  width: 620px;
  height: 620px;
  top: -220px;
  left: -180px;
  background: radial-gradient(
    circle,
    rgba(44, 197, 219, 0.28),
    transparent 65%
  );
  animation: glowDrift 10s var(--ease) infinite alternate;
}

.hero__glow--gold {
  width: 480px;
  height: 480px;
  bottom: -160px;
  right: -140px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.25),
    transparent 65%
  );
  animation: glowDrift 12s var(--ease) infinite alternate-reverse;
}

@keyframes glowDrift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(52px, 36px) scale(1.12);
  }
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 20px;
}

.hero__date {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--teal-deep);
  background: rgba(44, 197, 219, 0.13);
  border: 1px solid rgba(44, 197, 219, 0.4);
  padding: 9px 18px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.hero__date i {
  color: var(--gold-deep);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.9vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-wrap: break-word;
}

.hero__name {
  display: block;
  margin-top: 10px;
  font-size: 0.94em;
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(
    92deg,
    var(--teal-deep) 5%,
    var(--turquoise) 50%,
    var(--gold) 105%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.12em;
}

.hero__lead {
  margin-top: 24px;
  max-width: 46ch;
  font-size: 1.12rem;
  font-weight: 300;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero__signature {
  margin-top: 26px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold-deep);
}

/* - Boutons - */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease),
    background 0.22s var(--ease);
}

.btn:focus-visible,
.wishes__btn:focus-visible,
.floating__btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(120deg, var(--turquoise), var(--teal-deep));
  box-shadow: 0 12px 30px rgba(44, 197, 219, 0.38);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(44, 197, 219, 0.5);
}

.btn--outline {
  color: var(--teal-deep);
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(11, 107, 126, 0.35);
}

.btn--outline:hover {
  transform: translateY(-3px);
  background: #fff;
  border-color: var(--turquoise);
}

/* - Portrait : une card moderne, avec une seconde carte en biais - */
.hero__portrait {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0 70px;
}

.photo-card {
  position: relative;
  width: min(400px, 84vw);
  border-radius: 30px;
  background: linear-gradient(
    165deg,
    var(--turquoise-soft) 0%,
    var(--turquoise) 45%,
    var(--teal-deep) 100%
  );
  box-shadow: 0 30px 70px rgba(5, 35, 48, 0.3);
}

/* Seconde carte décalée derrière, teinte or */
.photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold));
  transform: rotate(-5deg) translate(-14px, 12px);
  z-index: -1;
}

/* Reflet doux en haut de la card */
.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.26),
    transparent 48%
  );
  pointer-events: none;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  object-position: top center;
  border-radius: 30px;
}

/* ══════════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════════ */
section {
  position: relative;
  padding: 110px 0;
}

.section--dark {
  background:
    radial-gradient(
      ellipse 55% 60% at 85% 10%,
      rgba(44, 197, 219, 0.14),
      transparent 70%
    ),
    radial-gradient(
      ellipse 45% 50% at 8% 90%,
      rgba(212, 175, 55, 0.1),
      transparent 70%
    ),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%);
  overflow: hidden;
}

.eyebrow {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-align: center;
  margin-bottom: 18px;
}

.eyebrow--gold {
  color: var(--gold);
}

/* ─── Hommage (sombre) ─────────────────────────────────────── */
.tribute__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

.tribute__glow--1 {
  width: 460px;
  height: 460px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(44, 197, 219, 0.2), transparent 65%);
}

.tribute__glow--2 {
  width: 380px;
  height: 380px;
  bottom: -140px;
  left: -100px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.16),
    transparent 65%
  );
}

.tribute__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.22;
  text-align: center;
  color: var(--pearl);
  margin-bottom: 42px;
}

.tribute__title em {
  font-style: italic;
  color: var(--turquoise-soft);
}

.tribute__body p {
  font-size: 1.14rem;
  font-weight: 300;
  color: rgba(247, 248, 250, 0.82);
  margin-bottom: 26px;
  text-align: center;
}

.tribute__body p strong {
  font-weight: 600;
  color: var(--gold-soft);
}

/* ─── Vœux (clair) ─────────────────────────────────────────── */
.wishes {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    var(--pearl) 60%,
    #e2f4f8 100%
  );
}

.wishes__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  text-align: center;
  color: var(--ink);
}

.wishes__title em {
  font-style: italic;
  color: var(--teal-deep);
}

.wishes__sub {
  text-align: center;
  font-weight: 300;
  color: var(--ink-soft);
  margin: 14px auto 48px;
  max-width: 52ch;
}

/* - Mur de petits mots : notes épinglées, pêle-mêle - */
.wishes__wall {
  columns: 3 300px;
  column-gap: 22px;
  position: relative;
}

.wishes__wall.collapsed {
  max-height: 920px;
  overflow: hidden;
}

/* Fondu en bas quand le mur est replié */
.wishes__wall.collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, #e2f4f8);
  pointer-events: none;
}

.wish-note {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 22px;
  padding: 34px 24px 20px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(11, 107, 126, 0.12);
  break-inside: avoid;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

/* Rotations légères, alternées, comme épinglées à la main */
.wish-note:nth-child(4n + 1) {
  transform: rotate(-1.3deg);
}
.wish-note:nth-child(4n + 2) {
  transform: rotate(1.1deg);
  background: #f0fbfd;
}
.wish-note:nth-child(4n + 3) {
  transform: rotate(-0.7deg);
  background: #fdf9ec;
}
.wish-note:nth-child(4n) {
  transform: rotate(1.5deg);
}

.wish-note:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 18px 40px rgba(11, 107, 126, 0.2);
  z-index: 2;
}

/* Le ruban adhésif en haut de chaque note */
.wish-note::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 86px;
  height: 24px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(44, 197, 219, 0.32);
  border-left: 1px dashed rgba(255, 255, 255, 0.8);
  border-right: 1px dashed rgba(255, 255, 255, 0.8);
}

.wish-note:nth-child(3n)::before {
  background: rgba(212, 175, 55, 0.32);
  transform: translateX(-50%) rotate(2deg);
}

.wish-note__text {
  font-weight: 300;
  font-size: 0.97rem;
  color: var(--ink-soft);
  white-space: pre-line;
}

.wish-note__author {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(11, 107, 126, 0.2);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--teal-deep);
}

.wish-note__author span {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gold-deep);
  margin-left: 6px;
}

.wishes__more {
  text-align: center;
  margin-top: 34px;
}

/* ─── Souvenirs · Galerie « Il y a un an déjà » (sombre) ───── */
.memories__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(22px);
  pointer-events: none;
}

.memories__glow--1 {
  width: 420px;
  height: 420px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(44, 197, 219, 0.18), transparent 65%);
}

.memories__glow--2 {
  width: 400px;
  height: 400px;
  bottom: -150px;
  right: -120px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.16), transparent 65%);
}

.spark--6 {
  top: 14%;
  right: 12%;
  width: 16px;
  height: 16px;
  animation-delay: 1.3s;
}

.memories__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.14;
  text-align: center;
  color: var(--pearl);
}

.memories__title em {
  font-style: italic;
  color: var(--gold);
}

.memories__sub {
  text-align: center;
  font-weight: 300;
  color: rgba(247, 248, 250, 0.72);
  margin: 16px auto 54px;
  max-width: 50ch;
}

/* Grille éditoriale asymétrique : une photo maîtresse + deux à droite */
.memories__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-auto-rows: 1fr;
  gap: 24px;
}

.memory {
  position: relative;
  margin: 0;
  border-radius: 30px 30px 30px 8px;
  overflow: hidden;
  /* Cadre en dégradé, la photo s'y fond sans bord dur */
  background: linear-gradient(150deg, var(--turquoise), var(--teal-deep));
  padding: 4px;
  box-shadow: 0 26px 60px rgba(2, 18, 26, 0.55);
  transition:
    transform 0.5s var(--ease),
    box-shadow 0.5s var(--ease);
}

/* Chaque photo légèrement inclinée, comme posée à la main */
.memory:nth-child(1) {
  transform: rotate(-1.2deg);
}
.memory:nth-child(2) {
  transform: rotate(1.4deg);
  background: linear-gradient(150deg, var(--gold-soft), var(--gold-deep));
  border-radius: 30px 30px 8px 30px;
}
.memory:nth-child(3) {
  transform: rotate(-1deg);
}

.memory--feature {
  grid-row: span 2;
}

.memory img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 27px 27px 27px 6px;
  transition: transform 0.7s var(--ease);
}

.memory:not(.memory--feature) img {
  aspect-ratio: 16 / 11;
}

.memory--feature img {
  min-height: 100%;
}

/* Voile dégradé + légende qui se fond dans le bas de la photo */
.memory__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 22px 20px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--pearl);
  background: linear-gradient(
    180deg,
    transparent,
    rgba(4, 22, 30, 0.82) 78%
  );
  border-radius: 0 0 27px 6px;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease);
  pointer-events: none;
}

.memory:hover,
.memory:focus-within {
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 34px 74px rgba(2, 18, 26, 0.7);
}

.memory:hover img,
.memory:focus-within img {
  transform: scale(1.06);
}

.memory:hover .memory__cap,
.memory:focus-within .memory__cap {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Citation finale (sombre) ─────────────────────────────── */
.quote {
  text-align: center;
}

.quote__mark {
  font-size: 2.2rem;
  color: var(--gold);
  margin-bottom: 24px;
}

.quote__text {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.35;
  color: var(--pearl);
}

.quote__text span {
  color: var(--gold);
  font-weight: 600;
}

.quote__author {
  margin-top: 30px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(247, 248, 250, 0.7);
}

/* ─── Footer (sombre, dans la continuité) ──────────────────── */
.footer {
  text-align: center;
  padding: 54px 24px;
  background: #041b25;
}

.footer__wish {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--pearl);
}

.footer__wish strong {
  color: var(--turquoise-soft);
}

.footer__copy {
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 300;
  color: rgba(247, 248, 250, 0.55);
}

.footer__copy i {
  color: #e05c7a;
}

/* ─── Boutons flottants ────────────────────────────────────── */
.floating {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 300;
}

.floating__btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--turquoise), var(--teal-deep));
  box-shadow: 0 12px 30px rgba(11, 107, 126, 0.35);
  transition:
    transform 0.2s var(--ease),
    opacity 0.3s var(--ease),
    background 0.3s var(--ease);
}

.floating__btn:hover {
  transform: translateY(-3px) scale(1.05);
}

.floating__btn.playing {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
  0%,
  100% {
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4);
  }
  50% {
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.75);
  }
}

.floating__btn--top {
  opacity: 0;
  pointer-events: none;
}

.floating__btn--top.show {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Reveal au scroll ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.reveal.vis {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Accessibilité : mouvement réduit ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero {
    align-items: stretch;
    min-height: auto;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 56px;
    text-align: center;
  }

  /* La photo d'abord sur mobile, le texte ensuite */
  .hero__portrait {
    order: -1;
    margin-bottom: 20px;
    padding: 16px 0 30px;
  }

  .photo-card {
    width: min(320px, 78vw);
  }

  .hero__content {
    padding-bottom: 64px;
  }

  .hero__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .spark--1 {
    top: 8%;
    left: 12%;
  }
}

@media (max-width: 768px) {
  section {
    padding: 76px 0;
  }

  .wishes__wall.collapsed {
    max-height: 1080px;
  }

  /* La galerie passe en une seule colonne, la photo maîtresse en tête */
  .memories__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .memory--feature {
    grid-row: auto;
  }

  .memory--feature img {
    aspect-ratio: 4 / 3;
  }

  /* Sur mobile, la légende reste visible (pas de survol) */
  .memory__cap {
    opacity: 1;
    transform: none;
  }
}

/* Badge de date : quand le texte passe sur deux lignes,
   la capsule devient une carte arrondie propre */
@media (max-width: 560px) {
  .hero__date {
    max-width: 100%;
    align-items: flex-start;
    text-align: left;
    line-height: 1.45;
    border-radius: 16px;
    padding: 10px 16px;
  }

  .hero__date i {
    margin-top: 3px;
  }
}

@media (max-width: 420px) {
  .hero__date {
    font-size: 0.8rem;
    padding: 9px 13px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .floating__btn {
    width: 48px;
    height: 48px;
  }
}
