/* ==========================================================================
   agence-referencement-valence.fr — design system
   Minimaliste, inspiré d'Apple : typographie système, filets fins,
   aplats, arrondis discrets, aucune ombre. La couleur vient des accents.
   ========================================================================== */

:root {
    --violet: #6e56f8;
    --pink: #f0418c;
    --orange: #f97a1f;
    --teal: #0fb5a3;
    --blue: #2a6df4;
    --green: #22a861;

    --ink: #1d1d1f;
    --ink-2: #424245;
    --muted: #6e6e73;
    --line: #e3e3e8;
    --line-2: #d2d2d7;
    --bg: #ffffff;
    --bg-soft: #f5f5f7;

    --accent: var(--violet);
    --accent-2: var(--pink);
    --grad-rainbow: linear-gradient(90deg, var(--violet), var(--pink) 40%, var(--orange) 70%, var(--teal));

    --r: 14px;
    --r-sm: 10px;
    --ease: cubic-bezier(.25,.8,.25,1);
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --header-h: 56px;
}

/* --grad est déclaré sur body pour suivre l'accent de la page */
body { --grad: linear-gradient(100deg, var(--accent), var(--accent-2)); }
.accent-violet { --accent: var(--violet); --accent-2: var(--pink); }
.accent-pink   { --accent: var(--pink);   --accent-2: var(--orange); }
.accent-orange { --accent: var(--orange); --accent-2: var(--pink); }
.accent-teal   { --accent: var(--teal);   --accent-2: var(--blue); }
.accent-blue   { --accent: var(--blue);   --accent-2: var(--violet); }
.accent-green  { --accent: var(--green);  --accent-2: var(--teal); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.07; letter-spacing: -.022em; font-weight: 600; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); letter-spacing: -.03em; font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -.012em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--muted); line-height: 1.45; letter-spacing: -.008em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rainbow-text {
    background: var(--grad-rainbow); background-size: 200% auto;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shine 10s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 2000; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    height: var(--header-h);
    background: rgba(255,255,255,.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: .95rem; letter-spacing: -.015em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 600; }
.brand-mark { width: 22px; height: 22px; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.main-nav ul a { color: var(--ink-2); font-size: .85rem; }
.main-nav ul a:hover, .main-nav ul a[aria-current] { color: var(--ink); text-decoration: none; }
.main-nav ul a[aria-current] { font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 23px; }
.nav-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 960px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0;
        flex-direction: column; align-items: stretch; gap: 16px;
        padding: 12px 20px 24px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: all .3s var(--ease);
    }
    .nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav ul a { display: block; padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 22px;
    border-radius: 999px; border: 1px solid transparent;
    font: 500 .95rem/1 var(--font); letter-spacing: -.01em;
    cursor: pointer; white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
.btn-ghost { color: var(--accent); background: transparent; border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-light { color: var(--ink); background: #fff; border-color: var(--line); }
.btn-sm { min-height: 34px; padding: 0 16px; font-size: .85rem; }
.btn-lg { min-height: 50px; padding: 0 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.link-arrow { font-weight: 500; }
.link-arrow::after { content: " ›"; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-sm { padding: clamp(36px, 5vw, 64px) 0; }
.pt-0 { padding-top: 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-foot { text-align: center; margin-top: 40px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero .lead { max-width: 580px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 18px; font-size: .85rem; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span::before { content: "✓ "; color: var(--green); }
.hero-center { text-align: center; }
.hero-center .lead { margin-inline: auto; }
.hero-center .hero-actions, .hero-center .hero-note { justify-content: center; }
.hero-illu { position: relative; aspect-ratio: 1 / 1; max-width: 460px; width: 100%; margin-inline: auto; }
.hero-illu-wide { aspect-ratio: 16 / 7; max-width: 760px; margin-top: 40px; }
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-illu { max-width: 360px; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .8rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--line-2); }
.hero-center .breadcrumb ol { justify-content: center; }
.breadcrumb a { color: var(--muted); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 28px 20px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; margin-bottom: 6px; }
.stat:nth-child(1) strong { color: var(--violet); }
.stat:nth-child(2) strong { color: var(--pink); }
.stat:nth-child(3) strong { color: var(--orange); }
.stat:nth-child(4) strong { color: var(--teal); }
.stat span { color: var(--muted); font-size: .88rem; }
@media (max-width: 760px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(3) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { position: relative; padding: clamp(22px, 3vw, 32px); border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.section-soft .card { border-color: transparent; }
.card p:last-child { margin-bottom: 0; }
.card .muted { font-size: .95rem; }
a.card { color: inherit; transition: border-color .2s; }
a.card:hover { text-decoration: none; border-color: var(--line-2); }
.card-icon { width: 32px; height: 32px; margin-bottom: 18px; color: var(--c, var(--accent)); }
.card-icon svg { width: 100%; height: 100%; }
.card-dark { background: var(--ink); color: #d2d2d7; border-color: var(--ink); }
.card-dark h3, .card-dark h2 { color: #fff; }
.span-2 { grid-column: span 2; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: step; border-top: 1px solid var(--line); }
.step { padding: 28px 28px 8px 0; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step::before {
    counter-increment: step; content: counter(step, decimal-leading-zero);
    display: block; font-size: .85rem; font-weight: 600; letter-spacing: .02em; margin-bottom: 14px;
    color: var(--c, var(--accent));
}
.step:nth-child(1) { --c: var(--violet); }
.step:nth-child(2) { --c: var(--pink); }
.step:nth-child(3) { --c: var(--teal); }
.step p { color: var(--muted); margin: 0; font-size: .97rem; }
@media (max-width: 820px) {
    .steps { grid-template-columns: 1fr; }
    .step, .step + .step { padding: 24px 0; border-left: 0; }
    .step + .step { border-top: 1px solid var(--line); }
}

/* ---------- Agency cards ---------- */
.agency-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 20px; }
.agency-card { position: relative; display: flex; flex-direction: column; }
.agency-card-link { position: absolute; inset: 0; z-index: 2; }
.agency-thumb {
    position: relative; aspect-ratio: 16 / 10; overflow: hidden;
    border-radius: var(--r-sm); background: var(--bg-soft); border: 1px solid var(--line);
    margin-bottom: 14px; transition: border-color .2s;
}
.agency-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.agency-card:hover .agency-thumb img { transform: scale(1.03); }
.agency-card:hover .agency-thumb, .agency-card.is-active .agency-thumb { border-color: var(--accent); }
.thumb-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; font-weight: 600; letter-spacing: -.03em; color: hsl(var(--h) 55% 50%); background: hsl(var(--h) 70% 97%); }
.agency-card h3 { font-size: 1.02rem; margin: 0 0 4px; }
.agency-meta { margin: 0 0 6px; font-size: .82rem; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.agency-services { margin: 0; font-size: .84rem; color: var(--ink-2); line-height: 1.45; }
.dot { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot-seo { color: var(--violet); }
.dot-web { color: var(--pink); }
.dot-mkt { color: var(--orange); }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; color: var(--violet); background: color-mix(in srgb, var(--violet) 10%, #fff); }

/* ---------- Annuaire : liste + carte ---------- */
.directory { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.directory .agency-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.directory-map { position: sticky; top: calc(var(--header-h) + 16px); height: min(calc(100vh - var(--header-h) - 32px), 680px); min-height: 420px; }
@media (max-width: 960px) {
    .directory { grid-template-columns: 1fr; }
    .directory-map { position: relative; top: 0; height: 340px; min-height: 0; order: -1; }
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 38px; border-radius: var(--r-sm); background: var(--bg-soft); }
.search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; background: none; font: inherit; font-size: .9rem; outline: none; min-width: 0; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-flex; align-items: center;
    height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line);
    background: #fff; font: 500 .8rem var(--font); color: var(--ink-2); cursor: pointer;
    transition: all .15s;
}
.chip:hover { border-color: var(--line-2); text-decoration: none; }
.chip[aria-pressed="true"], .chip[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters select {
    height: 32px; padding: 0 30px 0 12px; border-radius: 999px; border: 1px solid var(--line);
    font: 500 .8rem var(--font); color: var(--ink-2); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6e73' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none; cursor: pointer;
}
.result-count { font-size: .82rem; color: var(--muted); margin: 0 0 18px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.city-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; padding: 0; margin: 0; }
.city-links a { display: inline-flex; gap: 6px; align-items: baseline; padding: 8px 16px; border-radius: 999px; color: var(--ink); border: 1px solid var(--line); font-size: .9rem; background: #fff; }
.city-links a:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.city-links small { color: var(--muted); }

/* ---------- Carte (Leaflet) ---------- */
.map { position: relative; width: 100%; height: 100%; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #f2f2ef; z-index: 0; }
.map .leaflet-tile-pane { filter: grayscale(1) brightness(1.06) contrast(.88); }
.map-hero { height: clamp(380px, 60vh, 620px); }
.map-sm { height: 280px; }
.map .leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.8); }
.map .leaflet-bar { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: none; }
.map .leaflet-bar a { color: var(--ink); border-bottom-color: var(--line); width: 30px; height: 30px; line-height: 30px; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.map-caption { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; }

.pin { position: relative; display: block; width: 18px; height: 18px; }
.pin-dot { display: block; }
.pin-dot {
    position: absolute; inset: 2px; border-radius: 50%;
    background: var(--c); border: 2px solid #fff;
    transition: transform .25s var(--ease);
    animation: pin-in .7s var(--ease) both; animation-delay: var(--d, 0s);
}
.pin::before {
    content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--c);
    animation: pin-pulse 2.8s ease-out infinite; animation-delay: var(--d2, 0s);
}
.pin.is-active .pin-dot { transform: scale(1.55); }
.pin.is-active::before { animation-duration: 1.2s; }
.pin.is-approx .pin-dot { background: #fff; border-color: var(--c); }
.leaflet-marker-icon:hover .pin-dot { transform: scale(1.35); }
@keyframes pin-in { from { transform: translateY(-16px) scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pin-pulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(3.4); opacity: 0; } }

.map .leaflet-popup-content-wrapper { border-radius: 12px; padding: 0; box-shadow: none; border: 1px solid var(--line-2); overflow: hidden; }
.map .leaflet-popup-tip-container { display: none; }
.map .leaflet-popup { margin-bottom: 18px; }
.map .leaflet-popup-content { margin: 0; width: 230px !important; font-family: var(--font); line-height: 1.35; }
.map-pop { display: block; color: var(--ink); }
.map-pop:hover { text-decoration: none; }
.map-pop img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); }
.map-pop span { display: block; padding: 10px 12px 12px; }
.map-pop strong { display: block; font-size: .9rem; font-weight: 600; letter-spacing: -.01em; }
.map-pop em { font-style: normal; font-size: .76rem; color: var(--muted); }
.map .leaflet-popup-close-button { display: none; }

/* ---------- Fiche agence ---------- */
.profile-head h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin-bottom: 10px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: var(--muted); font-size: .95rem; margin-bottom: 32px; }
.browser { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d9d9de; }
.browser-bar i:nth-child(1) { background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin: 0 auto; font-size: .72rem; color: var(--muted); padding: 2px 14px; border-radius: 6px; background: #fff; }
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.browser .scroll-shot { animation: peek 14s ease-in-out infinite; }
@keyframes peek { 0%, 30% { object-position: 50% 0; } 55%, 75% { object-position: 50% 100%; } 100% { object-position: 50% 0; } }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.profile-aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.profile-block { padding: 28px 0; border-top: 1px solid var(--line); }
.profile-block:first-of-type { margin-top: 32px; }
.profile-block h2 { font-size: 1.3rem; margin-bottom: 14px; }
.profile-block .lead { color: var(--ink-2); font-size: 1.1rem; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list span:first-child { color: var(--muted); }
.info-list span:last-child { text-align: right; }
.service-list { columns: 2; column-gap: 32px; list-style: none; padding: 0; margin: 0; }
.service-list li { break-inside: avoid; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.inline-list { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0; color: var(--ink-2); font-size: .95rem; }
.map-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: .85rem; }
.fine { font-size: .78rem; color: var(--muted); }
@media (max-width: 920px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-aside { position: static; }
}
@media (max-width: 560px) { .service-list { columns: 1; } }

/* ---------- Prose (guides) ---------- */
.prose { font-size: 1.05rem; color: var(--ink-2); }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; font-size: 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink); border-bottom-color: var(--ink); }
.table-wrap { overflow-x: auto; }
.callout { margin: 2em 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--accent); }
.callout p:last-child { margin: 0; }
.guide-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 72px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .82rem; }
.toc p { font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; color: var(--muted); border-left: 1px solid transparent; }
.toc a:hover, .toc a.is-active { color: var(--ink); border-left-color: var(--accent); text-decoration: none; }
@media (max-width: 960px) {
    .guide-layout { grid-template-columns: 1fr; gap: 0; }
    .toc { display: none; }
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 500; font-size: 1.02rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M6 0v12M0 6h12' stroke='%231d1d1f' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat center;
    transition: transform .25s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 40px 22px 0; color: var(--muted); }
.faq-body p { margin: 0; }

/* ---------- Formulaire de projet ---------- */
.form-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.form-card { padding: clamp(22px, 4vw, 40px); border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 12px; }
.progress span { display: block; height: 100%; width: 25%; background: var(--grad-rainbow); transition: width .5s var(--ease); }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-bottom: 28px; }
.form-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.js .form-step:not(.is-active) { display: none; }
.form-step legend { font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 600; letter-spacing: -.022em; margin-bottom: 6px; padding: 0; }
.form-step legend:focus { outline: none; }
.form-step .hint { color: var(--muted); margin-bottom: 22px; font-size: .95rem; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
.choice-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid + .label { margin-top: 22px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.choice span {
    display: flex; flex-direction: column; gap: 2px; height: 100%;
    padding: 13px 15px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
    background: #fff; transition: border-color .15s, background .15s; font-weight: 500; font-size: .93rem;
}
.choice small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.choice input:hover + span { border-color: var(--muted); }
.choice input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.label { font-weight: 500; font-size: .92rem; margin: 0 0 10px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 500; font-size: .9rem; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
    width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
    font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-error { color: #d70015; font-size: .85rem; margin: 0; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #ff3b30; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--ink-2); margin: 6px 0 14px; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-nav [data-next], .form-nav [data-submit] { margin-left: auto; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: var(--r-sm); margin-bottom: 20px; background: #fff2f2; color: #a3000f; font-size: .92rem; }
.alert ul { margin: 6px 0 0; }
.target-agency { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line); margin-bottom: 24px; font-size: .9rem; }
.target-agency img { width: 72px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.trust-list { list-style: none; padding: 0; margin: 0; }
.trust-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.trust-list strong { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 2px; }
.trust-list p { margin: 0; color: var(--muted); font-size: .88rem; }
@media (max-width: 960px) { .form-shell { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 560px) { .choice-grid, .choice-grid.cols-3, .field-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); padding: 0 0 32px; font-size: .85rem; }
.footer-cta { text-align: center; padding: clamp(56px, 8vw, 96px) 0; border-bottom: 1px solid var(--line); margin-bottom: 40px; position: relative; }
.footer-cta::before { content: ""; position: absolute; top: 0; left: 50%; width: 120px; height: 3px; margin-left: -60px; background: var(--grad-rainbow); border-radius: 0 0 3px 3px; }
.footer-cta p { font-size: 1.1rem; color: var(--muted); max-width: 520px; margin: 0 auto 24px; }
.site-footer.no-cta { padding-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-grid h3 { font-size: .8rem; font-weight: 600; color: var(--ink); letter-spacing: 0; margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--ink); }
.footer-grid p { color: var(--muted); }
.brand-footer { margin-bottom: 10px; }
.footer-legal { font-size: .75rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; margin: 0; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Illustrations animées (une par page) — trait fin, aplats
   ========================================================================== */
.illu svg { width: 100%; height: 100%; overflow: visible; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dash { to { stroke-dashoffset: -20; } }
@keyframes grow { from { transform: scaleY(0); } }

/* SEO */
.illu-seo .bar { transform-box: fill-box; transform-origin: bottom; animation: grow 1.2s var(--ease) both; }
.illu-seo .bar:nth-child(2) { animation-delay: .12s; }
.illu-seo .bar:nth-child(3) { animation-delay: .24s; }
.illu-seo .bar:nth-child(4) { animation-delay: .36s; }
.illu-seo .bar:nth-child(5) { animation-delay: .48s; }
.illu-seo .caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.illu-seo .trend { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s var(--ease) forwards .6s; }

/* Création de site */
.illu-build .blk { transform-box: fill-box; animation: assemble 7s var(--ease) infinite; }
@keyframes assemble { 0% { opacity: 0; transform: translateY(18px); } 12%, 82% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(-8px); } }
.illu-build .cursor { animation: cursor 7s var(--ease) infinite; }
@keyframes cursor { 0% { transform: translate(380px, 300px); } 30% { transform: translate(250px, 150px); } 55% { transform: translate(170px, 250px); } 80% { transform: translate(330px, 230px); } 100% { transform: translate(380px, 300px); } }

/* Comment ça marche */
.illu-flow .flow { stroke-dasharray: 4 6; animation: dash 1s linear infinite; }
.illu-flow .node { transform-box: fill-box; transform-origin: center; animation: float 5s ease-in-out infinite; }
.illu-flow .node.n2 { animation-delay: -1.6s; }
.illu-flow .node.n3 { animation-delay: -3.2s; }

/* Devis */
.illu-plane .trail { stroke-dasharray: 3 7; animation: dash 1s linear infinite; }

/* Merci */
.illu-check .circle { stroke-dasharray: 380; stroke-dashoffset: 380; animation: draw 1s var(--ease) forwards; }
.illu-check .tick { stroke-dasharray: 120; stroke-dashoffset: 120; animation: draw .6s var(--ease) forwards .8s; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1100; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 8px; height: 12px; border-radius: 2px; animation: confetti 3.6s cubic-bezier(.3,.6,.4,1) forwards; }
@keyframes confetti { to { transform: translate3d(var(--x), 110vh, 0) rotate(var(--r)); opacity: .9; } }

/* Espace agences */
.illu-funnel .drop { animation: fall 3.2s cubic-bezier(.5,0,.7,1) infinite; }
.illu-funnel .drop:nth-of-type(2) { animation-delay: .8s; }
.illu-funnel .drop:nth-of-type(3) { animation-delay: 1.6s; }
.illu-funnel .drop:nth-of-type(4) { animation-delay: 2.4s; }
@keyframes fall { 0% { transform: translateY(-40px); opacity: 0; } 15% { opacity: 1; } 70% { transform: translateY(170px); opacity: 1; } 100% { transform: translateY(230px); opacity: 0; } }

/* Légal */
.illu-shield .shield { transform-box: fill-box; transform-origin: center; animation: float 5s ease-in-out infinite; }
.illu-shield .scan { animation: scan 3s ease-in-out infinite; }
@keyframes scan { 0%, 100% { transform: translateY(0); opacity: 0; } 20%, 80% { opacity: .7; } 50% { transform: translateY(140px); } }

/* 404 */
.illu-lost .lost-pin { transform-box: fill-box; transform-origin: 50% 100%; animation: wobble 3s ease-in-out infinite; }
@keyframes wobble { 25% { transform: rotate(-8deg) translateY(-10px); } 75% { transform: rotate(8deg) translateY(-4px); } }
.illu-lost .q { animation: float 2.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
    .agency-grid, .directory .agency-grid { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
    .agency-card h3 { font-size: .92rem; }
    .agency-services { display: none; }
}
