/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-serif: 'Cormorant Garamond', 'Times New Roman', Times, serif;
    /* Luxurious Script : calligraphie élégante, lettres connectées - proche de l'image Wix */
    --font-script: 'Brittany Signature', cursive;
    --overlay-max-width: 430px;
    --invitation-max-width: 430px;
}

/* Aston Script Bold - décommentez et ajoutez le fichier .woff2 si vous l'avez */
/*
@font-face {
    font-family: 'Aston Script';
    src: url('assets/fonts/AstonScript-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}
*/

@font-face {
    font-family: 'Brittany Signature';
    src:
        local('Brittany Signature'),
        local('Brittney Signature'),
        local('BrittanySignature'),
        local('BrittneySignature'),
        url('assets/fonts/Brittany Signature.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    font-weight: 300;
    overflow-x: hidden;
}

/* ========== OVERLAY PREMIÈRE PAGE ========== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 12px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.overlay-content {
    position: relative;
    width: min(100%, var(--overlay-max-width), calc((100dvh - 24px) * 390 / 673));
    max-height: calc(100dvh - 24px);
    aspect-ratio: 390 / 673;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.btn-decouvrir {
    position: absolute;
    top: clamp(18px, 4%, 32px);
    left: 50%;
    z-index: 10;
    cursor: pointer;
    transform: translateX(-50%);
    transition: transform 0.3s ease;
}

.btn-decouvrir:hover {
    transform: translateX(-50%) scale(1.05);
}

.btn-decouvrir img {
    height: 70px;
    width: auto;
    max-width: 360px;
    object-fit: contain;
}

/* ========== PAGE PRINCIPALE ========== */
.main-page {
    min-height: 100vh;
    background: #fff;
}

.main-page.hidden {
    display: none;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(18px, 4vw, 30px);
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.burger-menu {
    position: absolute;
    right: clamp(14px, 3vw, 20px);
}

.music-toggle {
    position: absolute;
    left: clamp(14px, 3vw, 20px);
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    color: #704630;
}

.music-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
}

.music-toggle .icon-off {
    display: none;
}

.music-toggle.is-muted .icon-on {
    display: none;
}

.music-toggle.is-muted .icon-off {
    display: block;
}

.countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.countdown-label,
.countdown-numbers {
    color: #704630;
}

.countdown-label {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 300;
}

.countdown-numbers {
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-serif);
}

.countdown-numbers .separator {
    margin: 0 2px;
    opacity: 0.8;
}


.burger-menu {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 5px;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== MENU NAVIGATION ========== */
.nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 280px;
    height: calc(100dvh - 70px);
    background: rgba(255, 255, 255, 0.98);
    z-index: 99;
    transition: right 0.4s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.nav-menu.open {
    right: 0;
}

.nav-menu ul {
    list-style: none;
    padding: 30px 0;
}

.nav-menu li {
    border-bottom: 1px solid #eee;
}

.nav-menu a {
    display: block;
    padding: 18px 30px;
    font-size: 18px;
    color: #333;
    text-decoration: none;
    font-family: var(--font-serif);
    font-weight: 300;
    transition: background 0.2s, color 0.2s;
}

.nav-menu a:hover {
    background: #f8f8f8;
    color: #2c5f7a;
}

/* ========== SECTION INVITATIONS ========== */
.invitations-section {
    width: 100%;
    padding: 70px 12px 28px;
}

.fond-invitation {
    position: relative;
    width: min(100%, var(--invitation-max-width));
    margin: 0 auto;
    aspect-ratio: 1024 / 4900;
}

.fond-invitation-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    vertical-align: bottom;
}

.invitation-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.invitation-block {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: 480px;
    width: 90%;
    /* when reached via a menu link, leave room above for the fixed header + the event illustration */
    scroll-margin-top: min(88vw, 380px);
}

.invitation-1 {
    top: 15%;
}

.invitation-2 {
    top: 46%;
}

.invitation-3 {
    top: 74%;
}

.wedding-titre {
    font-family: var(--font-serif) !important;
    font-size: 26px !important;
    font-weight: 600 !important;
    line-height: 1.2em !important;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

.invitation-titre {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: #704630;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

/* Noms Chiara & Jonathan : script élégant, lettres connectées */
.noms {
    font-family: var(--font-script);
    font-weight: 500 !important;
    font-size: clamp(1.5rem, 3.6vw, 2.2rem);
    line-height: 0.95;
    color: #704630;
    margin-top: 6px;
    margin-bottom: 18px;
    letter-spacing: 0.01em;
}

.invitation-text {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 300;
    color: #704630;
    line-height: 1.35;
    margin: 0 0 2px;
}

/* Espace après "bénédiction" (premier paragraphe) */
.invitation-block > .invitation-text:first-of-type {
    margin-bottom: 16px;
}

.invitation-date {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 600;
    color: #704630;
    margin: 18px 0 16px;
    letter-spacing: 1px;
}

/* Espace avant et après "à 18h" / "à 11h" */
.invitation-date + .invitation-text {
    margin-top: 16px;
    margin-bottom: 16px;
}

.invitation-lieu {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 600;
    color: #704630;
    margin: 16px 0 8px;
}

.invitation-ville {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 300;
    color: #704630;
    margin-bottom: 16px;
}

/* Espace avant le dernier paragraphe (après lieu) */
.invitation-ville + .invitation-text {
    margin-top: 16px;
}

.invitation-contact {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 300;
    color: #704630;
    line-height: 1.35;
    margin-top: 16px;
}

.invitation-contact a {
    color: #2563eb;
    text-decoration: underline;
}

/* ========== SECTION RSVP ========== */
.rsvp-section {
    width: min(100%, 600px);
    padding: 80px 20px 100px;
    background: linear-gradient(180deg, #fcfaf7 0%, #f6efe8 100%);
    border: 1px solid #efe3d7;
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(112, 70, 48, 0.08);
    margin: 0 auto;
}

.stay-transport-section {
    width: 100%;
    padding: 40px 12px 36px;
    margin-top: -180px;
    position: relative;
    z-index: 2;
}

.stay-transport-card {
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 18px 20px 10px;
    background: transparent;
    color: #7c5246;
}

.stay-block,
.transport-block {
    text-align: center;
}

.transport-block {
    margin-top: 34px;
}

.stay-transport-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4.5vw, 2.2rem);
    font-weight: 300;
    letter-spacing: 0.18em;
    color: #7c5246;
    text-align: center;
    margin-bottom: 18px;
}

.stay-transport-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 18px;
}

.stay-image {
    max-width: 270px;
}

.transport-image {
    max-width: 300px;
    margin-left: auto;
    margin-right: -64px;
    margin-bottom: 10px;
}

.stay-transport-text {
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.45;
    color: #7c5246;
    text-align: center;
}

.stay-transport-text p {
    margin: 0 0 14px;
}

.stay-transport-text a {
    color: inherit;
    text-decoration: none;
}

.rsvp-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    color: #704630;
    text-align: center;
    letter-spacing: 0.03em;
    margin-bottom: 40px;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.rsvp-invitation-block {
    padding: 22px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #eadfd3;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(112, 70, 48, 0.05);
}

.rsvp-invitation-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: #704630;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #efe2d6;
}

.rsvp-invitation-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: #704630;
    font-weight: 300;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #decebf;
    border-radius: 14px;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 300;
    color: #333;
    background: rgba(255, 253, 250, 0.95);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #bea089;
    box-shadow: 0 0 0 4px rgba(190, 160, 137, 0.16);
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.presence-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.presence-label {
    font-size: 15px;
    font-weight: 300;
    color: #704630;
}

.presence-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.presence-toggle {
    display: inline-flex;
    padding: 4px;
    border: 1px solid #decebf;
    border-radius: 999px;
    background: rgba(255, 251, 247, 0.96);
    gap: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.presence-option {
    min-width: 62px;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #8a6653;
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.presence-option.is-active {
    background: linear-gradient(135deg, #b99279 0%, #8f644d 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(143, 100, 77, 0.22);
}

.btn-submit {
    margin-top: 15px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #c49d85 0%, #9b725b 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(155, 114, 91, 0.2);
    transition: opacity 0.2s, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(155, 114, 91, 0.24);
}

#rsvp {
    scroll-margin-top: 90px;
}

/* Responsive */
@media (max-width: 768px) {
    .overlay {
        padding: 0;
    }

    .burger-menu {
        right: 26px;
    }

    .overlay-content {
        width: 100%;
        max-height: 100dvh;
    }

    .btn-decouvrir img {
        height: 58px;
        max-width: 280px;
    }
    
    .countdown-numbers {
        font-size: 14px;
    }
    
    .noms {
        font-size: clamp(1.3rem, 5.8vw, 1.9rem);
    }
    
    .invitation-titre {
        font-size: 20px;
    }

    .stay-transport-section {
        padding: 34px 0 28px;
    }

    .stay-transport-card {
        padding: 16px 18px 6px;
    }

    .stay-transport-title {
        font-size: clamp(1.45rem, 8vw, 1.95rem);
        letter-spacing: 0.16em;
    }

    .stay-image {
        max-width: 240px;
    }

    .transport-image {
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    .stay-transport-text {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .wedding-titre {
        font-size: 24px;
    }
    
    .invitation-text {
        font-size: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
