/* ==========================================================================
   Design « Minimal » — style typographique suisse
   Blanc, noir, un rouge signal ; grille de 12 colonnes, fer à gauche
   ========================================================================== */

:root {
    --paper: #ffffff;
    --ink: #111111;
    --grey: #5c5c5c;
    --rule: #111111;
    --soft: #ececea;
    --red: #d90019;
    --bar-h: 56px;
    --gutter: clamp(1rem, 3vw, 2rem);
    --pad: clamp(1rem, 4vw, 3rem);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    background: var(--paper); color: var(--ink); font-family: var(--text);
    font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }
::selection { background: var(--red); color: #fff; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: .5rem; color: #fff; }

/* --- Grille ------------------------------------------------------------- */
.m-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gutter);
    max-width: 1320px; margin: 0 auto; padding: 0 var(--pad);
}
@media (min-width: 900px) { .m-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } }

/* --- Barre de navigation ------------------------------------------------ */
.m-bar {
    position: sticky; top: 0; z-index: 50; height: var(--bar-h); display: flex; align-items: center; gap: 1.5rem;
    padding: 0 var(--pad); background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .3s;
}
.m-bar.is-scrolled { border-bottom-color: var(--ink); }
.m-mark { font-family: var(--display); font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.menu-links { display: flex; gap: clamp(.9rem, 3vw, 2.2rem); list-style: none; margin: 0 0 0 auto; padding: 0; }
.menu-links a { display: inline-flex; align-items: baseline; gap: .4rem; text-decoration: none; font-size: .95rem; font-weight: 500; padding: .3rem 0; border-bottom: 2px solid transparent; }
.menu-links a span { font-size: .72rem; font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums; }
.menu-links a:hover, .menu-links a.is-active { border-bottom-color: var(--ink); }
@media (max-width: 559.98px) {
    .m-mark { display: none; }
    .menu-links { margin: 0; width: 100%; justify-content: space-between; gap: .5rem; }
    .menu-links a { font-size: .9rem; }
    .menu-links a span { display: none; }
}

/* --- Ouverture ---------------------------------------------------------- */
.m-hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); border-bottom: 2px solid var(--rule); }
.m-hero .m-grid { row-gap: 1.5rem; align-items: start; }
.m-kicker, .m-to, .m-photo, .m-names, .m-numerals, .m-facts { grid-column: 1 / -1; }
.m-kicker { margin: 0; font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; }
.m-kicker::before { content: ""; display: inline-block; width: .7em; height: .7em; background: var(--red); margin-right: .6em; vertical-align: -.02em; }
.m-to { margin: 0; font-size: 1.05rem; }
.m-to span { color: var(--grey); }
.m-names {
    font-family: var(--display); font-weight: 800; font-size: clamp(3.4rem, 15vw, 8.4rem); line-height: .88;
    letter-spacing: -.045em; margin: 0; overflow-wrap: anywhere;
}
.m-line { display: block; overflow: hidden; padding-bottom: .04em; }
.m-line > span { display: inline-block; }
.m-amp { color: var(--red); font-weight: 500; }
.m-photo { position: relative; background: var(--soft); aspect-ratio: 4 / 5; max-height: 78vh; overflow: hidden; }
.m-photo .carousel, .m-photo .carousel-inner, .m-photo .carousel-item { height: 100%; }
.m-photo .carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.05); }
.m-numerals {
    font-family: var(--display); font-weight: 800; font-size: clamp(3.4rem, 22vw, 13rem); line-height: .8; letter-spacing: -.06em;
    margin: .5rem 0 0; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.m-numerals i { font-style: normal; color: var(--red); }
.m-numerals .m-year { color: var(--ink); }
.m-facts { margin: 0; display: grid; grid-template-columns: 1fr; border-top: 2px solid var(--rule); }
.m-facts > div { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.m-facts dt { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); padding-top: .2rem; }
.m-facts dd { margin: 0; font-weight: 500; }

@media (min-width: 900px) {
    .m-kicker { grid-column: 1 / 4; }
    .m-to { grid-column: 4 / 8; }
    .m-names { grid-column: 1 / 8; grid-row: 2 / 3; font-size: clamp(5rem, 9.4vw, 9.4rem); }
    .m-photo { grid-column: 9 / 13; grid-row: 1 / 4; aspect-ratio: 3 / 4; }
    .m-numerals { grid-column: 1 / 9; grid-row: 3 / 4; align-self: end; font-size: clamp(7rem, 15vw, 13.5rem); }
    .m-facts { grid-column: 1 / 13; grid-row: 4 / 5; grid-template-columns: repeat(3, 1fr); column-gap: var(--gutter); margin-top: 2rem; }
    .m-facts > div { grid-template-columns: 1fr; gap: .2rem; border-bottom: 0; }
}

/* Indicateurs du carrousel : petits carrés */
.m-photo .carousel-indicators { margin: 0; left: auto; right: 1rem; bottom: 1rem; gap: .35rem; justify-content: flex-end; }
.m-photo .carousel-indicators [data-bs-target] { width: 12px; height: 12px; margin: 0; border: 0; background: #fff; opacity: .55; transition: opacity .3s, background-color .3s; }
.m-photo .carousel-indicators .active { opacity: 1; background: var(--red); }

/* Seul mouvement : les prénoms montent dans leur ligne */
@media (prefers-reduced-motion: no-preference) {
    .js .m-line > span { animation: m-rise .9s var(--ease) both; }
    .js .m-line:nth-child(2) > span { animation-delay: .08s; }
    .js .m-line:nth-child(3) > span { animation-delay: .16s; }
}
@keyframes m-rise { from { transform: translateY(105%); } to { transform: none; } }

/* --- Sections ----------------------------------------------------------- */
.m-sec { padding: clamp(3rem, 8vw, 6rem) 0; border-bottom: 2px solid var(--rule); }
.m-label { grid-column: 1 / -1; margin-bottom: 1.6rem; display: flex; align-items: baseline; gap: 1rem; }
.m-label span { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--red); font-variant-numeric: tabular-nums; }
.m-label h2 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 2.6rem); letter-spacing: -.03em; line-height: 1; margin: 0; }
.m-body { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 900px) {
    .m-label { grid-column: 1 / 4; flex-direction: column; gap: .6rem; margin: 0; position: sticky; top: calc(var(--bar-h) + 1.5rem); align-self: start; }
    .m-body { grid-column: 4 / 11; }
}
.m-lead { font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.35; font-weight: 500; letter-spacing: -.01em; margin: 0 0 2rem; max-width: 30em; }
.m-day { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.02em; margin: 0; }
.m-day em { font-style: normal; color: var(--red); }
.m-where { margin: .3rem 0 0; color: var(--grey); font-size: 1.1rem; }

/* Compte à rebours : chiffres massifs, filets fins */
.m-count { margin-top: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--rule); padding-top: 1rem; }
.m-count-label { margin: 0 0 .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.countdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); font-variant-numeric: tabular-nums; }
.countdown .cell { border-left: 1px solid var(--rule); padding-left: .7rem; min-width: 0; }
.countdown .cell:first-child { border-left: 0; padding-left: 0; }
.countdown b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 11vw, 6rem); line-height: .95; letter-spacing: -.04em; }
.countdown .cell:first-child b { color: var(--red); }
.countdown span { display: block; font-size: .95rem; font-weight: 500; margin-top: .3rem; }

/* Programme : lignes réglées, heure en gros */
.programme-list { margin: 0; border-top: 2px solid var(--rule); }
.programme-row { display: grid; grid-template-columns: 1fr; gap: .3rem; padding: 1.2rem 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 560px) { .programme-row { grid-template-columns: 9rem 1fr; gap: var(--gutter); } }
.programme-list dt { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.programme-list dd { margin: 0; font-size: 1.1rem; padding-top: .2rem; }
.programme-list strong { font-weight: 700; }
.programme-list small { display: block; color: var(--grey); font-size: 1.05rem; margin-top: .3rem; max-width: 34em; }

/* Tenue */
.m-h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -.02em; margin: 0 0 .5rem; }
.m-intro { margin: 0 0 2rem; max-width: 34em; color: var(--ink); }
.m-dress { margin: 0; display: grid; grid-template-columns: 1fr; column-gap: var(--gutter); border-top: 2px solid var(--rule); }
@media (min-width: 700px) { .m-dress { grid-template-columns: 1fr 1fr; } }
.m-dress > div { padding: 1.1rem 0 1.3rem; border-bottom: 1px solid var(--rule); }
.m-dress dt { font-weight: 700; font-size: 1.05rem; margin-bottom: .25rem; }
.m-dress dt span { color: var(--red); font-variant-numeric: tabular-nums; margin-right: .7rem; font-size: .85rem; }
.m-dress dd { margin: 0; color: var(--ink); }

/* --- Réponse ------------------------------------------------------------ */
.m-sec--rsvp { background: var(--soft); }
.m-ask { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 6vw, 3.6rem); letter-spacing: -.04em; line-height: 1; margin: 0 0 1.5rem; }
.m-rsvp { max-width: 640px; }
.rsvp-deadline { margin: 0 0 2rem; font-weight: 500; }
.rsvp-deadline::before { content: ""; display: inline-block; width: .6em; height: .6em; background: var(--red); margin-right: .6em; }
.rsvp-note { margin: 0; padding: 1.2rem 0; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule); }
.rsvp-done { border-top: 2px solid var(--rule); padding: 1.2rem 0 1.6rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--rule); }
.done-head { font-family: var(--display); font-weight: 800; font-size: 1.8rem; letter-spacing: -.03em; margin: 0 0 .4rem; }
.done-text { margin: 0 0 1rem; }
.btn-link-gold { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: .3em; cursor: pointer; }
.btn-link-gold:hover { color: var(--red); }
.rsvp-form .field { border: 0; padding: 0; margin: 0 0 1.8rem; min-width: 0; }
.rsvp-form label:not(.guest-pill), .rsvp-form legend {
    float: none; display: block; width: auto; padding: 0; margin: 0 0 .5rem;
    font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.rsvp-form small { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--grey); font-size: .9rem; }
.form-control.engraved {
    border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink);
    padding: .75rem .9rem; font-family: var(--text); font-size: 1.1rem;
}
.form-control.engraved:focus { box-shadow: none; border-color: var(--red); background: #fff; outline: 0; }
.form-control.engraved[readonly] { background: transparent; padding: .2rem 0; border-bottom: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.2rem); letter-spacing: -.03em; }
textarea.form-control.engraved { min-height: 7rem; resize: vertical; }
.guests-row { display: flex; flex-wrap: wrap; gap: 0; }
.guest-pill {
    width: 3.4rem; height: 3.4rem; display: grid; place-items: center; cursor: pointer; margin: 0 -2px 0 0;
    border: 2px solid var(--ink); background: var(--paper); font-family: var(--display); font-weight: 700; font-size: 1.25rem;
    transition: background-color .2s, color .2s;
}
.guest-pill:hover { background: var(--ink); color: #fff; }
.btn-check:checked + .guest-pill { background: var(--red); border-color: var(--red); color: #fff; position: relative; z-index: 1; }
.btn-check:focus-visible + .guest-pill { outline: 3px solid var(--ink); outline-offset: 3px; z-index: 2; position: relative; }
.hint { font-size: .95rem; color: var(--grey); margin: .6rem 0 0; }
.hint.text-center { text-align: left !important; }
.choice { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 480px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-height: 7rem; padding: 1.1rem 1.2rem;
    border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); text-align: left; font: inherit; cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.choice-tile:first-child { background: var(--ink); color: #fff; }
.choice-head { font-family: var(--display); font-weight: 800; font-size: 1.7rem; letter-spacing: -.03em; line-height: 1.05; }
.choice-text { font-size: 1rem; }
.choice-current { margin-top: auto; padding-top: .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.choice-current::before { content: "● "; color: var(--red); }
.choice-tile:first-child .choice-current::before { color: #fff; }
.choice-tile:hover, .choice-tile:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }
.choice-tile:hover .choice-current::before, .choice-tile:focus-visible .choice-current::before { color: #fff; }
.rsvp-form.is-sending .choice-tile { opacity: .5; pointer-events: none; }
.rsvp-errors { border-left: 6px solid var(--red); background: #fff; padding: .9rem 1.1rem; margin-bottom: 1.6rem; color: #a30013; font-weight: 500; }
.rsvp-errors p { margin: 0; }

/* --- Pied de page ------------------------------------------------------- */
.m-foot { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(5rem, 8vw, 4rem); }
.m-foot .m-grid { row-gap: .6rem; align-items: end; }
.m-foot p { margin: 0; }
.m-foot-names, .m-foot-date, .m-foot-credits, .m-foot-top { grid-column: 1 / -1; }
.m-foot-names { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.04em; line-height: 1; }
.m-foot-names i { font-style: normal; color: var(--red); }
.m-foot-date { font-weight: 700; font-variant-numeric: tabular-nums; }
.m-foot-credits { color: var(--grey); font-size: .95rem; }
.m-foot-top { font-weight: 600; font-size: .95rem; text-decoration: none; justify-self: start; }
.m-foot-top:hover { color: var(--red); }
@media (min-width: 900px) {
    .m-foot-names { grid-column: 1 / 7; }
    .m-foot-date { grid-column: 7 / 9; }
    .m-foot-credits { grid-column: 9 / 12; }
    .m-foot-top { grid-column: 12 / 13; justify-self: end; }
}
