/* ============================================================
   Santé Chez Vous — Système de design v3 « clinique, claire »
   Une couleur d'accent, aucune décoration, lisibilité d'abord.
   ============================================================ */

:root {
    --navy: #0f2e5c;
    --navy-dark: #0a2244;
    --accent: #0d7f6d;
    --accent-hover: #0a6a5b;
    --paper: #fbfaf7;
    --white: #ffffff;
    --ink: #16243f;
    --gray: #56607a;
    --gray-light: #66708a;
    --line: #e3e0d8;
    --line-strong: #cfcac0;
    --soft: #f3f1ea;
    --radius: 6px;
    --container: 1160px;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head: 'Newsreader', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; line-height: 1.15; color: var(--navy); text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; font-weight: 600; }
p { text-wrap: pretty; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgba(13, 127, 109, 0.18); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--gray); font-size: 1.15rem; }
.note { color: var(--gray); font-size: 1rem; }

/* ---------- Accessibilité ---------- */
.skip-link {
    position: absolute; top: -100px; left: 16px; z-index: 1000;
    background: var(--navy); color: var(--white); padding: 12px 20px;
    border-radius: 0 0 var(--radius) var(--radius); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ---------- Boutons ---------- */
.btn, .btn-outline, .btn-white {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font-body); font-size: 1rem; font-weight: 600;
    padding: 14px 24px; border-radius: var(--radius); text-decoration: none;
    border: 1.5px solid transparent; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1.2; min-height: 48px; white-space: nowrap;
}
.btn { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-white:hover { background: var(--soft); border-color: var(--soft); color: var(--navy); }
.btn svg, .btn-outline svg, .btn-white svg { flex-shrink: 0; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- En-tête ---------- */
.header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner {
    max-width: var(--container); margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 48px; height: auto; }
.brand-name { display: block; font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--navy); line-height: 1.1; white-space: nowrap; }
.brand-tag { display: block; font-size: 0.8rem; color: var(--gray); margin-top: 2px; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: 1rem; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--navy); border-bottom-color: var(--line-strong); }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-phone:hover { color: var(--accent); }
.menu-toggle { display: none; background: none; border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 10px; cursor: pointer; color: var(--navy); }
.menu-toggle svg { display: block; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Héros accueil ---------- */
.hero { padding: 72px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero-lede { font-size: 1.25rem; color: var(--gray); margin-bottom: 32px; max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--gray); font-size: 0.98rem; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts svg { color: var(--accent); flex-shrink: 0; }
.hero-image img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.tagline { font-family: var(--font-head); font-style: italic; color: var(--navy); font-size: 1.15rem; margin-top: 28px; }

/* ---------- Héros de page ---------- */
.page-hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); background: var(--white); }
.breadcrumb { font-size: 0.9rem; color: var(--gray); margin-bottom: 18px; }
.breadcrumb a { color: var(--gray); }
.breadcrumb span { margin: 0 8px; }
.page-hero h1 { margin-bottom: 16px; max-width: 24ch; }
.page-hero p { color: var(--gray); font-size: 1.2rem; max-width: 62ch; }

/* ---------- Liste de services (accueil) ---------- */
.service-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.service-item { border-top: 1px solid var(--line); }
.service-item a { display: block; padding: 26px 0; text-decoration: none; color: inherit; }
.service-item svg { color: var(--navy); margin-bottom: 12px; }
.service-item h3 { margin-bottom: 6px; }
.service-item p { color: var(--gray); font-size: 1rem; }
.service-item a:hover h3 { color: var(--accent); }
.section-foot { margin-top: 36px; }

/* ---------- Détail d'un service ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.toc a { text-decoration: none; color: var(--navy); border: 1px solid var(--line-strong); padding: 8px 14px; border-radius: 999px; font-size: 0.95rem; background: var(--white); }
.toc a:hover { border-color: var(--navy); }
.service-detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; padding: 44px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.service-detail:first-of-type { border-top: 0; }
.service-detail h2 { font-size: 1.7rem; margin-bottom: 12px; }
.service-detail p { color: var(--gray); }
.facts-table { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px; font-size: 1rem; align-self: start; }
.facts-table div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts-table div:first-child { border-top: 0; }
.facts-table dt { color: var(--gray); }
.facts-table dd { color: var(--ink); font-weight: 500; }

/* ---------- Étapes ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step { border-top: 2px solid var(--navy); padding-top: 20px; }
.step-num { font-family: var(--font-head); font-size: 1.1rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--gray); font-size: 1rem; }

/* ---------- Image + texte ---------- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.split img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.split h2 { margin-bottom: 18px; }
.split p { color: var(--gray); margin-bottom: 16px; }
.checklist { margin-top: 24px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.checklist svg { color: var(--accent); flex-shrink: 0; margin-top: 4px; }
.checklist strong { display: block; color: var(--navy); }
.checklist span { color: var(--gray); font-size: 1rem; }

/* ---------- Zones ---------- */
.zones-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.city-list { columns: 2; column-gap: 32px; font-size: 1.05rem; }
.city-list li { padding: 8px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.zones-grid .note { margin-top: 20px; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--font-body); font-size: 1.5rem; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: '–'; }
.faq summary:hover { color: var(--accent); }
.faq .answer { padding: 0 0 22px; color: var(--gray); max-width: 68ch; }

/* ---------- Appel à l'action ---------- */
.cta { background: var(--navy); color: var(--white); padding: 72px 0; }
.cta-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; }
.cta h2 { color: var(--white); margin-bottom: 8px; }
.cta p { color: rgba(255,255,255,0.82); max-width: 48ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta .btn-outline { color: var(--white); border-color: rgba(255,255,255,0.65); }
.cta .btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* ---------- Blogue ---------- */
.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.blog-filter { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; background: var(--white); border: 1px solid var(--line-strong); color: var(--ink); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.blog-filter:hover { border-color: var(--navy); }
.blog-filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: border-color 0.15s; }
.post-card:hover { border-color: var(--navy); }
.post-card.hidden { display: none; }
.post-band { height: 112px; display: flex; align-items: center; justify-content: center; color: var(--white); }
.post-band svg { width: 40px; height: 40px; }
.band-soins { background: var(--accent); }
.band-conseils { background: var(--navy); }
.band-aines { background: #7a5a3a; }
.post-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex-grow: 1; }
.post-meta { font-size: 0.88rem; color: var(--gray-light); margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.post-cat { font-weight: 600; color: var(--navy); }
.post-card h3, .post-card h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; line-height: 1.3; }
.post-card:hover h3, .post-card:hover h2 { color: var(--accent); }
.post-excerpt { color: var(--gray); font-size: 0.98rem; flex-grow: 1; }
.post-more { margin-top: 16px; color: var(--accent); font-weight: 600; font-size: 0.95rem; }

/* ---------- Article ---------- */
.article-hero { padding: 56px 0 40px; background: var(--white); border-bottom: 1px solid var(--line); }
.article-hero .container { max-width: 800px; }
.article-cat { display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.article-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 16px; }
.article-meta { color: var(--gray-light); font-size: 0.95rem; }
.article { max-width: 720px; margin: 0 auto; padding: 56px 24px 72px; font-size: 1.15rem; }
.article h2 { font-size: 1.6rem; margin: 40px 0 14px; }
.article h2:first-child { margin-top: 0; }
.article p { color: var(--ink); margin-bottom: 20px; line-height: 1.7; }
.article ul { margin: 0 0 22px 0; }
.article li { position: relative; padding-left: 26px; margin-bottom: 10px; line-height: 1.6; }
.article li::before { content: ''; position: absolute; left: 6px; top: 0.7em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.article em { color: var(--gray); font-size: 0.95em; }
.article-note { margin-top: 44px; padding: 26px 28px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); }
.article-note h2 { font-size: 1.35rem; margin: 0 0 8px; }
.article-note p { margin-bottom: 16px; font-size: 1.05rem; }
.article-note .btn { margin-right: 10px; margin-bottom: 8px; }
.related { padding: 64px 0 96px; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.6rem; margin-bottom: 28px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.contact-list li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list svg { color: var(--accent); flex-shrink: 0; margin-top: 4px; }
.contact-list strong { display: block; color: var(--navy); }
.contact-list a, .contact-list span { color: var(--gray); text-decoration: none; }
.contact-list a:hover { color: var(--accent); text-decoration: underline; }
.contact-grid .note { margin-top: 24px; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.form-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.form-card > p { color: var(--gray); margin-bottom: 26px; font-size: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; color: var(--navy); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: var(--radius); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); background: var(--white); box-shadow: 0 0 0 3px rgba(15,46,92,0.12); }
.field textarea { min-height: 130px; resize: vertical; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; color: var(--gray); margin: 8px 0 18px; }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--navy); flex-shrink: 0; }
.form-note { font-size: 0.88rem; color: var(--gray-light); margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; }
.form-note svg { flex-shrink: 0; margin-top: 3px; }
.btn-submit { width: 100%; }
.form-result { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius); font-size: 0.98rem; display: none; }
.form-result.success { display: block; background: #e8f5f1; color: #0a5a4d; border: 1px solid #b9e2d7; }
.form-result.error { display: block; background: #fbeaea; color: #8a2e2e; border: 1px solid #efc4c4; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Page juridique ---------- */
.legal { max-width: 780px; margin: 0 auto; padding: 56px 24px 96px; }
.legal h2 { font-size: 1.45rem; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--gray); margin-bottom: 14px; }
.legal ul { list-style: disc; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--ink); }
.legal .legal-updated { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--navy); padding: 12px 18px; border-radius: var(--radius); font-size: 0.95rem; margin-bottom: 32px; }
.legal .legal-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin: 20px 0; }
.legal .legal-box p:last-child { margin-bottom: 0; }

/* ---------- À propos : pour qui ---------- */
.audience { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.audience li { padding: 22px 0; border-top: 1px solid var(--line); }
.audience strong { display: block; color: var(--navy); font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; margin-bottom: 4px; }
.audience span { color: var(--gray); font-size: 1rem; }

/* ---------- Pied de page ---------- */
.footer { background: var(--navy-dark); color: rgba(255,255,255,0.82); padding: 64px 0 0; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-brand img { width: 56px; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-brand p { max-width: 36ch; }
.footer-title { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--white); margin-bottom: 16px; }
.footer li { margin-bottom: 10px; }
.footer a { color: rgba(255,255,255,0.82); text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 22px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.9rem; color: rgba(255,255,255,0.72); }
.footer-bottom a { margin-left: 20px; }

/* ---------- Avis Loi 25 ---------- */
.consent-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--white); border-top: 1px solid var(--line-strong); padding: 16px 24px; display: none; box-shadow: 0 -4px 20px rgba(0,0,0,0.06); }
.consent-bar.show { display: block; }
.consent-inner { max-width: var(--container); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.consent-inner p { font-size: 0.95rem; color: var(--gray); max-width: 80ch; }
.consent-inner .btn { padding: 10px 18px; min-height: 0; font-size: 0.95rem; }
.consent-inner .link { font-size: 0.95rem; margin-right: 14px; }

/* ---------- Bouton d'appel mobile ---------- */
.call-fab { position: fixed; right: 16px; bottom: 16px; z-index: 800; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--white); display: none; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,0.2); }
.call-fab:hover { background: var(--accent-hover); color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .header-phone span { display: none; }
    .brand-tag { display: none; }
}
@media (max-width: 1024px) {
    .service-list { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .header-phone span { display: none; }
}
@media (max-width: 860px) {
    .section { padding: 64px 0; }
    .hero { padding: 40px 0 56px; }
    .hero-grid, .split, .zones-grid, .contact-grid, .service-detail { grid-template-columns: 1fr; gap: 36px; }
    .hero-image { order: -1; }
    .hero-image img { aspect-ratio: 4/3; }
    .split img { aspect-ratio: 16/10; }
    .steps { grid-template-columns: 1fr; gap: 28px; }
    .post-grid { grid-template-columns: 1fr; }
    .audience { grid-template-columns: 1fr; }
    .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 16px; }
    .nav.open { display: flex; }
    .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
    .nav a[aria-current="page"] { border-bottom-color: var(--line); }
    .menu-toggle { display: block; }
    .header-inner { position: relative; padding: 12px 20px; gap: 12px; }
    .header-actions .btn { display: none; }
    .call-fab { display: flex; }
    .consent-inner .btn { width: 100%; }
    .cta-inner { flex-direction: column; align-items: flex-start; }
    .form-row { grid-template-columns: 1fr; }
    .form-card { padding: 24px; }
    .service-list { grid-template-columns: 1fr; }
    .city-list { columns: 1; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom a { margin-left: 0; margin-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
    .header, .consent-bar, .call-fab, .cta, .skip-link { display: none !important; }
    body { background: #fff; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
}
