/*
 * Berger Toiture - Header (v2.0.0)
 *
 * Feuille dediee au header, drawer mobile, bouton CTA flottant et back-top.
 * Chargee apres main.css et premium.css (voir functions.php) pour pouvoir
 * surcharger proprement les anciens styles du 1.6.x.
 *
 * Tokens utilises : --bt-primary, --bt-primary-dark, --bt-primary-light,
 *                   --bt-dark, --bt-dark-2, --bt-gray-*, --bt-font-display,
 *                   --bt-font-body, --bt-space-*, --bt-radius-*, --bt-shadow-*
 * Toute couleur hard-codee doit etre alignee avec tokens.css / da-system.md.
 */

/* ============================================================
 * 1. BARRE D'IDENTITE (signature visuelle)
 *    Mince trait de 3px sous la navbar pour signer l'identite
 *    (variation de bleu, zinc et accent).
 * ============================================================ */
.bt-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(255, 255, 255, 0.985);
  border-bottom: 1px solid rgba(14, 39, 69, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 1px 0 rgba(9, 30, 55, 0.02);
}
.bt-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(90deg,
    var(--bt-primary-dark, #0D47A1) 0%,
    var(--bt-primary, #1565C0) 35%,
    #7DA3C7 60%,
    var(--bt-accent, #A6553A) 100%);
  opacity: 0.9;
}
.bt-header.is-scrolled {
  box-shadow: 0 12px 32px rgba(8, 29, 58, 0.09);
}

/* ============================================================
 * 2. INNER + LOGO (micro-interaction au hover)
 * ============================================================ */
.bt-header__inner {
  display: flex;
  position: static;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 1.8vw, 28px);
  height: 92px;
  width: 100%;
  max-width: 1480px;
  padding-inline: clamp(20px, 2.6vw, 42px);
  margin-inline: auto;
  flex-wrap: nowrap;
  min-width: 0;
  transition: height var(--bt-transition-fast, 150ms) ease;
}
.bt-header.is-scrolled .bt-header__inner { height: 68px; }

.bt-logo {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 13px;
  align-items: center;
  min-width: 205px;
  max-width: 255px;
  margin: 0;
  text-decoration: none;
  color: var(--bt-dark, #0B0E12);
}
.bt-logo__mark {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
}
.bt-logo__mark svg, .bt-logo__mark img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  transition: transform var(--bt-transition-fast, 150ms) ease;
}
.bt-logo__svg { transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.bt-logo:hover .bt-logo__svg { transform: scale(1.04); }
.bt-logo__roof {
  transform-origin: 28px 28px;
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bt-logo:hover .bt-logo__roof { transform: rotate(-3deg) translateY(-1px); }
.bt-logo__zinc { transition: fill 250ms ease, opacity 250ms ease; }
.bt-logo:hover .bt-logo__zinc { fill: #B8D2E8; opacity: 1; }

.bt-logo__text { display: flex; flex-direction: column; min-width: 0; }
.bt-logo__text strong {
  font: 700 clamp(18px, 1.4vw, 21px)/1.1 var(--bt-font-display, Georgia, serif);
  white-space: nowrap;
  letter-spacing: -0.03em;
  color: #10233e;
}
.bt-logo__text em {
  font: 600 9px/1.4 var(--bt-font-body, Arial, sans-serif);
  letter-spacing: 0.14em;
  color: #60718b;
  white-space: nowrap;
  margin-top: 6px;
  text-transform: uppercase;
}

/* V4.1 — Sous-titre "Toitures en altitude" visible en permanence (mobile + desktop).
   Style editorial, discret, complement du tagline existant. */
.bt-logo__sub {
  font: 500 10.5px/1.35 var(--bt-font-body, Arial, sans-serif);
  letter-spacing: 0.02em;
  color: #1565C0;
  margin-top: 4px;
  white-space: normal;
  max-width: 22ch;
  text-transform: none;
}
.bt-logo__sub::before {
  content: "❄ ";
  color: #A6553A;
  font-size: 11px;
  margin-right: 2px;
}

/* ============================================================
 * 3. NAVIGATION (etat actif visible)
 * ============================================================ */
.bt-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
  margin: 0;
}
.bt-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.5vw, 9px);
  padding: 0;
  margin: 0;
  list-style: none;
  max-width: none;
  white-space: nowrap;
  flex-wrap: nowrap;
}
.bt-nav__item { position: static; flex: 0 0 auto; min-width: auto; }
.bt-nav__link,
.bt-nav__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 12px 11px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #233c5a;
  font: 600 13px/1.2 var(--bt-font-body, Arial, sans-serif);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0;
  cursor: pointer;
  position: relative;
  overflow: visible;
  max-width: none;
  text-overflow: clip;
  transition: color var(--bt-transition-fast, 150ms) ease, background var(--bt-transition-fast, 150ms) ease;
}
.bt-nav__link::after,
.bt-nav__trigger::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: var(--bt-primary, #1565C0);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--bt-transition-fast, 150ms) ease;
}
.bt-nav__link:hover,
.bt-nav__link:focus-visible { color: var(--bt-primary, #1565C0); }
.bt-nav__link:hover::after,
.bt-nav__link:focus-visible::after,
.bt-nav__link.is-active::after { transform: scaleX(1); }
.bt-nav__link.is-active { color: var(--bt-primary, #1565C0); font-weight: 700; }

/* ============================================================
 * 4. MEGA-MENU PRESTATIONS
 *    - Fade-in (transform + opacity) a l'ouverture
 *    - Grid 2 colonnes : intro a gauche / 3x2 metiers a droite
 *    - Footer avec lien "Voir tous les sous-services"
 *    - v4.6.0 (t_37a3d151) : mega ancre au VIEWPORT via `position:fixed`
 *      pour eviter le decalage observe en v4.5.9 (panel a x=-720 cause
 *      par le `backdrop-filter` du header sticky qui creait un
 *      containing block non aligne sur le bord gauche du viewport).
 *      Le header sticky (z-index:1100) reste sous le mega (z-index:1200)
 *      et n'est pas perturbe.
 *    - v5.0.0-lot1 (t_59331d10) : alignement sur `left:50% + translateX(-50%)`
 *      (mega centre sur le viewport, robuste face aux conflits main.css).
 *    - v5.0.0-lot1 (t_ee03b486) CHIRURGIE : reaffirme `max-width:1280px`
 *      pour neutraliser `.bt-mega { max-width: calc(100vw - 32px) }` de
 *      main.css sur les anciens runtimes qui n'ont pas beneficie du
 *      nettoyage v4.5.7. Maintient l'invariant : `transform: translateX(-50%)`
 *      dans l'etat ferme ET l'etat ouvert pour absorber sans saut visuel
 *      la regle `.bt-nav__item:focus-within > .bt-mega` (specificite 0,3,0)
 *      qui peut surcharger `.bt-mega.is-open` (0,2,0).
 * ============================================================ */
.bt-nav__item--services { position: static; }
.bt-nav__chevron {
  flex: 0 0 12px;
  transition: transform 220ms ease;
}
.bt-nav__trigger[aria-expanded="true"] { color: var(--bt-primary, #1565C0); }
.bt-nav__trigger[aria-expanded="true"] .bt-nav__chevron { transform: rotate(180deg); }

.bt-mega {
  position: absolute;
  left: 50%;
  right: auto;
  top: calc(100% - 1px);
  width: min(100vw, 1280px);
  max-width: 1280px;
  border: 0;
  border-top: 1px solid #eaf0f7;
  border-bottom: 1px solid #d9e3f0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  z-index: 1200;
  background: rgba(255, 255, 255, 0.995);
  box-shadow: 0 25px 50px rgba(8, 35, 72, 0.17);
  overflow-y: auto;
  max-height: calc(100dvh - 92px);
  /* IMPORTANT : display:block par defaut (la regle .bt-mega de main.css
     met display:none — on l'override ici pour que le mega-menu ait sa
     propre logique de visibility via [hidden] + classe .is-open). */
  display: block;
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 280ms;
}
.bt-mega[hidden] { display: none; }
.bt-mega.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s;
}

.bt-mega__inner {
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(0, 2.4fr);
  gap: clamp(28px, 4vw, 56px);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  /* v4.6.0 (t_37a3d151) : padding-inline gere par .bt-mega (qui doit
     couvrir toute la largeur du viewport), on garde un padding-top
     pour la respiration interne et un padding-bottom pour le footer. */
  padding: 38px 0 0;
}
.bt-mega__intro {
  min-width: 0;
  border-right: 1px solid #e4edf7;
  padding-right: clamp(20px, 3vw, 42px);
}
.bt-mega__eyebrow {
  color: #2464ae;
  font: 800 10px/1.2 var(--bt-font-body, Arial, sans-serif);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.bt-mega__intro h2 {
  margin: 16px 0 12px;
  font: 700 clamp(20px, 2vw, 28px)/1.18 var(--bt-font-display, Georgia, serif);
  letter-spacing: -0.025em;
  color: #112c4e;
}
.bt-mega__intro p {
  font: 400 13px/1.7 var(--bt-font-body, Arial, sans-serif);
  color: #62748b;
  margin: 0 0 20px;
}
.bt-mega__contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1453a1;
  font: 700 13px/1.4 var(--bt-font-body, Arial, sans-serif);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 200ms ease, gap 200ms ease;
}
.bt-mega__contact:hover { gap: 10px; border-bottom-color: #1453a1; }

.bt-mega__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 22px;
  min-width: 0;
}
.bt-mega__service {
  min-width: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  border: 1px solid #e3edf8;
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.bt-mega__service:hover {
  border-color: #b6d3f1;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(20, 80, 160, 0.08);
}
.bt-mega__service-title {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0;
  color: #0f2f56;
  text-decoration: none;
}
.bt-mega__service-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #e6f0fb 0%, #f3f8fd 100%);
  color: #1453a1;
}
.bt-mega__service-icon img {
  width: 24px;
  height: 24px;
  filter: invert(31%) sepia(85%) saturate(1400%) hue-rotate(199deg) brightness(95%) contrast(96%);
}
.bt-mega__service-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.bt-mega__service-label strong {
  font: 700 14.5px/1.25 var(--bt-font-body, Arial, sans-serif);
  color: #0f2f56;
}
.bt-mega__service-label em {
  font: 400 11.5px/1.35 var(--bt-font-body, Arial, sans-serif);
  color: #6f8298;
  font-style: normal;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.bt-mega__service-arrow {
  color: #1f72c2;
  flex-shrink: 0;
  transition: transform 200ms ease;
}
.bt-mega__service:hover .bt-mega__service-arrow { transform: translateX(2px); }

.bt-mega__service-phare {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7ec 0%, #ffeedb 100%);
  color: #8b4514;
  font: 600 12px/1.35 var(--bt-font-body, Arial, sans-serif);
  text-decoration: none;
  border: 1px dashed rgba(139, 69, 20, 0.18);
  transition: background 200ms ease, border-color 200ms ease;
}
.bt-mega__service-phare:hover {
  background: linear-gradient(135deg, #fff1da 0%, #ffe2bf 100%);
  border-color: rgba(139, 69, 20, 0.35);
}
.bt-mega__phare-tag {
  color: #c47a2f;
  font-size: 13px;
  line-height: 1;
}

.bt-mega__footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #e4edf7;
}
.bt-mega__footer span {
  font: 400 12.5px/1.45 var(--bt-font-body, Arial, sans-serif);
  color: #6f8298;
}
.bt-mega__see-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--bt-primary, #1565C0);
  color: #fff;
  font: 700 12.5px/1 var(--bt-font-body, Arial, sans-serif);
  text-decoration: none;
  transition: background 200ms ease, transform 200ms ease;
}
.bt-mega__see-all:hover {
  background: var(--bt-primary-dark, #0D47A1);
  transform: translateX(2px);
}

@media (max-width: 1199px) {
  .bt-mega__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-mega__inner { grid-template-columns: 1fr; }
  .bt-mega__intro { border-right: 0; padding-right: 0; padding-bottom: 18px; border-bottom: 1px solid #e4edf7; }
}

/* ============================================================
 * 5. CTA TELEPHONE + CTA DEVIS
 *    Au scroll (is-scrolled), le bouton "Devis" est masque pour
 *    gagner de la hauteur. La mini-card telephone reste.
 * ============================================================ */
.bt-header__cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-left: 0;
  flex: 0 0 auto;
  overflow: visible;
}
.bt-header__phone {
  display: flex;
  align-items: center;
  padding: 0;
  gap: 9px;
  min-height: 45px;
  border-radius: 10px;
  white-space: nowrap;
  color: #162946;
  text-decoration: none;
  transition: transform var(--bt-transition-fast, 150ms) ease;
}
.bt-header__phone:hover { transform: translateY(-1px); }
.bt-header__phone-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bt-primary-light, #E3F2FD) 0%, #d6eaff 100%);
  color: var(--bt-primary, #1565C0);
}
.bt-header__phone-icon svg { display: block; }
.bt-header__phone-copy { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.bt-header__phone-copy small {
  font-size: 10px;
  font-weight: 600;
  color: #72819a;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.bt-header__phone-copy strong {
  font-size: 14px;
  font-weight: 800;
  color: #183657;
  letter-spacing: -0.01em;
}

.bt-header__quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 45px;
  padding: 12px 17px;
  border-radius: 10px;
  background: var(--bt-primary, #1565C0);
  color: #fff;
  box-shadow: 0 5px 14px rgba(21, 87, 175, 0.2);
  font: 700 12.5px/1.1 var(--bt-font-body, Arial, sans-serif);
  text-decoration: none;
  white-space: nowrap;
  transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.bt-header__quote:hover {
  background: var(--bt-primary-dark, #0D47A1);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(21, 87, 175, 0.3);
}
.bt-header.is-scrolled .bt-header__quote { display: none; }

/* ============================================================
 * 6. BURGER + DRAWER MOBILE
 * ============================================================ */
.bt-burger {
  display: none;
  background: #fff;
  border: 1px solid #dbe5f1;
  border-radius: 11px;
  cursor: pointer;
  position: relative;
}
.bt-burger:focus-visible {
  outline: 3px solid #79b8ff;
  outline-offset: 3px;
}
.bt-burger span {
  display: block;
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #174577;
  border-radius: 2px;
  transition: transform 240ms ease, opacity 200ms ease, top 240ms ease;
}
.bt-burger span:nth-child(1) { top: 14px; }
.bt-burger span:nth-child(2) { top: 21px; }
.bt-burger span:nth-child(3) { top: 28px; }
.bt-burger[aria-expanded="true"] span:nth-child(1) {
  top: 21px; transform: rotate(45deg);
}
.bt-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.bt-burger[aria-expanded="true"] span:nth-child(3) {
  top: 21px; transform: rotate(-45deg);
}

.bt-menu-open { overflow: hidden !important; }

.bt-drawer {
  position: fixed;
  inset: 0;
  z-index: 1600;
  pointer-events: none;
}
.bt-drawer.is-open { pointer-events: auto; }
.bt-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 31, 58, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 320ms ease;
}
.bt-drawer.is-open .bt-drawer__overlay { opacity: 1; }

.bt-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  padding: 86px 25px 27px;
  background: #fff;
  box-shadow: -20px 0 55px rgba(8, 31, 58, 0.25);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform 360ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.bt-drawer.is-open .bt-drawer__panel { transform: translateX(0); }

.bt-drawer__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  top: 22px;
  left: 25px;
  color: #102c4b;
}
.bt-drawer__heading strong {
  font: 700 18px/1.1 var(--bt-font-display, Georgia, serif);
  display: block;
}
.bt-drawer__heading span {
  color: #8a98a8;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-top: 3px;
}
.bt-drawer__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #e4ebf4;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  color: #102c4b;
  transition: background 200ms ease;
}
.bt-drawer__close:hover { background: #f1f6fc; }
.bt-drawer__close:focus-visible {
  outline: 3px solid #79b8ff;
  outline-offset: 3px;
}
.bt-drawer__nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.bt-drawer__group {
  border-bottom: 1px solid #edf2f8;
}
.bt-drawer__group > summary {
  list-style: none;
  cursor: pointer;
  font: 700 15px/1.4 var(--bt-font-body, Arial, sans-serif);
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bt-drawer__group > summary::-webkit-details-marker { display: none; }
.bt-drawer__chev {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #f1f6fc;
  color: #1453a1;
  font-size: 16px;
  font-weight: 400;
  transition: transform 220ms ease, background 200ms ease;
}
.bt-drawer__group[open] > summary .bt-drawer__chev {
  transform: rotate(45deg);
  background: #1453a1;
  color: #fff;
}
.bt-drawer__group--nested {
  margin-left: 14px;
  border-bottom: 1px solid #eef2f6;
}
.bt-drawer__group--nested > summary {
  font-size: 14px;
  padding: 11px 0;
  font-weight: 600;
  color: #102c4b;
}
.bt-drawer__main {
  display: block;
  padding: 10px 0 6px;
  color: var(--bt-primary, #1565C0);
  font: 600 12.5px/1.4 var(--bt-font-body, Arial, sans-serif);
  text-decoration: none;
}
.bt-drawer__sub {
  display: block;
  padding: 6px 0 6px 14px;
  font: 400 13px/1.45 var(--bt-font-body, Arial, sans-serif);
  color: #4b5d75;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}
.bt-drawer__sub:hover {
  color: var(--bt-primary, #1565C0);
  border-left-color: var(--bt-primary, #1565C0);
}
.bt-drawer__link {
  display: flex;
  align-items: center;
  padding: 13px 0;
  font: 700 14.5px/1.3 var(--bt-font-body, Arial, sans-serif);
  color: #102c4b;
  text-decoration: none;
  border-bottom: 1px solid #edf2f8;
}
.bt-drawer__link:focus-visible {
  outline: 3px solid #79b8ff;
  outline-offset: 3px;
}
.bt-drawer__link--all {
  color: var(--bt-primary, #1565C0);
  font-weight: 600;
}
.bt-drawer__link--urgence {
  color: #c62828;
  font-weight: 700;
}
.bt-drawer__bottom {
  background: linear-gradient(180deg, transparent 0%, #f5f9ff 100%);
  position: sticky;
  bottom: -27px;
  padding: 18px 0 8px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bt-drawer__phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  color: var(--bt-primary, #1565C0);
  border: 1px solid var(--bt-primary, #1565C0);
  text-decoration: none;
  font: 700 14px/1.2 var(--bt-font-body, Arial, sans-serif);
}
.bt-drawer__quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bt-primary, #1565C0);
  color: #fff;
  text-decoration: none;
  font: 700 13.5px/1.1 var(--bt-font-body, Arial, sans-serif);
}

/* ============================================================
 * 7. BOUTON CALL FLOTTANT (mobile uniquement)
 * ============================================================ */
.bt-float-call-wrap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: var(--bt-z-float-call, 700);
  pointer-events: none;
  display: block;
}
.bt-float-call {
  position: relative;
  inset: auto; /* neutralise bottom/right hérités de main.css : le wrap fixe la position */
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center; /* centre l'icône dans le cercle — évite le désaxage à 375 */
  gap: 8px;
  pointer-events: auto;
  min-height: 56px;
  padding: 0;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--bt-primary, #1565C0) 0%, var(--bt-primary-dark, #0D47A1) 100%);
  color: #fff;
  box-shadow: 0 14px 28px rgba(13, 71, 161, 0.35), 0 4px 8px rgba(13, 71, 161, 0.18);
  text-decoration: none;
  font: 700 13px/1 var(--bt-font-body, Arial, sans-serif);
  letter-spacing: 0.02em;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
/* Bouton élargi avec label à partir de 480px (format pilule) */
@media (min-width: 480px) {
  .bt-float-call {
    width: auto;
    padding: 0 18px 0 16px;
    border-radius: 28px;
  }
}
.bt-float-call:hover, .bt-float-call:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(13, 71, 161, 0.42);
}
.bt-float-call:focus-visible {
  outline: 3px solid #79b8ff;
  outline-offset: 3px;
}
.bt-float-call svg { display: block; flex-shrink: 0; width: 24px; height: 24px; }
.bt-float-call__label {
  white-space: nowrap;
  /* caché par défaut (mobile S <480) — affiché à partir de 480 px */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 480px) {
  .bt-float-call__label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
  }
}
.bt-float-call__pulse {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: bt-pulse-ring 2.4s ease-out infinite;
}
@keyframes bt-pulse-ring {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes bt-float-pulse {
  0% { box-shadow: 0 0 0 0 rgba(21, 101, 192, 0.4); }
  80% { box-shadow: 0 0 0 18px rgba(21, 101, 192, 0); }
  100% { box-shadow: 0 0 0 0 rgba(21, 101, 192, 0); }
}

/* ============================================================
 * 8. BOUTON RETOUR EN HAUT (apparait apres 800px de scroll)
 * ============================================================ */
.bt-back-top {
  position: fixed;
  right: 16px;
  bottom: 84px;
  z-index: var(--bt-z-float-call, 700);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #dbe5f1;
  color: var(--bt-primary, #1565C0);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 240ms ease, transform 240ms ease, visibility 240ms, background 200ms ease, color 200ms ease;
  box-shadow: 0 6px 16px rgba(8, 31, 58, 0.12);
}
.bt-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.bt-back-top:hover {
  background: var(--bt-primary, #1565C0);
  color: #fff;
}
.bt-back-top:focus-visible {
  outline: 3px solid #79b8ff;
  outline-offset: 3px;
}
.bt-back-top svg { display: block; }

/* Quand le bouton tel est visible (mobile), on remonte le back-top */
.bt-float-call-wrap:not([hidden]) + .bt-back-top,
.bt-float-call-wrap:not([style*="display: none"]) + .bt-back-top {
  bottom: 84px;
}

/* ============================================================
 * 9. RESPONSIVE
 * ============================================================ */
@media (max-width: 1399px) and (min-width: 1200px) {
  .bt-header__inner { height: 80px; }
  .bt-header .bt-mega { max-height: calc(100dvh - 80px); }
  .bt-header.is-scrolled .bt-header__inner { height: 64px; }
  .bt-logo { min-width: 200px; }
  .bt-header__phone-copy small { display: none; }
  .bt-nav__link, .bt-nav__trigger { font-size: 12.5px; padding-inline: 10px; }
  .bt-header__cta { gap: 10px; }
}

/* Breakpoint aligné sur le critère UX « bouton visible <1380 px ».
   À 1380+ le desktop large gère déjà le tel dans le header (CTA + quickcall),
   donc le bouton flottant n'est plus nécessaire. */
@media (min-width: 1380px) {
  .bt-nav, .bt-header__cta { display: flex; }
  .bt-burger { display: none; }
  .bt-float-call-wrap { display: none; }
}

@media (max-width: 1199px) {
  .bt-header__inner { height: 76px; gap: 12px; padding-inline: clamp(16px, 4vw, 28px); }
  .bt-header.is-scrolled .bt-header__inner { height: 64px; }
  .bt-nav, .bt-header__cta { display: none; }
  .bt-header.is-scrolled .bt-header__quickcall,
  .bt-header__quickcall { display: none; }
  .bt-burger {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin-left: auto;
  }
  .bt-logo { min-width: 0; max-width: none; }
  .bt-mega { max-height: calc(100dvh - 76px); }
}

@media (max-width: 540px) {
  .bt-header__inner { height: 70px; gap: 10px; padding-inline: 16px; }
  .bt-header.is-scrolled .bt-header__inner { height: 60px; }
  .bt-logo__mark, .bt-logo__mark svg, .bt-logo__mark img { width: 44px; height: 44px; }
  .bt-logo__mark { flex-basis: 44px; }
  .bt-logo { gap: 9px; }
  .bt-logo__text strong { font-size: 18px; }
  .bt-logo__text em { font-size: 8px; letter-spacing: 0.09em; }
  .bt-logo__sub { font-size: 8.5px; line-height: 1.3; max-width: 18ch; margin-top: 3px; }
  .bt-logo__sub::before { font-size: 9px; }
  .bt-burger { margin-left: auto; }
  .bt-drawer__panel { padding-inline: 20px; }
  .bt-drawer__heading { left: 20px; }
}

@media (max-width: 380px) {
  .bt-header__inner { padding-inline: 12px; }
  .bt-logo__text strong { font-size: 16px; }
  .bt-logo__text em { font-size: 7.5px; }
  .bt-logo__sub { font-size: 7.5px; max-width: 14ch; }
  .bt-logo__sub::before { display: none; }
  .bt-burger { flex-basis: 40px; width: 40px; height: 40px; }
}

/* ============================================================
 * 10. REDUCED MOTION + FOCUS GLOBAL
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .bt-header *, .bt-mega, .bt-float-call, .bt-back-top, .bt-drawer * {
    animation: none !important;
    transition: none !important;
  }
}

.bt-header .bt-nav__link:focus-visible,
.bt-header .bt-header__phone:focus-visible,
.bt-header .bt-header__quote:focus-visible,
.bt-logo:focus-visible {
  outline: 3px solid #79b8ff;
  outline-offset: 3px;
  border-radius: 8px;
}

/* Skip-link accessible */
.bt-skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 9999;
  background: var(--bt-primary, #1565C0);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top 200ms ease;
}
.bt-skip-link:focus { top: 0; }

/* SR-only (utilise par le label du champ de recherche dans le footer mais declarations centralisees ici) */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
