/* layout.css — header, nav, footer, structure */

/* TEX-5 Papier chaud */
body {
  background-image: radial-gradient(120% 80% at 50% 0%,
    color-mix(in srgb, var(--accent) 5%, var(--bg)) 0%, var(--bg) 60%);
  background-attachment: fixed;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h-mobile);
  background: var(--bg);
  z-index: var(--z-header);
  transition: box-shadow .3s ease;
}
.site-header.scrolled {
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(31,53,49,.07);
}

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

/* 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;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-name {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text);
}
.brand-tagline {
  font-family: var(--ff-ui);
  font-size: 0.66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-mute);
  line-height: 1;
}

/* NAV DESKTOP */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 28px;
}
.nav-desktop a {
  font-family: var(--ff-ui);
  font-size: 0.88rem;
  font-weight: 450;
  color: var(--text-2);
  transition: color .2s;
  letter-spacing: .01em;
}
.nav-desktop a:hover { color: var(--accent); }

/* Header CTA desktop — PIÈGE #13: .btn.header-cta-desktop */
.btn.header-cta-desktop { display: none; }

/* Open dot dans header */
.header-open-dot {
  display: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ========================================
   BURGER — enfant direct de body (RÈGLE ANTI-BUG)
   ======================================== */
.burger {
  position: fixed;
  top: calc((var(--header-h-mobile) - 44px) / 2);
  right: 14px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer;
  z-index: calc(var(--z-header) + 50); /* > header > menu */
  padding: 0;
}
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease-out), opacity .2s;
  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) translate(5px, 5px); }
.burger.is-open span::after  { transform: rotate(-45deg) translate(5px, -5px); }

/* ========================================
   MENU MOBILE — enfant direct de body (RÈGLE ANTI-BUG)
   ======================================== */
.menu-mobile {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100dvh; /* dvh, pas vh */
  background: var(--bg);
  z-index: var(--z-menu); /* < burger, < header */
  padding: calc(var(--header-h-mobile) + 32px) 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .35s var(--ease-out), opacity .35s ease, visibility 0s linear .35s;
}
.menu-mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .35s var(--ease-out), opacity .35s ease;
}
.menu-mobile a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  letter-spacing: -.01em;
}
.menu-mobile a:last-child { border-bottom: 0; }
/* Jouvet pattern — bouton WA dans menu mobile */
.menu-mobile a.btn {
  justify-content: center;
  gap: 10px;
  padding: .95rem 1.6rem;
  min-height: 52px;
  border-bottom: 0;
  margin-top: 16px;
  font-family: var(--ff-ui);
  font-size: 1rem;
  font-weight: 500;
}
.menu-mobile a.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.menu-mobile a.btn-wa,
.menu-mobile a.btn-primary { color: #fff; }

/* ========================================
   SECTIONS STRUCTURE
   ======================================== */
.section {
  padding-block: clamp(56px, 8vw, 100px);
}
.section--alt {
  background: var(--surface);
}
.section--dark {
  background: var(--text);
}
.section--dark, .section--dark :where(h1,h2,h3,h4,p,li,span,a,small,strong) {
  color: var(--on-dark);
}
.section-header {
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-eyebrow {
  font-family: var(--ff-ui);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.section-eyebrow::before {
  content: '';
  width: 28px; height: 1.5px;
  background: var(--accent);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--text);
  color: var(--on-dark);
  padding: clamp(40px,6vw,72px) 0 32px;
  margin-top: 0;
}
.site-footer :where(h1,h2,h3,h4,p,li,span,a,small) { color: var(--on-dark); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 40px;
}
.footer-brand-mark { color: #fff; width: 30px; height: 30px; margin-bottom: 10px; }
.footer-brand-mark svg { width: 100%; height: 100%; }
.footer-name {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.footer-meta {
  font-size: .8rem;
  opacity: .65;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.footer-desc { font-size: .88rem; opacity: .8; margin-top: 12px; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--ff-ui);
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  opacity: .55;
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-col p, .footer-col a {
  font-size: .88rem;
  opacity: .85;
  line-height: 1.75;
  display: block;
}
.footer-col a:hover { opacity: 1; color: var(--accent-2); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .78rem;
  opacity: .55;
}
.footer-bottom a { opacity: 1; }
.footer-bottom a:hover { color: var(--accent-2); }
