/* ===== NAVBAR (clean) ===== */
.site-header {
  position: fixed;
  top: 40px;
  left: 10px;
  right: 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(12px);
  -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;
}

.site-header.is-after-hero .main-nav a:hover {
  opacity: 1;
}

/* Bouton "Nous contacter" (état par défaut + après-hero) */
.nav-cta .btn.btn-light {
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-dark) !important;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  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;
}

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

.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: InterTight;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: opacity 0.2s ease;
}

.main-nav a:hover {
  opacity: 1;
}

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

/* iPad en portrait (768px max) */
@media (max-width: 768px) {
  .site-header {
    top: 20px;
    left: 8px;
    right: 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: -18px;
  }
}

@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: 1024px) {
  .site-header {
    top: 12px;
    left: 8px;
    right: 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: 500;
    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: -20px;
    flex-shrink: 0;
  }

  .he {
    width: 100%;
  }
}

@media (min-width: 1025px) {
  .nav {
    width: 1240px;
    margin: 0 auto;
    /* pour centrer la nav dans le header */
    height: 54px;
  }
}