/* Refonte header compacte : logo + menu + CTAs sur une seule rangee, trait conserve en bas */
nav > div.mx-auto {
  display: flex !important;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid rgb(44, 67, 62);
  padding-bottom: 0.75rem;
}

/* Le bloc logo + menu (anciennement sous le trait) prend l'espace restant */
nav > div.mx-auto > div.border-t {
  border-top: 0 !important;
  padding-top: 0 !important;
  flex: 1 1 auto !important;
  min-width: 0;
}

/* Les CTA (Parler a un expert / Contact) : compact, sans marge basse, pousses a droite */
nav > div.mx-auto > ul.mb-6 {
  margin-bottom: 0 !important;
  flex: 0 0 auto !important;
  order: 2;
}

/* Reduction du padding vertical de la nav pour limiter la hauteur */
nav.lg\:py-6 {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

/* Centrer le menu principal ("Nos solutions / Votre secteur / Tarifs")
   horizontalement par rapport à la largeur totale de la nav (desktop only).
   Logo reste à gauche, CTAs restent à droite, le menu est extrait du flow
   et centré via position: absolute. */
@media (min-width: 1024px) {
  nav > div.mx-auto {
    position: relative !important;
  }
  nav > div.mx-auto ul.lg\:flex-row.lg\:justify-end {
    position: absolute !important;
    left: 50% !important;
    /* Align vertically with the other nav items, which are centered on the
       content area of `div.mx-auto`. That content area is shifted 6px up
       from the 50% reference because we added `padding-bottom: 0.75rem`
       (12px) for the trait separator — hence the -6px nudge. */
    top: calc(50% - 6px) !important;
    transform: translate(-50%, -50%) !important;
    justify-content: center !important;
    width: max-content;
  }
}

/* La premiere section avait pt-52/pt-64 (256px) calibre pour le nav original de 177px.
   Avec le nouveau nav plus petit, on reduit pour garder ~35px d'air sous le trait. */
main > .page > section:first-child,
main section.pt-52,
main section.lg\:pt-64 {
  padding-top: 8rem !important; /* 128px, soit ~35px sous le nav de 93px */
}

/* Certaines pages (ex: /fr/tarifs) ont une premiere section en my-16/my-48
   au lieu de pt-52/pt-64 — le margin-top pousse le contenu ~192px plus bas.
   On neutralise uniquement le TOP (on garde my-* pour l'espace inter-sections). */
main > .page > section:first-child {
  margin-top: 0 !important;
}

/* Pricing page anti-flash: hide the cards grid until our JS has inserted the
   CS CARBONE card and patched CS ENTREPRISE features. The selector matches
   a grid whose direct children carry the pricing-card signature classes.
   `:has()` is widely supported since Chrome/Edge/Safari/Firefox 2023. */
div.md\:grid-cols-2:has(> .bg-background-dark.rounded-lg),
div.md\:grid-cols-3:has(> .bg-background-dark.rounded-lg) {
  visibility: hidden;
}
html[data-cs-cards-ready] div.md\:grid-cols-2:has(> .bg-background-dark.rounded-lg),
html[data-cs-cards-ready] div.md\:grid-cols-3:has(> .bg-background-dark.rounded-lg) {
  visibility: visible;
}

/* Language <select>: match the dark-green, borderless style of the other
   header dropdowns. Native <option> elements can only be partially styled
   (rendering depends on OS/browser), but background-color + color are
   widely honoured. */
nav select {
  /* Au repos : arrière-plan transparent, aucune bordure — fond de la nav. */
  background-color: transparent !important;
  color: var(--color-text-light, rgb(253, 252, 251));
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0.25rem 0.5rem;
}
nav select:focus,
nav select:focus-visible,
nav select:hover,
nav select:active {
  background-color: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}
nav select option {
  /* Le dropdown ouvert : fond un cran plus sombre, comme les autres menus. */
  background-color: var(--color-background-dark, rgb(15, 35, 31));
  color: var(--color-text-light, rgb(253, 252, 251));
  border: 0;
}

