/* ═══════════════════════════════════════════════════════════
   PSB — Funnel de qualification, pop-up et CTA d'article
   Direction : Santé Bornes — Officine hospitalière
   ═══════════════════════════════════════════════════════════ */

.psb-funnel,
.psb-pop,
.psb-inline-cta {
  --psb-ink:      #0D1F3C;
  --psb-ink-soft: #3A4A5E;
  --psb-muted:    #5E6E84;
  --psb-accent:   #0F6E76;
  --psb-accent-l: #2AABB5;
  --psb-pale:     #E8F7F8;
  --psb-surface:  #F5F7FA;
  --psb-line:     rgba(13,31,60,.10);
  --psb-line-med: rgba(13,31,60,.18);
  --psb-r-sm:     9px;
  --psb-r-md:     12px;
  --psb-r-lg:     20px;
  --psb-t:        .22s ease;
  font-family: 'DM Sans', sans-serif;
  color: var(--psb-ink);
}

/* ── Bouton commun ───────────────────────────────────────── */
.psb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--psb-accent-l); color: #fff;
  padding: 14px 28px; border: none; border-radius: var(--psb-r-sm);
  font-family: inherit; font-weight: 600; font-size: .9375rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background var(--psb-t), transform var(--psb-t), box-shadow var(--psb-t);
}
.psb-btn:hover,
.psb-btn:focus-visible {
  background: var(--psb-accent); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(15,110,118,.28);
}
.psb-btn--wide { width: 100%; padding: 16px 28px; }

.psb-linkbtn {
  background: none; border: none; padding: 0;
  font-family: inherit; font-size: .875rem; color: var(--psb-muted);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  transition: color var(--psb-t);
}
.psb-linkbtn:hover { color: var(--psb-accent); }

:where(.psb-funnel, .psb-pop) :focus-visible {
  outline: 2px solid var(--psb-accent-l);
  outline-offset: 3px;
}

/* ═══ FUNNEL ═════════════════════════════════════════════ */
.psb-funnel {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--psb-line);
  border-radius: var(--psb-r-lg);
  box-shadow: 0 16px 48px rgba(13,31,60,.08);
  overflow: hidden;
}

.psb-funnel__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 18px 32px;
  background: var(--psb-ink);
}
.psb-funnel__promise {
  margin: 0;
  font-size: .9375rem; font-weight: 500;
  color: rgba(255,255,255,.92);
}
.psb-funnel__contacts {
  display: flex; align-items: baseline; gap: 10px 22px; flex-wrap: wrap;
  margin: 0;
}
.psb-funnel__tel,
.psb-funnel__mail {
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.35);
  transition: color var(--psb-t), border-color var(--psb-t);
}
.psb-funnel__tel {
  font-size: 1rem; font-weight: 600; white-space: nowrap;
}
.psb-funnel__mail {
  font-size: .875rem; font-weight: 400;
  color: rgba(255,255,255,.82);
  word-break: break-word;
}
.psb-funnel__tel:hover,
.psb-funnel__mail:hover { color: var(--psb-pale); border-color: var(--psb-pale); }

.psb-funnel__progress {
  display: flex; gap: 4px;
  padding: 0 32px; margin-top: 28px;
}
.psb-funnel__progress span {
  flex: 1; height: 3px;
  background: var(--psb-line);
  border-radius: 2px;
  transition: background var(--psb-t);
}
.psb-funnel__progress span.is-done { background: var(--psb-accent-l); }

.psb-funnel__body { padding: 0 32px 40px; }

/* ── Étapes ──────────────────────────────────────────────── */
.psb-step { display: none; padding-top: 28px; }
.psb-step.is-active { display: block; animation: psb-in .22s ease both; }
@keyframes psb-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.psb-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0 0 14px;
  font-family: inherit; font-size: .8125rem; color: var(--psb-muted);
  cursor: pointer; transition: color var(--psb-t);
}
.psb-back::before { content: '←'; font-size: .9375rem; }
.psb-back:hover { color: var(--psb-accent); }

.psb-q {
  margin: 0 0 6px;
  font-family: 'Playfair Display', serif;
  font-weight: 600; font-size: 1.75rem; line-height: 1.15;
  color: var(--psb-ink);
}
.psb-q__help {
  margin: 0 0 24px;
  font-size: .9375rem; line-height: 1.6; color: var(--psb-muted);
  max-width: 46ch;
}
.psb-q + .psb-choices,
.psb-q + .psb-chips,
.psb-q + .psb-fields { margin-top: 24px; }

/* ── Cartes de choix ─────────────────────────────────────── */
.psb-choices { display: grid; gap: 12px; }
.psb-choices--2 { grid-template-columns: repeat(2, 1fr); }
.psb-choices--4 { grid-template-columns: repeat(2, 1fr); }

.psb-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--psb-line-med);
  border-radius: var(--psb-r-md);
  font-family: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--psb-t), background var(--psb-t), transform var(--psb-t);
}
.psb-choice:hover {
  border-color: var(--psb-accent-l);
  background: var(--psb-pale);
  transform: translateY(-2px);
}
.psb-choice svg { width: 26px; height: 26px; color: var(--psb-accent); }
.psb-choice__title {
  font-size: 1.0625rem; font-weight: 600; color: var(--psb-ink);
}
.psb-choice__sub {
  font-size: .8125rem; line-height: 1.5; color: var(--psb-muted);
}
.psb-choice--compact { padding: 20px; justify-content: center; }
.psb-choice--num { padding: 24px 20px; align-items: center; text-align: center; }
.psb-choice--num .psb-choice__title { font-size: 1.125rem; }

/* ── Pastilles ───────────────────────────────────────────── */
.psb-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.psb-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--psb-line-med);
  border-radius: var(--psb-r-sm);
  font-family: inherit; font-size: .9375rem; color: var(--psb-ink);
  cursor: pointer;
  transition: border-color var(--psb-t), background var(--psb-t), color var(--psb-t);
}
.psb-chip b { font-weight: 600; color: var(--psb-accent); font-variant-numeric: tabular-nums; }
.psb-chip:hover { border-color: var(--psb-accent-l); background: var(--psb-pale); }
.psb-chip--other { color: var(--psb-muted); }
.psb-chip.is-picked { border-color: var(--psb-accent); background: var(--psb-pale); }

/* ── Formulaire ──────────────────────────────────────────── */
.psb-fields { display: grid; gap: 16px; }
.psb-field { display: grid; gap: 6px; }
.psb-field > span {
  font-size: .8125rem; font-weight: 500; color: var(--psb-ink-soft);
  letter-spacing: .01em;
}
.psb-field input {
  width: 100%; padding: 13px 15px;
  background: #fff;
  border: 1px solid var(--psb-line-med);
  border-radius: var(--psb-r-sm);
  font-family: inherit; font-size: 1rem; color: var(--psb-ink);
  transition: border-color var(--psb-t), box-shadow var(--psb-t);
}
.psb-field input:focus {
  outline: none;
  border-color: var(--psb-accent-l);
  box-shadow: 0 0 0 3px rgba(42,171,181,.18);
}
.psb-field input.is-invalid { border-color: #A6323C; }
.psb-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.psb-hint { margin: -8px 0 0; font-size: .8125rem; color: var(--psb-muted); }

.psb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.psb-error {
  margin: 0; padding: 12px 15px;
  background: #FBEEEF;
  border-left: 3px solid #A6323C;
  border-radius: 0 var(--psb-r-sm) var(--psb-r-sm) 0;
  font-size: .875rem; color: #7E2630;
}

.psb-legal {
  margin: 0; font-size: .75rem; line-height: 1.6; color: var(--psb-muted);
}
.psb-legal a { color: var(--psb-accent); }

/* ── Hors zone / confirmation ────────────────────────────── */
.psb-note {
  margin: 0 0 14px; max-width: 56ch;
  font-size: .9375rem; line-height: 1.7; color: var(--psb-ink-soft);
}
.psb-note a { color: var(--psb-accent); font-weight: 600; }
.psb-outzone-actions {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 24px;
}

.psb-step--done .psb-q { color: var(--psb-accent); }
.psb-bonus {
  margin-top: 28px; padding-top: 24px;
  border-top: 1px solid var(--psb-line);
}
.psb-bonus__q {
  margin: 0 0 14px;
  font-size: .9375rem; font-weight: 500; color: var(--psb-ink);
}
.psb-bonus__thanks {
  margin-top: 28px; padding-top: 24px;
  border-top: 1px solid var(--psb-line);
  font-size: .9375rem; color: var(--psb-muted);
}

/* ═══ POP-UP ═════════════════════════════════════════════ */
.psb-pop {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(13,31,60,.55);
  opacity: 0;
  transition: opacity var(--psb-t);
}
.psb-pop.is-open { opacity: 1; }
.psb-pop[hidden] { display: none; }

.psb-pop__panel {
  position: relative;
  width: 100%; max-width: 480px;
  padding: 40px 36px 32px;
  background: #fff;
  border-radius: var(--psb-r-lg);
  box-shadow: 0 24px 64px rgba(13,31,60,.28);
  text-align: center;
  transform: translateY(10px);
  transition: transform var(--psb-t);
}
.psb-pop.is-open .psb-pop__panel { transform: none; }

.psb-pop__close {
  position: absolute; top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: none; border: none; border-radius: 50%;
  color: var(--psb-muted); cursor: pointer;
  transition: background var(--psb-t), color var(--psb-t);
}
.psb-pop__close svg { width: 18px; height: 18px; }
.psb-pop__close:hover { background: var(--psb-surface); color: var(--psb-ink); }

.psb-pop__kicker {
  margin: 0 0 12px;
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--psb-accent);
}
.psb-pop__title {
  margin: 0 0 12px;
  font-family: 'Playfair Display', serif;
  font-weight: 600; font-size: 1.5rem; line-height: 1.2;
  color: var(--psb-ink);
}
.psb-pop__text {
  margin: 0 0 24px;
  font-size: .9375rem; line-height: 1.65; color: var(--psb-muted);
}
.psb-pop .psb-btn { width: 100%; }
.psb-pop .psb-linkbtn { margin-top: 16px; }

/* ═══ CTA FIN D'ARTICLE ══════════════════════════════════ */
.psb-inline-cta {
  margin: 48px 0 8px;
  padding: 32px 34px;
  background: var(--psb-surface);
  border-left: 3px solid var(--psb-accent-l);
  border-radius: 0 var(--psb-r-md) var(--psb-r-md) 0;
}
.psb-inline-cta__kicker {
  margin: 0 0 10px;
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--psb-accent);
}
.psb-inline-cta__title {
  margin: 0 0 10px;
  font-family: 'Playfair Display', serif;
  font-weight: 600; font-size: 1.375rem; line-height: 1.2;
  color: var(--psb-ink);
}
.psb-inline-cta__text {
  margin: 0 0 22px; max-width: 60ch;
  font-size: .9375rem; line-height: 1.7; color: var(--psb-ink-soft);
}
.psb-inline-cta__actions {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin: 0;
}
.psb-inline-cta__tel {
  font-size: .875rem; color: var(--psb-muted); text-decoration: none;
  border-bottom: 1px solid var(--psb-line-med);
}
.psb-inline-cta__tel:hover { color: var(--psb-accent); border-color: var(--psb-accent); }

/* ═══ RESPONSIVE ═════════════════════════════════════════ */
@media (max-width: 860px) {
  .psb-funnel { border-radius: var(--psb-r-md); }
  .psb-funnel__bar { padding: 16px 20px; }
  .psb-funnel__promise { font-size: .875rem; }
  .psb-funnel__progress { padding: 0 20px; margin-top: 20px; }
  .psb-funnel__body { padding: 0 20px 32px; }
  .psb-q { font-size: 1.4375rem; }
  .psb-choices--2,
  .psb-choices--4 { grid-template-columns: 1fr; }
  .psb-field-row { grid-template-columns: 1fr; }
  .psb-inline-cta { padding: 26px 22px; }
  .psb-pop__panel { padding: 36px 24px 28px; }
  .psb-pop__title { font-size: 1.3125rem; }
}

/* ═══ MOUVEMENT RÉDUIT ═══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .psb-step.is-active { animation: none; }
  .psb-btn:hover,
  .psb-choice:hover { transform: none; }
  .psb-pop,
  .psb-pop__panel { transition: none; }
  .psb-pop__panel { transform: none; }
}
