/* ==========================================================================
   Design system — trouvezvotretherapeute.fr
   Ambiance : calme, lumineuse, chaleureuse. Aucune ressource externe (RGPD).
   ========================================================================== */

:root {
  /* Palette */
  --sage-50: #f4f9f6;
  --sage-100: #e6f2ec;
  --sage-200: #cfe5d8;
  --sage-300: #bdd8c8;
  --sage-500: #6da58a;
  --sage-600: #4d8a6e;
  --sage-700: #2f6650;
  --blue-100: #e8f0ff;
  --sand-50: #fbf7f1;
  --sand-100: #f7f0e6;
  --lavender-100: #f3eeff;
  --lavender-200: #e5dcfb;
  --terracotta-500: #d1735a;
  --terracotta-600: #b85c44;
  --terracotta-700: #9a4a35;
  --ink-900: #1c2733;
  --ink-700: #3b4a5a;
  --ink-500: #5b6b7b;
  --line: #e3ebe7;

  /* Sémantique */
  --bg: #fbfdfc;
  --surface: #ffffff;
  --surface-soft: var(--sage-50);
  --text: var(--ink-900);
  --text-soft: var(--ink-700);
  --primary: var(--terracotta-600);
  --primary-hover: var(--terracotta-700);
  --accent: var(--sage-700);
  --focus: #1d5fa8;

  /* Formes */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(28, 39, 51, .05), 0 2px 8px rgba(28, 39, 51, .04);
  --shadow: 0 10px 30px rgba(28, 39, 51, .08);
  --shadow-lg: 0 20px 50px rgba(28, 39, 51, .12);

  /* Espacements */
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101a17;
    --surface: #17231f;
    --surface-soft: #1b2a25;
    --text: #eaf2ee;
    --text-soft: #c2d0c9;
    --ink-500: #9fb1a8;
    --line: #2a3b35;
    --sage-50: #17231f;
    --sage-100: #1e2f28;
    --sage-200: #2a4238;
    --sage-300: #38584a;
    --sand-100: #2a2a22;
    --sand-50: #1a211d;
    --lavender-100: #25233a;
    --lavender-200: #34315a;
    --blue-100: #1f2c44;
    --primary: #e08a70;
    --primary-hover: #eba18a;
    --accent: #8fcfb1;
    --focus: #8dc0ff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .45);
  }
}

/* Base ------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 8% -5%, var(--sage-100), transparent 60%),
    radial-gradient(800px 480px at 100% 0%, var(--lavender-100), transparent 55%),
    var(--bg);
  background-repeat: no-repeat;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: clip; }
main { flex: 1; padding-bottom: var(--space-4); }
a { color: inherit; text-decoration: none; }
main a:not(.btn):not(.chip):not(.card-link) { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
main a:not(.btn):not(.chip):not(.card-link):hover { text-decoration-color: currentColor; }
img { max-width: 100%; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6rem; font-weight: 600; }
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .8rem; }
section { margin-top: var(--space-5); }

/* Titres de page : même échelle partout ---------------------------------- */
.hero h1 { margin-bottom: var(--space-1); }
.hero p:not(.badge):not(.muted), main > article:not(.prose) > h1 + p, main > section:not(.form-narrow):not(.search-head) > h1 + p { font-size: 1.15rem; color: var(--text-soft); max-width: 62ch; }
main > article:not(.prose):first-child:has(> h1:first-child) { padding-top: var(--space-4); }
.form-narrow h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); text-align: center; }
.hero-home h1 { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.25rem); }

/* Pages éditoriales (contenu texte) -------------------------------------- */
.prose { max-width: 760px; padding-top: var(--space-5); padding-bottom: var(--space-3); }
.prose h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); margin-bottom: var(--space-2); }
.prose h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); margin: var(--space-4) 0 .5rem; }
.prose h3 { margin: var(--space-3) 0 .4rem; }
.prose p, .prose li { color: var(--text); line-height: 1.7; }
.prose .lead { font-size: 1.15rem; color: var(--text-soft); margin-bottom: var(--space-3); max-width: none; }
.prose ul, .prose ol { margin: 0 0 var(--space-3); padding-left: 1.4rem; }
.prose li { margin-bottom: .4rem; }
.prose li::marker { color: var(--accent); }
.prose .btn { margin-top: var(--space-2); }
.faq-list { margin-top: var(--space-3); }
main > section:first-child, main > article > section:first-child { margin-top: var(--space-4); }

.container { width: min(1120px, 92vw); margin: 0 auto; }
.muted { color: var(--text-soft); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
.lead { font-size: 1.2rem; color: var(--text-soft); max-width: 60ch; }
.section-head { margin-bottom: var(--space-3); }
.section-head p { color: var(--text-soft); margin: 0; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--surface); padding: .6rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); }

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

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; gap: var(--space-2); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.nav-links { display: flex; gap: .1rem; margin-left: auto; }
.nav-links a, .nav-actions .btn { white-space: nowrap; }
.nav-actions .btn { min-height: 42px; padding: .5rem 1.05rem; font-size: .95rem; }
.nav-links a { padding: .5rem .55rem; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--text-soft); transition: background .2s var(--ease), color .2s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--sage-100); color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: .3rem; flex: none; }
.nav-actions > a:not(.btn) { padding: .5rem .6rem; font-weight: 500; color: var(--text-soft); }
.nav-actions > a:not(.btn):hover { color: var(--text); }
.inline-form { display: inline-flex; margin: 0; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

/* Boutons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.3rem; border-radius: 999px;
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  cursor: pointer; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-hover); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover, .btn-primary:focus { color: #1a0f0b; } }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-secondary:hover, .btn-secondary:focus { border-color: var(--sage-500); background: var(--sage-50); }
.btn-lg { min-height: 52px; padding: .8rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Cartes ----------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: 1.35rem; }
/* Bio venant de CabinetZen : typographie du site imposée (le HTML source n'apporte aucun style de police). */
.bio-html { font-family: var(--font-body); font-size: .95rem; line-height: 1.6; color: var(--text); }
.bio-html p { margin: 0 0 .8rem; }
.bio-html li > p { margin: 0; }
.bio-html strong, .bio-html b { font-weight: 600; }
.bio-html h2, .bio-html h3, .bio-html h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; }
.bio-html h4 { font-size: .95rem; }
.bio-html > :last-child { margin-bottom: 0; }
.bio-html ul, .bio-html ol, .card .bio-list { margin: 0 0 .8rem; padding-left: 1.4rem; }
.bio-html li, .bio-list li { margin-bottom: .25rem; }
.bio-html h2, .bio-html h3, .bio-html h4 { margin-top: 1rem; }
.bio-html h2 { font-size: 1.1rem; }
.bio-html h3 { font-size: 1rem; }
.bio-html blockquote { margin: .8rem 0; padding-left: 1rem; border-left: 3px solid var(--border, #ddd); }
.card-hover { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--sage-300); }

.messages { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.messages li { margin-bottom: .5rem; padding: .85rem 1.1rem; }
.message-success { border-left: 4px solid #2f855a; background: color-mix(in srgb, #2f855a 8%, var(--surface)); }
.message-error { border-left: 4px solid #c53030; background: color-mix(in srgb, #c53030 8%, var(--surface)); }
.message-info, .message-warning { border-left: 4px solid var(--sage-500); }

/* Hero ------------------------------------------------------------------- */
.hero { padding: var(--space-4) 0 var(--space-2); }
.hero-home { position: relative; padding: clamp(2rem, 6vw, 4.5rem) 0 var(--space-3); text-align: center; }
.hero-home h1 { max-width: 24ch; margin-left: auto; margin-right: auto; }
.hero-home h1 em { font-style: italic; color: var(--accent); }
.hero-home .lead { margin: 0 auto var(--space-4); }
.hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin: var(--space-3) 0 0; padding: 0; list-style: none; color: var(--text-soft); font-size: .95rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust svg { width: 18px; height: 18px; color: var(--sage-600); }

/* Barre de recherche ------------------------------------------------------ */
.search-bar {
  display: grid; grid-template-columns: 1.3fr 1fr auto; gap: .5rem; align-items: end;
  max-width: 880px; margin: 0 auto; padding: .6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-lg);
  text-align: left;
}
.hero-guided { max-width: 880px; margin: 0 auto; text-align: left; }
.hero-guided .guided-form textarea { min-height: 110px; height: 120px; }
.search-bar .field { display: flex; flex-direction: column; padding: .35rem 1.2rem; min-width: 0; }
.search-bar .field + .field { border-left: 1px solid var(--line); }
.search-bar label { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-soft); margin: 0; }
.search-bar input { border: 0; background: transparent; padding: .15rem 0; border-radius: 0; font-size: 1rem; box-shadow: none; }
.search-bar input:focus { outline: none; }
.search-bar .field:focus-within label { color: var(--accent); }
.search-bar .btn { align-self: stretch; min-height: 52px; }
.search-grid { display: grid; gap: .6rem; max-width: 620px; }

.chip-row { display: flex; gap: .45rem; flex-wrap: wrap; }
.chip-row-center { justify-content: center; margin-top: var(--space-3); }
.chip {
  display: inline-flex; align-items: center; background: var(--sand-100); color: var(--text);
  border: 1px solid transparent; border-radius: 999px; padding: .3rem .85rem; font-size: .9rem; font: inherit; font-size: .9rem; line-height: 1.4;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
a.chip:hover, button.chip:hover { background: var(--sage-100); border-color: var(--sage-300); transform: translateY(-1px); }
button.chip { cursor: pointer; }
.chip-row-center .chip { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }

.badge { display: inline-flex; align-items: center; gap: .3rem; background: var(--sage-200); color: var(--sage-700); border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; font-weight: 700; }
@media (prefers-color-scheme: dark) { .badge { color: #d6efe3; } }
.badge-premium { background: var(--primary); color: #fff; }
.badge-featured { background: var(--sage-700); color: #fff; }
@media (prefers-color-scheme: dark) { .badge-featured { background: var(--sage-200); color: #10261c; } }
@media (prefers-color-scheme: dark) { .badge-premium { color: #1a0f0b; } }

/* Grilles ---------------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
/* 4 fiches mises en avant sur une seule ligne en grand écran. */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-4 { grid-template-columns: 1fr; gap: var(--space-2); } }

/* Étapes ------------------------------------------------------------------ */
.step { position: relative; }
.step-num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--sage-200), var(--lavender-200)); color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: .8rem; }

/* Fiche thérapeute (carte) ------------------------------------------------- */
.therapist-card { display: flex; flex-direction: column; gap: .8rem; height: 100%; position: relative; }
.therapist-card .card-header { align-items: flex-start; }
.therapist-card h3 { margin-bottom: .1rem; font-size: 1.2rem; }
.therapist-card h3 a, main .therapist-card h3 a { color: inherit; text-decoration: none; }
.therapist-card h3 a:hover { color: var(--accent); }
.therapist-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-md); }
.therapist-card p { margin: 0; }
.therapist-card .bio { color: var(--text-soft); font-size: .98rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.therapist-card .card-actions { margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); justify-content: space-between; }
.therapist-card .card-actions .btn, .therapist-card .card-actions a { position: relative; z-index: 1; }
.meta-line { display: flex; flex-wrap: wrap; gap: .25rem .8rem; color: var(--text-soft); font-size: .92rem; }
.meta-line span { display: inline-flex; align-items: center; gap: .3rem; }
.meta-line svg { width: 15px; height: 15px; color: var(--sage-600); flex: none; }
.rating { color: var(--text); font-weight: 600; }
.rating svg { color: #e0a72d; fill: currentColor; }
.card-header { display: flex; gap: 1rem; align-items: center; }
.avatar, .avatar-lg { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; background: var(--lavender-100); flex: none; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.avatar-lg { width: 112px; height: 112px; }
.avatar-fallback { display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--accent); background: linear-gradient(135deg, var(--sage-200), var(--lavender-200)); }
.actions-row, .card-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .8rem; }

/* Fiche détail ------------------------------------------------------------ */
.profile-hero { padding: var(--space-4); background: linear-gradient(135deg, var(--surface) 55%, var(--sage-50)); }
.profile-hero .card-header { gap: 1.5rem; }
.profile-hero h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); margin-bottom: .2rem; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "main aside"; align-items: start; gap: var(--space-3); margin-top: var(--space-3); }
.profile-main { grid-area: main; display: flex; flex-direction: column; gap: var(--space-3); }
.profile-aside { grid-area: aside; position: sticky; top: calc(var(--header-h) + var(--space-2)); display: flex; flex-direction: column; gap: var(--space-2); }
.profile-main h2 { font-size: 1.3rem; }
.profile-main > section, .profile-aside > section { margin-top: 0; }
.profile-main .card .card { box-shadow: none; background: var(--surface-soft); margin-top: .8rem; }
.profile-main .grid-2 h2 + .chip-row { margin-bottom: 1.2rem; }
.booking-card iframe { max-width: 100%; border-radius: var(--radius-sm); }

/* Formulaires --------------------------------------------------------------- */
input, select, textarea {
  width: 100%; min-height: 46px; border: 1px solid #c6d3cd; background: var(--surface); color: var(--text);
  border-radius: var(--radius-sm); padding: .65rem .85rem; font: inherit; font-size: 1rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
@media (prefers-color-scheme: dark) { input, select, textarea { border-color: #38504a; } }
textarea { min-height: 110px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--sage-500); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
::placeholder { color: var(--ink-500); opacity: .85; }
input[type="checkbox"], input[type="radio"] { width: 1.15rem; height: 1.15rem; min-height: 0; padding: 0; flex: 0 0 auto; accent-color: var(--sage-600); }
.checkbox-field { display: inline-flex; align-items: center; gap: .55rem; width: auto; cursor: pointer; }
.filters form, .card form { display: flex; flex-direction: column; }
.filters form label, .card form label { margin-top: .9rem; margin-bottom: .3rem; font-weight: 600; font-size: .92rem; }
.filters form label:first-of-type, .card form label:first-of-type { margin-top: 0; }
.filters form .checkbox-field, .card form .checkbox-field { margin-top: .9rem; }
.filters form button, .card form button { margin-top: 1.2rem; }
.card form.inline-form { display: inline-flex; }
.card form.inline-form button { margin-top: 0; }
.field-hint { margin: .2rem 0 .6rem; font-size: .88rem; }
.form-narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.errorlist { list-style: none; padding: 0; margin: .3rem 0 0; color: #b42318; font-size: .9rem; }
@media (prefers-color-scheme: dark) { .errorlist { color: #ff9b8f; } }

/* Recherche ----------------------------------------------------------------- */
.search-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.search-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; }
.filters { position: sticky; top: calc(var(--header-h) + var(--space-2)); max-height: calc(100vh - var(--header-h) - 2rem); overflow-y: auto; padding: 0; }
.filters > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.filters > summary::-webkit-details-marker { display: none; }
.filters > summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease); margin-right: 4px; }
.filters[open] > summary::after { transform: rotate(-135deg); }
.filters .filters-body { padding: 0 1.25rem 1.25rem; }
#advanced-matching { background: linear-gradient(135deg, var(--surface) 40%, var(--lavender-100)); margin-bottom: var(--space-3); }
.matching-list { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: grid; gap: var(--space-2); }
#matching-state:empty, #matching-context-summary:empty { display: none; }
#search-results-grid > .card:only-child { grid-column: 1 / -1; text-align: center; padding: var(--space-5) var(--space-3); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 2rem 0 .5rem; color: var(--text-soft); }
.pagination a { padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 600; color: var(--text); }
.pagination a:hover { border-color: var(--sage-500); }

/* Filtres rapides */
.quick-filters { margin-bottom: var(--space-2); }
.quick-filters .chip { background: var(--surface); border-color: var(--line); min-height: 40px; padding: .4rem 1rem; box-shadow: var(--shadow-sm); }
.quick-filters .chip.chip-active, .quick-filters a.chip.chip-active:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .quick-filters .chip.chip-active, .quick-filters a.chip.chip-active:hover { color: #0d1a15; } }

/* Décor d'accueil */
.hero-home { isolation: isolate; }
.hero-deco { position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-deco svg { position: absolute; }
.hero-deco .leaf-l { left: -60px; top: 10%; width: 260px; color: var(--sage-200); transform: rotate(-12deg); }
.hero-deco .leaf-r { right: -50px; top: 30%; width: 220px; color: var(--lavender-200); transform: rotate(18deg) scaleX(-1); }
.hero-deco .sun { right: 18%; top: 24px; width: 120px; color: var(--sand-100); }
@media (max-width: 720px) { .hero-deco .leaf-l { width: 160px; left: -50px; } .hero-deco .leaf-r, .hero-deco .sun { display: none; } }

/* Bandeaux & FAQ ---------------------------------------------------------------- */
.cta-band {
  position: relative; overflow: hidden; padding: var(--space-5) var(--space-4); text-align: center;
  border-radius: var(--radius-lg); color: var(--text);
  background: linear-gradient(135deg, var(--sage-100), var(--lavender-100));
  border: 1px solid var(--line);
}
.cta-band p { max-width: 55ch; margin-left: auto; margin-right: auto; color: var(--text-soft); }
.trust-card .icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--sand-100); color: var(--primary); margin-bottom: .8rem; }
.trust-card .icon svg { width: 22px; height: 22px; }
.faq-list details { margin-bottom: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; box-shadow: var(--shadow-sm); }
.faq-list summary { cursor: pointer; font-weight: 600; padding: 1rem 1.2rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent); transition: transform .2s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 1.2rem 1rem; margin: 0; color: var(--text-soft); }

/* Pied de page ------------------------------------------------------------------ */
.site-footer { margin-top: var(--space-6); padding: var(--space-5) 0 var(--space-4); background: #14211c; color: #e8f1ec; border-top-left-radius: var(--radius-lg); border-top-right-radius: var(--radius-lg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.site-footer h2 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #9fc8b3; margin-bottom: .8rem; }
.footer-grid a { color: #d6e6de; display: block; padding: .2rem 0; }
.footer-grid a:hover { color: #fff; text-decoration: underline; }
.site-footer .muted { color: #b5cbc0; }
.site-footer .brand { color: #fff; margin-bottom: .6rem; }

/* Recherche guidée ("Décrire ma situation") ------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.guided-head { display: block; }
.hero-describe { text-align: center; margin-top: var(--space-2); }
.guided-form textarea { min-height: 150px; }
.guided-urgent { border-left: 6px solid #c53030; background: color-mix(in srgb, #c53030 8%, var(--surface)); }
.guided-urgent a { font-weight: 700; text-decoration: underline; }
.guided-criteria { margin-top: var(--space-2); }
.guided-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-2); margin-top: var(--space-2); }
.guided-ask { padding: .7rem 1rem; border-radius: var(--radius-sm); background: var(--surface-soft); }
.chat { padding: 0; overflow: hidden; text-align: left; }
.chat-log { display: flex; flex-direction: column; gap: .6rem; padding: var(--space-3); max-height: min(60vh, 34rem); min-height: 12rem; overflow-y: auto; background: var(--surface-soft); scroll-behavior: auto; }
.chat-msg { display: flex; flex-direction: column; gap: .35rem; max-width: 88%; }
.chat-bot { align-self: flex-start; align-items: flex-start; }
.chat-user { align-self: flex-end; align-items: flex-end; }
.chat-bubble { margin: 0; padding: .7rem 1rem; border-radius: 18px 18px 18px 4px; background: var(--surface); border: 1px solid var(--line); line-height: 1.5; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.chat-user .chat-bubble { border-radius: 18px 18px 4px 18px; background: var(--primary); border-color: var(--primary); color: #fff; }
@media (prefers-color-scheme: dark) { .chat-user .chat-bubble { color: #1a0f0b; } }
.chat-example { color: var(--text-soft); font-size: .92rem; }
.chat-replies { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .15rem; }
.chat-replies .chip { min-height: 44px; cursor: pointer; }
.chat-link { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.chat-typing .chat-bubble { display: inline-flex; gap: .3rem; padding: .85rem 1rem; }
.chat-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--text-soft); opacity: .45; animation: chat-blink 1.2s infinite ease-in-out; }
.chat-dot:nth-child(2) { animation-delay: .2s; }
.chat-dot:nth-child(3) { animation-delay: .4s; }
@keyframes chat-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-dot { animation: none; opacity: .6; } }
.card .chat-composer { flex-direction: row; display: flex; align-items: flex-end; gap: .6rem; padding: var(--space-2) var(--space-3); border-top: 1px solid var(--line); background: var(--surface); }
.card .chat-composer label { margin: 0; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat-composer textarea { flex: 1 1 auto; min-height: 48px; max-height: 150px; resize: none; border-radius: 24px; padding: .75rem 1.1rem; line-height: 1.4; }
.card .chat-composer .btn { margin: 0; min-height: 48px; border-radius: 24px; }
.chat-meta { margin: 0; padding: .4rem var(--space-3) 0; }
.chat .actions-row.chat-meta { padding-bottom: var(--space-2); }
@media (max-width: 640px) { .chat-msg { max-width: 94%; } .chat-log { padding: var(--space-2); } }
.chat-privacy summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--text-soft); font-size: .9rem; }
.chat-privacy p { margin: 0 0 .4rem; }
@media (max-width: 640px) {
  /* Mobile : le dialogue passe avant tout le reste (peu de texte au-dessus, composeur visible sans défiler). */
  .hero-home { padding-top: var(--space-2); }
  .hero-home .eyebrow, .hero-home .lead, .hero-deco { display: none; }
  .hero-home h1 { font-size: 1.75rem; margin-bottom: var(--space-2); }
  .chat-example, .chat-count { display: none; }
  .chat-log { min-height: 7rem; max-height: 46vh; }
  .chat-composer textarea { font-size: 1rem; padding: .65rem 1rem; }
  .chat .actions-row.chat-meta { gap: .5rem; }
  .chat .actions-row.chat-meta .btn { flex: 1 1 auto; min-height: 44px; padding: .5rem .8rem; font-size: .92rem; }
}
.chip-removable { min-height: 44px; padding: .45rem 1rem; cursor: pointer; border-color: var(--line); background: var(--surface); }
.search-grid-results { display: grid; gap: var(--space-2); margin: var(--space-2) 0; }
.suggestion-list { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.guided-why { margin: .6rem 0; }
.guided-excerpt { margin: .6rem 0; padding: .5rem .9rem; border-left: 3px solid var(--sage-300); color: var(--text-soft); font-size: .95rem; }
.guided-excerpt mark { background: color-mix(in srgb, var(--sage-300) 45%, transparent); color: inherit; padding: 0 .1em; border-radius: 3px; }
#guided-results-title:focus { outline: none; }

/* Animations douces ------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: rise .6s var(--ease) both; }
.reveal-2 { animation-delay: .08s; }
.reveal-3 { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Responsive ------------------------------------------------------------------ */
@media (max-width: 1200px) {
  .nav-wrap { flex-wrap: wrap; gap: 0 var(--space-2); }
  .js .nav-toggle { display: inline-flex; }
  .js .nav-links, .js .nav-actions { display: none; width: 100%; }
  .js .site-header.is-open .nav-links { display: flex; flex-direction: column; gap: .1rem; padding-top: .5rem; }
  .js .site-header.is-open .nav-actions { display: flex; flex-wrap: wrap; padding: .6rem 0 1rem; border-top: 1px solid var(--line); margin-top: .5rem; }
  .js .nav-links a { padding: .8rem .5rem; font-size: 1.05rem; border-radius: var(--radius-sm); }
  .no-js-fallback, html:not(.js) .nav-links { margin-left: 0; width: 100%; flex-wrap: wrap; }
  html:not(.js) .nav-wrap { padding: .5rem 0; }
  html:not(.js) .nav-actions { width: 100%; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .grid-3, .grid-2, .search-layout, .profile-layout { grid-template-columns: 1fr; }
  .grid-3 { gap: var(--space-2); }
  .profile-layout { grid-template-areas: "aside" "main"; }
  .profile-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .filters { position: static; max-height: none; }

}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .search-bar { grid-template-columns: 1fr; border-radius: var(--radius-md); padding: .8rem; gap: .2rem; }
  .search-bar .field { padding: .5rem .6rem; }
  .search-bar .field + .field { border-left: 0; border-top: 1px solid var(--line); }
  .search-bar .btn { margin-top: .5rem; }
  .profile-hero { padding: var(--space-3); }
  .profile-hero .card-header { flex-direction: column; align-items: flex-start; }
  .cta-band { padding: var(--space-4) var(--space-2); }
  .hero-home { text-align: left; }
  .hero-home h1, .hero-home .lead { margin-left: 0; margin-right: 0; }
  .hero-trust, .chip-row-center { justify-content: flex-start; }
  .actions-row .btn { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .site-footer, .booking-card, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
}

.trust-list { margin: .8rem 0 1rem; padding: 0; list-style: none; display: grid; gap: .5rem; color: var(--text-soft); font-size: .95rem; }
.trust-list li { position: relative; padding-left: 1.4rem; }
.trust-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--sage-600); }

/* Page « Rejoindre » : logo et présentation CabinetZen (le logo a un texte sombre : il reste sur fond clair, même en mode sombre) */
.logo-plate { display: block; background: #fff; border-radius: var(--radius-sm); padding: .6rem 1rem; margin-bottom: 1rem; }
.logo-plate img { display: block; height: 3rem; width: auto; max-width: 100%; margin: 0 auto; }
.chip-list { list-style: none; padding: 0; margin: 0; }
.feature-list { padding-left: 1.2rem; }
.feature-list li { margin: .3rem 0; }

/* Recherche : assistant en langage naturel */
.search-assistant { margin-bottom: var(--space-3); }
.assistant-where { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: .75rem; align-items: end; margin-top: var(--space-2); }
.card form .assistant-where label { display: block; margin-bottom: .3rem; font-weight: 600; font-size: .92rem;  margin-top: 0; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-top: var(--space-3); }
@media (max-width: 900px) { .assistant-where { grid-template-columns: 1fr; } }
.assistant-where.assistant-what { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .assistant-where.assistant-what { grid-template-columns: 1fr; } }
.assistant-where input, .assistant-where select { height: 3rem; box-sizing: border-box; width: 100%; }
.assistant-where .btn { height: 3rem; }

.service-list { list-style: none; margin: 0; padding: 0; }
.service-list li { display: flex; justify-content: space-between; gap: var(--space-3); padding: .6rem 0; border-top: 1px solid var(--line); }
.service-list li:first-child { border-top: 0; }
.service-list strong { white-space: nowrap; }

/* Fil d'Ariane (fiche praticien) : cibles de 44 px, séparateur décoratif. */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0 .5rem; margin: 0 0 var(--space-2); padding: 0; font-size: .9rem; color: var(--text-soft); }
.breadcrumb li + li::before { content: "›"; margin-right: .5rem; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-soft); }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* Recadrage de la photo de profil ------------------------------------------ */
.photo-cropper { margin: .8rem 0 0; }
.photo-cropper[hidden] { display: none; }
.photo-cropper-stage {
  --stage: min(300px, 100%); position: relative; width: var(--stage); aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--surface-soft); border: 1px solid var(--line);
  cursor: grab; touch-action: none; user-select: none;
}
.photo-cropper-stage:active { cursor: grabbing; }
.photo-cropper-stage img { position: absolute; top: 0; left: 0; max-width: none; width: auto; height: auto; transform-origin: 0 0; pointer-events: none; }
.photo-cropper-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px color-mix(in srgb, var(--ink-900) 55%, transparent); pointer-events: none; }
.photo-cropper input[type="range"] { min-height: 44px; padding: 0; accent-color: var(--sage-600); max-width: 300px; }
.photo-cropper .btn { margin-top: .4rem; align-self: flex-start; }
