/* layout.css — header sticky + nav + footer + sections */

/* ===== HEADER STICKY ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 98%, transparent);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h-mobile);
  padding: 0 20px;
  max-width: var(--container);
  margin: 0 auto;
}

/* Brand : picto + nom (jamais initiales-carre) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--ff-display);
  text-decoration: none;
}
.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%;
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; display: block; }
.brand-name {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.005em;
  line-height: 1;
  color: var(--text);
}
.brand-name em { font-style: italic; color: var(--accent); font-weight: 500; }
.brand-baseline {
  display: none;
  font-family: var(--ff-ui);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  margin-top: 3px;
}

/* Nav desktop */
.nav-desktop {
  display: none;
  gap: 26px;
  align-items: center;
  font-family: var(--ff-ui);
  font-size: .92rem;
}
.nav-desktop a {
  color: var(--text);
  position: relative;
  padding: 6px 2px;
  transition: color .2s ease;
}
.nav-desktop a:hover { color: var(--accent); }
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease;
}
.nav-desktop a:hover::after { transform: scaleX(1); }

.header-cta {
  display: none;
  align-items: center;
  gap: 10px;
}

/* Burger : enfant DIRECT du body, position fixed haut-droite (cf piege #8) */
.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: 1300;
}
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.burger span { 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 { top: 0; transform: rotate(45deg); }
.burger.is-open span::after  { top: 0; transform: rotate(-45deg); }

/* Menu mobile : enfant DIRECT du body, fixed pleine page */
.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) 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  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.55rem;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.menu-mobile a.btn-wa,
.menu-mobile a.btn {
  border-bottom: 0;
  margin-top: 8px;
}
.menu-mobile .menu-foot {
  margin-top: auto;
  font-family: var(--ff-ui);
  font-size: .85rem;
  color: var(--text-mute);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ===== SECTIONS ===== */
section { padding: 48px 0; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--accent-deep);
  color: #F5F1EA;
  padding: 56px 0 24px;
  margin-top: 0;
}
.site-footer :where(h2,h3,h4,p,li,a,span,small) { color: #F5F1EA; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.footer-col h4 {
  font-family: var(--ff-display);
  font-size: 1rem;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}
.footer-brand .brand-mark {
  background: color-mix(in srgb, #F5F1EA 14%, transparent);
  color: #F5F1EA;
}
.footer-brand p {
  font-family: var(--ff-body);
  color: rgba(245, 241, 234, 0.78);
  max-width: 36ch;
  margin-top: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  color: rgba(245, 241, 234, 0.85);
  font-family: var(--ff-ui);
  font-size: .92rem;
  transition: color .2s ease;
}
.footer-col a:hover { color: #fff; }
.footer-meta {
  font-family: var(--ff-ui);
  font-size: .82rem;
  color: rgba(245, 241, 234, 0.6);
}
.footer-bar {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(245, 241, 234, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--ff-ui);
  font-size: .82rem;
  color: rgba(245, 241, 234, 0.6);
}
.footer-bar a { text-decoration: underline; text-underline-offset: 2px; }

@media (min-width: 768px) {
  .site-header__inner { height: var(--header-h); padding: 0 32px; }
  .nav-desktop { display: flex; }
  .header-cta { display: inline-flex; }
  .burger { display: none; }
  .menu-mobile { display: none; }
  section { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
  .footer-bar { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 980px) {
  .brand-baseline { display: block; }
  .brand { gap: 12px; }
}
