/* ============================================================================
   Alliance Location — Design System v2 (Corporate premium & épuré)
   Palette Graphite & noir (minimal luxe) · accent taupe · Inter + Outfit
   Mobile-first · WCAG AA · aucune image tierce (SVG/gradients maison)
   ============================================================================ */

/* --------------------------------------------------------------- tokens */
:root {
    /* Marque — Violet par touches sur base claire (comme le site d'origine) */
    --brand: #662483;
    --brand-dark: #4c1a63;
    --brand-800: #3d165f;
    --brand-light: #8a3bb0;
    --brand-050: #f7f3fb;
    --brand-100: #ece2f4;

    /* Accent (même famille violette) + états */
    --accent: #8a3bb0;
    --accent-dark: #6f2f90;
    --success: #2e7d46;
    --success-050: #eaf4ec;
    --error: #b3261e;
    --error-050: #fbeceb;

    /* Neutres (chauds, base claire) */
    --ink: #1c1622;
    --text: #35313d;
    --muted: #6f6a77;
    --line: #e8e3ef;
    --line-strong: #d7cfe4;
    --bg: #ffffff;
    --bg-soft: #f7f4fb;
    --bg-mute: #efeaf6;

    /* Typo */
    --font-head: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --h1: clamp(2.1rem, 1.4rem + 3vw, 3.25rem);
    --h2: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
    --h3: 1.35rem;
    --lead: clamp(1.05rem, 1rem + .5vw, 1.25rem);

    /* Espacement (base 8) */
    --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
    --sp-6: 1.5rem; --sp-8: 2rem; --sp-12: 3rem; --sp-16: 4rem; --sp-20: 5rem;

    /* Rayons / ombres */
    --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-full: 999px;
    --sh-sm: 0 1px 3px rgba(26,22,38,.06), 0 1px 2px rgba(26,22,38,.04);
    --sh-md: 0 6px 20px rgba(26,22,38,.08);
    --sh-lg: 0 18px 48px rgba(76,26,99,.16);

    --wrap: 1160px;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--brand-dark); line-height: 1.18; letter-spacing: -.02em; margin: 0 0 .6em; }
h1 { font-size: var(--h1); font-weight: 800; }
h2 { font-size: var(--h2); font-weight: 700; }
h3 { font-size: var(--h3); font-weight: 700; }
p { margin: 0 0 1rem; max-width: 72ch; }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.eyebrow { font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
    letter-spacing: .12em; font-size: .78rem; color: var(--brand); margin: 0 0 .5rem; }
/* Sur-titre : violet sur fond clair (hero), blanc sur bandeaux violets */
.hero .eyebrow { color: var(--brand); }
.page-head .eyebrow, .band .eyebrow { color: rgba(255,255,255,.85); }
.lead { font-size: var(--lead); color: var(--muted); }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.narrow { max-width: 720px; }

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

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* Icône par défaut (filet de sécurité — les conteneurs .card-icon/.cat-ic/etc. surchargent) */
.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -.15em; }

/* --------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 1;
    padding: 14px 26px; border-radius: var(--r-full); border: 2px solid transparent;
    cursor: pointer; min-height: 48px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; box-shadow: var(--sh-md); transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; box-shadow: var(--sh-md); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-050); }
/* Aplat clair pour fonds sombres (CTA principal du hero / bandeaux) */
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #f0f0f0; color: #000; box-shadow: var(--sh-md); transform: translateY(-2px); }
.btn-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-on-dark:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn-lg { font-size: 1.05rem; padding: 16px 32px; min-height: 54px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
/* Icônes dans les boutons : taille contrainte (évite les SVG géants) */
.btn .icon { width: 1.2em; height: 1.2em; flex: 0 0 auto; }

/* --------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
    backdrop-filter: saturate(150%) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--brand-dark); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.22rem; letter-spacing: -.02em; }
.brand-name .thin { font-weight: 400; color: var(--brand-light); }
.brand-tag { font-size: .68rem; color: var(--muted); letter-spacing: .02em; }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.main-nav a { display: block; color: var(--text); padding: 10px 14px; border-radius: var(--r-sm);
    font-family: var(--font-head); font-weight: 600; font-size: .96rem; }
.main-nav a:hover { background: var(--brand-050); color: var(--brand-dark); text-decoration: none; }
.main-nav a.active { color: var(--brand-dark); background: var(--brand-100); }
.main-nav .nav-cta { margin-left: 6px; }
.main-nav .nav-cta a, .main-nav a.btn { background: var(--brand); color: #fff; border-radius: var(--r-full); padding: 10px 18px; }
.main-nav .nav-cta a:hover { background: var(--brand-dark); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: transparent; border: 0;
    cursor: pointer; padding: 10px; width: 46px; height: 46px; }
.nav-toggle span { display: block; height: 3px; width: 24px; background: var(--brand-dark); border-radius: 3px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff;
        border-bottom: 1px solid var(--line); box-shadow: var(--sh-md); display: none; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 12px; }
    .main-nav a { padding: 14px; }
    .main-nav .nav-cta a, .main-nav a.btn { text-align: center; }
}

/* --------------------------------------------------------------- sections */
.section { padding: var(--sp-16) 0; }
.section.tight { padding: var(--sp-12) 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto var(--sp-8); text-align: center; }
.section-head p { margin: 0 auto; }

/* ------------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; color: var(--ink); border-bottom: 1px solid var(--line);
    background:
        radial-gradient(60% 90% at 100% 0%, rgba(102,36,131,.10), transparent 60%),
        linear-gradient(160deg, #faf7fd 0%, #f1e8f8 100%); }
/* Accent diagonal discret (gaieté, rappel du site d'origine) */
.hero::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 320px; height: 320px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light)); opacity: .12;
    transform: rotate(35deg); border-radius: 40px; z-index: 1; }
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr;
    gap: var(--sp-8); align-items: center; padding-top: var(--sp-16); padding-bottom: var(--sp-16); }
.hero h1 { color: var(--brand-dark); margin-bottom: var(--sp-4); }
.hero .lead { color: var(--muted); max-width: 52ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--sp-6); }
.hero-motif { width: 100%; max-width: 460px; margin-left: auto; opacity: .95; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-6); }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--brand-dark);
    border: 1px solid var(--line-strong); border-radius: var(--r-full); padding: 8px 14px; font-size: .9rem; font-weight: 600;
    box-shadow: var(--sh-sm); }
.hero-badge svg { color: var(--brand); }
.hero-badge svg { width: 18px; height: 18px; }

.stats-band { background: #fff; border-top: 1px solid var(--line); }
.stats-band .container { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-6);
    padding-top: var(--sp-8); padding-bottom: var(--sp-8); text-align: center; }
.stat b { display: block; font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; color: var(--brand); line-height: 1; }
.stat span { color: var(--muted); font-size: .98rem; }
@media (max-width: 820px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero-motif { display: none; }
    .stats-band .container { grid-template-columns: 1fr; gap: var(--sp-4); }
    .stat { display: flex; align-items: baseline; gap: 10px; justify-content: center; }
    .stat b { font-size: 1.8rem; }
}

/* --------------------------------------------------------------- cards */
.cards { display: grid; gap: var(--sp-6); grid-template-columns: repeat(3,1fr); }
.cards.cols-2 { grid-template-columns: repeat(2,1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--sp-6); box-shadow: var(--sh-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--brand-100); }
.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin-bottom: 0; }
.card-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--r-md);
    background: var(--brand-050); color: var(--brand); margin-bottom: var(--sp-4); }
.card-icon svg { width: 28px; height: 28px; }
@media (max-width: 920px) { .cards { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .cards, .cards.cols-2 { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- categories */
.cats { display: grid; gap: var(--sp-4); grid-template-columns: repeat(3,1fr); }
.cat { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line);
    border-radius: var(--r-md); padding: 16px 18px; color: var(--text); box-shadow: var(--sh-sm);
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease; }
.cat:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--brand-100); text-decoration: none; }
.cat-ic { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center;
    border-radius: var(--r-sm); background: var(--brand-050); color: var(--brand); }
.cat-ic svg { width: 26px; height: 26px; }
.cat b { display: block; font-family: var(--font-head); color: var(--brand-dark); font-size: 1.02rem; }
.cat span { color: var(--muted); font-size: .88rem; }
@media (max-width: 820px) { .cats { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .cats { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- steps */
.steps { display: grid; gap: var(--sp-6); grid-template-columns: repeat(3,1fr); counter-reset: step; }
.step { position: relative; padding-left: 4px; }
.step-num { width: 44px; height: 44px; border-radius: var(--r-full); background: var(--brand);
    color: #fff; font-family: var(--font-head); font-weight: 800; display: grid; place-items: center; margin-bottom: var(--sp-3); }
.step h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.step p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: var(--sp-4); } }

/* --------------------------------------------------------------- band (CTA) */
.band { color: #fff; border-radius: var(--r-lg); overflow: hidden; position: relative;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); padding: var(--sp-12); }
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.9); }
.band .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--sp-6); }
.band.center { text-align: center; }
.band.center p { margin-left: auto; margin-right: auto; }

/* -------------------------------------------------------------- testimonials */
.quotes { display: grid; gap: var(--sp-6); grid-template-columns: repeat(3,1fr); }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--sh-sm); }
.quote p { font-size: 1.05rem; color: var(--text); }
.quote .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: var(--sp-3); }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: var(--sp-4); }
.quote .avatar { width: 42px; height: 42px; border-radius: var(--r-full); background: var(--brand-100);
    color: var(--brand-dark); display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; }
.quote .who b { font-family: var(--font-head); color: var(--brand-dark); display: block; font-size: .95rem; }
.quote .who span { color: var(--muted); font-size: .85rem; }
@media (max-width: 920px) { .quotes { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 680px) { .quotes { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- logos strip */
.logos-strip { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; justify-content: center; }
.logos-strip img { max-height: 54px; width: auto; filter: grayscale(1); opacity: .72; transition: .2s; }
.logos-strip img:hover { filter: none; opacity: 1; }

/* -------------------------------------------------------- page header */
.page-head { position: relative; color: #fff; padding: var(--sp-16) 0 var(--sp-12);
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { color: rgba(255,255,255,.9); margin: .6rem 0 0; }
.crumbs { font-size: .85rem; margin-bottom: .5rem; }
.crumbs a { color: #fff; opacity: .85; }
.content-block { padding: var(--sp-12) 0; }

/* ----------------------------------------------------- legal cards (mentions légales) */
.legal-card { position: relative; margin: var(--sp-4) 0 var(--sp-6); padding: var(--sp-6) var(--sp-8);
    background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent);
    border-radius: var(--r-md); box-shadow: var(--sh-sm); }
.legal-card > *:first-child { margin-top: 0; }
.legal-card > *:last-child { margin-bottom: 0; }
.legal-card .legal-card-title { font-weight: 700; color: var(--ink); font-size: 1.1rem; margin-bottom: var(--sp-3); }
.legal-card p { margin: 0 0 var(--sp-2); line-height: 1.7; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card .lbl { font-weight: 600; color: var(--ink); }
.legal-card a { color: var(--accent); font-weight: 600; }
@media (max-width: 520px) { .legal-card { padding: var(--sp-4) var(--sp-6); } }

/* ----------------------------------------------------- agencies (finder) */
.agency-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--sp-8); align-items: start; }
#map { height: 560px; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.agency-search { position: relative; margin-bottom: var(--sp-4); }
.agency-search input { width: 100%; padding: 14px 16px 14px 44px; border: 1px solid var(--line-strong);
    border-radius: var(--r-full); font-size: 1rem; font-family: inherit; background: #fff; }
.agency-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-050); }
.agency-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.agency-list { max-height: 560px; overflow: auto; display: grid; gap: 12px; padding: 2px; }
.agency-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff;
    box-shadow: var(--sh-sm); transition: border-color .15s ease, box-shadow .2s ease; }
.agency-item:hover, .agency-item:focus-within { border-color: var(--brand); box-shadow: var(--sh-md); }
.agency-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.agency-item .meta { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.agency-item .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.agency-noresult { padding: 22px; color: var(--muted); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.btn-call { display: inline-flex; align-items: center; gap: 8px; background: var(--success); color: #fff;
    border-radius: var(--r-full); padding: 9px 16px; font-family: var(--font-head); font-weight: 700; font-size: .92rem; min-height: 40px; }
.btn-call:hover { background: #08924a; color: #fff; text-decoration: none; }
.btn-call svg { width: 16px; height: 16px; }
.link-more { font-family: var(--font-head); font-weight: 700; color: var(--brand); font-size: .92rem; align-self: center; }
.btn-site { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff;
    border-radius: var(--r-full); padding: 9px 16px; font-family: var(--font-head); font-weight: 700; font-size: .92rem; min-height: 40px; }
.btn-site:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.btn-site svg { width: 16px; height: 16px; }
.agency-item { cursor: pointer; }
.agency-item.is-active { border-color: var(--brand); box-shadow: var(--sh-md); background: var(--brand-050); }
/* Popup Leaflet */
.leaflet-popup-content { font-family: var(--font-body); margin: 12px 14px; }
.map-pop strong { font-family: var(--font-head); color: var(--brand-dark); font-size: 1.02rem; }
.map-pop-addr { color: var(--muted); font-size: .88rem; margin: 5px 0; }
.map-pop-tel { font-weight: 600; margin-bottom: 8px; }
.map-pop-site { display: inline-block; background: var(--brand); color: #fff !important; padding: 8px 14px;
    border-radius: var(--r-full); font-weight: 700; font-size: .9rem; }
.map-pop-site:hover { background: var(--brand-dark); text-decoration: none; }
.map-pop-fiche { display: inline-block; margin-left: 10px; font-weight: 600; font-size: .9rem; }
@media (max-width: 860px) {
    .agency-layout { grid-template-columns: 1fr; }
    #map { height: 340px; order: 2; }
    .agency-panel { order: 1; }
    .agency-list { max-height: 55vh; }
}

/* ------------------------------------------------------- agency detail */
.agency-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-8); align-items: start; }
.agency-logo { max-height: 84px; margin-bottom: var(--sp-4); }
.call-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--sh-md); }
.call-card .btn-call { width: 100%; font-size: 1.15rem; min-height: 54px; margin-bottom: var(--sp-3); }
.open-flag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--success); }
.open-flag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.agency-facts { list-style: none; padding: 0; margin: var(--sp-4) 0 0; }
.agency-facts li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.agency-facts li:last-child { border-bottom: 0; }
.agency-facts .lbl { color: var(--muted); min-width: 108px; font-size: .92rem; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--sp-6) 0; }
.trust-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--success-050); color: #0a7a41;
    border-radius: var(--r-full); padding: 8px 14px; font-size: .9rem; font-weight: 600; }
.trust-badge svg { width: 16px; height: 16px; }
#detail-map { height: 320px; border-radius: var(--r-md); border: 1px solid var(--line); }
@media (max-width: 780px) { .agency-hero { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--sh-md); padding: var(--sp-8); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--ink); white-space: nowrap; }
.field .req { color: var(--error); }
.field input, .field select, .field textarea { padding: 13px 14px; border: 1px solid var(--line-strong);
    border-radius: var(--r-sm); font-size: 1rem; font-family: inherit; background: #fff; color: var(--text); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-050); }
.field .hint { color: var(--muted); font-size: .82rem; white-space: normal; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.captcha-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.captcha-row img { border: 1px solid var(--line-strong); border-radius: var(--r-sm); height: 50px; }
.form-msg { padding: 14px 16px; border-radius: var(--r-sm); margin-bottom: var(--sp-4); display: none; font-weight: 500; }
.form-msg.ok { background: var(--success-050); color: #0a7a41; display: block; }
.form-msg.err { background: var(--error-050); color: #a5281b; display: block; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.btn.is-loading { opacity: .85; cursor: progress; }

/* Toasts (feedback flottant, visible quel que soit le défilement) */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 2000;
    display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: flex-start; gap: 12px; background: #fff;
    border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--r-md);
    box-shadow: var(--sh-lg); padding: 14px 16px; animation: toastIn .25s ease both; }
.toast.closing { animation: toastOut .2s ease both; }
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--error); }
.toast .t-ic { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; }
.toast.ok .t-ic { color: var(--success); }
.toast.err .t-ic { color: var(--error); }
.toast .t-msg { font-size: .95rem; color: var(--text); line-height: 1.45; }
.toast .t-close { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--muted);
    font-size: 1.3rem; line-height: 1; padding: 0 2px; }
.toast .t-close:hover { color: var(--ink); }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(16px); } }
@media (max-width: 520px) {
    .toast-wrap { top: auto; bottom: 12px; left: 12px; right: 12px; width: auto; }
    @keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}

/* ---------------------------------------------------------------- sitemap */
.sitemap-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
.sitemap-cols ul { list-style: none; padding: 0; margin: 0 0 var(--sp-6); }
.sitemap-cols h3 { margin: 0 0 .5rem; }
.sitemap-cols li { padding: 3px 0; }
@media (max-width: 640px) { .sitemap-cols { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--brand-800); color: #e9e3f0; margin-top: var(--sp-16); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: var(--sp-8); padding: var(--sp-12) 20px; }
.footer-brand { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-brand svg { width: 32px; height: 32px; }
.footer-col h3 { color: #fff; font-size: 1rem; margin: 0 0 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 5px 0; }
.footer-col a { color: #d9cfe6; }
.footer-col a:hover { color: #fff; }
.socials { display: flex; gap: 10px; margin-top: 12px; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-full);
    background: rgba(255,255,255,.1); color: #fff; }
.socials a:hover { background: var(--accent); }
.socials svg { width: 20px; height: 20px; }
.newsletter input { width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08); color: #fff; margin: 8px 0; }
.newsletter input::placeholder { color: rgba(255,255,255,.6); }
.newsletter input:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.footer-bar { background: rgba(0,0,0,.25); }
.footer-bar .container { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
    padding: 16px 20px; font-size: .86rem; color: #cfc4de; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: var(--sp-6); } }

/* --------------------------------------------------------------- news */
.news { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-4); }
.news figure { margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; box-shadow: var(--sh-sm); }
.news img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.news figcaption { padding: 12px; font-size: .9rem; color: var(--muted); }
@media (max-width: 900px) { .news { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .news { grid-template-columns: 1fr; } }

/* --------------------------------------------- guide choix utilitaire */
.util-cats { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-6); }
.util-cat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--sp-6); box-shadow: var(--sh-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.util-cat:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--brand-100); }
.util-cat h3 { margin: 0 0 .4rem; }
.util-cat p { color: var(--muted); margin: 0 0 .5rem; }
.util-cat p:last-child { margin-bottom: 0; }
.util-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: var(--sp-4); }
.util-cat-num { font-family: var(--font-head); font-weight: 700; font-size: .8rem; text-transform: uppercase;
    letter-spacing: .04em; color: var(--brand); background: var(--brand-050); border: 1px solid var(--brand-100);
    border-radius: var(--r-full); padding: 4px 12px; }
.util-vol { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: var(--brand-dark); }
.util-types { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text) !important; }
.util-types svg { flex: 0 0 auto; color: var(--brand); }

.util-example .util-cat-head { margin-bottom: var(--sp-3); }
.check-list { list-style: none; padding: 0; margin: var(--sp-4) 0 0; display: grid; gap: 10px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text); line-height: 1.5; }
.check-list svg { flex: 0 0 auto; color: var(--success); margin-top: 2px; }

.util-note { margin: var(--sp-6) auto 0; max-width: 70ch; text-align: center; color: var(--muted);
    background: var(--brand-050); border: 1px dashed var(--line-strong); border-radius: var(--r-md);
    padding: var(--sp-4) var(--sp-6); }

@media (max-width: 900px) { .util-cats { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .util-cats { grid-template-columns: 1fr; } }

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
