/* ============================================
   RÉGIE DES MONTAGNES — style montagne/chaleureux
   Palette : bois, pierre, neige, tons terre
   ============================================ */

:root {
    --cream: #f5f0e8;
    --paper: #faf7f1;
    --stone: #d9cfc1;
    --wood-light: #b8926a;
    --wood: #8b6239;
    --wood-dark: #5a3e24;
    --ink: #1f1a14;
    --ink-soft: #3d352a;
    --accent: #a8623b;
    --accent-hover: #8c4f2d;
    --shadow: rgba(45, 30, 15, 0.08);
    --shadow-strong: rgba(45, 30, 15, 0.18);

    --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --max-width: 1280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER ===== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 247, 241, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--stone);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--wood-dark);
    letter-spacing: 0.02em;
}

.logo span {
    color: var(--accent);
    font-style: italic;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    background: var(--wood-dark);
    color: var(--cream) !important;
    padding: 0.65rem 1.5rem;
    border-radius: 2px;
    letter-spacing: 0.08em !important;
    transition: background 0.2s ease;
}

.nav-cta:hover {
    background: var(--accent);
}

.nav-cta::after {
    display: none;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(31, 26, 20, 0.45), rgba(31, 26, 20, 0.25)),
        url('https://images.unsplash.com/photo-1551632811-561732d1e306?w=1920&q=80') center/cover;
    color: var(--cream);
}

.hero-content {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 6rem 2rem;
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--stone);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.05;
    color: var(--cream);
    font-weight: 400;
    max-width: 900px;
    margin-bottom: 2rem;
}

.hero h1 em {
    font-style: italic;
    color: var(--stone);
}

.hero p {
    font-size: 1.15rem;
    max-width: 560px;
    color: rgba(245, 240, 232, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--accent);
    color: var(--cream);
    border-radius: 2px;
}

.btn-primary:hover {
    background: var(--cream);
    color: var(--wood-dark);
}

.btn-outline {
    background: transparent;
    color: var(--cream);
    border: 1px solid var(--cream);
    margin-left: 1rem;
}

.btn-outline:hover {
    background: var(--cream);
    color: var(--wood-dark);
}

/* ===== SECTIONS ===== */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
    max-width: 700px;
    margin: 0 auto 1rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--ink-soft);
    font-size: 1.05rem;
}

/* ===== INTRO / VALEURS ===== */
.intro {
    background: var(--cream);
    position: relative;
}

.intro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 2rem;
}

.intro-card {
    text-align: center;
    padding: 2rem 1rem;
}

.intro-card .num {
    font-family: var(--font-display);
    font-size: 3rem;
    font-style: italic;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}

.intro-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.intro-card p {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== BIENS / CARTES ===== */
.biens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.bien-card {
    background: var(--paper);
    border: 1px solid var(--stone);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

.bien-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px var(--shadow-strong);
}

.bien-card-img {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--stone);
}

.bien-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.bien-card:hover .bien-card-img img {
    transform: scale(1.05);
}

.bien-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--wood-dark);
    color: var(--cream);
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.bien-badge.vente {
    background: var(--accent);
}

.bien-card-body {
    padding: 1.75rem;
}

.bien-card-location {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.bien-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.bien-specs {
    display: flex;
    gap: 1.25rem;
    padding: 1rem 0;
    border-top: 1px solid var(--stone);
    border-bottom: 1px solid var(--stone);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
}

.bien-specs span strong {
    color: var(--ink);
    font-weight: 600;
}

.bien-price {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--wood-dark);
}

.bien-price small {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 400;
}

/* ===== FILTRES ===== */
.filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--stone);
    padding: 0.75rem 1.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--wood-dark);
    color: var(--cream);
    border-color: var(--wood-dark);
}

/* ===== PAGE DÉTAIL BIEN ===== */
.bien-detail {
    padding: 3rem 0 6rem;
}

.bien-detail-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
    margin-bottom: 3rem;
    height: 520px;
}

.gallery-main {
    background: var(--stone);
    overflow: hidden;
    cursor: pointer;
}

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

.gallery-main:hover img {
    transform: scale(1.03);
}

.gallery-side {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 0.75rem;
}

.gallery-side > div {
    background: var(--stone);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-more {
    position: absolute;
    inset: 0;
    background: rgba(31, 26, 20, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

.bien-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.bien-detail h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
}

.bien-detail-location {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.bien-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ink-soft);
    margin-bottom: 3rem;
}

.bien-caracteristiques {
    border-top: 1px solid var(--stone);
    padding-top: 2rem;
}

.bien-caracteristiques h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.caract-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
}

.caract-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--stone);
    font-size: 0.95rem;
}

.caract-item span:first-child {
    color: var(--ink-soft);
}

.caract-item span:last-child {
    font-weight: 500;
}

.bien-sidebar {
    background: var(--cream);
    padding: 2rem;
    position: sticky;
    top: 100px;
    height: fit-content;
    border: 1px solid var(--stone);
}

.bien-sidebar .price {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--wood-dark);
    margin-bottom: 0.25rem;
}

.bien-sidebar .price-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-soft);
    margin-bottom: 2rem;
}

.bien-sidebar .btn {
    width: 100%;
    margin: 0;
    margin-bottom: 0.75rem;
    text-align: center;
}

/* ===== FOOTER ===== */
footer {
    background: var(--ink);
    color: var(--stone);
    padding: 4rem 0 2rem;
}

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

.footer-brand h3 {
    font-family: var(--font-display);
    color: var(--cream);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(217, 207, 193, 0.7);
    max-width: 400px;
    line-height: 1.7;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--cream);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.6rem;
}

.footer-col a {
    color: rgba(217, 207, 193, 0.7);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--cream);
}

.footer-bottom {
    border-top: 1px solid rgba(217, 207, 193, 0.15);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(217, 207, 193, 0.5);
}

/* ===== PAGE HEADER (pour /biens) ===== */
.page-header {
    background: var(--cream);
    padding: 5rem 0 3rem;
    text-align: center;
    border-bottom: 1px solid var(--stone);
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--ink-soft);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--ink-soft);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .nav-links {
        gap: 1.25rem;
    }
    .nav-links a:not(.nav-cta) {
        display: none;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bien-detail-gallery {
        grid-template-columns: 1fr;
        height: auto;
    }
    .gallery-main { height: 300px; }
    .gallery-side { grid-template-columns: repeat(2, 1fr); grid-template-rows: 1fr; height: 150px; }

    .bien-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bien-sidebar {
        position: static;
    }

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

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

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 500px) {
    .container { padding: 0 1.25rem; }
    .nav { padding: 1rem 1.25rem; }
    section { padding: 4rem 0; }
    .btn-outline { margin-left: 0; margin-top: 0.75rem; }
    .footer-grid { grid-template-columns: 1fr; }
}
