.project-fan {
  position: absolute;
  inset: 0;
  isolation: isolate;
  pointer-events: none;
}
.slip-stack {
  position: absolute;
  inset-inline-start: 12.5%;
  top: 23%;
  width: 28%;
  height: 53%;
}
.slip-stack:last-child {
  inset-inline-start: auto;
  inset-inline-end: 19%;
  text-align: right;
}
.project-slip {
  position: absolute;
  inset: 0;
  inset-block-start: calc(var(--depth) * .22%);
  padding: 5%;
  overflow: hidden;
  color: #522d21;
  background: #faf8f2;
  border: 1px solid #d4cbbe;
}
.project-slip:first-child { box-shadow: 0 .4cqw .7cqw #412d2518; }
.slip-title {
  display: block;
  width: 66%;
  font: 600 max(7px, 1.9cqw)/1.12 var(--serif);
}
.project-slip::after {
  content: "";
  display: block;
  aspect-ratio: 16 / 9;
  width: 66%;
  margin-top: 4%;
  background-image: url("vignettes-projets.webp");
  background-size: 600% 600%;
  background-position: calc(var(--slot) * 20%) calc(var(--batch) * 20%);
}
.slip-stack:last-child .slip-title,
.slip-stack:last-child .project-slip::after { margin-inline-start: auto; }

.project-fan + .proof {
  background: transparent;
  box-shadow: none;
}
.project-fan + .proof i { visibility: hidden; }
.project-fan + .proof .aster-frame { border-color: transparent; }
.aster-frame {
  display: block;
  margin-top: 6%;
  border-top: 1px solid var(--rule);
}
.aster-portrait {
  display: block;
  position: relative;
  transform-origin: 50% 90%;
}
.proof .aster-portrait img {
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
}

#skip-folder-motion {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
}
#skip-folder-motion:not([hidden]) + span { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .fan-waiting .project-fan { visibility: hidden; }
  .aster-peek { --peek-time: 2s; --peek-delay: 0s; }
  .aster-peek .photo-print {
    animation: camille-tilt var(--peek-time) ease-in-out var(--peek-delay);
  }
  .aster-peek .proof {
    overflow: visible;
    animation: aster-card var(--peek-time) ease-in-out var(--peek-delay);
  }
  .aster-peek .aster-portrait {
    animation: aster-rise var(--peek-time) ease-in-out var(--peek-delay);
  }
  /* The two light patches follow the eyes in the original square portrait. */
  .aster-peek .aster-portrait::before,
  .aster-peek .aster-portrait::after {
    content: "";
    position: absolute;
    top: 37.2%;
    left: 30.2%;
    width: 14.2%;
    height: 18%;
    opacity: 0;
    background:
      radial-gradient(ellipse 29% 4% at 50% 51%, #e1a3ff 35%, #ac68de 77%, transparent),
      radial-gradient(ellipse closest-side, #100c14 67%, transparent);
    animation: aster-blink var(--peek-time) linear var(--peek-delay);
  }
  .aster-peek .aster-portrait::after { left: 56.5%; }

  @keyframes camille-tilt {
    0%, 15%, 100% { transform: rotate(9deg); }
    26% { transform: translate(-2%, 1%) rotate(6deg); }
    43%, 72% { transform: translate(-31%, 2%) rotate(-8deg); }
  }
  @keyframes aster-card {
    0%, 18%, 100% { transform: rotate(17deg); }
    42%, 72% { transform: translate(1%, -5%) rotate(8deg); }
  }
  @keyframes aster-rise {
    0%, 20%, 100% { transform: none; }
    43% { transform: translate(-15%, -28%) rotate(5deg) scale(1.32); }
    54%, 72% { transform: translate(-19%, -26%) rotate(-3deg) scale(1.31); }
  }
  @keyframes aster-blink {
    0%, 7%, 14%, 58%, 65%, 100% { opacity: 0; }
    10%, 11%, 61%, 62% { opacity: 1; }
  }
}
