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

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

/* ── HEADER ─────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header); /* 1100 > z-menu 1000 (PIÈGE #1) */
  background: var(--bg);
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.is-scrolled {
  border-color: var(--border);
  box-shadow: 0 2px 16px color-mix(in srgb, var(--text) 6%, transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-picto { flex-shrink: 0; }
.logo-name {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

/* Nav desktop */
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.header-nav a {
  font-family: var(--ff-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--accent); }

/* CTA header */
.header-cta {
  flex-shrink: 0;
  margin-left: 8px;
}

/* ── BURGER + MENU MOBILE ────────────────────────── */
/* Enfants directs de body — JAMAIS dans le header (PIÈGE cause #1 menu bug) */
.burger {
  position: fixed;
  top: calc((var(--header-h-mobile) - 44px) / 2);
  right: 16px;
  width: 44px;
  height: 44px;
  display: none; /* visible uniquement mobile via responsive.css */
  place-items: center;
  z-index: calc(var(--z-header) + 100); /* 1200 > header (1100) > menu (1000) */
  border-radius: var(--r-sm);
  transition: background var(--transition);
}
.burger:hover { background: var(--accent-pale); }
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.2s ease;
  position: relative;
}
.burger span::before,
.burger span::after {
  content: '';
  position: absolute;
}
.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); background: var(--text); }
.burger.is-open span::after  { transform: rotate(-45deg) translate(5px, -5px); background: var(--text); }

.menu-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh; /* dvh pas vh — gère la barre d'adresse mobile (PIÈGE #3) */
  background: var(--bg); /* fond OPAQUE */
  z-index: var(--z-menu); /* 1000 < z-header 1100 */
  padding: calc(var(--header-h-mobile) + 32px) 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0s linear 0.35s;
}
.menu-mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.menu-mobile a {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  font-family: var(--ff-ui);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.menu-mobile a:last-of-type { border-bottom: none; }
.menu-mobile a:hover { color: var(--accent); }
/* Bouton WhatsApp dans le menu — justify-content: center obligatoire (sector_playbook) */
.menu-mobile a.btn-wa {
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  border-bottom: none;
  padding: 0.95rem 1.6rem;
  min-height: 52px;
}
.menu-mobile a.btn-wa svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── FOOTER ──────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: var(--bg);
  padding: 56px 0 0;
  margin-top: 0; /* PIÈGE #12 : pas de margin-top sur footer */
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 15%, transparent);
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-name  { font-family: var(--ff-display); font-size: 1.3rem; font-weight: 500; color: var(--bg); }
.footer-desc  { font-size: 0.85rem; color: color-mix(in srgb, var(--bg) 65%, transparent); }

.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact a,
.footer-contact address,
.footer-contact p {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--bg) 80%, transparent);
  font-style: normal;
  line-height: 1.5;
}
.footer-contact a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.footer-links a,
.footer-links .link-btn {
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
  transition: color var(--transition);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.footer-links a:hover,
.footer-links .link-btn:hover { color: var(--bg); }

.footer-copy {
  text-align: center;
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--bg) 40%, transparent);
  padding: 16px 24px 20px;
}

/* ── FAB MOBILE ──────────────────────────────────── */
.fab-call {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  display: none; /* visible uniquement mobile */
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--ff-ui);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 45%, transparent);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.fab-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 50%, transparent);
}
