:root {
  
  color-scheme: light;
  --red: #e14036;
  --red-deep: #cd3a45;
  --paper: #f3e9db;          /* beige de fond */
  --paper-deep: #ecdfcc;     /* beige soutenu, alternance de sections */
  --card: #fbf6ed;           /* crème des cartes */
  --ink: #2b211c;
  --muted: #736355;
  --line: rgba(43, 33, 28, .15);
  --line-red: rgba(225, 64, 54, .3);

  --display: "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; font-weight: 400; line-height: 1.7; -webkit-font-smoothing: antialiased; }
::selection { color: var(--card); background: var(--red); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.06; text-transform: uppercase; }
h1 { margin: 0; color: var(--red); font-size: clamp(2.6rem, 8.5vw, 5.6rem); letter-spacing: .02em; }
h2 { margin-bottom: 0; font-size: clamp(1.9rem, 4.4vw, 3.3rem); letter-spacing: .05em; }
h3 { margin-bottom: .7rem; font-size: clamp(1.05rem, 1.9vw, 1.35rem); letter-spacing: .13em; }

.kicker { margin-bottom: 14px; color: var(--red); font-size: .68rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; }
.script-line { color: var(--red); font-family: var(--display); font-style: italic; font-size: clamp(1.4rem, 2.8vw, 2.1rem); line-height: 1.25; text-transform: none; }

.wedding-page { overflow-x: clip; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; min-height: 76px; padding: 0 max(22px, calc((100% - 1120px)/2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(243, 233, 219, .92); backdrop-filter: blur(10px); }
.logo { font-family: var(--display); font-size: 1.15rem; letter-spacing: .2em; text-transform: uppercase; }
.logo i { color: var(--red); font-style: normal; }
.nav { display: flex; align-items: center; gap: 30px; font-size: .68rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.nav a { padding-bottom: 3px; border-bottom: 1px solid transparent; transition: border-color .2s ease, color .2s ease; }
.nav a:hover { color: var(--red); border-bottom-color: var(--red); }
.nav-rsvp { color: var(--red) !important; }
.menu-button { display: none; position: relative; z-index: 40; width: 40px; height: 40px; padding: 0; border: 0; background: none; }
.menu-button span { display: block; width: 24px; height: 1.5px; margin: 0 auto; background: var(--ink); transition: transform .32s cubic-bezier(.4, 0, .2, 1); }
.menu-button span + span { margin-top: 7px; }
.menu-button[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: clamp(66px, 8vw, 118px) max(22px, calc((100% - 1120px)/2)); }
.section-title { margin-bottom: 52px; text-align: center; }
.section-title h2 { margin-inline: auto; }

.paper-section + .paper-section { padding-top: clamp(28px, 3.5vw, 50px); }
.one-column { display: grid; grid-template-columns: minmax(0, 1fr); }

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100svh - 76px); padding-top: 34px; padding-bottom: 44px; text-align: center; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08; background: repeating-linear-gradient(90deg, transparent 0 44px, var(--red) 44px 78px, transparent 78px 122px); -webkit-mask-image: linear-gradient(to bottom, transparent, black 25%, black 82%, transparent); mask-image: linear-gradient(to bottom, transparent, black 25%, black 82%, transparent); }
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero-art { width: min(100%, 660px); margin: 2px auto 10px; }
.hero h1 b { font-weight: 400; }
.hero-date { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3vw, 28px); width: 100%; max-width: 520px; margin: 28px auto 16px; color: var(--red); font-size: clamp(.95rem, 2.4vw, 1.3rem); font-weight: 500; letter-spacing: .26em; text-transform: uppercase; }
.hero-date::before, .hero-date::after { content: ""; flex: 1 1 0; min-width: 24px; height: 1px; background: var(--line-red); }
.hero-date span { flex: 0 0 auto; white-space: nowrap; }
.hero-place { margin-bottom: 30px; color: var(--muted); font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; }
.hero-inner small { display: block; margin-top: 20px; color: var(--muted); font-size: .78rem; }

/* ---------- Boutons ---------- */
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 12px 30px; border: 1px solid var(--red); background: var(--red); color: var(--card); font-size: .68rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; transition: background .2s ease, color .2s ease; }
.button:hover { background: var(--red-deep); border-color: var(--red-deep); }
.button.outline { background: transparent; color: var(--red); }
.button.outline:hover { background: var(--red); color: var(--card); }

/* ---------- Compte à rebours ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); padding: 30px max(22px, calc((100% - 780px)/2)); border-block: 1px solid var(--line); background: var(--paper-deep); text-align: center; }
.countdown div + div { border-left: 1px solid var(--line); }
.countdown strong { display: block; color: var(--red); font-family: var(--display); font-size: clamp(1.8rem, 4.4vw, 3.1rem); font-weight: 400; line-height: 1.1; }
.countdown span { color: var(--muted); font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; }

/* ---------- Programme ---------- */
.day-label { width: fit-content; margin: 0 auto 34px; padding-bottom: 8px; border-bottom: 1px solid var(--line-red); color: var(--red); font-size: 1.2rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; }
.day-label.outline { margin-top: 74px; }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.event-card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); background: var(--card); }
.event-card img { width: 100%; margin-bottom: 24px; mix-blend-mode: multiply; }
.event-card .kicker { margin-bottom: 10px; }
.event-card p:not(.kicker):not(.time) { margin-bottom: 0; color: var(--muted); font-size: .95rem; }
.time { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: .74rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.brunch-panel { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); align-items: center; gap: 44px; padding: 34px; border: 1px solid var(--line); background: var(--card); }
.brunch-art { width: 100%; mix-blend-mode: multiply; }
.brunch-panel p:not(.kicker) { margin-bottom: 0; color: var(--muted); font-size: .95rem; }

/* ---------- La table ---------- */
.table-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; gap: clamp(38px, 6vw, 80px); border-block: 1px solid var(--line); background: var(--card); }
.table-art { width: 100%; max-width: 400px; margin-inline: auto; }
.table-art img { width: 100%; mix-blend-mode: multiply; }
.table-copy > p:not(.kicker):not(.script-line) { max-width: 54ch; color: var(--muted); }
.table-copy .script-line { margin: 18px 0 20px; }
.food-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 18px; }
.food-list span { padding: 7px 16px; border: 1px solid var(--line-red); color: var(--red); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; }
.table-copy small { color: var(--muted); font-size: .8rem; }

/* ---------- Hébergements ---------- */
.notice { max-width: 720px; margin: 0 auto 40px; padding: 18px 24px; border: 1px solid var(--line-red); color: var(--muted); font-size: 1.05rem; text-align: center; }
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 28px; margin-bottom: 36px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 4px 0; border: 0; background: none; color: var(--muted); font-size: .68rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--red); border-bottom-color: var(--red); }
.lodging-grid { max-width: 1000px; margin: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.lodging-card { min-height: 200px; padding: 26px; background: var(--card); transition: background .2s ease; }
.lodging-card:hover { background: var(--paper-deep); }
.bed-mark { display: block; margin-bottom: 14px; color: var(--red); font-family: var(--display); font-size: 1.1rem; }
.lodging-card h3 { margin-bottom: .6rem; font-size: 1rem; letter-spacing: .1em; }
.lodging-card p { color: var(--muted); font-size: .88rem; }
.lodging-card strong, .text-link { color: var(--red); font-size: .64rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.text-link { border-bottom: 1px solid var(--line-red); padding-bottom: 2px; }
.city-note { max-width: 680px; margin: 44px auto 0; color: var(--muted); font-size: .92rem; text-align: center; }

/* ---------- Enfants — le seul aplat rouge ---------- */
.children-section { padding-top: 88px; padding-bottom: 88px; color: var(--card); background: var(--red); text-align: center; }
.baby-icon { width: clamp(64px, 8vw, 78px); height: auto; margin: 0 auto 26px; color: var(--card); }
.children-section h2, .children-section .kicker { color: var(--card); }
.children-section > p { max-width: 54ch; margin-inline: auto; color: rgba(251, 246, 237, .85); }
.children-section .notice { margin-top: 30px; border-color: rgba(251, 246, 237, .38); color: rgba(251, 246, 237, .92); }
.notice.with-icon { display: flex; align-items: center; gap: 16px; text-align: left; }
.notice-icon { flex: 0 0 auto; width: 26px; height: 26px; }

/* ---------- Infos pratiques ---------- */
.address-grid article, .practical-grid article { padding: 30px; border: 1px solid var(--line); background: var(--card); }
.number { display: block; margin-bottom: 14px; color: var(--red); font-family: var(--display); font-size: 1.6rem; letter-spacing: .1em; }
.practical-grid { margin-top: 40px; }
.address-grid p, .practical-grid p { color: var(--muted); font-size: .93rem; }
.taxi-block ul { margin: 22px 0 0; padding: 0; list-style: none; }
.taxi-block li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.taxi-block li:last-child { border-bottom: 0; }
.taxi-block a { color: var(--red); white-space: nowrap; }

/* ---------- RSVP ---------- */
.rsvp-section { position: relative; border-top: 1px solid var(--line); background: var(--paper-deep); }
.rsvp-section::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; background: repeating-linear-gradient(90deg, transparent 0 40px, var(--red) 40px 72px, transparent 72px 114px); }
.rsvp-card { position: relative; max-width: 780px; margin: auto; padding: clamp(28px, 6vw, 62px); border: 1px solid var(--line); background: var(--card); }
form { display: grid; gap: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form label, legend { color: var(--muted); font-size: .82rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
input:not([type="radio"]), textarea { width: 100%; margin-top: 10px; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; outline: 0; background: transparent; color: var(--ink); font-size: 1.05rem; transition: border-color .2s ease; }
input:not([type="radio"]):focus, textarea:focus { border-bottom-color: var(--red); }
input[type="radio"] { accent-color: var(--red); }
textarea { min-height: 76px; resize: vertical; }
fieldset { margin: 0; padding: 0; border: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 12px; }
.choice-row input[type="radio"] { width: 19px; height: 19px; }
.choice-row label { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.02rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.counter-row { display: flex; gap: 40px; flex-wrap: wrap; }
.counter { display: flex; align-items: center; width: fit-content; margin-top: 10px; border: 1px solid var(--line); background: var(--card); }
.counter button { width: 50px; height: 50px; border: 0; background: transparent; color: var(--red); font-size: 1.5rem; line-height: 1; transition: background .2s ease; }
.counter button:hover { background: var(--paper-deep); }
.counter strong { width: 56px; font-family: var(--display); font-size: 1.6rem; font-weight: 400; text-align: center; }
.submit { width: 100%; }
.submit[disabled] { opacity: .55; pointer-events: none; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: -8px 0 0; padding: 12px 16px; border: 1px solid var(--line-red); color: var(--red); font-size: .88rem; }
.form-error[hidden] { display: none; }
.success { padding: 34px; text-align: center; }
.success span { display: block; margin-bottom: 10px; color: var(--red); font-size: 2.2rem; line-height: 1; }
.success p { color: var(--muted); margin-bottom: 0; }

.day-block { padding: 26px 28px 28px; border: 1px solid var(--line-red); background: rgba(225, 64, 54, .04); }
.day-block legend { padding: 0 12px; margin-left: -12px; color: var(--red); font-family: var(--display); font-size: 1.15rem; font-weight: 500; letter-spacing: .1em; }
.day-sub { margin: 10px 0 0; color: var(--ink); font-size: 1rem; margin-bottom: 30px!important;}
.field-note { margin: 8px 0 20px; color: var(--muted); font-size: .95rem; font-weight: 400; line-height: 1.55; letter-spacing: 0; text-transform: none; }

/* Les deux compteurs d'une journee, cote a cote */
.counter-row { display: flex; flex-wrap: wrap; gap: 36px; }
.counter-field { flex: 0 0 auto; }
.counter-label { display: block; color: var(--ink); font-size: .92rem; font-weight: 500; letter-spacing: .04em; }

/* Question secondaire dans le bloc du samedi */
.sub-question { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-red); }

/* Ages des enfants : n'apparait que s'il y a des enfants */
.ages-block { padding: 22px 24px; border: 1px solid var(--line); background: var(--card); }
.ages-block[hidden] { display: none; }
.ages-block label { margin-bottom: 0; color: var(--ink); font-size: .92rem; letter-spacing: .04em; text-transform: none; }
.ages-block .field-note { margin: 6px 0 0; }
.ages-block input { margin-top: 12px; }

/* Recapitulatif en clair de ce qui sera envoye */
.recap { margin: 0; padding: 16px 20px; border-left: 3px solid var(--red); background: var(--card); color: var(--ink); font-size: .95rem; }
.recap:empty { display: none; }
#presenceDetails { display: grid; gap: 24px; }

/* ---------- Footer ---------- */
footer { padding: 58px 22px 66px; border-top: 1px solid var(--line); text-align: center; }
footer .script-line { margin-bottom: 20px; }
footer strong { color: var(--muted); font-size: .62rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .two-column, .table-section, .brunch-panel { grid-template-columns: 1fr; }
  .brunch-panel { gap: 28px; }
  .brunch-art { max-width: 260px; margin-inline: auto; }
  .table-section { text-align: center; }
  .table-art { max-width: 320px; }
  .table-copy > p:not(.kicker):not(.script-line) { margin-inline: auto; }
  .food-list { justify-content: center; }
}

@media (max-width: 820px) {
  .menu-button { display: block; }
  .logo, .menu-button { position: relative; z-index: 30; }
  .nav {
    position: absolute; top: 0; left: 0; z-index: 20;
    width: 100%; height: 100vh; height: 100dvh;
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 96px 24px 48px;
    background: rgba(251, 246, 237, .95);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    font-size: .78rem; letter-spacing: .24em;
    opacity: 0; visibility: hidden; transform: translateY(-14px);
    transition: opacity .34s ease, transform .34s ease, visibility .34s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 16px 12px; border-bottom: 0; opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; }
  .nav.open a { opacity: 1; transform: none; }
  .nav.open a:nth-child(1) { transition-delay: .10s; }
  .nav.open a:nth-child(2) { transition-delay: .16s; }
  .nav.open a:nth-child(3) { transition-delay: .22s; }
  .nav.open a:nth-child(4) { transition-delay: .28s; }
  .nav.open a:nth-child(5) { transition-delay: .34s; }
  body.nav-open { overflow: hidden; }
  .hero { min-height: auto; padding-top: 44px; }
  .taxi-block li { align-items: flex-start; flex-direction: column; gap: 2px; }
}

@media (max-width: 520px) {
  h3 { font-size: .9rem; }
  .section { padding-inline: 18px; }
  .countdown { padding-inline: 10px; }
  .countdown span { font-size: .52rem; letter-spacing: .14em; }
  .form-row { grid-template-columns: 1fr; }
  .tabs { gap: 18px; }
}

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

@media print {
  .site-header, .countdown, .hero::before, .rsvp-section, footer { display: none !important; }
  body { background: #fff; }
  .section { padding: 12mm 0; }
}
