/* Les scènes restent derrière le contenu ; aucune surface interactive n'est recouverte. */
body.aurora-site[data-ambient-background] {
  isolation: isolate;
  background-color: #eaf0e9;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}
/* Poster également visible sans JavaScript, sans requête vers une vidéo ou un tiers. */
body.aurora-site[data-ambient-background="home"] {
  background-image: linear-gradient(#f8fbf52e, #f8fbf52e), url("/media/home-background.webp");
}
body.aurora-site[data-ambient-background="hub"] {
  background-image: linear-gradient(#f4f8f62e, #f4f8f62e), url("/media/hub-background.webp");
}
@media (min-width: 900px), (min-width: 700px) and (min-resolution: 2dppx) {
  body.aurora-site[data-ambient-background="home"] {
    background-image: linear-gradient(#f8fbf52e, #f8fbf52e), url("/media/home-background-hd.webp");
  }
  body.aurora-site[data-ambient-background="hub"] {
    background-image: linear-gradient(#f4f8f62e, #f4f8f62e), url("/media/hub-background-hd.webp");
  }
}
body.aurora-site[data-ambient-background].ambient-ready {
  background-image: none;
}
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #eaf0e9;
}
.ambient-background-poster,
.ambient-background-video {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  object-fit: cover;
  object-position: center;
  filter: blur(0.9px) saturate(0.9);
  pointer-events: none;
}
.ambient-background-poster {
  opacity: 1;
}
.ambient-background-video {
  opacity: 0;
  transition: opacity 650ms ease;
}
.ambient-background[data-ambient-state="playing"] .ambient-background-video,
.ambient-background[data-ambient-state="paused"] .ambient-background-video {
  opacity: 1;
}
.ambient-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #f8fbf535 0%, #f8fbf51f 42%, #eaf1e933 100%);
}
body.aurora-site[data-ambient-background="hub"] .ambient-background::after {
  background: linear-gradient(180deg, #f7faf835 0%, #edf4f321 48%, #eef3ed3d 100%);
}
/* Un papier légèrement translucide conserve une lecture stable sur chaque plan. */
body.aurora-site[data-ambient-background] main > .section:not(.vision-hero):not(.hub-vision-hero) {
  background: #fafcf7d6;
}
body.aurora-site[data-ambient-background] main > :is(
  .scale-section,
  .applications,
  .hub-preview,
  .partners-section,
  .vision-contact,
  .hub-scale,
  .hub-science,
  .hub-trajectory
) {
  background: #eef5ecd9;
}
body.aurora-site[data-ambient-background] :is(
  .scale-explorer,
  .ecosystem-grid article,
  .partner-card,
  .hub-preview-diagram
) {
  background-color: #ffffffeb;
}
/* Le héros, les fiches sombres et le pied de page gardent leur contraste existant. */
@media (prefers-reduced-motion: reduce), (prefers-reduced-data: reduce) {
  .ambient-background-video {
    transition: none;
  }
}
@media (max-width: 640px) {
  body.aurora-site[data-ambient-background] {
    background-attachment: scroll;
  }
  body.aurora-site[data-ambient-background] main > .section:not(.vision-hero):not(.hub-vision-hero) {
    background-color: #fafcf7df;
  }
}
@media print {
  .ambient-background {
    display: none;
  }
  body.aurora-site[data-ambient-background] {
    background: #fff !important;
  }
  body.aurora-site[data-ambient-background] main > .section {
    background-color: #fff !important;
  }
}
