/* ==========================================================
   Nathalya & Pierre — 14.08.2027
   « La ruta que nos trajo hasta aquí »
   Palette validée avec la wedding planner, typo script + capitales espacées.
   ========================================================== */

:root {
  --ivoire: #EDEAE4;   /* fond principal */
  --lin:    #E6DDD3;   /* fonds secondaires, cartes */
  --sauge:  #949C6F;   /* vert clair, accents doux */
  --olive:  #6A7550;   /* vert signature : sections pleines */
  --foret:  #3D5A1E;   /* vert profond : boutons, liens */
  --caramel:#8B5A2B;   /* brun chaud : détails, filets */
  --cendre: #637E84;   /* bleu cendré, usage rare */
  --creme:  #F1F0E0;   /* texte sur olive */
  --encre:  #2A2A24;   /* texte courant */

  --encre-soft: #55574B;
  --line: rgba(42, 42, 36, 0.16);

  --script: 'Sacramento', 'Allura', cursive;
  --caps:   'Tenor Sans', 'Optima', 'Candara', sans-serif;
  --sans:   'Jost', 'Segoe UI', system-ui, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 44px);
  --header-h: 76px;
  --shadow: 0 10px 30px -12px rgba(77, 52, 24, 0.35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ivoire); color: var(--encre);
  font-family: var(--sans); font-weight: 300; font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* Grain de papier */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: var(--foret); }
h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.15; }
h2 { font-family: var(--caps); font-size: 1.35rem; letter-spacing: 0.06em; color: var(--encre); }
p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--caramel); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--foret); color: var(--creme); padding: 10px 16px; }
.skip-link:focus { top: 12px; }

.script { font-family: var(--script); font-weight: 400; line-height: 1; letter-spacing: 0; }
.script-sm { font-family: var(--script); font-size: 1.9rem; line-height: 1; }
.caps-line { font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.8rem; line-height: 1.9; }
.center { text-align: center; }
.muted { color: var(--encre-soft); }
.lede { max-width: 60ch; color: var(--encre-soft); }
.placeholder { color: var(--cendre); font-family: var(--caps); letter-spacing: 0.06em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter); }
.wrap.narrow { max-width: 760px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem;
  text-decoration: none; border-radius: 2px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--foret); color: var(--creme); }
.btn-primary:hover { background: var(--olive); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-quiet { border-color: var(--foret); color: var(--foret); background: transparent; }
.btn-quiet:hover { background: var(--foret); color: var(--creme); }
.btn-cream { background: var(--creme); color: var(--foret); }
.btn-cream:hover { background: var(--lin); }

/* ---------- En-tête : la ligne de train ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; height: var(--header-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  background: rgba(237, 234, 228, 0.95); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.monogram { font-family: var(--script); font-size: 2.3rem; color: var(--olive); text-decoration: none; line-height: 1; white-space: nowrap; }
.line-nav { flex: 1; display: flex; justify-content: center; }
.line { list-style: none; margin: 0; padding: 0; display: flex; position: relative; }
.line::before { content: ""; position: absolute; left: 30px; right: 30px; top: 9px; height: 1px; background: var(--olive); }
.line a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 60px; padding: 0 clamp(4px, 1vw, 14px); text-decoration: none; color: var(--encre-soft);
  font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.68rem; white-space: nowrap;
}
.line .stop { width: 11px; height: 11px; margin-top: 4px; border-radius: 50%; border: 1.5px solid var(--olive); background: var(--ivoire); transition: background-color .25s, transform .25s; }
.line a:hover .stop { transform: scale(1.2); }
.line a[aria-current="page"] { color: var(--foret); }
.line a[aria-current="page"] .stop { background: var(--olive); }
.lang-switch { display: flex; gap: 2px; }
.lang-btn {
  border: 1px solid transparent; background: transparent; cursor: pointer; padding: 6px 9px;
  font-family: var(--caps); letter-spacing: 0.14em; font-size: 0.74rem; color: var(--encre-soft); border-radius: 2px;
}
.lang-btn[aria-pressed="true"] { border-color: var(--olive); color: var(--foret); }
.menu-toggle { display: none; }

/* ---------- Intercalaires olive ---------- */
.interlude {
  background: var(--olive); color: var(--creme); text-align: center;
  padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(40px, 5.5vw, 68px);
}
.interlude .script { font-size: clamp(3rem, 8vw, 6.4rem); color: var(--creme); }
.interlude .caps-line { margin: 22px auto 0; max-width: 62ch; color: rgba(241, 240, 224, 0.88); }
.interlude .placeholder { color: var(--creme); border-bottom: 1px dashed rgba(241, 240, 224, 0.6); }

/* ---------- Billet ---------- */
.ticket {
  --perf: radial-gradient(circle at 0 50%, transparent 7px, #000 7.5px) left / 51% 22px repeat-y,
          radial-gradient(circle at 100% 50%, transparent 7px, #000 7.5px) right / 51% 22px repeat-y;
  position: relative; background: var(--lin); color: var(--encre);
  -webkit-mask: var(--perf); mask: var(--perf);
  filter: drop-shadow(0 14px 22px rgba(77, 52, 24, 0.18));
  padding: 14px 22px;
}
.ticket-inner {
  position: relative; display: grid; grid-template-columns: 0.9fr 1.6fr auto; align-items: stretch;
  border: 2px solid var(--olive); outline: 1px solid var(--olive); outline-offset: -7px;
  padding: 22px 22px 22px 18px; min-height: 230px;
}
.ticket-art { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--olive); padding-right: 18px; border-right: 1px solid rgba(106, 117, 80, 0.4); }
.loco { width: 100%; max-width: 210px; aspect-ratio: 220 / 120; color: var(--foret); }
.ticket-main { padding: 6px 24px; display: flex; flex-direction: column; justify-content: center; }
.ticket-names { font-family: var(--script); color: var(--olive); font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: 1; text-align: center; padding: 6px 0 14px; border-bottom: 1px solid rgba(106, 117, 80, 0.45); }
.ticket-names.small { font-size: 2.2rem; border: 0; padding: 10px 0 0; }
.ticket-date { font-family: var(--caps); letter-spacing: 0.22em; font-size: 0.8rem; color: var(--caramel); margin-top: 4px; }
.ticket-fields { display: grid; grid-template-columns: 1.5fr 1.2fr 1fr 1fr; gap: 8px 22px; margin: 16px 0 0; justify-content: space-between; }
.ticket-fields dt, .stub-lbl, .tf-key, .tf-label {
  font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.66rem; color: var(--olive);
}
.ticket-fields dd { white-space: nowrap; margin: 2px 0 0; font-family: var(--caps); letter-spacing: 0.08em; font-size: 0.9rem; }
.ticket-stub {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; text-align: center;
  padding-left: 22px; border-left: 2px dashed rgba(106, 117, 80, 0.5); min-width: 112px;
}
.stub-no { font-family: var(--caps); font-size: 1.1rem; letter-spacing: 0.12em; color: var(--caramel); margin-bottom: 12px; }
.stub-fare { font-family: var(--script); font-size: 2rem; color: var(--caramel); line-height: 1; }

/* ---------- Départ ---------- */
.tab-home { background: var(--ivoire); }
.home { max-width: 980px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(64px, 9vw, 112px); text-align: center; }
.home-phrase { margin: clamp(34px, 5vw, 52px) auto 0; max-width: 46ch; font-size: 0.9rem; color: var(--olive); }
.board { margin: 40px auto 0; display: inline-block; }
.board-title { font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; color: var(--encre-soft); margin-bottom: 10px; }
.board-row { display: flex; gap: 10px; justify-content: center; }
.board-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.flap {
  position: relative; min-width: 64px; padding: 8px 10px; border-radius: 3px;
  background: var(--foret); color: var(--creme);
  font-family: var(--caps); font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.25);
}
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.35); }
.board-lbl { font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.64rem; color: var(--encre-soft); }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 40px; }

@media (prefers-reduced-motion: no-preference) {
  .tab-home .ticket { animation: arrive 1.1s cubic-bezier(.2,.7,.2,1) both; }
  .tab-home .home-phrase, .tab-home .board, .tab-home .home-actions { animation: fade .8s ease both .7s; }
}
@keyframes arrive { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- La ruta ---------- */
.rail { list-style: none; margin: 0; padding: 0; position: relative; }
.rail::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 14px; transform: translateX(-50%);
  background:
    linear-gradient(var(--olive), var(--olive)) left / 1.5px 100% no-repeat,
    linear-gradient(var(--olive), var(--olive)) right / 1.5px 100% no-repeat,
    repeating-linear-gradient(to bottom, rgba(139, 90, 43, 0.55) 0 2px, transparent 2px 12px);
}
.station { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(48px, 8vw, 110px); align-items: center; padding-bottom: clamp(56px, 8vw, 96px); }
.station::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--ivoire); border: 2px solid var(--olive); z-index: 1;
}
.station:nth-child(even) .station-text { order: 2; }
.station:nth-child(odd) .station-text { text-align: right; }
.station:nth-child(odd) .station-text p:not(.station-when) { margin-left: auto; }
.station-when { font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.75rem; color: var(--caramel); margin-bottom: 8px; }
.station-text h2 { margin-bottom: 12px; }
.station-text p:not(.station-when) { color: var(--encre-soft); max-width: 40ch; }
.station-next { padding-bottom: 0; grid-template-columns: 1fr; text-align: center; }
.station-next::before { top: -6px; background: var(--olive); }
.station-next .station-text { order: 0 !important; text-align: center !important; background: var(--ivoire); position: relative; z-index: 2; padding-top: 32px; }
.station-next .script { font-size: clamp(2.8rem, 6vw, 4.4rem); color: var(--olive); margin-top: 6px; }

.polaroid { margin: 0; background: #FBFAF6; padding: 12px 12px 14px; box-shadow: var(--shadow); max-width: 360px; transform: rotate(-1.6deg); justify-self: start; }
.station:nth-child(odd) .polaroid { transform: rotate(1.6deg); }
.polaroid img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: 2px; }
.polaroid.wide img { aspect-ratio: 4 / 3; }
.polaroid figcaption { font-family: var(--script); font-size: 1.7rem; text-align: center; color: var(--encre-soft); margin-top: 8px; line-height: 1; }
.station:nth-child(odd) .polaroid { justify-self: start; }
.station:nth-child(even) .polaroid { justify-self: end; }

.dogs { margin-top: clamp(80px, 10vw, 128px); text-align: center; }
.dogs .script { font-size: clamp(2.6rem, 6vw, 4rem); color: var(--olive); }
.dogs-row { display: flex; gap: clamp(28px, 6vw, 72px); align-items: center; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.dogs .polaroid { max-width: 300px; transform: rotate(-2.5deg); }
.dogs .polaroid img { aspect-ratio: 496 / 368; }
.dogs-text { max-width: 30ch; text-align: left; color: var(--encre-soft); font-size: 1.1rem; }

/* ---------- La boda ---------- */
.venues { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.venue { background: var(--lin); padding: clamp(28px, 4vw, 44px); border-radius: 4px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.venue h2 { font-family: var(--script); font-size: clamp(2.6rem, 5vw, 3.4rem); letter-spacing: 0; color: var(--olive); }
.venue h2.placeholder { font-family: var(--caps); font-size: 1.4rem; color: var(--cendre); }
.venue-kind { color: var(--caramel); }
.venue-facts { margin: 0; display: grid; gap: 6px; }
.venue-facts div { display: flex; gap: 14px; }
.venue-facts dt { font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.7rem; color: var(--encre-soft); min-width: 80px; padding-top: 3px; }
.venue-facts dd { margin: 0; }
.venue-art { width: 100%; max-width: 300px; color: var(--cendre); margin-bottom: 6px; }
.venue-photo { margin: 0 0 6px; width: 100%; }
.venue-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 3px; box-shadow: var(--shadow); }
.venue-photo.has-photo svg { display: none; }
.venue-facts dd { overflow-wrap: anywhere; }

.program { margin-top: clamp(64px, 9vw, 104px); text-align: center; }
.program .script, .dresscode .script { font-size: clamp(2.6rem, 6vw, 4rem); color: var(--olive); }
.program-line { list-style: none; padding: 0; margin: 36px auto 24px; max-width: 900px; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.program-line::before { content: ""; position: absolute; top: 7px; left: 16.6%; right: 16.6%; height: 1px; background: var(--olive); }
.program-line li { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.program-line .stop { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--olive); background: var(--ivoire); }
.program-line li:last-child .stop { background: var(--olive); }
.prog-time { font-family: var(--caps); letter-spacing: 0.14em; font-size: 0.8rem; color: var(--caramel); }
.prog-what { font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.85rem; }
.prog-what.script-sm { text-transform: none; letter-spacing: 0; color: var(--olive); }

.dresscode { margin-top: clamp(64px, 9vw, 104px); text-align: center; }
.dresscode > p { margin: 18px auto 0; max-width: 52ch; color: var(--encre-soft); }
.swatches { list-style: none; padding: 0; margin: 30px 0 0; display: flex; justify-content: center; gap: clamp(14px, 3vw, 32px); flex-wrap: wrap; }
.swatches li { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.66rem; color: var(--encre-soft); }
.swatches li span:first-child { width: 64px; height: 64px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }

/* ---------- RSVP : billet formulaire ---------- */
.ticket-form { max-width: 1040px; margin: 0 auto; }
.ticket-form .ticket-inner { grid-template-columns: 220px 1fr auto; }
.ticket-form .ticket-art { justify-content: flex-start; padding-top: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; padding: 10px 28px; }
.tf { display: flex; flex-direction: column; gap: 4px; border: 0; margin: 0; padding: 0; min-width: 0; }
.tf-full { grid-column: 1 / -1; }
.tf label, .tf legend { font-size: 0.88rem; color: var(--encre-soft); padding: 0; }
.tf-hint { font-size: 0.8rem; color: var(--encre-soft); }
.tf input, .tf select, .tf textarea {
  width: 100%; font: 400 1.02rem var(--sans); color: var(--encre); background: transparent;
  border: 0; border-bottom: 1px solid rgba(106, 117, 80, 0.6); border-radius: 0; padding: 8px 2px;
}
.tf textarea { resize: vertical; }
.tf select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236A7550' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center; }
.tf input:focus, .tf select:focus, .tf textarea:focus { outline: none; border-bottom: 2px solid var(--foret); padding-bottom: 7px; }
.tf-fixed { font-family: var(--script); font-size: 2rem; color: var(--olive); line-height: 1.1; padding-top: 2px; }
.tf-err { display: none; font-size: 0.85rem; color: var(--caramel); }
.tf.invalid input { border-bottom-color: var(--caramel); }
.tf.invalid .tf-err { display: block; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.choice span { display: inline-block; padding: 9px 18px; border: 1px solid var(--olive); border-radius: 2px; font-size: 0.95rem; transition: background-color .2s, color .2s; }
.choice input:checked + span { background: var(--olive); color: var(--creme); }
.choice input:focus-visible + span { outline: 2px solid var(--caramel); outline-offset: 3px; }
.honey { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.stamp {
  position: absolute; right: 150px; top: 50%; pointer-events: none; opacity: 0;
  transform: translateY(-50%) rotate(-14deg) scale(1.6);
  border: 3px double var(--caramel); color: var(--caramel); border-radius: 6px; padding: 8px 20px;
  font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.24em; font-size: 1.5rem;
  background: rgba(230, 221, 211, 0.85);
}
.stamp.on { opacity: 0.92; transform: translateY(-50%) rotate(-14deg) scale(1); transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .2s; }
.ticket-form.done .form-grid { opacity: 0.55; }

.rsvp-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.form-status { text-align: center; margin-top: 18px; min-height: 1.6em; }
.form-status.ok { font-family: var(--script); font-size: 2rem; color: var(--olive); line-height: 1.2; }
.form-status.err { color: var(--caramel); }

/* ---------- El mapa ---------- */
.globe-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.chapters { display: flex; flex-wrap: wrap; gap: 8px; }
.chapter-btn {
  font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem;
  padding: 10px 16px; border: 1px solid var(--olive); background: transparent; color: var(--foret); cursor: pointer; border-radius: 2px;
  transition: background-color .2s, color .2s;
}
.chapter-btn:hover { background: rgba(106, 117, 80, 0.12); }
.chapter-btn[aria-pressed="true"] { background: var(--olive); color: var(--creme); }
.info-card { margin-top: 24px; background: var(--lin); padding: 22px; border-radius: 4px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; min-height: 150px; }
.info-img { width: 96px; height: 116px; object-fit: cover; background: #FBFAF6; padding: 5px 5px 14px; box-shadow: var(--shadow); transform: rotate(-2deg); }
.info-meta { color: var(--caramel); font-size: 0.7rem; }
.info-card h2 { font-family: var(--script); font-size: 2.6rem; letter-spacing: 0; color: var(--olive); margin: 2px 0 6px; }
.info-card p { color: var(--encre-soft); font-size: 0.98rem; }
.info-card .info-dist { margin-top: 10px; font-family: var(--caps); letter-spacing: 0.12em; font-size: 0.78rem; color: var(--foret); }
.info-card .info-dist:empty { display: none; }
.info-link { margin-top: 12px; }
.from-box { margin-top: 24px; display: grid; gap: 8px; }
.from-box label { color: var(--encre-soft); }
.from-box select {
  font: 400 1rem var(--sans); color: var(--encre); padding: 10px 36px 10px 12px; border: 1px solid var(--olive); border-radius: 2px;
  background: var(--ivoire) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236A7550' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
}
.globe-stage { position: relative; }
.globe { position: relative; width: 100%; max-width: 600px; aspect-ratio: 1; margin: 0 auto; touch-action: pan-y; }
.globe canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.globe canvas.dragging { cursor: grabbing; }
.globe canvas.pointing { cursor: pointer; }
.globe-loader { position: absolute; inset: 0; display: grid; place-items: center; }
.globe-loader span { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--lin); border-top-color: var(--olive); animation: spin 1s linear infinite; }
.globe-loader.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.globe-reset { position: absolute; top: 4px; right: 4px; min-height: 38px; padding: 0 14px; font-size: 0.68rem; background: var(--ivoire); }
.globe-hint { text-align: center; font-size: 0.9rem; color: var(--encre-soft); margin-top: 8px; }

.explore { margin-top: clamp(72px, 10vw, 120px); padding-top: clamp(56px, 8vw, 88px); border-top: 1px solid var(--line); }
.explore > .script { font-size: clamp(2.6rem, 6vw, 4.2rem); color: var(--olive); }
.explore > .lede { margin: 14px 0 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem;
  padding: 9px 14px; border: 1px solid var(--line); background: transparent; color: var(--encre); border-radius: 2px;
}
.filter-btn:hover { border-color: var(--olive); }
.filter-btn[aria-pressed="true"] { background: var(--foret); border-color: var(--foret); color: var(--creme); }
.filter-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.explore-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; }
.map-wrap { position: relative; min-height: 540px; border-radius: 4px; overflow: hidden; background: var(--lin); }
.ecuador-map { position: absolute; inset: 0; }
.map-fallback { position: absolute; left: 16px; right: 16px; bottom: 16px; background: var(--ivoire); padding: 12px 16px; }
.poi-list { list-style: none; padding: 0; margin: 0; max-height: 540px; overflow-y: auto; border-top: 1px solid var(--line); overscroll-behavior: contain; }
.poi-item { border-bottom: 1px solid var(--line); }
.poi-btn { width: 100%; text-align: left; background: transparent; border: 0; padding: 14px 8px 14px 4px; display: grid; grid-template-columns: 12px 1fr; gap: 12px; cursor: pointer; font: inherit; color: inherit; }
.poi-btn:hover { background: rgba(148, 156, 111, 0.14); }
.poi-item.active .poi-btn { background: rgba(148, 156, 111, 0.24); }
.poi-btn .filter-dot { margin-top: 8px; }
.poi-name { display: block; font-family: var(--caps); letter-spacing: 0.06em; font-size: 1.02rem; }
.poi-meta { display: block; font-size: 0.84rem; color: var(--caramel); }
.poi-desc { display: block; margin-top: 6px; font-size: 0.95rem; color: var(--encre-soft); }
.poi-item:not(.active) .poi-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.routes-title { margin: 48px 0 16px; color: var(--encre-soft); }
.route-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.route-btn { text-align: left; cursor: pointer; font: inherit; color: inherit; background: var(--lin); border: 1px solid transparent; border-radius: 4px; padding: 18px; transition: border-color .2s, background-color .2s; }
.route-btn:hover { border-color: var(--olive); }
.route-btn[aria-pressed="true"] { background: var(--olive); color: var(--creme); }
.route-days { display: block; font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.66rem; color: var(--caramel); }
.route-btn[aria-pressed="true"] .route-days { color: var(--creme); }
.route-title { display: block; font-family: var(--script); font-size: 2rem; line-height: 1.05; margin: 6px 0 8px; }
.route-steps { display: block; font-size: 0.88rem; opacity: 0.85; }

/* Leaflet */
.leaflet-container { font-family: var(--sans); background: var(--lin); }
.leaflet-tile-pane { filter: saturate(0.55) sepia(0.2) brightness(1.02); }
.poi-marker { background: transparent; border: 0; }
.poi-marker span { display: block; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--creme); box-shadow: 0 1px 4px rgba(42,42,36,.45); transition: transform .2s; }
.poi-marker.active span { transform: scale(1.45); }
.leaflet-popup-content-wrapper { border-radius: 4px; background: var(--ivoire); color: var(--encre); }
.leaflet-popup-tip { background: var(--ivoire); }
.leaflet-popup-content { margin: 12px 16px; line-height: 1.45; }
.popup-name { display: block; font-family: var(--caps); letter-spacing: 0.06em; font-size: 0.98rem; }
.popup-meta { font-size: 0.8rem; color: var(--caramel); }

/* ---------- Viaje ---------- */
.travel-cols, .travel-pending { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.travel-pending { grid-template-columns: repeat(2, 1fr); margin: 40px 0 clamp(64px, 9vw, 96px); }
.travel-cols article, .travel-pending article { border-top: 1px solid var(--olive); padding-top: 18px; }
.travel-cols h2, .travel-pending h2 { margin-bottom: 8px; font-size: 1.15rem; }
.travel-cols p, .travel-pending p { color: var(--encre-soft); }
.travel-pending .placeholder { margin-top: 8px; }
#viaje .script.center { font-size: clamp(2.6rem, 6vw, 4rem); color: var(--olive); margin-bottom: 28px; }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(28px, 6vw, 72px); margin: 0; }
.info-item { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.info-item dt { font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem; color: var(--olive); padding-top: 4px; }
.info-item dd { margin: 0; }
.official { margin: 36px 0 32px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; color: var(--encre-soft); font-size: 0.95rem; }
.official a { color: var(--foret); text-underline-offset: 3px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative;
  font-family: var(--caps); letter-spacing: 0.06em; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--olive); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--encre-soft); max-width: 62ch; }

/* ---------- La última parada ---------- */
.last-stop { background: var(--olive); color: var(--creme); text-align: center; padding: clamp(72px, 10vw, 120px) var(--gutter) 48px; }
.last-title { font-size: clamp(3.2rem, 9vw, 6.4rem); }
.last-stop .caps-line { max-width: 56ch; margin: 22px auto 0; color: rgba(241, 240, 224, 0.88); }
.last-mono { font-family: var(--script); font-size: 3rem; margin-top: 40px; line-height: 1; }
.last-date { font-family: var(--caps); letter-spacing: 0.24em; font-size: 0.82rem; margin: 6px 0 28px; }
.last-tag { margin-top: 40px; font-family: var(--caps); letter-spacing: 0.12em; font-size: 0.78rem; color: rgba(241, 240, 224, 0.7); }

/* ---------- Tablette ---------- */
@media (max-width: 1100px) {
  .line a { min-width: 52px; font-size: 0.62rem; letter-spacing: 0.1em; }
  .route-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Mobile : menu plein écran olive ---------- */
@media (max-width: 960px) {
  .menu-toggle { display: grid; place-content: center; gap: 7px; width: 44px; height: 44px; margin-left: 4px; background: transparent; border: 0; cursor: pointer; }
  .menu-toggle .bar { width: 24px; height: 1.5px; background: var(--foret); transition: transform .25s, background-color .25s; }
  .menu-toggle[aria-expanded="true"] .bar { background: var(--creme); }
  .menu-toggle[aria-expanded="true"] .bar:first-child { transform: translateY(4.25px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }
  .lang-switch { margin-left: auto; }
  .site-header { z-index: 80; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ivoire); }
  .site-header.menu-open .monogram, .site-header.menu-open .lang-btn { color: var(--creme); position: relative; z-index: 2; }
  .site-header.menu-open .lang-btn[aria-pressed="true"] { border-color: var(--creme); }
  .site-header.menu-open .menu-toggle, .site-header.menu-open .lang-switch { position: relative; z-index: 2; }
  .line-nav {
    position: fixed; inset: 0; background: var(--olive); z-index: 1; padding: calc(var(--header-h) + 24px) 40px 40px;
    display: flex; justify-content: flex-start; align-items: flex-start; overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .line-nav.open { opacity: 1; visibility: visible; }
  .line { flex-direction: column; gap: 6px; }
  .line::before { left: 10px; right: auto; top: 14px; bottom: 14px; width: 1px; height: auto; background: var(--creme); }
  .line a { flex-direction: row; gap: 20px; padding: 10px 0; color: var(--creme); font-size: 0.95rem; letter-spacing: 0.18em; min-width: 0; }
  .line .stop { width: 21px; height: 21px; margin: 0; border-color: var(--creme); background: var(--olive); }
  .line a[aria-current="page"] { color: var(--creme); }
  .line a[aria-current="page"] .stop { background: var(--creme); }

  .globe-grid { grid-template-columns: 1fr; }
  .globe-stage { order: -1; }
  .explore-grid { grid-template-columns: 1fr; }
  .map-wrap { min-height: 420px; }
  .poi-list { max-height: none; }
  .venues { grid-template-columns: 1fr; }
  .info-list { grid-template-columns: 1fr; }
  .travel-cols { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Petit écran ---------- */
@media (max-width: 700px) {
  :root { --header-h: 64px; }
  body { font-size: 1rem; }
  .monogram { font-size: 1.9rem; }

  /* Le billet passe en vertical */
  .ticket { padding: 18px 12px; --perf: radial-gradient(circle at 50% 0, transparent 7px, #000 7.5px) top / 22px 51% repeat-x, radial-gradient(circle at 50% 100%, transparent 7px, #000 7.5px) bottom / 22px 51% repeat-x; }
  .ticket-inner, .ticket-form .ticket-inner { grid-template-columns: 1fr; padding: 18px 14px; }
  .ticket-art { border-right: 0; border-bottom: 1px solid rgba(106, 117, 80, 0.4); padding: 0 0 14px; }
  .loco { max-width: 150px; }
  .ticket-main { padding: 12px 0; }
  .ticket-fields { grid-template-columns: 1fr 1fr; text-align: left; gap: 12px; }
  .ticket-fields dd { white-space: normal; }
  .ticket-stub { border-left: 0; border-top: 2px dashed rgba(106, 117, 80, 0.5); padding: 14px 0 0; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 12px; }
  .stub-no { margin: 0; }
  .ticket-form .ticket-art { padding-top: 0; }
  .form-grid { grid-template-columns: 1fr; padding: 10px 2px; }
  .stamp { right: 50%; top: 40%; transform: translate(50%, -50%) rotate(-14deg) scale(1.6); font-size: 1.2rem; }
  .stamp.on { transform: translate(50%, -50%) rotate(-14deg) scale(1); }

  .flap { min-width: 54px; padding: 6px 6px; }
  .board-row { gap: 6px; }
  .home-actions .btn, .rsvp-actions .btn { flex: 1 1 100%; }

  .rail::before { left: 10px; transform: none; }
  .station { grid-template-columns: 1fr; padding-left: 44px; gap: 20px; }
  .station::before { left: 17px; top: 6px; transform: translateX(-50%); }
  .station .station-text { order: 0 !important; text-align: left !important; }
  .station .station-text p:not(.station-when) { margin-left: 0 !important; }
  .station .polaroid { justify-self: start !important; max-width: 300px; }
  .station-next { padding-left: 44px; text-align: left; }
  .station-next .station-text { padding-top: 0; text-align: left !important; background: transparent; }
  .station-next::before { top: 6px; }
  .dogs-text { text-align: center; }

  .program-line { grid-template-columns: 1fr; gap: 22px; justify-items: start; padding-left: 8px; }
  .program-line::before { top: 8px; bottom: 8px; left: 15px; right: auto; width: 1px; height: auto; }
  .program-line li { flex-direction: row; gap: 14px; align-items: center; }
  .program-line .stop { flex: none; }

  .info-card { grid-template-columns: 1fr; }
  .info-img { width: 84px; height: 100px; }
  .route-grid { grid-template-columns: 1fr; }
  .info-item { grid-template-columns: 1fr; gap: 6px; }
  .travel-pending { grid-template-columns: 1fr; }
  .map-wrap { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- Accueil : la photo de la demande, vue par la fenêtre du train ---------- */
.window { margin: clamp(40px, 6vw, 64px) auto 0; max-width: 820px; }
.window-frame {
  position: relative; border-radius: 34px; overflow: hidden; aspect-ratio: 16 / 9;
  border: 10px solid var(--olive); outline: 1px solid var(--olive); outline-offset: 6px;
  box-shadow: var(--shadow); background: var(--lin);
}
.window-frame img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 62%; transform: scale(1.18); transform-origin: 50% 62%;
}
.window-frame::after {   /* léger reflet de vitre */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 70%, rgba(255,255,255,0.08) 100%);
}
.window figcaption { margin-top: 22px; font-family: var(--script); font-size: 2rem; color: var(--olive); line-height: 1.1; }
@media (prefers-reduced-motion: no-preference) {
  .tab-home .window { animation: fade 1s ease both .45s; }
}

/* ---------- La ruta : le train qui avance sur le rail ---------- */
.rail-train {
  position: absolute; left: 50%; top: 0; z-index: 3; list-style: none;
  width: 64px; height: 64px; margin-left: -32px; border-radius: 50%;
  background: var(--creme); border: 2px solid var(--olive); box-shadow: 0 6px 16px -6px rgba(77, 52, 24, 0.45);
  display: grid; place-items: center; will-change: transform;
}
.rail-train .loco { width: 46px; color: var(--foret); }

/* ---------- Contacts ---------- */
.contact-row { margin: clamp(48px, 7vw, 72px) auto 0; text-align: center; }
.contact-row .caps-line { color: var(--encre-soft); margin-bottom: 16px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.faq-contacts { justify-content: flex-start; padding-bottom: 22px; }
.wa {
  display: flex; flex-direction: column; gap: 2px; min-width: 190px; padding: 14px 18px; text-align: left;
  background: var(--lin); border-radius: 4px; text-decoration: none; color: var(--encre); border: 1px solid transparent;
  transition: border-color .2s;
}
.wa:hover { border-color: var(--olive); }
.wa-name { font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.68rem; color: var(--olive); }
.wa-num { font-size: 1rem; }
.mail-fallback { text-align: center; margin-top: 12px; }

@media (max-width: 700px) {
  .window-frame { aspect-ratio: 4 / 3; border-width: 7px; border-radius: 24px; outline-offset: 4px; }
  .window-frame img { transform: scale(1.06); }
  .window figcaption { font-size: 1.7rem; }
  .rail-train { left: 11px; margin-left: -24px; width: 48px; height: 48px; }
  .rail-train .loco { width: 34px; }
  .program-line { grid-template-columns: 1fr; }
  .program-line li { flex-wrap: wrap; }
  .wa { min-width: 0; flex: 1 1 100%; }
}
@media (max-width: 700px) {
  .program-line li .script-sm { flex-basis: 100%; padding-left: 29px; margin-top: -6px; }
}

/* ---------- Notre route : piles de photos, billets, album ---------- */
.stack { position: relative; padding: 0; background: transparent; box-shadow: none; }
.stack .stack-open {
  display: block; width: 100%; padding: 12px 12px 0; margin: 0; border: 0; cursor: zoom-in;
  background: #FBFAF6; position: relative; z-index: 1; font: inherit; color: inherit;
}
.stack figcaption { background: #FBFAF6; position: relative; z-index: 1; margin: 0; padding: 8px 12px 14px; }
.stack { filter: drop-shadow(0 10px 14px rgba(77, 52, 24, 0.22)); }
.stack.has-more::before, .stack.has-more::after {
  content: ""; position: absolute; inset: 0; background: #F6F3EC; border: 1px solid rgba(42,42,36,.06);
}
.stack.has-more::before { transform: rotate(4deg) translate(8px, 4px); }
.stack.has-more::after { transform: rotate(-3deg) translate(-6px, 6px); }
.stack-more {
  position: absolute; right: 20px; bottom: 8px; min-width: 40px; padding: 4px 10px; border-radius: 999px;
  background: var(--olive); color: var(--creme); font-family: var(--caps); letter-spacing: 0.1em; font-size: 0.78rem;
}
.stack .stack-open:hover img { filter: brightness(1.04); }

.mini-ticket {
  justify-self: start; display: flex; align-items: center; gap: 18px; padding: 16px 22px;
  background: var(--lin); border: 1.5px solid var(--olive); outline: 1px solid var(--olive); outline-offset: -6px;
  border-radius: 3px; transform: rotate(-1.5deg); box-shadow: var(--shadow); max-width: 360px;
}
.station:nth-child(even) .mini-ticket { justify-self: end; transform: rotate(1.5deg); }
.mini-ticket .loco { width: 90px; color: var(--foret); flex: none; }
.mini-ticket dl { margin: 0; display: grid; gap: 6px; }
.mini-ticket dt { font-family: var(--caps); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.62rem; color: var(--olive); }
.mini-ticket dd { margin: 0; font-family: var(--caps); letter-spacing: 0.06em; font-size: 0.95rem; }

.album { margin-top: clamp(72px, 9vw, 112px); text-align: center; }
.album .script { font-size: clamp(2.6rem, 6vw, 4rem); color: var(--olive); }
.album-grid { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.album-item { display: block; width: 100%; padding: 6px 6px 18px; border: 0; background: #FBFAF6; cursor: zoom-in; box-shadow: var(--shadow); transition: transform .25s; }
.album-grid li:nth-child(odd) .album-item { transform: rotate(-2deg); }
.album-grid li:nth-child(even) .album-item { transform: rotate(1.8deg); }
.album-item:hover { transform: rotate(0) scale(1.04) !important; }
.album-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Visionneuse */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
  background: rgba(35, 38, 28, 0.94); padding: 24px 8px;
}
.lightbox[hidden] { display: none !important; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-height: 100%; min-width: 0; }
.lb-figure img { max-width: 100%; max-height: calc(100svh - 120px); object-fit: contain; background: #FBFAF6; padding: 10px; box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.lb-figure figcaption { color: var(--creme); font-family: var(--caps); letter-spacing: 0.08em; font-size: 0.85rem; text-align: center; }
.lb-nav, .lb-close {
  background: transparent; border: 1px solid rgba(241,240,224,.5); color: var(--creme); cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; justify-self: center;
}
.lb-nav:hover, .lb-close:hover { background: rgba(241,240,224,.12); }
.lb-close { position: absolute; top: 14px; right: 14px; font-size: 1.6rem; }
.lightbox.single .lb-nav { visibility: hidden; }

@media (max-width: 960px) {
  .album-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .mini-ticket { justify-self: start !important; transform: rotate(-1deg) !important; }
  .mini-ticket .loco { width: 70px; }
  .lightbox { grid-template-columns: 1fr; padding: 60px 8px 80px; }
  .lb-nav { position: absolute; bottom: 18px; }
  .lb-prev { left: calc(50% - 64px); } .lb-next { right: calc(50% - 64px); }
  .stack { max-width: 300px; }
}

/* ---------- Topito et Toffee : le mur de photos ---------- */
.dogs .dogs-text { max-width: 54ch; margin: 18px auto 0; text-align: center; }
.dog-wall { display: block; columns: 5 170px; column-gap: 16px; margin-top: 36px; }
.dog-wall li { break-inside: avoid; margin: 0 0 16px; }
.dog-tile { display: block; width: 100%; padding: 6px 6px 16px; border: 0; background: #FBFAF6; cursor: zoom-in; box-shadow: var(--shadow); transition: transform .25s; }
.dog-wall li:nth-child(3n+1) .dog-tile { transform: rotate(-1.8deg); }
.dog-wall li:nth-child(3n+2) .dog-tile { transform: rotate(1.4deg); }
.dog-wall li:nth-child(3n) .dog-tile { transform: rotate(-0.6deg); }
.dog-tile:hover { transform: rotate(0) scale(1.03) !important; }
.dog-tile img { width: 100%; height: auto; display: block; }
@media (max-width: 700px) { .dog-wall { columns: 2; column-gap: 10px; } .dog-wall li { margin-bottom: 10px; } }
