/* DELTA-SIERRA E32 — CONTRASTE SÉMANTIQUE FINAL MARS
   Correction transversale: un composant visuellement sombre doit déclarer une surface sombre.
   Ce fichier est chargé en dernier sur toutes les pages Mars FR/EN. */
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] :is(.mars-hero,.mars-system-hero,.organisation-hero,.people-hero,.history-book-header)[data-ds-text-surface="dark"],
html#ds-mars-root body :is(.mars-hero,.mars-system-hero,.organisation-hero,.people-hero,.mars-dark,.mars-bible-dark,.mars-panel--dark,.mars-technical-layer)[data-ds-text-surface="dark"]{
  --ds-surface-ink:#f7fbff!important;
  --ds-surface-muted:#dce8f1!important;
  --ds-surface-link:#d7efff!important;
  --ds-surface-link-visited:#e8def9!important;
  --ds-surface-link-hover:#fff1bd!important;
  color:#f7fbff!important;
  -webkit-text-fill-color:#f7fbff!important;
  opacity:1!important;
  mix-blend-mode:normal!important;
}
html#ds-mars-root body .mars-portal-main[data-ds-text-surface="light"] :is(.mars-hero,.mars-system-hero,.organisation-hero,.people-hero,.history-book-header)[data-ds-text-surface="dark"] :where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,figcaption,blockquote,.mars-lead,.mars-hero__lead,.mars-hero__intro,.dek,.people-deck,.history-dek),
html#ds-mars-root body :is(.mars-hero,.mars-system-hero,.organisation-hero,.people-hero,.mars-dark,.mars-bible-dark,.mars-panel--dark,.mars-technical-layer)[data-ds-text-surface="dark"] :where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,figcaption,blockquote,.mars-lead,.mars-hero__lead,.mars-hero__intro,.dek,.people-deck,.history-dek){
  color:#f7fbff!important;
  -webkit-text-fill-color:#f7fbff!important;
  opacity:1!important;
  mix-blend-mode:normal!important;
  text-shadow:0 2px 12px rgba(0,0,0,.78)!important;
}
html#ds-mars-root body :is(.mars-hero,.mars-system-hero,.organisation-hero,.people-hero,.history-book-header)[data-ds-text-surface="dark"] :is(.mars-kicker,.org-kicker,.people-kicker,.history-kicker,.mars-eyebrow){
  color:#ffd977!important;
  -webkit-text-fill-color:#ffd977!important;
  opacity:1!important;
  text-shadow:0 2px 10px rgba(0,0,0,.76)!important;
}
html#ds-mars-root body :is(.mars-hero,.mars-system-hero,.organisation-hero,.people-hero,.history-book-header)[data-ds-text-surface="dark"] a:not([class*="button"]):not([class*="btn"]){
  color:#d7efff!important;
  -webkit-text-fill-color:#d7efff!important;
  text-decoration-color:currentColor!important;
}
html#ds-mars-root body :is(.mars-hero,.mars-system-hero,.organisation-hero,.people-hero,.history-book-header)[data-ds-text-surface="dark"] a:not([class*="button"]):not([class*="btn"]):hover,
html#ds-mars-root body :is(.mars-hero,.mars-system-hero,.organisation-hero,.people-hero,.history-book-header)[data-ds-text-surface="dark"] a:not([class*="button"]):not([class*="btn"]):focus-visible{
  color:#fff1bd!important;
  -webkit-text-fill-color:#fff1bd!important;
}
/* Light nested callouts remain light even inside a dark hero/surface. */
html#ds-mars-root body [data-ds-text-surface="dark"] [data-ds-text-surface="light"]{
  --ds-surface-ink:#20354f!important;
  --ds-surface-muted:#52647a!important;
  --ds-surface-link:#154f78!important;
  --ds-surface-link-visited:#5b3f78!important;
  --ds-surface-link-hover:#0c3856!important;
  color:#20354f!important;
  -webkit-text-fill-color:#20354f!important;
  text-shadow:none!important;
}
html#ds-mars-root body [data-ds-text-surface="dark"] [data-ds-text-surface="light"] :where(h1,h2,h3,h4,h5,h6,p,li,dt,dd,span,strong,em,small,label,figcaption,blockquote){
  color:var(--ds-surface-ink)!important;
  -webkit-text-fill-color:var(--ds-surface-ink)!important;
  text-shadow:none!important;
}

/* P0 E32 — stacking contract for legacy heroes whose text is a direct child.
   Some older pages do not use .mars-hero__grid; the historical ::before overlay (z-index:1)
   was therefore painted above h1/p even when their computed text colour was white. */
html#ds-mars-root body .mars-hero[data-ds-text-surface="dark"] > *{
  position:relative!important;
  z-index:3!important;
}
html#ds-mars-root body .mars-hero[data-ds-text-surface="dark"]::before{
  z-index:1!important;
  pointer-events:none!important;
}
