/* LAYOUT — Header sticky, nav, footer */

/* ────────── 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 .25s ease, box-shadow .25s ease;
}
.site-header.has-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 8%, transparent);
}

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

/* 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;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text);
}
.brand-sub {
  font-family: var(--ff-ui);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent-2);
  display: block;
  margin-top: 2px;
}

/* Nav desktop */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-desktop a {
  font-family: var(--ff-ui);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: color .2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Header CTA appel (desktop) */
.header-cta {
  font-family: var(--ff-ui);
  font-size: .88rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--accent);
  color: var(--on-dark) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .2s, transform .15s;
}
.header-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* ────────── BURGER + MENU MOBILE ────────── */
/* RÈGLE ABSOLUE : burger et menu-mobile = enfants directs du body (jamais dans le header) */
/* z-index burger (1150) > z-header (1100) > z-menu (1000) */

.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) + 50); /* 1150 > header 1100 > menu 1000 */
}
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  position: relative;
  transition: transform .3s ease, opacity .3s ease, background .2s;
}
.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);  top: 0; background: var(--text); }
.burger.is-open span::after      { transform: rotate(-45deg); top: 0; background: var(--text); }

/* Menu mobile */
.menu-mobile {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100dvh;     /* dvh jamais vh — barre d'adresse mobile */
  background: var(--bg);
  z-index: var(--z-menu); /* 1000 < burger 1150 < z-header 1100 */
  padding: calc(var(--header-h-mobile) + 28px) 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  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 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color .2s, padding-left .2s;
}
.menu-mobile a:hover { color: var(--accent); padding-left: 22px; }
.menu-mobile a:last-of-type { border-bottom: none; }

/* Bouton WA dans menu-mobile — PIÈGE PROD paysagiste jouvet */
.menu-mobile a.btn {
  justify-content: center;
  gap: 10px;
  padding: .95rem 1.6rem;
  min-height: 52px;
  border-bottom: 0;
  margin-top: 12px;
}
.menu-mobile a.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.menu-mobile a.btn-wa,
.menu-mobile a.btn-primary { color: #fff; }

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

/* ────────── FOOTER ────────── */
.site-footer {
  margin-top: 0; /* PIÈGE PROD #12 : jamais de margin-top */
  background: var(--accent-dark);
  color: var(--on-dark);
  padding: 48px 20px 32px;
}
.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px 40px;
}
.footer-brand { grid-column: 1; }
.footer-brand .brand-name { color: var(--on-dark); }
.footer-brand .brand-sub { color: color-mix(in srgb, var(--on-dark) 70%, transparent); }
.footer-brand .brand-mark { color: color-mix(in srgb, var(--accent-soft) 80%, transparent); }

.footer-col h4 {
  font-family: var(--ff-ui);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: color-mix(in srgb, var(--on-dark) 55%, transparent);
  margin-bottom: 14px;
}
.footer-col p,
.footer-col a,
.footer-col li {
  color: color-mix(in srgb, var(--on-dark) 82%, transparent);
  font-size: .9rem;
  line-height: 1.7;
}
.footer-col a:hover { color: var(--on-dark); }

.footer-bottom {
  max-width: var(--container);
  margin-inline: auto;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--on-dark) 14%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p,
.footer-bottom a {
  font-size: .82rem;
  color: color-mix(in srgb, var(--on-dark) 52%, transparent);
}
.footer-bottom a:hover { color: var(--on-dark); }

/* ────────── FAB mobile ────────── */
.fab-call {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  font-family: var(--ff-ui);
  font-size: .95rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 100px;
  background: var(--accent);
  color: var(--on-dark);
  text-decoration: none;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 36%, transparent);
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
  align-items: center;
  gap: 8px;
}
.fab-call:hover { transform: translateX(-50%) translateY(-2px); }

/* Open badge */
.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}
.open-badge--open {
  background: color-mix(in srgb, #22C55E 12%, var(--bg));
  color: #16A34A;
}
.open-badge--closed {
  background: color-mix(in srgb, #EF4444 10%, var(--bg));
  color: #DC2626;
}
.open-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.open-badge--open .dot {
  animation: pulse-green 1.8s infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
@media (prefers-reduced-motion: reduce) { .open-badge--open .dot { animation: none; } }
