/* ═══════════════════════════════════════════════════════════════════════════
   Immobilier Montérégie — Design System
   Premium dark theme with gold/emerald accents for real estate lead gen
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ──────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────────────────── */
:root {
    /* Colors */
    --bg-primary: #0a0a1a;
    --bg-secondary: #111127;
    --bg-card: #16163a;
    --bg-card-hover: #1e1e4a;
    --bg-glass: rgba(22, 22, 58, 0.7);
    --bg-input: #1a1a3e;

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0c0;
    --text-muted: #6b6b8d;

    --gold: #e0c070;
    --gold-light: #f0d890;
    --gold-dark: #c0a050;

    --emerald: #22c55e;
    --emerald-light: #4ade80;
    --emerald-dark: #16a34a;

    --accent: #6366f1;
    --accent-light: #818cf8;

    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(224, 192, 112, 0.15);
    --shadow-glow-green: 0 0 30px rgba(34, 197, 94, 0.15);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Container */
    --max-width: 1200px;
    --max-width-narrow: 800px;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(34, 197, 94, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(224, 192, 112, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--gold-light);
}

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

/* ─── Typography ────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.75rem);
}

.text-gradient {
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-green {
    background: linear-gradient(135deg, var(--emerald-light), var(--emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Layout ────────────────────────────────────────────────────────────── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

.container-narrow {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

.section {
    padding: var(--space-3xl) 0;
}

/* ─── Navigation ────────────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: var(--space-sm) 0;
    background: rgba(10, 10, 26, 0.95);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-brand span {
    color: var(--gold);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

.navbar-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.navbar-links a:hover {
    color: var(--gold);
}

.navbar-cta {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-primary) !important;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.navbar-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ─── Hero Section ──────────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(80px + var(--space-3xl)) var(--space-lg) var(--space-3xl);
    position: relative;
    overflow: hidden;
    background: url('/assets/img/hero-bg.png') center/cover no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(180deg, rgba(10, 10, 26, 0.75) 0%, rgba(10, 10, 26, 0.6) 50%, rgba(10, 10, 26, 0.85) 100%),
        radial-gradient(ellipse at 30% 40%, rgba(224, 192, 112, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(34, 197, 94, 0.08) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-lg);
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    animation: fadeInDown 0.8s ease;
}

.hero h1 {
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s ease 0.1s backwards;
}

.hero .subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--emerald));
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: block;
}

.card h3 {
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
}

.card .tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-vendeurs {
    background: rgba(224, 192, 112, 0.15);
    color: var(--gold-light);
}

.tag-acheteurs {
    background: rgba(34, 197, 94, 0.15);
    color: var(--emerald-light);
}

.tag-investisseurs {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-light);
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: var(--bg-primary);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-success {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-green);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ─── Forms ─────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(224, 192, 112, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

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

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
}

/* ─── Lead Capture Form (Glass) ─────────────────────────────────────────── */
.lead-form-container {
    position: sticky;
    top: 100px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 500px;
    margin: 0 auto;
}

.lead-form-container h3 {
    margin-bottom: var(--space-lg);
    text-align: center;
}

.form-success {
    text-align: center;
    padding: var(--space-xl);
}

.form-success .check-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-md);
}

.form-success h3 {
    color: var(--emerald);
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}

/* ─── Landing Page Content ──────────────────────────────────────────────── */
.landing-hero {
    min-height: auto;
    display: block;
    padding: calc(80px + var(--space-2xl)) var(--space-lg) var(--space-2xl);
}

/* Inline hero image — small, at top of content */
.landing-hero-img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
}

.landing-hero .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.landing-content h1 {
    margin-bottom: var(--space-lg);
}

.landing-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.landing-benefits {
    list-style: none;
    margin-bottom: var(--space-xl);
}

.landing-benefits li {
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.landing-benefits li::before {
    content: '✓';
    color: var(--emerald);
    font-weight: 700;
    flex-shrink: 0;
}

/* ─── FAQ / Accordion ───────────────────────────────────────────────────── */
.faq-section {
    padding: var(--space-3xl) 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--border-hover);
}

.faq-question {
    width: 100%;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.faq-question:hover {
    background: var(--bg-card-hover);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--gold);
    transition: var(--transition);
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer-inner {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.footer-brand span {
    color: var(--gold);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ─── Animations ────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .navbar-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.98);
        backdrop-filter: blur(20px);
        padding: var(--space-lg);
        border-bottom: 1px solid var(--border);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .landing-benefits {
        text-align: left;
    }

    .lead-form-container {
        padding: var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }
}

/* ─── Language Switcher ──────────────────────────────────────────────────── */
.lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 12px !important;
    border: 1px solid var(--gold-dark) !important;
    border-radius: var(--radius-full) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em;
    color: var(--gold) !important;
    text-transform: uppercase;
    transition: var(--transition-fast);
}

.lang-switch:hover {
    background: var(--gold) !important;
    color: var(--bg-primary) !important;
}

/* ─── Utilities ─────────────────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mt-1 {
    margin-top: var(--space-md);
}

.mt-2 {
    margin-top: var(--space-xl);
}

.mt-3 {
    margin-top: var(--space-2xl);
}

.mb-1 {
    margin-bottom: var(--space-md);
}

.mb-2 {
    margin-bottom: var(--space-xl);
}

.mb-3 {
    margin-bottom: var(--space-2xl);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}