@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&display=swap');

:root {
    --bg-color: #FFEDD5;
    --text-primary: #431407;
    --text-secondary: #92400E;
    --accent: #971414;
    --accent-light: #FFedd5;
    --sage: #BE123C;

    /* Palette Golden Valley (Light Mode - Comme l'image) */
    --layer-sky: #FDA4AF;
    /* Rose couchant */
    --layer-sun: #FDE047;
    --layer-cloud: #FFFFFF;
    --layer-mtn-back: #93C5FD;
    /* Montagnes bleutées */
    --layer-mtn-mid: #FDE68A;
    /* Vallée dorée */
    --layer-mtn-front: #78350F;
    /* Terre brune */
    --layer-path: #FB7185;
    /* Chemin rose/rouge */
    --layer-river: #E0F2F1;
    --shadow-op: 0.1;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
}

body {
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: color 0.5s ease;
}

.global-bg-svg {
    position: fixed;
    top: 0;
    left: -10vw;
    width: 120vw;
    height: 180vh;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
}

/* Smooth scrolling container (sans saut) */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
    overflow: hidden;
}

@media (max-width: 768px) {
    .section {
        padding: 2.5rem 1.2rem;
    }
}

#sec5 {
    height: auto;
    min-height: 120vh;
    padding-bottom: 20vh;
    justify-content: flex-start;
    padding-top: 10vh;
}

.content-wrapper {
    max-width: 1000px;
    text-align: center;
    z-index: 2;
}

/* Typography */
h2,
.section-title,
.section-title h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4.5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.section-title h1 {
    font-size: clamp(1.8rem, 6vw, 4rem);
    margin-bottom: 1rem;
}

.section-title h2 {
    font-size: clamp(1.5rem, 4.5vw, 3rem);
    margin-bottom: 0.8rem;
}

.section-title h3 {
    font-size: clamp(1.2rem, 3.5vw, 2.2rem);
    margin-bottom: 0.6rem;
}

.ql-size-huge {
    font-size: clamp(2rem, 8vw, 5rem) !important;
}

.ql-size-large {
    font-size: clamp(1.5rem, 5vw, 3rem) !important;
    line-height: normal !important;
}

.ql-size-small {
    font-size: 0.75rem !important;
}

p {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
    line-height: 1.5;
}

.section-title p {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
}

.highlight {
    color: var(--accent);
}

.highlight-sage {
    color: var(--sage);
}

.small-secondary {
    font-size: 0.6em;
    color: var(--text-secondary);
}

/* Animations - Parallax & CSS Reveal */
.parallax-content {
    will-change: transform, opacity;
}

.reveal-text {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.section.is-visible .reveal-text {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Inline Photos */
.inline-photo {
    width: 100%;
    max-width: 900px;
    height: auto;
    max-height: 50vh;
    object-fit: cover;
    border-radius: 20px;
    margin-top: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s;
}

.inline-photo:hover {
    transform: scale(1.02);
}

/* Grilles d'images */
.photo-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    justify-items: center;
}

/* Option fond blanc par bloc */
.photo-bg-white {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(4px);
}

/* Centrage auto pour TOUS les layouts si une photo se retrouve seule sur sa ligne */
.photo-grid .inline-photo:last-child:nth-child(odd):not(:first-child) {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.photo-grid .inline-photo {
    margin-top: 0;
    height: 100%;
    max-height: 60vh;
}

.layout-single {
    grid-template-columns: 1fr;
}

.layout-stacked {
    grid-template-columns: 1fr;
}

/* Affichage complet et proportionnel pour les photos uniques ou empilées */
.layout-single .inline-photo,
.layout-stacked .inline-photo {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 75vh !important;
    object-fit: contain !important;
    justify-self: center;
    margin: 0 auto !important;
}

.layout-duo {
    grid-template-columns: 1fr 1fr;
}

.layout-trio {
    grid-template-columns: 1fr 1fr 1fr;
}

.layout-2-1 {
    grid-template-columns: 1fr 1fr;
}

.layout-2-1 .inline-photo:nth-child(3) {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.layout-1-2 {
    grid-template-columns: 1fr 1fr;
}

.layout-1-2 .inline-photo:nth-child(1) {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.layout-mosaic {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: 1fr !important;
        gap: 0.6rem;
        margin-top: 1rem;
    }

    .photo-grid .inline-photo {
        grid-column: span 1 !important;
        aspect-ratio: auto !important;
        height: auto !important;
        max-height: 70vh !important;
        object-fit: contain !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 0 auto;
    }

    .photo-bg-white {
        padding: 0.6rem;
        border-radius: 14px;
    }
}

/* Background Images & Overlay (supprimés ou gardés pour d'autres usages) */
.bg-image {
    display: none;
}

.overlay {
    display: none;
}

/* Form Apple Glassmorphism */
.rsvp-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 550px;
    position: relative;
    z-index: 10;
}

.rsvp-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

input,
select,
textarea {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    font-size: 1.05rem;
    font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    color: var(--text-primary);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(229, 141, 119, 0.15);
    /* Coral light */
    background: rgba(255, 255, 255, 0.8);
}

.btn-apple {
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    padding: 18px 32px;
    font-size: 1.15rem;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
    font-family: var(--font-body);
}

.btn-apple:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

.btn-apple:active {
    transform: scale(0.98);
}

/* Classe pour le message stylisé */
.msg-container {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Radio Buttons Style pour le choix du nombre de personnes */
.radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.radio-btn {
    cursor: pointer;
    position: relative;
    display: inline-block;
    margin: 0;
}

.radio-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.radio-btn input[type="radio"]:checked+span {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(229, 141, 119, 0.4);
}

.radio-btn:hover span {
    border-color: var(--accent);
    color: var(--accent);
}

/* Radio Buttons Style pour le choix du statut RSVP */
.status-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.status-radio-btn {
    cursor: pointer;
    position: relative;
    display: block;
    margin: 0;
}

.status-radio-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.status-radio-btn span {
    display: block;
    text-align: center;
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 1.05rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-radio-btn input[type="radio"]:checked+span {
    background: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
    box-shadow: 0 8px 20px rgba(220, 58, 90, 0.25);
    transform: translateY(-2px);
}

.status-radio-btn:hover span {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.8);
}

/* Nettoyage des résidus d'interface (au cas où des éléments de l'éditeur auraient été collés par erreur) */
.ql-toolbar, .ql-formats, .ql-code-view, .photo-handle {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section {
        padding: 1.5rem;
    }

    .rsvp-card {
        padding: 2rem;
    }
}