/* Shared navigation — canonical source */
.nav {
  position: fixed; top: 20px; left: 0; right: 0;
  z-index: 1000;
  display: flex; align-items: center; gap: 6px;
  margin: 0 auto;
  background: var(--overlay-nav);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--radius-pill);
  padding: 6px 7px 6px var(--space-4);
  box-shadow: var(--shadow-dark);
  transition: background .25s, box-shadow .25s;
  width: fit-content;
  max-width: min(calc(100% - 32px), var(--container-wide));
  min-height: 52px;
}
.nav.scrolled { background: var(--overlay-nav-strong); }
.nav-inner { display: contents; }
.nav-logo {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; min-width: 0;
  width: 82px; height: 82px; padding: 14px;
  background: var(--color-primary);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
  margin: -21px 14px -21px -16px;
  transition: opacity .2s, transform .2s, box-shadow .2s;
}
.nav-logo:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.34); }
.nav-logo img { width: 100%; height: 100%; max-height: none; object-fit: contain; filter: brightness(0) invert(1); }
.nav-links {
  display: flex; gap: 4px; align-items: center;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,.78); font-size: var(--type-nav-size); font-weight: var(--font-weight-medium);
  padding: 8px 14px; border-radius: var(--radius-pill);
  transition: color .2s, background .2s;
  white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-divider { width: 1px; height: 18px; background: rgba(255,255,255,.16); margin: 0 6px; flex-shrink: 0; }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-nav {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--color-primary); color: #fff;
  border-radius: var(--radius-pill); padding: 9px 20px;
  font-size: var(--type-button-size); font-weight: var(--font-weight-semibold);
  min-height: var(--control-height-sm);
  transition: opacity .2s, transform .2s;
}
.btn-nav:hover { opacity: .88; transform: translateY(-1px); }
.btn-nav svg { flex-shrink: 0; }

/* Shared WhatsApp CTA — product heroes + mobile homepage hero */
.product-whatsapp-cta { display: inline-flex; align-items: center; gap: 0; width: auto; min-width: 300px; max-width: 380px; height: 76px; padding: 0; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.45); background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font-size: 18px; font-weight: 700; line-height: 1; white-space: nowrap; margin-inline: auto; transition: background .25s, border-color .25s, transform .25s, box-shadow .25s; }
.product-whatsapp-cta:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.62); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.product-whatsapp-cta__icon { flex: 0 0 auto; width: 76px; height: 76px; margin-left: -4px; border-radius: 50%; background: #25D366; color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(37,211,102,.35); }
.product-whatsapp-cta__icon svg { width: 32px; height: 32px; display: block; fill: currentColor; }
.product-whatsapp-cta__label { flex: 1; display: flex; justify-content: center; align-items: center; padding: 0 24px; text-transform: uppercase; }

.nav-burger {
  display: none; width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-pill); color: #fff;
  border: 0; background: transparent; cursor: pointer;
  min-width: 44px; min-height: 44px;
}
.nav-burger:hover { background: rgba(255,255,255,.08); }
.nav-drawer {
  display: none; position: fixed; top: 76px; left: 12px; right: 12px;
  background: rgba(10,16,28,.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-xl); padding: 16px;
  flex-direction: column; gap: 4px; z-index: 99;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.85);
  transition: background .15s;
}
.nav-drawer a:hover { background: rgba(255,255,255,.08); color: #fff; }

.nav-drawer .nav-drawer-cta {
  margin-top: var(--space-2);
  min-height: var(--control-height-md);
  justify-content: center;
  color: var(--color-white);
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  font-weight: var(--font-weight-semibold);
  text-align: center;
}
.nav-drawer .nav-drawer-cta:hover { background: var(--color-primary-hover); }

/* Footer — canonical source */
footer { background: var(--color-surface-soft); padding: var(--section-space-compact) 0 var(--space-6); color: var(--color-text); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: var(--space-12); margin-bottom: var(--space-14); }
.foot-logo { width: 120px; height: auto; display: block; margin-bottom: 12px; }
.foot-brand p { color: var(--color-text-muted); font-size: .83rem; line-height: 1.7; max-width: 220px; margin-bottom: 20px; }
.foot-socials { display: flex; gap: 10px; }
.foot-social { width: 34px; height: 34px; border-radius: 8px; background: rgba(15,27,45,.07); border: 1px solid rgba(15,27,45,.1); display: flex; align-items: center; justify-content: center; color: rgba(15,27,45,.5); transition: all .2s; }
.foot-social:hover { background: rgba(15,27,45,.13); color: var(--color-text); border-color: rgba(15,27,45,.2); }
  footer h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--color-primary); margin-bottom: 28px; }
  .foot-list { display: flex; flex-direction: column; gap: 20px; list-style: none; }
.foot-list a { font-size: .85rem; color: var(--color-text-muted); transition: color .2s; min-height: 44px; display: inline-flex; align-items: center; }
.foot-list a:hover { color: var(--color-text); }
.foot-contact-desc { color: var(--color-text-muted); font-size: .82rem; line-height: 1.6; margin-bottom: 18px; }
.foot-contact-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(15,27,45,.04); border: 1px solid rgba(15,27,45,.08); color: rgba(15,27,45,.65); font-size: .83rem; font-weight: 500; transition: all .2s; margin-bottom: 8px; min-height: 44px; overflow-wrap: anywhere; }
.foot-contact-item:last-child { margin-bottom: 0; }
.foot-contact-item:hover { background: rgba(15,27,45,.09); border-color: rgba(15,27,45,.18); color: var(--color-text); }
.foot-contact-item svg { flex-shrink: 0; opacity: .5; }
/* Legal footer: readable credit plus a consistently aligned two-column link grid. */
.foot-bottom { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "credit" "mentions" "cgv" "privacy" "cookies"; gap: 12px; width: 100%; margin-inline: 0; padding: 24px; border-radius: 26px; background: var(--color-navy); color: #fff; text-align: center; }
.foot-bottom-credit { grid-area: credit; display: block; margin: 0 0 6px; color: #fff; font-size: 13px; line-height: 1.55; }
.foot-bottom-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foot-bottom-credit a:hover { color: #fff; }
.foot-legal-link { width: 100%; min-height: 42px; padding: 9px 14px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 999px; background: var(--color-primary); color: #fff; font-size: .76rem; font-weight: 600; line-height: 1.25; text-align: center; transition: background .2s, box-shadow .2s; }
.foot-legal-link:hover { background: var(--color-primary-hover); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.22); }
.foot-legal-link--mentions { grid-area: mentions; }
.foot-legal-link--cgv { grid-area: cgv; }
.foot-legal-link--privacy { grid-area: privacy; }
.foot-legal-link--cookies { grid-area: cookies; }

/* Desktop (>1024px): tighten footer column headings to their link lists */
@media (min-width: 1025px) {
  footer h4 { margin-bottom: 20px; }
  .foot-list { gap: 8px; }
  .foot-list a {
    min-height: 30px;
    line-height: 1.35;
  }
}

/* Desktop: 40% credit, then two equal legal-link columns. */
@media (min-width: 1024px) {
  .foot-bottom {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1.5fr);
    grid-template-areas:
      "credit mentions cgv"
      "credit privacy cookies";
    align-items: center;
    column-gap: 16px;
    row-gap: 10px;
    padding: 22px 28px;
    text-align: left;
  }
  .foot-bottom-credit {
    align-self: center;
    margin: 0;
    min-width: 0;
    font-size: 14px;
    text-align: left;
  }
  .foot-legal-link { min-height: 40px; padding: 8px 12px; font-size: .72rem; }
}

/* Narrower desktops: shrink to keep a single row without horizontal overflow */
@media (min-width: 1024px) and (max-width: 1240px) {
  .foot-bottom { column-gap: 12px; padding: 20px 22px; }
  .foot-bottom-credit { font-size: 13px; }
  .foot-legal-link { min-height: 38px; padding: 7px 10px; font-size: .67rem; }
}

/* Skip link */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  color: #fff;
  background: var(--color-navy);
  border-radius: var(--radius-pill);
  transform: translateY(-150%);
  transition: transform .2s;
}
.skip-link:focus { transform: translateY(0); }

/* Global focus */
:focus-visible {
  outline: 3px solid var(--color-focus) !important;
  outline-offset: 3px !important;
}

/* Touch targets */
.nav-burger,
.filter-btn,
.hero-badge,
.hiw-tab,
.why-nav-btn,
.why-nav button,
.testi-arrow,
.calc-cta-btn,
.assistant-launcher,
.assistant-close,
.assistant-option,
.faq-question { min-width: 44px; min-height: 44px; }
.calc-surf-slider { min-height: 44px; }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
}
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span[aria-hidden="true"] { opacity: .55; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 22px;
}

.catalog-unavailable {
  cursor: not-allowed;
}

/* Legal pages */
.legal-main { max-width: var(--container-reading-wide); margin: 0 auto; padding: 150px var(--page-gutter) var(--section-space-standard); }
.legal-main h1 { font-size: var(--type-display-page-size); font-weight: var(--font-weight-medium); line-height: var(--leading-display); letter-spacing: var(--tracking-display); margin-bottom: var(--space-8); }
.legal-main h2 { margin: var(--space-10) 0 var(--space-3); font-size: var(--type-heading-sm-size); font-weight: var(--font-weight-semibold); }
.legal-main p, .legal-main li { color: var(--color-text-muted); line-height: 1.75; }
.legal-notice { padding: var(--space-5); border: 1px solid var(--color-primary-border); background: var(--color-error-soft); border-radius: var(--radius-md); margin-bottom: var(--space-8); }

/* Canonical shared geometry */
html { scroll-padding-top: 92px; overflow-x: clip; }
body { min-width: 0; color: var(--color-text); font-family: var(--font-family-primary); line-height: var(--leading-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }

.container { width: min(100%, calc(var(--container-main) + (2 * var(--page-gutter)))); margin-inline: auto; padding-inline: var(--page-gutter); }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .12s; }
.reveal-d2 { transition-delay: .24s; }
.reveal-d3 { transition-delay: .36s; }

/* Shared responsive nav */
@media (max-width: 767px) {
  /* ===== Two-level mobile header (phones only; tablet keeps the desktop menu) ===== */
  /* Top row: [ logo ] .......... [ CTA ][ burger ] */
  .nav-links, .nav-divider { display: none !important; }
  .nav-burger { display: flex !important; }
  /* Parent = layout only, no pill background: [ RED LOGO ][ DARK MENU BODY ] */
  .nav {
    top: calc(20px + env(safe-area-inset-top));
    width: calc(100% - 32px); max-width: none; height: 62px; min-height: 0;
    margin: 0 auto;
    padding: 0; gap: 0; box-sizing: border-box;
    background: transparent; border: 0; box-shadow: none; border-radius: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .nav.scrolled { background: transparent; }
  /* Logo: fixed-width block, not resized */
  .nav-logo { position: relative; z-index: 2; width: 68px; height: 78px; padding: 10px; border-radius: 16px; margin: 0 0 0 16px; box-shadow: 0 8px 20px rgba(0,0,0,.30); }
  /* Dark menu body: second flex item, starts at the logo's right edge */
  .nav-right {
    position: relative; z-index: 1;
    flex: 1; margin-left: -22px; align-self: stretch;
    align-items: center; justify-content: flex-end; gap: 8px;
    padding: 0 10px 0 36px;
    background: var(--overlay-nav);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 14px 999px 999px 14px;
    box-shadow: var(--shadow-dark);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  }
  .nav.scrolled .nav-right { background: var(--overlay-nav-strong); }
  .nav-right .btn-nav {
    display: inline-flex !important;
    height: 38px; min-height: 38px; padding: 0 15px; gap: 0;
    font-size: 13px; white-space: nowrap;
  }
  .nav-burger { width: 44px; height: 44px; }
  .nav-burger svg { width: 24px; height: 24px; }

  /* Mobile drawer: hidden by default, slides in from the right when opened */
  .nav-drawer {
    display: flex !important;
    position: fixed; top: calc(82px + env(safe-area-inset-top)); left: auto; right: 12px;
    width: min(330px, calc(100vw - 24px));
    flex-direction: column; align-items: stretch; gap: 4px;
    max-height: calc(100vh - 150px); padding: 14px; overflow-y: auto;
    border-radius: 22px;
    background: rgba(10,18,32,.92);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 16px 46px rgba(0,0,0,.40);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(100% + 18px));
    transition: opacity .28s ease, transform .42s cubic-bezier(.16, 1, .3, 1);
    z-index: 90;
  }
  .nav-drawer::before { display: none; }
  .nav-drawer.open { opacity: 1; pointer-events: auto; transform: translateX(0); }
  .nav-drawer a { opacity: 1; transform: none; transition: background .15s; }
  .nav-drawer .nav-drawer-cta { display: none !important; } /* no duplicate CTA in the opened menu */
}

@media (max-width: 767px) {
  .nav { width: calc(100% - 24px); }
  .nav-drawer { right: 12px; left: auto; }
  /* Full-bleed hero/header images on mobile — edge to edge, no side gaps, no top radius */
  .hero, .contact-hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
    border-radius: 0;
  }
  body:not([data-product]) .hero {
    border-radius: 0 0 44px 44px;
  }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7) var(--space-4); text-align: center; }
  .foot-brand, .foot-grid > :nth-child(4) { grid-column: 1 / -1; }
  .foot-logo, .foot-brand p { margin-inline: auto; }
  .foot-socials, .foot-contact-item { justify-content: center; }
  .foot-list { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); max-width: none; margin-inline: auto; }
  .foot-list a { min-height: 28px; justify-content: center; font-size: .84rem; line-height: 1.25; }
  footer h4 { margin-bottom: var(--space-3); }
  .foot-bottom { padding: 22px 20px; gap: 12px; }
  .foot-bottom-credit { margin-bottom: 6px; }
  .foot-legal-link { width: 100%; min-height: 44px; padding: 10px 14px; }
}

@media (max-width: 420px) {
  .nav { width: calc(100% - 20px); }
  .nav-drawer { right: 10px; left: auto; }
  /* Tighten the CTA on very small phones so the row never overflows */
  .nav-right .btn-nav { padding: 0 13px; font-size: 13px; }
}

@media (max-width: 389px) {
  /* Shorten the visible CTA label to "Devis" on the smallest phones.
     Text hidden via font-size:0; accessible name ("Demander un devis") stays in the DOM. */
  .nav-right .btn-nav { font-size: 0; padding: 0 18px; }
  .nav-right .btn-nav::after { content: "Devis"; font-size: 13px; font-weight: var(--font-weight-semibold); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .gsap-hero > * { opacity: 1 !important; transform: none !important; }
}

/* Footer social links (ClimaPlus settings → Réseaux sociaux) */
.foot-socials { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.foot-socials a { font-size: 13px; color: var(--color-text-muted); }
.foot-socials a:hover { color: var(--color-primary); }
