:root {
  --bg: #f4f8fc;
  --bg-alt: #e8f1f8;
  --bg-banner: #e0edf7;
  --paper: #ffffff;
  --ink: #203a50;
  --muted: #536b7d;
  --line: #58758b;
  --soft-line: #cadbe7;
  --accent: #326686;
  --accent-dark: #214967;
  --pink: #a64e5d;
  --gold: #a8834d;
  --green: #86b874;
  --card-shadow: #d9e8f1;
  --px: 2px;
  --pixel: "DotGothic16", "Courier New", monospace;
  --display: "Jersey 10", "DotGothic16", "Courier New", monospace;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Nunito", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
h1, h2, h3, h4 { color: var(--accent); }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); }
img, svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px dashed var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.sprite { display: inline-flex; vertical-align: middle; image-rendering: pixelated; }
.container { width: min(100% - 40px, 1040px); margin-inline: auto; }
.container.narrow { width: min(100% - 40px, 680px); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  font-family: var(--display); font-size: 22px; letter-spacing: .03em; text-decoration: none;
  color: #fff; background: var(--accent-dark); border: 2px solid var(--accent-dark); cursor: pointer;
  box-shadow: 3px 3px 0 var(--card-shadow);
  transition: background-color .18s ease;
}
.btn:hover { background-color: #163b55; }
.btn:active { background-color: #102f44; }
.btn-ghost { color: var(--accent-dark); background: var(--paper); }
.btn-ghost:hover { background-color: var(--bg-alt); }
.btn-ghost:active { background-color: #d9e8f1; }
.btn-small { min-height: 42px; padding: 8px 16px; font-size: 20px; }
.btn-block { width: 100%; }
.link { font-family: var(--display); font-size: 21px; text-decoration: none; display: inline-block; padding: 8px 0; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(248, 251, 254, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--soft-line);
}
.brand { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 32px; color: var(--ink); text-decoration: none; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px;
  font-family: var(--display); font-size: 22px; color: var(--ink); background: transparent; border: 0; cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 3px; background: var(--ink); position: relative; transition: transform .2s; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

.menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--soft-line);
  display: none;
}
.menu.is-open { display: block; }
.menu ul { list-style: none; margin: 0; padding: 8px 20px 18px; }
.menu a {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px;
  font-family: var(--sans); font-size: 16px; font-weight: 700; color: var(--ink); text-decoration: none;
  border-bottom: 1px dashed var(--soft-line);
}
.menu li:last-child a { border-bottom: 0; }
.menu-category-icon { width: 28px; height: 28px; align-items: center; justify-content: center; flex: none; }
.menu-category-icon svg { max-width: 100%; max-height: 100%; }
.menu a:hover { color: var(--accent); }
.menu a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }
.menu.is-open { max-height: calc(100dvh - var(--topbar-h, 67px)); overflow-y: auto; }

/* ---------- Accueil ---------- */
.home-page { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.home-page main { min-height: 0; }
/* Tous les éléments de la scène partagent la même taille de pixel : --p.
   --stage : hauteur visible sous l'en-tête ; --landscape : bande du paysage (moulin, collines) en bas de la scène. */
.hero {
  --p: 3px;
  --stage: calc(100vh - var(--topbar-h, 67px));
  --landscape: calc(var(--p) * 49);
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
}
@supports (height: 100dvh) {
  .hero { --stage: calc(100dvh - var(--topbar-h, 67px)); }
}
.scene {
  --ground: calc(var(--p) * 9);
  --feet: calc(var(--p) * 2);
  --mill-width: calc(var(--p) * 80);
  --mill-right: 2%;
  --car-width: calc(var(--p) * 28);
  --family-width: calc(var(--p) * 41);
  /* Garder la voiture à droite des personnages sur les petits écrans. */
  --car-right: max(2%, min(calc(var(--mill-right) + var(--mill-width) * .62), calc(94% - var(--family-width) - var(--p) * 3 - var(--car-width))));
  grid-area: 1 / 1;
  position: relative; height: 100%; min-height: 0; overflow: hidden; isolation: isolate;
  background: #699eb5;
  border-bottom: var(--px) solid var(--ink);
}
.scene > *, .scene-family { position: absolute; }
.scene .sprite svg { width: calc(var(--sprite-w) * var(--p)); height: calc(var(--sprite-h) * var(--p)); }
.scene-sun { top: calc(var(--p) * 5); right: 10%; }
.scene-cloud { left: 0; z-index: 2; opacity: 0; top: calc((var(--cloud-sky, 80px) - var(--cloud-p, 2px) * var(--cloud-height)) * var(--cloud-lane)); }
.scene .scene-cloud svg { width: calc(var(--sprite-w) * var(--cloud-p, 2px)); height: calc(var(--sprite-h) * var(--cloud-p, 2px)); }
.scene-cloud svg rect[fill="#d8dbe6"] { fill: #e8eff1; }
.scene-cloud.is-cloud-static { left: var(--cloud-rest); transform: translateX(-50%); opacity: .68; }
.scene-cloud.c1 { --cloud-height: 7; --cloud-lane: .3; --cloud-rest: 7%; --cloud-duration: 170s; --cloud-delay: -12s; }
.scene-cloud.c2 { --cloud-height: 5; --cloud-lane: .6; --cloud-rest: 53%; --cloud-duration: 210s; --cloud-delay: -112s; }
.scene-cloud.c3 { --cloud-height: 20; --cloud-lane: .1; --cloud-rest: 70%; --cloud-duration: 190s; --cloud-delay: -133s; }
.scene-cloud.c4 { --cloud-height: 15; --cloud-lane: .8; --cloud-rest: 30%; --cloud-duration: 150s; --cloud-delay: -45s; }
.scene-cloud.c5 { --cloud-height: 14; --cloud-rest: 76%; --cloud-duration: 230s; --cloud-delay: -176s; }
.scene-cloud.c6 { --cloud-height: 18; --cloud-rest: 10%; --cloud-duration: 260s; --cloud-delay: -25s; }
.scene-cloud.c5, .scene-cloud.c6 { top: calc(var(--cloud-gap-top, 0px) + (var(--cloud-gap-space, 0px) - var(--cloud-p, 2px) * var(--cloud-height)) / 2); }
.scene:not(.has-cloud-gap) .c5, .scene:not(.has-cloud-gap) .c6 { display: none; }
.scene-cloud.c7 { --cloud-height: 14; --cloud-lane: .35; --cloud-rest: 55%; --cloud-duration: 180s; --cloud-delay: -99s; }
.scene-cloud.c8 { --cloud-height: 13; --cloud-lane: .2; --cloud-rest: 85%; --cloud-duration: 160s; --cloud-delay: -136s; }
.scene-cloud.c9 { --cloud-height: 13; --cloud-lane: .7; --cloud-rest: 20%; --cloud-duration: 220s; --cloud-delay: -44s; }
.scene-birds { top: calc(var(--stage) * .3); left: 0; display: flex; gap: calc(var(--p) * 4); animation: fly 40s steps(200) infinite; }
.scene-birds .sprite { animation: flap .5s steps(1) infinite; }
.scene-birds .sprite:nth-child(2) { margin-top: calc(var(--p) * 5); animation-delay: -.2s; }
.scene-birds .sprite:nth-child(3) { margin-top: calc(var(--p) * 2); animation-delay: -.35s; }
/* Parallaxe : script.js règle --shift-x / --shift-y par plan, en pixels entiers de la scène. */
.scene-sun, .scene-cloud, .scene-birds { translate: var(--shift-x, 0px) var(--shift-y, 0px); }
.scene-layer {
  left: 0; right: 0; bottom: calc(var(--ground) - var(--p));
  background-repeat: repeat-x;
  background-position: calc(50% + var(--shift-x, 0px)) bottom;
  translate: 0 var(--shift-y, 0px);
  image-rendering: pixelated;
}
.layer-far { height: calc(var(--p) * 34); background-image: url("/assets/paysage-loin.svg"); background-size: calc(var(--p) * 320) calc(var(--p) * 34); }
.layer-mid { height: calc(var(--p) * 30); background-image: url("/assets/paysage-milieu.svg"); background-size: calc(var(--p) * 288) calc(var(--p) * 30); }
.layer-near { height: calc(var(--p) * 40); background-image: url("/assets/paysage-proche.svg"); background-size: calc(var(--p) * 320) calc(var(--p) * 40); }
/* Chemin de terre : bordure d'herbe, gravier clair, cailloux et touffes, alignés sur la grille. */
.scene-ground {
  left: 0; right: 0; bottom: 0; height: var(--ground); z-index: 1;
  background:
    repeating-linear-gradient(90deg, #6aa35b 0 var(--p), transparent 0 calc(var(--p) * 2), #6aa35b 0 calc(var(--p) * 3), transparent 0 calc(var(--p) * 11)) 0 var(--p) / 100% var(--p) no-repeat,
    repeating-linear-gradient(90deg, transparent 0 calc(var(--p) * 3), #b99a68 0 calc(var(--p) * 5), transparent 0 calc(var(--p) * 13), #f4e8c8 0 calc(var(--p) * 14), transparent 0 calc(var(--p) * 19)) 0 calc(var(--p) * 4) / 100% var(--p) no-repeat,
    repeating-linear-gradient(90deg, transparent 0 calc(var(--p) * 8), #f4e8c8 0 calc(var(--p) * 10), transparent 0 calc(var(--p) * 15), #b99a68 0 calc(var(--p) * 16), transparent 0 calc(var(--p) * 23)) 0 calc(var(--p) * 6) / 100% var(--p) no-repeat,
    linear-gradient(#6aa35b 0 var(--p), var(--green) 0 calc(var(--p) * 3), #c3a271 0 calc(var(--p) * 4), #e6d3a3 0 calc(var(--p) * 7), #c3a271 0 calc(var(--p) * 8), #6aa35b 0);
}
.scene-mill { bottom: calc(var(--ground) - var(--p)); right: var(--mill-right); z-index: 2; }
.scene-car { bottom: var(--feet); right: var(--car-right); z-index: 3; }
.scene-tree.t1 { bottom: calc(var(--ground) - var(--p)); right: calc(var(--mill-right) + var(--mill-width) - var(--p) * 8); z-index: 1; }
.scene-tree.t2 { bottom: calc(var(--ground) - var(--p) * 2); right: max(0px, calc(var(--mill-right) - var(--p) * 14)); z-index: 2; }
.scene-family { bottom: var(--feet); left: 6%; display: flex; align-items: flex-end; gap: var(--p); z-index: 4; }
.bob { animation: bob 1.6s steps(2) infinite; }
.bob.delay { animation-delay: .4s; }

/* Les déplacements avancent par pixels entiers de la scène (3 px hors scène). */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(var(--p, 3px) * -1)); } }
@keyframes flap { 50% { transform: scaleY(-1); } }
@keyframes fly { from { transform: translateX(-100%); } 75%, to { transform: translateX(100vw); } }

.hero-heading {
  grid-area: 1 / 1; position: relative; z-index: 2; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; padding: 24px 20px calc(var(--landscape) + 24px);
  color: #fff;
  text-shadow: 0 2px 2px #34576b;
  pointer-events: none;
}
.kicker, .section-tag, .card-kicker {
  font-family: var(--pixel); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}
.section-tag { display: inline-flex; align-items: center; gap: 10px; }
.hero h1 { color: #fff; font-family: "Parisienne", cursive; font-weight: 400; font-size: 48px; line-height: 1.1; letter-spacing: 0; }
.amp { color: var(--pink); }
.hero h1 .amp { color: inherit; }
.hero-date { font-family: var(--display); font-size: 28px; margin: auto 0 12px; }
@keyframes blink { 50% { opacity: 0; } }

.hero-actions {
  --button-outline: 0 -3px 0 0 #203a50, 0 3px 0 0 #203a50, -3px 0 0 0 #203a50, 3px 0 0 0 #203a50;
  display: flex; flex-direction: column; gap: 16px; margin-top: auto; padding-top: 28px; max-width: 100%; pointer-events: auto; text-shadow: none;
}
.hero-actions .btn {
  letter-spacing: 0; color: #fff; background: var(--accent); border: 0;
  box-shadow: var(--button-outline), inset 0 -4px 0 var(--accent-dark);
}
.hero-actions .btn:hover { background-color: var(--accent-dark); }
.hero-actions .btn:active { background-color: #163b55; }
.hero-actions .btn:focus-visible { outline-color: var(--ink); }
.hero-actions .btn-ghost { color: var(--ink); background: #fff; box-shadow: var(--button-outline), inset 0 -4px 0 #d9e8f1; }
.hero-actions .btn-ghost:hover { background-color: #edf5fa; }
.hero-actions .btn-ghost:active { background-color: #d9e8f1; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: transparent; }
body:not(.home-page):not(.admin-page) main { background: var(--paper); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head::after { content: ""; display: block; width: 86px; height: 6px; margin: 24px auto 0; background: linear-gradient(var(--gold), var(--gold)) center / 6px 6px no-repeat, linear-gradient(var(--soft-line), var(--soft-line)) center / 100% 1px no-repeat; }
.section-head :is(h1, h2), .gift :is(h1, h2) { font-family: var(--serif); font-weight: 600; font-size: clamp(46px, 10vw, 68px); line-height: 1; margin-bottom: 14px; }
.lead { color: var(--muted); font-size: 17px; max-width: 560px; margin-inline: auto; }
.sub-title { display: flex; align-items: center; gap: 12px; font-size: 30px; margin-bottom: 18px; }
.note { font-size: 14px; color: var(--muted); }

.card { background: var(--paper); padding: 26px 24px; border: 1px solid var(--soft-line); box-shadow: 5px 5px 0 var(--card-shadow); }
.card h3 { font-size: 32px; margin-bottom: 10px; }

/* Programme */
.days { display: grid; gap: 48px; }
.day-title { display: flex; flex-direction: column; gap: 4px; font-family: var(--serif); font-size: 36px; margin-bottom: 22px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding-bottom: 26px; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 0; border-left: 2px dotted #adc8db; }
.timeline li:last-child { padding-bottom: 0; }
.tl-icon { width: 44px; height: 44px; justify-content: center; align-items: center; background: transparent; position: relative; z-index: 1; }
.tl-time { font-family: var(--display); color: var(--accent); font-size: 24px; line-height: 1.1; margin-bottom: 2px; }
.tl-body h4 { font-size: 28px; margin-bottom: 6px; }
.tl-body p:not(.tl-time) { color: var(--muted); font-size: 15px; }

.places { display: grid; gap: 22px; margin-top: 52px; }
.place { position: relative; display: flex; flex-direction: column; }
.place:first-child { justify-content: center; background: #edf5fa; }
.card-sprite { position: absolute; top: 20px; right: 20px; }
.card-art { display: block; width: 100%; max-width: 300px; height: auto; margin-bottom: 18px; image-rendering: pixelated; }
.place-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 22px; }
.place address { font-style: normal; color: var(--muted); margin-bottom: 18px; }
.map-links { display: flex; gap: 14px; flex-wrap: wrap; }

.access { margin-top: 56px; }
.access-grid { display: grid; gap: 20px; }
.access-item h4 { font-size: 25px; margin-bottom: 6px; }
.access-item p { color: var(--muted); font-size: 15px; }

/* RSVP */
.deadline {
  display: inline-flex; align-items: center; gap: 16px; text-align: left;
  background: #edf5fa; padding: 14px 20px; margin: 6px 0 0;
  color: var(--muted); font-size: 15px;
  border: 1px solid #c6dce9; box-shadow: 3px 3px 0 #dcebf3;
}
.deadline p { margin: 0; line-height: 1.35; }
.deadline strong { display: inline-block; margin: 2px 0; font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--accent-dark); }

.form { padding: 28px 20px; }
.field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: 8px; font-size: 15px; padding: 0; }
.req { color: var(--pink); }
.opt { font-weight: 400; color: var(--muted); font-size: 13px; }
.field-row { display: grid; gap: 0 16px; }
.field-row-pair { grid-template-columns: 1fr 1fr; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 2px solid var(--soft-line); border-radius: 0; padding: 12px 14px;
  transition: border-color .15s, background .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
textarea { resize: vertical; min-height: 44px; overflow-y: hidden; }
.field.has-error input, .field.has-error .choice-box { border-color: var(--pink); }
.error { color: #c23b48; font-size: 14px; margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }

.choices { display: grid; gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input, .check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-box {
  display: block; padding: 14px 16px 14px 48px; border: 2px solid var(--soft-line); background: var(--bg); position: relative;
  transition: border-color .15s, background .15s;
}
.choice-box::before {
  content: ""; position: absolute; left: 16px; top: 18px; width: 16px; height: 16px; background: #fff;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink);
}
.choice-box strong { display: block; font-weight: 700; }
.choice-box small { color: var(--muted); font-size: 13px; }
.choice input:checked + .choice-box { border-color: var(--accent); background: var(--bg-alt); }
.choice input:checked + .choice-box::before { background: var(--accent); box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink), inset 0 0 0 3px #fff; }
.choice input:focus-visible + .choice-box { outline: 3px dashed var(--accent); outline-offset: 3px; }

.check { position: relative; display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; cursor: pointer; }
.check span::before {
  content: ""; flex: none; display: inline-block; width: 16px; height: 16px; margin: 4px 14px 0 2px; vertical-align: top; background: #fff;
  box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink);
}
.check span { display: block; }
.check input:checked + span::before { background: var(--accent); box-shadow: 0 -2px 0 0 var(--ink), 0 2px 0 0 var(--ink), -2px 0 0 0 var(--ink), 2px 0 0 0 var(--ink), inset 0 0 0 3px #fff; }
.check input:focus-visible + span { outline: 3px dashed var(--accent); outline-offset: 3px; }
.if-present { margin-bottom: 4px; transition: opacity .2s; }
.if-present.is-hidden { display: none; }
.form-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 12px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.guest-card { min-width: 0; margin: 24px 0; padding: 18px; border: 2px solid var(--soft-line); }
.guest-card > legend { font-family: var(--sans); font-size: 20px; font-weight: 700; padding: 0 8px; }
.diet-choices > label { font-weight: 400; }
.success-message { color: #35622a; padding: 12px 0; }
#invitation-app h3 { font-size: 30px; margin-bottom: 16px; }
#invitation-app > .error { padding: 18px; border: 2px solid var(--pink); }
.identity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 22px; }
.identity-grid .field { margin: 0; }
.identity-field dl { margin: 0; height: 100%; padding: 10px 12px; background: var(--bg); border-left: 3px solid var(--soft-line); }
.identity-field dt { font-size: 13px; color: var(--muted); }
.identity-field dd { margin: 4px 0 0; font-weight: 700; }

.admin-page {
  background: #edf3f8; color: var(--ink);
}
.admin-page h1, .admin-page h2, .admin-page h3 { font-family: var(--sans); font-weight: 700; }
.admin-page h1 { font-size: 23px; }
.admin-page h2 { font-size: 26px; }
.admin-page h3 { font-size: 19px; margin-bottom: 18px; }
.admin-topbar { display: flex; align-items: center; gap: 20px; padding: 12px 32px; background: #fff; border-bottom: 1px solid var(--soft-line); }
.admin-brand { display: flex; align-items: center; gap: 3px; font-family: var(--display); font-size: 35px; color: var(--accent-dark); text-decoration: none; }
.admin-brand span { color: var(--accent); font-size: 24px; }
.admin-eyebrow { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 5px; }
.admin-site-link { margin-left: auto; font-size: 13px; text-decoration: none; }
.admin-main { padding: 0 28px 24px; }
.admin-main > [role="status"]:empty { display: none; }
.admin-main > [role="status"] { margin: 8px 0 0; padding: 7px 14px; border-radius: 8px; background: #edf5ed; font-size: 13px; }
.admin-main > .error { background: #fff0f1; }
.admin-page .btn { min-height: 40px; padding: 9px 15px; background: var(--accent); border: 1px solid transparent; border-radius: 7px; box-shadow: none; font: 700 13px var(--sans); letter-spacing: 0; }
.admin-page .btn:hover { background-color: var(--accent-dark); }
.admin-page .btn:active { background-color: #163b55; }
.admin-page .btn-ghost { color: var(--accent-dark); background: #fff; border-color: var(--soft-line); }
.admin-page .btn-ghost:hover { background-color: var(--bg-alt); }
.admin-page .btn-ghost:active { background-color: #d9e8f1; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; }
.admin-toolbar > p { margin: 0; font-size: 14px; color: var(--muted); }
.admin-navigation { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; flex-shrink: 0; }
.admin-navigation button { border: 1px solid var(--soft-line); border-radius: 8px; padding: 10px 16px; background: #fff; color: var(--accent-dark); font: 700 13px var(--sans); cursor: pointer; }
.admin-navigation button[aria-pressed="true"] { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }
.admin-navigation button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.admin-panel { flex: 1; min-height: 0; background: #fff; border: 1px solid var(--soft-line); border-radius: 12px; }
.admin-section-content { padding: 0 32px 28px; }
.admin-section-content > h3:not(:first-child) { margin-top: 30px; }
.admin-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.admin-table caption { text-align: left; font-weight: 700; font-size: 19px; padding: 8px 0 16px; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--soft-line); padding: 12px 16px; }
.admin-table thead { background: var(--bg-alt); }
.admin-table td { font-variant-numeric: tabular-nums; }
.attendance-detail { min-width: 760px; }
.attendance-detail .attendance-yes { color: #32704a; font-weight: 700; }
.attendance-detail .attendance-no { color: var(--muted); }
.category-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--soft-line); }
.category-row > input, .category-row > select, .category-row > label, .category-row > .field { flex: 1; min-width: 180px; }
.category-row > span { font-size: 12px; color: var(--muted); }
.category-row label { font-size: 14px; overflow-wrap: anywhere; }
.admin-page #category-filter { margin-top: 10px; font-size: 12px; }
.sidebar-category + .sidebar-category { margin-top: 18px; }
.admin-page .sidebar-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 9px 10px; border-radius: 6px; background: var(--bg-alt); color: var(--accent-dark); font-size: 12px; overflow-wrap: anywhere; }
.sidebar-category-heading > span:first-child, .sidebar-group-title > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.sidebar-category-total { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.admin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.metric-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; background: #fff; border: 1px solid var(--soft-line); border-radius: 10px; padding: 12px 20px; }
.metric-label { color: var(--muted); font-size: 13px; font-weight: 700; align-self: center; }
.metric-card strong { font-size: 30px; line-height: 1.3; color: var(--accent-dark); grid-row: span 2; align-self: center; }
.metric-detail { color: var(--muted); font-size: 11px; }
.admin-shell { display: grid; grid-template-columns: 310px minmax(0, 1fr); height: calc(100dvh - 275px); min-height: 460px; background: #fff; border: 1px solid var(--soft-line); border-radius: 12px; overflow: hidden; box-shadow: 0 5px 25px #203a5005; }
.admin-sidebar { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--soft-line); background: #fbfdff; }
.sidebar-head { padding: 20px 16px 0; }
.sidebar-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 18px; }
.sidebar-title h2 { font-size: 17px; }
.admin-page .sidebar-title .btn { padding: 7px 10px; min-height: 34px; font-size: 11px; }
.admin-page #search { border-radius: 8px; background: #fff; font-size: 13px; padding: 10px 12px; }
.sidebar-filters { display: flex; gap: 5px; margin-top: 15px; border-bottom: 1px solid var(--soft-line); }
.sidebar-filters button, .detail-tabs button { font: 700 12px var(--sans); color: var(--muted); border: 0; background: transparent; padding: 12px 8px; border-bottom: 2px solid transparent; cursor: pointer; }
.sidebar-filters button[aria-pressed="true"], .detail-tabs button[aria-pressed="true"] { color: var(--accent-dark); border-bottom-color: var(--accent); }
.group-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 20px; }
.sidebar-group { margin-left: 8px; padding-top: 6px; border-left: 1px solid var(--soft-line); }
.sidebar-group-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 11px 10px; font: 700 13px var(--sans); color: var(--muted); background: transparent; border: 0; cursor: pointer; text-align: left; }
.sidebar-group.is-active .sidebar-group-title { color: var(--accent-dark); }
.group-count { color: var(--muted); background: var(--bg-alt); min-width: 23px; border-radius: 5px; font-size: 10px; text-align: center; padding: 2px 5px; }
.sidebar-guest { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 8px; padding: 10px; background: transparent; text-align: left; font: 13px var(--sans); color: var(--ink); cursor: pointer; }
.sidebar-guest:hover { background: #f1f7fb; }
.sidebar-guest.is-selected { background: #e1eef7; color: var(--accent-dark); font-weight: 700; }
.guest-list-name { min-width: 0; overflow-wrap: anywhere; }
.guest-avatar { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #dfedf6; color: #416c87; font-size: 11px; font-weight: 700; }
.avatar-baby { background: #fbecdf; color: #855b32; }
.avatar-child { background: #e5f1ed; color: #38675a; }
.presence-dot { margin-left: auto; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #d9bb82; }
.presence-dot.is-confirmed { background: #84ae94; }
.sidebar-note { margin: 0; padding: 15px 18px; border-top: 1px solid var(--soft-line); font-size: 11px; color: var(--muted); background: #f1f7fb; }
.sidebar-empty { padding: 24px 12px; font-size: 13px; color: var(--muted); }
.admin-detail { min-width: 0; overflow-y: auto; }
.group-editor-form, .fields-editor-form { display: flex; flex-direction: column; min-height: 100%; }
.detail-header { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px 20px; padding: 22px 32px 18px; }
.detail-header > div:first-child { flex: 1; min-width: 220px; }
.detail-header h2 { margin: 0 0 8px; overflow-wrap: anywhere; }
.detail-header p { font-size: 12px; color: var(--muted); }
.response-badge { font-size: 11px; background: #fff5e3; color: #805c1f; border-radius: 20px; padding: 6px 11px; white-space: nowrap; }
.response-badge.confirmed { color: #32704a; background: #edf7ef; }
.invitation-actions { flex-basis: 100%; }
.group-editor-form > .detail-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; }
.group-editor-form > .detail-header > div:first-child { grid-row: span 2; min-width: 0; }
.group-editor-form .response-badge { justify-self: end; }
.group-editor-form .invitation-actions { grid-column: 2; grid-row: 2; }
.group-editor-form .link-panel { grid-column: 1 / -1; }
.link-panel { width: 100%; }
.link-panel:empty { display: none; }
.link-panel p { margin-bottom: 8px; }
.admin-page .link-panel input { font-size: 12px; }
.detail-tabs { display: flex; gap: 24px; border-block: 1px solid var(--soft-line); padding-inline: 32px; }
.detail-tabs button { font-size: 13px; padding-block: 12px; }
.guest-section, .group-section { padding: 20px 32px; flex: 1; }
.guest-switcher-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.guest-switcher { display: flex; flex-wrap: wrap; gap: 8px; }
.guest-switcher button { padding: 7px 12px; border-radius: 6px; border: 1px solid var(--soft-line); background: #fff; color: var(--muted); font: 12px var(--sans); cursor: pointer; }
.guest-switcher button[aria-pressed="true"] { background: var(--bg-alt); color: var(--accent-dark); border-color: #9cbdd0; font-weight: 700; }
.guest-switcher-bar > .btn { flex-shrink: 0; }
.guest-detail-title { display: flex; gap: 15px; align-items: center; margin-bottom: 18px; }
.guest-detail-title .guest-avatar { width: 40px; height: 40px; font-size: 13px; }
.guest-detail-title h3 { margin-bottom: 4px; }
.guest-detail-title p { font-size: 11px; color: var(--muted); }
.admin-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-bottom: 24px; }
.admin-page .field { margin-bottom: 0; }
.admin-page .field > label, .admin-page .field legend { font-size: 11px; letter-spacing: .02em; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.admin-page input, .admin-page select, .admin-page textarea { background: #fff; border: 1px solid var(--soft-line); border-radius: 7px; padding: 10px 12px; font-size: 13px; }
.admin-page input:focus, .admin-page select:focus, .admin-page textarea:focus { outline: 2px solid #a9cadd; outline-offset: 1px; border-color: var(--accent); }
.admin-fields-grid > .field-textarea, .admin-fields-grid > .field-multiselect { grid-column: 1 / -1; }
.admin-page .diet-choices { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.admin-page .diet-choices > .check { margin: 0; font-weight: 400; }
.admin-page .segmented { display: flex; flex-wrap: wrap; gap: 0; border: 0; padding: 0; margin: 0; min-width: 0; }
.admin-page .segmented legend { width: 100%; padding: 0; }
.segmented label { position: relative; flex: 1 1 auto; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: block; padding: 10px 12px; border: 1px solid var(--soft-line); margin-left: -1px; background: #fff; color: var(--muted); font-size: 12px; text-align: center; white-space: nowrap; }
.segmented label:first-of-type span { border-radius: 7px 0 0 7px; margin-left: 0; }
.segmented label:last-of-type span { border-radius: 0 7px 7px 0; }
.segmented label:hover span { background: #f1f7fb; }
.segmented input:checked + span { position: relative; background: var(--bg-alt); border-color: var(--accent); color: var(--accent-dark); font-weight: 700; z-index: 1; }
.segmented input:focus-visible + span { outline: 2px solid #a9cadd; outline-offset: 1px; z-index: 2; }
.admin-page .check { font-size: 12px; }
.admin-page .check span::before { box-shadow: none; border: 1px solid #a9c1d1; border-radius: 4px; margin-right: 8px; }
.admin-page .check input:checked + span::before { background: var(--accent); box-shadow: inset 0 0 0 3px #fff; }
.admin-help { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.danger-link { border: 0; background: none; padding: 8px 0; color: var(--pink); font: 12px var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.danger-link:disabled { opacity: .5; cursor: not-allowed; }
.group-management { border-top: 1px solid var(--soft-line); display: flex; gap: 24px; flex-wrap: wrap; align-items: center; padding-top: 22px; }
.editor-footer { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: auto; padding: 16px 32px; background: #fffffffa; border-top: 1px solid var(--soft-line); z-index: 1; }
.draft-status { display: block; font-size: 12px; color: var(--muted); }
.editor-footer small { font-size: 10px; color: var(--muted); }
.form-builder { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; padding: 0 32px 24px; align-items: start; }
.form-builder-preview { min-width: 0; font-family: var(--sans); }
.form-builder-preview .field > label, .form-builder-preview .field legend { font-size: 15px; letter-spacing: normal; color: var(--ink); }
.form-builder-preview input:not([type="checkbox"]):not([type="radio"]), .form-builder-preview select, .form-builder-preview textarea { font-size: 16px; color: var(--ink); background: var(--bg); border: 2px solid var(--soft-line); border-radius: 0; padding: 12px 14px; opacity: 1; }
.form-builder-question { position: relative; border-radius: 6px; outline: 2px solid transparent; outline-offset: 5px; }
.form-builder-question:hover, .form-builder-question.is-selected { outline-color: var(--accent); }
.form-builder-select { position: absolute; inset: -5px; width: calc(100% + 10px); border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.form-builder-select:focus-visible { outline: 3px dashed var(--accent-dark); outline-offset: 2px; }
.fields-settings-grid { min-width: 0; }
.fields-settings-grid .guest-card { border: 1px solid var(--soft-line); border-radius: 9px; margin: 0; padding: 16px; }
.admin-page .guest-card > legend { font-size: 12px; color: var(--muted); }
.fields-settings-grid .field { margin-bottom: 16px; }
.fields-settings-grid .field-row { grid-template-columns: 1fr 1fr; }
.fields-settings-grid .admin-actions { margin-top: 18px; }
.fields-editor-form > .detail-header { display: block; }
.admin-empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px; }
.admin-empty p { max-width: 390px; font-size: 14px; color: var(--muted); margin: 14px 0 24px; }
.empty-symbol { font-family: var(--display); font-size: 45px; color: #8db4cc; margin-bottom: 24px; }
.admin-login { max-width: 430px; margin: 72px auto; padding: 36px; border: 1px solid var(--soft-line); border-radius: 12px; background: #fff; }
.admin-login h2 { margin-bottom: 12px; }
.admin-login p { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.admin-login .field { margin-bottom: 20px; }
.admin-login form > .btn { width: 100%; margin-bottom: 10px; }
.admin-login details { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--soft-line); font-size: 13px; color: var(--muted); }
.admin-login summary { cursor: pointer; margin-bottom: 14px; }
#login-code { font-size: 22px; letter-spacing: .3em; text-align: center; }
.admin-access { padding: 0 32px 24px; max-width: 720px; }
.admin-access ul { list-style: none; padding: 0; margin: 0 0 20px; border: 1px solid var(--soft-line); border-radius: 9px; }
.admin-access li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 13px; }
.admin-access li + li { border-top: 1px solid var(--soft-line); }
.admin-access li small { color: var(--muted); margin-left: 8px; }
.admin-access .add-row { display: flex; gap: 10px; align-items: flex-end; }
.admin-access .add-row .field { flex: 1; }

@media (min-width: 701px) {
  .admin-page { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .admin-topbar { flex-shrink: 0; }
  .admin-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  #admin-workspace { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .admin-toolbar, .admin-metrics, .admin-main > [role="status"] { flex-shrink: 0; }
  .admin-shell { flex: 1; height: auto; min-height: 0; }
  .admin-login { overflow-y: auto; }
}
@media (min-width: 1600px) {
  .admin-shell { grid-template-columns: 355px minmax(0, 1fr); }
  .detail-header, .guest-section, .group-section { padding-inline: 48px; }
  .admin-fields-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 34px; }
}
@media (max-width: 1000px) {
  .form-builder { grid-template-columns: minmax(0, 1fr); padding-inline: 20px; }
  .admin-main { padding-inline: 16px; }
  .admin-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .admin-toolbar { align-items: flex-start; }
  .detail-header, .guest-section, .group-section, .editor-footer { padding-inline: 20px; }
  .guest-switcher-bar { flex-direction: column; }
  .metric-card { padding: 12px; }
}
@media (max-width: 700px) {
  .admin-topbar { padding: 16px; gap: 12px; }
  .admin-topbar h1 { font-size: 17px; }
  .admin-site-link { display: none; }
  .admin-toolbar { flex-direction: column; }
  .admin-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-shell { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .admin-sidebar { border-right: 0; border-bottom: 1px solid var(--soft-line); }
  .group-list { max-height: 240px; flex: auto; }
  .admin-detail { overflow: visible; }
  .group-editor-form > .detail-header { display: flex; }
  .admin-fields-grid { grid-template-columns: 1fr; }
  .detail-tabs { gap: 12px; padding-inline: 12px; }
  .editor-footer { flex-wrap: wrap; padding: 14px; }
  .form-builder { padding-inline: 16px; }
  .admin-empty { padding: 36px 20px; }
  .admin-navigation { gap: 6px; }
  .admin-navigation button { padding: 9px 10px; font-size: 12px; }
  .admin-section-content { padding-inline: 16px; }
  .admin-table th, .admin-table td { padding: 10px 8px; }
  .category-row > input, .category-row > select, .category-row > label, .category-row > .field { min-width: 100%; }
}

.form-done { text-align: center; padding: 34px 22px; }
.form-done > .sprite { margin: 0 auto 14px; }
.form-done h3 { font-size: 40px; }
.summary { text-align: left; margin: 22px 0; display: grid; gap: 8px; font-size: 15px; }
.summary div { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed var(--soft-line); }
.summary dt { font-weight: 700; color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.summary dd { margin: 0; white-space: pre-line; }

/* Hébergements */
.stays { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 22px; }
.stay { display: flex; flex-direction: column; }
.stay p { color: var(--muted); font-size: 15px; }
.stay .link { margin-top: auto; }
.stay-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-dark); background: #e4f0f7; padding: 4px 9px; }
.distance { font-family: var(--display); font-size: 26px; line-height: 1; color: var(--accent); white-space: nowrap; }
.stay-featured { background: #eaf4fa; }
.promo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px !important; color: var(--ink) !important; background: #fff; padding: 8px 10px; border: 2px dashed var(--gold); }
.promo strong { font-family: var(--pixel); font-weight: 400; letter-spacing: .04em; white-space: nowrap; }

.taxis p { color: var(--muted); }
.taxis p strong { color: var(--ink); }
.taxi-list { list-style: none; padding: 0; margin: 18px 0; }
.taxi-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--soft-line); }
.taxi-list li:last-child { border-bottom: 0; }
.taxi-list span { font-weight: 700; }
.taxi-list small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.taxi-list a { font-family: var(--display); font-size: 26px; text-decoration: none; white-space: nowrap; padding: 6px 0; }

/* Dress code */
.dresscode { margin-bottom: 26px; }
.palette { list-style: none; padding: 0; margin: 20px 0 16px; display: flex; flex-wrap: wrap; gap: 16px 18px; }
.palette li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.palette span { width: 40px; height: 40px; box-shadow: 0 -3px 0 0 var(--line), 0 3px 0 0 var(--line), -3px 0 0 0 var(--line), 3px 0 0 0 var(--line); }
.tips { display: grid; gap: 22px; margin-bottom: 26px; }
.tip > .sprite { margin-bottom: 14px; height: 36px; align-items: flex-end; }
.tip h3 { font-size: 27px; }
.tip p { color: var(--muted); font-size: 15px; }
.kids { display: grid; gap: 18px; }
.kids-sprites { display: flex; align-items: flex-end; gap: 14px; }
.kids p { color: var(--muted); }
.kids p strong { color: var(--ink); }

/* Cagnotte */
.gift { text-align: center; padding: 38px 24px; }
.gift-sprites { display: flex; justify-content: center; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.gift > p:not(.section-tag):not(.note) { color: var(--muted); }
.gift .btn { margin: 14px 0 18px; }

/* Pied de page */
.footer { text-align: center; padding: 52px 20px calc(40px + env(safe-area-inset-bottom)); background: var(--ink); color: #d9e9f4; font-size: 14px; }
.footer-sprites { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin-bottom: 22px; }
.footer-names { font-family: var(--serif); font-size: 42px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.footer-names .amp { color: #a6cde3; }
.footer-continue { font-family: var(--display); font-size: 24px; color: #e4c695; margin-top: 18px; }
.blink { animation: blink 1.2s steps(1) infinite; }
.footer-small { font-size: 12px; opacity: .75; margin-top: 18px; }

/* Apparition au défilement */
/* Fondu « palette NES » : l'opacité et la position avancent par paliers. */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s steps(5), transform .5s steps(4); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Animations 8 bits ---------- */
/* Transition entre les pages : fondu par paliers, l'en-tête reste en place. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.topbar { view-transition-name: topbar; }
::view-transition-old(root) { animation: px-fade-out .2s steps(4) both; }
::view-transition-new(root) { animation: px-fade-in .32s steps(4) both; }
@keyframes px-fade-out { to { opacity: 0; } }
@keyframes px-fade-in { from { opacity: 0; } }

/* Curseur de sélection façon menu de jeu, devant le lien survolé. */
.menu a { position: relative; }
.menu a::before {
  content: ""; position: absolute; top: 50%; left: -8px; width: 2px; height: 2px; margin-top: -5px;
  background: var(--accent);
  box-shadow: 0 2px var(--accent), 0 4px var(--accent), 0 6px var(--accent), 0 8px var(--accent), 2px 2px var(--accent), 2px 4px var(--accent), 2px 6px var(--accent), 4px 4px var(--accent);
  opacity: 0; pointer-events: none;
}
.menu a:hover::before, .menu a:focus-visible::before { opacity: 1; animation: px-nudge .6s steps(1) infinite; }
@media (min-width: 1100px) { .menu a::before { left: -5px; } }
@keyframes px-nudge { 50% { transform: translateX(2px); } }

/* Losange doré des titres : scintille de temps en temps. */
.section-head::after { animation: px-glint 6s steps(1) infinite; }
@keyframes px-glint {
  0%, 90%, 94%, 100% { background-size: 6px 6px, 100% 1px; }
  91%, 93% { background-size: 10px 10px, 100% 1px; }
  92% { background-size: 2px 2px, 100% 1px; }
}

/* Programme : chaque icône « s'obtient » comme un objet, puis sautille au survol. */
.day.is-visible .tl-icon { animation: px-item-get .5s steps(4) calc(var(--i, 0) * 120ms + 250ms) both; }
.timeline li:hover .tl-icon svg { animation: px-hop .36s steps(2); }
@keyframes px-item-get {
  0% { transform: translateY(6px); opacity: 0; }
  50% { transform: translateY(-8px); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes px-hop { 50% { transform: translateY(-4px); } }

/* Petits sauts : cœur du logo, sprites du pied de page et de la cagnotte. */
.brand:hover .sprite svg { animation: px-hop .5s steps(2) infinite; }
.footer-sprites .sprite, .gift-sprites .sprite { animation: px-wave 7s steps(1) infinite; }
:is(.footer-sprites, .gift-sprites) .sprite:nth-child(2) { animation-delay: .15s; }
:is(.footer-sprites, .gift-sprites) .sprite:nth-child(3) { animation-delay: .3s; }
:is(.footer-sprites, .gift-sprites) .sprite:nth-child(4) { animation-delay: .45s; }
:is(.footer-sprites, .gift-sprites) .sprite:nth-child(5) { animation-delay: .6s; }
@keyframes px-wave { 0%, 3%, 100% { transform: none; } 1.5% { transform: translateY(-4px); } }

/* Particules, cœurs et message secret créés par script.js. */
.pixel-fx { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; image-rendering: pixelated; }
.pixel-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 210; transform: translateX(-50%);
  padding: 10px 18px; font-family: var(--display); font-size: 22px; color: #fff; background: var(--ink);
  box-shadow: 0 -3px 0 0 #e4c695, 0 3px 0 0 #e4c695, -3px 0 0 0 #e4c695, 3px 0 0 0 #e4c695;
  animation: px-toast 3.2s steps(1) both; pointer-events: none;
}
@keyframes px-toast { 0% { opacity: 0; } 4%, 92% { opacity: 1; } 96% { opacity: .5; } 100% { opacity: 0; } }

/* ---------- Tablette & plus ---------- */
@media (min-width: 360px) {
  .hero { --p: 4px; }
  .hero h1 { font-size: 56px; }
}

@media (min-width: 600px) {
  .scene { --car-right: calc(var(--mill-right) + var(--mill-width) * .62); }
  .scene-family { left: auto; right: calc(var(--car-right) + var(--car-width) + var(--p) * 4); }
  .hero-actions { flex-direction: row; justify-content: center; }
  .hero h1 { font-size: 80px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .form { padding: 36px 34px; }
  .access-grid { grid-template-columns: repeat(3, 1fr); }
  .stays { grid-template-columns: 1fr 1fr; }
  .tips { grid-template-columns: repeat(3, 1fr); }
  .kids { grid-template-columns: auto 1fr; align-items: center; gap: 28px; }
  .kids-sprites { flex-direction: column; align-items: center; }
  .places { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .topbar { padding-inline: 36px; }
  .hero { --p: 5px; }
  .scene { --mill-right: 8%; }
  .hero h1 { font-size: 96px; }
  .section { padding: 88px 0 104px; }
  .days { grid-template-columns: 1.5fr 1fr; gap: 56px; }
  .stays { grid-template-columns: repeat(3, 1fr); }
}

@media (hover: hover) and (pointer: fine) {
  .menu-category-icon { display: none; }
}

@media (min-width: 1100px) {
  .menu-toggle { display: none; }
  .menu { position: static; display: block; background: none; border: 0; }
  .menu ul { display: flex; gap: 8px; padding: 0; }
  .menu a { font-size: 14px; padding: 8px; border: 0; gap: 8px; }
  .menu-category-icon { display: none; }
}

/* Mobile : le titre occupe la largeur, le ciel se range dans l'espace libre au-dessus de lui. */
@media (max-width: 599px) {
  .hero-heading { padding-top: 104px; }
  .scene-sun { top: calc(var(--p) * 2); right: 42%; }
  .scene-cloud.c5, .scene-cloud.c6 { display: none; }
  .scene-cloud.c3 { --cloud-lane: 0; }
  .scene-cloud.c4 { --cloud-lane: 1; }
  .scene-cloud.c7 { --cloud-lane: .5; }
  .scene-cloud.c8 { --cloud-lane: .25; }
  .scene-cloud.c9 { --cloud-lane: .75; }
  /* Sur mobile, relever la colline et prolonger sa base garde le lac visible derrière le moulin. */
  .layer-mid {
    height: calc(var(--p) * 57);
    background-image: url("/assets/paysage-milieu.svg"), linear-gradient(#a9cd8e, #a9cd8e);
    background-repeat: repeat-x, no-repeat;
    background-size: calc(var(--p) * 288) calc(var(--p) * 30), 100% calc(var(--p) * 27);
    background-position: calc(50% + var(--shift-x, 0px)) top, center bottom;
  }
  .scene-birds { top: calc(var(--p) * 3); }
}

@media (max-height: 500px) {
  .hero { --p: 2px; --landscape: 90px; }
  .scene-cloud.c5, .scene-cloud.c6 { display: none; }
  .hero-heading { padding: 12px 20px calc(var(--landscape) + 12px); }
  .hero h1 { font-size: 48px; }
  .hero-date { font-size: 24px; margin-bottom: 4px; }
  .hero-actions { flex-direction: row; gap: 12px; margin-top: 14px; padding-top: 0; width: min(100%, 440px); }
  .hero-actions .btn { min-height: 44px; min-width: 0; flex: 1; padding: 8px 14px; font-size: 20px; }
}

@media (min-height: 501px) and (max-height: 740px) {
  .hero { --p: 3px; }
  .hero-heading { padding-top: 48px; }
  .hero h1 { font-size: clamp(42px, 9vw, 72px); }
  .hero-actions { padding-top: 16px; gap: 12px; }
}

@media (min-height: 501px) and (max-height: 600px) {
  .hero { --p: 2px; }
  .hero-heading { padding-top: 24px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { min-height: 44px; padding: 8px 16px; font-size: 20px; }
}

@media (max-height: 380px) {
  .hero { --p: 1px; --landscape: 49px; }
  .hero-heading { padding: 6px 16px calc(var(--landscape) + 6px); }
  .hero h1 { font-size: 36px; }
  .hero-date { font-size: 20px; margin: 0 0 4px; }
  .hero-actions { margin-top: auto; gap: 10px; }
  .hero-actions .btn { font-size: 16px; line-height: 1.2; padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
.restore-field[hidden] { display: none; }
.admin-actions .restore-field { width: auto; }

/* ---------- Formulaire de réponse (invitation et aperçu de l'éditeur) ---------- */
.rsvp-form { counter-reset: rsvp-step; }
.rsvp-form .field { margin-bottom: 16px; }
.rsvp-step { counter-increment: rsvp-step; min-width: 0; margin: 0; padding: 22px 0 8px; border: 0; border-top: 2px dashed var(--soft-line); }
.rsvp-form > h3 + .rsvp-step { border-top: 0; padding-top: 4px; }
.rsvp-step > legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 6px; padding: 0; font: 700 20px/1.3 var(--sans); color: var(--accent-dark); }
.rsvp-step > legend + * { clear: both; }
.rsvp-step-number { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; background: var(--accent); color: #fff; font: 22px/1 var(--display);
  box-shadow: 0 -2px 0 0 var(--accent), 0 2px 0 0 var(--accent), -2px 0 0 0 var(--accent), 2px 0 0 0 var(--accent); margin: 2px; }
.rsvp-step-number::before { content: counter(rsvp-step); }
.rsvp-step-intro { margin: 0 0 14px 46px; font-size: 14px; color: var(--muted); }
.rsvp-avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; background: #fff; color: var(--accent-dark); font: 700 13px var(--sans);
  box-shadow: 0 -2px 0 0 var(--soft-line), 0 2px 0 0 var(--soft-line), -2px 0 0 0 var(--soft-line), 2px 0 0 0 var(--soft-line); margin: 2px; }

.presence-list { display: grid; gap: 8px; margin-bottom: 14px; }
.presence-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg); border: 2px solid var(--soft-line); transition: border-color .15s, background .15s; }
.presence-row:has(input[value="yes"]:checked) { border-color: var(--accent); background: var(--bg-alt); }
.presence-row:has(input[value="no"]:checked) .presence-name { color: var(--muted); }
.presence-name { font-weight: 700; overflow-wrap: anywhere; }
.rsvp-form .presence-answer .field { margin: 0; }
.presence-toggle { display: flex; min-width: 0; margin: 0; padding: 0; border: 0; }
.presence-toggle > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.presence-toggle label, .choice-chips label { position: relative; margin: 0; cursor: pointer; }
.presence-toggle input, .choice-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.presence-toggle span { display: block; min-width: 68px; padding: 7px 14px; text-align: center; font-weight: 700; color: var(--muted); background: #fff; border: 2px solid var(--soft-line); transition: background .15s, color .15s; }
.presence-toggle label + label span { margin-left: -2px; }
.presence-toggle label:hover span, .choice-chips label:hover span { border-color: var(--accent); }
.presence-toggle input:checked + span { position: relative; color: #fff; background: var(--accent); border-color: var(--accent); }
.presence-toggle input[value="no"]:checked + span { background: var(--muted); border-color: var(--muted); }
.presence-toggle input:focus-visible + span, .choice-chips input:focus-visible + span { outline: 3px dashed var(--accent); outline-offset: 2px; position: relative; }

.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-chips span { display: block; padding: 6px 14px; font-size: 15px; background: var(--bg); border: 2px solid var(--soft-line); transition: background .15s, color .15s, border-color .15s; }
.choice-chips input:checked + span { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 700; }

.needs-list { display: grid; gap: 14px; margin-bottom: 14px; }
.guest-needs { min-width: 0; margin: 0; padding: 12px 16px 0; background: #fff; border: 2px solid var(--soft-line); }
.guest-needs > legend { display: flex; align-items: center; gap: 10px; max-width: 100%; margin-left: -6px; padding: 0 6px; font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.guest-needs .rsvp-avatar { width: 28px; height: 28px; font-size: 11px; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.logistics-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rsvp-form .event-grid .field, .rsvp-form .logistics-fields > .field-checkbox { margin: 0; }
.logistics-fields > :not(.field-checkbox) { grid-column: 1 / -1; margin: 6px 0 0; }
.event-grid .check, .logistics-fields .check {
  height: 100%; margin: 0; padding: 12px; border: 2px solid var(--soft-line); background: var(--bg);
  transition: border-color .15s, background .15s;
}
.event-grid .check:has(input:checked), .logistics-fields .check:has(input:checked) { border-color: var(--accent); background: var(--bg-alt); }
.event-grid .check span, .logistics-fields .check span { font-weight: 700; }
.rsvp-form .check span { display: grid; grid-template-columns: auto 1fr; align-content: start; }
.rsvp-form .check span::before { grid-row: span 2; }
.rsvp-form .check small { grid-column: 2; margin-top: 2px; font-weight: 400; font-size: 13px; line-height: 1.4; color: var(--muted); }

.rsvp-summary { margin: 0 0 16px; padding: 12px 14px; font-weight: 700; background: var(--bg-alt); border-left: 4px solid var(--accent); }
.rsvp-summary.is-pending { background: #fbf5ea; border-left-color: var(--gold); }
@media (max-width: 599px) {
  .event-grid { grid-template-columns: 1fr; }
  .rsvp-step-intro { margin-left: 0; }
}
@media (max-width: 420px) {
  .presence-row { grid-template-columns: auto minmax(0, 1fr); }
  .presence-answer { grid-column: 1 / -1; }
  .presence-toggle label { flex: 1; }
}
