/* ==========================================================================
   Variables & Theming (Alsace Vineyard & Pastel)
   ========================================================================== */
:root {
    /* Colors */
    --primary-color: #2e5a40; /* Dark green */
    --secondary-color: #8baf8c; /* Sage green */
    --accent-color: #d1b88e; /* Warm golden pastel */
    --bg-color: #f9f7f1; /* Off-white pastel */
    --bg-light-green: #eef2ed;
    --text-main: #333333;
    --text-muted: #666666;
    --text-light: #ffffff;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-dark: rgba(46, 90, 64, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom one */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center { text-align: center; }
.section-padding { padding: var(--section-padding); }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.bg-light-green { background-color: var(--bg-light-green); }
.bg-dark-green { background-color: var(--primary-color); }
.text-light { color: var(--text-light); }
.relative-overflow { position: relative; overflow: hidden; }

/* Typography */
.section-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.bg-dark-green .section-title { color: var(--accent-color); }

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}
.bg-dark-green .subtitle { color: rgba(255,255,255,0.8); }

/* ==========================================================================
   Gadgets: Scroll Progress & Custom Cursor
   ========================================================================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--accent-color);
    z-index: 10000;
    transition: width 0.1s ease;
}

.custom-cursor {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}

.custom-cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--secondary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, width 0.3s, height 0.3s, background 0.3s;
}

/* Hover state for cursor */
.cursor-hover {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: var(--accent-color);
    border-color: transparent;
    opacity: 0.5;
}

/* Hide custom cursor on mobile */
@media (max-width: 768px) {
    body { cursor: auto; }
    .custom-cursor, .custom-cursor-follower { display: none; }
}

/* ==========================================================================
   Buttons & UI Elements
   ========================================================================== */
.btn-primary, .btn-secondary, .btn-primary-nav {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: none; /* keep custom cursor */
    border: none;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--primary-color);
}
.btn-primary:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-primary-nav {
    background: var(--primary-color);
    color: white;
}
.btn-primary-nav:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-light);
}
.btn-secondary.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

.glass-card-dark {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition-fast);
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 5%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    transition: var(--transition-fast);
}
#navbar.scrolled .logo { color: var(--primary-color); }

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 400;
    font-size: 1rem;
    position: relative;
    transition: var(--transition-fast);
}
#navbar.scrolled .nav-links a { color: var(--primary-color); }
#navbar.scrolled .nav-links a.btn-primary-nav { color: white; }

.nav-links a:not(.btn-primary-nav)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition-fast);
}
.nav-links a:not(.btn-primary-nav):hover::after { width: 100%; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}
.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: var(--transition-fast);
}
#navbar.scrolled .hamburger span { background: var(--primary-color); }

@media (max-width: 992px) {
    .hamburger { display: flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }
    .nav-links.active { right: 0; }
    .nav-links a { color: var(--primary-color) !important; font-size: 1.2rem; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); background: var(--primary-color); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); background: var(--primary-color); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('assets/hero_tour_europe_v4_1783240884755.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(46, 90, 64, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--text-light);
    padding: 2rem;
    margin-top: 50px;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-content .date {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.hero-content .location {
    font-size: 1.2rem;
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 20px 40px;
    margin: 0 auto;
    display: inline-flex;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.countdown-item span {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1;
    color: var(--primary-color);
}

.countdown-item label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    opacity: 0.8;
}

.scroll-down-indicator {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--text-light);
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -20px); }
    60% { transform: translate(-50%, -10px); }
}

@media (max-width: 600px) {
    .countdown-container { padding: 15px; gap: 0.5rem; flex-wrap: wrap; }
    .countdown-item span { font-size: 2rem; }
    .hero { background-attachment: scroll; } /* Disable fixed on mobile for perf */
}

/* ==========================================================================
   Notre Histoire
   ========================================================================== */
.histoire-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.histoire-text h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.histoire-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.histoire-visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blob-shape {
    position: absolute;
    background: var(--secondary-color);
    opacity: 0.2;
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

.blob-1 { width: 300px; height: 300px; top: 0; left: 0; background: var(--accent-color); }
.blob-2 { width: 250px; height: 250px; bottom: 0; right: 0; animation-delay: -3s; }

.couple-placeholder {
    width: 250px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    transform: rotate(5deg);
    transition: var(--transition-slow);
}
.couple-placeholder:hover { transform: rotate(0) scale(1.05); }

@media (max-width: 768px) {
    .histoire-grid { grid-template-columns: 1fr; gap: 2rem; }
    .histoire-text { text-align: center; }
    .histoire-visual { height: 300px; }
}

/* ==========================================================================
   Témoins Section
   ========================================================================== */
.temoins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.temoin-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    transform-style: preserve-3d;
}

.temoin-img-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
}

.temoin-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.temoin-card:hover .temoin-img-wrapper img {
    transform: scale(1.1);
}

.temoin-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    padding: 15px;
    text-align: center;
    border-radius: 15px;
    background: rgba(255,255,255,0.8);
    transform: translateY(0);
    transition: var(--transition-fast);
}

.temoin-info h3 { margin: 0; font-size: 1.2rem; color: var(--primary-color); }
.temoin-info p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

/* ==========================================================================
   Programme Section
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto 0;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0; left: 15px;
    height: 100%;
    width: 2px;
    background: var(--secondary-color);
    opacity: 0.5;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    top: 20px;
    left: -3rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 4px solid var(--bg-color);
    box-shadow: 0 0 0 4px rgba(139, 175, 140, 0.2);
    z-index: 2;
    transition: var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
    background: var(--primary-color);
    transform: scale(1.2);
}

.timeline-item .event {
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: var(--transition-fast);
}

.timeline-item .event:hover {
    transform: translateX(10px);
}

.event-icon {
    font-size: 2rem;
    background: var(--bg-light-green);
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.timeline-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-details .time {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.event-details h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

@media (max-width: 600px) {
    .timeline { padding-left: 2rem; }
    .timeline-dot { left: -2rem; }
    .timeline-item .event { flex-direction: column; gap: 1rem; }
}

/* ==========================================================================
   Infos Pratiques & Photos
   ========================================================================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition-fast);
}

.info-card:hover {
    transform: translateY(-10px);
}

.icon-wrapper {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem auto;
    border-radius: 20px;
    overflow: hidden;
}

.info-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.photo-upload-placeholder {
    max-width: 600px;
    margin: 3rem auto 0;
    padding: 4rem 2rem;
    border: 2px dashed var(--secondary-color);
}
.upload-icon { 
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem auto;
    border-radius: 50%;
    overflow: hidden;
}
.photo-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   RSVP Form
   ========================================================================== */
.rsvp-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem;
}

.modern-form { margin-top: 3rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.input-effect input {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.4s;
}
.input-effect input:focus { outline: none; }

.input-effect label {
    position: absolute;
    left: 0;
    top: 10px;
    color: rgba(255,255,255,0.6);
    transition: 0.3s ease all;
    pointer-events: none;
}

.input-effect input:focus ~ label,
.input-effect input:valid ~ label {
    top: -20px;
    font-size: 0.8rem;
    color: var(--accent-color);
}

.focus-border {
    position: absolute;
    bottom: 0; left: 0; width: 0; height: 2px;
    background-color: var(--accent-color);
    transition: 0.4s;
}

.input-effect input:focus ~ .focus-border { width: 100%; }

.select-wrapper { position: relative; }
.static-label {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}
.select-wrapper select {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
}
.select-wrapper select option { background: var(--primary-color); color: white; }
.select-wrapper select:focus { outline: none; border-bottom-color: var(--accent-color); }

@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .rsvp-wrapper { padding: 2rem; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #1a3324;
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-date { font-size: 1.2rem; margin-bottom: 2rem; letter-spacing: 2px; }

.footer-contact h4 { margin-bottom: 1rem; color: var(--accent-color); }
.footer-contact p { color: rgba(255,255,255,0.7); margin-bottom: 5px; }

.copyright {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   Animations & Reveal Effects
   ========================================================================== */
.reveal-up { opacity: 0; transform: translateY(50px); transition: 0.8s all ease; }
.reveal-up.active { opacity: 1; transform: translateY(0); }

.reveal-left { opacity: 0; transform: translateX(-50px); transition: 0.8s all ease; }
.reveal-left.active { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(50px); transition: 0.8s all ease; }
.reveal-right.active { opacity: 1; transform: translateX(0); }

.reveal-text {
    opacity: 0;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0% 100%);
    transform: translateY(20px);
    animation: revealText 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes revealText {
    to {
        opacity: 1;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
        transform: translateY(0);
    }
}
