
/* ==========================================================
   MON PASSEPORT AVENIR PRO — V15 IMMERSIVE
   Transition de feuilletage avant l'ouverture d'une mission
   ========================================================== */

.v15-page-turn {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(235, 204, 121, .16), transparent 34%),
    rgba(3, 18, 39, .82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}

.v15-page-turn.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.v15-book-stage {
  position: relative;
  width: min(720px, 92vw);
  height: min(460px, 67vw);
  max-height: 72vh;
  min-height: 280px;
  perspective: 1800px;
  transform: translateY(10px) scale(.96);
  opacity: 0;
}

.v15-page-turn.is-active .v15-book-stage {
  animation: v15BookEnter .48s ease-out forwards;
}

.v15-book-shadow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -7%;
  height: 15%;
  border-radius: 50%;
  background: rgba(0, 0, 0, .42);
  filter: blur(20px);
  transform: scaleX(.82);
}

.v15-book {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform-style: preserve-3d;
  filter: drop-shadow(0 24px 25px rgba(0, 0, 0, .30));
}

.v15-paper {
  position: relative;
  overflow: hidden;
  color: #17233a;
  background:
    linear-gradient(90deg, rgba(124, 93, 43, .09), transparent 7%, transparent 93%, rgba(124, 93, 43, .08)),
    repeating-linear-gradient(0deg, rgba(86, 62, 31, .025) 0, rgba(86, 62, 31, .025) 1px, transparent 1px, transparent 4px),
    #fbf5e7;
  border: 1px solid rgba(111, 82, 39, .20);
}

.v15-paper-left {
  border-radius: 12px 2px 2px 12px;
  box-shadow: inset -18px 0 25px -22px rgba(30, 20, 8, .65);
}

.v15-paper-right {
  border-radius: 2px 12px 12px 2px;
  box-shadow: inset 18px 0 25px -22px rgba(30, 20, 8, .65);
}

.v15-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 22% 15%, rgba(255,255,255,.75), transparent 28%);
  mix-blend-mode: screen;
}

.v15-book-spine {
  position: absolute;
  z-index: 20;
  top: 1.5%;
  bottom: 1.5%;
  left: 50%;
  width: 18px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(57, 37, 15, .25), rgba(255,255,255,.35), rgba(57, 37, 15, .22), transparent);
  filter: blur(1px);
  pointer-events: none;
}

.v15-page-content {
  position: absolute;
  inset: 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}

.v15-page-kicker {
  margin: 0;
  color: #8f6a1f;
  font-weight: 800;
  font-size: clamp(.68rem, 1.6vw, .85rem);
  letter-spacing: .18em;
}

.v15-page-title {
  margin: 0;
  max-width: 15ch;
  color: #071f42;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 4.6vw, 2.5rem);
  line-height: 1.02;
}

.v15-page-subtitle {
  margin: 0;
  max-width: 27ch;
  font-size: clamp(.75rem, 1.8vw, 1rem);
  line-height: 1.45;
  color: #4e596b;
}

.v15-page-icon {
  display: grid;
  place-items: center;
  width: clamp(54px, 10vw, 82px);
  aspect-ratio: 1;
  margin-bottom: 3px;
  border: 2px solid rgba(181, 137, 42, .55);
  border-radius: 50%;
  background: rgba(255,255,255,.58);
  font-size: clamp(1.8rem, 5vw, 3rem);
  box-shadow: 0 8px 20px rgba(45, 31, 10, .10);
}

.v15-page-number {
  position: absolute;
  bottom: 6%;
  color: rgba(54, 53, 49, .65);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .8rem;
}

.v15-flip-page {
  position: absolute;
  z-index: 30;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  pointer-events: none;
}

.v15-flip-front,
.v15-flip-back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  border: 1px solid rgba(111, 82, 39, .22);
  background:
    repeating-linear-gradient(0deg, rgba(86, 62, 31, .025) 0, rgba(86, 62, 31, .025) 1px, transparent 1px, transparent 4px),
    #fbf5e7;
}

.v15-flip-front {
  border-radius: 2px 12px 12px 2px;
  box-shadow: inset 18px 0 24px -23px rgba(30, 20, 8, .7);
}

.v15-flip-back {
  border-radius: 12px 2px 2px 12px;
  transform: rotateY(180deg);
  box-shadow: inset -18px 0 24px -23px rgba(30, 20, 8, .7);
}

.v15-flip-front::before,
.v15-flip-back::before {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(161, 121, 38, .20);
  border-radius: 6px;
}

.v15-page-turn.is-flipping .v15-flip-page {
  animation: v15TurnPage 1.65s cubic-bezier(.58,.04,.23,.98) forwards;
}

.v15-page-turn.is-flipping .v15-book {
  animation: v15BookMove 1.65s cubic-bezier(.58,.04,.23,.98) forwards;
}

.v15-page-turn.is-leaving {
  opacity: 0;
  transition-duration: .20s;
}

.v15-transition-label {
  position: absolute;
  left: 50%;
  bottom: max(14px, 3vh);
  transform: translateX(-50%);
  width: max-content;
  max-width: 90vw;
  margin: 0;
  color: rgba(255,255,255,.90);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.v15-transitioning {
  overflow: hidden !important;
}

@keyframes v15BookEnter {
  from { opacity: 0; transform: translateY(12px) scale(.95) rotateX(3deg); }
  to   { opacity: 1; transform: translateY(0) scale(1) rotateX(0); }
}

@keyframes v15TurnPage {
  0%   { transform: rotateY(0deg); }
  18%  { transform: rotateY(-18deg); }
  72%  { transform: rotateY(-156deg); }
  100% { transform: rotateY(-180deg); }
}

@keyframes v15BookMove {
  0%   { transform: translateX(0) rotateX(0); }
  42%  { transform: translateX(1.3%) rotateX(.6deg); }
  100% { transform: translateX(0) rotateX(0); }
}

@media (max-width: 560px) {
  .v15-book-stage {
    width: 94vw;
    height: 64vw;
    min-height: 245px;
  }
  .v15-page-content {
    inset: 8%;
    gap: 6px;
  }
  .v15-page-subtitle {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v15-page-turn,
  .v15-page-turn.is-active .v15-book-stage,
  .v15-page-turn.is-flipping .v15-flip-page,
  .v15-page-turn.is-flipping .v15-book {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
