/* ============================================================
   IMMOBILIÈRE DU PERRON — feuille de style principale
   Palette : bleu nuit / doré / blanc cassé
   Typographies : Marcellus (titres) + Manrope (texte)
   ============================================================ */

:root {
    --paper: #FAF7F2;
    --paper-2: #F1EBE0;
    --navy: #16233A;
    --navy-soft: #22314D;
    --gold: #C9963C;
    --gold-dark: #A97B2B;
    --stone: #8B93A3;
    --white: #FFFFFF;

    --font-title: "Marcellus", Georgia, serif;
    --font-body: "Manrope", "Segoe UI", sans-serif;

    --radius: 12px;
    --shadow: 0 16px 40px rgba(22, 35, 58, .14);
    --container: 1220px;
    --header-h: 74px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--navy);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 .5em;
}

h1 em, h2 em { font-style: normal; color: var(--gold); }

a { color: var(--gold-dark); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 44px);
}

.container.narrow { max-width: 840px; }

/* ---------- Boutons ---------- */
.button {
    display: inline-block;
    padding: 13px 28px;
    border: 1px solid var(--navy);
    border-radius: 6px;
    background: var(--navy);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .25s, border-color .25s, transform .25s;
}

.button:hover { background: var(--navy-soft); border-color: var(--navy-soft); transform: translateY(-2px); }
.button.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.button.gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--white); }
.button.small { padding: 9px 18px; font-size: 12.5px; }
.button.large { padding: 15px 38px; }

/* ============================================================
   HEADER
   ============================================================ */
#header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    color: var(--white);
    transition: background .3s, color .3s, box-shadow .3s;
}

#header.scrolled {
    background: rgba(250, 247, 242, .95);
    backdrop-filter: blur(8px);
    color: var(--navy);
    box-shadow: 0 4px 20px rgba(22, 35, 58, .10);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 44px);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: inherit;
}

.brand-mark { width: 34px; height: 34px; flex: none; color: var(--gold); }

.brand-name {
    font-family: var(--font-title);
    font-size: 19px;
    white-space: nowrap;
}

.brand-name em { font-style: normal; color: var(--gold); }

#main-nav ul {
    display: flex;
    gap: clamp(14px, 2.2vw, 32px);
    list-style: none;
    margin: 0;
    padding: 0;
}

#main-nav a {
    color: inherit;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: .04em;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color .2s;
}

#main-nav a:hover { border-bottom-color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 16px; }

.header-actions .phone {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
}

#burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: none;
    border: 1px solid currentColor;
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
}

#burger span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .25s; }

body.nav-open #burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open #burger span:nth-child(2) { opacity: 0; }
body.nav-open #burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 92svh;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url("../img/hero.svg") center / cover no-repeat, var(--navy);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(22, 35, 58, .72) 0%, rgba(22, 35, 58, .45) 55%, rgba(22, 35, 58, .82) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    width: 100%;
    margin: 0 auto;
    padding: calc(var(--header-h) + 46px) clamp(20px, 4vw, 44px) 70px;
}

.hero-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 16px;
}

.hero h1 {
    font-size: clamp(40px, 6.4vw, 76px);
    max-width: 14em;
    margin: 0 0 18px;
}

.hero-sub {
    max-width: 560px;
    font-size: 18px;
    margin: 0 0 40px;
    color: rgba(255, 255, 255, .92);
}

/* ---------- Recherche rapide ---------- */
.quick-search {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr)) auto;
    gap: 14px;
    align-items: end;
    max-width: 860px;
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(250, 247, 242, .97);
    box-shadow: var(--shadow);
}

.qs-field label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 6px;
}

.qs-field select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #D8D2C6;
    border-radius: 6px;
    background: var(--white);
    color: var(--navy);
    font-family: var(--font-body);
    font-size: 15px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(64px, 8vw, 110px) 0; }

.section.dark { background: var(--navy); color: var(--paper); }
.section.tinted { background: var(--paper-2); }

.section-head { margin-bottom: clamp(34px, 4.5vw, 56px); }
.section-head.centered { text-align: center; }

.section-label {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 12px;
}

.section-head h2 { font-size: clamp(30px, 4.2vw, 50px); margin: 0; }
.section-sub { max-width: 560px; margin: 16px auto 0; opacity: .85; }

[data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s ease;
}

[data-reveal].revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ============================================================
   BIENS : filtres + grille
   ============================================================ */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
    padding: 18px;
    border: 1px solid #E4DDD0;
    border-radius: var(--radius);
    background: var(--white);
    margin-bottom: 18px;
}

.filter { min-width: 150px; flex: 1; }

.filter label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 6px;
}

.filter select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D8D2C6;
    border-radius: 6px;
    background: var(--paper);
    color: var(--navy);
    font-family: var(--font-body);
    font-size: 15px;
}

.filters-reset {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: none;
    color: var(--stone);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.filters-reset:hover { color: var(--navy); }

.results-count { font-size: 14px; color: var(--stone); margin: 0 0 22px; }

.biens-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 2.5vw, 30px);
}

.bien-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid #E4DDD0;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s;
}

.bien-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.bien-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.bien-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.bien-prix {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--gold-dark);
}

.bien-titre { font-size: 17px; font-weight: 700; margin: 0; }
.bien-lieu { font-size: 14px; color: var(--stone); margin: 0; }

.bien-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.bien-tag {
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--paper-2);
    color: var(--navy);
}

.bien-tag.peb { background: var(--navy); color: var(--paper); }

.no-results {
    text-align: center;
    padding: 40px 20px;
    font-size: 17px;
    color: var(--stone);
}

/* ============================================================
   VENDRE : étapes
   ============================================================ */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 36px);
}

.step {
    position: relative;
    padding: 30px 26px 26px;
    border: 1px solid rgba(250, 247, 242, .18);
    border-radius: var(--radius);
    background: var(--navy-soft);
}

.step-num {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-family: var(--font-title);
    font-size: 22px;
    margin-bottom: 14px;
}

.step h3 { font-size: 21px; }
.step p { margin: 0; font-size: 15px; opacity: .88; }

.vendre-cta { text-align: center; margin-top: clamp(30px, 4vw, 48px); }

/* ============================================================
   AGENCE / ÉQUIPE
   ============================================================ */
.agence-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: clamp(30px, 4vw, 60px);
    align-items: start;
}

.agence-text p { margin: 0 0 1.2em; }

.agence-points {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.agence-points li {
    background: var(--white);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    padding: 11px 16px;
    font-size: 15px;
}

.team {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 24px);
}

.member {
    text-align: center;
    background: var(--white);
    border: 1px solid #E4DDD0;
    border-radius: var(--radius);
    padding: 26px 18px 22px;
}

.member svg { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; }
.member h3 { font-size: 18px; margin-bottom: 2px; }
.member-role { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark); margin: 0 0 10px; }
.member p:last-child { font-size: 14px; color: var(--stone); margin: 0; }

/* ============================================================
   TÉMOIGNAGES
   ============================================================ */
.avis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 2.5vw, 30px);
}

.avis {
    margin: 0;
    padding: 28px 26px;
    background: var(--white);
    border-radius: var(--radius);
    border-top: 3px solid var(--gold);
    box-shadow: 0 8px 24px rgba(22, 35, 58, .07);
}

.avis p { margin: 0 0 16px; font-size: 15.5px; }
.avis footer { font-size: 13.5px; font-weight: 700; color: var(--gold-dark); }

/* ============================================================
   FORMULAIRE (section dark)
   ============================================================ */
#contact-form { max-width: 740px; margin: 0 auto; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: var(--gold);
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(250, 247, 242, .3);
    border-radius: 8px;
    background: rgba(250, 247, 242, .07);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 15.5px;
    transition: border-color .2s, background .2s;
}

.field select option { color: var(--navy); }
.field input::placeholder, .field textarea::placeholder { color: rgba(250, 247, 242, .42); }

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(250, 247, 242, .12);
}

.field input.invalid, .field textarea.invalid { border-color: #E07B5F; }

.consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    margin: 4px 0 22px;
    opacity: .9;
    cursor: pointer;
}

.consent input { margin-top: 4px; accent-color: var(--gold); }

.form-error { color: #F0A48D; font-size: 15px; margin: 0 0 16px; }
.form-note { font-size: 13px; opacity: .6; margin-top: 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
    background: #101A2C;
    color: var(--paper);
    padding: clamp(46px, 6vw, 72px) 0 26px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: clamp(28px, 4vw, 56px);
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(250, 247, 242, .14);
}

.footer-brand .brand-mark { width: 40px; height: 40px; }
.footer-brand .brand-name { font-size: 22px; margin: 12px 0 4px; }
.footer-tagline { opacity: .7; margin: 0; font-size: 14.5px; }

.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-nav a { color: var(--paper); text-decoration: none; font-size: 14.5px; opacity: .85; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }

.footer-contact .phone {
    display: inline-block;
    font-family: var(--font-title);
    font-size: 22px;
    color: var(--gold);
    text-decoration: none;
    margin-bottom: 10px;
}

.footer-contact p { font-size: 14px; opacity: .75; margin: 0; }

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 22px;
    font-size: 13px;
}

.footer-legal p { margin: 0; opacity: .65; }
.footer-legal a { color: var(--gold); }
.footer-credit a { color: var(--gold); }

/* ============================================================
   MODALE BIEN
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(16, 26, 44, .7);
    backdrop-filter: blur(4px);
}

.modal[hidden] { display: none; }

.modal-box {
    position: relative;
    width: min(860px, 100%);
    max-height: 86vh;
    overflow-y: auto;
    background: var(--paper);
    color: var(--navy);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--navy);
    color: var(--paper);
    font-size: 15px;
    cursor: pointer;
}

.modal-bien img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.modal-bien-content { padding: 28px 32px 34px; }

.modal-bien-content .bien-prix { font-size: 30px; }
.modal-bien-content h2 { font-size: 27px; margin: 4px 0 2px; }
.modal-bien-content .bien-lieu { font-size: 15px; }

.modal-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.modal-specs span {
    font-size: 13.5px;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--paper-2);
}

.modal-bien-content p.desc { font-size: 15.5px; margin: 0 0 22px; }

body.no-scroll { overflow: hidden; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1160px) {
    .header-actions .button { display: none; }
}

@media (max-width: 1024px) {
    .biens-grid { grid-template-columns: repeat(2, 1fr); }
    .steps, .avis-grid { grid-template-columns: 1fr; }
    .agence-grid { grid-template-columns: 1fr; }
    .team { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
    #main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--paper);
        color: var(--navy);
        box-shadow: 0 18px 36px rgba(22, 35, 58, .16);
        transform: translateY(-130%);
        transition: transform .3s ease;
    }

    body.nav-open #main-nav { transform: translateY(0); }
    body.nav-open #header { background: var(--paper); color: var(--navy); }

    #main-nav ul { flex-direction: column; gap: 0; padding: 10px 0; }
    #main-nav a { display: block; padding: 13px clamp(20px, 4vw, 44px); font-size: 16.5px; }

    #burger { display: flex; }
    .header-actions .phone { display: none; }

    .quick-search { grid-template-columns: 1fr 1fr; }
    .quick-search .button { grid-column: 1 / -1; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .team { grid-template-columns: 1fr; }
    .modal-bien-content { padding: 22px 20px 26px; }
}

@media (max-width: 620px) {
    .biens-grid { grid-template-columns: 1fr; }
    .quick-search { grid-template-columns: 1fr; padding: 16px; }
    .filters { flex-direction: column; align-items: stretch; }
    .filter { min-width: 0; }
}
