/* ==========================================================================
   KaayFejju — Design System
   Vitrine premium santé. HTML/CSS/JS pur, aucune dépendance de build.
   Sommaire :
   1. Tokens (couleurs, typo, espacements, rayons, ombres)
   2. Base & reset
   3. Layout (container, grid, sections)
   4. Composants (boutons, badges, cards, inputs, chips…)
   5. Header / Navbar
   6. Footer
   7. Landing (hero, services, steps, stats, avis, partenaires, FAQ)
   8. Recherche médecins (filtres, cartes, skeleton, empty)
   9. Fiche médecin
   10. Utilitaires & animations
   11. Responsive
   ========================================================================== */

/* 1. ---------------------------------------------------------------- Tokens */
:root {
  /* Bleu médical — couleur primaire */
  --blue-50:  #eef4ff;
  --blue-100: #dbe7ff;
  --blue-200: #bcd2ff;
  --blue-300: #8fb4ff;
  --blue-400: #5b8bfa;
  --blue-500: #2f6bed;
  --blue-600: #1d54e0;
  --blue-700: #1743bd;
  --blue-800: #173a97;
  --blue-900: #172f74;

  /* Bleu turquoise — accent frais */
  --teal-50:  #ecfeff;
  --teal-100: #cff8fb;
  --teal-300: #67e3ee;
  --teal-400: #22cddf;
  --teal-500: #06b3c9;
  --teal-600: #068da2;

  /* Vert santé — accent positif */
  --green-50:  #edfcf3;
  --green-100: #d2f8e0;
  --green-400: #34d399;
  --green-500: #10b981;
  --green-600: #059669;
  --green-700: #047857;

  /* Touches secondaires (douces, jamais agressives) */
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --coral-100: #ffe4e0;
  --coral-500: #fb7185;
  --violet-100:#ede9fe;
  --violet-500:#8b5cf6;

  /* Neutres */
  --ink:      #0e1726;
  --ink-soft: #33415c;
  --muted:    #64748b;
  --faint:    #94a3b8;
  --line:     #e7ecf3;
  --line-soft:#eef2f7;
  --bg:       #f7f9fc;
  --bg-tint:  #f1f6ff;
  --card:     #ffffff;
  --white:    #ffffff;

  /* Sémantique */
  --primary:      var(--blue-600);
  --primary-ink:  var(--blue-700);
  --primary-tint: var(--blue-50);

  /* Typo */
  --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Rayons */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Ombres douces */
  --sh-xs: 0 1px 2px rgba(16, 30, 54, 0.06);
  --sh-sm: 0 4px 14px rgba(16, 30, 54, 0.06);
  --sh-md: 0 12px 30px rgba(16, 30, 54, 0.08);
  --sh-lg: 0 24px 60px rgba(16, 30, 54, 0.12);
  --sh-blue: 0 14px 30px rgba(29, 84, 224, 0.28);

  /* Espacements */
  --space-section: 96px;

  /* Transition */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 2. ------------------------------------------------------------ Base & reset */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
}

p { margin: 0; }

a { color: var(--primary-ink); text-decoration: none; transition: color 0.18s var(--ease); }
a:hover { color: var(--blue-800); }

img, svg { max-width: 100%; display: block; }

button { font-family: inherit; }

::selection { background: var(--blue-100); color: var(--blue-900); }

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

/* 3. ----------------------------------------------------------------- Layout */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; }

.section { padding: var(--space-section) 0; }
.section-tint { background: linear-gradient(180deg, var(--bg-tint), #fff); }
.section-white { background: #fff; }

.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head);
  font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 14px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; border-radius: 2px;
  background: var(--primary);
}
.section-head.center .eyebrow { justify-content: center; }
h2.section-title { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.section-sub { color: var(--muted); font-size: 18px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 4. ------------------------------------------------------------- Composants */
/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-weight: 700; font-size: 15px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease),
              box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--sh-blue); }
.btn-primary:hover { background: var(--blue-700); color: #fff; box-shadow: 0 18px 38px rgba(29,84,224,0.34); }

.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--sh-xs); }
.btn-ghost:hover { border-color: var(--blue-200); color: var(--primary-ink); background: var(--blue-50); }

.btn-soft { background: var(--blue-50); color: var(--primary-ink); }
.btn-soft:hover { background: var(--blue-100); color: var(--blue-800); }

.btn-white { background: #fff; color: var(--primary-ink); }
.btn-white:hover { background: var(--blue-50); color: var(--blue-800); }

.btn-lg { padding: 16px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* Badges & chips */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--r-pill);
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  background: var(--blue-50); color: var(--primary-ink); border: 1px solid var(--blue-100);
}
.badge-green { background: var(--green-50); color: var(--green-700); border-color: var(--green-100); }
.badge-teal  { background: var(--teal-50); color: var(--teal-600); border-color: var(--teal-100); }
.badge-amber { background: var(--amber-100); color: #b45309; border-color: #fde68a; }
.badge-dot::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.badge-live::before { background: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); animation: pulse 1.8s infinite; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  background: var(--bg); border: 1px solid var(--line);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.card-pad { padding: 28px; }

/* Inputs */
.field { position: relative; }
.field .field-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--faint); pointer-events: none;
}
.input, .select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: #fff;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field .input { padding-left: 42px; }
.input::placeholder { color: var(--faint); }
.input:focus, .select:focus {
  outline: none; border-color: var(--blue-400);
  box-shadow: 0 0 0 4px var(--blue-50);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px;
}
.label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 7px; font-family: var(--font-head); }

/* Avatar */
.avatar {
  border-radius: 50%; object-fit: cover; background: var(--blue-50);
  border: 3px solid #fff; box-shadow: var(--sh-sm);
}

/* Rating stars */
.stars { display: inline-flex; gap: 2px; color: var(--amber-500); }
.stars svg { width: 15px; height: 15px; }

/* Divider */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* 5. --------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--sh-xs); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px;
}
.logo { display: inline-flex; align-items: center; }
.logo img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--ink-soft); font-weight: 600; font-size: 15px;
  padding: 9px 14px; border-radius: var(--r-sm);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-links a:hover { color: var(--primary-ink); background: var(--blue-50); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

/* 6. --------------------------------------------------------------- Footer */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 72px 0 32px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-footer .foot-brand img { height: 34px; margin-bottom: 18px; }
.site-footer .foot-brand p { color: #94a3b8; max-width: 300px; font-size: 15px; }
.foot-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.foot-col a { display: block; color: #94a3b8; padding: 6px 0; font-size: 15px; font-weight: 500; }
.foot-col a:hover { color: #fff; }
.foot-social { display: flex; gap: 12px; margin-top: 20px; }
.foot-social a {
  width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: rgba(255,255,255,0.06); color: #cbd5e1; padding: 0;
}
.foot-social a:hover { background: var(--primary); color: #fff; }
.foot-social svg { width: 18px; height: 18px; }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 28px; color: #64748b; font-size: 14px;
}
.foot-badges { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-badges span { display: inline-flex; align-items: center; gap: 7px; color: #94a3b8; }
.foot-badges svg { width: 15px; height: 15px; color: var(--green-400); }

/* 7. --------------------------------------------------------------- Landing */
/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 88% -8%, var(--blue-100), transparent 60%),
    radial-gradient(700px 500px at 4% 8%, var(--teal-50), transparent 55%),
    linear-gradient(180deg, #fff, var(--bg));
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(36px, 5.2vw, 58px); line-height: 1.06; margin: 20px 0 20px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--blue-600), var(--teal-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 19px; color: var(--ink-soft); max-width: 540px; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 34px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-trust .avatars { display: flex; }
.hero-trust .avatars img {
  width: 42px; height: 42px; border-radius: 50%; border: 3px solid #fff; margin-left: -12px;
  box-shadow: var(--sh-xs); object-fit: cover;
}
.hero-trust .avatars img:first-child { margin-left: 0; }
.hero-trust .trust-text { font-size: 14px; color: var(--muted); }
.hero-trust .trust-text strong { color: var(--ink); }

/* Hero visual */
.hero-visual { position: relative; }
.hero-visual .hero-art { width: 100%; border-radius: var(--r-xl); }
.hero-float {
  position: absolute; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.hero-float .fico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
}
.hero-float .fico svg { width: 20px; height: 20px; }
.hero-float .ft { font-family: var(--font-head); font-weight: 700; font-size: 14px; line-height: 1.2; }
.hero-float .fs { font-size: 12px; color: var(--muted); }
.hero-float.f1 { top: 26px; left: -22px; }
.hero-float.f2 { bottom: 34px; right: -18px; }
.hero-float.f3 { bottom: -18px; left: 40px; }

/* Logos bar / partenaires strip */
.logos-strip { padding: 34px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.logos-strip .lbl { text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 22px; }
.logos-row { display: flex; align-items: center; justify-content: center; gap: 44px; flex-wrap: wrap; opacity: 0.85; }
.logos-row .plogo { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-family: var(--font-head); font-weight: 800; font-size: 19px; }
.logos-row .plogo svg { width: 26px; height: 26px; color: var(--blue-400); }

/* Feature / services cards */
.feature-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px; box-shadow: var(--sh-sm);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
  overflow: hidden;
}
.feature-card::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--teal-400));
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: var(--blue-100); }
.feature-card:hover::after { transform: scaleX(1); }
.feature-ico {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--blue-50); color: var(--primary);
  transition: transform 0.3s var(--ease);
}
.feature-card:hover .feature-ico { transform: scale(1.06) rotate(-3deg); }
.feature-ico svg { width: 26px; height: 26px; }
.feature-ico.teal  { background: var(--teal-50); color: var(--teal-600); }
.feature-ico.green { background: var(--green-50); color: var(--green-600); }
.feature-ico.amber { background: var(--amber-100); color: var(--amber-500); }
.feature-ico.violet{ background: var(--violet-100); color: var(--violet-500); }
.feature-ico.coral { background: var(--coral-100); color: var(--coral-500); }
.feature-card h3 { font-size: 19px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 15px; }
.feature-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--primary);
}
.feature-link svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.feature-card:hover .feature-link svg { transform: translateX(4px); }

/* Why — split with checklist */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.why-visual { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); }
.check-list { display: grid; gap: 18px; margin-top: 26px; }
.check-item { display: flex; gap: 14px; }
.check-item .ci-ico {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green-600);
}
.check-item .ci-ico svg { width: 17px; height: 17px; }
.check-item h4 { font-size: 16px; margin-bottom: 3px; }
.check-item p { color: var(--muted); font-size: 15px; }

/* Steps / comment ça marche */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px 26px; box-shadow: var(--sh-sm);
}
.step-num {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 18px; color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  box-shadow: var(--sh-blue); margin-bottom: 18px;
}
.step:nth-child(2) .step-num { background: linear-gradient(135deg, var(--teal-400), var(--teal-600)); box-shadow: 0 12px 26px rgba(6,141,162,0.3); }
.step:nth-child(3) .step-num { background: linear-gradient(135deg, var(--green-400), var(--green-600)); box-shadow: 0 12px 26px rgba(5,150,105,0.3); }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* Stats */
.stats-band {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600) 45%, var(--teal-600));
  border-radius: var(--r-xl); padding: 56px 44px; color: #fff; position: relative; overflow: hidden;
}
.stats-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 10% -20%, rgba(255,255,255,0.14), transparent 60%);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; position: relative; }
.stat { text-align: center; }
.stat .num { font-family: var(--font-head); font-weight: 800; font-size: clamp(32px, 4vw, 46px); line-height: 1; }
.stat .lbl { margin-top: 10px; color: rgba(255,255,255,0.82); font-size: 15px; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,0.16); }

/* Testimonials */
.testi-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--sh-sm); display: flex; flex-direction: column; gap: 16px;
}
.testi-card .quote { color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.testi-card .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testi-card .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.testi-card .who .n { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.testi-card .who .r { color: var(--muted); font-size: 13px; }

/* FAQ */
.faq { display: grid; gap: 14px; max-width: 820px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease); }
.faq-item.open { border-color: var(--blue-200); box-shadow: var(--sh-sm); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink);
}
.faq-q .faq-plus { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--blue-50); color: var(--primary); display: grid; place-items: center; transition: transform 0.25s var(--ease), background 0.2s; }
.faq-q .faq-plus svg { width: 16px; height: 16px; }
.faq-item.open .faq-plus { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease); }
.faq-a-inner { padding: 0 22px 22px; color: var(--muted); font-size: 15px; }

/* CTA band */
.cta-final {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600) 50%, var(--teal-600));
  border-radius: var(--r-xl); padding: 64px 48px; text-align: center; color: #fff; position: relative; overflow: hidden;
}
.cta-final::before { content: ''; position: absolute; inset: 0; background: radial-gradient(700px 340px at 50% -30%, rgba(255,255,255,0.18), transparent 60%); }
.cta-final h2 { color: #fff; font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; position: relative; }
.cta-final p { color: rgba(255,255,255,0.9); font-size: 18px; max-width: 560px; margin: 0 auto 28px; position: relative; }
.cta-final .hero-actions { justify-content: center; position: relative; }

/* 8. -------------------------------------------------------- Recherche médecins */
.search-hero { padding: 56px 0 34px; background: linear-gradient(180deg, var(--bg-tint), var(--bg)); }
.search-hero h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 12px; }
.search-hero p { color: var(--muted); font-size: 18px; max-width: 620px; }

.filters-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-md); padding: 22px; margin-top: 26px;
}
.filters-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; }
.filters-adv {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 0; max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.32s var(--ease), opacity 0.25s var(--ease), margin-top 0.25s var(--ease);
}
.filters-adv.open { max-height: 320px; opacity: 1; margin-top: 18px; }
.filters-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; gap: 12px; }
.filters-toggle {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--primary);
}
.filters-toggle svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.filters-toggle.open svg { transform: rotate(180deg); }
.result-count { color: var(--muted); font-size: 15px; }
.result-count strong { color: var(--ink); }

/* Segmented control (video/physique) */
.segment { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; gap: 4px; }
.segment button {
  border: 0; background: none; cursor: pointer; padding: 8px 14px; border-radius: var(--r-pill);
  font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px; transition: all 0.18s var(--ease);
}
.segment button svg { width: 15px; height: 15px; }
.segment button.active { background: #fff; color: var(--primary-ink); box-shadow: var(--sh-xs); }

/* Doctor cards grid */
.doctors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 30px; }
.doc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease), border-color 0.24s var(--ease);
}
.doc-card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: var(--blue-100); }
.doc-top { position: relative; padding: 22px 22px 0; display: flex; gap: 16px; }
.doc-photo {
  width: 76px; height: 76px; border-radius: 20px; object-fit: cover; flex: none;
  background: var(--blue-50); border: 1px solid var(--line);
}
.doc-id { min-width: 0; padding-right: 6px; }
.doc-id h3 { font-size: 18px; margin-bottom: 3px; line-height: 1.2; }
.doc-id .spec { color: var(--primary); font-weight: 700; font-size: 14px; font-family: var(--font-head); }
.doc-id .rating { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 13px; color: var(--muted); }
.doc-id .rating strong { color: var(--ink); font-family: var(--font-head); }
.doc-avail {
  position: absolute; top: 22px; right: 22px;
}
.doc-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 22px 4px; }
.doc-meta { padding: 8px 22px 0; display: grid; gap: 8px; }
.doc-meta .row { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 14px; }
.doc-meta .row svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.doc-price {
  margin: 16px 22px 0; padding: 14px 16px; background: var(--blue-50); border-radius: var(--r-md);
  display: flex; align-items: baseline; justify-content: space-between;
}
.doc-price .p-lbl { font-size: 13px; color: var(--muted); }
.doc-price .p-val { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--primary-ink); }
.doc-price .p-val small { font-weight: 600; font-size: 12px; color: var(--muted); }
.doc-actions { display: flex; gap: 10px; padding: 18px 22px 22px; margin-top: auto; }
.doc-actions .btn { flex: 1; padding: 11px 14px; font-size: 14px; }

/* Skeleton */
.skel-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.skel { background: linear-gradient(90deg, #eef2f7 25%, #f6f9fc 37%, #eef2f7 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
.skel-row { display: flex; gap: 16px; }
.skel-avatar { width: 76px; height: 76px; border-radius: 20px; flex: none; }
.skel-line { height: 12px; margin-bottom: 10px; }

/* Empty / error state */
.state-block { text-align: center; padding: 70px 20px; }
.state-block .state-ico { width: 76px; height: 76px; border-radius: 24px; background: var(--blue-50); color: var(--primary); display: grid; place-items: center; margin: 0 auto 20px; }
.state-block .state-ico svg { width: 34px; height: 34px; }
.state-block h3 { font-size: 20px; margin-bottom: 8px; }
.state-block p { color: var(--muted); max-width: 420px; margin: 0 auto; }
.loading { text-align: center; padding: 40px; color: var(--muted); }

/* 9. --------------------------------------------------------- Fiche médecin */
.profile-hero { background: linear-gradient(180deg, var(--bg-tint), var(--bg)); padding: 26px 0 0; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--ink-soft); padding: 8px 0; }
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--primary-ink); }

.profile-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--sh-md); padding: 32px; margin-top: 16px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
}
.profile-portrait { width: 132px; height: 132px; border-radius: 28px; object-fit: cover; background: var(--blue-50); border: 1px solid var(--line); }
.profile-id h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 6px; }
.profile-id .spec { color: var(--primary); font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.profile-id .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.profile-id .rating-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.profile-id .rating-row strong { color: var(--ink); font-family: var(--font-head); }
.profile-cta { display: flex; flex-direction: column; gap: 10px; min-width: 210px; }
.profile-cta .price-box { text-align: center; padding: 12px; background: var(--blue-50); border-radius: var(--r-md); margin-bottom: 4px; }
.profile-cta .price-box .pv { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--primary-ink); }
.profile-cta .price-box .pl { font-size: 12px; color: var(--muted); }

.profile-body { display: grid; grid-template-columns: 1fr 340px; gap: 28px; margin: 32px 0 0; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 28px; }
.panel + .panel { margin-top: 22px; }
.panel h2 { font-size: 20px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.panel h2 svg { width: 20px; height: 20px; color: var(--primary); }
.panel p { color: var(--ink-soft); }

.info-list { display: grid; gap: 2px; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.info-row:last-child { border-bottom: 0; }
.info-row .k { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.info-row .k svg { width: 17px; height: 17px; color: var(--faint); }
.info-row .v { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink); text-align: right; }

.price-list { display: grid; gap: 12px; }
.price-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); }
.price-item.hot { border-color: var(--blue-200); background: var(--blue-50); }
.price-item { gap: 12px; }
.price-item .pi-k { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.price-item .pi-k svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.price-item .pi-v { font-family: var(--font-head); font-weight: 800; font-size: 16px; color: var(--ink); white-space: nowrap; flex: none; }

.sticky-side { position: sticky; top: 92px; }

/* 10. --------------------------------------------------- Utilitaires & anims */
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.hidden { display: none !important; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); } 70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.hero-float.f1 { animation: floaty 5s ease-in-out infinite; }
.hero-float.f2 { animation: floaty 6s ease-in-out infinite 0.6s; }
.hero-float.f3 { animation: floaty 5.5s ease-in-out infinite 1.1s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 11. --------------------------------------------------------------- Responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 520px; margin: 0 auto; }
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .why-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat + .stat { border-left: 0; }
  .profile-body { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
}

@media (max-width: 760px) {
  :root { --space-section: 68px; }
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 72px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: 14px 24px 20px; box-shadow: var(--sh-md);
  }
  .nav.open .nav-links a { padding: 12px 14px; font-size: 16px; }
  .grid-3, .grid-2, .doctors-grid, .steps { grid-template-columns: 1fr; }
  .filters-main { grid-template-columns: 1fr; }
  .filters-adv.open { grid-template-columns: 1fr 1fr; max-height: 520px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .profile-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .profile-id .chips, .profile-id .rating-row { justify-content: center; }
  .profile-cta { width: 100%; }
  .hero-float { display: none; }
  .stats-band, .cta-final { padding: 40px 24px; }
}

@media (max-width: 440px) {
  .grid-4, .filters-adv.open { grid-template-columns: 1fr; }
  .doc-actions { flex-direction: column; }
}
