:root {
  --cream: #fee9c4;
  --yellow: #ffd75d;
  --orange: #f76909;
  --pink: #d92f5f;
  --darkred: #94042a;
  --green: #8e9973;
  --coral: #f5977a;
  --ink: #3a2320;
  --muted: #5a3f3b;
  --white: #fff;
  --field-border: #e7cfa4;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 750px at 12% -2%, rgba(217,47,95,.65), transparent 58%),
    radial-gradient(1100px 800px at 92% 4%, rgba(247,105,9,.60), transparent 58%),
    radial-gradient(1300px 950px at 50% 16%, rgba(255,215,93,.65), transparent 60%);
}

@media (max-width: 760px) {
  body::before {
    background:
      radial-gradient(900px 700px at 50% -2%, rgba(217,47,95,.45), transparent 62%),
      radial-gradient(900px 800px at 100% 10%, rgba(247,105,9,.34), transparent 60%),
      radial-gradient(1000px 900px at 50% 24%, rgba(255,215,93,.42), transparent 60%);
  }
}

section {
  position: relative;
  padding: clamp(72px, 10vw, 120px) 6vw;
}

:root {
  --font-primary: 'DM Sans', sans-serif;
  --font-title: Fredoka, sans-serif;
  --font-alt: Caveat, cursive;
  --section-title-size: clamp(36px, 5.2vw, 68px);
}

/* Shared typography */
:is(.invite h2, .theme-sec h2, .form-sec .big, .count-sec h2, .timeline-sec h2) {
  font-family: var(--font-title);
  font-size: var(--section-title-size);
  font-weight: 700;
  line-height: 1.1;
}

/* Apparition au chargement (hero) — version plus lente */
.hero-content .names,
.hero-content .save-date,
.hero-content .hero-date,
.hero-content .hero-tag {
  opacity: 0;
  animation: heroReveal 1.4s ease forwards;
}
.hero-content .names     { animation-delay: .3s; }
.hero-content .save-date { animation-delay: 1.2s; }
.hero-content .hero-date { animation-delay: 1.6s; }
.hero-content .hero-tag  { animation-delay: 2s; }

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

@keyframes barReveal {
  to { transform: scaleX(1); }
}

/* Hero */
.hero {
  display: flex;
  min-height: 82vh;
  align-items: center;
  justify-content: center;
  overflow: visible;
  text-align: center;
  position: relative;
  padding-top: 110px;
  padding-bottom: 80px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-dots {
  display: none;
}

.hero-dots i {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  animation: sunsetFloat 12s ease-in-out infinite;
}

.hero-dots i:nth-child(1) {
  width: 650px;
  height: 650px;
  background: var(--pink);

  top: -250px;
  left: -250px;

  opacity: .35;
}

.hero-dots i:nth-child(2) {
  width: 800px;
  height: 800px;
  background: var(--orange);

  right: -350px;
  top: 120px;

  opacity: .28;

  animation-delay: -4s;
}

.hero-dots i:nth-child(3) {
  width: 1100px;
  height: 1100px;
  background: var(--yellow);

  bottom: -650px;
  left: 50%;

  transform: translateX(-50%);

  opacity: .25;

  animation-delay: -8s;
}

.hero-dots i:nth-child(n+4) {
  display: none;
}

@keyframes sunsetFloat {
  0%,100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-20px) scale(1.08);
  }
}

.names {
  color: var(--darkred);
  font-family: Anton, sans-serif;
  font-size: clamp(58px, 11vw, 132px);
  line-height: .88;
  letter-spacing: .02em;
  text-transform: uppercase;
  position: relative;
  left: 0px;
  text-shadow:
    -1px -1px rgba(254,233,196,.9),
     1px  1px rgba(254,233,196,.9),
     0 4px 10px rgba(148,4,42,.12);
}

.names::after {
  content: '';
  display: block;
  width: clamp(90px, 12vw, 150px);
  height: 5px;
  margin: 22px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  transform: scaleX(0);
  transform-origin: center;
  animation: barReveal 1.2s ease forwards .9s;
}

.names .amp { margin: 0 .12em; color: var(--orange); }
.names .thomas { color: var(--darkred); }

.photo-stack {
  position: relative;
  width: min(420px, 80vw);
  height: min(290px, 54vw);
  margin: 30px auto 26px;
}

.photo-stack img {
  position: absolute;
  width: 46%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 4px solid var(--white);
  background: var(--white);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
}

.photo-stack img:nth-child(1) { left: 6%; top: 0; transform: rotate(-8deg); z-index: 1; }
.photo-stack img:nth-child(2) { left: 30%; top: 8%; transform: rotate(5deg); z-index: 3; }
.photo-stack img:nth-child(3) { left: 52%; top: 18%; transform: rotate(-4deg); z-index: 2; }

.save-date {
  color: var(--orange);
  font-family: Anton, sans-serif;
  font-size: clamp(22px, 4vw, 40px);
  letter-spacing: 6px;
  text-transform: uppercase;
  text-shadow: -1px -1px var(--cream), 1px 1px var(--cream);
}

.hero-date {
  color: var(--darkred);
  font-family: Caveat, cursive;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
}

.hero-tag {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  transform: rotate(-2deg);
  box-shadow: 0 6px 16px rgba(217, 47, 95, .35);
}

/* Invitation */
.invite,
.timeline-sec,
.theme-sec,
.form-sec,
.count-sec {
  text-align: center;
}

.invite {
  position: relative;
  z-index: 2;
}

.invite-inner {
  max-width: 760px;
  margin: auto;
}

.invite h2 {
  margin-bottom: 30px;
  color: var(--pink);
  line-height: 1;
}

.invite p,
.theme-sec p,
.form-sec .sub,
.tl-item,
.tl-year,
.tl-title {
  font-family: var(--font-primary);
}

.invite p {
  max-width: 730px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: clamp(18px, 2.5vw, 23px);
  line-height: 1.8;
}

.sign,
.subtitle,
.hero-date,
footer {
  font-family: var(--font-alt);
}

.invite .sign {
  margin-top: 22px;
  color: var(--darkred);
  font-family: var(--font-alt);
  font-size: clamp(26px, 4.5vw, 38px);
  line-height: 1.2;
}

/* Timeline : même style de titre que le countdown */
.timeline-sec h2 {
  color: var(--darkred);
  font-size: clamp(44px, 8vw, 86px);
  font-weight: 700;
  margin-bottom: 12px;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: auto;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  border-radius: 2px;
  background: var(--coral);
  content: '';
  transform: translateX(-50%);
}

.tl-item {
  display: flex;
  position: relative;
  flex-direction: column;
  width: 50%;
  margin-bottom: 24px;
  padding: 22px 40px;
}

.tl-item:nth-child(odd) {
  left: 0;
  align-items: flex-end;
  text-align: right;
}

.tl-item:nth-child(even) {
  left: 50%;
  align-items: flex-start;
  text-align: left;
}

.tl-item::after {
  position: absolute;
  top: 34px;
  width: 20px;
  height: 20px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px var(--coral);
  content: '';
}

.tl-item:nth-child(odd)::after { right: -10px; }
.tl-item:nth-child(even)::after { left: -10px; }

.tl-year {
  color: var(--muted);
  font-family: var(--font-title);
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 700;
  line-height: 1;
}

.tl-title {
  margin: 8px 0 12px;
  color: var(--muted);
  font-family: var(--font-primary);
  font-size: clamp(18px, 2.3vw, 23px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.8;
}

:is(.tl-item > img, .tl-photo-stack img) {
  width: 190px;
  height: 190px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}

.tl-photo-stack {
  position: relative;
  width: 210px;
  height: 210px;
}

.tl-photo-stack img {
  position: absolute;
  transform-origin: 50% 120%;
  transition: transform .25s ease, z-index .1s linear .25s;
}

.tl-photo-stack img:nth-child(1) { left: 10px; top: 0; transform: rotate(0deg); z-index: 3; }
.tl-photo-stack img:nth-child(2) { left: 26px; top: 6px; transform: rotate(12deg); z-index: 2; }
.tl-photo-stack img:nth-child(3) { left: -6px; top: 6px; transform: rotate(-12deg); z-index: 1; }

@media (hover: hover) and (pointer: fine), (hover: none) and (pointer: coarse) {
  .tl-photo-stack:hover img:nth-child(1),
  .tl-photo-stack.is-open img:nth-child(1) { transform: rotate(0deg); z-index: 3; }
  .tl-photo-stack:hover img:nth-child(2),
  .tl-photo-stack.is-open img:nth-child(2) { transform: rotate(28deg) translateX(90px); z-index: 2; }
  .tl-photo-stack:hover img:nth-child(3),
  .tl-photo-stack.is-open img:nth-child(3) { transform: rotate(-28deg) translateX(-90px); z-index: 1; }
}

.final-mark {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--white);
  font-size: 55px;
  line-height: 100px;
  text-align: center;
}

/* Theme and palette */
.theme-sec {
  background: var(--darkred);
  color: var(--cream);
}

.theme-sec h2 {
  margin-bottom: 16px;
  color: var(--yellow);
}

.theme-sec p,
.form-sec .sub {
  max-width: 640px;
  margin-right: auto;
  margin-left: auto;
  font-size: 18px;
  line-height: 1.7;
}

.theme-sec p { margin-bottom: 56px; }

.palette {
  display: flex;
  max-width: 1000px;
  gap: 16px;
  justify-content: center;
  overflow-x: auto;
  margin: auto;
  padding: 14px 4px 16px;
}


.swatch {
  flex: 0 0 145px;
  cursor: pointer;
  transition: transform .25s;
}

.swatch:hover { transform: translateY(-14px); }

.chip {
  display: block;
  width: 100%;
  height: 120px;
  margin-bottom: 12px;
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
  transition: box-shadow .25s;
}

.swatch:hover .chip { box-shadow: 0 20px 32px rgba(0, 0, 0, .4); }
.swatch span:last-child { font-size: 14px; font-weight: 600; letter-spacing: .5px; }

.c1 { background: var(--cream); }
.c2 { background: var(--yellow); }
.c3 { background: var(--orange); }
.c4 { background: var(--pink); }
.c5 { background: var(--darkred); }
.c6 { background: var(--green); }

/* Formulaire adresse */
.form-sec .big {
  margin-bottom: 18px;
  color: var(--pink);
}

.form-sec .sub {
  margin-bottom: 46px;
  color: var(--muted);
}

.adresse-form {
  display: grid;
  max-width: 640px;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: auto;
  text-align: left;
}

:is(.adresse-form .full, .btn, .form-message) { grid-column: 1 / -1; }

.adresse-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--darkred);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.adresse-form :is(input, select, textarea) {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--field-border);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.adresse-form :is(input, select, textarea):focus {
  border-color: var(--orange);
  outline: 0;
}

.btn {
  justify-self: center;
  padding: 16px 44px;
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: var(--white);
  cursor: pointer;
  font: 600 15px 'DM Sans', sans-serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: transform .15s, background .2s;
}

.btn:hover { background: var(--pink); transform: translateY(-2px); }

.form-message {
  margin-top: 8px;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
}

.form-message.success { background: #dcebd4; color: #285c32; }
.form-message.error { background: #ffe0dc; color: #8d1d16; }

/* Countdown and footer */
.count-sec {
  position: relative;
  background: repeating-linear-gradient(180deg, var(--white) 0 26px, var(--coral) 26px 52px);
}

.count-sec::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  background: var(--coral);
  pointer-events: none;
}

.count-card {
  max-width: 900px;
  margin: auto;
  padding: 56px clamp(20px, 5vw, 60px);
  border-radius: 28px;
  background: var(--cream);
  box-shadow: 0 20px 60px rgba(148, 4, 42, .2);
}

.count-sec h2 {
  margin-bottom: 12px;
  color: var(--darkred);
}

.subtitle {
  margin-bottom: 50px;
  color: var(--orange);
  font-size: 36px;
}

.countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
}

.count-actions {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.cd-box {
  min-width: 120px;
  padding: 24px 10px;
  border-radius: 16px;
  background: var(--darkred);
  color: var(--yellow);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.cd-num {
  display: block;
  font-family: Anton, sans-serif;
  font-size: clamp(40px, 7vw, 66px);
  line-height: 1;
}

.cd-label {
  display: block;
  margin-top: 8px;
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

footer {
  padding: 48px 6vw;
  background: var(--darkred);
  color: var(--cream);
  font-size: 32px;
  text-align: center;
}

/* Carousel */
.carousel {
  position: relative;
  left: 50%;
  width: 100%;
  margin: 30px 0 26px;
  overflow: hidden;
  transform: translateX(-50%);
}

.carousel::before,
.carousel::after {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 8vw;
  height: 100%;
  pointer-events: none;
  content: '';
}

.carousel::before { left: 0; background: linear-gradient(90deg, var(--cream), transparent); }
.carousel::after { right: 0; background: linear-gradient(270deg, var(--cream), transparent); }

.carousel-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: carousel-scroll 28s linear infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.carousel-track img {
  flex: 0 0 clamp(300px, 40vw, 620px);
  height: clamp(200px, 28vw, 380px);
  margin-right: 18px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 4px solid var(--white);
  background: var(--cream);
  box-shadow:
    0 12px 30px rgba(0,0,0,.18),
    0 0 30px rgba(255,215,93,.12);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.carousel-status {
  width: 100%;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

@keyframes carousel-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.divider {
  display: block;
  position: relative;
  z-index: 5;
  width: 100%;
  margin: -2px 0 -1px;
  line-height: 0;
  height: 90px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.divider--cream-darkred {
  background-image: url('images/svg/divider-cream-darkred.svg');
}

.divider--darkred-cream {
  background-image: url('images/svg/divider-darkred-cream.svg');
}

.divider--cream-coral {
  background-image: url('images/svg/divider-cream-coral.svg');
}

.divider--coral-cream {
  background-image: url('images/svg/divider-coral-cream.svg');
}

@media (max-width: 700px) {
  .divider {
    height: 55px;
  }
}

/* Responsive */
@media (max-width: 760px) {
  section { padding: 78px 6vw; }
  .names { font-size: clamp(52px, 14vw, 100px); }
  .hero-content { padding: 0 6vw; }
  .carousel-track img {
  flex: 0 0 clamp(300px, 40vw, 620px);
  height: clamp(240px, 32vw, 460px);
  }
  .adresse-form { grid-template-columns: 1fr; }
  :is(.adresse-form .full, .btn, .form-message) { grid-column: auto; }
  .timeline::before { left: 18px; }
  .tl-item,
  .tl-item:nth-child(even),
  .tl-item:nth-child(odd) {
    left: 0;
    width: 100%;
    align-items: flex-start;
    padding-right: 8px;
    padding-left: 50px;
    text-align: left;
  }
  .tl-item:nth-child(even)::after,
  .tl-item:nth-child(odd)::after { right: auto; left: 8px; }
  .palette { justify-content: flex-start; }
  .cd-box { min-width: 105px; }
  .subtitle { font-size: 30px; }
}

@media (max-width: 700px) {
  .divider svg { height: 55px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-dots i,
  .carousel-track { animation: none; }
  .tl-photo-stack img,
  .swatch,
  .chip,
  .btn { transition: none; }
}

/* Timeline : même style de titre que le countdown */
.timeline-sec h2 {
  color: var(--darkred);
  font-size: clamp(44px, 8vw, 86px);
  font-weight: 700;
  margin-bottom: 12px;
}

/* Timeline : descriptions sous les puces = police principale ; dates = police principale, plus grosses et en gras */
.timeline .tl-title {
  color: var(--muted);
  font-family: var(--font-primary);
  font-size: clamp(18px, 2.3vw, 23px);
  line-height: 1.8;
  margin: 8px 0 12px;
  letter-spacing: normal;
}

.tl-year {
  color: var(--darkred);
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

/* Site toolbar */
.site-toolbar {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 10px 3vw;
  background: rgba(254, 233, 196, .55);
  border-bottom: 1px solid rgba(148,4,42,.08);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  gap: 16px;
}

.toolbar-brand {
  flex: 0 0 auto;
  color: var(--darkred);
  font-family: Caveat, cursive;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.toolbar-nav {
  display: flex;
  gap: clamp(10px, 2vw, 28px);
  align-items: center;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: nowrap;
  justify-content: flex-end;
  padding-right: 4px;
  margin-left: 24px;
}

.toolbar-nav::-webkit-scrollbar {
  display: none;
}

/* track used by toolbar.js when animating via transform */
.toolbar-track {
  display: inline-flex;
  align-items: center;
  gap: inherit;
  white-space: nowrap;
  transition: transform 0.02s linear;
  will-change: transform;
}

.toolbar-nav a {
  flex: 0 0 auto;
  color: var(--darkred);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .4px;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, transform .2s ease;
}

.toolbar-nav a:hover,
.toolbar-nav a:focus-visible {
  color: var(--pink);
  transform: translateY(-1px);
}

.toolbar-nav a:focus-visible,
.toolbar-brand:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

:is(#invite-title, #story-title, #theme-title, #adresse-form-title, #count-title, #attendance-info-title) {
  scroll-margin-top: 82px;
}

@media (max-width: 750px) {
  .site-toolbar {
    padding: 10px 4vw;
    gap: 12px;
  }

  .toolbar-brand {
    font-size: 24px;
  }

  .toolbar-nav {
    gap: 16px;
    justify-content: flex-start;
  }

  .toolbar-nav a {
    font-size: 12px;
  }
}