/* meilleureagenceimmo.fr - design moderne, dark, scroll animations */

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #0a0a0f;
    --bg-2: #12121a;
    --bg-3: #1a1a24;
    --fg: #ffffff;
    --muted: #8b8b9a;
    --muted-2: #cbd5e1;
    --accent: #ff5e3a;
    --accent-2: #ff2a68;
    --accent-3: #8e2de2;
    --gold: #d4af37;
    --gradient: linear-gradient(135deg, #ff5e3a 0%, #ff2a68 50%, #8e2de2 100%);
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.15);
}
html, body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.5;
}
.serif { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 48px; width: 100%; }
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== HEADER ===== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 20px 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(10,10,15,0.7);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
}
.brand {
    font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
    display: flex; align-items: center; gap: 10px;
}
.brand__mark {
    width: 32px; height: 32px;
    background: var(--gradient);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px; font-weight: 900;
    box-shadow: 0 4px 20px rgba(255,94,58,0.4);
}
.brand__dot { color: var(--accent); }
.nav--desktop {
    display: flex; gap: 28px;
}
.nav--desktop a {
    color: var(--fg); font-size: 14px; font-weight: 500;
    opacity: 0.75; transition: opacity 0.3s; position: relative;
}
.nav--desktop a:hover { opacity: 1; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 100px;
    font-weight: 600; font-size: 14px;
    border: none; cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
.btn--top {
    background: var(--fg); color: var(--bg);
}
.btn--top:hover { transform: scale(1.05); box-shadow: 0 10px 40px rgba(255,255,255,0.2); }
.btn--primary {
    background: var(--gradient);
    color: #ffffff !important;
    box-shadow: 0 10px 40px rgba(255,94,58,0.3);
}
.btn--primary:hover { transform: translateY(-3px); color: #ffffff !important; }
.btn--primary:visited, .btn--primary:active, .btn--primary:focus { color: #ffffff !important; }
.btn--xl { padding: 18px 32px; font-size: 15px; }
.btn--ghost-light {
    background: transparent; color: white;
    border: 1px solid rgba(255,255,255,0.2);
}
.btn--ghost-light:hover { background: rgba(255,255,255,0.05); }
.hamburger {
    display: none; background: transparent; border: none;
    color: var(--fg); cursor: pointer; padding: 8px;
}
.nav--mobile, .nav-overlay { display: none; }

/* ===== HERO ===== */
.hero {
    position: relative; min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 120px 0 60px;
    overflow: hidden;
}
#hero-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}
.hero-content { position: relative; z-index: 2; }
.hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 100px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-strong);
    font-size: 12px; letter-spacing: 0.05em;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}
.hero-tag .dot {
    width: 6px; height: 6px; background: #4ade80; border-radius: 50%;
    box-shadow: 0 0 10px #4ade80; animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.5; } }
.hero h1 {
    font-size: clamp(56px, 9vw, 140px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 32px;
}
.hero h1 .word { display: inline-block; overflow: hidden; }
.hero h1 .word span { display: inline-block; transform: translateY(120%); }
.hero p {
    font-size: 20px; max-width: 540px; line-height: 1.5;
    color: var(--muted); margin-bottom: 48px;
}
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.scroll-indicator {
    position: absolute; bottom: 32px; left: 50%;
    transform: translateX(-50%);
    font-size: 11px; letter-spacing: 0.2em;
    color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.scroll-indicator .line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, transparent, var(--fg));
    animation: scrollDown 2s infinite;
}
@keyframes scrollDown {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== SEARCH BLOCK ===== */
.search-block {
    margin-top: 48px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    max-width: 720px;
}
.search-block form {
    display: flex; gap: 12px; align-items: center;
}
.search-block input, .search-block select {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--fg);
    padding: 14px 22px;
    font-size: 14px;
    font-family: inherit;
}
.search-block input:focus, .search-block select:focus { outline: none; border-color: var(--accent); }
.search-block input::placeholder { color: var(--muted); }
.search-suggestions {
    list-style: none; margin: 0; padding: 6px;
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--bg-2); border: 1px solid var(--border-strong);
    border-radius: 16px; max-height: 360px; overflow-y: auto; z-index: 50;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.search-suggestions li {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 12px 18px; border-radius: 10px;
    cursor: pointer; font-size: 14px;
    transition: background 0.15s;
}
.search-suggestions li:hover, .search-suggestions li.is-active {
    background: rgba(255,94,58,0.12);
}
.search-suggestions .sl__name { font-weight: 600; color: var(--fg); }
.search-suggestions .sl__meta { font-size: 12px; color: var(--muted); }

/* ===== STATS ===== */
.stats {
    padding: 120px 0;
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}
.stat { border-top: 1px solid var(--border); padding-top: 24px; }
.stat-num {
    font-size: 72px; font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 14px; color: var(--muted); margin-top: 12px; max-width: 200px; }

/* ===== SECTION TITLES ===== */
.section-title, .display {
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 800; letter-spacing: -0.04em;
    line-height: 1; margin-bottom: 40px;
}

/* ===== STEPS / HOW IT WORKS ===== */
.how { padding: 120px 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 24px; padding: 40px;
    transition: transform 0.4s, border-color 0.3s;
}
.step:hover { transform: translateY(-8px); border-color: rgba(255,94,58,0.3); }
.step-num { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 24px; letter-spacing: 0.1em; }
.step-icon {
    width: 56px; height: 56px;
    background: var(--gradient);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(255,94,58,0.3);
}
.step h3 { font-size: 22px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.02em; }
.step p { color: var(--muted); line-height: 1.6; font-size: 15px; }

/* ===== VILLES GRID (homepage + classement) ===== */
.villes-section { padding: 120px 0; background: var(--bg-2); }
.villes-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    margin-top: 48px;
}
.ville-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.3s, border-color 0.3s, background 0.3s;
}
.ville-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: rgba(255,94,58,0.05);
}
.ville-card__name { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.ville-card__region { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.ville-card__stats {
    display: flex; gap: 16px; font-size: 12px; color: var(--muted-2);
}
.ville-card__stat strong { color: var(--accent); font-weight: 700; }

/* ===== BLOG / ARTICLES ===== */
.blog-page, .ville-page, .agence-page, .article-page, .classement-page { padding-top: 120px; min-height: 60vh; }
.breadcrumb {
    display: flex; gap: 8px; align-items: center;
    font-size: 13px; color: var(--muted);
    margin: 24px 0 32px;
}
.breadcrumb a { color: var(--muted-2); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--muted); }
.breadcrumb__current { color: var(--fg); font-weight: 600; }
.blog-header { margin-bottom: 48px; }
.blog-header__lead { font-size: 18px; color: var(--muted); max-width: 720px; line-height: 1.5; }

.categories-nav {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 48px; padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.categories-nav__item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 100px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    font-size: 13px; font-weight: 500;
    transition: all 0.3s;
}
.categories-nav__item:hover { border-color: var(--accent); }
.categories-nav__item.is-active {
    background: var(--gradient);
    border-color: transparent;
    color: white;
}
.categories-nav__count {
    font-size: 11px; opacity: 0.7;
    background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 100px;
}

.articles-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.article-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s, border-color 0.3s;
    display: block;
}
.article-card:hover { transform: translateY(-6px); border-color: rgba(255,94,58,0.3); }
.article-card__cover {
    height: 200px;
    background: var(--bg-3);
    overflow: hidden;
    position: relative;
}
.article-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.article-card__body { padding: 24px; }
.article-card__cluster {
    display: inline-block; font-size: 11px; font-weight: 600;
    color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.article-card__ville {
    display: inline-block; font-size: 11px; font-weight: 600;
    color: var(--accent-3); text-transform: uppercase; letter-spacing: 0.08em;
    margin-left: 8px;
}
.article-card__title {
    font-size: 19px; font-weight: 700; line-height: 1.3;
    margin-bottom: 8px; letter-spacing: -0.01em;
}
.article-card__excerpt { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 16px; }
.article-card__meta { font-size: 12px; color: var(--muted); }

.empty-state {
    text-align: center; padding: 80px 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 20px; border: 1px solid var(--border);
}
.empty-state h2 { font-size: 24px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }
.empty-state a { color: var(--accent); }

.pagination {
    display: flex; justify-content: center; align-items: center; gap: 24px;
    margin: 48px 0;
}
.pagination a {
    padding: 12px 24px; border-radius: 100px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
    transition: border-color 0.3s;
}
.pagination a:hover { border-color: var(--accent); }
.pagination__info { font-size: 14px; color: var(--muted); }

/* ===== VILLE PAGE (Top 10 ranking) ===== */
.ville-header { margin-bottom: 48px; }
.ville-header__location { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.ville-header__lead, .ville-header__intro { font-size: 18px; color: var(--muted-2); max-width: 720px; line-height: 1.6; }

.ville-ranking { margin-bottom: 80px; }
.ranking-list { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.ranking-item {
    display: grid; grid-template-columns: 80px 1fr 100px;
    gap: 24px; align-items: center;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    transition: transform 0.3s, border-color 0.3s;
}
.ranking-item:hover { transform: translateX(6px); border-color: var(--accent); }
.ranking-item__rank { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ranking-item__rank-num {
    font-size: 36px; font-weight: 800; line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ranking-item__rank-badge {
    font-size: 10px; padding: 3px 8px; border-radius: 100px;
    background: var(--gold); color: #000; font-weight: 700;
}
.ranking-item__name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.ranking-item__addr { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.ranking-item__meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.ranking-item__rating { color: var(--gold); font-weight: 600; }
.ranking-item__avis { color: var(--muted); margin-left: 4px; }
.ranking-item__tag {
    padding: 3px 10px; border-radius: 100px;
    background: rgba(255,255,255,0.06); color: var(--muted-2);
    font-size: 11px;
}
.ranking-item__score { text-align: right; }
.ranking-item__score-num {
    display: block; font-size: 32px; font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ranking-item__score-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.ville-articles h2 { margin-bottom: 32px; }

/* ===== AGENCE FICHE ===== */
.agence-hero {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    margin-bottom: 48px;
    display: grid; grid-template-columns: 1fr 280px; gap: 48px;
}
.agence-hero h1 { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.agence-hero__addr { color: var(--muted); margin-bottom: 24px; }
.agence-hero__rating-big {
    display: flex; align-items: baseline; gap: 12px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 16px; padding: 20px;
    margin-bottom: 16px;
}
.agence-hero__rating-num { font-size: 42px; font-weight: 800; color: var(--gold); }
.agence-hero__rating-out { color: var(--muted); }
.agence-hero__cta {
    display: flex; flex-direction: column; gap: 12px;
    background: rgba(255,255,255,0.04); border-radius: 16px; padding: 24px;
}

/* ===== FOOTER ===== */
.site-footer {
    padding: 80px 0 40px;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    margin-top: 120px;
}
.site-footer__banner {
    background: var(--bg-3);
    border-radius: 24px;
    padding: 48px;
    margin-bottom: 60px;
    display: grid; grid-template-columns: 1fr;
    gap: 24px;
}
.site-footer__banner-title { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.site-footer__banner-lead { color: var(--muted); margin-bottom: 24px; }
.site-footer__banner-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.site-footer__cols {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 60px;
}
@media (max-width: 1280px) {
    .site-footer__cols { grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
    .site-footer__brand-col { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .site-footer__cols { grid-template-columns: 1fr; gap: 32px; }
    .site-footer__brand-col { grid-column: auto; }
    .site-footer__tagline { max-width: 100%; }
    .site-footer__banner { padding: 28px 20px; }
    .site-footer__banner-title { font-size: 24px; line-height: 1.2; }
    .site-footer__banner-cta { flex-direction: column; align-items: stretch; }
    .site-footer__banner-cta .btn { text-align: center; justify-content: center; }
    .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
    .site-footer__legal-links { flex-wrap: wrap; }
}
.site-footer__h {
    font-size: 12px; letter-spacing: 0.15em;
    color: var(--muted); text-transform: uppercase;
    margin-bottom: 20px; font-weight: 500;
}
.site-footer__cols ul { list-style: none; }
.site-footer__cols li { margin-bottom: 12px; }
.site-footer__cols a { color: var(--muted-2); font-size: 15px; transition: color 0.3s; }
.site-footer__cols a:hover { color: var(--accent); }
.brand--footer { margin-bottom: 16px; }
.site-footer__tagline { color: var(--muted); line-height: 1.6; max-width: 320px; font-size: 14px; }
.site-footer__bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    color: var(--muted); font-size: 13px;
}
.site-footer__legal-links { display: flex; gap: 16px; }
.site-footer__disclosure { font-size: 11px; color: var(--muted); margin-top: 16px; max-width: 100%; flex-basis: 100%; }

/* ===== ANIMATIONS REVEAL ===== */
.reveal {
    opacity: 0; transform: translateY(60px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
    .container { padding: 0 24px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .villes-grid { grid-template-columns: repeat(3, 1fr); }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .agence-hero { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 768px) {
    .nav--desktop, .btn--top { display: none; }
    .hamburger { display: block; }
    .nav--mobile {
        display: flex; flex-direction: column; gap: 32px;
        position: fixed; top: 0; right: 0; width: 280px; height: 100vh;
        background: var(--bg-2); padding: 80px 32px 32px;
        z-index: 200; transform: translateX(100%); transition: transform 0.4s;
    }
    body.nav-open .nav--mobile { transform: translateX(0); }
    body.nav-open .nav-overlay {
        display: block; position: fixed; inset: 0;
        background: rgba(0,0,0,0.7); z-index: 150;
    }
    .nav--mobile a { font-size: 18px; font-weight: 600; }
    .nav__close {
        position: absolute; top: 24px; right: 24px;
        background: transparent; border: none; color: var(--fg); cursor: pointer;
    }
    .stats { grid-template-columns: 1fr; }
    .villes-grid { grid-template-columns: repeat(2, 1fr); }
    .articles-grid { grid-template-columns: 1fr; }
    .ranking-item { grid-template-columns: 60px 1fr; gap: 12px; padding: 16px; }
    .ranking-item__score { grid-column: 1 / -1; text-align: left; padding-top: 12px; border-top: 1px solid var(--border); }
    .site-footer__cols { grid-template-columns: 1fr 1fr; }
    .site-footer__banner { padding: 32px; }
    .site-footer__banner-title { font-size: 28px; }
    .stat-num { font-size: 56px; }
    .agence-hero h1 { font-size: 32px; }
}
