/* Le fond de la fenêtre du dé (resolution.js) : la peinture du lieu de la mission, éclairée selon le verdict.
   Réussite : lueur or, rayons lents ; échec : brique, ciel terni, vignette qui se referme. Sans lieu : le ciel de l'écran titre.
   Mouvement réduit : les teintes restent, rayons et respiration disparaissent. Le panneau reste à 70 % d'opacité au moins sous le texte. */
.resolution { isolation: isolate; --fond-de: url(/static/art/ecrans/ciel.webp); }
.resolution[data-lieu] { --fond-de: var(--lieu); }
.resolution::before, .resolution::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.resolution::before {
  background: linear-gradient(rgba(16, 10, 28, .30), rgba(8, 6, 14, .72)), var(--fond-de) center 40% / cover no-repeat;
  transition: filter 1.4s ease;
}
.resolution::after {
  background: radial-gradient(ellipse 78% 62% at 50% 46%, rgba(130, 96, 196, .14), transparent 70%), radial-gradient(ellipse 80% 70% at 50% 45%, transparent 38%, rgba(5, 4, 9, .86) 100%);
  transition: opacity 1.4s ease;
}
.resolution:has(.jet.reussite)::before { filter: saturate(1.25) brightness(1.1); }
.resolution:has(.jet.reussite)::after {
  background: radial-gradient(ellipse 70% 52% at 50% 40%, rgba(255, 200, 100, .36), rgba(214, 140, 50, .14) 48%, transparent 72%), radial-gradient(ellipse 80% 70% at 50% 45%, transparent 38%, rgba(40, 22, 4, .80) 100%);
}
.resolution:has(.jet.rate)::before { filter: grayscale(.7) brightness(.78); }
.resolution:has(.jet.rate)::after {
  background: radial-gradient(ellipse 85% 60% at 50% 100%, rgba(160, 52, 36, .48), rgba(110, 34, 24, .16) 55%, transparent 78%), radial-gradient(ellipse 70% 62% at 50% 46%, transparent 30%, rgba(14, 4, 3, .90) 100%);
}
/* rayons derrière le panneau, à la réussite seulement, et seulement si le mouvement est permis */
.resolution:has(.jet.reussite) .res-boite::before { content: none; }
@media (prefers-reduced-motion: no-preference) {
  .resolution:has(.jet.reussite) .res-boite::before {
    content: ""; position: absolute; left: 50%; top: 22%; width: 150%; aspect-ratio: 1; z-index: -1; pointer-events: none; opacity: .45;
    transform: translate(-50%, -30%); animation: fond-de-tourne 90s linear infinite;
    background: repeating-conic-gradient(rgba(255, 214, 140, .28) 0 4deg, transparent 4deg 18deg);
    -webkit-mask: radial-gradient(circle, #000 5%, transparent 62%); mask: radial-gradient(circle, #000 5%, transparent 62%);
  }
  .resolution[data-lieu]::before { animation: fond-de-respire 24s ease-in-out infinite alternate; }
}
@keyframes fond-de-tourne { to { transform: translate(-50%, -30%) rotate(1turn); } }
@keyframes fond-de-respire { from { transform: scale(1.02); } to { transform: scale(1.08) translateX(-1.2%); } }
/* le panneau laisse voir le fond sans perdre le texte : 72 à 84 % d'opacité */
.resolution .jet-panneau {
  background:
    linear-gradient(var(--j-or-clair) 0 0) left 7px top 7px / 22px 2px no-repeat, linear-gradient(var(--j-or-clair) 0 0) left 7px top 7px / 2px 22px no-repeat,
    linear-gradient(var(--j-or-clair) 0 0) right 7px top 7px / 22px 2px no-repeat, linear-gradient(var(--j-or-clair) 0 0) right 7px top 7px / 2px 22px no-repeat,
    linear-gradient(var(--j-or-clair) 0 0) left 7px bottom 7px / 22px 2px no-repeat, linear-gradient(var(--j-or-clair) 0 0) left 7px bottom 7px / 2px 22px no-repeat,
    linear-gradient(var(--j-or-clair) 0 0) right 7px bottom 7px / 22px 2px no-repeat, linear-gradient(var(--j-or-clair) 0 0) right 7px bottom 7px / 2px 22px no-repeat,
    radial-gradient(ellipse 70% 48% at 50% 50%, rgba(130, 96, 196, .16), transparent 72%),
    linear-gradient(rgba(30, 23, 41, .74), rgba(14, 10, 20, .86));
}
.resolution .jet.rate .jet-panneau { border-color: rgba(190, 86, 66, .65); box-shadow: inset 0 0 0 4px #13101b, inset 0 0 0 5px rgba(190, 86, 66, .30), 0 0 30px rgba(160, 52, 36, .35), 0 18px 44px rgba(0, 0, 0, .55); }
.resolution .jet.rate .jet-mot { color: #e09a88; text-shadow: 0 0 16px rgba(190, 70, 50, .45); }
.resolution .jet-detail, .resolution .jet-total { text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.resolution .res-avantages, .resolution .res-tire, .resolution .res-suite { text-shadow: 0 1px 4px #000; }
@media (forced-colors: active) { .resolution::before, .resolution::after { display: none; } }
