/* Header / Nav / Footer / FAB — jardinier-proprete-du-jardin */

/* ─── HEADER ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h-mobile);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  z-index: var(--z-header);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.has-scrolled {
  box-shadow: 0 1px 0 var(--border), 0 4px 16px color-mix(in srgb, var(--text) 6%, transparent);
  background: color-mix(in srgb, var(--bg) 98%, transparent);
}

/* Sur hero photo sombre → header transparent initialement, devient opaque au scroll */
.site-header.header-on-hero {
  background: transparent;
  backdrop-filter: none;
}
.site-header.header-on-hero.has-scrolled {
  background: color-mix(in srgb, var(--bg) 98%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

/* Brand / Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-picto { flex-shrink: 0; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--ff-display);
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

.brand-sub {
  font-family: var(--ff-ui);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-mute);
}

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

.nav-desktop a {
  font-family: var(--ff-ui);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav-desktop a:hover { color: var(--accent); }

/* CTA header desktop uniquement */
.header-cta { display: none; }

@media (min-width: 768px) {
  .site-header { height: var(--header-h); }
  .nav-desktop { display: flex; }
  .header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 1.2rem;
    background: var(--accent);
    color: #fff;
    border-radius: var(--r-md);
    font-family: var(--ff-ui);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
  }
  .header-cta:hover { background: var(--accent-2); }
}

/* ─── BURGER + MENU MOBILE ─── */
/* Burger : enfant direct de body, position:fixed top-right (PIÈGE PROD #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: calc(var(--z-header) + 50); /* 1150 > header 1100 > menu 1000 */
  padding: 0;
}

.burger__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: background 0.2s;
}
.burger__bar::before,
.burger__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s;
}
.burger__bar::before { top: -7px; }
.burger__bar::after  { top: 7px; }

.burger.is-open .burger__bar { background: transparent; }
.burger.is-open .burger__bar::before { transform: translateY(7px) rotate(45deg); background: var(--text); }
.burger.is-open .burger__bar::after  { transform: translateY(-7px) rotate(-45deg); background: var(--text); }

/* Menu mobile : enfant direct de body (jamais imbriqué dans header/wrappers transform) */
.menu-mobile {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100dvh;            /* dvh : gère la barre d'adresse mobile */
  background: var(--bg);     /* fond OPAQUE */
  z-index: var(--z-menu);   /* 1000 < header 1100 < burger 1150 */
  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;
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 400;
  color: var(--text);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.menu-mobile a:hover { color: var(--accent); }
.menu-mobile a:last-of-type { border-bottom: 0; }

/* WhatsApp CTA dans le menu : justify-content:center obligatoire (PLAYBOOK 2026-06-25) */
.menu-mobile a.btn-wa {
  display: inline-flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin-top: 28px;
  padding: 0.95rem 1.6rem;
  min-height: 52px;
  background: var(--wa-green);
  color: #fff !important;
  border-radius: var(--r-md);
  font-family: var(--ff-ui);
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 0;
}
.menu-mobile a.btn-wa svg { width: 18px; height: 18px; flex-shrink: 0; }
.menu-mobile a.btn-primary {
  justify-content: center;
  margin-top: 12px;
  padding: 0.85rem 1.4rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--r-md);
  font-family: var(--ff-ui);
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 0;
}

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

/* ─── FOOTER ─── */
.site-footer {
  background: var(--accent-deep);
  color: color-mix(in srgb, #fff 78%, transparent);
  margin-top: 0; /* pas de margin-top (PIÈGE PROD #12) */
  padding: clamp(40px, 6vw, 72px) 0 32px;
}

.site-footer :where(h3, h4) {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.site-footer p, .site-footer li, .site-footer a, .site-footer small {
  color: color-mix(in srgb, #fff 70%, transparent);
  font-size: 0.875rem;
  line-height: 1.7;
}

.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
}

.footer-brand .brand-name-foot {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  display: block;
  margin-bottom: 8px;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, #fff 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom small { font-size: 0.78rem; color: color-mix(in srgb, #fff 45%, transparent); }
.footer-bottom a { font-size: 0.78rem; color: color-mix(in srgb, #fff 55%, transparent); text-decoration: underline; }
.footer-bottom a:hover { color: #fff; }

/* ─── FAB MOBILE ─── */
.fab-call {
  display: none;
}

@media (max-width: 767px) {
  .fab-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 0.85rem 1.8rem;
    background: var(--accent);
    color: #fff;
    border-radius: 50px;
    font-family: var(--ff-ui);
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 40%, transparent);
    z-index: 900;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    animation: fab-pulse 3s ease-in-out infinite;
  }
  .fab-call:hover { background: var(--accent-2); }
  .fab-call svg { flex-shrink: 0; }
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 40%, transparent); }
  50% { box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 60%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .fab-call { animation: none; }
}
