/* ==========================================================================
   Design « Château » — faire-part gravé : bordeaux, ivoire, or ancien
   ========================================================================== */

:root {
    --wine: #5e1a26;
    --wine-2: #7a2433;
    --wine-deep: #3f0f18;
    --ivory: #f8f2e4;
    --ivory-2: #f1e7d0;
    --gold: #b08a3e;
    --gold-light: #dcc188;
    --gold-ink: #7a5c20;
    --ink: #2b1a1c;
    --muted: #5d4a45;
    --line: rgba(176, 138, 62, .55);
    --ease: cubic-bezier(.22, .8, .3, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }
body {
    color: var(--ink); font-family: var(--text); font-size: 1.2rem; line-height: 1.65; overflow-x: hidden;
    background-color: var(--wine);
    background-image:
        radial-gradient(circle at 50% 0, rgba(255, 255, 255, .08), transparent 60%),
        radial-gradient(circle at 12px 12px, rgba(220, 193, 136, .14) 1.2px, transparent 1.6px),
        radial-gradient(circle at 0 0, rgba(220, 193, 136, .08) 1px, transparent 1.4px);
    background-size: 100% 100%, 24px 24px, 24px 24px;
}
::selection { background: var(--wine); color: var(--ivory); }
a { color: var(--wine); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--ivory); color: var(--wine); padding: .5rem 1rem; z-index: 200; }
.skip-link:focus { top: 1rem; }

/* --- Navigation ------------------------------------------------------------- */
.c-nav { position: sticky; top: 0; z-index: 50; padding: .9rem 1rem; transition: background-color .3s, box-shadow .3s; }
.c-nav.is-scrolled { background: rgba(63, 15, 24, .96); box-shadow: 0 1px 0 rgba(220, 193, 136, .35); }
.c-nav .menu-links { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: .2rem 0; }
.c-nav li + li::before { content: "◆"; color: var(--gold); font-size: .5rem; vertical-align: middle; margin: 0 .9rem; }
.c-nav a { color: var(--ivory); text-decoration: none; font-variant: small-caps; letter-spacing: .1em; font-size: 1.1rem; font-weight: 500; }
.c-nav a:hover, .c-nav a.is-active { color: var(--gold-light); }

/* --- La feuille ivoire, double filet d'or ---------------------------------------- */
.c-sheet {
    position: relative; max-width: 880px; margin: .4rem .6rem 0; padding: 3.2rem 1.6rem 2rem; text-align: center;
    background: var(--ivory) radial-gradient(ellipse at 50% 0, #fffaf0, transparent 70%);
    border: 2px solid var(--gold);
    box-shadow: inset 0 0 0 7px var(--ivory), inset 0 0 0 8px var(--gold), 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.c-corner { position: absolute; width: 38px; height: 38px; }
.c-corner svg { width: 100%; height: 100%; fill: none; stroke: var(--gold); stroke-width: 1.4; }
.c-corner circle { fill: var(--gold); stroke: none; }
.c-corner--tl { top: 14px; left: 14px; }
.c-corner--tr { top: 14px; right: 14px; transform: scaleX(-1); }
.c-corner--bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.c-corner--br { bottom: 14px; right: 14px; transform: scale(-1); }

/* --- Ouverture ---------------------------------------------------------------- */
.c-crest { display: block; width: 150px; height: auto; margin: 0 auto 1.6rem; }
.c-stem { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; }
.c-bay { fill: var(--gold); opacity: .85; }
.c-crown { fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linejoin: round; }
.c-gem { fill: var(--gold); }
.c-shield { fill: var(--wine); stroke: var(--gold); stroke-width: 2.4; }
.c-shield-in { fill: none; stroke: var(--gold-light); stroke-width: 1; opacity: .8; }
.c-mono { font-family: var(--display); font-weight: 600; font-size: 46px; fill: var(--gold-light); }

.c-to { font-style: italic; color: var(--muted); margin: 0 0 1.6rem; font-size: 1.15rem; line-height: 1.4; }
.c-to strong { font-style: normal; font-weight: 600; color: var(--wine); font-size: 1.3rem; }
.c-kicker { font-family: var(--display); font-weight: 600; letter-spacing: .32em; font-size: .95rem; color: var(--gold-ink); margin: 0 0 1rem; text-transform: uppercase; }
.c-names { margin: 0; font-family: var(--display); font-weight: 500; color: var(--wine); line-height: 1.05; text-shadow: 0 1px 0 #fff, 0 -1px 0 rgba(63, 15, 24, .12); }
.c-name { display: block; font-size: clamp(2.5rem, 10vw, 4.6rem); letter-spacing: .04em; }
.c-name small { display: block; font-family: var(--text); font-variant: small-caps; font-weight: 500; letter-spacing: .18em; font-size: 1.15rem; color: var(--muted); margin-top: .35rem; text-shadow: none; }
.c-and { display: block; font-family: var(--text); font-style: italic; font-weight: 400; font-size: clamp(2rem, 6vw, 2.8rem); color: var(--gold-ink); margin: .4rem 0; }
.c-fleuron { display: block; width: min(240px, 70%); height: 24px; margin: 1.6rem auto; fill: none; stroke: var(--gold); stroke-width: 1.3; }
.c-fleuron .c-fill { fill: var(--gold); stroke: none; }
.c-date { font-size: 1.45rem; font-weight: 500; margin: 0; color: var(--ink); }
.c-date span { display: block; font-style: italic; font-size: 1.2rem; color: var(--muted); font-weight: 400; }
.c-venue { margin: 1rem 0 0; font-variant: small-caps; letter-spacing: .08em; font-size: 1.25rem; color: var(--wine); }
.c-venue em { font-variant: normal; letter-spacing: 0; color: var(--muted); }

.c-medallion {
    width: min(300px, 74vw); aspect-ratio: 4 / 5; margin: 2.6rem auto .6rem; border-radius: 50%; overflow: hidden; position: relative;
    border: 6px solid var(--ivory); box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 7px var(--ivory), 0 0 0 8px var(--gold), 0 24px 40px -20px rgba(63, 15, 24, .55);
}
.c-medallion .carousel, .c-medallion .carousel-inner, .c-medallion .carousel-item { height: 100%; }
.c-medallion .carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(.12) saturate(.95); }
.c-medallion .carousel-indicators { margin-bottom: 1.4rem; }
.c-medallion .carousel-indicators [data-bs-target] { width: 7px; height: 7px; border: 0; transform: rotate(45deg); background: var(--ivory); opacity: .6; margin: 0 5px; }
.c-medallion .carousel-indicators .active { opacity: 1; background: var(--gold-light); }

/* --- Sections ------------------------------------------------------------------- */
.c-section { padding: 3.5rem 0 1rem; max-width: 620px; margin: 0 auto; }
.c-h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 5.5vw, 2.4rem); letter-spacing: .08em; color: var(--wine); margin: 0; text-transform: uppercase; }
.c-section .c-fleuron { margin: 1rem auto 1.6rem; }
.c-lead { font-size: 1.25rem; margin: 0 auto 2rem; max-width: 30em; }

.c-ceremony, .programme-list { margin: 0; }
.c-ceremony, .programme-row { padding: 1.1rem 0; position: relative; }
.programme-row + .programme-row, .c-ceremony + .programme-list .programme-row:first-child { border-top: 1px solid var(--line); }
.c-ceremony dt, .programme-row dt { font-variant: small-caps; font-weight: 600; letter-spacing: .14em; color: var(--gold-ink); font-size: 1.2rem; font-variant-numeric: lining-nums; }
.c-ceremony dt { font-family: var(--display); font-variant: normal; text-transform: uppercase; font-size: 1.15rem; color: var(--wine); }
.c-ceremony dd { margin: .1rem 0 0; font-size: 1.2rem; }
.programme-row dd { margin: .1rem 0 0; }
.programme-row strong { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 1.15rem; color: var(--wine); }
.programme-row small { display: block; font-style: italic; color: var(--muted); font-size: 1.1rem; }
.c-count-label { margin: 2.2rem 0 .6rem; font-style: italic; color: var(--muted); }
.countdown { display: flex; justify-content: center; gap: 0; font-variant-numeric: lining-nums tabular-nums; }
.countdown .cell { padding: 0 1.2rem; }
.countdown .cell + .cell { border-left: 1px solid var(--line); }
.countdown b { display: block; font-family: var(--display); font-weight: 600; font-size: 2.3rem; line-height: 1.1; color: var(--wine); }
.countdown span { font-variant: small-caps; letter-spacing: .14em; font-size: 1.05rem; color: var(--muted); }

/* L'étiquette : bandeau bordeaux dans la feuille */
.c-section--band { max-width: none; margin: 3.5rem -1.6rem 0; padding: 3.2rem 1.6rem; background: var(--wine); color: var(--ivory); border-block: 1px solid var(--gold); box-shadow: inset 0 6px 0 var(--wine), inset 0 7px 0 var(--gold-light), inset 0 -6px 0 var(--wine), inset 0 -7px 0 var(--gold-light); }
.c-section--band .c-h2 { color: var(--ivory); }
.c-section--band .c-fleuron { stroke: var(--gold-light); }
.c-section--band .c-fleuron .c-fill { fill: var(--gold-light); }
.c-sub { font-size: 1.5rem; font-style: italic; color: var(--gold-light); margin: 0 0 .4rem; }
.c-intro { max-width: 32em; margin: 0 auto 2rem; }
.c-dress { margin: 0 auto; max-width: 560px; }
.c-dress div { padding: 1rem 0; }
.c-dress div + div { border-top: 1px solid rgba(220, 193, 136, .4); }
.c-dress dt { font-variant: small-caps; letter-spacing: .14em; font-weight: 600; font-size: 1.2rem; color: var(--gold-light); }
.c-dress dd { margin: 0; }

/* --- Réponse : carton R.S.V.P. --------------------------------------------------- */
.c-rsvp { position: relative; border: 1px solid var(--gold); outline: 1px solid var(--gold); outline-offset: 5px; padding: 2.4rem 1.2rem 2rem; margin: .6rem 6px 1.4rem; background: #fffaf0; }
.c-rsvp-mark { font-family: var(--display); font-weight: 600; letter-spacing: .4em; font-size: .95rem; color: var(--gold-ink); margin: 0 0 .6rem; }
.rsvp-deadline { font-style: italic; color: var(--muted); margin: 0 0 1.8rem; }
.rsvp-note { font-size: 1.15rem; margin: 0; }
.rsvp-form { text-align: left; }
.rsvp-done { border-block: 1px solid var(--line); padding: 1.2rem .5rem; margin-bottom: 1.6rem; text-align: center; }
.done-head { font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: .06em; text-transform: uppercase; color: var(--wine); margin: 0 0 .3rem; }
.done-text { margin: 0 0 .8rem; }
.btn-link-gold { background: none; border: 0; padding: 0; font: inherit; font-style: italic; color: var(--wine); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .3em; cursor: pointer; }
.rsvp-form .field { border: 0; padding: 0; margin: 0 0 1.6rem; min-width: 0; }
.rsvp-form label:not(.guest-pill), .rsvp-form legend { float: none; display: block; width: auto; margin: 0 0 .35rem; padding: 0; font-variant: small-caps; letter-spacing: .1em; font-weight: 600; font-size: 1.15rem; color: var(--wine); }
.rsvp-form label small { font-variant: normal; letter-spacing: 0; font-weight: 400; font-style: italic; color: var(--muted); }
.form-control.engraved { border: 0; border-bottom: 1px solid var(--gold); border-radius: 0; background: transparent; padding: .45rem .1rem; color: var(--ink); font-family: var(--text); font-size: 1.2rem; }
.form-control.engraved:focus { background: rgba(176, 138, 62, .07); box-shadow: 0 1px 0 var(--wine); border-color: var(--wine); }
.form-control.engraved[readonly] { font-style: italic; font-size: 1.45rem; color: var(--wine); background: transparent; }
textarea.form-control.engraved { border: 1px solid var(--line); padding: .6rem .8rem; background: var(--ivory); }
.guests-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.guest-pill { position: relative; isolation: isolate; width: 3.2rem; height: 3.2rem; display: grid; place-items: center; cursor: pointer; font-weight: 600; font-size: 1.25rem; color: var(--wine); }
.guest-pill::before { content: ""; position: absolute; inset: 7px; z-index: -1; border: 1px solid var(--wine); transform: rotate(45deg); transition: background-color .2s; }
.btn-check:checked + .guest-pill { color: var(--ivory); }
.btn-check:checked + .guest-pill::before { background: var(--wine); box-shadow: 0 0 0 3px #fffaf0, 0 0 0 4px var(--gold); }
.btn-check:focus-visible + .guest-pill { outline: 2px solid var(--gold); outline-offset: 2px; }
.hint { font-size: 1.05rem; font-style: italic; color: var(--muted); margin: .5rem 0 0; }
.choice { display: grid; grid-template-columns: 1fr; gap: .9rem; }
.choice-tile {
    display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: 1.1rem 1rem; border: 1px solid var(--wine); border-radius: 0;
    background: transparent; color: var(--wine); font: inherit; cursor: pointer; outline: 1px solid transparent; outline-offset: 4px;
    transition: outline-color .25s var(--ease), background-color .25s var(--ease);
}
.choice-tile:first-child { background: var(--wine); color: var(--ivory); }
.choice-tile:hover, .choice-tile:focus-visible { outline: 1px solid var(--gold); }
.choice-head { font-variant: small-caps; letter-spacing: .1em; font-weight: 600; font-size: 1.45rem; line-height: 1.2; }
.choice-text { font-style: italic; font-size: 1.05rem; }
.choice-current { margin-top: .3rem; font-size: .9rem; font-variant: small-caps; letter-spacing: .12em; border-top: 1px solid currentColor; padding-top: .2rem; }
.rsvp-form.is-sending .choice-tile { opacity: .6; pointer-events: none; }
.rsvp-errors { border: 1px solid #8f1d1d; background: #fbeeee; color: #7d1717; padding: .8rem 1rem; margin-bottom: 1.2rem; }
.rsvp-errors p { margin: 0; }

/* --- Pied de page --------------------------------------------------------------- */
.c-foot { text-align: center; color: var(--ivory); padding: 2.6rem 1rem 3rem; }
.c-foot-mono { font-family: var(--display); font-weight: 600; font-size: 2.2rem; color: var(--gold-light); margin: 0; letter-spacing: .1em; }
.c-foot-mono span { font-size: .5em; vertical-align: middle; margin: 0 .5em; }
.c-foot-names { margin: .2rem 0 0; font-variant: small-caps; letter-spacing: .12em; font-size: 1.15rem; }
.c-credits { margin: .6rem 0 0; font-size: 1.05rem; font-style: italic; color: #ecdcc0; }

@media (min-width: 560px) { .choice { grid-template-columns: 1fr 1fr; } .c-rsvp { padding: 2.8rem 2.4rem 2.2rem; } }
@media (min-width: 720px) {
    .c-sheet { margin: 1rem auto 0; padding: 4.5rem 4rem 3rem; }
    .c-corner { width: 52px; height: 52px; }
    .c-section--band { margin-inline: -4rem; padding-inline: 4rem; }
    .c-crest { width: 170px; }
}
@media (max-width: 400px) { .c-nav li + li::before { margin: 0 .5rem; } .c-nav a { font-size: 1rem; } .countdown .cell { padding: 0 .8rem; } }

@media (prefers-reduced-motion: no-preference) {
    .js .c-crest { animation: c-seal 1.2s var(--ease) both; }
}
@keyframes c-seal { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
