/* =====================================================================
 *  Naomi & Daniel — 13 décembre 2026
 *  Feuille de style de l'application invités
 *  Palette et mesures reprises du handoff design (pixel-perfect).
 * ===================================================================== */

:root {
  /* Verts */
  --green:        #4f7058;
  --green-dark:   #35513f;
  --ink:          #2b3f33;
  --green-tint:   #e3ede2;
  --green-tint-h: #d6e4d4;
  /* Fonds */
  --page:         #e9ece4;
  --surface:      #fdfefb;
  --app-bg:       #f4f6f2;
  /* Sable */
  --sand:         #ead9c2;
  --sand-h:       #e2cfb2;
  --sand-text:    #6d4f2c;
  --sand-2:       #8a6a44;
  --sand-accent:  #b98a63;
  /* Rouille */
  --rust-bg:      #f0e3de;
  --rust-text:    #8a4a3a;
  /* Gris-verts */
  --gv-1:         #4c6155;
  --gv-2:         #4c6552;
  --gv-3:         #6d7f72;
  --gv-4:         #8fa093;
  --gv-5:         #97a59a;
  /* Ombres */
  --sh-card:      0 2px 10px rgba(53, 81, 63, .07);
  --sh-menu:      0 8px 24px rgba(43, 63, 51, .22);
  --sh-splash:    0 6px 20px rgba(0, 0, 0, .25);
  /* Typo */
  --serif:  'The Seasons', 'Cormorant Garamond', 'Frank Ruhl Libre', serif;
  --script: 'Great Vibes', cursive;
  --sans:   'Assistant', system-ui, -apple-system, sans-serif;
}

* { -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--page);
  font-family: var(--sans);
  color: var(--ink);
  overflow: hidden;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #bcd6bd; }

a { color: var(--green); }
a:hover { color: var(--green-dark); }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

input, textarea { font: inherit; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pop {
  0%   { transform: scale(.5); opacity: 0; }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------------------------------------------------------------------
 *  Fond plein écran (visible autour de la colonne sur grand écran)
 * ------------------------------------------------------------------- */
.pagebg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.pagebg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.95);
}
.pagebg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(31, 48, 37, .34), rgba(31, 48, 37, .5));
  backdrop-filter: blur(6px);
}

/* ---------------------------------------------------------------------
 *  Colonne application
 * ------------------------------------------------------------------- */
.frame {
  position: relative;
  z-index: 1;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--app-bg);
  font-family: var(--sans);
  color: var(--ink);
}

.app__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.app__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.95);
}
.app__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(245, 247, 243, .85),
    rgba(245, 247, 243, .5) 42%,
    rgba(245, 247, 243, .78));
}

@media (min-width: 560px) and (min-height: 620px) {
  .frame { padding: 24px 0; box-sizing: border-box; }
  .app {
    height: 100%;
    border-radius: 34px;
    box-shadow: 0 24px 70px rgba(31, 48, 37, .45);
  }
}

/* ---------------------------------------------------------------------
 *  Splash
 * ------------------------------------------------------------------- */
.splash {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  animation: fadeUp .5s ease both;
}
.splash[hidden] { display: none; }
.splash img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.95);
}
.splash__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(31, 48, 37, .78),
    rgba(31, 48, 37, .22) 42%,
    rgba(31, 48, 37, .06));
}
.splash__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 28px 30px calc(48px + env(safe-area-inset-bottom));
  color: #fff;
}
.splash__mono {
  font-size: 11px;
  letter-spacing: 5px;
  opacity: .85;
  margin-bottom: 10px;
}
.splash__names {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 1px;
  color: #ece7e1;
  margin: 0;
}
.splash__rule {
  width: 46px;
  height: 1px;
  background: rgba(255, 255, 255, .55);
  margin: 16px 0;
}
.splash__date {
  font-size: 14px;
  letter-spacing: 2.5px;
  font-weight: 600;
  margin-bottom: 22px;
  color: #ece7e1;
}
.splash__greeting {
  font-style: italic;
  font-size: 20px;
  margin-bottom: 6px;
  color: #ece7e1;
}
.splash__text {
  font-size: 14px;
  opacity: .88;
  line-height: 1.5;
  max-width: 280px;
  margin-bottom: 26px;
  color: #ece7e1;
}
.splash__cta {
  background: #ece7e1;
  color: var(--ink);
  border-radius: 999px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--sh-splash);
  transition: background .18s ease;
}
.splash__cta:hover { background: #fff; }

.splash .lang { position: absolute; top: 18px; inset-inline-end: 16px; z-index: 2; }
.splash .lang__btn {
  background: rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-size: 13px;
  padding: 7px 16px;
}
.splash .lang__btn:hover { background: rgba(255, 255, 255, .35); }

/* ---------------------------------------------------------------------
 *  Sélecteur de langue
 * ------------------------------------------------------------------- */
.lang { position: relative; display: flex; flex-direction: column; align-items: flex-end; }
.lang__btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(43, 63, 51, .22);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  background: rgba(253, 254, 251, .6);
  min-height: 32px;
  transition: background .18s ease;
}
.lang__btn:hover { background: var(--green-tint); }
/* La pastille garde sa taille de maquette ; la zone tactile, elle, fait 46 px. */
.lang__btn::before { content: ''; position: absolute; inset: -7px -6px; }
.lang__chev { transition: transform .2s ease; }
.lang__btn[aria-expanded="true"] .lang__chev { transform: rotate(180deg); }
.lang__menu {
  position: absolute;
  top: 100%;
  margin-top: 4px;
  inset-inline-end: 0;
  z-index: 40;
  background: rgba(253, 254, 251, .97);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 6px;
  box-shadow: var(--sh-menu);
  min-width: 140px;
  animation: fadeUp .18s ease both;
}
.lang__menu[hidden] { display: none; }
.splash .lang__menu { box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.lang__opt {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  min-height: 40px;
  box-sizing: border-box;
}
.lang__opt:hover { background: var(--green-tint); }
.lang__opt[aria-current="true"] { font-weight: 800; }
.lang__opt svg { opacity: 0; flex-shrink: 0; }
.lang__opt[aria-current="true"] svg { opacity: 1; }

/* ---------------------------------------------------------------------
 *  En-tête
 * ------------------------------------------------------------------- */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(16px + env(safe-area-inset-top)) 20px 12px;
  position: relative;
  z-index: 3;
}
.hdr__names {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
}

/* ---------------------------------------------------------------------
 *  Zone défilante
 * ------------------------------------------------------------------- */
.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  position: relative;
  z-index: 1;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.screen[hidden] { display: none; }

/* ------------------------------ Accueil ----------------------------- */
.home {
  padding: 6px 20px 24px;
  animation: fadeUp .4s ease both;
  position: relative;
}
.chip-days {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-dark);
  box-shadow: 0 2px 10px rgba(53, 81, 63, .15);
  background-color: rgba(253, 254, 251, .72);
}
.home__gap { height: 170px; }
.home__wedding {
  position: absolute;
  inset-inline: 20px;
  top: 75px;
  height: 117px;
  text-align: center;
  font-family: var(--script);
  font-size: 60px;
  line-height: 1;
  color: var(--green-dark);
  pointer-events: none;
}
.home__greeting {
  font-family: var(--serif);
  font-style: italic;
  font-size: 27px;
  font-weight: 500;
  margin: 20px 0 6px;
}
.home__intro {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--gv-1);
  margin-bottom: 18px;
}

.card-info {
  backdrop-filter: blur(8px);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--sh-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
  background-color: rgba(255, 253, 247, .24);
}
.card-info__big { font-size: 24px; font-weight: 700; line-height: 1.2; }
.card-info__sub { font-size: 12.5px; color: var(--gv-3); }
.card-info__rule { height: 1px; background: rgba(43, 63, 51, .08); }

.btn-waze {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 13px;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  min-height: 46px;
  box-sizing: border-box;
  transition: background .18s ease;
}
.btn-waze:hover { background: var(--green-dark); color: #fff; }

.navcard {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(8px);
  border-radius: 22px;
  padding: 16px 18px;
  margin-bottom: 10px;
  text-align: start;
  box-sizing: border-box;
  transition: background .18s ease;
}
.navcard:last-of-type { margin-bottom: 0; }
.navcard__body { flex: 1; min-width: 0; }
.navcard__title { font-size: 15px; font-weight: 700; }
.navcard__sub { font-size: 12.5px; }
.navcard--green { background: rgba(227, 237, 226, .85); }
.navcard--green:hover { background: var(--green-tint-h); }
.navcard--green .navcard__title { color: var(--green-dark); }
.navcard--green .navcard__sub { color: var(--gv-2); }
.navcard--sand { background: rgba(234, 217, 194, .85); }
.navcard--sand:hover { background: var(--sand-h); }
.navcard--sand .navcard__title { color: var(--sand-text); }
.navcard--sand .navcard__sub { color: var(--sand-2); }

[dir="rtl"] .chev { transform: scaleX(-1); }

/* ------------------------- Panneaux Programme / RSVP ---------------- */
.panel {
  margin: 6px 14px 26px;
  padding: 20px 18px 24px;
  background: rgba(245, 247, 243, .86);
  backdrop-filter: blur(10px);
  border-radius: 26px;
  animation: fadeUp .4s ease both;
}
.panel__title {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.1;
}

/* ----------------------------- Programme ---------------------------- */
.tl { display: flex; gap: 14px; }
.tl__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 14px;
  flex-shrink: 0;
}
.tl__dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--green);
  margin-top: 5px;
  flex-shrink: 0;
}
.tl__line { width: 2px; flex: 1; background: rgba(85, 119, 94, .22); }
.tl__body { padding-bottom: 26px; flex: 1; min-width: 0; }
.tl__when { font-size: 16px; font-weight: 800; color: var(--green); margin-bottom: 2px; }
.tl__title { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.15; }
.tl__place {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--gv-3);
  margin-top: 3px;
}
.tl__note { font-size: 13px; font-style: italic; color: var(--gv-4); margin-top: 4px; }
.tl__foot {
  font-size: 12.5px;
  font-style: italic;
  color: var(--gv-4);
  border-top: 1px solid rgba(43, 63, 51, .08);
  padding-top: 14px;
}

/* -------------------------------- RSVP ------------------------------ */
.rsvp__deadline { font-size: 13px; color: var(--sand-2); font-weight: 600; margin-bottom: 20px; }
.field-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--gv-3);
  margin-bottom: 6px;
}
.names-row { display: flex; gap: 10px; margin-bottom: 18px; }
.input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  background: var(--surface);
  border: 1.5px solid rgba(43, 63, 51, .2);
  border-radius: 16px;
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  min-height: 48px;
  transition: border-color .15s ease;
}
.input:focus-visible { border-color: var(--green); }
.input--error { border-color: var(--sand-accent); }

.choices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.choice {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 15px 16px;
  box-sizing: border-box;
  text-align: start;
  background: var(--surface);
  border: 2px solid rgba(43, 63, 51, .14);
  transition: border-color .15s ease, background .15s ease;
}
.choice__radio {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.choice__dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--green);
  opacity: 0;
  transition: opacity .15s ease;
}
.choice__label { font-size: 15.5px; font-weight: 700; color: var(--green-dark); }
.choice--yes:hover { border-color: var(--green); }
.choice--yes[aria-checked="true"] { background: var(--green-tint); border-color: var(--green); }
.choice--yes[aria-checked="true"] .choice__dot { opacity: 1; }
.choice--no .choice__radio { border-color: var(--sand-accent); }
.choice--no .choice__dot { background: var(--sand-accent); }
.choice--no .choice__label { color: var(--sand-text); }
.choice--no:hover { border-color: var(--sand-accent); }
.choice--no[aria-checked="true"] { background: #f3e6dc; border-color: var(--sand-accent); }
.choice--no[aria-checked="true"] .choice__dot { opacity: 1; }

.block {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(53, 81, 63, .06);
}
.block[hidden] { display: none; }
.block__title { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }

.evline {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 10px 2px;
  text-align: start;
  box-sizing: border-box;
  min-height: 44px;
}
.evline__box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface);
  transition: background .15s ease;
}
.evline__box svg { opacity: 0; transition: opacity .15s ease; }
.evline[aria-checked="true"] .evline__box { background: var(--green); }
.evline[aria-checked="true"] .evline__box svg { opacity: 1; }
.evline__title { font-size: 14px; font-weight: 700; line-height: 1.2; }
.evline__when { font-size: 11.5px; color: var(--gv-4); }

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper__controls { display: flex; align-items: center; gap: 12px; }
.stepper__btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  user-select: none;
  transition: background .18s ease;
}
.stepper__btn--minus { border: 1.5px solid rgba(43, 63, 51, .25); color: var(--green); }
.stepper__btn--minus:hover { background: var(--green-tint); }
.stepper__btn--plus { background: var(--green); color: #fff; }
.stepper__btn--plus:hover { background: var(--green-dark); }
.stepper__value { width: 28px; text-align: center; font-size: 19px; font-weight: 800; }
.stepper__help { font-size: 12px; color: var(--gv-4); margin-top: 6px; }

.textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid rgba(43, 63, 51, .14);
  border-radius: 16px;
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink);
  resize: none;
  outline: none;
  margin-bottom: 18px;
  transition: border-color .15s ease;
}
.textarea:focus-visible { border-color: var(--green); }

.submit {
  width: 100%;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 15px;
  text-align: center;
  font-size: 15.5px;
  font-weight: 800;
  opacity: .45;
  min-height: 50px;
  transition: background .18s ease, opacity .18s ease;
}
.submit.is-ready { opacity: 1; }
.submit:hover.is-ready { background: var(--green-dark); }
.submit.is-busy { opacity: .7; }
.submit__spin {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin .7s linear infinite;
  vertical-align: -2px;
  margin-inline-end: 8px;
}
.submit.is-busy .submit__spin { display: inline-block; }

.formerror {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rust-text);
  background: var(--rust-bg);
  border-radius: 14px;
  padding: 10px 14px;
  line-height: 1.45;
}
.formerror[hidden] { display: none; }

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------- RSVP confirmation ------------------------ */
.done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 10px;
}
.done__mark {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: pop .5s ease both;
}
.done__title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 6px;
}
.done__line { font-size: 15px; color: var(--gv-1); margin-bottom: 6px; }
.done__events { font-size: 13px; font-weight: 700; color: var(--green); margin-bottom: 6px; }
.done__note {
  font-size: 13px;
  color: var(--gv-4);
  line-height: 1.5;
  max-width: 270px;
  margin-bottom: 24px;
}
.done__edit {
  border: 1.5px solid var(--green);
  color: var(--green);
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  transition: background .18s ease;
}
.done__edit:hover { background: var(--green-tint); }

/* ------------------------------ Tab bar ----------------------------- */
.tabs {
  display: flex;
  background: rgba(253, 254, 251, .9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(43, 63, 51, .08);
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  min-height: 48px;
  color: var(--gv-5);
}
.tab span { font-size: 11px; font-weight: 500; }
.tab[aria-selected="true"] { color: var(--green-dark); }
.tab[aria-selected="true"] span { font-weight: 800; }

/* -------------------------- Accessibilité --------------------------- */
:focus-visible {
  outline: 2px solid var(--green-dark);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------- Écrans très courts (paysage) ------------------- */
@media (max-height: 560px) {
  .home__gap { height: 120px; }
  .home__wedding { font-size: 46px; top: 60px; height: 80px; }
  .splash__names { font-size: 38px; }
}
