/* ============================================================================
   Mécanicien à Domicile — design system "Atelier de confiance"
   Bleu nuit (surfaces sombres) + orange atelier (accent/CTA). OKLCH, AA.
   Préfixe vd-. Police Archivo self-hostée (RGPD-safe).
   ========================================================================== */

@font-face {
    font-family: "Archivo";
    src: url("/assets/fonts/archivo.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
/* Fallback métriquement ajusté pour limiter le CLS */
@font-face {
    font-family: "Archivo Fallback";
    src: local("Arial");
    size-adjust: 96%;
    ascent-override: 92%;
    descent-override: 24%;
}

:root {
    --font: "Archivo", "Archivo Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Bleu nuit (encre) */
    --ink:        oklch(0.23 0.045 256);
    --ink-2:      oklch(0.30 0.052 258);
    /* Orange atelier */
    --brand:      oklch(0.68 0.17 47);     /* fills, icônes, accents sur sombre */
    --brand-cta:  oklch(0.60 0.165 46);    /* fond bouton (blanc dessus = AA large) */
    --brand-cta-h:oklch(0.53 0.155 44);    /* hover/active bouton */
    --brand-ink:  oklch(0.45 0.13 45);     /* orange TEXTE sur clair (liens/accents, AA) */
    --on-brand:   oklch(0.99 0.012 70);

    /* Neutres teintés vers le bleu nuit (cohésion, pas de cream) */
    --bg:         oklch(0.985 0.004 256);
    --surface:    oklch(1 0 0);
    --surface-2:  oklch(0.972 0.006 256);
    --line:       oklch(0.912 0.008 256);
    --line-2:     oklch(0.85 0.012 256);
    --text:       oklch(0.29 0.03 258);     /* corps sur clair (~10:1) */
    --text-soft:  oklch(0.45 0.025 258);    /* secondaire (~4.7:1) */
    --warm-wash:  oklch(0.965 0.032 64);    /* tint orange doux, usage RARE */

    /* Sur sombre */
    --on-ink:      oklch(0.97 0.006 256);
    --on-ink-soft: oklch(0.82 0.018 256);
    --on-ink-line: oklch(1 0 0 / 0.14);

    /* Feedback */
    --ok:  oklch(0.58 0.13 152);
    --err: oklch(0.58 0.18 25);

    /* Espacement 4pt */
    --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px; --s9:96px;

    --radius:14px; --radius-sm:10px; --radius-lg:22px; --pill:999px;
    --maxw:880px;

    --shadow-sm: 0 1px 2px oklch(0.23 0.045 256 / .07), 0 1px 1px oklch(0.23 0.045 256 / .05);
    --shadow-md: 0 8px 24px oklch(0.23 0.045 256 / .09);
    --shadow-lg: 0 20px 54px oklch(0.23 0.045 256 / .16);

    --z-sticky:100; --z-cta:200;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;            /* 17px base, confort lecture */
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-wrap: balance;
    margin: 0;
}
p { text-wrap: pretty; }

.vd-wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s5); }

/* Icônes monoline */
.vd-ic { width: 1.4em; height: 1.4em; display: inline-block; vertical-align: -0.28em; }

/* ---------- Boutons ---------- */
.vd-btn {
    --pad-y: 13px; --pad-x: 22px;
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
    font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1;
    padding: var(--pad-y) var(--pad-x); border: none; border-radius: var(--pill);
    cursor: pointer; text-align: center;
    transition: background-color .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
}
.vd-btn-cta { background: var(--brand-cta); color: var(--on-brand); box-shadow: var(--shadow-sm); }
.vd-btn-cta:hover { background: var(--brand-cta-h); }
.vd-btn-cta:active { transform: translateY(1px); }
.vd-btn-lg { --pad-y: 17px; --pad-x: 30px; font-size: 1.0625rem; box-shadow: var(--shadow-md); }
.vd-btn-ghost {
    display: inline-flex; align-items: center; gap: var(--s2);
    font-weight: 600; color: var(--on-ink); padding: 15px 22px; border-radius: var(--pill);
    border: 1px solid var(--on-ink-line); transition: background-color .18s var(--ease);
}
.vd-btn-ghost:hover { background: oklch(1 0 0 / 0.08); }
:where(a, button, input, select, summary):focus-visible {
    outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px;
}

/* ---------- Header ---------- */
.vd-header { background: oklch(1 0 0 / 0.86); backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: var(--z-sticky); }
.vd-header-bar { display: flex; align-items: center; justify-content: space-between;
    height: 66px; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s5); }
.vd-logo { display: inline-flex; align-items: center; }
.vd-logo img { height: 34px; display: block; }
.vd-header .vd-btn { padding: 11px 18px; }

/* ---------- Hero (page ville) : bande bleu nuit ---------- */
.vd-hero {
    background:
        radial-gradient(120% 140% at 88% -10%, oklch(0.34 0.06 50 / .55), transparent 60%),
        linear-gradient(168deg, var(--ink-2), var(--ink));
    color: var(--on-ink);
    position: relative; overflow: hidden;
}
.vd-hero::after {  /* fine ligne atelier en bas */
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: linear-gradient(90deg, var(--brand), transparent 70%);
}
.vd-hero-inner { padding-block: clamp(var(--s6), 6vw, var(--s8)); }
.vd-crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2);
    padding: 0; margin: 0 0 var(--s5); font-size: 0.8125rem; color: var(--on-ink-soft); }
.vd-crumbs li::after { content: "›"; margin-left: var(--s2); opacity: .5; }
.vd-crumbs li:last-child::after { content: ""; }
.vd-crumbs a { color: var(--on-ink-soft); }
.vd-crumbs a:hover { color: var(--on-ink); text-decoration: underline; }
.vd-hero h1 { color: #fff; font-weight: 900; font-size: clamp(2rem, 1.3rem + 3.4vw, 3.25rem);
    letter-spacing: -0.035em; max-width: 16ch; }
.vd-hero-lead { margin: var(--s4) 0 0; font-size: clamp(1.06rem, 1rem + 0.5vw, 1.22rem);
    line-height: 1.6; color: var(--on-ink-soft); max-width: 56ch; }
.vd-hero-lead strong { color: #fff; font-weight: 700; }
.vd-hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.vd-trust { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5);
    padding: var(--s6) 0 0; margin: 0; }
.vd-trust li { display: inline-flex; align-items: center; gap: var(--s2);
    font-size: 0.9rem; font-weight: 600; color: var(--on-ink); }
.vd-trust .vd-ic { color: var(--brand); width: 1.25em; height: 1.25em; }
.vd-trust-center { justify-content: center; padding-top: var(--s5); }

/* ---------- Article (corps clair) ---------- */
.vd-article { padding-block: clamp(var(--s7), 5vw, var(--s8)); }
/* Fil d'ariane en contexte clair (ex. mentions légales sans hero) */
.vd-article > .vd-crumbs { color: var(--text-soft); margin: 0 0 var(--s5); }
.vd-article > .vd-crumbs a { color: var(--text-soft); }
.vd-article > .vd-crumbs a:hover { color: var(--brand-ink); }
.vd-article > h2 {
    font-size: clamp(1.4rem, 1.2rem + 1vw, 1.85rem);
    margin: clamp(var(--s7), 5vw, var(--s8)) 0 var(--s4);
}
.vd-article > h2:first-of-type { margin-top: 0; }
.vd-article > p { font-size: 1.0625rem; color: var(--text); max-width: 68ch; margin: 0 0 var(--s4); }
.vd-article > p + h2 { margin-top: clamp(var(--s6), 4vw, var(--s7)); }

/* ---------- Étapes (séquence 1-2-3) ---------- */
.vd-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); margin: var(--s5) 0; }
.vd-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: var(--s5); }
.vd-step-n { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center;
    background: var(--ink); color: #fff; border-radius: var(--pill); font-weight: 800; font-size: 1.05rem;
    box-shadow: 0 0 0 4px oklch(0.68 0.17 47 / 0.16); }
.vd-step h3 { font-size: 1.05rem; margin: var(--s3) 0 var(--s1); letter-spacing: -0.01em; }
.vd-step p { font-size: 0.94rem; color: var(--text-soft); margin: 0; }

/* ---------- Signes (callout, tint orange doux — PAS de side-stripe) ---------- */
.vd-signs { background: var(--warm-wash); border: 1px solid oklch(0.86 0.05 64);
    border-radius: var(--radius-lg); padding: clamp(var(--s5), 4vw, var(--s6)); margin: var(--s6) 0; }
.vd-signs h2 { margin: 0 0 var(--s4); font-size: 1.3rem; }
.vd-signs ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.vd-signs li { display: flex; align-items: flex-start; gap: var(--s3); font-size: 1rem; font-weight: 500; }
.vd-check { display: inline-flex; width: 24px; height: 24px; flex: 0 0 24px; align-items: center; justify-content: center;
    background: var(--brand); color: #fff; border-radius: var(--pill); margin-top: 1px; }
.vd-check .vd-ic { width: 15px; height: 15px; vertical-align: 0; }
.vd-signs-note { font-size: 0.92rem; color: var(--text-soft); margin: var(--s4) 0 0; }

/* Note locale (donnée parc auto, prix) — surface, sans side-stripe */
.vd-info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: var(--s4) var(--s5); font-size: 0.97rem; color: var(--text); margin: var(--s3) 0; }
.vd-info strong { color: var(--ink); }
.vd-info a { color: var(--brand-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Contact ---------- */
.vd-contact { max-width: 540px; margin: 0 auto var(--s5); text-align: center; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
    padding: clamp(var(--s6), 5vw, var(--s8)) var(--s5); }
.vd-contact-ic { display: inline-flex; width: 60px; height: 60px; align-items: center; justify-content: center;
    background: var(--ink); color: var(--brand); border-radius: 16px; margin-bottom: var(--s4); }
.vd-contact-ic .vd-ic { width: 30px; height: 30px; }
.vd-contact h2 { font-size: 1.4rem; margin: 0 0 var(--s2); }
.vd-contact p { color: var(--text-soft); margin: 0 0 var(--s5); }
.vd-contact .vd-btn { max-width: 100%; word-break: break-word; }

/* ---------- Cartes "cas d'usage" (3) ---------- */
.vd-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s4); margin: var(--s5) 0; }
.vd-case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); }
.vd-case-ic { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; color: var(--brand-ink); }
.vd-case-ic .vd-ic { width: 24px; height: 24px; }
.vd-case h3 { font-size: 1.05rem; margin: var(--s3) 0 var(--s1); }
.vd-case p { font-size: 0.92rem; color: var(--text-soft); margin: 0; }

/* ---------- Services détaillés (liste, séparateurs hairline) ---------- */
.vd-services { margin: var(--s5) 0; border: 1px solid var(--line); border-radius: var(--radius-lg);
    background: var(--surface); overflow: hidden; }
.vd-service { display: flex; gap: var(--s4); padding: clamp(var(--s4), 3vw, var(--s5)); }
.vd-service + .vd-service { border-top: 1px solid var(--line); }
.vd-service-ic { flex: 0 0 auto; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: var(--brand); border-radius: 12px; }
.vd-service-ic .vd-ic { width: 24px; height: 24px; }
.vd-service-txt h3 { font-size: 1.1rem; margin: 0 0 var(--s2); letter-spacing: -0.01em; }
.vd-service-txt p { margin: 0; font-size: 0.97rem; color: var(--text-soft); }
.vd-service-txt strong { color: var(--text); font-weight: 700; }

/* ---------- Formulaire (ancre conversion) ---------- */
.vd-form-block { margin: clamp(var(--s6), 5vw, var(--s7)) 0; }
.vd-form-card { background: linear-gradient(168deg, var(--ink-2), var(--ink)); color: var(--on-ink);
    border-radius: var(--radius-lg); padding: clamp(var(--s5), 4vw, var(--s7)); box-shadow: var(--shadow-lg);
    position: relative; overflow: hidden; }
.vd-form-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--brand), oklch(0.68 0.17 47 / 0)); }
.vd-form-card h3 { color: #fff; margin: 0; font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem); }
.vd-form-sub { color: var(--on-ink-soft); margin: var(--s2) 0 var(--s5); font-size: 0.95rem; }
.vd-fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); }
.vd-fields label { display: flex; flex-direction: column; gap: var(--s2);
    font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em; color: var(--on-ink-soft); }
.vd-full { grid-column: 1 / -1; }
.vd-input { padding: 13px 14px; border: 1px solid oklch(1 0 0 / 0.16); border-radius: var(--radius-sm);
    font-size: 1rem; font-family: inherit; background: oklch(1 0 0 / 0.97); color: var(--ink);
    min-height: 48px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.vd-input::placeholder { color: oklch(0.5 0.02 258); }
.vd-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px oklch(0.68 0.17 47 / 0.35); }
.vd-err { display: none; color: oklch(0.8 0.12 30); font-size: 0.8rem; margin-top: var(--s2); font-weight: 600; }
.vd-btn-submit { width: 100%; background: var(--brand-cta); color: var(--on-brand); padding: 16px;
    margin-top: var(--s5); font-size: 1.05rem; font-weight: 800; border-radius: var(--pill); border: none;
    cursor: pointer; box-shadow: var(--shadow-md); transition: background-color .18s var(--ease), transform .12s var(--ease); }
.vd-btn-submit:hover { background: var(--brand-cta-h); }
.vd-btn-submit:active { transform: translateY(1px); }
.vd-btn-submit:disabled { opacity: .75; cursor: default; }
.vd-rgpd { display: flex; align-items: center; justify-content: center; gap: var(--s2);
    font-size: 0.78rem; color: var(--on-ink-soft); text-align: center; margin: var(--s4) 0 0; }
.vd-rgpd .vd-ic { width: 1.1em; height: 1.1em; color: var(--brand); }
.vd-msg { margin-top: var(--s4); font-weight: 700; text-align: center; }

/* ---------- FAQ ---------- */
.vd-faq { display: grid; gap: var(--s2); margin: var(--s5) 0; }
.vd-faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
    padding: 0 var(--s5); transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.vd-faq details[open] { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.vd-faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: var(--s4) 0; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: var(--s4); font-size: 1.02rem; }
.vd-faq summary::-webkit-details-marker { display: none; }
.vd-faq summary::after { content: ""; flex: 0 0 auto; width: 11px; height: 11px;
    border-right: 2px solid var(--brand-ink); border-bottom: 2px solid var(--brand-ink);
    transform: rotate(45deg); transition: transform .2s var(--ease); margin-bottom: 3px; }
.vd-faq details[open] summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.vd-faq p { margin: 0 0 var(--s4); color: var(--text-soft); }

/* ---------- Carte + maillage ---------- */
.vd-map { margin: var(--s5) 0; }
.vd-map iframe { display: block; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.vd-near { margin-top: var(--s7); }
.vd-near h3 { font-size: 1.05rem; margin: 0 0 var(--s4); }
.vd-near-tags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.vd-near-tags a { font-size: 0.86rem; color: var(--text); background: var(--surface);
    border: 1px solid var(--line); padding: 8px 14px; border-radius: var(--pill);
    transition: border-color .15s var(--ease), color .15s var(--ease); }
.vd-near-tags a:hover { border-color: var(--brand); color: var(--brand-ink); }

/* ---------- Accueil ---------- */
.vd-hero-home { background:
        radial-gradient(120% 130% at 85% -20%, oklch(0.34 0.06 50 / .5), transparent 60%),
        linear-gradient(168deg, var(--ink-2), var(--ink));
    color: var(--on-ink); text-align: center; padding-block: clamp(var(--s7), 8vw, var(--s9)); }
.vd-hero-home h1 { color: #fff; font-weight: 900; font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.4rem); letter-spacing: -0.035em;
    max-width: 18ch; margin-inline: auto; }
.vd-hero-home .vd-intro { color: var(--on-ink-soft); max-width: 60ch; margin: var(--s4) auto 0;
    font-size: clamp(1.05rem, 1rem + 0.5vw, 1.2rem); }
.vd-search { position: relative; max-width: 540px; margin: var(--s6) auto 0; }
#citySearch { width: 100%; padding: 16px 22px; border: 1px solid var(--on-ink-line); border-radius: var(--pill);
    font-size: 1.05rem; font-family: inherit; outline: none; background: oklch(1 0 0 / 0.97); color: var(--ink);
    min-height: 54px; }
#citySearch:focus { border-color: var(--brand); box-shadow: 0 0 0 3px oklch(0.68 0.17 47 / 0.4); }
.vd-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    overflow: hidden; display: none; text-align: left; z-index: var(--z-cta); }
.vd-result { display: flex; justify-content: space-between; gap: var(--s4); padding: 13px 18px;
    border-bottom: 1px solid var(--line); color: var(--text); }
.vd-result:last-child { border-bottom: none; }
.vd-result:hover { background: var(--surface-2); }
.vd-result strong { color: var(--ink); }
.vd-result small { color: var(--text-soft); }

.vd-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s2); margin-top: var(--s4); }
.vd-dept { background: var(--surface); border: 1px solid var(--line); padding: 13px 14px; border-radius: var(--radius-sm);
    font-size: 0.92rem; color: var(--text); transition: border-color .15s var(--ease); }
.vd-dept:hover { border-color: var(--brand); }
.vd-dept b { color: var(--brand-ink); font-weight: 800; margin-right: var(--s1); }

/* ---------- Département (grille villes) ---------- */
.vd-villes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); margin-top: var(--s5); }
.vd-villes a { display: flex; flex-direction: column; gap: 2px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px;
    transition: border-color .15s var(--ease), transform .15s var(--ease); }
.vd-villes a:hover { border-color: var(--brand); transform: translateY(-1px); }
.vd-villes strong { color: var(--ink); font-weight: 700; }
.vd-kw { font-size: 0.74rem; color: var(--text-soft); }

/* ---------- Sticky CTA mobile ---------- */
.vd-sticky-cta { display: none; position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
    z-index: var(--z-cta); background: var(--brand-cta); color: var(--on-brand); font-weight: 800;
    padding: 13px 24px; border-radius: var(--pill); box-shadow: var(--shadow-lg);
    align-items: center; gap: var(--s2); }
.vd-sticky-cta .vd-ic { width: 1.2em; height: 1.2em; }

/* ---------- Footer ---------- */
.vd-footer { background: var(--ink); color: var(--on-ink-soft); padding-block: var(--s7); margin-top: var(--s8);
    text-align: center; font-size: 0.92rem; }
.vd-footer strong { color: #fff; }
.vd-footer a { color: var(--on-ink); text-decoration: underline; text-underline-offset: 2px; }
.vd-footer-meta { margin-top: var(--s3); font-size: 0.84rem; color: var(--on-ink-soft); }

/* ---------- Entrée hero (sobre, contenu visible par défaut) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .vd-hero h1, .vd-hero-lead, .vd-hero-cta, .vd-trust {
        animation: vd-rise .6s var(--ease) both;
    }
    .vd-hero-lead { animation-delay: .06s; }
    .vd-hero-cta  { animation-delay: .12s; }
    .vd-trust     { animation-delay: .18s; }
    @keyframes vd-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
    .vd-steps { grid-template-columns: 1fr; }
    .vd-fields { grid-template-columns: 1fr; }
    .vd-service { flex-direction: row; }
    .vd-sticky-cta { display: inline-flex; }
    .vd-hero-cta .vd-btn, .vd-hero-cta .vd-btn-ghost { flex: 1 1 auto; }
}
