/* ============================================================
   BetterCallHealth - chrome.css
   Chrome partage : nav + footer + CTA + gradient-text + bandeau juridique
   Extrait d'index.html (reference design .bch-*)
   Depend de : css/tokens.css (variables) + css/fonts.css (polices)
   Compatible js/main.js (toggle .hidden sur #mobile-menu) + js/icons.js
   ============================================================ */

/* Le chrome impose sa police pour rester fidele a index.html,
   meme si la page hote definit un autre font-family sur body */
.bch-nav, .bch-footer, .bch-legal-band { font-family: var(--bch-font-body); }

/* ---------- Conteneurs ---------- */
.bch-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.bch-container-narrow { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* La nav est fixe : decale les ancres de sa hauteur */
html { scroll-padding-top: 88px; }

/* ---------- Bandeau juridique (premier enfant de la nav) ---------- */
.bch-legal-band {
  background: linear-gradient(135deg, rgba(14,165,233,0.92), rgba(6,182,212,0.92));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
/* Securite : si le bandeau est vide (placeholder non rempli), on le masque */
.bch-legal-band:empty { display: none; }

/* ---------- Nav verre (glass) ---------- */
.bch-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(226,232,240,0.6);
  transition: box-shadow .3s ease, background .3s ease;
}
.bch-nav.scrolled {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 4px 24px rgba(14,165,233,0.06);
}

/* Rangee interne de la nav (remplace le style inline d'index.html) */
.bch-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
}

/* Logo + wordmark */
.bch-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.bch-brand img { border-radius: 10px; }
.bch-wordmark { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }

/* Liens chip */
.bch-nav a.chip {
  padding: .5rem 1rem;
  border-radius: var(--bch-radius-pill);
  font-size: .88rem;
  font-weight: 600;
  color: #1E3A5F;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -1px 0 rgba(14,165,233,0.06),
    0 1px 3px rgba(15,23,42,0.04),
    0 4px 14px rgba(14,165,233,0.05);
  transition: all .25s cubic-bezier(.22,1,.36,1);
}
.bch-nav a.chip:hover {
  background: rgba(14,165,233,0.12);
  border-color: rgba(14,165,233,0.35);
  color: var(--bch-primary);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 4px 14px rgba(14,165,233,0.18),
    0 8px 24px rgba(14,165,233,0.1);
}

/* ---------- Dropdown Pathologies ---------- */
.bch-dd { position: relative; }
.bch-dd > .chip { background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.7); cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 5px; }
.bch-dd > .chip .dd-caret { transition: transform .25s ease; }
.bch-dd:hover > .chip .dd-caret, .bch-dd:focus-within > .chip .dd-caret { transform: rotate(180deg); }
.bch-dd-panel {
  position: absolute; left: 0; top: calc(100% + 10px); min-width: 232px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(226,232,240,0.8); border-radius: var(--bch-radius-sm);
  box-shadow: 0 16px 36px rgba(14,165,233,0.14); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease; z-index: 70;
}
.bch-dd:hover .bch-dd-panel, .bch-dd:focus-within .bch-dd-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.bch-dd-panel a { display: block; padding: 9px 13px; border-radius: 9px; color: #475569; text-decoration: none; font-size: 14px; font-weight: 600; transition: background .15s ease, color .15s ease; }
.bch-dd-panel a:hover { background: rgba(14,165,233,0.08); color: var(--bch-primary); }

/* ---------- CTA ---------- */
.bch-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--bch-cta-grad);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #fff;
  font-weight: 600;
  padding: .6rem 1.15rem;
  border-radius: var(--bch-radius-pill);
  box-shadow: 0 4px 14px rgba(14,165,233,0.32);
  transition: background-position .4s ease, transform .2s ease, box-shadow .3s ease;
}
.bch-cta:hover { background-position: 100% 50%; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(14,165,233,0.4); }
.bch-cta-lg { padding: 1rem 2rem; font-size: 1rem; }

/* CTA hero : anneau pulse pour attirer l'attention */
.bch-cta-pulse { position: relative; }
.bch-cta-pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--bch-radius-pill);
  background: linear-gradient(135deg, var(--bch-primary), var(--bch-primary-dark));
  opacity: 0;
  z-index: -1;
  animation: ctaPulse 2.4s cubic-bezier(.4,0,.6,1) infinite;
}
@keyframes ctaPulse {
  0%   { transform: scale(1);    opacity: .55; }
  70%  { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}
.bch-cta-pulse:hover::before { animation-play-state: paused; opacity: 0; }

/* ---------- Titre en degrade ---------- */
.gradient-text {
  background: var(--bch-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Menu mobile (compatible js/main.js + js/icons.js) ---------- */
#mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #475569;
  cursor: pointer;
  padding: 6px;
}
/* Taille de l'icone burger (equivalent .text-2xl, marche avec icons.js
   qui remplace <i class="fas fa-bars"> par un <svg> haut de 1em) */
#mobile-menu-btn i, #mobile-menu-btn svg { font-size: 1.5rem; line-height: 1; }

#mobile-menu {
  border-top: 1px solid rgba(226,232,240,0.6);
  padding: 14px 24px;
  background: rgba(255,255,255,0.95);
}
.bch-mobile-links { display: grid; gap: 6px; }
#mobile-menu .chip { padding: 10px 14px; }
.bch-menu-label {
  font-size: 11px;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 10px 14px 2px;
}

/* ---------- Helpers de breakpoint nav ---------- */
.md-flex { display: none; }
.bch-nav .md-flex { align-items: center; gap: 4px; }
@media (min-width: 900px) {
  .md-flex { display: flex !important; }
  .md-hide { display: none !important; }
  /* le menu mobile ne doit jamais apparaitre en desktop, meme deplie */
  #mobile-menu { display: none !important; }
}

/* ---------- Footer ---------- */
.bch-footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 60px 0 30px;
}
.bch-footer h5 { color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 14px; letter-spacing: .04em; }
.bch-footer a { color: #94A3B8; text-decoration: none; font-size: 14px; transition: color .2s ease; }
.bch-footer a:hover { color: var(--bch-primary); }
.bch-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 768px) { .bch-footer .cols { grid-template-columns: 1fr 1fr; } }
.bch-footer ul { display: grid; gap: 8px; padding: 0; list-style: none; }
.bch-footer .bottom {
  border-top: 1px solid #1E293B;
  margin-top: 40px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

/* Bloc disclaimer medical ambre
   (renomme .bch-disclaimer : .disclaimer existe deja dans soft-ui.css) */
.bch-footer .bch-disclaimer {
  margin-top: 32px;
  padding: 18px 20px;
  background: rgba(245,158,11,0.08);
  border-left: 3px solid rgba(245,158,11,0.5);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: #CBD5E1;
}
.bch-footer .bch-disclaimer strong { color: #FCD34D; }

/* ---------- Divers ---------- */
/* Repli si la page ne charge pas Tailwind (styles.css) :
   main.js toggle cette classe sur #mobile-menu.
   SCOPE sur #mobile-menu uniquement : une regle .hidden globale chargee
   apres styles.css ecraserait les patterns Tailwind "hidden md:block" */
#mobile-menu.hidden { display: none; }

/* Accessibilite : on coupe le pulse si l'utilisateur prefere moins d'animations */
@media (prefers-reduced-motion: reduce) {
  .bch-cta-pulse::before { animation: none; }
  .bch-nav, .bch-nav a.chip, .bch-dd-panel, .bch-cta { transition: none; }
}
