* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;

  width: 100%;
  min-height: 100%;

  background: #202020;
}

/* Ordinateur : pas de scroll */
@media (min-width: 701px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }
}

/* Conteneur principal */
.book-area {
  width: 100%;
  min-height: 100vh;

  display: flex;

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

  overflow: hidden;

  padding: 0;
  margin: 0;

  gap: 0;

  background: #202020;
}

/* Boutons cachés par défaut */
.mobile-controls {
  display: none;
}

.nav-btn {
  background: white;

  color: #202020;

  border: none;

  border-radius: 10px;

  padding: 10px 25px;

  font-size: 16px;

  font-weight: bold;

  cursor: pointer;
}

/* Flipbook */
#book {
  display: block;

  margin: 0;

  padding: 0;
}

/* Page HTML utilisée par PageFlip */
.page {
  width: 100%;
  height: 100%;

  position: relative;

  overflow: hidden !important;

  background: #ffffff;
}

/* Image de chaque page */
.page img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: fill;

  background: #ffffff;

  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;

  image-rendering: auto;
}

/* Page vide au début et à la fin sur ordinateur */
.page.empty-page {
  background: #202020 !important;
}

.page.empty-page img {
  background: #202020 !important;
}

/* Zones cliquables invisibles */
.pdf-link-hotspot {
  position: absolute !important;

  display: block !important;

  z-index: 999999 !important;

  background: transparent !important;

  border: none !important;

  cursor: pointer !important;

  pointer-events: auto !important;

  touch-action: manipulation !important;
}

/* Correction PageFlip */
.stf__parent {
  margin: 0 auto !important;
}

.stf__block {
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.55);
}

/* Grands écrans */
@media (min-width: 769px) {
  .book-area {
    padding: 0;
  }
}

/* iPad */
@media (max-width: 768px) and (min-width: 481px) {
  html,
  body {
    overflow-y: auto;

    height: auto;
  }

  .book-area {
    min-height: auto;

    padding-top: 10px;

    padding-bottom: 10px;
  }
}

/* iPhone */
@media (max-width: 480px) {
  html,
  body {
    overflow-y: auto;

    height: auto;
  }

  .book-area {
    flex-direction: column;

    justify-content: center;

    align-items: center;

    gap: 15px;

    min-height: auto;

    padding-top: 10px;

    padding-bottom: 10px;
  }

  .mobile-controls {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 15px;

    width: 100%;

    z-index: 10;
  }

  .nav-btn {
    padding: 10px 20px;

    font-size: 15px;

    border-radius: 12px;
  }
}

/* iPhone paysage */
@media (max-height: 480px) and (orientation: landscape) {
  .book-area {
    gap: 5px;
  }

  .nav-btn {
    padding: 6px 15px;

    font-size: 14px;
  }
}

/* Page vide / fond */
.stf__item--empty {
  background: #202020 !important;
}

.stf__item--empty .page {
  background: #202020 !important;
}

.stf__wrapper {
  background: #202020 !important;
}

.stf__block {
  background: transparent !important;
}