/* === LAYOUT — header, nav desktop, footer === */

/* --- HEADER --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h-mobile);
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--tr-base), box-shadow var(--tr-base);
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px oklch(20% 0.05 127 / 0.07);
}

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

@media (min-width: 768px) {
  .site-header { height: var(--header-h); }
  .header-inner { padding: 0 32px; }
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--accent);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 13%, var(--bg));
  border-radius: 50%;
  padding: 6px;
}

.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-name {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.15;
  color: var(--text);
}

.brand-name small {
  display: block;
  font-family: var(--ff-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}

/* Nav desktop */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav-desktop a {
  font-family: var(--ff-ui);
  font-size: 0.9rem;
  font-weight: 450;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color var(--tr-fast);
}

.nav-desktop a:hover { color: var(--accent); text-decoration: none; }

/* Bouton appeler header */
.header-cta {
  /* Masqué sur mobile, affiché en desktop */
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .header-cta { display: inline-flex; }
}

/* --- BURGER — position: fixed, enfant direct de body (cf MENU MOBILE pattern) --- */
.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) + 10); /* > menu-mobile ET > header */
  padding: 0;
}

.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.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)  translateY(7px); }
.burger.is-open span::after  { transform: rotate(-45deg) translateY(-7px); }

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

/* --- MENU MOBILE — enfant direct de body, 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) + 28px) 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .32s ease, opacity .32s ease, visibility 0s linear .32s;
}

.menu-mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .32s ease, opacity .32s ease;
}

.menu-mobile a {
  font-family: var(--ff-display);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: color var(--tr-fast);
}

.menu-mobile a:hover { color: var(--accent); text-decoration: none; }

/* Bouton WhatsApp dans le menu mobile */
.menu-mobile a.btn {
  margin-top: 20px;
  justify-content: center; /* RÈGLE sector_playbook — empêche icone gauche/texte droite */
  gap: 10px;
  padding: .95rem 1.6rem;
  min-height: 52px;
  border-bottom: 0;
  font-family: var(--ff-ui);
  font-size: 1rem;
  font-weight: 500;
}

.menu-mobile a.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

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

/* --- FOOTER --- */
.site-footer {
  background: var(--text);
  color: oklch(88% 0.025 127);
  padding: 48px 0 28px;
  margin-top: 0; /* cf PIÈGE #12 — pas de margin-top */
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-inner {
    padding: 0 32px;
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand .brand-name { color: oklch(94% 0.018 127); }
.footer-brand .brand-name small { color: oklch(70% 0.03 127); }
.footer-brand .brand-mark { background: color-mix(in srgb, var(--accent-2) 25%, transparent); }
.footer-brand .brand-mark svg { color: var(--accent-2); }

.footer-tagline {
  margin-top: 12px;
  font-size: 0.88rem;
  color: oklch(68% 0.03 127);
  line-height: 1.5;
}

.footer-col h4 {
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(60% 0.03 127);
  margin-bottom: 14px;
}

.footer-col p,
.footer-col a,
.footer-col li {
  font-size: 0.88rem;
  color: oklch(78% 0.025 127);
  line-height: 1.7;
}

.footer-col a { color: oklch(78% 0.025 127); }
.footer-col a:hover { color: var(--accent-2); text-decoration: none; }

.footer-bottom {
  max-width: var(--container);
  margin: 28px auto 0;
  padding: 16px 20px 0;
  border-top: 1px solid oklch(35% 0.02 127);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .footer-bottom { padding: 16px 32px 0; }
}

.footer-bottom span,
.footer-bottom a {
  font-size: 0.78rem;
  color: oklch(55% 0.025 127);
}

.footer-bottom a:hover { color: oklch(72% 0.03 127); text-decoration: none; }

/* FAB mobile bouton appeler */
.fab-call {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: calc(var(--z-header) - 10);
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-ui);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 4px 20px oklch(44% 0.088 127 / 0.35);
  text-decoration: none;
  transition: transform var(--tr-fast), box-shadow var(--tr-fast);
}

.fab-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px oklch(44% 0.088 127 / 0.45);
  text-decoration: none;
  color: #fff;
}

.fab-call svg { width: 18px; height: 18px; flex-shrink: 0; }

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