/* ======================================================
   FRAGMENTS — GALERIE IMMERSIVE
   Version autonome et stable
   ====================================================== */


/* ------------------------------------------------------
   Reset local (Fragments uniquement)
   ------------------------------------------------------ */
html,
body {
  margin: 0;
  padding: 0;
  background: #0b0f0d;
  overflow: hidden;
}


/* ------------------------------------------------------
   Conteneur principal — SEUL élément scrollable
   ------------------------------------------------------ */
.fragments {
  height: 100vh;
  height: 100svh;

  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;

  /* Masquage scrollbar */
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge legacy */
}

/* Chrome / Safari / Edge */
.fragments::-webkit-scrollbar {
  width: 0;
  height: 0;
}


/* ------------------------------------------------------
   Chaque fragment = 1 écran
   ------------------------------------------------------ */
.fragment {
  height: 100vh;
  height: 100svh;

  scroll-snap-align: start;
  scroll-snap-stop: always;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #0b0f0d;
}


/* ------------------------------------------------------
   Images
   ------------------------------------------------------ */
.fragment img {
  max-width: 100%;
  max-height: 100%;

  object-fit: contain;
  object-position: center;

  display: block;
  user-select: none;
  pointer-events: none;
}


/* ======================================================
   LF_10 — FIN DE SÉQUENCE
   ====================================================== */

.fragment-end {
  position: relative;
  background: #0b0f0d;
}


/* Texte centré */
.fragment-end .end-content {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.fragment-end .end-text {
  font-family: "Oxanium", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0.12em;

  color: #cfd6d3;
  opacity: 0.85;

  white-space: pre-line;
}


/* ------------------------------------------------------
   Signature / sortie — UNIQUEMENT sur LF_10
   ------------------------------------------------------ */
.fragment-end .fragments-back {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + clamp(32px, 6vh, 56px));
  transform: translateX(-50%);

  font-family: "Nasalization", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;

  color: #9ad4b3;
  opacity: 0.7;

  transition: opacity 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .fragment-end .fragments-back:hover {
    opacity: 1;
  }
}


/* ------------------------------------------------------
   Curseur terminal (fin de séquence)
   ------------------------------------------------------ */
.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  margin-left: 0.2em;

  background: #9ad4b3;
  opacity: 0.8;

  animation: blink 1.4s steps(1) infinite;
}

@keyframes blink {
  0%   { opacity: 0.8; }
  50%  { opacity: 0; }
  100% { opacity: 0.8; }
}