/* ========================================
   MUA Studio — Catalogue Flipbook Styles
   Brand: #0A0A0A, #FAFAF8, #D4A89A, #C9B99A
   Fonts: Cormorant Garamond + DM Sans
   ======================================== */

/* ---- TRIGGER BUTTON ---- */
.flipbook-trigger {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #FAFAF8;
  background: transparent;
  border: 1px solid rgba(250, 250, 248, 0.4);
  padding: 12px 32px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.flipbook-trigger::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #D4A89A;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
}
.flipbook-trigger:hover::before {
  transform: scaleX(1);
}
.flipbook-trigger:hover {
  color: #0A0A0A;
  border-color: #D4A89A;
}
.flipbook-trigger span {
  position: relative;
  z-index: 1;
}

/* Variante sombre (pour fond clair) */
.flipbook-trigger--dark {
  color: #0A0A0A;
  border-color: rgba(10, 10, 10, 0.3);
}
.flipbook-trigger--dark:hover {
  color: #FAFAF8;
}

/* ---- OVERLAY ---- */
.flipbook-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.flipbook-overlay--active {
  opacity: 1;
}

.flipbook-overlay__bg {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.flipbook-overlay__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 95vw;
  max-height: 95vh;
}

/* ---- HEADER ---- */
.flipbook-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  padding: 0 8px;
}
.flipbook-overlay__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 300;
  color: #FAFAF8;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.flipbook-overlay__close {
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid rgba(250, 250, 248, 0.25);
  border-radius: 50%;
  color: #FAFAF8;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.flipbook-overlay__close:hover {
  background: rgba(250, 250, 248, 0.1);
  border-color: rgba(250, 250, 248, 0.5);
  transform: rotate(90deg);
}

/* ---- PAGES CONTAINER ---- */
.flipbook-pages {
  position: relative;
  width: 85vw;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 3px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(250, 250, 248, 0.04);
}

/* ---- PAGE ---- */
.flipbook-page {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1.0),
              opacity 0.6s ease;
}
.flipbook-page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0A0A0A;
  display: block;
}
.flipbook-page--current {
  transform: translateX(0);
  opacity: 1;
  z-index: 2;
}
.flipbook-page--prev {
  transform: translateX(-8%) scale(0.96);
  opacity: 0;
  z-index: 1;
}
.flipbook-page--next {
  transform: translateX(8%) scale(0.96);
  opacity: 0;
  z-index: 1;
}

/* ---- TOUCH ZONES ---- */
.flipbook-touch {
  position: absolute;
  top: 0;
  height: 100%;
  width: 35%;
  z-index: 10;
  cursor: pointer;
}
.flipbook-touch--left { left: 0; }
.flipbook-touch--right { right: 0; }

/* ---- NAVIGATION ---- */
.flipbook-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.flipbook-nav__btn {
  width: 48px;
  height: 48px;
  background: rgba(250, 250, 248, 0.06);
  border: 1px solid rgba(250, 250, 248, 0.2);
  border-radius: 50%;
  color: #FAFAF8;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.flipbook-nav__btn:hover:not(:disabled) {
  background: rgba(250, 250, 248, 0.14);
  border-color: rgba(212, 168, 154, 0.6);
  transform: scale(1.08);
}
.flipbook-nav__btn:disabled {
  opacity: 0.2;
  cursor: default;
}
.flipbook-nav__indicator {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(250, 250, 248, 0.5);
  letter-spacing: 0.15em;
  min-width: 80px;
  text-align: center;
}

/* ---- DOTS ---- */
.flipbook-dots {
  display: flex;
  gap: 8px;
}
.flipbook-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(250, 250, 248, 0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}
.flipbook-dot--active {
  background: #D4A89A;
  transform: scale(1.4);
}
.flipbook-dot:hover:not(.flipbook-dot--active) {
  background: rgba(250, 250, 248, 0.45);
}

/* ---- MOBILE ---- */
@media (max-width: 640px) {
  .flipbook-pages {
    width: 96vw;
  }
  .flipbook-overlay__title {
    font-size: 1rem;
    letter-spacing: 0.15em;
  }
  .flipbook-nav__btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  .flipbook-overlay__content {
    gap: 14px;
  }
}
