/* Shared refinements for the Expertises / Solutions selectors and final CTA. */
body:is(.editorial-page--expertises, .editorial-page--solutions) {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

.hover-reveal-selector__cta {
  min-height: 2.25rem !important;
  padding: 0.375rem 1.125rem !important;
}

body:is(.editorial-page--expertises, .editorial-page--solutions) main .hover-reveal-selector .hover-reveal-selector__cta:is(:hover,:focus,:focus-visible) {
  background: var(--editor-mistral-primary, #172542) !important;
  border-color: var(--editor-mistral-primary, #172542) !important;
  color: var(--editor-site-background, #f9f7f7) !important;
}
body:is(.editorial-page--expertises, .editorial-page--solutions) main .hover-reveal-selector .hover-reveal-selector__cta:is(:hover,:focus,:focus-visible) > span {
  color: var(--editor-site-background, #f9f7f7) !important;
  border-color: currentColor;
}

body:is(.editorial-page--expertises, .editorial-page--solutions) main > .section--soft {
  background: var(--editor-site-background) !important;
  padding-top: 32px;
  padding-bottom: 32px;
}

/* Editorial hero variant using the animated Mistral wave. */
.page-hero[data-editorial-wave-hero] {
  position: relative;
  isolation: isolate;
  height: auto;
  min-height: clamp(21rem, 42svh, 28rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-block-end: 0 !important;
  background: var(--editor-site-background) !important;
  color: var(--editor-mistral-primary) !important;
}

/* Main Expertises / Solutions listing heroes only. */
body:is(.editorial-page--expertises, .editorial-page--solutions)
  .page-hero[data-editorial-wave-hero] {
  padding-top: 100px !important;
  padding-bottom: 0 !important;
}

.page-hero[data-editorial-wave-hero]::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(249 247 247 / 88%) 0%, rgb(249 247 247 / 54%) 40%, transparent 70%),
    linear-gradient(0deg, var(--editor-site-background) 0%, rgb(249 247 247 / 96%) 16%, rgb(249 247 247 / 58%) 38%, transparent 68%);
  pointer-events: none;
}

.page-hero[data-editorial-wave-hero] .editorial-hero__wave {
  position: absolute;
  z-index: 0;
  inset: -24svh 0 auto;
  width: 100%;
  height: 100svh;
  min-height: 42rem;
  opacity: 0;
  transition: opacity 1.8s ease;
}

/* The editorial heroes sit beneath the same transparent header as the home hero. */
body:is(.editorial-page--expertises, .editorial-page--solutions, .editorial-page--why) .site-header[data-site-header] {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  width: 100%;
  border-block-end-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease, backdrop-filter .35s ease;
}

body:is(.editorial-page--expertises, .editorial-page--solutions, .editorial-page--why) .site-header[data-site-header][data-home-scrolled="true"],
body:is(.editorial-page--expertises, .editorial-page--solutions, .editorial-page--why) .site-header[data-site-header]:has(.primary-nav__item--has-menu:hover),
body:is(.editorial-page--expertises, .editorial-page--solutions, .editorial-page--why) .site-header[data-site-header]:has(.primary-nav__item--has-menu:focus-within) {
  border-block-end-color: var(--editor-mistral-highlight);
  background: color-mix(in srgb, var(--color-background, var(--editor-site-background)) 96%, transparent);
  box-shadow: 0 .35rem 1.4rem color-mix(in srgb, var(--editor-mistral-primary) 5%, transparent);
  backdrop-filter: blur(1rem);
}

@media (max-width: 75rem) {
  body:is(.editorial-page--expertises, .editorial-page--solutions, .editorial-page--why) .site-header[data-site-header]:has(.primary-nav[data-open="true"]) {
    border-block-end-color: var(--editor-mistral-highlight);
    background: var(--color-background, var(--editor-site-background));
  }
}

.page-hero[data-editorial-wave-hero] .editorial-hero__wave.is-ready { opacity: 1; }
.page-hero[data-editorial-wave-hero] > .container { position: relative; z-index: 2; }
.page-hero[data-editorial-wave-hero] .page-hero__layout { margin: 0; }
.page-hero[data-editorial-wave-hero] .page-hero__copy {
  position: relative;
  isolation: isolate;
  max-width: 62rem;
}
.page-hero[data-editorial-wave-hero] .page-hero__copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -4rem -7rem;
  background: radial-gradient(ellipse at 32% 48%, rgb(249 247 247 / 98%) 0%, rgb(249 247 247 / 88%) 32%, rgb(249 247 247 / 46%) 58%, transparent 76%);
  filter: blur(12px);
  pointer-events: none;
}
.page-hero[data-editorial-wave-hero] h1,
.page-hero[data-editorial-wave-hero] p { color: var(--editor-mistral-primary) !important; }
.page-hero[data-editorial-wave-hero] .page-hero__copy > p {
  font-size: var(--text-body-lg) !important;
  line-height: 1.58;
}
.page-hero[data-editorial-wave-hero] h1 { text-transform: none !important; }
.page-hero[data-editorial-wave-hero] h1 .title-accent {
  color: var(--editor-mistral-highlight) !important;
  font-style: italic;
  font-weight: inherit;
}

@media (max-width: 56rem) {
  .page-hero[data-editorial-wave-hero] { min-height: clamp(21rem, 42svh, 28rem); }
  .page-hero[data-editorial-wave-hero]::before {
    background:
      linear-gradient(90deg, rgb(249 247 247 / 94%), rgb(249 247 247 / 66%) 76%, transparent),
      linear-gradient(0deg, var(--editor-site-background) 0%, rgb(249 247 247 / 88%) 26%, transparent 66%);
  }
  .page-hero[data-editorial-wave-hero] .page-hero__copy::before { inset: -3rem -2rem; }
}

/* Les pages éditoriales gardent le fond calme sur mobile et tablette; la vague reste desktop. */
@media (max-width: 75rem) {
  body:is(.editorial-page--expertises, .editorial-page--solutions, .editorial-page--why)
    .page-hero[data-editorial-wave-hero] .editorial-hero__wave {
    display: none !important;
  }
}

.cta-section--home-light {
  position: relative;
  z-index: 2;
  isolation: isolate;
  overflow: visible !important;
  background: var(--color-background, var(--editor-site-background)) !important;
  color: var(--editor-mistral-primary) !important;
}

.cta-section--home-light::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: clamp(-24rem, -22vw, -12rem);
  right: clamp(-18rem, -13vw, -7rem);
  width: clamp(28rem, 52vw, 58rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--editor-mistral-highlight) 0, color-mix(in srgb, var(--editor-mistral-highlight) 38%, transparent) 28%, color-mix(in srgb, var(--editor-mistral-highlight) 14%, transparent) 48%, transparent 72%);
  opacity: .42;
  filter: blur(18px);
  pointer-events: none;
  will-change: transform;
  animation: listing-cta-halo 28s ease-in-out infinite alternate;
}

.cta-section--home-light .cta-section__inner {
  position: relative;
  z-index: 1;
}

.cta-section--home-light :is(h2, p) { color: var(--editor-mistral-primary) !important; }
.cta-section--home-light .eyebrow {
  color: var(--color-mistral-highlight, var(--editor-mistral-highlight)) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}
.cta-section--home-light h2 {
  padding-bottom: .15em;
  font-family: var(--font-display) !important;
  font-size: clamp(2.5rem, 4vw, 3.6rem) !important;
  font-weight: 600 !important;
  line-height: 1.05 !important;
  text-transform: none !important;
  clip-path: none !important;
}
.cta-section--home-light h2 + p {
  width: 75% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 1.125rem !important;
}

.cta-section--home-light h2 .title-accent {
  color: var(--editor-mistral-highlight) !important;
  font-style: italic;
  font-weight: inherit !important;
}

.cta-section--home-light .cluster { justify-self: end; }

.cta-section--home-light .button--primary {
  min-height: 2.25rem !important;
  padding-block: .45rem;
  padding-inline: 1.125rem;
  background: var(--brand-primary, var(--editor-mistral-primary)) !important;
  border-color: var(--brand-primary, var(--editor-mistral-primary)) !important;
  color: #fff !important;
  font-size: .8125rem;
}

.cta-section--home-light .button--primary:hover,
.cta-section--home-light .button--primary:focus-visible {
  background: var(--editor-mistral-highlight) !important;
  border-color: var(--editor-mistral-highlight) !important;
}

@keyframes listing-cta-halo {
  from { transform: translate3d(-2%, 3%, 0) scale(.98); }
  to { transform: translate3d(5%, -4%, 0) scale(1.06); }
}

@media (width <= 56rem) {
  .cta-section--home-light .cluster { justify-self: start; }
  .cta-section--home-light h2 + p { width: 100% !important; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-section--home-light::before { animation: none; will-change: auto; }
}

/* Le titre navigue ; le contrôle adjacent conserve la révélation tactile. */
body:is(.editorial-page--expertises,.editorial-page--solutions) .hover-reveal-selector__item-heading{display:flex;align-items:center;gap:var(--space-5);min-height:4.5rem;padding:var(--space-5) var(--space-2);transition:padding-inline-start .18s ease}
body:is(.editorial-page--expertises,.editorial-page--solutions) .hover-reveal-selector__item.is-active .hover-reveal-selector__item-heading{padding-inline-start:var(--space-3)}
body:is(.editorial-page--expertises,.editorial-page--solutions) .hover-reveal-selector__title-link{display:inline-flex;max-width:calc(100% - 3.75rem);font-family:var(--font-body);font-size:var(--text-body);font-weight:var(--font-weight-semibold);line-height:var(--leading-tight);text-transform:uppercase;text-decoration:none!important;color:var(--editor-mistral-primary)!important;transition:color var(--duration-fast) var(--ease-standard)}
body:is(.editorial-page--expertises,.editorial-page--solutions) .hover-reveal-selector__title-link:hover{color:var(--editor-mistral-highlight)!important}
body:is(.editorial-page--expertises,.editorial-page--solutions) .hover-reveal-selector__title-link:focus-visible{outline:2px solid var(--editor-mistral-highlight);outline-offset:4px}
body:is(.editorial-page--expertises,.editorial-page--solutions) .hover-reveal-selector__item-heading .hover-reveal-selector__trigger{width:44px;min-height:44px;padding:0!important;margin-inline-start:auto;flex-shrink:0;justify-content:center}

/* Icônes de la page principale Expertise en couleur de surbrillance. */
body.editorial-page--expertises main .hover-reveal-selector__label img {
  filter: brightness(0) saturate(100%) invert(42%) sepia(65%) saturate(2940%) hue-rotate(222deg) brightness(94%) contrast(91%);
}

/* Tablette : raccourcir le hero des pages principales et donner au titre
   la même présence que sur un écran desktop courant. */
@media (min-width: 48rem) and (max-width: 75rem) {
  body:is(.editorial-page--expertises, .editorial-page--solutions)
    .page-hero[data-editorial-wave-hero] {
    min-height: 0 !important;
    padding-top: 7rem !important;
    padding-bottom: 2rem !important;
  }

  body:is(.editorial-page--expertises, .editorial-page--solutions)
    .page-hero[data-editorial-wave-hero] h1 {
    font-size: 2.875rem !important;
    line-height: .98;
  }

  body:is(.editorial-page--expertises, .editorial-page--solutions)
    main > .section--soft {
    padding-top: 1.25rem !important;
  }

  body:is(.editorial-page--expertises, .editorial-page--solutions)
    .hover-reveal-selector {
    margin-block-start: 1.75rem !important;
  }
}
