/* NightCode V6 — fond partage des pages legales et de documentation.
   La palette reprend le front-office actuel : #050509, #0b0c13 et rouge #e0121c.
   Portee volontairement limitee aux pages legales, au portail de documentation
   et aux articles de documentation. Ne touche ni aux dimensions ni au header.
*/
:root {
  --nc-page-bg-fallback: #070a10;
  --nc-page-backdrop:
    radial-gradient(ellipse 70% 38% at 54% -8%, rgba(224,18,28,.135) 0%, transparent 78%),
    radial-gradient(ellipse 55% 58% at 100% 60%, rgba(43,53,83,.13) 0%, transparent 78%),
    linear-gradient(180deg,#0a0c15 0%,#070a11 52%,#050509 100%);
}

/* Les styles V4/V5 sont parfois inclus une seconde fois depuis l'en-tete.
   Ces selecteurs precis evitent leur retour au fond noir historique. */
html body.nc-legal-page,
html body.nc-doc-v5,
html body.nc-doc-product-body {
  background-color: var(--nc-page-bg-fallback) !important;
  background-image: var(--nc-page-backdrop) !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-attachment: fixed !important;
}

/* Le canevas ne doit pas etre recouvert par le fond uni des anciens themes. */
html body.nc-legal-page main.nc-legal,
html body.nc-doc-v5 main.nc-doc-main,
html body.nc-doc-product-body main.dp,
html body.nc-doc-product-body main.docportal {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* En-tetes des documentations : meme fond, aucun aplat noir intermediaire. */
html body.nc-doc-v5 .nc-doc-hero,
html body.nc-doc-product-body .dp-top,
html body.nc-doc-product-body .docportal-hero {
  background: linear-gradient(180deg, rgba(224,18,28,.035), transparent 88%) !important;
}

/* Compatibilite navigateurs mobiles sans changement d'espacement. */
@media (max-width: 800px) {
  html body.nc-legal-page,
  html body.nc-doc-v5,
  html body.nc-doc-product-body { background-attachment: scroll !important; }
}
