/* Invitation publique — thème "Olive & Lin" inspiré de template.png */
@import url('/fonts/fonts.css');

:root {
  --cream: #E9E4DA;
  --paper: #F4F1EB;
  --white: #FBFAF7;
  /* Vert forêt de l'ancienne interface. Pour revenir au vert olive du template :
     --olive: #6D6C48; --olive-dark: #57563A; --olive-light: #7C7B56; */
  /* Vert forêt d'origine : --olive: #1C2B1E; --olive-dark: #121D14; --olive-light: #2C4230; */
  --olive: #2B3E2D;
  --olive-dark: #1C2B1E;
  --olive-light: #3A513C;
  --ink: #3A392C;
  --muted: #7F7A6A;
  --line: rgba(58, 57, 44, 0.22);
  --line-light: rgba(244, 241, 235, 0.35);
  --gold: #B39462;
  --danger: #9A4A3A;

  --font-display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-script: 'Pinyon Script', cursive;
  --font-ui: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --font-monogram: 'Marcellus', Georgia, serif;

  --shadow-photo: 0 10px 28px rgba(40, 38, 28, 0.22);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

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

.public-app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

.eyebrow.light {
  color: rgba(244, 241, 235, 0.8);
}

.script-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  line-height: 1.15;
  color: var(--paper);
  margin-bottom: 1rem;
}

.script-title.dark {
  color: var(--ink);
}

.script-title.small {
  font-size: clamp(2.1rem, 5vw, 2.6rem);
  margin-bottom: 0.6rem;
}

.body-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink);
}

.body-text.narrow,
.muted-text.narrow {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.muted-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

.caps-text {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 2;
  color: var(--ink);
}

.signature {
  /* Snell Roundhand = police manuscrite d'Apple (iPhone, Mac) ; ailleurs Pinyon Script */
  font-family: 'Snell Roundhand', var(--font-script);
  font-size: 2rem;
  color: var(--olive);
  margin-top: 1rem;
}

/* & en Marcellus, comme dans la section 1 */
.signature-amp {
  font-family: var(--font-monogram);
  font-size: 0.7em;
  margin: 0 0.1em;
}

.signature.small {
  font-size: 1.6rem;
  margin-top: 0.8rem;
}

.mini-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

.loading-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--olive);
}

.centered {
  text-align: center;
}

.animate-fade-in {
  animation: fade-in-up 0.5s ease both;
}

/* Repli sans View Transitions : fondu court qui ne part pas du blanc */
.view-fade {
  animation: view-in 0.35s ease both;
}

@keyframes view-in {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--olive);
  border-radius: 0;
  background: transparent;
  color: var(--olive-dark);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  white-space: nowrap;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-solid {
  background: var(--olive);
  color: var(--paper);
}

.btn-solid:hover:not(:disabled) {
  background: var(--olive-dark);
}

.btn-outline:hover:not(:disabled) {
  background: var(--olive);
  color: var(--paper);
}

.btn-ghost {
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--ink);
}

.btn-light {
  border-color: var(--line-light);
  color: var(--paper);
  background: rgba(244, 241, 235, 0.06);
}

.btn-light:hover {
  background: var(--paper);
  color: var(--olive-dark);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}

.btn-danger:hover:not(:disabled) {
  background: #7f3a2d;
}

.btn-danger-outline {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger-outline:hover:not(:disabled) {
  background: var(--danger);
  color: var(--white);
}

.btn-small {
  padding: 0.55rem 1rem;
  font-size: 0.62rem;
}

.btn.full {
  width: 100%;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.icon-btn:hover {
  border-color: var(--olive);
  color: var(--olive);
}

/* ---------- Forms ---------- */
.form-control {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--olive);
}

.form-control::placeholder {
  color: #A8A293;
}

textarea.form-control {
  resize: vertical;
}

.field {
  display: block;
  margin-bottom: 1rem;
}

.field > span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---------- Top navigation ---------- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(233, 228, 218, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  background: none;
  border: none;
  font-family: var(--font-monogram);
  font-size: 1.2rem;
  color: var(--ink);
  white-space: nowrap;
}

.nav-brand span {
  color: var(--olive);
  font-size: 0.8em;
  margin: 0 0.14em;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav-link {
  background: none;
  border: 1px solid transparent;
  padding: 0.45rem 0.9rem;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--olive);
}

.nav-link.active {
  background: var(--olive);
  color: var(--paper);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem);
  text-align: center;
}

.section-cream {
  background: var(--cream);
}

.section-paper {
  background: var(--paper);
}

.section-olive {
  background: var(--olive);
  color: var(--paper);
}

.content-width {
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
}

.content-width.wide {
  max-width: 1120px;
}

/* Liseret doré : uniquement à la jonction d'une section sombre et d'une section claire */
:is(.hero, .section-olive, .page-header) + :is(.section-cream, .section-paper),
:is(.section-cream, .section-paper) + :is(.hero, .section-olive, .page-header),
.love-footer.after-dark {
  border-top: 4px solid var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: #2f2e26;
}

.hero.hero-plain {
  align-items: center;
  background: #1F3A2C;
}

/* ---------- Fond mesh animé (MeshBackground) ---------- */
.has-mesh {
  position: relative;
  isolation: isolate;
  background-color: #1F3A2C;
}

.mesh-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.mesh-layer canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Grain papier fixe par-dessus le mesh (petite image répétée : pas de filtre ni de mode de fusion, trop lourds sur iPhone) */
.mesh-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("/assets/grain.png") repeat;
  background-size: 160px 160px;
}

/* ---------- Changement de vue en fondu enchaîné (View Transitions) ---------- */
.top-nav {
  view-transition-name: top-nav;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.hero.hero-plain .hero-content {
  padding: clamp(3rem, 8vh, 5rem) 1rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 14, 0.15) 0%, rgba(20, 20, 14, 0.25) 45%, rgba(20, 20, 14, 0.7) 100%);
}

.hero-content {
  position: relative;
  text-align: center;
  color: var(--paper);
  padding: 0 1rem clamp(3rem, 9vh, 6rem);
}

/* Indicateur de défilement (souris + bille), adapté de uiverse.io/mrhyddenn */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(1.2rem, 4vh, 2.4rem);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: none;
  padding: 0.4rem;
  color: var(--paper);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.scroll-hint:hover,
.scroll-hint:focus-visible {
  opacity: 1;
}

.scroll-hint:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 1.5px solid currentColor;
  border-radius: 11px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  animation: scroll-dot 1.6s ease-in-out infinite;
}

.scroll-label {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding-left: 0.32em;
}

@keyframes scroll-dot {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-dot { animation: none; }
}

.hero-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.8rem 0 1rem;
  font-weight: 300;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.2rem, 11vw, 7rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 0.95;
}

.hero-amp {
  font-family: var(--font-monogram);
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1;
  margin: 0.3rem 0 0.2rem;
  color: #EDE6D6;
}

.hero-date {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  letter-spacing: 0.18em;
}

/* ---------- Polaroids ---------- */
.polaroid {
  background: var(--white);
  padding: 10px 10px 38px;
  box-shadow: var(--shadow-photo);
  position: relative;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.polaroid.missing {
  min-height: 220px;
  background: var(--white) linear-gradient(135deg, #ddd6c8, #c9c2b2);
  background-clip: content-box;
}

.polaroid.missing img {
  display: none;
}

.tilt-left {
  transform: rotate(-4deg);
}

.tilt-right {
  transform: rotate(5deg);
}

/* ---------- Intro (She said yes) ---------- */
.intro-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.polaroid-stack {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(1rem, 3vw, 1.8rem);
  padding: 0.5rem 0 1.5rem;
}

.polaroid-stack .polaroid {
  flex: 1 1 0;
  max-width: 240px;
}

.polaroid-stack .polaroid.offset {
  margin-top: 2.5rem;
}

.intro-text {
  text-align: center;
}

/* ---------- Programme ---------- */
.programme-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  max-width: 820px;
  margin: 2.5rem auto 0;
}

.programme-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 0.5rem;
  background: none;
  border: 1px solid transparent;
  color: var(--paper);
  transition: all 0.25s ease;
  position: relative;
}

.programme-item:hover {
  border-color: var(--line-light);
}

.programme-item.active {
  border-color: var(--paper);
  background: rgba(244, 241, 235, 0.06);
}

.programme-icon {
  display: inline-flex;
  margin-bottom: 0.4rem;
  opacity: 0.95;
}

.programme-time {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.programme-label {
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.programme-sep {
  width: 1px;
  margin: 1.5rem 0.4rem;
  border-left: 1px dashed var(--line-light);
}

.secret-pill {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line-light);
  color: #E8DCC0;
}

.programme-detail {
  max-width: 620px;
  margin: 2rem auto 0;
  padding: 1.6rem;
  border: 1px solid var(--line-light);
  background: var(--olive-light);
  text-align: left;
}

.detail-address {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  margin-bottom: 1rem;
}

.detail-address:hover {
  text-decoration: underline;
}

.detail-secret {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.map-frame {
  border: 6px solid var(--paper);
  background: var(--paper);
  line-height: 0;
}

.map-consent {
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.8rem;
  padding: 1.5rem 1rem;
  line-height: 1.5;
  text-align: center;
  color: var(--ink);
  background: var(--cream);
}

.map-consent .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.map-consent p {
  max-width: 32ch;
  font-size: 0.72rem;
  color: var(--muted);
}

.map-consent a {
  color: var(--olive);
}

.zoom-box {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--line-light);
}

.zoom-box-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.zoom-box p {
  font-size: 0.88rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 0.9rem;
}

.zoom-box-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1rem;
  font-size: 0.8rem;
}

.zoom-start {
  opacity: 0.75;
  letter-spacing: 0.14em;
}

.zoom-soon {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem !important;
}

.details-a .zoom-box:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.detail-invited {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  margin-bottom: 1rem;
  background: var(--paper);
  color: var(--olive-dark);
}

.invited-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--olive);
  color: var(--olive-dark);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- Countdown ---------- */
.countdown-box {
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 5px;
  padding: 1.8rem 1rem;
}

.countdown-values {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(0.3rem, 2vw, 1rem);
  margin-top: 0.8rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4rem;
}

.countdown-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-colon {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  line-height: 1;
  color: var(--muted);
}

.countdown-label {
  margin-top: 0.4rem;
  font-size: 0.56rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Activation / RSVP ---------- */
.rsvp-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  /* Une seule colonne centrée depuis le retrait des photos autour du formulaire */
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.rsvp-photo {
  line-height: 0;
}

.rsvp-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rsvp-photo.right img {
  object-position: 70% 30%;
}

.rsvp-photo.missing {
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #ddd6c8, #c9c2b2);
}

.rsvp-photo.missing img {
  display: none;
}

.rsvp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.rsvp-center .script-title {
  margin-bottom: 0;
}

.divider-or {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  max-width: 320px;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.divider-or::before,
.divider-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.code-form {
  display: flex;
  gap: 0.4rem;
  width: 100%;
  max-width: 340px;
}

.welcome-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

/* ---------- Details (FAQ) ---------- */
.details-list {
  max-width: 640px;
  margin: 1.5rem auto 0;
  text-align: left;
}

.details-item {
  border-bottom: 1px solid var(--line-light);
}

.details-item:first-child {
  border-top: 1px solid var(--line-light);
}

.details-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0.2rem;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: left;
}

.details-plus {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
}

.details-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 0.2rem;
}

.details-item.open .details-a {
  max-height: 640px;
  padding: 0 0.2rem 1.3rem;
}

.details-a p {
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.6;
  margin-bottom: 0.9rem;
}

/* ---------- Page header (other views) ---------- */
.page-header {
  background: var(--olive);
  color: var(--paper);
  text-align: center;
  padding: clamp(2.5rem, 7vw, 4rem) 1rem clamp(2rem, 5vw, 3rem);
}

.page-header .script-title {
  margin: 0.5rem 0 0.4rem;
}

.page-header-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Cards ---------- */
.paper-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.paper-card.centered {
  text-align: center;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 1.2rem;
}

.lock-circle {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--olive);
}

.offline-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--danger);
  background: rgba(154, 74, 58, 0.08);
  color: var(--danger);
  font-size: 0.85rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
}

.empty-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
}

/* ---------- Carpool ---------- */
.carpool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--ink);
  color: var(--olive-dark);
}

.ticket {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
  position: relative;
  transition: box-shadow 0.25s ease;
}

.ticket:hover {
  box-shadow: 0 6px 18px rgba(40, 38, 28, 0.08);
}

.ticket.own {
  border-color: var(--olive);
  box-shadow: inset 3px 0 0 var(--olive);
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

.ticket-head h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.2;
}

.ticket-head em {
  font-weight: 400;
  color: var(--muted);
  font-size: 1rem;
}

.pill {
  flex-shrink: 0;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  background: var(--olive);
  color: var(--paper);
}

.pill-full {
  background: var(--danger);
}

.pill-soft {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.ticket-info {
  display: grid;
  gap: 0.35rem;
}

.ticket-info > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.6rem;
  font-size: 0.88rem;
}

.ticket-info dt {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.2rem;
}

.ticket-notes {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}

.ticket-passengers {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
}

.ticket-passengers .mini-label {
  margin-bottom: 0.5rem;
}

.passenger-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  margin: 0 0.3rem 0.3rem 0;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 0.8rem;
}

.pill-remove {
  display: inline-flex;
  padding: 2px;
  border: none;
  background: none;
  color: var(--danger);
}

.ticket-actions {
  margin-top: 1rem;
  text-align: right;
}

/* ---------- Placement ---------- */
.family-seats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.4rem;
}

.seat-card .welcome-name {
  margin: 0.3rem 0 1rem;
}

.seat-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem 2rem;
  border: 1px solid var(--olive);
  outline: 1px solid var(--olive);
  outline-offset: 4px;
}

.seat-badge strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--olive-dark);
}

.seat-number {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.plan-viewer {
  background: var(--paper);
  border: 1px solid var(--line);
}

.plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
}

.plan-tools {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.svg-viewport {
  height: min(60vh, 520px);
  background: var(--white);
  overflow: hidden;
  touch-action: none;
}

.seat-circle {
  fill: var(--white);
  stroke: var(--olive);
  stroke-width: 1.2px;
}

.seat-circle.assigned {
  fill: var(--olive);
  stroke: var(--olive);
}

.seat-circle.mine {
  fill: var(--gold);
  stroke: var(--ink);
  stroke-width: 2px;
}

.highlighted-table {
  animation: table-pulse 2.4s ease-in-out infinite;
}

@keyframes table-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(179, 148, 98, 0)); }
  50% { filter: drop-shadow(0 0 8px rgba(179, 148, 98, 0.75)); }
}

.plan-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.2rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}

.plan-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-hint {
  margin-left: auto;
  font-style: italic;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid var(--olive);
}

.dot.mine { background: var(--gold); border-color: var(--ink); }
.dot.assigned { background: var(--olive); }
.dot.free { background: var(--white); }

/* ---------- Gallery ---------- */
.upload-label {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.upload-label input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-label.disabled,
.upload-label.disabled input {
  cursor: not-allowed;
}

.progress-track {
  height: 3px;
  background: var(--line);
  margin: -0.8rem auto 2rem;
  max-width: 420px;
}

.progress-fill {
  height: 100%;
  background: var(--olive);
  transition: width 0.3s ease;
}

.polaroid-grid {
  column-count: 3;
  column-gap: 1.6rem;
  padding: 0.5rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.8rem;
  padding: 8px 8px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:nth-child(3n+1) { transform: rotate(-1.5deg); }
.gallery-item:nth-child(3n+2) { transform: rotate(1.2deg); }
.gallery-item:nth-child(3n) { transform: rotate(-0.6deg); }

.gallery-item:hover {
  transform: rotate(0) scale(1.02);
  z-index: 2;
}

.gallery-item.selected {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  display: block;
}

.gallery-click {
  cursor: zoom-in;
}

.select-check {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--white);
  background: rgba(58, 57, 44, 0.35);
  color: var(--white);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-item:hover .select-check,
.gallery-item.selected .select-check {
  opacity: 1;
}

.gallery-item.selected .select-check {
  background: var(--olive);
  border-color: var(--olive);
}

@media (hover: none) {
  .select-check { opacity: 1; }
}

.video-thumb {
  position: relative;
}

.video-thumb video {
  pointer-events: none;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(251, 250, 247, 0.85);
  color: var(--olive-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Footer "With love" ---------- */
.love-footer {
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: 4rem 1.5rem 3rem;
  flex-wrap: wrap;
}

.footer-polaroid {
  width: 190px;
}

/* Cadrage calé à droite pour ne pas couper les personnes de ce côté de la photo */
.footer-polaroid img {
  object-position: 100% 50%;
}

.love-text {
  text-align: center;
}

.love-script {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--ink);
  line-height: 1;
}

.love-text .signature {
  margin: 0.2rem 0 1.4rem;
}

.footer-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.footer-meta a {
  color: var(--olive-dark);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--olive-dark);
  text-decoration: underline;
}

.link-btn:hover {
  color: var(--danger);
}

/* ---------- Modals, toasts & overlays ---------- */
.toast-notification {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: var(--olive-dark);
  color: var(--paper);
  padding: 0.85rem 1.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: calc(100vw - 2rem);
  text-align: center;
  animation: toast-in 0.35s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(40, 38, 28, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--paper);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  outline: 1px solid var(--line);
  outline-offset: -10px;
}

.qr-reader {
  width: 100%;
  overflow: hidden;
  background: #000;
  margin: 1.2rem 0;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(20, 20, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 88vh;
  display: block;
  margin: 0 auto;
  border: 8px solid var(--white);
  outline: none;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2.4rem;
  line-height: 1;
}

.ios-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 500px;
  margin: 0 auto;
  z-index: 9999;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(40, 38, 28, 0.25);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.ios-banner-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ios-banner-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ios-banner-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.ios-banner-brand h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}

.ios-banner-brand p {
  font-size: 0.75rem;
  color: var(--muted);
}

.ios-banner-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  line-height: 1;
}

.ios-banner-steps {
  font-size: 0.8rem;
  line-height: 1.6;
  background: var(--cream);
  padding: 0.8rem;
}

.ios-share-icon {
  display: inline-flex;
  vertical-align: middle;
  background: var(--paper);
  padding: 3px;
  margin: 0 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .rsvp-center {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .polaroid-grid {
    column-count: 2;
  }
}

@media (max-width: 720px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .polaroid-stack {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
  }

  .carpool-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .programme-row {
    flex-direction: column;
    max-width: 320px;
  }

  .programme-sep {
    width: auto;
    height: 1px;
    margin: 0.3rem 2rem;
    border-left: none;
    border-top: 1px dashed var(--line-light);
  }

  .legend-hint {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .nav-brand {
    display: none;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-link {
    padding: 0.45rem 0.55rem;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }

  .rsvp-photo {
    display: none;
  }

  .rsvp-grid {
    grid-template-columns: 1fr;
  }

  .code-form {
    flex-direction: column;
  }

  .polaroid-grid {
    column-gap: 0.9rem;
  }

  .gallery-item {
    padding: 5px 5px 18px;
    margin-bottom: 1rem;
  }

  .ticket-info > div {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .countdown-unit {
    min-width: 2.6rem;
  }

  .welcome-actions .btn {
    flex: 1 1 100%;
  }
}

/* Accord de partage avant l'envoi (obligatoire) */
.share-consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  max-width: 68ch;
  margin-bottom: 1.1rem;
  padding: 0.9rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  line-height: 1.55;
  cursor: pointer;
}

.share-consent input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: var(--olive);
}

.share-consent a {
  color: var(--olive);
}

/* Liens légaux du pied de page */
.footer-legal a,
.footer-legal .link-btn {
  color: inherit;
}

/* ---------- Pages légales (vues Mentions légales / Confidentialité) ---------- */
.legal-content {
  max-width: 46rem;
  margin: 0 auto;
  text-align: left;
  line-height: 1.7;
}

.legal-content h2 {
  margin: 2.2rem 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--olive);
  text-wrap: balance;
  scroll-margin-top: 80px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  font-size: 0.95rem;
}

.legal-content p + p {
  margin-top: 0.7rem;
}

.legal-content ul {
  padding-left: 1.2rem;
  margin: 0.6rem 0;
}

.legal-content li + li {
  margin-top: 0.35rem;
}

.legal-content a,
.legal-content .link-btn {
  color: var(--olive);
}

.legal-content strong {
  font-weight: 500;
}

.legal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1rem 1.2rem;
  margin: 0.8rem 0;
}

.legal-card p + p {
  margin-top: 0.2rem;
}

.legal-table {
  overflow-x: auto;
  margin: 0.8rem 0;
}

.legal-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--paper);
}

.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.legal-table th {
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-foot {
  margin-top: 2.4rem !important;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem !important;
  color: var(--muted);
}

/* Bouton « Ajouter à mon agenda » sous le programme */
.calendar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem auto 1.6rem;
}

.seat-name {
  font-family: Jost, sans-serif;
  font-size: 8px;
  font-weight: 600;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.legal-back {
  max-width: 46rem;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.legal-top {
  margin: 2rem auto 0;
  text-align: center;
}
