/* layout.css — header, nav, footer */

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h-mobile);
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: transparent;
  transition: background var(--t-base), box-shadow var(--t-base);
}
.site-header.has-scrolled {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--border);
}
.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  z-index: 1;
}
.brand-picto svg { flex-shrink: 0; }
.brand-sub {
  display: block;
  font-family: var(--ff-ui);
  font-size: .65rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-2);
  line-height: 1;
  margin-top: 2px;
}

/* Hero immersif : brand en blanc */
.hero-active .site-header:not(.has-scrolled) .brand,
.hero-active .site-header:not(.has-scrolled) .brand-sub {
  color: rgba(255,255,255,.92);
}
.hero-active .site-header:not(.has-scrolled) .brand-sub {
  color: rgba(255,255,255,.7);
}

/* Nav desktop */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 28px;
}
.nav-desktop a {
  font-family: var(--ff-ui);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text);
  position: relative;
  transition: color var(--t-fast);
}
.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 100%;
  height: 1.5px;
  background: var(--accent);
  transition: right var(--t-base);
}
.nav-desktop a:hover::after { right: 0; }
.hero-active .site-header:not(.has-scrolled) .nav-desktop a { color: rgba(255,255,255,.85); }
.hero-active .site-header:not(.has-scrolled) .nav-desktop a::after { background: rgba(255,255,255,.7); }

/* Le btn.header-cta DOIT avoir specificite > .btn pour rester caché sur mobile (PIÈGE PROD #13) */
.btn.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .site-header {
    height: var(--header-h);
    padding: 0 40px;
  }
  .nav-desktop { display: flex; }
  .btn.header-cta { display: inline-flex; }
}

/* ===== BURGER (enfant direct du 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;
  z-index: calc(var(--z-header) + 50); /* > header > menu */
  background: transparent;
  border: 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 en blanc sur hero immersif */
.hero-active .burger:not(.is-open) span,
.hero-active .burger:not(.is-open) span::before,
.hero-active .burger:not(.is-open) span::after {
  background: #fff;
}

.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: rotate(45deg) translate(5px, 5px); background: var(--text); }
.burger.is-open span::after  { transform: rotate(-45deg) translate(5px, -5px); background: var(--text); }

@media (min-width: 768px) {
  .burger { display: none; }
}

/* ===== MENU MOBILE (enfant direct du body) ===== */
.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;
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--t-fast);
}
.menu-mobile a:last-child { border-bottom: 0; }
.menu-mobile a:hover { color: var(--accent); }
/* WhatsApp btn dans le menu */
.menu-mobile a.btn-wa {
  justify-content: center;
  gap: 10px;
  margin-top: 1rem;
  padding: .95rem 1.6rem;
  min-height: 52px;
  border-bottom: 0;
  border-radius: var(--r-md);
  font-family: var(--ff-ui);
  font-size: .95rem;
  font-weight: 600;
  background: var(--wa-green);
  color: #fff;
}
.menu-mobile a.btn-wa:hover { opacity: .92; }
.menu-mobile a.btn-wa svg { width: 18px; height: 18px; flex-shrink: 0; }

@media (min-width: 768px) {
  .menu-mobile { display: none; }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--accent-dark);
  color: rgba(255,255,255,.85);
  padding: 56px 20px 32px;
  margin-top: 0;
}
.footer-inner {
  width: var(--container);
  margin-inline: auto;
  display: grid;
  gap: 40px;
}
.footer-brand {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 8px;
}
.footer-tagline {
  font-size: .88rem;
  opacity: .7;
  max-width: 36ch;
}
.footer-col h4 {
  font-family: var(--ff-ui);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.footer-col p,
.footer-col a {
  font-size: .9rem;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: #fff; }

@media (min-width: 640px) {
  .footer-inner { grid-template-columns: 1.5fr 1fr 1fr; }
}

/* ===== FAB MOBILE ===== */
.fab-call {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: calc(var(--z-modal) - 100);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 13px 20px;
  border-radius: 50px;
  font-family: var(--ff-ui);
  font-size: .88rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.fab-call:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.fab-call svg { width: 18px; height: 18px; }

@media (min-width: 768px) {
  .fab-call { display: none; }
}
