/* ============================================
   Site de Mariage — CSS Principal
   Design inspiré shadcn/ui + Playfair Display
   ============================================ */

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

/* ---------- Theme Variables ---------- */
:root {
    --background: 30 25% 97%;
    --foreground: 30 10% 15%;
    --card: 30 20% 99%;
    --card-foreground: 30 10% 15%;
    --primary: 38 45% 55%;
    --primary-foreground: 0 0% 100%;
    --secondary: 140 15% 75%;
    --secondary-foreground: 140 30% 20%;
    --muted: 30 15% 93%;
    --muted-foreground: 30 5% 45%;
    --accent: 140 15% 90%;
    --accent-foreground: 140 30% 20%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 30 15% 88%;
    --input: 30 15% 88%;
    --ring: 38 45% 55%;
    --radius: 0.5rem;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; border-width: 0; border-style: solid; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', ui-serif, Georgia, serif; }

/* ---------- Container ---------- */
.container { width: 100%; max-width: 1024px; margin: 0 auto; padding: 0 1rem; }
.container-narrow { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 1rem; }
.container-wide { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }

/* ========== NAVIGATION ========== */
.main-nav {
    position: sticky; top: 0; z-index: 50; width: 100%;
    background: hsl(var(--background) / 0.8);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border) / 0.4);
}
.main-nav .container {
    display: flex; justify-content: space-between; align-items: center; height: 4rem;
}
.nav-brand {
    display: flex; align-items: center; gap: 0.5rem;
    font-family: 'Playfair Display', serif; font-size: 1.125rem; font-weight: 600;
    color: hsl(var(--primary));
}
.nav-brand .heart-icon { width: 1.25rem; height: 1.25rem; fill: hsl(var(--primary)); }
.nav-brand span { color: hsl(var(--primary)); }
.nav-toggle {
    display: none; background: none; border: none; cursor: pointer; padding: 0.5rem;
    color: hsl(var(--foreground));
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; }
.nav-links {
    list-style: none; display: flex; align-items: center; gap: 0.25rem;
}
.nav-links a {
    display: inline-block; padding: 0.5rem 1rem; border-radius: var(--radius);
    font-size: 0.875rem; font-weight: 500;
    color: hsl(var(--muted-foreground)); transition: all 0.15s;
}
.nav-links a:hover, .nav-links a.active {
    color: hsl(var(--foreground)); background: hsl(var(--muted));
}
.nav-links a.active { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1); }
.btn-nav {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    margin-left: 0.5rem; padding: 0.375rem 0.75rem;
    background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
    border-radius: var(--radius); font-size: 0.75rem; font-weight: 500;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); transition: background 0.15s;
}
.btn-nav:hover { background: hsl(var(--primary) / 0.9); color: hsl(var(--primary-foreground)); }

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    white-space: nowrap; font-weight: 500; font-family: 'Inter', sans-serif;
    transition: all 0.15s; cursor: pointer; border: 1px solid transparent;
    border-radius: var(--radius); font-size: 0.875rem;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring)); }
.btn-primary {
    background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); padding: 0.625rem 2rem; font-size: 1rem;
}
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }
.btn-outline {
    background: hsl(var(--background));
    border-color: hsl(var(--input)); color: hsl(var(--foreground));
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); padding: 0.625rem 2rem; font-size: 1rem;
}
.btn-outline:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.btn-sm { height: 2.25rem; padding: 0 1rem; font-size: 0.875rem; }
.btn-block { display: flex; width: 100%; }
.btn-hero-primary {
    background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); padding: 0.625rem 2rem; font-size: 1rem;
    border-radius: var(--radius);
}
.btn-hero-primary:hover { background: hsl(var(--primary) / 0.9); }
.btn-hero-outline {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--input)); color: hsl(var(--foreground));
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); padding: 0.625rem 2rem; font-size: 1rem;
    border-radius: var(--radius);
}
.btn-hero-outline:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }

/* ========== HERO ========== */
.hero {
    position: relative; min-height: 85vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(to bottom,
        hsl(var(--primary) / 0.05),
        hsl(var(--background)),
        hsl(var(--background))
    );
    overflow: hidden;
}
.hero-decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-decor .blob-1 {
    position: absolute; top: 5rem; left: 2.5rem;
    width: 18rem; height: 18rem;
    background: hsl(var(--primary) / 0.05); border-radius: 50%; filter: blur(64px);
}
.hero-decor .blob-2 {
    position: absolute; bottom: 5rem; right: 2.5rem;
    width: 24rem; height: 24rem;
    background: hsl(var(--secondary) / 0.2); border-radius: 50%; filter: blur(64px);
}
.hero-content {
    position: relative; z-index: 10;
    text-align: center; padding: 5rem 1rem;
}
.hero-subtitle {
    font-size: 0.875rem; text-transform: uppercase;
    letter-spacing: 0.3em; color: hsl(var(--muted-foreground)); margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
}
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem; font-weight: 600;
    color: hsl(var(--foreground)); margin-bottom: 1rem; line-height: 1;
}
.hero-title span { color: hsl(var(--primary)); margin: 0 0.5rem; }
.hero-meta {
    display: flex; align-items: center; justify-content: center; gap: 1rem;
    color: hsl(var(--muted-foreground)); margin-bottom: 2rem; flex-wrap: wrap;
}
.hero-meta-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.hero-meta-item svg { width: 1rem; height: 1rem; }
.hero-meta-divider { width: 1px; height: 1rem; background: hsl(var(--border)); }

/* Countdown */
.countdown {
    display: flex; gap: 1rem; justify-content: center; margin-bottom: 2.5rem;
}
.countdown-item { text-align: center; }
.countdown-box {
    background: rgba(255,255,255,0.9); backdrop-filter: blur(8px);
    border-radius: 0.75rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    padding: 0.75rem 1rem; min-width: 70px; width: 70px;
}
.countdown-number {
    display: block; font-family: 'Playfair Display', serif;
    font-size: 1.875rem; font-weight: 700; color: hsl(var(--primary)); line-height: 1.2;
    font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
    text-align: center; width: 100%;
}
.countdown-label {
    display: block; font-size: 0.75rem; margin-top: 0.5rem;
    color: hsl(var(--muted-foreground)); font-weight: 500;
}
.hero-buttons { display: flex; flex-direction: column; gap: 1rem; justify-content: center; align-items: center; }

/* ========== SECTIONS ========== */
.section { padding: 5rem 0; }
.section-muted { background: hsl(var(--muted) / 0.3); }
.section-primary-light { background: hsl(var(--primary) / 0.05); }
.section-white { background: hsl(var(--background)); }
.page-header { padding: 4rem 0 2rem; text-align: center; }
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.875rem; font-weight: 600;
    text-align: center; margin-bottom: 1.5rem; color: hsl(var(--foreground));
}
.section-subtitle {
    font-size: 1.125rem; color: hsl(var(--muted-foreground));
    text-align: center; line-height: 1.625;
}
.section-divider {
    width: 4rem; height: 1px;
    background: hsl(var(--primary)); margin: 0 auto 2rem;
}

/* ========== CARDS ========== */
.card {
    background: hsl(var(--card)); color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem; box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    transition: box-shadow 0.15s;
}
.card:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.card-body { padding: 1.5rem; }
.card-centered { text-align: center; }
.card-time {
    font-family: 'Playfair Display', serif; font-size: 1.5rem;
    color: hsl(var(--primary)); font-weight: 600; margin-bottom: 0.5rem;
}
.card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.25rem; }
.card-desc { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }

/* ========== TIMELINE PREVIEW (home) ========== */
.cards-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.cards-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ========== NOTRE HISTOIRE ========== */
.story-text {
    color: hsl(var(--muted-foreground)); font-size: 1.125rem;
    line-height: 1.625; max-width: 48rem; margin: 0 auto;
}
.story-text + .story-text { margin-top: 1.5rem; }

/* ========== TIMELINE PAGE ========== */
.timeline { position: relative; max-width: 700px; margin: 0 auto; padding: 2rem 0; }
.timeline::before {
    content: ''; position: absolute; left: 20px; top: 0; bottom: 0;
    width: 2px; background: hsl(var(--border));
}
.timeline-block { position: relative; padding-left: 60px; margin-bottom: 2.5rem; }
.timeline-marker {
    position: absolute; left: 12px; top: 5px;
    width: 18px; height: 18px; border-radius: 50%;
    background: hsl(var(--primary)); border: 3px solid hsl(var(--background));
}
.timeline-content h3 {
    font-family: 'Playfair Display', serif; font-size: 1.25rem;
    font-weight: 600; margin-bottom: 0.5rem; color: hsl(var(--foreground));
}
.timeline-content p { color: hsl(var(--muted-foreground)); font-size: 0.95rem; }
.timeline-time-badge {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem; color: hsl(var(--primary)); font-weight: 600;
}

/* ========== VENUE ========== */
.venue-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
    align-items: center; margin-top: 2rem;
}
.venue-info h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 1rem; }
.venue-info p { margin-bottom: 1rem; color: hsl(var(--muted-foreground)); }
.map-placeholder {
    background: hsl(var(--card)); border: 1px solid hsl(var(--border));
    border-radius: 0.75rem; padding: 4rem 2rem; text-align: center;
    color: hsl(var(--muted-foreground)); box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

/* ========== INFO GRID ========== */
.info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem; margin-top: 2rem;
}
.info-card {
    background: hsl(var(--card)); color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem; padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    transition: box-shadow 0.15s;
}
.info-card:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }
.info-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem;
}
.info-card p { color: hsl(var(--muted-foreground)); font-size: 0.95rem; margin-bottom: 0.5rem; }
.info-card ul { list-style: none; }
.info-card li { padding: 0.3rem 0; color: hsl(var(--muted-foreground)); font-size: 0.95rem; }

/* ========== CTA SECTION ========== */
.cta-section {
    text-align: center; padding: 5rem 1rem;
    background: hsl(var(--primary) / 0.05);
}
.cta-heart { margin-bottom: 1rem; }
.cta-heart svg { width: 2.5rem; height: 2.5rem; fill: hsl(var(--primary)); color: hsl(var(--primary)); }
.cta-section .section-title { margin-bottom: 1rem; }
.cta-section .section-subtitle { margin-bottom: 2rem; }

/* ========== FORMS ========== */
.form-rsvp {
    background: hsl(var(--card)); padding: 2rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem; box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block; font-weight: 500; margin-bottom: 0.5rem;
    font-size: 0.875rem; color: hsl(var(--foreground));
}
.form-control {
    width: 100%; padding: 0.5rem 0.75rem;
    border: 1px solid hsl(var(--input)); border-radius: var(--radius);
    font-family: 'Inter', sans-serif; font-size: 0.875rem;
    background: hsl(var(--background)); color: hsl(var(--foreground));
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control::placeholder { color: hsl(var(--muted-foreground)); }
.form-control:focus {
    outline: none; border-color: hsl(var(--ring));
    box-shadow: 0 0 0 1px hsl(var(--ring));
}
textarea.form-control { resize: vertical; }
select.form-control { cursor: pointer; }

/* Radio cards */
.radio-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio-card { flex: 1; min-width: 150px; }
.radio-card input[type="radio"] { display: none; }
.radio-card-label {
    display: block; padding: 1rem;
    border: 1px solid hsl(var(--border)); border-radius: 0.75rem;
    text-align: center; cursor: pointer; transition: all 0.15s;
    background: hsl(var(--card)); font-size: 0.95rem;
}
.radio-card-label:hover { border-color: hsl(var(--primary) / 0.5); }
.radio-card input:checked + .radio-card-label {
    border-color: hsl(var(--primary)); background: hsl(var(--primary) / 0.08);
    color: hsl(var(--primary)); font-weight: 600;
}
.checkbox-label {
    display: flex; align-items: center; gap: 0.5rem;
    cursor: pointer; font-weight: 400 !important; font-size: 0.95rem;
}
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: hsl(var(--primary)); border-radius: 4px; }

/* ========== ALERTS ========== */
.alert {
    padding: 0.75rem 1rem; border-radius: var(--radius);
    margin: 1rem 0; position: relative; font-size: 0.875rem;
    border: 1px solid;
}
.alert-success { background: hsl(140 40% 95%); color: hsl(140 40% 25%); border-color: hsl(140 30% 85%); }
.alert-error { background: hsl(0 40% 95%); color: hsl(0 40% 30%); border-color: hsl(0 30% 85%); }
.alert-close {
    position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; font-size: 1.2rem; cursor: pointer;
    opacity: 0.5; color: inherit;
}
.alert-close:hover { opacity: 1; }

/* ========== FOOTER ========== */
.main-footer {
    border-top: 1px solid hsl(var(--border));
    background: hsl(var(--muted) / 0.3);
    padding: 2rem 0; text-align: center;
}
.footer-hearts {
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem; margin-bottom: 0.5rem;
}
.footer-hearts svg { width: 1rem; height: 1rem; fill: hsl(var(--primary)); color: hsl(var(--primary)); }
.footer-names {
    font-family: 'Playfair Display', serif;
    font-size: 1rem; color: hsl(var(--foreground)); font-weight: 500;
}
.footer-tagline { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.footer-copy { font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }

/* ========== 404 PAGE ========== */
.page-404 {
    min-height: 70vh; display: flex; align-items: center;
    justify-content: center; text-align: center; padding: 2rem;
}
.page-404 h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.75rem; font-weight: 700;
    color: hsl(var(--primary)); margin-bottom: 1rem;
}
.page-404 h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 0.5rem; }
.page-404 p { color: hsl(var(--muted-foreground)); margin-bottom: 2rem; }

/* ========== GROUP MEMBER CARDS ========== */
.group-member-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: border-color 0.15s;
}
.group-member-card:hover { border-color: hsl(var(--primary) / 0.3); }
.group-member-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid hsl(var(--border));
}
.group-member-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem; font-weight: 600;
    color: hsl(var(--foreground));
}
.group-member-fields { padding-top: 0.25rem; }
.group-member-fields .form-group { margin-bottom: 1rem; }
.group-member-fields .form-group:last-child { margin-bottom: 0; }
.companions-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem; font-weight: 600;
    color: hsl(var(--foreground));
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid hsl(var(--border));
}
.badge-primary {
    background: hsl(var(--primary) / 0.12);
    color: hsl(var(--primary));
    padding: 0.2rem 0.6rem; border-radius: 12px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-warning {
    background: hsl(38 80% 92%);
    color: hsl(38 60% 35%);
    padding: 0.2rem 0.6rem; border-radius: 12px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-success {
    background: hsl(140 30% 90%);
    color: hsl(140 30% 30%);
    padding: 0.2rem 0.6rem; border-radius: 12px;
    font-size: 0.75rem; font-weight: 600;
}
.radio-group-sm { gap: 0.5rem; }
.radio-card-sm { min-width: 80px; flex: 0 1 auto; }
.radio-card-sm .radio-card-label { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
/* Hotel options — radios pleine largeur empilés */
.hotel-options { display: flex; flex-direction: column; gap: 0.5rem; }
.hotel-options .radio-card { flex: none; min-width: 0; }
.hotel-options .radio-card-label { text-align: left !important; }

/* ========== RSVP STEPPER ========== */
.rsvp-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem; margin-bottom: 2rem;
}
.rsvp-step {
    display: flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 50%; font-size: 0.75rem; font-weight: 600;
    background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
    transition: all 0.15s;
}
.rsvp-step.active { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.rsvp-step-line { width: 2rem; height: 1px; background: hsl(var(--border)); }

/* ========== SVG ICONS ========== */
.icon { display: inline-block; vertical-align: middle; }
.icon-heart path { fill: currentColor; }

/* ========== RESPONSIVE ========== */
@media (min-width: 640px) {
    .hero-buttons { flex-direction: row; }
}

@media (min-width: 768px) {
    .hero-title { font-size: 6rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-meta-item { font-size: 1rem; }
    .countdown-box { padding: 1rem 1.5rem; min-width: 90px; width: 90px; }
    .countdown-number { font-size: 3rem; }
    .countdown-label { font-size: 0.875rem; }
    .countdown { gap: 2rem; }
    .section-title { font-size: 2.25rem; }
    .cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .nav-toggle { display: flex; align-items: center; justify-content: center; }
    .nav-links {
        display: none; position: absolute; top: 4rem; left: 0; right: 0;
        background: hsl(var(--background)); flex-direction: column;
        padding: 1rem; gap: 0;
        border-bottom: 1px solid hsl(var(--border));
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    }
    .nav-links.open { display: flex; }
    .nav-links a { display: block; padding: 0.75rem 1rem; text-align: center; width: 100%; }
    .btn-nav { margin: 0.5rem 1rem 0; }
    .hero-title { font-size: 3rem; }
    .countdown { gap: 0.75rem; }
    .countdown-box { padding: 0.5rem 0.75rem; min-width: 60px; width: 60px; }
    .countdown-number { font-size: 1.5rem; }
    .venue-grid { grid-template-columns: 1fr; }
    .section { padding: 3rem 0; }
    .cards-grid-3 { grid-template-columns: 1fr; }
    .hero-meta { gap: 0.5rem; }
    .hero-meta-divider { display: none; }
}
