/* ==========================================================================
   Design « Nuit étoilée » — ciel bleu nuit, argent et clair de lune
   ========================================================================== */

:root {
    --night: #0b1230;
    --night-2: #101a40;
    --deep: #060a1d;
    --panel: rgba(24, 36, 84, .55);
    --silver: #d9dfee;
    --text-c: #e6e9f2;
    --mute: #aab4cf;
    --moon: #f1e4bf;
    --line: rgba(217, 223, 238, .22);
    --ease: cubic-bezier(.22, 1, .36, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    background: var(--night); color: var(--text-c); font-family: var(--text); font-size: 1.1rem; line-height: 1.7; overflow-x: hidden;
    background-image: linear-gradient(180deg, var(--deep) 0%, var(--night) 30%, var(--night-2) 70%, var(--night) 100%);
}
::selection { background: var(--moon); color: var(--night); }
a { color: var(--moon); }
:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--moon); color: var(--night); padding: .6rem 1rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: .8rem; color: var(--night); }

.n-wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }
.n-wrap--narrow { max-width: 760px; }

/* --- Navigation --------------------------------------------------------- */
.n-nav {
    position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .8rem clamp(1rem, 4vw, 2.5rem); transition: background-color .4s, box-shadow .4s, backdrop-filter .4s;
}
.n-nav.is-scrolled { background: rgba(6, 10, 29, .86); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(8px); }
.n-mono { font-family: var(--display); font-size: 1.4rem; color: var(--silver); text-decoration: none; letter-spacing: .02em; }
.n-mono i { color: var(--moon); margin: 0 .1em; }
.menu-links { display: flex; gap: clamp(.8rem, 3vw, 2rem); list-style: none; margin: 0; padding: 0; }
.menu-links a { color: var(--silver); text-decoration: none; font-size: .95rem; font-weight: 500; letter-spacing: .06em; padding: .3rem 0; position: relative; }
.menu-links a::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--moon); transform: translateX(-50%) scale(0); transition: transform .3s var(--ease); }
.menu-links a:hover, .menu-links a.is-active { color: #fff; }
.menu-links a:hover::after, .menu-links a.is-active::after { transform: translateX(-50%) scale(1); }
@media (max-width: 559.98px) {
    .n-mono { display: none; }
    .n-nav { justify-content: center; }
    .menu-links { gap: .9rem; }
    .menu-links a { font-size: .9rem; letter-spacing: .02em; }
}

/* --- Ouverture : la photo dans une lune --------------------------------- */
.n-hero {
    position: relative; overflow: hidden; min-height: min(100vh, 980px); display: grid; place-items: center; text-align: center;
    padding: 6rem 1.1rem 5rem;
    background: radial-gradient(ellipse 70% 50% at 50% 38%, rgba(64, 86, 170, .45), transparent 70%), linear-gradient(180deg, var(--deep), var(--night) 80%);
}
.n-sky { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--silver); pointer-events: none; }
.n-hero-inner { position: relative; z-index: 1; max-width: 900px; width: 100%; }
.n-to { margin: 0 0 1.6rem; font-family: var(--display); font-style: italic; font-size: clamp(1.35rem, 3vw, 1.7rem); color: var(--moon); line-height: 1.3; }
.n-to span { display: block; font-family: var(--text); font-style: normal; font-size: .82rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); margin-bottom: .3rem; }

.n-moon { position: relative; width: min(64vw, 400px); aspect-ratio: 1; margin: 0 auto 2.2rem; }
.n-moon-disc {
    position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 35% 35%, #fbf4de, #cfc3a0);
    box-shadow: 0 0 0 1px rgba(241, 228, 191, .7), 0 0 60px 6px rgba(241, 228, 191, .25), 0 0 160px 30px rgba(120, 140, 220, .2);
}
.n-moon-disc .carousel, .n-moon-disc .carousel-inner, .n-moon-disc .carousel-item { height: 100%; }
.n-moon-disc .carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.n-moon-disc .carousel-indicators { margin-bottom: 1.1rem; gap: .4rem; }
.n-moon-disc .carousel-indicators [data-bs-target] { width: 7px; height: 7px; margin: 0; border: 0; border-radius: 50%; background: #fff; opacity: .55; }
.n-moon-disc .carousel-indicators .active { opacity: 1; }
.n-orbit { position: absolute; inset: -18px; width: calc(100% + 36px); height: calc(100% + 36px); fill: none; stroke: var(--silver); stroke-width: .5; stroke-dasharray: 1.5 4; opacity: .7; pointer-events: none; }
.n-spark { position: absolute; color: var(--moon); pointer-events: none; }
.n-spark.s1 { width: 26px; height: 26px; top: 4%; right: -6%; }
.n-spark.s2 { width: 14px; height: 14px; bottom: 10%; left: -8%; color: var(--silver); }

.n-save { margin: 0 0 .6rem; font-size: .85rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--mute); }
.n-names {
    font-family: var(--display); font-weight: 400; font-style: italic; font-size: clamp(3rem, 11vw, 6.6rem); line-height: 1; letter-spacing: -.01em; margin: 0 0 1.2rem;
    color: #f4f6fb; text-shadow: 0 0 40px rgba(170, 190, 255, .35); overflow-wrap: anywhere; font-variation-settings: "SOFT" 100;
}
.n-names span { font-style: normal; color: var(--moon); font-size: .7em; }
.n-when { margin: 0; font-size: 1.2rem; font-weight: 500; letter-spacing: .04em; color: var(--silver); }
.n-where { margin: .3rem 0 0; color: var(--mute); }

/* --- Sections ----------------------------------------------------------- */
.n-sec { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.n-eyebrow { margin: 0 0 .6rem; font-size: .82rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--moon); }
.n-h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 5.5vw, 3.8rem); line-height: 1.08; margin: 0 0 1.8rem; color: #f4f6fb; }
.n-h2--center { text-align: center; }

/* Constellation */
.n-constellation { margin: 0 0 clamp(2.5rem, 6vw, 4rem); padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(ellipse at 50% 40%, rgba(64, 86, 170, .28), transparent 70%); }
.n-constellation svg { display: block; width: 100%; height: auto; overflow: visible; }
.n-line { fill: none; stroke: var(--silver); stroke-width: 1.2; stroke-linejoin: round; opacity: .65; }
.n-halo { fill: rgba(241, 228, 191, .12); }
.n-dot { fill: #fffaf0; filter: drop-shadow(0 0 4px rgba(241, 228, 191, .9)); }
.n-digit { fill: var(--mute); font-family: var(--text); font-size: 16px; font-weight: 500; letter-spacing: .05em; }
.n-constellation figcaption { text-align: center; margin-top: 1rem; color: var(--mute); font-size: 1rem; }
.n-constellation figcaption i { font-style: normal; color: var(--moon); }
/* Seul mouvement d'entrée : les traits de la constellation se dessinent */
@media (prefers-reduced-motion: no-preference) {
    .js .n-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: n-draw 3.2s var(--ease) .4s forwards; }
}
@keyframes n-draw { to { stroke-dashoffset: 0; } }

.n-date-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .n-date-grid { grid-template-columns: 1.3fr 1fr; gap: 4rem; } }
.n-lead { margin: 0; font-size: clamp(1.2rem, 2.3vw, 1.4rem); line-height: 1.6; color: var(--text-c); }

.countdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; font-variant-numeric: tabular-nums; }
.countdown .cell { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line); display: grid; place-content: center; text-align: center; background: radial-gradient(circle at 35% 30%, rgba(217, 223, 238, .12), transparent 65%); }
.countdown .cell:first-child { border-color: rgba(241, 228, 191, .6); }
.countdown b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1; color: #fff; }
.countdown .cell:first-child b { color: var(--moon); }
.countdown span { font-size: .9rem; color: var(--mute); }

/* Programme : une ligne pointillée d'étoile en étoile */
.programme-list { margin: 0; position: relative; padding-left: 2.2rem; }
.programme-list::before { content: ""; position: absolute; left: .45rem; top: .6rem; bottom: .6rem; border-left: 1px dashed rgba(217, 223, 238, .45); }
.programme-row { position: relative; padding: 0 0 2.4rem; }
.programme-row:last-child { padding-bottom: 0; }
.programme-row::before {
    content: ""; position: absolute; left: -2.2rem; top: .35rem; width: 1rem; height: 1rem; background: var(--moon);
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
    filter: drop-shadow(0 0 6px rgba(241, 228, 191, .8));
}
.programme-list dt { font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1; color: var(--moon); margin-bottom: .4rem; font-variant-numeric: tabular-nums; }
.programme-list dd { margin: 0; font-size: 1.1rem; }
.programme-list strong { font-weight: 600; color: #fff; font-size: 1.2rem; }
.programme-list small { display: block; color: var(--mute); font-size: 1.05rem; margin-top: .25rem; }

/* Tenue */
.n-sec--dress { background: linear-gradient(180deg, transparent, rgba(6, 10, 29, .55) 30%, rgba(6, 10, 29, .55) 70%, transparent); }
.n-intro { max-width: 40em; margin: -0.6rem 0 2.4rem; color: var(--text-c); }
.n-dress { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.n-dress li { position: relative; padding: 1.4rem 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.n-dress svg { width: 16px; height: 16px; color: var(--moon); margin-bottom: .6rem; display: block; }
.n-dress h3 { font-family: var(--text); font-weight: 600; font-size: .9rem; letter-spacing: .18em; text-transform: uppercase; color: var(--silver); margin: 0 0 .35rem; }
.n-dress p { margin: 0; }

/* --- Réponse ------------------------------------------------------------ */
.n-rsvp {
    position: relative; max-width: 680px; margin: 0 auto; padding: clamp(2rem, 6vw, 3.4rem); border-radius: 28px;
    background: linear-gradient(180deg, rgba(30, 44, 100, .7), rgba(16, 26, 64, .7)); border: 1px solid var(--line);
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.n-crescent { display: block; width: 40px; height: 40px; margin: 0 auto 1rem; fill: var(--moon); filter: drop-shadow(0 0 10px rgba(241, 228, 191, .6)); }
.n-rsvp .n-h2 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); margin-bottom: 1rem; }
.rsvp-deadline { text-align: center; color: var(--mute); margin: 0 0 2rem; }
.rsvp-note { text-align: center; margin: 0; }
.rsvp-done { text-align: center; padding: 1.4rem; border: 1px solid rgba(241, 228, 191, .45); border-radius: 18px; margin-bottom: 1.6rem; }
.done-head { font-family: var(--display); font-style: italic; font-size: 1.9rem; color: var(--moon); margin: 0 0 .3rem; }
.done-text { margin: 0 0 .9rem; }
.done-text strong { color: #fff; }
.btn-link-gold { background: none; border: 0; padding: 0; color: var(--moon); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: .3em; cursor: pointer; }
.btn-link-gold:hover { color: #fff; }
.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; padding: 0; margin: 0 0 .5rem; font-size: .85rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--silver); }
.rsvp-form small { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--mute); font-size: .95rem; }
.form-control.engraved {
    border: 1px solid var(--line); border-radius: 14px; background: rgba(6, 10, 29, .5); color: #fff;
    padding: .75rem 1rem; font-family: var(--text); font-size: 1.1rem;
}
.form-control.engraved:focus { background: rgba(6, 10, 29, .7); color: #fff; border-color: var(--moon); box-shadow: 0 0 0 3px rgba(241, 228, 191, .2); }
.form-control.engraved[readonly] { background: transparent; border-color: transparent; padding-left: 0; font-family: var(--display); font-style: italic; font-size: 1.9rem; color: var(--moon); }
.guests-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.guest-pill {
    width: 3.1rem; height: 3.1rem; display: grid; place-items: center; cursor: pointer; border-radius: 50%; border: 1px solid var(--line);
    color: var(--silver); font-weight: 600; font-size: 1.1rem; transition: border-color .3s, background-color .3s, color .3s, box-shadow .3s;
}
.guest-pill:hover { border-color: var(--silver); }
.btn-check:checked + .guest-pill { background: var(--moon); color: var(--night); border-color: var(--moon); box-shadow: 0 0 18px rgba(241, 228, 191, .5); }
.btn-check:focus-visible + .guest-pill { outline: 2px solid var(--moon); outline-offset: 3px; }
.hint { font-size: .95rem; color: var(--mute); margin: .6rem 0 0; }
.choice { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 480px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 6.8rem; padding: 1rem;
    border: 1px solid var(--line); border-radius: 18px; background: rgba(6, 10, 29, .45); color: var(--text-c); font: inherit; cursor: pointer;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.choice-tile:first-child { background: var(--moon); color: var(--night); border-color: var(--moon); }
.choice-head { font-family: var(--text); font-weight: 600; font-size: 1.4rem; line-height: 1.15; }
.choice-text { font-size: 1rem; }
.choice-current { margin-top: .3rem; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.choice-tile:hover, .choice-tile:focus-visible { transform: translateY(-2px); border-color: var(--moon); box-shadow: 0 0 30px -6px rgba(241, 228, 191, .55); }
.rsvp-form.is-sending .choice-tile { opacity: .55; pointer-events: none; }
.rsvp-errors { background: rgba(190, 60, 80, .2); border: 1px solid rgba(255, 150, 165, .6); color: #ffd9de; border-radius: 14px; padding: .9rem 1.1rem; margin-bottom: 1.6rem; }
.rsvp-errors p { margin: 0; }

/* --- Pied de page : l'horizon ------------------------------------------ */
.n-foot { position: relative; text-align: center; margin-top: 2rem; }
.n-horizon { display: block; width: 100%; height: clamp(50px, 8vw, 110px); fill: var(--deep); }
.n-foot-inner { background: var(--deep); padding: 1rem 1rem clamp(5rem, 8vw, 4rem); }
.n-foot-names { font-family: var(--display); font-style: italic; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.1; margin: 0; color: #f4f6fb; }
.n-foot-names span { font-style: normal; color: var(--moon); font-size: .75em; }
.n-foot-date { margin: .4rem 0 0; color: var(--silver); letter-spacing: .08em; }
.n-foot-credits { margin: .8rem 0 0; color: var(--mute); font-size: .95rem; }
