/* ============================================================
   LAYOUT - header sticky, nav, menu mobile, footer
   ============================================================ */

/* ---------- HEADER STICKY ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h-mobile);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  z-index: var(--z-header);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom-color: var(--border);
}
@media (min-width: 768px) {
  .site-header { height: var(--header-h); }
}

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

/* Logo / Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  border-radius: 50%;
  padding: 6px;
  flex-shrink: 0;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.brand-name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand-tag {
  font-family: var(--ff-ui);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
}
@media (max-width: 559px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 1rem; }
}

/* Nav desktop */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 28px;
}
.nav-desktop a {
  color: var(--text);
  font-family: var(--ff-ui);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.nav-desktop a:hover { color: var(--accent); }
.nav-desktop .header-cta {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-weight: 600;
}
.nav-desktop .header-cta:hover { background: var(--accent-2); color: #fff; }

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
}

/* Burger - position fixed top right z-index > menu */
.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: var(--z-burger);
  padding: 0;
}
.burger span,
.burger span::before,
.burger span::after {
  content: "";
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), top var(--dur) var(--ease);
  position: relative;
}
.burger span { position: relative; }
.burger span::before { position: absolute; top: -8px; left: 0; }
.burger span::after { position: absolute; top: 8px; left: 0; }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: rotate(45deg); top: 0; }
.burger.is-open span::after  { transform: rotate(-45deg); top: 0; }
@media (min-width: 900px) {
  .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) + 24px) 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .35s var(--ease), opacity .35s var(--ease), visibility 0s linear .35s;
}
.menu-mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.menu-mobile a {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.menu-mobile .menu-cta {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
  border-bottom: 0;
}
.menu-mobile .menu-cta > a {
  border-bottom: 0;
  text-align: center;
  border-radius: var(--r-md);
  padding: 16px 20px;
  font-size: 1.05rem;
  color: #fff;
}
.menu-mobile .menu-cta > a.btn-primary { background: var(--accent); color: #fff; }
.menu-mobile .menu-cta > a.btn-wa { background: var(--wa-green); color: #fff; }
@media (min-width: 900px) {
  .menu-mobile { display: none; }
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--surface-deep);
  color: #DDE5E0;
  padding: 56px 0 24px;
  margin-top: 0;
}
.site-footer a { color: var(--accent-on-dark); }
.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 16px;
  font-weight: 600;
}
.footer-col p, .footer-col li {
  color: #C2CFCA;
  font-size: 0.92rem;
  line-height: 1.65;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

.footer-brand .brand-mark {
  background: color-mix(in srgb, var(--accent-on-dark) 18%, transparent);
  color: var(--accent-on-dark);
}
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tag { color: var(--accent-on-dark); }
.footer-tagline {
  color: #C2CFCA;
  font-size: 0.92rem;
  margin-top: 14px;
  max-width: 34ch;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #94A39E;
}
.footer-bottom a {
  color: #C2CFCA;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- FAB Appel mobile ---------- */
.fab-call {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 60px; height: 60px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: var(--z-fab);
  box-shadow: 0 8px 24px rgba(31, 91, 78, 0.32), 0 2px 8px rgba(0,0,0,0.12);
  text-decoration: none;
  transition: transform .2s var(--ease);
}
.fab-call:hover { transform: translateY(-2px); color: #fff; }
.fab-call svg { width: 26px; height: 26px; display: block; }
.fab-call::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0.4;
  animation: fab-pulse 2.2s ease-out infinite;
}
@keyframes fab-pulse {
  0%   { transform: scale(0.95); opacity: 0.5; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fab-call::after { animation: none; }
}
@media (min-width: 900px) {
  .fab-call { display: none; }
}

/* Spacer body pour compenser header fixed */
main { padding-top: var(--header-h-mobile); }
@media (min-width: 768px) { main { padding-top: var(--header-h); } }
