/* =========================================================
   Dr. Kaoutar Chibini — Centralized theme + RTL + UX polish
   Palette base : Navy #0A2540 / White / Light Grey #F5F7FA / Soft Red #C53030
   Theme accent variants:
     [data-theme="red"]  -> Soft Red  (default)
     [data-theme="gold"] -> Gold
   ========================================================= */

:root {
  --navy: #0A2540;
  --navy-deep: #061B30;
  --navy-light: #143656;
  --white: #FFFFFF;
  --ash: #F5F7FA;
  --ash-dark: #E6EAF1;
  --soft-red: #C53030;
  --soft-red-dark: #9B2424;
}

/* ---------- THEME: GOLD (locked) ---------- */
:root,
[data-theme="gold"] {
  --accent-rgb:        201 169 97;    /* #C9A961 */
  --accent-light-rgb:  229 199 123;   /* #E5C77B */
  --accent-deep-rgb:   168 137 63;    /* #A8893F */
  --accent-soft-rgb:   242 229 194;   /* #F2E5C2 */
  --accent:       rgb(var(--accent-rgb));
  --accent-light: rgb(var(--accent-light-rgb));
  --accent-deep:  rgb(var(--accent-deep-rgb));
  --accent-soft:  rgb(var(--accent-soft-rgb));
}

/* Base */
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* RTL: Arabic font swap */
html[dir="rtl"] body { font-family: "Noto Naskh Arabic","Inter",system-ui,sans-serif; }
html[dir="rtl"] .font-display { font-family: "Noto Naskh Arabic","Cormorant Garamond",serif; }
html[dir="rtl"] .italic { font-style: normal; }
html[dir="rtl"] .tracking-tight,
html[dir="rtl"] .tracking-wide,
html[dir="rtl"] .tracking-wider,
html[dir="rtl"] [class*="tracking-["] { letter-spacing: 0 !important; }

/* =========================================================
   Section primitives
   ========================================================= */
.section-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 600; padding: 0 1rem; position: relative;
}
.section-eyebrow::before,
.section-eyebrow::after {
  content: ""; display: inline-block; width: 28px; height: 1px;
  background: linear-gradient(to right, transparent, var(--accent));
}
.section-eyebrow::after { background: linear-gradient(to left, transparent, var(--accent)); }

.section-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.1;
  margin-top: 1rem;
  color: var(--navy);
  letter-spacing: -.01em;
}

.section-lead {
  margin-top: 1.25rem;
  color: rgba(10,37,64,.7);
  font-size: 1rem; line-height: 1.7;
  max-width: 42rem; margin-left: auto; margin-right: auto;
}
#international .section-lead, #hero .section-lead { color: rgba(245,247,250,.8); }

.accent-underline {
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  -webkit-background-clip: text; background-clip: text;
  color: transparent; font-style: italic; white-space: nowrap;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 9999px;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgb(var(--accent-rgb) / .55), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
[data-theme="gold"] .btn-primary { color: var(--navy-deep); box-shadow: 0 10px 30px -10px rgb(var(--accent-rgb) / .55), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 15px 35px -10px rgb(var(--accent-rgb) / .7); }
.btn-primary:active { transform: translateY(0); }

.btn-whatsapp {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 9999px;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  background: #25D366; color: #fff;
  box-shadow: 0 10px 30px -10px rgba(37,211,102,.55);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-whatsapp:hover { background: #1ebe58; transform: translateY(-1px); box-shadow: 0 15px 35px -10px rgba(37,211,102,.7); }

/* Icon button (header lang/theme) */
.icon-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem .6rem; border-radius: .65rem;
  border: 1px solid var(--ash-dark); background: #fff; color: var(--navy);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.icon-btn:hover { border-color: rgb(var(--accent-rgb) / .55); color: var(--accent-deep); background: rgb(var(--accent-rgb) / .04); }

.lang-option {
  width: 100%; display: flex; align-items: center; gap: .55rem;
  padding: .6rem .75rem; font-size: .85rem; color: var(--navy);
  background: #fff; border: 0; cursor: pointer; text-align: start;
}
.lang-option:hover { background: var(--ash); color: var(--accent-deep); }
.lang-option.active { background: rgb(var(--accent-rgb) / .08); color: var(--accent-deep); font-weight: 600; }

/* =========================================================
   Navigation
   ========================================================= */
.nav-link { position: relative; padding: .25rem 0; transition: color .2s ease; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
html[dir="rtl"] .nav-link::after { transform-origin: right; }
.nav-link:hover { color: var(--accent-deep); }
.nav-link:hover::after { transform: scaleX(1); }

.mobile-link { display: block; padding: .85rem .5rem; border-radius: .5rem; color: var(--navy); }
.mobile-link:hover { background: var(--ash); color: var(--accent-deep); }

#site-header.scrolled { box-shadow: 0 6px 20px -10px rgba(10,37,64,.18); }

/* =========================================================
   Hero
   ========================================================= */
.hero-pattern {
  background-image:
    radial-gradient(circle at 25% 25%, rgb(var(--accent-rgb) / .4) 0, transparent 1px),
    radial-gradient(circle at 75% 75%, rgb(var(--accent-rgb) / .3) 0, transparent 1px);
  background-size: 32px 32px, 32px 32px;
  background-position: 0 0, 16px 16px;
}

.trust-pill {
  padding: .75rem .5rem;
  border: 1px solid rgb(var(--accent-rgb) / .25);
  border-radius: .85rem;
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(6px);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.trust-pill:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--accent-rgb) / .55);
  background: rgba(255,255,255,.06);
}

/* =========================================================
   Cards
   ========================================================= */
.training-card {
  position: relative; padding: 1.75rem 1.5rem;
  background: #fff; border: 1px solid var(--ash-dark);
  border-radius: 1.25rem; text-align: center;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}
.training-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(var(--accent-rgb) / .08), transparent 60%);
  opacity: 0; transition: opacity .25s ease;
}
.training-card:hover {
  transform: translateY(-4px);
  border-color: rgb(var(--accent-rgb) / .45);
  box-shadow: 0 25px 45px -25px rgba(10,37,64,.25);
}
.training-card:hover::before { opacity: 1; }

.training-icon {
  position: relative; width: 52px; height: 52px; margin: 0 auto 1rem;
  border-radius: .85rem; display: grid; place-items: center;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / .15), rgb(var(--accent-rgb) / .05));
  color: var(--accent-deep);
  border: 1px solid rgb(var(--accent-rgb) / .25);
}

.expertise-card {
  position: relative; padding: 1.75rem 1.5rem;
  background: #fff; border-radius: 1.25rem;
  border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden; text-align: start;
}
.expertise-card::after {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-light));
  transform: scaleY(0); transform-origin: top; transition: transform .3s ease;
}
.expertise-card:hover {
  transform: translateY(-4px);
  border-color: rgb(var(--accent-rgb) / .3);
  box-shadow: 0 25px 50px -25px rgba(10,37,64,.25);
}
.expertise-card:hover::after { transform: scaleY(1); }

.expertise-icon {
  width: 48px; height: 48px; border-radius: .75rem;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(10,37,64,.08), rgba(10,37,64,.02));
  color: var(--navy);
  border: 1px solid rgba(10,37,64,.08);
  transition: background .25s ease, color .25s ease;
}
.expertise-card:hover .expertise-icon {
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / .18), rgb(var(--accent-rgb) / .05));
  color: var(--accent-deep);
}

.expertise-title {
  margin-top: 1rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600; font-size: 1.5rem; color: var(--navy); line-height: 1.2;
}
.expertise-desc { margin-top: .5rem; color: rgba(10,37,64,.65); font-size: .92rem; line-height: 1.6; }

/* =========================================================
   International
   ========================================================= */
.country-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border-radius: 9999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgb(var(--accent-rgb) / .25);
  color: rgba(245,247,250,.95);
  font-size: .875rem; font-weight: 500;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
  backdrop-filter: blur(8px);
}
.country-chip:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--accent-rgb) / .6);
  background: rgb(var(--accent-rgb) / .08);
}
.country-chip .fi { font-size: 1.05rem; line-height: 1; }

.intl-card {
  position: relative; padding: 1.75rem 1.5rem; border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid rgb(var(--accent-rgb) / .18);
  text-align: start; overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
  backdrop-filter: blur(8px);
}
.intl-card:hover {
  transform: translateY(-4px);
  border-color: rgb(var(--accent-rgb) / .5);
  background: linear-gradient(180deg, rgb(var(--accent-rgb) / .06), rgba(255,255,255,.02));
}
.intl-num {
  font-family: "Cormorant Garamond", serif;
  font-size: .85rem; letter-spacing: .15em;
  color: var(--accent); font-weight: 600;
}

/* =========================================================
   Contact
   ========================================================= */
.contact-card {
  display: block; padding: 1.5rem;
  background: #fff; border-radius: 1.25rem;
  border: 1px solid var(--ash-dark); text-align: center;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgb(var(--accent-rgb) / .45);
  box-shadow: 0 25px 45px -25px rgba(10,37,64,.2);
}
.contact-icon {
  width: 44px; height: 44px; border-radius: .75rem; margin: 0 auto;
  display: grid; place-items: center;
  background: rgb(var(--accent-rgb) / .12);
  color: var(--accent-deep);
}

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

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

/* =========================================================
   Hero portrait column (new layout: full-bleed right, flush to edge)
   ========================================================= */
.hero-portrait {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    radial-gradient(120% 90% at 50% 110%,
      rgb(var(--accent-rgb) / .18) 0%,
      rgb(var(--accent-rgb) / .05) 35%,
      transparent 70%);
}
.hero-portrait picture { display: block; width: 100%; height: 100%; }
.hero-portrait picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  max-height: 720px;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.35));
}

/* LTR mirror — current photo naturally fits RTL (subject gazes toward start edge).
   Flip horizontally in LTR so subject faces the text column on the left. */
html[dir="ltr"] .hero-flip img { transform: scaleX(-1); }

/* Mobile: compact portrait (stacks first) */
@media (max-width: 1023px) {
  .hero-portrait {
    min-height: 0;
    padding-top: 1.5rem;
    max-width: 22rem;
    margin: 0 auto;
  }
  .hero-portrait picture img {
    max-height: 420px;
    object-position: center bottom;
  }
}

/* Faded anatomical-heart silhouette on the text side — clean, not noisy */
.hero-heart-silhouette {
  position: absolute;
  top: 50%;
  inset-inline-start: -4rem;
  transform: translateY(-50%);
  width: 520px;
  height: 520px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23C9A961' stroke-width='.8' stroke-linecap='round' stroke-linejoin='round'><path d='M32 54s-18-10.4-18-24a10 10 0 0 1 18-6 10 10 0 0 1 18 6c0 13.6-18 24-18 24Z'/><path d='M20 28c2 2 4 2 6 0M38 28c2 2 4 2 6 0M24 34l3 2 3-4 4 8 3-4 3 2'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: .06;
  pointer-events: none;
}
@media (max-width: 1023px) {
  .hero-heart-silhouette { display: none; }
}

/* MD gold badge — neat credential accent next to the name */
.md-badge {
  display: inline-block;
  vertical-align: middle;
  margin-inline-start: .35rem;
  padding: .05em .4em .12em;
  font-size: .55em;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--navy-deep);
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 50%, var(--accent-deep) 100%);
  border-radius: .35em;
  box-shadow: 0 6px 16px -6px rgb(var(--accent-rgb) / .55);
  font-family: "Inter", sans-serif;
  font-style: normal;
  text-transform: uppercase;
  line-height: 1;
  position: relative;
  top: -.18em;
}

/* =========================================================
   Pathology cards
   ========================================================= */
.pathology-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid var(--ash-dark);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}
.pathology-card:hover {
  transform: translateY(-4px);
  border-color: rgb(var(--accent-rgb) / .4);
  box-shadow: 0 25px 45px -25px rgba(10,37,64,.2);
}
.pathology-icon {
  width: 48px; height: 48px; border-radius: .75rem;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / .15), rgb(var(--accent-rgb) / .04));
  color: var(--accent-deep);
  border: 1px solid rgb(var(--accent-rgb) / .2);
}

/* =========================================================
   Step cards (parcours patient)
   ========================================================= */
.step-card {
  position: relative;
  padding: 2rem 1.5rem 1.5rem;
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid var(--ash-dark);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.step-card:hover {
  transform: translateY(-4px);
  border-color: rgb(var(--accent-rgb) / .4);
  box-shadow: 0 25px 45px -25px rgba(10,37,64,.2);
}
.step-num {
  position: absolute; top: -.8rem; inset-inline-start: 1.5rem;
  width: 32px; height: 32px; border-radius: 9999px;
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 700;
  color: var(--navy-deep);
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 6px 16px -6px rgb(var(--accent-rgb) / .5);
}
.step-icon {
  width: 52px; height: 52px; border-radius: .85rem;
  margin: 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(10,37,64,.08), rgba(10,37,64,.02));
  color: var(--navy);
  border: 1px solid rgba(10,37,64,.08);
}

/* =========================================================
   FAQ accordion
   ========================================================= */
.faq-item {
  border-radius: 1rem;
  border: 1px solid var(--ash-dark);
  background: #fff;
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.faq-item[open] {
  border-color: rgb(var(--accent-rgb) / .35);
  box-shadow: 0 8px 24px -12px rgba(10,37,64,.15);
}
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  font-weight: 600; font-size: .95rem;
  color: var(--navy);
  list-style: none;
  transition: color .2s ease;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: var(--accent-deep); }
.faq-chevron {
  flex-shrink: 0;
  color: var(--accent-deep);
  transition: transform .3s ease;
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-a {
  padding: 0 1.25rem 1.25rem;
  font-size: .92rem;
  line-height: 1.7;
  color: rgba(10,37,64,.7);
}

/* =========================================================
   Outline CTA (secondary action in hero)
   ========================================================= */
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.4rem; border-radius: 9999px;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  color: #fff;
  background: rgba(255,255,255,.04);
  border: 1px solid rgb(var(--accent-rgb) / .55);
  backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;
}
.btn-outline:hover {
  background: rgb(var(--accent-rgb) / .12);
  border-color: rgb(var(--accent-rgb) / .9);
  color: var(--accent-light);
  transform: translateY(-1px);
}

/* Back-compat: portrait-bg kept for any leftover usage */
.portrait-bg {
  background:
    radial-gradient(120% 90% at 50% 110%,
      rgb(var(--accent-rgb) / .22) 0%,
      rgb(var(--accent-rgb) / .06) 35%,
      transparent 70%),
    linear-gradient(180deg, #143656 0%, #0A2540 100%);
}

/* =========================================================
   Booking / Calendly shell
   ========================================================= */
.booking-shell {
  position: relative;
  border-radius: 1.75rem;
  padding: 1rem;
  background:
    radial-gradient(140% 80% at 50% -20%, rgb(var(--accent-rgb) / .12) 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--ash) 100%);
  border: 1px solid rgb(var(--accent-rgb) / .25);
  box-shadow:
    0 0 0 1px rgb(var(--accent-rgb) / .15),
    0 30px 60px -30px rgba(10,37,64,.35),
    inset 0 1px 0 rgba(255,255,255,.7);
}

.booking-header,
.booking-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
  gap: .75rem;
}
.booking-header { padding-bottom: 1rem; }
.booking-footer {
  margin-top: .75rem;
  padding-top: 1rem;
  border-top: 1px dashed rgb(var(--accent-rgb) / .35);
}

.booking-dot {
  width: 36px; height: 36px;
  border-radius: .65rem;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / .18), rgb(var(--accent-rgb) / .06));
  color: var(--accent-deep);
  border: 1px solid rgb(var(--accent-rgb) / .35);
}

.booking-frame {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ash-dark);
  box-shadow: 0 10px 30px -20px rgba(10,37,64,.25);
}

.booking-wa {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 600;
  color: #1ebe58;
  padding: .35rem .65rem;
  border-radius: 9999px;
  background: rgba(37,211,102,.08);
  border: 1px solid rgba(37,211,102,.25);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.booking-wa:hover { background: rgba(37,211,102,.15); transform: translateY(-1px); }

/* Decorative gold corners */
.booking-shell .corner {
  position: absolute; width: 22px; height: 22px;
  border-color: rgb(var(--accent-rgb) / .65);
  border-style: solid; border-width: 0;
  pointer-events: none;
}
.corner-tl { top: 8px;    left: 8px;    border-top-width: 2px; border-left-width: 2px;  border-top-left-radius: 12px; }
.corner-tr { top: 8px;    right: 8px;   border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 12px; }
.corner-bl { bottom: 8px; left: 8px;    border-bottom-width: 2px; border-left-width: 2px;  border-bottom-left-radius: 12px; }
.corner-br { bottom: 8px; right: 8px;   border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 12px; }

/* RTL: keep corners visually mirrored automatically — borders are physical, but visually identical */

@media (max-width: 480px) {
  .booking-shell { padding: .65rem; }
  .booking-header, .booking-footer { padding: .5rem .65rem; }
  .booking-header > .hidden { display: none; }
}

/* =========================================================
   Calendly
   ========================================================= */
.calendly-inline-widget iframe { border-radius: 1rem; }

/* =========================================================
   Selection / focus
   ========================================================= */
::selection { background: var(--accent); color: #fff; }
[data-theme="gold"] ::selection { color: var(--navy-deep); }

a:focus-visible, button:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb) / .8);
  outline-offset: 2px; border-radius: .5rem;
}

/* =========================================================
   Floating WhatsApp pulse
   ========================================================= */
@keyframes wa-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(37,211,102,.45), 0 20px 40px -10px rgba(0,0,0,.25); }
  50%     { box-shadow: 0 0 0 14px rgba(37,211,102,0), 0 20px 40px -10px rgba(0,0,0,.25); }
}
#floatingWa { animation: wa-pulse 2.4s ease-out infinite; }

/* =========================================================
   Mobile sticky CTA — safe area inset
   ========================================================= */
#mobileCta { padding-bottom: calc(.625rem + env(safe-area-inset-bottom)); }

/* Smaller hero floating badges hidden under 1024 to clean up */
@media (max-width: 640px) {
  .section-eyebrow { padding: 0 .75rem; }
}

/* =========================================================
   =========================================================
   V2 — General cardiology reframe + lead pipeline
   New components: hero bilan CTA, symptom tiles, pipeline
   timeline, clinic block, and the full-screen triage quiz.
   =========================================================
   ========================================================= */

/* ---------- Secondary / ghost buttons ---------- */
.btn-soft {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 9999px;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  background: #fff; color: var(--navy);
  border: 1px solid var(--ash-dark);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn-soft:hover { transform: translateY(-1px); border-color: rgb(var(--accent-rgb) / .5); box-shadow: 0 12px 26px -16px rgba(10,37,64,.35); }

/* Emergency inline note */
.emergency-note {
  display: inline-flex; align-items: flex-start; gap: .55rem;
  padding: .7rem 1rem; border-radius: .85rem;
  background: rgba(197,48,48,.06);
  border: 1px solid rgba(197,48,48,.25);
  color: var(--soft-red-dark);
  font-size: .82rem; line-height: 1.5; text-align: start;
}

/* =========================================================
   Hero "bilan" pill / mini-trust row upgrades
   ========================================================= */
.hero-cta-note {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: rgba(245,247,250,.65);
}

/* =========================================================
   Symptom tiles — clickable, pre-select the quiz
   ========================================================= */
.symptom-grid { display: grid; gap: .75rem; }
.symptom-tile {
  position: relative; display: flex; align-items: center; gap: .85rem;
  width: 100%; text-align: start;
  padding: 1rem 1.1rem; border-radius: 1rem;
  background: #fff; border: 1px solid var(--ash-dark); cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.symptom-tile:hover {
  transform: translateY(-3px);
  border-color: rgb(var(--accent-rgb) / .45);
  box-shadow: 0 20px 40px -26px rgba(10,37,64,.35);
}
.symptom-tile .st-ic {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: .8rem;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / .16), rgb(var(--accent-rgb) / .05));
  color: var(--accent-deep);
  border: 1px solid rgb(var(--accent-rgb) / .22);
  transition: background .2s ease, color .2s ease;
}
.symptom-tile:hover .st-ic { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color:#fff; }
[data-theme="gold"] .symptom-tile:hover .st-ic { color: var(--navy-deep); }
.symptom-tile .st-txt { font-weight: 600; font-size: .95rem; color: var(--navy); line-height: 1.3; }
.symptom-tile .st-arrow { margin-inline-start: auto; color: var(--accent-deep); opacity: 0; transform: translateX(-4px); transition: opacity .2s ease, transform .2s ease; }
html[dir="rtl"] .symptom-tile .st-arrow { transform: scaleX(-1) translateX(-4px); }
.symptom-tile:hover .st-arrow { opacity: 1; transform: translateX(0); }
html[dir="rtl"] .symptom-tile:hover .st-arrow { transform: scaleX(-1) translateX(0); }

/* =========================================================
   Pipeline timeline — "Comment ça marche"
   ========================================================= */
.pipeline {
  position: relative; display: grid; gap: 1.25rem;
}
@media (min-width: 900px) {
  .pipeline { grid-template-columns: repeat(5, 1fr); gap: 0; }
}
.pipe-step {
  position: relative; text-align: center; padding: 0 1rem;
}
.pipe-badge {
  position: relative; z-index: 2; width: 66px; height: 66px; margin: 0 auto;
  border-radius: 9999px; display: grid; place-items: center;
  background: linear-gradient(135deg, #fff, var(--ash));
  border: 1px solid rgb(var(--accent-rgb) / .35);
  color: var(--accent-deep);
  box-shadow: 0 16px 34px -20px rgba(10,37,64,.4);
}
.pipe-badge .pb-num {
  position: absolute; top: -8px; inset-inline-end: -6px;
  width: 24px; height: 24px; border-radius: 9999px;
  display: grid; place-items: center; font-size: .72rem; font-weight: 700;
  color: var(--navy-deep);
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  border: 2px solid #fff;
}
/* connector line between steps (desktop) */
@media (min-width: 900px) {
  .pipe-step::before {
    content: ""; position: absolute; top: 33px; z-index: 1;
    inset-inline-start: -50%; width: 100%; height: 2px;
    background: repeating-linear-gradient(to right, rgb(var(--accent-rgb) / .45) 0 6px, transparent 6px 12px);
  }
  .pipe-step:first-child::before { display: none; }
  html[dir="rtl"] .pipe-step::before { background: repeating-linear-gradient(to left, rgb(var(--accent-rgb) / .45) 0 6px, transparent 6px 12px); }
}
.pipe-title { margin-top: .9rem; font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.35rem; color: var(--navy); }
html[dir="rtl"] .pipe-title { font-family: "Noto Naskh Arabic","Cormorant Garamond",serif; }
.pipe-desc { margin-top: .35rem; font-size: .85rem; line-height: 1.55; color: rgba(10,37,64,.65); }

/* =========================================================
   Clinic block — Clinique Franceville
   ========================================================= */
.clinic-card {
  position: relative; border-radius: 1.75rem; overflow: hidden;
  background: linear-gradient(180deg, #fff, var(--ash));
  border: 1px solid rgb(var(--accent-rgb) / .2);
  box-shadow: 0 30px 60px -34px rgba(10,37,64,.35);
}
.clinic-map {
  position: relative; width: 100%; min-height: 320px; height: 100%;
  border: 0; filter: saturate(.92);
}
.clinic-info { padding: 2rem 1.75rem; }
.clinic-row { display: flex; align-items: flex-start; gap: .85rem; padding: .8rem 0; border-bottom: 1px dashed var(--ash-dark); }
.clinic-row:last-child { border-bottom: 0; }
.clinic-row .ci-ic {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: .7rem;
  display: grid; place-items: center;
  background: rgb(var(--accent-rgb) / .12); color: var(--accent-deep);
  border: 1px solid rgb(var(--accent-rgb) / .2);
}
.clinic-row .ci-l { font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: var(--accent-deep); font-weight: 700; }
.clinic-row .ci-v { font-size: .95rem; color: var(--navy); font-weight: 500; margin-top: .1rem; line-height: 1.5; }

/* =========================================================
   ================  TRIAGE QUIZ WIZARD  ==================
   ========================================================= */
.quiz-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: none; opacity: 0;
  background: rgba(6,27,48,.82);
  backdrop-filter: blur(8px);
  transition: opacity .3s ease;
  overflow-y: auto;
  padding: clamp(0px, 3vh, 2.5rem) clamp(0px, 3vw, 1.5rem);
}
.quiz-overlay.open { display: block; opacity: 1; }
body.quiz-lock { overflow: hidden; }

.quiz-shell {
  position: relative;
  width: 100%; max-width: 640px; margin: 0 auto;
  min-height: min(94vh, 780px);
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: 1.5rem;
  border: 1px solid rgb(var(--accent-rgb) / .3);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.6);
  overflow: hidden;
  transform: translateY(14px) scale(.985);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.quiz-overlay.open .quiz-shell { transform: translateY(0) scale(1); }
@media (max-width: 640px) {
  .quiz-overlay { padding: 0; }
  .quiz-shell { border-radius: 0; min-height: 100dvh; max-width: none; border: 0; }
}

/* Header + progress */
.quiz-head {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.15rem .85rem;
  background: linear-gradient(180deg, #fff, rgba(245,247,250,.6));
  border-bottom: 1px solid var(--ash-dark);
}
.quiz-brand { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.quiz-brand img { height: 30px; width: auto; }
.quiz-brand .qb-t { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.02rem; color: var(--navy); line-height: 1; }
.quiz-brand .qb-s { font-size: .62rem; text-transform: uppercase; letter-spacing: .16em; color: var(--accent-deep); font-weight: 600; }
.quiz-close {
  margin-inline-start: auto; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 9999px;
  display: grid; place-items: center;
  background: var(--ash); color: var(--navy); border: 1px solid var(--ash-dark);
  transition: background .2s ease, color .2s ease;
}
.quiz-close:hover { background: rgba(197,48,48,.1); color: var(--soft-red); }

.quiz-progress-wrap { padding: .55rem 1.15rem 0; }
.quiz-progress-meta { display: flex; align-items: center; justify-content: space-between; font-size: .7rem; color: rgba(10,37,64,.55); font-weight: 600; letter-spacing: .04em; margin-bottom: .4rem; }
.quiz-progress { height: 6px; border-radius: 9999px; background: var(--ash-dark); overflow: hidden; }
.quiz-progress > span { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-deep)); transition: width .4s cubic-bezier(.2,.8,.2,1); }

/* Scrollable body */
.quiz-body { position: relative; flex: 1; overflow-y: auto; padding: 1.4rem 1.25rem 1rem; }
.quiz-step { display: none; animation: quiz-in .35s ease both; }
.quiz-step.active { display: block; }
@keyframes quiz-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.quiz-kicker { font-size: .7rem; text-transform: uppercase; letter-spacing: .18em; color: var(--accent-deep); font-weight: 700; }
.quiz-q { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: clamp(1.5rem, 4.5vw, 2rem); line-height: 1.15; color: var(--navy); margin-top: .35rem; }
html[dir="rtl"] .quiz-q { font-family: "Noto Naskh Arabic","Cormorant Garamond",serif; }
.quiz-help { margin-top: .55rem; font-size: .88rem; line-height: 1.55; color: rgba(10,37,64,.6); }

/* Option chips (radio / checkbox) */
.quiz-options { margin-top: 1.15rem; display: grid; gap: .6rem; }
.quiz-options.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 460px) { .quiz-options.cols-2 { grid-template-columns: 1fr; } }
.quiz-opt {
  position: relative; display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1rem; border-radius: .9rem;
  border: 1.5px solid var(--ash-dark); background: #fff; cursor: pointer;
  font-size: .92rem; font-weight: 500; color: var(--navy); line-height: 1.35;
  transition: border-color .18s ease, background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.quiz-opt:hover { border-color: rgb(var(--accent-rgb) / .5); background: rgb(var(--accent-rgb) / .03); }
.quiz-opt:active { transform: scale(.99); }
.quiz-opt .qo-box {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: .5rem;
  border: 1.5px solid var(--ash-dark); display: grid; place-items: center;
  color: #fff; background: #fff; transition: background .18s ease, border-color .18s ease;
}
.quiz-opt[data-shape="radio"] .qo-box { border-radius: 9999px; }
.quiz-opt .qo-box svg { width: 14px; height: 14px; opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }
.quiz-opt.selected { border-color: var(--accent-deep); background: rgb(var(--accent-rgb) / .08); box-shadow: 0 8px 22px -14px rgb(var(--accent-rgb) / .8); }
.quiz-opt.selected .qo-box { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-color: var(--accent-deep); }
[data-theme="gold"] .quiz-opt.selected .qo-box { color: var(--navy-deep); }
.quiz-opt.selected .qo-box svg { opacity: 1; transform: scale(1); }
.quiz-opt .qo-ic { flex-shrink: 0; color: var(--accent-deep); opacity: .85; }
.quiz-opt .qo-emoji { font-size: 1.15rem; line-height: 1; }
/* "None" style option resets siblings */
.quiz-opt[data-exclusive] { border-style: dashed; }

/* Free inputs */
.quiz-field { margin-top: 1rem; }
.quiz-field > label { display: block; font-size: .78rem; font-weight: 600; color: var(--navy); margin-bottom: .35rem; }
.quiz-input, .quiz-select {
  width: 100%; padding: .8rem .95rem; border-radius: .8rem;
  border: 1.5px solid var(--ash-dark); background: #fff; color: var(--navy);
  font-size: 1rem; font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.quiz-input:focus, .quiz-select:focus { outline: none; border-color: var(--accent-deep); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .18); }
.quiz-input::placeholder { color: rgba(10,37,64,.4); }
.quiz-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.quiz-inline-note { font-size: .72rem; color: rgba(10,37,64,.5); margin-top: .3rem; }
.quiz-err { font-size: .76rem; color: var(--soft-red); margin-top: .4rem; display: none; }
.quiz-err.show { display: block; }

/* BMI meter */
.bmi-card { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 1rem; background: var(--ash); border: 1px solid var(--ash-dark); }
.bmi-top { display: flex; align-items: baseline; justify-content: space-between; }
.bmi-val { font-family: "Cormorant Garamond", serif; font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1; }
.bmi-tag { font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 9999px; }
.bmi-bar { position: relative; margin-top: .7rem; height: 8px; border-radius: 9999px;
  background: linear-gradient(90deg,#3b82f6 0 18%, #22c55e 18% 42%, #eab308 42% 66%, #f97316 66% 84%, #ef4444 84% 100%); }
/* RTL: cursor is positioned from the right (inset-inline-start), so mirror the gradient
   to keep each colour band aligned with the value it represents. */
html[dir="rtl"] .bmi-bar { background: linear-gradient(270deg,#3b82f6 0 18%, #22c55e 18% 42%, #eab308 42% 66%, #f97316 66% 84%, #ef4444 84% 100%); }
.bmi-cursor { position: absolute; top: -4px; width: 4px; height: 16px; border-radius: 2px; background: var(--navy-deep); box-shadow: 0 0 0 2px #fff; transition: inset-inline-start .4s ease; }

/* Footer nav */
.quiz-foot {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1.15rem calc(.85rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ash-dark);
  background: linear-gradient(0deg, #fff, rgba(245,247,250,.5));
}
.quiz-back {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .7rem 1rem; border-radius: 9999px; font-weight: 600; font-size: .9rem;
  color: var(--navy); background: transparent; border: 1px solid transparent;
  transition: background .18s ease, color .18s ease;
}
.quiz-back:hover { background: var(--ash); }
.quiz-back[hidden] { visibility: hidden; }
.quiz-next {
  margin-inline-start: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.6rem; border-radius: 9999px; font-weight: 700; font-size: .95rem;
  color: #fff; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 12px 30px -12px rgb(var(--accent-rgb) / .7);
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
[data-theme="gold"] .quiz-next { color: var(--navy-deep); }
.quiz-next:hover { transform: translateY(-1px); filter: brightness(1.05); }
.quiz-next:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.3); }
html[dir="rtl"] .quiz-next svg.arrow { transform: scaleX(-1); }

/* ---------- Result screen ---------- */
.quiz-result-head {
  border-radius: 1.15rem; padding: 1.25rem 1.25rem; margin-bottom: 1rem;
  border: 1px solid; display: flex; gap: .9rem; align-items: flex-start;
}
.quiz-result-head .qr-ic { flex-shrink: 0; width: 46px; height: 46px; border-radius: 9999px; display: grid; place-items: center; }
.qr-tier { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; }
.qr-headline { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.45rem; line-height: 1.15; margin-top: .1rem; }
html[dir="rtl"] .qr-headline { font-family: "Noto Naskh Arabic","Cormorant Garamond",serif; }
.qr-sub { font-size: .9rem; line-height: 1.6; margin-top: .4rem; }
/* tiers */
.urg-emergency { background: rgba(197,48,48,.07); border-color: rgba(197,48,48,.4); }
.urg-emergency .qr-ic { background: var(--soft-red); color: #fff; }
.urg-emergency .qr-tier { color: var(--soft-red-dark); }
.urg-emergency .qr-headline { color: var(--soft-red-dark); }
.urg-urgent { background: rgba(234,88,12,.07); border-color: rgba(234,88,12,.38); }
.urg-urgent .qr-ic { background: #ea580c; color: #fff; }
.urg-urgent .qr-tier, .urg-urgent .qr-headline { color: #b8460e; }
.urg-routine { background: rgba(22,101,52,.06); border-color: rgba(22,101,52,.32); }
.urg-routine .qr-ic { background: #16a34a; color: #fff; }
.urg-routine .qr-tier, .urg-routine .qr-headline { color: #166534; }

.quiz-summary { border: 1px solid var(--ash-dark); border-radius: 1rem; padding: 1rem 1.1rem; background: var(--ash); }
.quiz-summary h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent-deep); font-weight: 700; }
.qs-row { display: flex; gap: .5rem; padding: .5rem 0; border-bottom: 1px dashed var(--ash-dark); font-size: .86rem; }
.qs-row:last-child { border-bottom: 0; }
.qs-row .qs-k { color: rgba(10,37,64,.6); min-width: 40%; }
.qs-row .qs-v { color: var(--navy); font-weight: 600; text-align: end; margin-inline-start: auto; }
.quiz-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.quiz-chip { font-size: .74rem; padding: .25rem .6rem; border-radius: 9999px; background: rgb(var(--accent-rgb) / .1); color: var(--accent-deep); border: 1px solid rgb(var(--accent-rgb) / .22); font-weight: 600; }
.quiz-reco-list { margin-top: .8rem; display: grid; gap: .5rem; }
.quiz-reco { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; line-height: 1.5; color: var(--navy); }
.quiz-reco svg { flex-shrink: 0; margin-top: 2px; color: var(--accent-deep); }

/* ---------- Confirmation screen ---------- */
.quiz-done { text-align: center; padding: 1.5rem .5rem; }
.quiz-done .qd-badge {
  width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 9999px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 20px 44px -18px rgba(21,128,61,.7);
  animation: qd-pop .5s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes qd-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.quiz-done h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.7rem; color: var(--navy); }
html[dir="rtl"] .quiz-done h3 { font-family: "Noto Naskh Arabic","Cormorant Garamond",serif; }

/* Loading spinner in submit */
.quiz-spin { width: 18px; height: 18px; border-radius: 9999px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: quiz-spin .7s linear infinite; }
[data-theme="gold"] .quiz-spin { border-color: rgba(6,27,48,.35); border-top-color: var(--navy-deep); }
@keyframes quiz-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .quiz-shell, .quiz-step, .quiz-overlay, .quiz-done .qd-badge { transition: none; animation: none; }
}

/* Launch button variants used in hero / CTAs */
.btn-bilan {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.7rem; border-radius: 9999px;
  font-weight: 700; font-size: 1rem; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 45%, var(--accent-deep) 100%);
  color: var(--navy-deep);
  box-shadow: 0 16px 40px -14px rgb(var(--accent-rgb) / .75), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-bilan:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 22px 50px -14px rgb(var(--accent-rgb) / .85); }
.btn-bilan .bb-pulse { width: 8px; height: 8px; border-radius: 9999px; background: var(--navy-deep); opacity: .8; animation: wa-pulse 2s ease-out infinite; }

/* Section wrapper for evaluation lead magnet */
.eval-panel {
  position: relative; border-radius: 1.75rem; overflow: hidden;
  background:
    radial-gradient(140% 90% at 15% -10%, rgb(var(--accent-rgb) / .16) 0%, transparent 55%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  border: 1px solid rgb(var(--accent-rgb) / .3);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.5);
}
