/* ===== NAVBAR (clean) ===== */
.site-header {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  padding: 0 10px;
  z-index: 50;
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

/* État par défaut : translucide au-dessus de la hero */
.nav {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  /* logo | nav | (option) burger | CTA */
  align-items: center;
  /* gap: 18px; */

  background: rgba(255, 255, 255, 0.16) !important;
  /* WHITE 16% */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(12px);

  /* border: 1px solid rgba(255, 255, 255, 0.24); */
  border-radius: 6px;

  padding: 6px 10px;

  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Après-hero : nav quasi blanche */
.site-header.is-after-hero .nav {
  background: #EDEFF2 !important;
  /* blanc quasi plein */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  /* border: 1px solid rgba(0, 0, 0, 0.06); */
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

/* Couleurs liens en après-hero */
.site-header.is-after-hero .main-nav a {
  color: var(--blue-dark);
  opacity: 0.85;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  padding: 8px 12px;
  border-radius: 4px;
}

.site-header.is-after-hero .main-nav a:hover {
  opacity: 1;
  background-color: var(--Color-Blue-08, rgba(29, 48, 87, 0.08));
}

/* Bouton "Nous contacter" (état par défaut + après-hero) */
.nav-cta .btn.btn-light {
  white-space: nowrap;
  background: #f5f7fb;
  color: var(--blue-dark) !important;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 400;
  height: 38px;
  width: 138px;
}

.site-header.is-after-hero .nav-cta .btn.btn-light {
  background-color: var(--blue-dark) !important;
  color: var(--white-pure) !important;
  border: none;
}

/* Hover inversé pour le bouton nav-cta */
.nav-cta .btn.btn-light:hover {
  background-color: var(--blue-dark) !important;
  color: #f5f7fb !important;
  transition: background-color 0.25s ease, color 0.25s ease;
}


/* Hover pour le bouton nav après-hero avec voile blanc léger */
.site-header.is-after-hero .nav-cta .btn.btn-light {
  position: relative; /* nécessaire pour ::after */
  overflow: hidden;   /* pour contenir le pseudo-élément */
}

.site-header.is-after-hero .nav-cta .btn.btn-light::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    var(--White-Opacities-White-16, rgba(255, 255, 255, 0.16)),
    var(--White-Opacities-White-16, rgba(255, 255, 255, 0.16))
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-header.is-after-hero .nav-cta .btn.btn-light:hover::after {
  opacity: 1;
}



/* Logo + swap blanc/couleur */
.logo img {
  width: 138px;
  height: 26px;
  object-fit: contain;
  display: block;
  transition: opacity .2s ease;
  margin-left: -17px;
  flex-shrink: 0;
}

.logo .logo-color {
  display: none;
}

.site-header.is-after-hero .logo .logo-white {
  display: none;
}

.site-header.is-after-hero .logo .logo-color {
  display: block;
}

/* Navigation liens */
.main-nav {
  display: flex;
  justify-content: center;
  /* gap: 28px; */
  font-family: Inter Tight, sans-serif;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 400;
  font-size: 16px;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  padding: 8px 12px;
  border-radius: 4px;
}

.main-nav a:hover {
  opacity: 1;
  background-color: var(--White-Opacities-White-16, rgba(255, 255, 255, 0.16));
;
}

/* ===== Responsive ===== */

/* Mobile très petit (≤ 380px) */
@media (max-width: 380px) {
  .site-header {
    top: 12px;
    padding: 0 6px;
  }

  .nav {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 6px 8px;
    gap: 8px;
  }

  .main-nav {
    display: none !important;
  }

  .logo img {
    width: 90px;
    height: 16px;
    margin-left: 0;
  }

  .nav-cta .btn.btn-light {
    width: auto;
    padding: 6px 10px;
    font-size: 12px;
    height: 34px;
    flex-shrink: 0;
  }
}

/* iPad en portrait (768px max) */
@media (max-width: 768px) {
  .site-header {
    top: 20px;
    padding: 0 8px;
  }

  /* Grille mobile : logo | espace | CTA */
  .nav {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 8px 12px;
  }

  /* On masque la navigation centrale en mobile/portrait */
  .main-nav {
    display: none !important;
  }

  /* CTA collé à droite */
  .nav-cta {
    justify-self: end;
  }

  /* Le bouton garde sa taille au contenu */
  .nav-cta .btn {
    display: inline-flex;
    white-space: nowrap;
  }

  .he {
    width: min(100%, var(--container));
    margin-inline: inherit;
  }

  /* Réduction du bouton pour petit écran */
  .nav-cta .btn.btn-light {
    width: auto;
    padding: 8px 12px;
    font-size: 13px;
    height: 36px;
  }

  /* Logo réduit */
  .logo img {
    width: 110px;
    height: 20px;
    margin-left: -14px;
  }
}

/* Petit mobile (≤ 475px) */
@media (max-width: 475px) {
  .site-header {
    top: 16px;
    padding: 0 8px;
  }

  .nav {
    padding: 6px 10px;
    gap: 6px;
  }

  .logo img {
    width: 100px;
    height: 18px;
    margin-left: -14px;
  }

  .nav-cta .btn.btn-light {
    padding: 6px 10px;
    font-size: 12px;
    height: 34px;
    border-radius: 4px;
  }
}

@media (max-width: 520px) {
  .nav {
    padding: 8px 10px;
  }

  .btn {
    padding: 9px 12px;
  }

  /* Logo très réduit pour petit mobile */
  .logo img {
    width: 100px;
    height: 18px;
  }

  .nav-cta .btn.btn-light {
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* iPad en paysage / Tablette (769px à 1024px) */
@media (min-width: 769px) and (max-width: 1256px) {
  .site-header {
    top: 12px;
    padding: 0 8px;
  }

  .nav {
    grid-template-columns: auto 1fr auto;
    padding: 10px 12px;
    height: auto;
    min-height: 52px;
    align-items: center;
    /* gap: 16px; */
  }

  /* Navigation affichée en paysage avec meilleur espacement */
  .main-nav {
    display: flex !important;
    gap: 18px;
    font-size: 13px;
    justify-content: center;
    align-items: center;
  }

  .main-nav a {
    font-size: 13px;
    font-weight: 400;
    padding: 8px 0;
    white-space: nowrap;
  }

  /* Bouton adapté pour tablet */
  .nav-cta .btn.btn-light {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
    height: 38px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .logo img {
    width: 110px;
    height: 21px;
    margin-left: -14px;
    flex-shrink: 0;
  }

  .he {
    width: 100%;
  }
}

@media (min-width: 1279px) {
  .site-header {
    padding: 0;
  }
  
  .nav {
    width: 100%;
    margin: 0 auto;
    /* pour centrer la nav dans le header */
    height: 54px;
  }
}
#benefices {
  scroll-margin-top: 74px; /* adapte selon la hauteur de ton header */
}
#gamme {
  scroll-margin-top: 74px; /* adapte selon la hauteur de ton header */
}
#engagements {
  scroll-margin-top: 74px; /* adapte selon la hauteur de ton header */
}
#faq {
  scroll-margin-top: 74px; /* adapte selon la hauteur de ton header */
}
#ambition {
  scroll-margin-top: 0px; /* adapte selon la hauteur de ton header */
}

