/* NWS Laser — corrections V3 communes, 6 novembre 2026. */
/* À charger après les feuilles existantes. Composants du gabarit application. */

/* La séparation appartient à la section suivante, et non à son titre. */
.nws-application-detail > .nws-decapage-section + .nws-decapage-section {
  padding-block-start: clamp(40px, 4.5vw, 64px);
}

.nws-application-detail > .nws-decapage-section > .nws-section-title {
  margin-block: 0 clamp(20px, 2vw, 28px);
}

.nws-application-detail > .nws-decapage-section > .nws-section-title > .nws-eyebrow,
.nws-application-detail > .nws-home-config-cta > div > .nws-eyebrow {
  margin-block-end: 12px;
}

/* Même largeur rédactionnelle avec ou sans paragraphes dans le bloc. */
.nws-application-detail > .nws-decapage-section > :is(.nws-decapage-copy, .nws-decapage-note),
.nws-application-detail > .nws-home-config-cta > div > p:not(.nws-eyebrow) {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}

/* Éviter qu'une marge de paragraphe décide de l'espacement du composant. */
.nws-application-detail > .nws-decapage-section > .nws-decapage-copy > p:last-child {
  margin-block-end: 0;
}

.nws-application-detail > .nws-decapage-section > .nws-decapage-copy + :is(.nws-decapage-grid, .nws-decapage-compare) {
  margin-block-start: clamp(20px, 2vw, 28px);
}

.nws-application-detail > .nws-home-config-cta > div > p:not(.nws-eyebrow) {
  margin-block-start: clamp(20px, 2vw, 28px);
}

/* FAQ cards: balanced two-column layout, shared across application locales. */
.nws-application-detail .nws-ik-applications[aria-labelledby^="faq-"] > .nws-ik-application-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .nws-application-detail .nws-ik-applications[aria-labelledby^="faq-"] > .nws-ik-application-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* NWS Laser — rails techniques : charger après les styles existants.
   Les guides possèdent leur propre rail en grille et restent hors périmètre.
   Le breakpoint suit le passage du héros partagé en une colonne. */
@media (max-width: 980px) {
  .nws-site .nws-expertise-detail-rail:not(.nws-guide-rail) {
    min-inline-size: 0;
    min-block-size: 0;
    block-size: auto;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
  }

  .nws-site .nws-expertise-detail-rail:not(.nws-guide-rail) > small {
    position: static;
    inset: auto;
    margin: 0;
    line-height: 1.5;
  }

  .nws-site .nws-expertise-detail-rail:not(.nws-guide-rail) > strong {
    max-inline-size: 100%;
    font-size: clamp(56px, 18vw, 112px);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .nws-site .nws-expertise-detail-rail:not(.nws-guide-rail) > span,
  .nws-site .nws-expertise-detail-rail:not(.nws-guide-rail) > em {
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  /* Le trait décoratif reste présent, entre le procédé et sa légende,
     plutôt que de traverser un texte traduit plus long. */
  .nws-site .nws-expertise-detail-rail:not(.nws-guide-rail) > i {
    position: static;
    inset: auto;
    flex: none;
    inline-size: 64px;
    block-size: 2px;
    max-inline-size: 100%;
  }
}

/* Configurateur NWS Laser — presentation only; load after theme/i18n CSS. */
[data-nws-matrix-configurator] .nws-configurator-path-status {
  margin: 28px 0 12px;
  color: var(--nws-navy, #111a42);
  font-family: var(--nws-sans, sans-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: start;
  overflow-wrap: anywhere;
}

[data-nws-matrix-configurator] .nws-configurator-path-status bdi {
  font-weight: 700;
}

[data-nws-matrix-configurator] .nws-configurator-progress {
  display: grid;
  grid-template-columns: repeat(var(--nws-config-step-count, 6), minmax(0, 1fr));
  gap: 0;
  margin-block: 12px 0;
  padding: 0;
  border: 0;
  list-style: none;
}

[data-nws-matrix-configurator] .nws-configurator-progress > li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #526071;
  text-align: center;
  transition: none;
}

/* Logical coordinates connect the original ordered list in both LTR and RTL. */
[data-nws-matrix-configurator] .nws-configurator-progress > li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset-block-start: 16px;
  inset-inline-start: 50%;
  inline-size: 100%;
  block-size: 2px;
  background: #b8c3cf;
  pointer-events: none;
}

[data-nws-matrix-configurator] .nws-configurator-progress > li > span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 34px;
  block-size: 34px;
  box-sizing: border-box;
  border: 1px solid #8795a6;
  border-radius: 50%;
  background: var(--nws-paper, #f8f7f3);
  color: #526071;
  font-family: var(--nws-mono, monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  direction: ltr;
  unicode-bidi: isolate;
}

[data-nws-matrix-configurator] .nws-configurator-progress > li > small {
  max-inline-size: 100%;
  color: inherit;
  font-family: var(--nws-sans, sans-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

[data-nws-matrix-configurator] .nws-configurator-progress > li.is-current {
  color: var(--nws-navy, #111a42);
}

[data-nws-matrix-configurator] .nws-configurator-progress > li.is-current > span {
  border-color: var(--nws-navy, #111a42);
  background: var(--nws-navy, #111a42);
  color: #fff;
  box-shadow: 0 0 0 3px var(--nws-paper, #f8f7f3), 0 0 0 5px #087aaa;
}

[data-nws-matrix-configurator] .nws-configurator-progress > li.is-current > small {
  font-weight: 700;
}

[data-nws-matrix-configurator] .nws-configurator-progress > li.is-complete {
  color: #085b7a;
}

[data-nws-matrix-configurator] .nws-configurator-progress > li.is-complete > span {
  border-color: #085b7a;
  background: #dff6ff;
  color: #085b7a;
}

[data-nws-matrix-configurator] .nws-configurator-progress > li.is-complete::after {
  background: #087aaa;
}

@media (min-width: 961px) {
  [data-nws-matrix-configurator] .nws-configurator-path-status,
  [data-nws-matrix-configurator] .nws-configurator-progress {
    margin-inline: 64px;
  }
}

@media (max-width: 640px) {
  [data-nws-matrix-configurator] .nws-configurator-path-status {
    margin-block-start: 24px;
  }

  /* Hide only duplicate labels visually once the full current label is shown.
     Without enhancement JS, retain every existing step label as a fallback. */
  [data-nws-matrix-configurator] .nws-configurator-progress[data-nws-path-ready] > li > small {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* NWS V3 — tableaux partagés. Charger après les feuilles V2 et locales.
   Le JS ne retire ni cellules ni en-têtes ; les tableaux restent des tableaux. */
.nws-site main .nws-v3-table-wrap {
  box-sizing: border-box;
  min-inline-size: 0;
  max-inline-size: 100%;
  margin-block: 24px 34px;
}
.nws-site .nws-expertise-compare > .nws-v3-table-wrap {
  max-inline-size: 1080px;
  margin-inline: auto;
}
.nws-site .nws-v3-table-region {
  box-sizing: border-box;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto;
  scrollbar-color: #0879a5 #dce8ed;
}
.nws-site .nws-v3-table-region::-webkit-scrollbar { height: 12px; }
.nws-site .nws-v3-table-region::-webkit-scrollbar-track { background: #dce8ed; }
.nws-site .nws-v3-table-region::-webkit-scrollbar-thumb {
  background: #0879a5;
  border: 2px solid #dce8ed;
  border-radius: 6px;
}
.nws-site .nws-v3-table-region:focus-visible {
  outline: 3px solid #0879a5;
  outline-offset: 3px;
  box-shadow: inset 0 0 0 3px #55cfff;
}
/* Un seul défilement : celui de la région, pas celui du faux tableau intérieur. */
.nws-site main .nws-v3-table-region > .nws-expertise-compare-table {
  margin: 0;
  max-inline-size: none;
  overflow: visible !important;
}
.nws-site main .nws-v3-table-region > table { margin-block: 0; }
.nws-site main .nws-v3-table .nws-compare-row {
  display: grid !important;
  grid-template-columns: repeat(var(--nws-v3-columns, 3), minmax(0, 1fr)) !important;
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 0;
  align-items: start;
  padding-block: 18px;
  line-height: 1.5;
}
.nws-site main .nws-v3-table .nws-compare-row > * {
  min-inline-size: 0;
  grid-column: auto !important;
  grid-row: auto;
  align-self: start;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
.nws-site main .nws-v3-table .nws-compare-head { display: grid !important; }
/* Dès la tablette aussi : une grande comparaison ne se comprime pas en cinq
   colonnes trop étroites à 768 px. La largeur V2 est réutilisée si disponible. */
.nws-site main .nws-v3-table:not(.nws-v3-table-short) .nws-compare-row {
  min-inline-size: var(--nws-v3-table-width, 760px);
  min-width: var(--nws-v3-table-width, 760px);
}
.nws-site main table.nws-v3-table:not(.nws-v3-table-short) {
  min-inline-size: var(--nws-v3-table-width, 760px);
  min-width: var(--nws-v3-table-width, 760px);
}
.nws-site .nws-v3-table-tools {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 12px;
  padding: 12px;
  background: #f0f5f8;
  color: #16314c;
  border: 1px solid #aebfcc;
  border-inline-start: 3px solid #0879a5;
}
.nws-site .nws-v3-table-tools[hidden] { display: none !important; }
.nws-site .nws-v3-table-tools .nws-v3-table-hint {
  display: block;
  flex: 1 1 260px;
  min-inline-size: 0;
  margin: 0;
  color: #16314c;
  font: 500 13px/1.5 var(--nws-body, sans-serif);
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: break-word;
}
.nws-site .nws-v3-table-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
  flex: 0 0 auto;
}
.nws-site .nws-v3-table-controls button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  min-inline-size: 44px;
  block-size: 44px;
  min-block-size: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #0879a5;
  border-radius: 2px;
  background: #fff;
  color: #104667;
  font: 500 24px/1 sans-serif;
  cursor: pointer;
  appearance: none;
}
.nws-site .nws-v3-table-controls button:hover:not(:disabled) { background: #dceff8; }
.nws-site .nws-v3-table-controls button:disabled {
  border-color: #c2cdd5;
  color: #647684;
  background: #e6edf2;
  cursor: default;
}
.nws-site .nws-v3-table-controls button:focus-visible {
  outline: 3px solid #0879a5;
  outline-offset: 3px;
}
.nws-site .nws-v3-table-position {
  min-inline-size: 5ch;
  color: #16314c;
  font: 500 12px/1.5 var(--nws-mono, monospace);
  text-align: center;
}
@media (max-width: 767px) {
  /* 2–3 colonnes : 13–14 px, padding réduit, retours à la ligne naturels.
     Pas de display:block sur les cellules, pas de colonnes masquées. */
  .nws-site main table.nws-v3-table-short {
    table-layout: fixed !important;
    inline-size: 100% !important;
    width: 100% !important;
    min-inline-size: 0 !important;
    min-width: 0 !important;
    max-inline-size: none;
  }
  .nws-site main table.nws-v3-table :is(th, td) {
    padding: 12px 8px;
    vertical-align: top;
    font-size: clamp(13px, 3.6vw, 14px) !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    hyphens: none;
  }
  .nws-site main table.nws-v3-table-short :is(th, td) { width: auto !important; }
  .nws-site main table.nws-v3-table :is(th, td) :is(p, li, a, strong, span, small) {
    font-size: inherit;
    line-height: inherit;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .nws-site main .nws-v3-table .nws-compare-row {
    gap: 12px;
    padding-block: 14px;
    font-size: 14px !important;
  }
  .nws-site main .nws-v3-table-short .nws-compare-row {
    min-inline-size: 0 !important;
    min-width: 0 !important;
    gap: 8px;
    font-size: clamp(13px, 3.6vw, 14px) !important;
  }
  .nws-site main .nws-v3-table .nws-compare-head {
    font-size: 13px !important;
    letter-spacing: .02em;
  }
}
@media print {
  .nws-site .nws-v3-table-tools { display: none !important; }
  .nws-site .nws-v3-table-region { overflow: visible; }
  .nws-site main .nws-v3-table .nws-compare-row,
  .nws-site main table.nws-v3-table { min-inline-size: 0 !important; }
}

/* NWS V3 — contrat de contraste des CTA. Charger après les CSS V2/locales.
 * Navy/blanc ou navy/cyan : chaque état définit le texte ET son fond.
 * Aucun sélecteur générique de lien, aucun changement de formulaire. */
.nws-site {
  --nws-action-ink: #111a42;
  --nws-light-fill: #fff;
  --nws-light-ink: #111a42;
  --nws-light-border: #111a42;
  --nws-light-hover-fill: #a4e5ff;
  --nws-light-hover-ink: #111a42;
  --nws-light-hover-border: #111a42;
}

/* Surfaces partagées réellement foncées. Les surfaces blanc/cyan conservent
 * le texte navy par défaut. Attribut facultatif pour réutiliser le contrat. */
.nws-site :is(.nws-expertise-detail-hero, .nws-nano-cta, .nws-reference-footer, [data-nws-action-surface="dark"]) {
  --nws-action-ink: #fff;
}
.nws-site [data-nws-action-surface="light"],
.nws-site [data-nws-action-surface="cyan"] {
  --nws-action-ink: #111a42;
}

/* Préserver le CTA navy des callouts sur cyan (et leurs variantes). */
.nws-site .nws-expertise-callout {
  --nws-light-fill: #111a42;
  --nws-light-ink: #fff;
  --nws-light-border: #111a42;
  --nws-light-hover-fill: #18366b;
  --nws-light-hover-ink: #fff;
  --nws-light-hover-border: #18366b;
}
/* Préserver le bouton secondaire outline du pied de page. */
.nws-site .nws-reference-footer {
  --nws-light-fill: transparent;
  --nws-light-ink: #fff;
  --nws-light-border: #fff;
  --nws-light-hover-fill: #a4e5ff;
  --nws-light-hover-ink: #111a42;
  --nws-light-hover-border: #a4e5ff;
}

/* La spécificité couvre les anciennes surcharges footer !important.
 * Les !important ne portent que sur la paire de couleurs et sa bordure. */
.nws-site :is(main, .nws-reference-footer) .nws-button.nws-button-light {
  background: var(--nws-light-fill) !important;
  color: var(--nws-light-ink) !important;
  border-color: var(--nws-light-border) !important;
}
.nws-site :is(main, .nws-reference-footer) .nws-button.nws-button-light:is(:hover, :active) {
  background: var(--nws-light-hover-fill) !important;
  color: var(--nws-light-hover-ink) !important;
  border-color: var(--nws-light-hover-border) !important;
}

/* Ghost = outline : fond transparent, encre du contexte et survol opaque.
 * Fonctionne sans JS sur blanc/cyan (navy) comme sur navy (blanc). */
.nws-site .nws-button.nws-button-ghost {
  background: transparent !important;
  color: var(--nws-action-ink) !important;
  border-color: var(--nws-action-ink) !important;
}
.nws-site .nws-button.nws-button-ghost:is(:hover, :active) {
  background: #fff !important;
  color: #111a42 !important;
  border-color: #111a42 !important;
}

/* Un fond animé avec une encre instantanée peut traverser blanc/blanc
 * lors du retour depuis :hover. Basculer la paire ensemble, conserver
 * la micro-interaction de déplacement existante. */
.nws-site .nws-button:is(.nws-button-light, .nws-button-ghost) {
  transition-property: transform;
}

/* Le bouton texte natif gardait son fond UA #efefef sous un texte blanc.
 * Neutraliser sa chrome, pas son rôle ni son handler data-nws-lead-open.
 * Les ancres restent de simples liens soulignés : aucune boîte ajoutée. */
.nws-site .nws-text-link-light {
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  color: var(--nws-action-ink) !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 0 !important;
  min-height: 0 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  cursor: pointer;
}
.nws-site button.nws-text-link-light {
  min-height: 44px !important;
}
.nws-site .nws-text-link-light:is(:hover, :active) {
  background: transparent !important;
  color: var(--nws-action-ink) !important;
  text-decoration-thickness: 2px;
}

/* Les flèches suivent l'encre, plutôt que le rouge global du thème. */
.nws-site :is(.nws-button-light, .nws-button-ghost, .nws-text-link-light) > span[aria-hidden="true"] {
  color: inherit;
}
/* Double repère : blanc visible sur navy, navy visible sur blanc/cyan. */
.nws-site :is(.nws-button-light, .nws-button-ghost, .nws-text-link-light):focus-visible {
  outline: 2px solid #111a42 !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff !important;
}

/* V3 — règles communes de lisibilité, sans changement éditorial. */
.nws-site main :is(h1,h2,h3) {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}
.nws-site main :is(.nws-section-title,.nws-editorial-section,.nws-decapage-section) {
  min-inline-size: 0;
}
@media (max-width: 767px) {
  /* Avertissement : garder le symbole ET tout le texte en place. */
  .nws-doc-body .image-texte-cadre {
    display: grid;
    grid-template-columns: 64px minmax(0,1fr);
    align-items: start;
    gap: 16px;
    min-inline-size: 0;
    max-inline-size: 100%;
  }
  .nws-doc-body .image-texte-cadre > img {
    display: block;
    inline-size: 64px;
    max-inline-size: 100%;
    block-size: auto;
    margin: 0;
    object-fit: contain;
  }
  .nws-doc-body .image-texte-cadre > p {
    min-inline-size: 0;
    max-inline-size: 100%;
    margin: 0;
    overflow-wrap: anywhere;
  }
}

/* Contextes sombres des composants historiques ; les CTA sur beige restent navy. */
.nws-site :is(.nws-hub-hero,.nws-hub-callout,.nws-product-hero,.nws-filtration-hero,.nws-hero-real-machine) {
  --nws-action-ink: #fff;
}
[data-nws-matrix-configurator] :is(.nws-configurator-path-status,.nws-configurator-progress > li > small) {
  font-family: var(--nws-body,sans-serif);
}

/* Même composant de couverture pour les deux applications DataMatrix. */
.nws-application-detail .nws-hub-hero--with-cover {
  grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr);
  align-items: stretch;
  min-height: 0;
}
.nws-application-detail .nws-hub-hero--with-cover > div:first-child {
  min-width: 0;
  padding: clamp(36px,4.5vw,64px) clamp(26px,5vw,64px);
}
.nws-application-detail .nws-hub-hero--with-cover h1 {
  font-size: clamp(36px,4.4vw,60px);
}
.nws-application-detail .nws-hub-hero--with-cover > .nws-hub-hero-rail {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  align-content: center;
  gap: 20px;
  min-width: 0;
  min-height: 0;
  padding: clamp(24px,3vw,40px);
}
.nws-application-detail .nws-hub-hero--with-cover > .nws-hub-hero-rail > small {
  grid-row: 1;
  grid-column: 1;
  position: static;
}
.nws-application-detail .nws-hub-hero--with-cover > .nws-hub-hero-rail > span {
  grid-row: 1;
  grid-column: 2;
  justify-self: end;
  font-size: 28px;
  line-height: 1;
}
.nws-application-detail .nws-hub-hero--with-cover :is(.nws-hub-hero-cover,.nws-application-cover) {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  max-width: 520px;
  min-width: 0;
  margin: 0;
  justify-self: center;
  border: 1px solid var(--nws-wline);
  background: var(--nws-deep);
}
.nws-application-detail .nws-hub-hero--with-cover .nws-application-cover { max-width: 320px; }
.nws-application-detail .nws-hub-hero--with-cover :is(.nws-hub-hero-cover,.nws-application-cover) img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
@media (max-width:1000px) {
  .nws-application-detail .nws-hub-hero--with-cover { grid-template-columns: minmax(0,1fr); }
  .nws-application-detail .nws-hub-hero--with-cover > .nws-hub-hero-rail {
    border-left: 0;
    border-top: 1px solid var(--nws-wline);
    padding: 24px 26px;
    gap: 16px;
  }
  .nws-application-detail .nws-hub-hero--with-cover .nws-hub-hero-cover { max-width: 440px; }
  .nws-application-detail .nws-hub-hero--with-cover .nws-application-cover { max-width: 260px; }
}
