/* ============================================================
   LAYOUT.CSS — Eco Pelouse Estrie (GazonQC-inspired, light theme)
   ============================================================ */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Container ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: transparent;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.nav.scrolled,
.nav.nav--solid {
  background: var(--color-bg-dark);
  box-shadow: 0 2px 0 rgba(255,255,255,0.06);
}

.nav .container {
  height: 100%;
}

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

.nav__logo {
  display: flex;
  align-items: center;
  height: 100%;
}
.nav__logo img {
  height: var(--nav-height);
  width: auto;
  display: block;
}

.nav.scrolled .nav__logo img,
.nav.nav--solid .nav__logo img {
  filter: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav__links a {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
  line-height: 1;
  display: flex;
  align-items: center;
}

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

.nav__cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav__cta a {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full) !important;
  padding: var(--space-2) var(--space-6) !important;
  min-height: 44px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
  background: none;
  border: none;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* Mobile overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg-dark);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.nav-overlay.open { opacity: 1; pointer-events: all; }
.nav-overlay a {
  font-family: var(--font-display);
  font-size: var(--text-display-md);
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}
.nav-overlay a:hover { color: var(--color-accent); }

/* ============================================================
   HERO — Full-bleed photo bg, bold text directly on overlay
   ============================================================ */
.hero {
  position: relative;
  height: calc(100vh - var(--nav-height));
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* Top vignette — darkens nav area so white logo/links are always readable */
.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0)    22%
  );
}

/* Main overlay — frame around text handles contrast now, so this is just a light wash */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    108deg,
    rgba(6,14,6,0.70)  0%,
    rgba(6,14,6,0.50)  38%,
    rgba(6,14,6,0.20)  70%,
    rgba(6,14,6,0.05)  100%
  );
}

/* Grain texture — organic outdoor feel */
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.hero__content {
  position: relative;
  z-index: 3;
  padding: var(--space-10) var(--space-10) var(--space-10) var(--space-12);
  max-width: 820px;
  background: rgba(13, 26, 13, 0.5);
  border-radius: var(--radius-md);
  backdrop-filter: none;
  border: 2px solid rgba(13, 26, 13, 0.5);
}

.hero__eyebrow {
  display: inline-block;
  background: none;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 0;
  margin-bottom: var(--space-6);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-6);
}

.hero__title em {
  font-style: normal;
  color: var(--color-accent);
}

.hero__sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.82);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: var(--space-5);
  font-weight: 400;
}

/* Google rating pill — sits beside the primary CTA as a trust signal */
.hero__rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.hero__rating:hover,
.hero__rating:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
  outline: none;
}
.hero__rating-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
}
.hero__rating-logo svg { width: 14px; height: 14px; }
.hero__rating-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}
.hero__rating-text strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
}
.hero__rating-stars { color: var(--color-accent); font-size: 11px; letter-spacing: 1px; }
.hero__rating-meta { color: rgba(255, 255, 255, 0.72); font-weight: 500; }
.hero__rating-arrow {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.2s ease;
}
.hero__rating:hover .hero__rating-arrow,
.hero__rating:focus-visible .hero__rating-arrow { transform: translateX(3px); }

/* Hero service pills — quick scan of what Xavier offers, sits between subtitle and CTAs */
.hero__services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-8) 0;
}

.hero__services li {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ============================================================
   FEATURE BAR — 3-icon strip just below hero (GazonQC style)
   ============================================================ */
.feature-bar {
  background: var(--color-primary);
  padding: var(--space-6) 0;
}

.feature-bar__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.15);
}

.feature-bar__item {
  background: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-8);
}

.feature-bar__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.feature-bar__text strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.feature-bar__text span {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
}

/* ============================================================
   SECTIONS — alternating white / green / dark
   ============================================================ */
.section {
  padding: var(--space-20) 0;
}

.section--white  { background: var(--color-bg); }
.section--alt    { background: var(--color-bg-alt); }
.section--green  { background: var(--color-primary); color: #fff; }
.section--green .section__title { color: #fff; }
.section--green .section__eyebrow { color: var(--color-accent); }
.section--green .section__sub { color: rgba(255,255,255,0.75); }

/* Lighter green band — same brand palette, less heavy. Used for page-header
   hero strips where a full dark-green block would feel too dominant.
   Body text is dark for contrast; eyebrow stays brand yellow. */
.section--green-light { background: var(--color-primary-light); color: var(--color-text); }
.section--green-light .section__title { color: var(--color-text); }
.section--green-light .section__eyebrow { color: var(--color-accent); }
.section--green-light .section__sub { color: rgba(0,0,0,0.75); }
.section--dark   { background: var(--color-bg-dark); }

/* Section header */
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section__eyebrow::before {
  content: '— ';
  letter-spacing: 0;
  opacity: 0.6;
}

/* Larger eyebrow variant — used on page-header sections (e.g. contact hero)
   where the eyebrow would otherwise read too small next to a giant title. */
.section__eyebrow--lg {
  font-size: 1.25rem; /* 20px */
  letter-spacing: 0.14em;
  margin-bottom: var(--space-4);
}
.section__eyebrow--lg::before {
  content: none;
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-display-md);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.section__title--white { color: #fff; }
.section__title--accent { color: var(--color-accent); }

.section__sub {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 560px;
}

.section__sub--white { color: rgba(255,255,255,0.75); }

.section__header { margin-bottom: var(--space-12); }
.section__header--center { text-align: center; }
.section__header--center .section__sub { margin: 0 auto; }

/* ============================================================
   SERVICES GRID
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  background: transparent;
}

.services-grid--2row {
  grid-template-columns: repeat(2, 1fr);
  max-width: 800px;
  margin: var(--space-6) auto 0;
}

/* ============================================================
   ABOUT — two-col
   ============================================================ */
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.about__photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* Single-photo variant — used when the about section features one hero portrait */
.about__photos--single {
  grid-template-columns: 1fr;
}
.about__photos--single .about__photo { aspect-ratio: 1/1; }
.about__photos--single .about__photo:first-child { margin-top: 0; }
.about__photos--single .about__photo img { object-position: center; }

.about__photo {
  overflow: hidden;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md, 6px);
}
.about__photo:first-child { margin-top: var(--space-8); }
.about__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform var(--transition-base);
}
.about__photo:hover img { transform: scale(1.04); }

.about__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.about__text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ============================================================
   BEFORE/AFTER — full-width strip
   ============================================================ */
.slider-section {
  padding: var(--space-20) 0;
  background: var(--color-bg-alt);
}

.slider-section__inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-16);
  align-items: center;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.gallery-strip__item {
  overflow: hidden;
  aspect-ratio: 1;
}

.gallery-strip__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-strip__item:hover img { transform: scale(1.06); }

/* ============================================================
   REVIEWS — dark bg, quote style
   ============================================================ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: var(--color-primary-light);
  padding: var(--space-16) 0;
}

.cta-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.cta-banner__text .cta-banner__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  text-transform: uppercase;
  color: #000;
  line-height: 1.0;
  letter-spacing: 0.01em;
}

.cta-banner__text .cta-banner__sub {
  font-size: var(--text-base);
  color: rgba(0,0,0,0.65);
  margin-top: var(--space-2);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-bg-deep);
  padding: var(--space-12) 0 var(--space-8);
  border-top: 4px solid var(--color-accent);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: var(--space-6);
}

.footer__logo a {
  display: inline-block;
  transition: opacity 0.2s ease;
}
.footer__logo a:hover { opacity: 0.85; }

.footer__logo img {
  height: 80px;
  width: auto;
  margin-bottom: var(--space-4);
  display: block;
}

.footer__tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 260px;
}

.footer__heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.footer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__list a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  transition: color var(--transition-fast);
}
.footer__list a:hover { color: var(--color-accent); }

/* Social row — clickable platform icon + readable URL */
.footer__socials a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer__social-icon {
  flex-shrink: 0;
  transition: filter var(--transition-fast), transform var(--transition-fast);
}
/* Brand-colored social icons. Instagram uses its iconic gradient pink as the
   most recognizable solid (real gradient via SVG defs would mean 5 separate
   HTML edits — solid #E1306C reads as Instagram instantly). Facebook uses
   its signature blue. */
.footer__socials li:nth-child(1) .footer__social-icon { color: #E1306C; }
.footer__socials li:nth-child(2) .footer__social-icon { color: #1877F2; }
.footer__socials a:hover .footer__social-icon { filter: brightness(1.15); transform: translateY(-1px); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.25);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .slider-section__inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
  .about__inner {
    grid-template-columns: 1fr;
  }
  .about__photos { order: -1; }
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile-only nav link to the Avant/Après section (homepage only).
   Hidden by default; revealed inside the mobile @media block where flexbox
   space-between on .nav__inner auto-centers it between the logo and the
   right-side CTA group. */
.nav__mobile-link {
  display: none;
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  /* On mobile: collapse phone CTA to icon-only to avoid hamburger overlap */
  .nav__cta .btn {
    padding: var(--space-2) !important;
    min-width: 44px;
    width: 44px;
    height: 44px;
    justify-content: center;
    gap: 0;
  }
  .nav__cta-label {
    display: none;
  }

  /* Mobile: reveal the "Voir nos résultats" link as a direct flex child of
     .nav__inner. Combined with justify-content: space-between on .nav__inner
     and the 3 visible children (logo, mobile-link, .nav__cta), flexbox auto-
     centers the mobile-link in the actual visual gap between logo and CTA
     group — even though the two side groups have different widths. */
  .nav__mobile-link {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  .nav__mobile-link:hover,
  .nav__mobile-link:active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.65);
  }

  .hero__content {
    padding: var(--space-8) var(--space-6) var(--space-8) var(--space-8);
  }

  .hero__title {
    font-size: clamp(2.2rem, 9vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: var(--space-5);
  }

  .hero__eyebrow {
    margin-bottom: var(--space-4);
  }

  .hero__sub {
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
  }

  .feature-bar__inner { grid-template-columns: 1fr; }

  .services-grid {
    grid-template-columns: 1fr;
  }
  .services-grid--2row {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .reviews-grid { grid-template-columns: 1fr; }

  .cta-banner__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn--lg { width: 100%; justify-content: center; }
  .gallery-strip { grid-template-columns: repeat(2, 1fr); }

  /* CTA banner title is long uppercase — scale it down on small screens
     so it doesn't push past the viewport (~11px overflow on 375px before). */
  .cta-banner__text .cta-banner__title {
    font-size: clamp(1.4rem, 6vw, 2rem);
    word-wrap: break-word;
  }

  /* The btn--xl CTA inside the banner has white-space: nowrap + large padding,
     forcing it ~367px wide and breaking past 375px viewport. Make it shrink
     to its container on mobile (matches the existing rule for btn--lg). */
  .cta-banner .btn--xl {
    width: 100%;
    justify-content: center;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* ============================================================
   EYEBROW — contrast fix on light backgrounds
   #F9C418 (accent yellow) fails 4.5:1 on white/alt (ratio ~1.6:1)
   Switch to primary green (#2E7D32) which passes at ~4.97:1
   ============================================================ */
.section--white .section__eyebrow,
.section--alt .section__eyebrow,
.slider-section .section__eyebrow {
  color: var(--color-primary);
}

/* ============================================================
   FADE-IN
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1);
  will-change: opacity, transform;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in--delay-1 { transition-delay: 0.08s; }
.fade-in--delay-2 { transition-delay: 0.16s; }
.fade-in--delay-3 { transition-delay: 0.24s; }
.fade-in--delay-4 { transition-delay: 0.32s; }

/* ============================================================
   REDUCED MOTION — respect user preference
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .gallery-strip__item img,
  .about__photo img {
    transition: none;
  }
  .reviews-ticker__track {
    animation: none;
  }
  .btn {
    transition: none;
  }
}
