/* ============ LAYOUT — Header, Nav, Footer, FAB ============ */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 48px 0; }

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h-mobile);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  z-index: var(--z-header); /* PIÈGE #1 : z-header > z-menu */
  transition: border-color .3s ease, box-shadow .3s ease;
}

.site-header.scrolled {
  border-color: var(--border);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--text) 6%, transparent);
}

.header-inner {
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.header-logo:hover { text-decoration: none; }

.logo-picto { width: 40px; height: 40px; flex-shrink: 0; }

.header-logo-name {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}

/* Nav desktop (cachée sur mobile) */
.header-nav {
  display: none;
  gap: 24px;
  align-items: center;
}
.header-nav a {
  font-family: var(--ff-ui);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-2);
  text-decoration: none;
  transition: color .2s;
}
.header-nav a:hover { color: var(--accent); text-decoration: none; }

/* CTA desktop (caché sur mobile — PIÈGE #13) */
.header-cta-desktop { display: none; }

/* ===== BURGER (enfant direct body — RÈGLE MENU MOBILE) ===== */
.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: 1101; /* > z-header > z-menu */
}

.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: transform .3s ease, opacity .3s ease;
}
.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 — RÈGLE MENU MOBILE) ===== */
.menu-mobile {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100dvh; /* dvh : gère la barre d'adresse */
  background: var(--bg);
  z-index: var(--z-menu); /* < burger, < z-header */
  padding: calc(var(--header-h-mobile) + 32px) 32px 40px;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  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 {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu-mobile a:hover { color: var(--accent); text-decoration: none; }
/* Bouton WA dans menu (PIÈGE sector_playbook : justify-content:center) */
.menu-mobile a.btn {
  justify-content: center;
  gap: 10px;
  padding: .95rem 1.6rem;
  min-height: 52px;
  border-bottom: 0;
  margin-top: 1rem;
  font-family: var(--ff-ui);
  font-size: 1rem;
  border-radius: var(--r-md);
}
.menu-mobile a.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--text);
  color: #F5F1EA;
  padding: 56px 0 28px;
  margin-top: 0; /* PIÈGE #12 : pas de margin-top sur footer */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand { }
.footer-brand-name {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  color: #F5F1EA;
  margin-bottom: 8px;
}
.footer-brand-sub {
  font-family: var(--ff-ui);
  font-size: .83rem;
  color: color-mix(in srgb, #F5F1EA 55%, transparent);
  line-height: 1.6;
  max-width: 28ch;
}

.footer-col h4 {
  font-family: var(--ff-ui);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: color-mix(in srgb, #F5F1EA 45%, transparent);
  margin-bottom: 14px;
}
.footer-col ul li {
  font-family: var(--ff-ui);
  font-size: .87rem;
  color: color-mix(in srgb, #F5F1EA 75%, transparent);
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-col ul li + li { margin-top: 6px; }
.footer-col a {
  color: color-mix(in srgb, #F5F1EA 75%, transparent);
  text-decoration: none;
  transition: color .2s;
}
.footer-col a:hover { color: #F5F1EA; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid color-mix(in srgb, #F5F1EA 12%, transparent);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--ff-ui);
  font-size: .76rem;
  color: color-mix(in srgb, #F5F1EA 38%, transparent);
}
.footer-bottom a {
  color: color-mix(in srgb, #F5F1EA 50%, transparent);
  text-decoration: underline;
  transition: color .2s;
}
.footer-bottom a:hover { color: #F5F1EA; }
#ml-trigger { cursor: pointer; }

/* ===== FAB MOBILE ===== */
.fab-call {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: calc(var(--z-header) - 50);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  font-family: var(--ff-ui);
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.fab-call:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 28px color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration: none;
  color: #fff;
}
.fab-call svg { width: 18px; height: 18px; flex-shrink: 0; }
