/* AesthéIA — suppression des halos violets en mode nuit uniquement.
   Chargé en dernier sur toutes les pages. Le mode jour reste inchangé. */

html.theme-dark,
html[data-theme="dark"] {
  --halo-violet-primary: transparent !important;
  --halo-violet-secondary: transparent !important;
  --dark-body-halo-primary: transparent !important;
  --dark-body-halo-secondary: transparent !important;
}

/* En-têtes visuels : conservation du relief bleu, suppression du halo violet. */
html.theme-dark body .hero,
html[data-theme="dark"] body .hero {
  background:
    radial-gradient(circle at 12% 88%, rgba(0, 176, 255, 0.12), transparent 38%),
    linear-gradient(135deg, #11183d 0%, #1e2a50 58%, #27347c 100%) !important;
}

html.theme-dark body .hero-tech-backdrop::before,
html[data-theme="dark"] body .hero-tech-backdrop::before {
  background:
    radial-gradient(ellipse at 82% 68%, rgba(0, 176, 255, 0.12), transparent 27%) !important;
}

/* Bandeaux de conversion / bas de page : uniquement bleu. */
html.theme-dark body .conversion-band,
html[data-theme="dark"] body .conversion-band {
  background:
    radial-gradient(circle at 12% 88%, rgba(0, 176, 255, 0.12), transparent 38%),
    linear-gradient(135deg, #11183d 0%, #1e2a50 58%, #27347c 100%) !important;
}

/* Fonds éditoriaux communs : mêmes profondeurs, sans lumière violette. */
html.theme-dark body .section-soft:not(.section-aqua),
html[data-theme="dark"] body .section-soft:not(.section-aqua) {
  background: #11183d !important;
  background-image: none !important;
}

html.theme-dark body .section-mist:not(.section-aqua),
html[data-theme="dark"] body .section-mist:not(.section-aqua) {
  background: linear-gradient(135deg, #11183d 0%, #0d1330 52%, #151c46 100%) !important;
}

html.theme-dark body .positioning-section,
html.theme-dark body .location-section,
html[data-theme="dark"] body .positioning-section,
html[data-theme="dark"] body .location-section {
  background:
    radial-gradient(circle at 12% 82%, rgba(0, 176, 255, 0.10), transparent 36%),
    linear-gradient(135deg, #0b1028 0%, #11183d 48%, #151c46 100%) !important;
}

/* Les pseudo-éléments de halo sont supprimés, mais pas les images dédiées des bandeaux aqua. */
html.theme-dark body #contenu > .section:not(.conversion-band):not(.section-aqua)::before,
html[data-theme="dark"] body #contenu > .section:not(.conversion-band):not(.section-aqua)::before,
html.theme-dark body .article-page > .article-header::before,
html.theme-dark body .article-page > .article-content::before,
html[data-theme="dark"] body .article-page > .article-header::before,
html[data-theme="dark"] body .article-page > .article-content::before {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
  opacity: 0 !important;
}

/* Ressources : retrait du halo violet du premier bandeau éditorial sombre. */
html.theme-dark body #contenu > .resources-hero + .section,
html[data-theme="dark"] body #contenu > .resources-hero + .section {
  background:
    radial-gradient(circle at 12% 88%, rgba(0, 176, 255, 0.09), transparent 42%),
    linear-gradient(135deg, #11183d 0%, #172149 58%, #202d60 100%) !important;
}

/* Mode nuit automatique, lorsque le mode jour n'est pas forcé. */
@media (prefers-color-scheme: dark) {
  html:not(.theme-dark):not([data-theme="light"]) {
    --halo-violet-primary: transparent !important;
    --halo-violet-secondary: transparent !important;
    --dark-body-halo-primary: transparent !important;
    --dark-body-halo-secondary: transparent !important;
  }

  html:not(.theme-dark):not([data-theme="light"]) body .hero {
    background:
      radial-gradient(circle at 12% 88%, rgba(0, 176, 255, 0.12), transparent 38%),
      linear-gradient(135deg, #11183d 0%, #1e2a50 58%, #27347c 100%) !important;
  }

  html:not(.theme-dark):not([data-theme="light"]) body .hero-tech-backdrop::before {
    background:
      radial-gradient(ellipse at 82% 68%, rgba(0, 176, 255, 0.12), transparent 27%) !important;
  }

  html:not(.theme-dark):not([data-theme="light"]) body .conversion-band {
    background:
      radial-gradient(circle at 12% 88%, rgba(0, 176, 255, 0.12), transparent 38%),
      linear-gradient(135deg, #11183d 0%, #1e2a50 58%, #27347c 100%) !important;
  }

  html:not(.theme-dark):not([data-theme="light"]) body .section-soft:not(.section-aqua) {
    background: #11183d !important;
    background-image: none !important;
  }

  html:not(.theme-dark):not([data-theme="light"]) body .section-mist:not(.section-aqua) {
    background: linear-gradient(135deg, #11183d 0%, #0d1330 52%, #151c46 100%) !important;
  }

  html:not(.theme-dark):not([data-theme="light"]) body .positioning-section,
  html:not(.theme-dark):not([data-theme="light"]) body .location-section {
    background:
      radial-gradient(circle at 12% 82%, rgba(0, 176, 255, 0.10), transparent 36%),
      linear-gradient(135deg, #0b1028 0%, #11183d 48%, #151c46 100%) !important;
  }

  html:not(.theme-dark):not([data-theme="light"]) body #contenu > .section:not(.conversion-band):not(.section-aqua)::before,
  html:not(.theme-dark):not([data-theme="light"]) body .article-page > .article-header::before,
  html:not(.theme-dark):not([data-theme="light"]) body .article-page > .article-content::before {
    content: none !important;
    display: none !important;
    background: none !important;
    background-image: none !important;
    opacity: 0 !important;
  }

  html:not(.theme-dark):not([data-theme="light"]) body #contenu > .resources-hero + .section {
    background:
      radial-gradient(circle at 12% 88%, rgba(0, 176, 255, 0.09), transparent 42%),
      linear-gradient(135deg, #11183d 0%, #172149 58%, #202d60 100%) !important;
  }
}


/* ==========================================================================
   Derniers bandeaux secteur — halo bleu validé sur Thalasso & Thermal
   Mode nuit uniquement, tous supports.
   ========================================================================== */

html.theme-dark body.medicine-page #contenu > .conversion-band::before,
html[data-theme="dark"] body.medicine-page #contenu > .conversion-band::before,
html.theme-dark body.spa-page #contenu > .conversion-band::before,
html[data-theme="dark"] body.spa-page #contenu > .conversion-band::before,
html.theme-dark body.thalasso-page #contenu > .conversion-band::before,
html[data-theme="dark"] body.thalasso-page #contenu > .conversion-band::before,
html.theme-dark body.institutes-page #contenu > .conversion-band::before,
html[data-theme="dark"] body.institutes-page #contenu > .conversion-band::before,
html.theme-dark body.pme-page #contenu > .conversion-band::before,
html[data-theme="dark"] body.pme-page #contenu > .conversion-band::before {
  background:
    linear-gradient(90deg, rgba(12, 18, 48, 0.90), rgba(18, 40, 64, 0.70), rgba(24, 73, 100, 0.34)),
    linear-gradient(0deg, rgba(15, 20, 47, 0.50), rgba(15, 20, 47, 0.08)) !important;
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-dark):not([data-theme="light"]) body.medicine-page #contenu > .conversion-band::before,
  html:not(.theme-dark):not([data-theme="light"]) body.spa-page #contenu > .conversion-band::before,
  html:not(.theme-dark):not([data-theme="light"]) body.thalasso-page #contenu > .conversion-band::before,
  html:not(.theme-dark):not([data-theme="light"]) body.institutes-page #contenu > .conversion-band::before,
  html:not(.theme-dark):not([data-theme="light"]) body.pme-page #contenu > .conversion-band::before {
    background:
      linear-gradient(90deg, rgba(12, 18, 48, 0.90), rgba(18, 40, 64, 0.70), rgba(24, 73, 100, 0.34)),
      linear-gradient(0deg, rgba(15, 20, 47, 0.50), rgba(15, 20, 47, 0.08)) !important;
  }
}
