/* ==========================================================================
   Design « Riviera » — été méditerranéen : bleu Majorelle, blanc, citrons, faïence
   ========================================================================== */

:root {
    --blue: #233e9b;
    --blue-2: #2f50c0;
    --sky: #e7edfb;
    --sky-2: #f3f6fd;
    --paper: #fffdf6;
    --lemon: #f4cf47;
    --lemon-2: #d9a915;
    --leaf: #3c7a4b;
    --ink: #1b2550;
    --muted: #4a5578;
    --line: rgba(35, 62, 155, .2);
    --ease: cubic-bezier(.2, .9, .25, 1);
    --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Crect width='48' height='48' fill='%23fffdf6'/%3E%3Cpath d='M24 5c6 8 6 11 0 19-6-8-6-11 0-19zM24 43c6-8 6-11 0-19-6 8-6 11 0 19zM5 24c8-6 11-6 19 0-8 6-11 6-19 0zM43 24c-8-6-11-6-19 0 8 6 11 6 19 0z' fill='%23233e9b'/%3E%3Ccircle cx='24' cy='24' r='3.2' fill='%23f4cf47'/%3E%3Cpath d='M0 0h9L0 9zM48 0h-9l9 9zM0 48h9l-9-9zM48 48h-9l9-9z' fill='%23233e9b'/%3E%3Cpath d='M24 0v3M24 45v3M0 24h3M45 24h3' stroke='%23233e9b' stroke-width='1.5'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.1rem; line-height: 1.65; overflow-x: hidden; }
::selection { background: var(--lemon); color: var(--ink); }
a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--blue); color: var(--paper); padding: .5rem 1rem; z-index: 200; border-radius: 6px; }
.skip-link:focus { top: 1rem; }

/* --- Le store rayé --------------------------------------------------------- */
.r-awning { position: relative; height: 46px; background: repeating-linear-gradient(90deg, var(--blue) 0 28px, var(--paper) 28px 56px); }
.r-awning::after {
    content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 15px;
    background: inherit;
    -webkit-mask: radial-gradient(circle at 50% 0, #000 13.5px, transparent 14px) 0 0 / 28px 15px repeat-x;
    mask: radial-gradient(circle at 50% 0, #000 13.5px, transparent 14px) 0 0 / 28px 15px repeat-x;
    filter: drop-shadow(0 3px 2px rgba(27, 37, 80, .18));
}

/* --- Navigation ------------------------------------------------------------- */
.r-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.2rem .8rem; transition: background-color .3s, box-shadow .3s, padding .3s; }
.r-nav.is-scrolled { background: rgba(255, 253, 246, .96); box-shadow: 0 1px 0 var(--line); padding-top: .8rem; }
.r-brand { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 1.5rem; text-decoration: none; color: var(--blue); }
.r-brand span { color: var(--lemon-2); margin: 0 .1em; }
.r-nav .menu-links { display: flex; gap: clamp(.8rem, 3vw, 2rem); list-style: none; margin: 0; padding: 0; }
.r-nav .menu-links a { font-size: .95rem; font-weight: 600; color: var(--ink); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.r-nav .menu-links a:hover, .r-nav .menu-links a.is-active { border-color: var(--lemon); }

/* --- Ouverture ----------------------------------------------------------------- */
.r-hero { padding: 1.5rem 1.2rem 4rem; }
.r-hero-grid { max-width: 1120px; margin: 0 auto; display: grid; gap: 3rem; align-items: center; }
.r-hero-text { text-align: center; }
.r-to { display: inline-block; margin: 0 0 1.5rem; padding: .35rem 1rem; border-radius: 999px; background: var(--sky); color: var(--blue); font-size: 1rem; }
.r-kicker { font-size: .9rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--blue); margin: 0 0 .6rem; }
.r-names { font-family: var(--display); font-style: italic; font-weight: 500; font-variation-settings: "opsz" 144; font-size: clamp(3.4rem, 13vw, 6.4rem); line-height: .95; color: var(--blue); margin: 0; letter-spacing: -.01em; }
.r-names > span { display: block; }
.r-amp { font-style: normal; font-weight: 400; font-size: .5em; color: var(--lemon-2); margin: .1em 0; }
.r-lemons { display: block; width: min(240px, 70%); height: auto; margin: 1.2rem auto .8rem; overflow: visible; }
.r-twig { fill: none; stroke: #5b4630; stroke-width: 2.2; stroke-linecap: round; }
.r-leaf { fill: var(--leaf); }
.r-lemon { fill: var(--lemon); stroke: var(--lemon-2); stroke-width: 1.4; }
.r-shine { fill: #fff8d6; opacity: .8; }
.r-dateline { font-family: var(--display); font-size: clamp(1.45rem, 4vw, 1.9rem); font-weight: 500; margin: 0; color: var(--ink); }
.r-place { color: var(--muted); margin: .3rem 0 0; font-size: 1.1rem; }

.r-postcard { margin: 0 auto; width: min(430px, 88vw); background: #fff; padding: 12px 12px 0; box-shadow: 0 2px 0 var(--line), 0 30px 50px -28px rgba(27, 37, 80, .55); transform: rotate(1.8deg); }
.r-postcard-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--sky); }
.r-postcard .carousel, .r-postcard .carousel-inner, .r-postcard .carousel-item { height: 100%; }
.r-postcard .carousel-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.r-postcard .carousel-indicators { margin-bottom: .8rem; }
.r-postcard .carousel-indicators [data-bs-target] { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #fff; background: transparent; opacity: 1; margin: 0 4px; }
.r-postcard .carousel-indicators .active { background: var(--lemon); border-color: var(--lemon); }
.r-postcard-cap { display: flex; justify-content: space-between; align-items: center; padding: .7rem .3rem .8rem; font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--blue); }
.r-stamp svg { width: 40px; height: 40px; fill: none; stroke: var(--blue); stroke-width: 1.2; opacity: .55; }

/* --- Frise de faïence ----------------------------------------------------------- */
.r-tiles { height: 48px; background: var(--tile) 0 0 / 48px 48px repeat-x; border-block: 3px solid var(--blue); }
.r-tiles--thin { height: 32px; background-size: 32px 32px; border-width: 2px; }

/* --- Sections ----------------------------------------------------------------------- */
.r-section { padding: clamp(4rem, 10vw, 7rem) 0; }
.r-wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.2rem; }
.r-narrow { max-width: 700px; }
.r-eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--leaf); margin: 0 0 .5rem; }
.r-h2 { font-family: var(--display); font-weight: 500; font-size: clamp(2.3rem, 6vw, 3.4rem); line-height: 1.05; color: var(--blue); margin: 0 0 1.2rem; }
.r-lead { font-size: 1.2rem; margin: 0 0 2rem; max-width: 34em; }
.r-muted { color: var(--muted); }

.r-day-grid { display: grid; gap: 3rem; align-items: start; }
.r-ceremony { border-left: 4px solid var(--lemon); padding: .4rem 0 .4rem 1.1rem; font-size: 1.15rem; margin: 0; }
.r-ceremony-label { display: block; font-weight: 700; color: var(--blue); }

.r-ticket { background: #fff; border: 2px solid var(--blue); border-radius: 18px; padding: 1.8rem 1.5rem; position: relative; box-shadow: 8px 8px 0 var(--sky); }
.r-ticket-date { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-bottom: 1.4rem; margin-bottom: 1.4rem; border-bottom: 2px dashed var(--line); }
.r-ticket-day { font-family: var(--display); font-weight: 600; font-size: 5rem; line-height: .9; color: var(--blue); }
.r-ticket-month { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: 1rem; line-height: 1.4; color: var(--ink); }

.programme-list { margin: 0; }
.programme-row { display: grid; grid-template-columns: 4.6rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.programme-row:last-child { border-bottom: 0; }
.programme-row dt { font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.programme-row dt span { display: inline-block; background: var(--sky); border-radius: 6px; padding: .1rem .5rem; }
.programme-row dd { margin: 0; }
.programme-row strong { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--ink); }
.programme-row small { display: block; color: var(--muted); font-size: 1rem; margin-top: .15rem; }

.countdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1.4rem; font-variant-numeric: tabular-nums; }
.countdown .cell { text-align: center; background: var(--blue); color: var(--paper); border-radius: 12px; padding: .8rem .3rem; }
.countdown b { display: block; font-family: var(--display); font-weight: 600; font-size: 2rem; line-height: 1; }
.countdown span { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }

/* Tenue : rayures douces et carreaux */
.r-section--stripes { background: repeating-linear-gradient(90deg, var(--sky) 0 40px, var(--sky-2) 40px 80px); }
.r-dress-head { text-align: center; max-width: 40em; margin: 0 auto 2.6rem; }
.r-intro { font-size: 1.15rem; margin: 0; }
.r-dress { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.r-dress-tile { background: var(--paper); border-radius: 16px; padding: 1.6rem 1.4rem; text-align: center; border: 1px solid var(--line); }
.r-tile-mark { display: block; width: 48px; height: 48px; margin: 0 auto .9rem; background: var(--tile) center / cover; border-radius: 6px; box-shadow: 0 0 0 2px var(--blue); }
.r-dress-tile h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--blue); margin: 0 0 .3rem; }
.r-dress-tile p { margin: 0; }

/* --- Réponse ---------------------------------------------------------------------- */
.r-letter { background: #fff; border-radius: 20px; padding: 3.4rem clamp(1.2rem, 6vw, 3rem) 2.4rem; position: relative; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(27, 37, 80, .5); text-align: center; }
.r-letter::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: repeating-linear-gradient(90deg, var(--blue) 0 22px, var(--paper) 22px 44px); }
.rsvp-deadline { color: var(--muted); font-style: italic; margin: -.4rem 0 2rem; }
.rsvp-note { font-size: 1.1rem; }
.rsvp-form { text-align: left; }
.rsvp-done { background: var(--sky); border-radius: 14px; padding: 1.4rem; margin-bottom: 1.5rem; }
.done-head { font-family: var(--display); font-weight: 600; font-size: 1.7rem; color: var(--blue); margin: 0 0 .3rem; }
.done-text { margin: 0 0 .8rem; }
.btn-link-gold { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--blue); text-decoration: underline; text-decoration-color: var(--lemon-2); text-decoration-thickness: 2px; 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 .45rem; padding: 0; font-size: .95rem; font-weight: 700; color: var(--blue); }
.rsvp-form label small { font-size: .95rem; font-weight: 400; color: var(--muted); }
.form-control.engraved { border: 2px solid var(--line); border-radius: 12px; background: var(--paper); padding: .7rem .9rem; color: var(--ink); font-family: var(--text); font-size: 1.1rem; }
.form-control.engraved:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(244, 207, 71, .5); background: #fff; }
.form-control.engraved[readonly] { font-family: var(--display); font-style: italic; font-size: 1.5rem; color: var(--blue); background: var(--sky-2); border-style: dashed; }
textarea.form-control.engraved { min-height: 6.5rem; }
.guests-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.guest-pill { min-width: 3.1rem; height: 3.1rem; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--blue); color: var(--blue); cursor: pointer; font-weight: 700; font-size: 1.1rem; background: #fff; transition: background-color .2s, color .2s; }
.btn-check:checked + .guest-pill { background: var(--blue); color: var(--paper); box-shadow: 0 0 0 3px var(--lemon); }
.btn-check:focus-visible + .guest-pill { outline: 2px solid var(--blue); outline-offset: 4px; }
.hint { font-size: 1rem; color: var(--muted); margin: .5rem 0 0; }
.choice { display: grid; grid-template-columns: 1fr; gap: .8rem; }
.choice-tile {
    display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: 1.2rem 1rem; border-radius: 16px;
    border: 2px solid var(--blue); background: #fff; color: var(--blue); font: inherit; cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.choice-tile:first-child { background: var(--blue); color: var(--paper); }
.choice-head { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1.1; }
.choice-text { font-size: 1rem; }
.choice-current { margin-top: .3rem; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--lemon); color: var(--ink); border-radius: 999px; padding: .1rem .6rem; }
.choice-tile:hover, .choice-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 6px 0 var(--lemon); }
.rsvp-form.is-sending .choice-tile { opacity: .6; pointer-events: none; }
.rsvp-errors { border: 2px solid #a1291b; background: #fdf0ee; color: #8a2217; border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1.2rem; }
.rsvp-errors p { margin: 0; }

/* --- Pied de page --------------------------------------------------------------------- */
.r-foot { text-align: center; padding: 0 1rem 3rem; background: var(--sky); }
.r-foot .r-lemons { width: 170px; margin-top: 2.2rem; }
.r-foot-names { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 2.4rem; color: var(--blue); margin: 0; }
.r-foot-names span { color: var(--lemon-2); font-style: normal; }
.r-foot-date { font-weight: 600; margin: .2rem 0 0; }
.r-credits { color: var(--muted); font-size: 1rem; margin: .8rem 0 0; }

/* --- Grands écrans ----------------------------------------------------------------------- */
@media (min-width: 576px) { .choice { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
    .r-hero { padding-top: 2.5rem; }
    .r-hero-grid { grid-template-columns: 1.05fr 1fr; gap: 4rem; }
    .r-day-grid { grid-template-columns: 1.1fr .9fr; gap: 4rem; }
    .r-day-text { padding-top: 1rem; }
}
@media (max-width: 420px) { .r-nav .menu-links a { font-size: .88rem; } .r-brand { font-size: 1.25rem; } }

@media (prefers-reduced-motion: no-preference) {
    .js .r-postcard { animation: r-drop 1.1s var(--ease) .15s both; }
}
@keyframes r-drop { from { opacity: 0; transform: translateY(24px) rotate(-2deg); } to { opacity: 1; transform: rotate(1.8deg); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
