/* ==========================================================================
   Morgane & Joachim — 24 juillet 2027
   Palette, typographie et mise en page, dans l'esprit du faire-part imprimé :
   blanc, jaune beurre, olive et brun. Les animations vivent dans script.js
   (bibliothèque Motion) et ne touchent qu'à transform / opacity.
   ========================================================================== */

:root {
    /* Palette */
    --blanc: #FFFFFF;
    --jaune: #F9D453;
    --jaune-doux: #FBE9A6;
    --jaune-pale: #FFF5CC;
    --olive: #6E8B3D;
    --olive-fonce: #4C6327;
    --olive-clair: #A9BF6B;
    --olive-pale: #EDF2DC;
    --brun: #4A3728;
    --brun-clair: #6F5A48;

    /* Rôles */
    --bg: var(--blanc);
    --bg-alt: var(--jaune-pale);
    --ink: var(--brun);
    --ink-soft: var(--brun-clair);
    --line: rgba(74, 55, 40, 0.22);
    --accent: var(--olive);
    --accent-dark: var(--olive-fonce);
    --erreur: #B3402E;
    --team-morgane: var(--jaune);
    --team-joachim: var(--olive);
    --stripes: repeating-linear-gradient(90deg, var(--jaune-doux) 0 26px, var(--jaune-pale) 26px 52px);

    --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
    --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;

    --nav-h: 68px;
    --gutter: 16px;
    --measure: 64ch;
    --radius-s: 8px;
    --radius-m: 18px;
    --radius-arch: 999px 999px 18px 18px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: clip;
}

body.has-lightbox {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* L'attribut hidden doit gagner sur tout display: explicite (.field, .swiss-clock…). */
[hidden] {
    display: none !important;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.1;
    margin: 0;
    font-variation-settings: "SOFT" 60;
    font-optical-sizing: auto;
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--olive-fonce);
    text-decoration-color: var(--olive-clair);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--brun);
    text-decoration-color: var(--jaune);
}

:focus-visible {
    outline: 3px solid var(--olive);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: min(100% - 2 * var(--gutter), 1120px);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    background: var(--brun);
    color: var(--blanc);
    padding: .6rem 1rem;
    border-radius: var(--radius-s);
    z-index: 200;
}

.skip-link:focus {
    top: 8px;
}

/* Les éléments animés par Motion partent invisibles, uniquement quand JS est là. */
.js [data-reveal],
.js [data-reveal-group]>*,
.js .timeline__icon {
    opacity: 0;
}

/* Les photos qui s'agrandissent au clic */
.is-zoomable {
    cursor: zoom-in;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.nav__brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 600;
    font-size: 1.55rem;
    color: var(--brun);
    text-decoration: none;
    font-variation-settings: "SOFT" 100;
    line-height: 1;
}

.nav__brand:hover {
    color: var(--olive-fonce);
}

.nav__crest {
    height: 46px;
    width: auto;
    margin: 0 .1rem;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: clamp(.75rem, 2vw, 1.75rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    display: inline-block;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: .98rem;
    padding: .3rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease;
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--ink);
    border-bottom-color: var(--olive);
}

.nav__link--cta {
    padding: .45rem 1rem;
    border-radius: 999px;
    background: var(--jaune);
    border-bottom: 0;
}

.nav__link--cta:hover,
.nav__link--cta.is-active {
    background: var(--olive-clair);
}

.nav__toggle {
    display: none;
}

@media (max-width: 880px) {
    .nav__toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 0 9px;
        background: none;
        border: 0;
        cursor: pointer;
    }

    .nav__toggle span {
        display: block;
        height: 2px;
        background: var(--ink);
        border-radius: 2px;
        transition: transform .3s ease, opacity .3s ease;
    }

    .nav__toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav__toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .nav__toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav__menu {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: calc(-1 * var(--gutter));
        right: calc(-1 * var(--gutter));
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem var(--gutter) 1rem;
        background: var(--blanc);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 30px rgba(74, 55, 40, .14);
    }

    .nav__menu.is-open {
        display: flex;
    }

    .nav__link {
        display: block;
        padding: .8rem 0;
        font-size: 1.15rem;
        border-bottom: 0;
    }

    .nav__link--cta {
        margin-top: .5rem;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .85rem 1.5rem;
    border-radius: 999px;
    font: 600 1rem/1 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.btn--primary {
    background: var(--olive-fonce);
    color: var(--blanc);
    border-color: var(--olive-fonce);
}

.btn--primary:hover {
    background: var(--brun);
    border-color: var(--brun);
    color: var(--blanc);
}

.btn--ghost {
    background: transparent;
    color: var(--olive-fonce);
    border-color: var(--olive);
}

.btn--ghost:hover {
    background: var(--olive-pale);
    color: var(--olive-fonce);
}

.btn--small {
    padding: .55rem 1rem;
    font-size: .92rem;
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1.08rem;
}

.btn[disabled] {
    opacity: .65;
    cursor: progress;
}

/* --------------------------------------------------------------------------
   Accueil : hero + lettre
   -------------------------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    padding-top: calc(var(--nav-h) + clamp(2rem, 6vw, 4rem));
    padding-bottom: clamp(3rem, 8vw, 6rem);
}

.hero__intro {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    color: var(--ink-soft);
    margin: 0 0 .75rem;
}

.hero__names {
    font-style: italic;
    font-weight: 500;
    font-size: clamp(3.4rem, 10.5vw, 7.4rem);
    line-height: .95;
    letter-spacing: -.02em;
    color: var(--brun);
    font-variation-settings: "SOFT" 100;
    margin: 0 0 1.25rem;
    text-wrap: balance;
    padding-right: .1em;
}

.hero__names .amp {
    font-style: normal;
    font-weight: 300;
    color: var(--jaune);
}

.hero__date {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.2;
    margin: 0 0 .5rem;
}

.hero__places {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
    color: var(--ink-soft);
    font-size: 1.1rem;
    line-height: 1.5;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1rem;
}

.countdown {
    display: inline-flex;
    align-items: center;
    background: var(--jaune);
    color: var(--brun);
    font-weight: 700;
    font-size: .95rem;
    padding: .55rem 1rem;
    border-radius: 999px;
    user-select: none;
    cursor: default;
}

/* La photo en arche, posée sur un panneau rayé comme le faire-part. */
.hero__photo {
    position: relative;
    isolation: isolate;
    margin: 0;
    justify-self: center;
    width: min(100%, 420px);
    padding: 26px 26px 0;
}

.hero__photo::before {
    content: "";
    position: absolute;
    inset: 0 -4px -18px;
    z-index: -1;
    background: var(--stripes);
    border-radius: 999px 999px 26px 26px;
}

.hero__photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius-arch);
}

@media (max-width: 880px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: calc(var(--nav-h) + 1.5rem);
    }

    .hero__photo {
        width: min(100% - 12px, 340px);
    }
}

.letter {
    background: var(--bg-alt);
    padding-block: clamp(3rem, 8vw, 6rem);
}

.letter__inner {
    max-width: var(--measure);
    margin-inline: auto;
}

.letter__inner>.olive-tree {
    display: block;
    margin-inline: auto;
}

.letter h2 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    margin-bottom: 1.5rem;
    text-align: center;
    text-wrap: balance;
}

.letter p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.letter__signature {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.9rem;
    color: var(--olive-fonce);
    margin: 2rem 0 0;
    text-align: center;
    font-variation-settings: "SOFT" 100;
}

/* L'olivier : un petit emblème qui se balance au vent, et perd ses olives au clic. */
.olive-tree {
    display: inline-block;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    width: 96px;
    margin: 0 0 1.25rem;
    position: relative;
    transform-origin: 50% 100%;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.olive-tree svg {
    display: block;
    width: 100%;
    height: auto;
}

.olive-tree__drop {
    position: absolute;
    width: 7px;
    height: 9px;
    border-radius: 50%;
    background: var(--olive-fonce);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Sections : titres centrés, colonnes de texte centrées.
   -------------------------------------------------------------------------- */
.section {
    padding-block: clamp(4rem, 9vw, 6.5rem);
}

.section--alt {
    background: var(--bg-alt);
}

.section__title {
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    letter-spacing: -.01em;
    margin-bottom: .5rem;
    text-align: center;
    text-wrap: balance;
}

.section__lead {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--ink-soft);
    margin: 0 0 2.5rem;
    text-align: center;
}

.section h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 3rem 0 1.25rem;
    text-align: center;
}

.section .section__title+h3,
.section .section__lead+h3 {
    margin-top: 0;
}

.prose {
    max-width: var(--measure);
    margin-inline: auto;
}

.prose p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Famille & amis
   -------------------------------------------------------------------------- */
.teams {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.5rem;
    list-style: none;
    margin: -1rem 0 2rem;
    padding: 0;
    color: var(--ink-soft);
    font-size: .98rem;
}

.teams li {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.teams i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--team-morgane);
    border: 1px solid var(--brun);
}

.teams [data-team="joachim"] i {
    background: var(--team-joachim);
    border-color: var(--olive-fonce);
}

.person__role {
    margin: 0;
    color: var(--ink-soft);
    font-size: .95rem;
}

.person__role::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--team);
    border: 1px solid var(--brun);
    margin-right: .45rem;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

[data-team="joachim"] .person__role::before {
    border-color: var(--olive-fonce);
}

.people {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.75rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.person {
    --team: var(--team-morgane);
    text-align: center;
}

.person[data-team="joachim"] {
    --team: var(--team-joachim);
}

.person__photo {
    padding: 6px;
    border-radius: var(--radius-arch);
    background: var(--team);
}

.person__photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 999px 999px 12px 12px;
}

.person__name {
    font-size: 1.5rem;
    margin: .9rem 0 .2rem;
}

@media (max-width: 1000px) {
    .people {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .people {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem .9rem;
    }

    .person__name {
        font-size: 1.3rem;
    }
}

/* --------------------------------------------------------------------------
   Infos pratiques : lieux + FAQ
   -------------------------------------------------------------------------- */
.venues {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.venue {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    background: var(--blanc);
    border-radius: var(--radius-m);
    padding: 1.5rem;
}

.venue h3 {
    font-size: 1.6rem;
    margin: 0;
    text-align: left;
}

.venue__when {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--olive-fonce);
    margin: 0;
}

.venue address {
    font-style: normal;
    color: var(--ink-soft);
    margin: 0 0 .6rem;
}

.venue__map {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-s);
    overflow: hidden;
    background: var(--jaune-pale);
}

.venue__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.venue .btn {
    align-self: flex-start;
    margin-top: .75rem;
}

@media (max-width: 720px) {
    .venues {
        grid-template-columns: 1fr;
    }
}

.faq {
    max-width: 720px;
    margin-inline: auto;
    background: var(--blanc);
    border-radius: var(--radius-m);
    padding: .5rem clamp(1rem, 3vw, 2rem);
}

.faq__item {
    border-bottom: 1px solid var(--line);
}

.faq__item:last-child {
    border-bottom: 0;
}

.faq__item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 0;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3;
}

.faq__item summary::-webkit-details-marker {
    display: none;
}

.faq__item summary::after {
    content: "";
    flex: none;
    width: 11px;
    height: 11px;
    margin-right: .4rem;
    border-right: 2px solid var(--olive);
    border-bottom: 2px solid var(--olive);
    transform: rotate(45deg);
    transition: transform .3s ease;
}

.faq__item[open] summary::after {
    transform: rotate(-135deg);
}

.faq__body {
    padding: 0 0 1.25rem;
    color: var(--ink-soft);
    max-width: 60ch;
}

.faq__body p {
    margin: 0 0 .5em;
}

/* --------------------------------------------------------------------------
   Programme : bannière, frise illustrée + horloge suisse
   -------------------------------------------------------------------------- */
.banner {
    max-width: 960px;
    margin: clamp(1.5rem, 4vw, 2.5rem) auto clamp(2.5rem, 6vw, 4rem);
}

.banner img {
    width: 100%;
    border-radius: var(--radius-m);
}

.timeline {
    position: relative;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 760px;
}

/* Le rail passe par le centre des pictogrammes */
.timeline::before {
    content: "";
    position: absolute;
    left: 126.5px;
    top: 24px;
    bottom: 24px;
    width: 3px;
    border-radius: 2px;
    background: var(--olive-clair);
}

.timeline__item {
    display: grid;
    grid-template-columns: 84px 48px minmax(0, 1fr);
    gap: 0 1.25rem;
    align-items: start;
    padding: 0 0 2rem;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__time {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.2;
    padding-top: .55rem;
    text-align: right;
    color: var(--olive-fonce);
    font-variation-settings: "SOFT" 100;
}

.timeline__icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blanc);
    border: 2px solid var(--olive);
    color: var(--brun);
}

.timeline__icon svg {
    width: 26px;
    height: 26px;
    display: block;
}

.timeline__body {
    padding-top: .45rem;
}

.timeline__item h4 {
    font-size: 1.3rem;
    margin: 0 0 .35rem;
    text-align: left;
}

.timeline__item p {
    margin: 0;
    color: var(--ink-soft);
}

.timeline--sunday {
    margin-top: .5rem;
}

@media (max-width: 640px) {
    .timeline::before {
        left: 22.5px;
    }

    .timeline__item {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 0 1rem;
    }

    .timeline__time {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
        font-size: 1.3rem;
        padding-top: 0;
        line-height: 1;
        margin-bottom: .35rem;
    }

    .timeline__icon {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .timeline__body {
        grid-column: 2;
        grid-row: 2;
        padding-top: 0;
    }
}

/* L'œuf de Pâques : survolez « horloges suisses ». */
.easter-egg-wrap {
    position: relative;
    display: inline-block;
}

.easter-egg {
    font-weight: 600;
    text-decoration: none;
    cursor: help;
    white-space: nowrap;
}

.swiss-clock {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    translate: -50% 0;
    width: 150px;
    height: 150px;
    padding: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 14px 32px rgba(74, 55, 40, .3);
    z-index: 20;
    pointer-events: none;
}

.swiss-clock svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Les aiguilles sont des éléments HTML : Motion les fait tourner (transform uniquement).
   Chaque aiguille pointe vers 12h au repos, son pivot est décalé pour laisser une petite queue. */
.swiss-clock__hand {
    position: absolute;
    left: 50%;
    border-radius: 2px;
    translate: -50% 0;
}

.swiss-clock__hour {
    width: 9px;
    height: 52px;
    bottom: calc(50% - 12px);
    background: #1f1f1f;
    transform-origin: 50% calc(100% - 12px);
}

.swiss-clock__minute {
    width: 7px;
    height: 70px;
    bottom: calc(50% - 12px);
    background: #1f1f1f;
    transform-origin: 50% calc(100% - 12px);
}

.swiss-clock__second {
    width: 3px;
    height: 68px;
    bottom: calc(50% - 16px);
    background: #eb0000;
    transform-origin: 50% calc(100% - 16px);
}

.swiss-clock__second::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #eb0000;
    translate: -50% 0;
}

.swiss-clock__second::after {
    content: "";
    position: absolute;
    bottom: 12px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1f1f1f;
    translate: -50% 50%;
}

/* --------------------------------------------------------------------------
   Logements
   -------------------------------------------------------------------------- */
/* Le texte et l'aquarelle du château côte à côte ; l'aquarelle passe au-dessus sur mobile. */
.lodging-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.lodging-intro .prose {
    margin: 0;
}

.illustration {
    margin: 0;
}

.illustration img {
    width: 100%;
}

.illustration figcaption {
    margin-top: .5rem;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--ink-soft);
    text-align: center;
}

@media (max-width: 880px) {
    .lodging-intro {
        grid-template-columns: 1fr;
    }

    .lodging-intro .illustration {
        order: -1;
        justify-self: center;
        width: min(100%, 380px);
    }
}

.stays {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}

.stay {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    height: 100%;
    padding: 1.25rem 1.25rem 1.1rem;
    background: var(--blanc);
    border: 2px solid transparent;
    border-radius: var(--radius-m);
    color: var(--ink);
    text-decoration: none;
    transition: border-color .2s ease;
}

.stay strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
}

.stay span {
    color: var(--ink-soft);
    font-size: .95rem;
    line-height: 1.4;
}

.stay:hover {
    color: var(--ink);
    border-color: var(--olive);
}

@media (max-width: 880px) {
    .stays {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 460px) {
    .stays {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   RSVP
   -------------------------------------------------------------------------- */
.rsvp__intro {
    max-width: var(--measure);
    margin: 0 auto 2rem;
    font-size: 1.15rem;
    line-height: 1.6;
    text-align: center;
}

.rsvp__illustration {
    width: min(70%, 260px);
    margin: 0 auto 2rem;
}

.rsvp__illustration img {
    width: 100%;
    border-radius: var(--radius-m);
}

.rsvp-form {
    display: grid;
    gap: 1.6rem;
    max-width: 760px;
    margin-inline: auto;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    background: var(--jaune-pale);
    border-radius: var(--radius-m);
}

.field {
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.field label,
.field legend {
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.4;
    padding: 0;
}

.field__hint {
    font-weight: 400;
    color: var(--ink-soft);
    font-size: .92rem;
}

.field__note {
    margin: .25rem 0 0;
    padding: .7rem .9rem;
    background: var(--blanc);
    border-left: 3px solid var(--olive);
    border-radius: var(--radius-s);
    color: var(--ink-soft);
    font-size: .95rem;
    line-height: 1.5;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: var(--blanc);
    border: 2px solid var(--line);
    border-radius: var(--radius-s);
    padding: .75rem .9rem;
    transition: border-color .2s ease;
}

.field textarea {
    resize: vertical;
    min-height: 5.5rem;
}

.field input:focus,
.field textarea:focus {
    outline: 3px solid var(--olive-clair);
    outline-offset: 0;
    border-color: var(--olive);
}

.field.is-invalid>input,
.field.is-invalid>textarea {
    border-color: var(--erreur);
}

.field__error {
    margin: 0;
    color: var(--erreur);
    font-size: .92rem;
    font-weight: 600;
}

.field--sub {
    margin-top: .6rem;
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.pill {
    position: relative;
    cursor: pointer;
}

.pill input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.pill span {
    display: inline-block;
    padding: .6rem 1.05rem;
    border-radius: 999px;
    border: 2px solid var(--olive);
    background: var(--blanc);
    font-weight: 600;
    line-height: 1.2;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.pill:hover span {
    border-color: var(--olive-fonce);
    background: var(--olive-pale);
}

.pill input:checked+span {
    background: var(--olive-fonce);
    border-color: var(--olive-fonce);
    color: var(--blanc);
}

.pill--no input:checked+span {
    background: var(--brun-clair);
    border-color: var(--brun-clair);
}

.pill input:focus-visible+span {
    outline: 3px solid var(--jaune);
    outline-offset: 2px;
}

.rsvp-form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.rsvp-status {
    margin: 0;
    font-weight: 600;
    line-height: 1.5;
}

.rsvp-status:empty {
    display: none;
}

.rsvp-status--ok {
    color: var(--olive-fonce);
    background: var(--blanc);
    border-left: 4px solid var(--olive);
    padding: .9rem 1.1rem;
    border-radius: var(--radius-s);
}

.rsvp-status--error {
    color: var(--erreur);
    background: var(--blanc);
    border-left: 4px solid var(--erreur);
    padding: .9rem 1.1rem;
    border-radius: var(--radius-s);
}

/* --------------------------------------------------------------------------
   Visionneuse : la photo saute hors de sa carte, façon polaroïd.
   -------------------------------------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(74, 55, 40, .86);
}

.lightbox__figure {
    margin: 0;
    max-width: min(92vw, 560px);
    padding: 12px 12px 14px;
    background: var(--blanc);
    border-radius: 14px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
    rotate: -2deg;
}

.lightbox__figure img {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    background: var(--jaune-pale);
}

.lightbox__figure figcaption {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.45rem;
    text-align: center;
    color: var(--brun);
    margin-top: .6rem;
    font-variation-settings: "SOFT" 100;
}

.lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--blanc);
    color: var(--brun);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox__close:hover {
    background: var(--jaune);
}

/* --------------------------------------------------------------------------
   Confettis (créés par script.js à l'envoi du RSVP)
   -------------------------------------------------------------------------- */
.confetti {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
}

.confetti i {
    position: absolute;
    display: block;
    will-change: transform, opacity;
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.footer {
    position: relative;
    background: var(--olive-fonce);
    color: var(--blanc);
    text-align: center;
    padding: 3.5rem 0 2.5rem;
}

.footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 12px;
    background: var(--stripes);
}

.footer p {
    margin: 0 0 .4rem;
}

.footer__names {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 2.1rem;
    color: var(--jaune);
    font-variation-settings: "SOFT" 100;
    margin-bottom: .6rem !important;
}

.footer a {
    color: var(--jaune);
    text-decoration-color: var(--jaune);
}

.footer a:hover {
    color: var(--blanc);
}

/* --------------------------------------------------------------------------
   Page d'accès (gate.html) : le mot de passe des invités, sur les rayures du
   faire-part
   -------------------------------------------------------------------------- */
.gate {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 2rem var(--gutter);
    background: var(--stripes);
}

.gate__card {
    width: min(100%, 420px);
    padding: clamp(1.75rem, 6vw, 2.75rem) clamp(1.25rem, 5vw, 2.5rem);
    background: var(--blanc);
    border-radius: var(--radius-m);
    box-shadow: 0 18px 40px rgba(74, 55, 40, .14);
    text-align: center;
}

.gate__couple {
    width: min(100%, 240px);
    margin: 0 auto 1.25rem;
}

.gate__names {
    font-style: italic;
    font-size: clamp(2.2rem, 9vw, 2.9rem);
    letter-spacing: -.02em;
    color: var(--brun);
    font-variation-settings: "SOFT" 100;
}

.gate__names .amp {
    font-style: normal;
    font-weight: 300;
    color: var(--jaune);
}

.gate__date {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: .6rem 0 1.75rem;
}

.gate__form {
    display: grid;
    gap: 1rem;
    text-align: left;
}

.gate__form .btn {
    width: 100%;
}

.gate__help {
    margin: 1.5rem 0 0;
    color: var(--ink-soft);
    font-size: .95rem;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Impression
   -------------------------------------------------------------------------- */
@media print {

    .nav,
    .skip-link,
    .swiss-clock,
    .lightbox,
    .rsvp-form__actions {
        display: none !important;
    }

    .js [data-reveal],
    .js [data-reveal-group]>*,
    .js .timeline__icon {
        opacity: 1;
    }

    .section {
        padding-block: 2rem;
        break-inside: avoid;
    }
}
