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

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* ======== HEADER ======== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h-mobile);
  z-index: var(--z-header);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
}

.site-header.scrolled {
  border-color: var(--border);
  box-shadow: 0 2px 12px oklch(30% 0.06 145 / 0.10);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

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

.logo-picto {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}

/* Nav desktop */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-desktop a {
  font-family: var(--ff-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* Bouton appel desktop */
.header-cta {
  display: none;
  align-items: center;
  gap: 10px;
}

/* ======== BURGER ======== */
/* Enfant direct du body, position: fixed, z-index > menu (piège prod #1 et #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: 1101; /* > z-header (1100) et > menu (1000) */
  padding: 0;
}

.burger-lines {
  width: 22px;
  height: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.burger-lines span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.2s ease;
  transform-origin: center;
}

.burger.is-open .burger-lines span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open .burger-lines span:nth-child(2) { opacity: 0; }
.burger.is-open .burger-lines span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ======== MENU MOBILE ======== */
/* Enfant direct du body (piège prod cause #1) */
.menu-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh; /* dvh jamais vh (piège prod cause #2) */
  background: var(--bg); /* OPAQUE */
  z-index: var(--z-menu); /* 1000, burger est 1101 */
  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-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, padding-left 0.2s;
}

.menu-mobile a:last-child { border-bottom: 0; }

.menu-mobile a:hover,
.menu-mobile a:active { color: var(--accent); padding-left: 8px; }

/* CTA WhatsApp dans le menu mobile — justify-content center obligatoire (sector_playbook warning) */
.menu-mobile a.btn {
  justify-content: center;
  gap: 10px;
  padding: 0.95rem 1.6rem;
  min-height: 52px;
  border-bottom: 0;
  font-size: 1rem;
  font-family: var(--ff-ui);
  border-radius: var(--r-md);
  margin-top: 20px;
}

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

/* ======== MAIN ======== */
main { padding-top: var(--header-h-mobile); }

/* ======== SECTIONS ======== */
section {
  padding: clamp(48px, 7vw, 96px) 0;
}

.section-header {
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section-header h2 {
  color: var(--text);
  margin-bottom: 12px;
}

.section-header .lead { max-width: 56ch; }

/* Sections alternées */
.section-alt { background: var(--bg-alt); }

/* ======== FOOTER ======== */
.site-footer {
  background: var(--text);
  color: #fff;
  padding: clamp(40px, 6vw, 72px) 0 24px;
  margin-top: 0; /* piège prod #12 — pas de margin-top */
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-logo-text {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

.footer-col h4 {
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}

.footer-col p,
.footer-col a,
.footer-col li {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
}

.footer-col a:hover { color: var(--accent-2); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

.footer-ml-link {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--ff-ui);
}

.footer-ml-link:hover { color: rgba(255,255,255,0.7); }

/* ======== FAB mobile ======== */
.fab-call {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  font-family: var(--ff-ui);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 16px oklch(45% 0.12 145 / 0.35);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fab-call:hover { transform: translateY(-2px); box-shadow: 0 6px 20px oklch(45% 0.12 145 / 0.45); }

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

/* ======== MODAL MENTIONS LÉGALES ======== */
.ml-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ml-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  cursor: pointer;
}

.ml-box {
  position: relative;
  background: #fff;
  border-radius: var(--r-lg);
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #333;
}

.ml-box h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-style: normal;
  color: var(--text);
}

.ml-box h3 {
  font-size: 0.85rem;
  font-family: var(--ff-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #555;
  margin: 1.2rem 0 0.4rem;
}

.ml-box p { margin-bottom: 0.6rem; }

.ml-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: #888;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
}

.ml-close:hover { background: #eee; color: #333; }
