/* ============================================================
   CLAIRE VOISIN IMMOBILIER — feuille de style principale
   Palette : crème / terracotta / charbon
   Typographies : DM Serif Display (titres) + DM Sans (texte)
   ============================================================ */

:root {
    --cream: #FBF7F1;
    --cream-2: #F3EBDF;
    --char: #26221F;
    --terra: #B5543B;
    --terra-dark: #93422D;
    --blush: #E8C5B4;
    --white: #FFFFFF;

    --font-title: "DM Serif Display", Georgia, serif;
    --font-body: "DM Sans", "Segoe UI", sans-serif;

    --radius: 16px;
    --shadow: 0 16px 40px rgba(38, 34, 31, .12);
    --container: 1160px;
    --header-h: 72px;
}

/* ---------- 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(--char);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

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

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

h1 em, h2 em { font-style: italic; color: var(--terra); }

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

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

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

/* ---------- Boutons ---------- */
.button {
    display: inline-block;
    padding: 14px 30px;
    border: 1.5px solid var(--terra);
    border-radius: 999px;
    background: var(--terra);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .25s, border-color .25s, transform .25s;
}

.button:hover { background: var(--terra-dark); border-color: var(--terra-dark); transform: translateY(-2px); }
.button.ghost { background: transparent; color: var(--char); border-color: var(--char); }
.button.ghost:hover { background: var(--char); color: var(--cream); }
.button.small { padding: 10px 20px; font-size: 13.5px; }
.button.large { padding: 16px 40px; }

/* ============================================================
   HEADER
   ============================================================ */
#header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(251, 247, 241, .95);
    backdrop-filter: blur(8px);
    color: var(--char);
    transition: box-shadow .3s;
}

#header.scrolled { box-shadow: 0 4px 20px rgba(38, 34, 31, .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 {
    font-family: var(--font-title);
    font-size: 22px;
    color: var(--char);
    text-decoration: none;
    white-space: nowrap;
}

.brand em { font-style: italic; color: var(--terra); }

.brand-sub {
    display: inline-block;
    margin-left: 8px;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--char);
    opacity: .55;
}

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

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

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

.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: 1.5px solid var(--char);
    border-radius: 10px;
    color: var(--char);
    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 { padding: calc(var(--header-h) + clamp(40px, 7vw, 90px)) 0 clamp(40px, 6vw, 80px); }

.hero-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: clamp(30px, 5vw, 70px);
    align-items: center;
}

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

.hero h1 {
    font-size: clamp(38px, 5.6vw, 66px);
    margin: 0 0 20px;
}

.hero-sub { font-size: 18.5px; max-width: 32em; margin: 0 0 30px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.hero-badges {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.hero-badges li {
    font-size: 13.5px;
    font-weight: 700;
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--cream-2);
    border: 1px solid #E4D9C8;
}

.hero-portrait img {
    width: min(380px, 100%);
    margin: 0 auto;
    border-radius: 50% 50% var(--radius) var(--radius);
    box-shadow: var(--shadow);
}

/* ============================================================
   BANDEAU CHIFFRES
   ============================================================ */
.stats-band {
    background: var(--char);
    color: var(--cream);
    padding: clamp(30px, 4vw, 48px) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 40px);
    text-align: center;
}

.stat-num {
    display: block;
    font-family: var(--font-title);
    font-size: clamp(38px, 4.6vw, 56px);
    line-height: 1.1;
    color: var(--blush);
    font-variant-numeric: tabular-nums;
}

.stat-cap { display: block; margin-top: 6px; font-size: 14.5px; opacity: .85; }

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

.section.alt { background: var(--cream-2); }
.section.dark { background: var(--char); color: var(--cream); }
.section.dark h2 em { color: var(--blush); }

.section-head { margin-bottom: clamp(30px, 4vw, 50px); }
.section-head.centered { text-align: center; }

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

.section.dark .section-label { color: var(--blush); }

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

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    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; }
}

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

.service {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: 0 8px 26px rgba(38, 34, 31, .07);
}

.service svg { width: 44px; height: 44px; color: var(--terra); margin-bottom: 16px; }
.service h3 { font-size: 23px; }
.service p { margin: 0; font-size: 15px; opacity: .85; }

/* ============================================================
   MÉTHODE : timeline
   ============================================================ */
.timeline {
    list-style: none;
    counter-reset: etape;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    max-width: 760px;
}

.timeline li {
    counter-increment: etape;
    position: relative;
    padding: 0 0 34px 76px;
}

.timeline li::before {
    content: counter(etape);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--terra);
    color: var(--white);
    font-family: var(--font-title);
    font-size: 24px;
}

.timeline li::after {
    content: "";
    position: absolute;
    left: 23px;
    top: 54px;
    bottom: 6px;
    width: 2px;
    background: #E0D3BF;
}

.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }

.timeline h3 { font-size: 23px; margin-bottom: 6px; }
.timeline p { margin: 0; font-size: 15.5px; opacity: .88; }

/* ============================================================
   AVIS
   ============================================================ */
.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);
    box-shadow: 0 8px 24px rgba(38, 34, 31, .07);
    position: relative;
}

.avis::before {
    content: "“";
    position: absolute;
    top: 2px;
    left: 18px;
    font-family: var(--font-title);
    font-size: 64px;
    color: var(--blush);
    line-height: 1;
}

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

/* ============================================================
   ZONE
   ============================================================ */
.zone-grid {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: clamp(28px, 4vw, 60px);
    align-items: center;
}

.zone-grid .section-head { margin-bottom: 18px; }

.communes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.communes li {
    font-size: 15px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid #E4D9C8;
}

.communes li:first-child {
    background: var(--terra);
    border-color: var(--terra);
    color: var(--white);
    font-weight: 700;
}

/* ============================================================
   FORMULAIRE (section dark)
   ============================================================ */
#contact-form { max-width: 720px; 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(--blush);
}

.field input, .field select {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(251, 247, 241, .3);
    border-radius: 10px;
    background: rgba(251, 247, 241, .07);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 15.5px;
    transition: border-color .2s, background .2s;
}

.field select option { color: var(--char); }
.field input::placeholder { color: rgba(251, 247, 241, .42); }

.field input:focus, .field select:focus {
    outline: none;
    border-color: var(--blush);
    background: rgba(251, 247, 241, .12);
}

.field input.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(--terra); }

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

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
    background: var(--cream-2);
    padding: clamp(36px, 5vw, 56px) 0;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-title);
    font-size: 24px;
    margin: 0 0 10px;
}

.footer-brand em { font-style: italic; color: var(--terra); }

.footer-inner p { margin: 0 0 10px; font-size: 14.5px; opacity: .8; }
.footer-credit { font-size: 13px !important; }

body.no-scroll { overflow: hidden; }

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

@media (max-width: 1024px) {
    .services, .avis-grid { grid-template-columns: 1fr; }
    .zone-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-portrait { order: -1; }
    .hero-portrait img { width: min(260px, 70%); }
    .stats-grid { grid-template-columns: 1fr; gap: 22px; }
}

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

    body.nav-open #main-nav { transform: translateY(0); }

    #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; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .timeline li { padding-left: 64px; }
    .timeline li::before { width: 42px; height: 42px; font-size: 21px; }
    .timeline li::after { left: 20px; }
}
