/* Header sticky */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h-mobile);
  z-index: var(--z-header);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}
.site-header.has-scrolled {
  border-color: var(--border);
  box-shadow: 0 2px 16px color-mix(in srgb, var(--text) 8%, transparent);
}
/* Sur hero photo (fond clair sauge, pas besoin d'adaptation) */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* BRAND / LOGO */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.brand-mark {
  width: 32px; height: 32px;
  color: var(--accent);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text);
}
.brand-name em {
  font-style: italic;
  color: var(--accent);
}

/* Nav desktop */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}
.nav-desktop a {
  font-family: var(--ff-ui);
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: color var(--transition);
}
.nav-desktop a:hover { color: var(--accent); text-decoration: none; }
.nav-desktop .header-cta {
  margin-left: .5rem;
  display: none; /* caché mobile, visible desktop via media query */
}

/* BURGER — enfant direct body, position fixed haut droite */
.burger {
  position: fixed;
  top: calc((var(--header-h-mobile) - 44px) / 2);
  right: 16px;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: calc(var(--z-header) + 50); /* 1150, au-dessus de tout */
  padding: 0;
}
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
  position: relative;
}
.burger span::before,
.burger span::after {
  content: '';
  position: absolute;
  left: 0;
}
.burger span::before { top: -7px; }
.burger span::after  { top:  7px; }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: rotate(45deg) translate(5px, 5px); }
.burger.is-open span::after  { transform: rotate(-45deg) translate(5px, -5px); }

/* MENU MOBILE — enfant direct body, juste après </header> */
.menu-mobile {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100dvh;
  background: var(--bg);
  z-index: var(--z-menu);
  padding: calc(var(--header-h-mobile) + 32px) 28px 40px;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .35s ease, opacity .35s ease, visibility 0s linear .35s;
}
.menu-mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .35s ease, opacity .35s ease;
}
.menu-mobile a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
}
.menu-mobile a:hover { color: var(--accent); text-decoration: none; }
/* CTA WhatsApp dans menu : centré (PATTERN ANTI-BUG) */
.menu-mobile a.btn {
  justify-content: center;
  gap: 10px;
  padding: .95rem 1.6rem;
  min-height: 52px;
  border-bottom: 0;
  margin-top: .5rem;
  font-size: 1rem;
  font-family: var(--ff-ui);
  font-weight: 700;
}
.menu-mobile a.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
/* Forcer la couleur des boutons dans le menu (PIEGE PROD #15) */
.menu-mobile a.btn-primary,
.menu-mobile a.btn-wa { color: #fff; }

/* FOOTER */
.site-footer {
  background: var(--primary);
  color: #E8F0EC;
  padding: 48px 0 32px;
  margin-top: 0; /* PIEGE PROD #12 : jamais de margin-top sur footer */
}
.site-footer a { color: var(--accent-2); }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
}
.footer-brand { grid-column: 1 / -1; }
.footer-brand .brand-name { color: #E8F0EC; font-size: 1.25rem; }
.footer-tagline {
  font-size: .9rem;
  color: color-mix(in srgb, #E8F0EC 65%, #4A8B7F);
  margin-top: 6px;
  font-style: italic;
}
.footer-col h4 {
  font-family: var(--ff-ui);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.footer-col p,
.footer-col li { font-size: .92rem; color: color-mix(in srgb, #E8F0EC 78%, #4A8B7F); line-height: 1.7; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, #E8F0EC 14%, #1F3531);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: color-mix(in srgb, #E8F0EC 45%, #1F3531);
}
.footer-bottom a { color: color-mix(in srgb, #E8F0EC 55%, #4A8B7F); }

/* FAB appel mobile */
.fab-call {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 56px; height: 56px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: calc(var(--z-header) - 50);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.fab-call:hover { transform: scale(1.08); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 50%, transparent); text-decoration: none; }
.fab-call svg { width: 24px; height: 24px; }

@media (min-width: 768px) {
  .site-header { height: var(--header-h); }
  .burger { display: none; }
  .menu-mobile { display: none; }
  .nav-desktop { display: flex; }
  .nav-desktop .header-cta { display: inline-flex; }
  .fab-call { display: none; }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .footer-brand { grid-column: auto; }
}
