/* ===== LEVEL 4 — STUDIO VERNE — PREMIUM / EDITORIAL ARCHITECTURE ===== */
/* Editorial minimalism : échelle typographique audacieuse, palette restreinte,
   layouts asymétriques, curseur custom, parallaxe, micro-interactions soignées. */

:root {
    /* Sophisticated neutrals + one strong accent (terracotta/clay) */
    --ink: #16140f;          /* near-black warm ink */
    --ink-soft: #2a2722;
    --paper: #f4f1ea;        /* warm bone paper */
    --paper-2: #eae5db;      /* slightly deeper */
    --paper-3: #e2dccf;
    --white: #fbfaf6;
    --line: rgba(22,20,15,0.12);
    --line-soft: rgba(22,20,15,0.07);
    --muted: #7c766c;
    --muted-2: #9b948a;
    --accent: #c0532b;       /* clay / terracotta */
    --accent-deep: #a13f1d;
    --accent-tint: rgba(192,83,43,0.10);

    --radius: 2px;
    --radius-lg: 4px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* Fluid type scale */
    --fs-hero: clamp(3.2rem, 9.5vw, 9rem);
    --fs-h2: clamp(2.4rem, 5.5vw, 4.75rem);
    --fs-h3: clamp(1.3rem, 2vw, 1.6rem);
    --fs-display: clamp(2rem, 6vw, 4rem);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    color: var(--ink);
    line-height: 1.55;
    background: var(--paper);
    overflow-x: hidden;
    font-weight: 400;
}

/* Hide native cursor only when custom cursor is active (set via JS on non-touch) */
body.has-cursor,
body.has-cursor a,
body.has-cursor button,
body.has-cursor input,
body.has-cursor textarea,
body.has-cursor select,
body.has-cursor .projet-card,
body.has-cursor .pill,
body.has-cursor .filter,
body.has-cursor label { cursor: none; }

::selection { background: var(--accent); color: var(--white); }

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

.container { max-width: 1340px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 72px); }

/* ============ CUSTOM CURSOR — RÉTICULE D'ARCHITECTE ============ */
/* Signature "plan / dessin technique" : un point carré + un cadre carré
   (pas de cercle), avec des repères d'angle. Volontairement différent du
   curseur "halo" du niveau 5. */
.cursor {
    position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
    width: 6px; height: 6px; border-radius: 0;          /* point carré */
    background: var(--accent);
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease), height 0.3s var(--ease),
                background 0.3s var(--ease), opacity 0.3s;
    will-change: transform;
}
.cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 9998; pointer-events: none;
    width: 34px; height: 34px; border-radius: 0;        /* cadre carré */
    border: 1px solid rgba(22,20,15,0.45);
    transform: translate(-50%, -50%);
    transition: width 0.35s var(--ease), height 0.35s var(--ease),
                border-color 0.35s var(--ease), opacity 0.3s, background 0.35s var(--ease);
    will-change: transform;
    display: flex; align-items: center; justify-content: center;
}
/* Repères d'angle (style mire de cadrage) */
.cursor-ring::before, .cursor-ring::after {
    content: ''; position: absolute; width: 5px; height: 5px;
    border-color: var(--ink); border-style: solid; opacity: 0.55;
    transition: opacity 0.35s var(--ease);
}
.cursor-ring::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.cursor-ring::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.cursor.hide, .cursor-ring.hide { opacity: 0; }
/* hover state on interactive elements : le cadre se resserre sur l'accent */
.cursor.hover { width: 0; height: 0; }
.cursor-ring.hover {
    width: 52px; height: 52px;
    border-color: var(--accent);
    background: var(--accent-tint);
}
.cursor-ring.hover::before, .cursor-ring.hover::after { border-color: var(--accent); opacity: 1; }
/* "view" label state for project cards : plaque pleine carrée */
.cursor-ring.view {
    width: 84px; height: 84px;
    border-color: transparent;
    background: var(--accent);
}
.cursor-ring.view::before, .cursor-ring.view::after { opacity: 0; }
.cursor-ring .cursor-label {
    color: var(--white); font-size: 0.62rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase; opacity: 0;
    transition: opacity 0.3s; white-space: nowrap;
}
.cursor-ring.view .cursor-label { opacity: 1; }
.cursor.view { opacity: 0; }

/* ============ LOADER ============ */
.loader {
    position: fixed; inset: 0; background: var(--ink); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; width: min(280px, 60vw); }
.loader-text {
    font-family: 'Instrument Serif', serif; font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--white); display: block; margin-bottom: 28px;
    letter-spacing: 0.04em; font-style: italic;
}
.loader-bar { width: 100%; height: 1px; background: rgba(255,255,255,0.15); overflow: hidden; }
.loader-fill { height: 100%; background: var(--accent); width: 0; transition: width 0.1s linear; }

/* ============ HEADER ============ */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 0; transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease);
    mix-blend-mode: normal;
}
.header.scrolled {
    background: rgba(244,241,234,0.78); backdrop-filter: blur(20px) saturate(140%);
    box-shadow: 0 1px 0 var(--line-soft);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: clamp(76px, 9vh, 104px); }
.logo {
    font-family: 'Instrument Serif', serif; font-size: clamp(1.25rem, 1.6vw, 1.55rem);
    font-weight: 400; color: var(--ink); text-decoration: none; line-height: 0.96;
    letter-spacing: 0.01em; transition: color 0.3s;
}
.logo:hover { color: var(--accent); }
.nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 44px); }
.nav a {
    text-decoration: none; color: var(--ink); font-size: 0.78rem;
    font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
    position: relative; transition: color 0.3s; overflow: hidden;
}
.nav a:not(.nav-cta)::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 1px;
    background: var(--accent); transform: scaleX(0); transform-origin: right;
    transition: transform 0.45s var(--ease);
}
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav a:not(.nav-cta):hover { color: var(--accent); }
.nav-cta {
    padding: 11px 24px !important; border: 1px solid var(--ink); color: var(--ink) !important;
    border-radius: 50px; transition: all 0.45s var(--ease) !important; background: transparent;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }

.menu-toggle { display: none; background: none; border: none; width: 32px; height: 16px; position: relative; }
.menu-toggle span { display: block; height: 1.5px; background: var(--ink); position: absolute; left: 0; right: 0; transition: 0.4s var(--ease); }
.menu-toggle span:nth-child(1) { top: 2px; }
.menu-toggle span:nth-child(2) { bottom: 2px; }
.nav-open ~ .menu-toggle span:nth-child(1) { top: 7px; transform: rotate(45deg); }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 38px; border-radius: 50px; font-weight: 500; text-decoration: none;
    font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
    transition: all 0.5s var(--ease); border: 1px solid transparent; position: relative;
    overflow: hidden; font-family: inherit;
}
.btn span { position: relative; z-index: 2; }
.btn-sm { padding: 11px 22px; font-size: 0.72rem; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary::before {
    content: ''; position: absolute; inset: 0; background: var(--accent);
    transform: translateY(101%); transition: transform 0.55s var(--ease); z-index: 1;
}
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover { color: var(--white); }
.btn-outline { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-outline::before {
    content: ''; position: absolute; inset: 0; background: var(--ink);
    transform: translateY(101%); transition: transform 0.55s var(--ease); z-index: 1;
}
.btn-outline:hover::before { transform: translateY(0); }
.btn-outline:hover { color: var(--paper); }

/* ============ HERO ============ */
.hero {
    min-height: 100vh; display: flex; align-items: flex-end; position: relative;
    overflow: hidden; padding: 0 0 clamp(48px, 7vh, 90px);
}
.hero-inner {
    display: grid; grid-template-columns: 1fr; gap: clamp(40px, 6vw, 80px);
    position: relative; z-index: 3; width: 100%;
}
.hero-label {
    font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--accent); margin-bottom: clamp(20px, 3vw, 34px); font-weight: 600;
    display: flex; align-items: center; gap: 14px;
}
.hero-label::before { content: ''; width: 42px; height: 1px; background: var(--accent); display: inline-block; }
.hero h1 {
    font-family: 'Instrument Serif', serif; font-size: var(--fs-hero); line-height: 0.96;
    margin-bottom: clamp(28px, 4vw, 44px); font-weight: 400; letter-spacing: -0.015em;
    max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > * { display: inline-block; }
.hero p {
    font-size: clamp(1rem, 1.25vw, 1.18rem); color: var(--ink-soft); max-width: 46ch;
    margin-bottom: clamp(32px, 4vw, 44px); line-height: 1.65;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
    display: flex; gap: clamp(32px, 5vw, 72px); padding-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid var(--line); flex-wrap: wrap;
}
.stat-num {
    font-family: 'Instrument Serif', serif; font-size: clamp(2.4rem, 4vw, 3.6rem);
    display: block; color: var(--ink); line-height: 1; letter-spacing: -0.01em;
}
.stat-label { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 8px; display: block; }

.hero-image {
    position: absolute; top: 0; right: 0; width: clamp(40%, 46vw, 52%); height: 100%;
    z-index: 1; overflow: hidden;
}
.hero-image::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, var(--paper) 0%, rgba(244,241,234,0.5) 32%, transparent 62%);
    z-index: 2;
}
.hero-image::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, var(--paper) 0%, transparent 28%);
    z-index: 2;
}
.hero-image img { width: 100%; height: 120%; object-fit: cover; filter: grayscale(0.18) contrast(1.04); will-change: transform; }

.scroll-cue {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 4;
    font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-cue .bar { width: 1px; height: 46px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue .bar::after {
    content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
    background: var(--accent); animation: scrollLine 2.2s var(--ease) infinite;
}
@keyframes scrollLine { 0% { top: -100%; } 60%,100% { top: 100%; } }

/* ============ REVEAL ANIMATION ============ */
[data-reveal] { opacity: 0; transform: translateY(48px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }
/* line-by-line mask reveal for headings */
.hero h1 .line > * { transform: translateY(110%); transition: transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.loaded .hero h1 .line > * { transform: translateY(0); }

/* ============ SECTIONS ============ */
section { padding: clamp(90px, 12vw, 180px) 0; position: relative; }
.section-header { margin-bottom: clamp(48px, 6vw, 80px); max-width: 900px; }
.section-tag {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--accent); font-weight: 600; margin-bottom: 22px;
}
.section-tag::before { content: ''; width: 32px; height: 1px; background: var(--accent); }
h2 {
    font-family: 'Instrument Serif', serif; font-size: var(--fs-h2); color: var(--ink);
    font-weight: 400; line-height: 1.0; letter-spacing: -0.015em;
}

/* ============ PROJETS ============ */
.projets { background: var(--white); }
.projets-filter { display: flex; gap: 10px; margin-bottom: clamp(36px, 4vw, 56px); flex-wrap: wrap; }
.filter {
    padding: 11px 26px; border: 1px solid var(--line); border-radius: 50px; background: transparent;
    font-family: inherit; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--muted); transition: all 0.45s var(--ease);
}
.filter.active, .filter:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.projets-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(20px, 2.5vw, 40px); }
.projet-card {
    position: relative; overflow: hidden; border-radius: var(--radius-lg);
    grid-column: span 6; aspect-ratio: 4/3;
    transition: transform 0.7s var(--ease);
}
/* editorial asymmetry: alternate tall/wide */
.projet-card:nth-child(6n+1) { grid-column: span 7; aspect-ratio: 16/11; }
.projet-card:nth-child(6n+2) { grid-column: span 5; aspect-ratio: 4/5; align-self: end; }
.projet-card:nth-child(6n+3) { grid-column: span 5; aspect-ratio: 4/5; }
.projet-card:nth-child(6n+4) { grid-column: span 7; aspect-ratio: 16/11; }
.projet-card:nth-child(6n+5) { grid-column: span 6; aspect-ratio: 16/10; }
.projet-card:nth-child(6n+6) { grid-column: span 6; aspect-ratio: 16/10; }

.projet-card img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
    filter: grayscale(0.2) contrast(1.03);
}
.projet-card:hover img { transform: scale(1.06); filter: grayscale(0) contrast(1.05); }
.projet-overlay {
    position: absolute; inset: 0; padding: clamp(20px, 2.5vw, 34px);
    display: flex; flex-direction: column; justify-content: flex-end;
    background: linear-gradient(0deg, rgba(22,20,15,0.78) 0%, rgba(22,20,15,0.15) 45%, transparent 75%);
    opacity: 0; transition: opacity 0.6s var(--ease);
}
.projet-card:hover .projet-overlay { opacity: 1; }
.projet-overlay h3 { font-family: 'Instrument Serif', serif; color: var(--white); font-size: clamp(1.3rem, 2vw, 1.9rem); margin-bottom: 6px; font-weight: 400; transform: translateY(12px); transition: transform 0.6s var(--ease) 0.05s; }
.projet-overlay span { color: rgba(251,250,246,0.72); font-size: 0.82rem; letter-spacing: 0.04em; transform: translateY(12px); transition: transform 0.6s var(--ease) 0.1s; }
.projet-overlay .projet-btn { margin-top: 16px; color: var(--accent); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; transform: translateY(12px); transition: transform 0.6s var(--ease) 0.15s; }
.projet-card:hover .projet-overlay h3,
.projet-card:hover .projet-overlay span,
.projet-card:hover .projet-overlay .projet-btn { transform: translateY(0); }

/* ============ MODAL ============ */
.modal {
    position: fixed; inset: 0; background: rgba(22,20,15,0.55); backdrop-filter: blur(8px);
    z-index: 500; display: none; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 48px);
    opacity: 0; transition: opacity 0.4s var(--ease);
}
.modal.open { display: flex; opacity: 1; }
.modal-content {
    background: var(--white); border-radius: var(--radius-lg); max-width: 880px; width: 100%;
    max-height: 88vh; overflow-y: auto; position: relative;
    transform: translateY(30px) scale(0.98); transition: transform 0.5s var(--ease);
}
.modal.open .modal-content { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute; top: 18px; right: 18px; background: var(--white); border: 1px solid var(--line);
    width: 44px; height: 44px; border-radius: 50%; font-size: 1rem; z-index: 10; color: var(--ink);
    display: flex; align-items: center; justify-content: center; transition: all 0.4s var(--ease);
}
.modal-close:hover { background: var(--ink); color: var(--paper); transform: rotate(90deg); }
.modal-body img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; filter: grayscale(0.1); }
.modal-info { padding: clamp(28px, 4vw, 48px); }
.modal-info h3 { font-family: 'Instrument Serif', serif; font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 14px; font-weight: 400; }
.modal-info .modal-meta { display: flex; gap: 28px; font-size: 0.78rem; color: var(--muted); margin-bottom: 22px; letter-spacing: 0.04em; text-transform: uppercase; flex-wrap: wrap; }
.modal-info p { font-size: 1.02rem; line-height: 1.8; color: var(--ink-soft); }

/* ============ APPROCHE ============ */
.approche { background: var(--ink); color: var(--paper); }
.approche .section-tag { color: var(--accent); }
.approche h2 { color: var(--paper); }
.etapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid rgba(244,241,234,0.14); }
.etape {
    padding: clamp(28px, 3vw, 44px) clamp(20px, 2vw, 32px) clamp(36px, 4vw, 56px);
    border-bottom: 1px solid rgba(244,241,234,0.14); border-right: 1px solid rgba(244,241,234,0.14);
    transition: background 0.5s var(--ease); position: relative;
}
.etape:nth-child(4n) { border-right: none; }
.etape:hover { background: rgba(244,241,234,0.03); }
.etape-num {
    font-family: 'Instrument Serif', serif; font-size: clamp(2.4rem, 4vw, 3.4rem);
    color: rgba(244,241,234,0.25); margin-bottom: clamp(24px, 4vw, 48px); line-height: 1;
    transition: color 0.5s var(--ease);
}
.etape:hover .etape-num { color: var(--accent); }
.etape h3 { font-size: var(--fs-h3); margin-bottom: 12px; font-weight: 500; font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.01em; }
.etape p { font-size: 0.9rem; color: rgba(244,241,234,0.6); line-height: 1.7; }

/* ============ DEVIS ESTIMATEUR ============ */
.devis { background: var(--paper-2); }
.devis-sub { color: var(--muted); margin-top: -36px; margin-bottom: clamp(40px, 5vw, 64px); max-width: 50ch; font-size: 1.02rem; }
.devis-widget { display: grid; grid-template-columns: 1.25fr 0.9fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.devis-group { margin-bottom: clamp(26px, 3vw, 38px); }
.devis-group > label { display: block; font-size: 0.72rem; font-weight: 600; margin-bottom: 14px; color: var(--ink); letter-spacing: 0.1em; text-transform: uppercase; }
.devis-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
    padding: 11px 22px; border: 1px solid var(--line); border-radius: 50px; background: transparent;
    font-family: inherit; font-size: 0.8rem; transition: all 0.4s var(--ease); color: var(--ink-soft);
}
.pill.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill:not(.active):hover { border-color: var(--ink); }
.range-wrap { display: flex; align-items: center; gap: 20px; }
.range-wrap input[type="range"] { flex: 1; -webkit-appearance: none; appearance: none; height: 2px; background: var(--line); border-radius: 2px; }
.range-wrap input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: none; border: 3px solid var(--paper-2); box-shadow: 0 0 0 1px var(--accent); transition: transform 0.2s; }
.range-wrap input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range-wrap input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper-2); }
.range-value { font-family: 'Instrument Serif', serif; font-size: 1.3rem; min-width: 90px; color: var(--ink); }
.devis-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-item { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--ink-soft); }
.check-item input { accent-color: var(--accent); width: 16px; height: 16px; }

.devis-card {
    background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: clamp(32px, 4vw, 48px);
    position: sticky; top: 110px;
}
.devis-label { font-size: 0.7rem; color: rgba(244,241,234,0.55); text-transform: uppercase; letter-spacing: 0.15em; }
.devis-amount { font-family: 'Instrument Serif', serif; font-size: clamp(2.6rem, 5vw, 4rem); color: var(--paper); margin: 14px 0 8px; line-height: 1; letter-spacing: -0.01em; }
.devis-amount .accent { color: var(--accent); }
.devis-range { font-size: 0.82rem; color: rgba(244,241,234,0.55); display: block; margin-bottom: 26px; letter-spacing: 0.02em; }
.devis-details { text-align: left; font-size: 0.82rem; color: rgba(244,241,234,0.6); margin-bottom: 28px; border-top: 1px solid rgba(244,241,234,0.14); padding-top: 22px; }
.devis-details p { padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
.devis-card .btn { width: 100%; }
.devis-card .btn-primary { background: var(--accent); }
.devis-card .btn-primary::before { background: var(--paper); }
.devis-card .btn-primary:hover { color: var(--ink); }
.devis-disclaimer { font-size: 0.72rem; color: rgba(244,241,234,0.4); margin-top: 18px; line-height: 1.5; }

/* ============ ESPACE CLIENT ============ */
.client-space { background: var(--paper); }
.cs-login { display: flex; justify-content: center; }
.cs-login-card {
    background: var(--white); padding: clamp(32px, 4vw, 52px); border-radius: var(--radius-lg);
    border: 1px solid var(--line); max-width: 440px; width: 100%;
}
.cs-login-card h3 { font-family: 'Instrument Serif', serif; font-size: 1.7rem; margin-bottom: 10px; font-weight: 400; }
.cs-login-card > p { font-size: 0.92rem; color: var(--muted); margin-bottom: 28px; }
.cs-field { margin-bottom: 18px; }
.cs-field label { display: block; font-size: 0.72rem; font-weight: 600; margin-bottom: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cs-field input {
    width: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 0.92rem; font-family: inherit; transition: border 0.4s var(--ease); background: var(--paper);
}
.cs-field input:focus { border-color: var(--accent); outline: none; }
.cs-demo { font-size: 0.76rem; color: var(--muted-2); margin-top: 18px; text-align: center; letter-spacing: 0.02em; }
.cs-login-card .btn { width: 100%; margin-top: 6px; }

.cs-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; padding: 20px 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); flex-wrap: wrap; gap: 12px; }
.cs-topbar strong { color: var(--ink); }
.cs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cs-card { background: var(--white); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 34px); border: 1px solid var(--line); }
.cs-card.cs-wide { grid-column: 1 / -1; }
.cs-card h4 { font-size: 0.78rem; margin-bottom: 22px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }

.cs-progress { margin-bottom: 28px; }
.cs-progress-bar { height: 3px; background: var(--paper-3); border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.cs-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 1.4s var(--ease); }
.cs-progress span { font-size: 0.84rem; color: var(--muted); letter-spacing: 0.02em; }

.cs-milestones { display: flex; gap: 4px; }
.milestone { flex: 1; text-align: center; font-size: 0.7rem; color: var(--muted-2); padding: 10px 4px; }
.ms-dot { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--paper-3); margin: 0 auto 8px; transition: 0.3s; }
.milestone.done { color: var(--ink-soft); }
.milestone.done .ms-dot { background: var(--ink); }
.milestone.active { color: var(--accent); font-weight: 600; }
.milestone.active .ms-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }

.cs-docs { display: flex; flex-direction: column; gap: 6px; }
.doc-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--paper); border-radius: var(--radius); font-size: 0.85rem; transition: 0.3s var(--ease); }
.doc-item:hover { background: var(--paper-2); transform: translateX(4px); }
.doc-date { margin-left: auto; font-size: 0.74rem; color: var(--muted-2); }

.cs-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kpi { text-align: left; padding: 20px; background: var(--paper); border-radius: var(--radius); }
.kpi-val { display: block; font-family: 'Instrument Serif', serif; font-size: 1.5rem; color: var(--ink); margin-bottom: 4px; line-height: 1; }
.kpi-label { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

.cs-messages { display: flex; flex-direction: column; gap: 18px; margin-bottom: 18px; }
.msg { display: flex; gap: 14px; }
.msg-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 600; flex-shrink: 0; letter-spacing: 0.04em; }
.msg-client .msg-avatar { background: var(--accent); }
.msg-body strong { font-size: 0.88rem; }
.msg-body span { font-size: 0.74rem; color: var(--muted-2); margin-left: 8px; }
.msg-body p { font-size: 0.9rem; color: var(--ink-soft); margin-top: 5px; line-height: 1.6; }
.cs-send { display: flex; gap: 12px; }
.cs-send input { flex: 1; padding: 13px 18px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.88rem; font-family: inherit; background: var(--paper); }
.cs-send input:focus { border-color: var(--accent); outline: none; }

/* ============ CONTACT ============ */
.contact { background: var(--ink); color: var(--paper); }
.contact .section-tag { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-text h2 { color: var(--paper); margin-bottom: 24px; }
.contact-text p { font-size: 1.05rem; color: rgba(244,241,234,0.65); margin-bottom: 40px; line-height: 1.7; max-width: 42ch; }
.contact-infos { display: flex; flex-direction: column; gap: 16px; font-size: 0.95rem; }
.contact-infos > div { padding-bottom: 16px; border-bottom: 1px solid rgba(244,241,234,0.12); color: rgba(244,241,234,0.8); }
.contact-infos a { color: var(--paper); text-decoration: none; transition: color 0.3s; }
.contact-infos a:hover { color: var(--accent); }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 0.72rem; font-weight: 600; margin-bottom: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244,241,234,0.6); }
.form-group input, .form-group textarea {
    padding: 15px 18px; border: 1px solid rgba(244,241,234,0.18); border-radius: var(--radius); font-size: 0.92rem;
    font-family: inherit; transition: border 0.4s var(--ease); background: rgba(244,241,234,0.04); color: var(--paper);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(244,241,234,0.35); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); outline: none; }
.contact-form .btn-primary { background: var(--accent); align-self: flex-start; }
.contact-form .btn-primary::before { background: var(--paper); }
.contact-form .btn-primary:hover { color: var(--ink); }

/* ============ FOOTER ============ */
.footer { background: var(--ink); color: rgba(244,241,234,0.5); padding: clamp(56px, 7vw, 90px) 0 0; border-top: 1px solid rgba(244,241,234,0.1); }
.footer-inner { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 48px; padding-bottom: 56px; }
.footer-brand .logo { color: var(--paper); font-size: 1.6rem; }
.footer-brand p { font-size: 0.86rem; margin-top: 10px; color: rgba(244,241,234,0.5); }
.footer-links, .footer-social { display: flex; flex-direction: column; gap: 12px; }
.footer-links a, .footer-social a { color: rgba(244,241,234,0.5); text-decoration: none; font-size: 0.82rem; letter-spacing: 0.04em; transition: color 0.3s; width: fit-content; }
.footer-links a:hover, .footer-social a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(244,241,234,0.1); padding: 24px 0; text-align: center; font-size: 0.74rem; letter-spacing: 0.04em; color: rgba(244,241,234,0.4); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
    .devis-widget { grid-template-columns: 1fr; }
    .devis-card { position: static; }
    .etapes { grid-template-columns: 1fr 1fr; }
    .etape:nth-child(4n) { border-right: 1px solid rgba(244,241,234,0.14); }
    .etape:nth-child(2n) { border-right: none; }
}

@media (max-width: 820px) {
    /* never hide native cursor on touch / small screens */
    body.has-cursor, body.has-cursor * { cursor: auto; }
    body.has-cursor a, body.has-cursor button { cursor: pointer; }
    .cursor, .cursor-ring { display: none !important; }

    .menu-toggle { display: block; z-index: 200; }
    .nav {
        display: flex; position: fixed; inset: 0; background: var(--ink); flex-direction: column;
        align-items: center; justify-content: center; gap: 30px; z-index: 99;
        transform: translateY(-100%); transition: transform 0.6s var(--ease); pointer-events: none;
    }
    .nav.nav-open { transform: translateY(0); pointer-events: all; }
    .nav a { color: var(--paper); font-size: 1.4rem; letter-spacing: 0.02em; text-transform: none; font-family: 'Instrument Serif', serif; }
    .nav a:not(.nav-cta)::after { display: none; }
    .nav-cta { border-color: var(--paper); color: var(--paper) !important; }
    .nav-cta:hover { background: var(--paper); color: var(--ink) !important; }
    .menu-toggle span { background: var(--ink); }
    .nav-open ~ .menu-toggle span { background: var(--paper); }

    .hero { align-items: center; padding-top: 120px; padding-bottom: 60px; }
    .hero h1 { max-width: 100%; }
    .hero-image {
        position: absolute; width: 100%; height: 100%; top: 0; right: 0; opacity: 0.5;
    }
    .hero-image::after { background: linear-gradient(to top, var(--paper) 12%, rgba(244,241,234,0.6) 50%, transparent 100%); }
    .hero-image::before { display: none; }
    .hero-inner { align-items: flex-start; }
    .scroll-cue { display: none; }

    .projets-grid { grid-template-columns: 1fr; }
    .projet-card, .projet-card:nth-child(6n+1), .projet-card:nth-child(6n+2),
    .projet-card:nth-child(6n+3), .projet-card:nth-child(6n+4),
    .projet-card:nth-child(6n+5), .projet-card:nth-child(6n+6) {
        grid-column: span 1; aspect-ratio: 4/3; align-self: auto;
    }
    .projet-overlay { opacity: 1; background: linear-gradient(0deg, rgba(22,20,15,0.7) 0%, transparent 70%); }
    .projet-overlay h3, .projet-overlay span, .projet-overlay .projet-btn { transform: translateY(0); }

    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 560px) {
    .etapes { grid-template-columns: 1fr; }
    .etape, .etape:nth-child(4n), .etape:nth-child(2n) { border-right: none; }
    .cs-grid { grid-template-columns: 1fr; }
    .devis-checks { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .cs-kpis { grid-template-columns: 1fr; }
    .cs-milestones { flex-wrap: wrap; }
    .milestone { flex: 0 0 auto; min-width: 33%; }
    .hero-stats { gap: 28px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    [data-reveal] { opacity: 1; transform: none; }
    .hero h1 .line > * { transform: none; }
}
