.hero-bg {
  background-image:
    linear-gradient(to bottom, rgba(12, 5, 0, 0.2), rgba(12, 5, 0, 0.65)),
    url("../assets/diary/yeyu-diary-bg.webp");
}

.diary-content .swiper {
  width: 100% !important;
}

/* ---------- Diary Container ---------- */

.diary-container {
  display: flex;
  padding-top: 72px; /* hauteur de la nav */
  min-height: 100vh;
  background-image: 
    linear-gradient(
    90deg,
    rgba(5, 3, 8, 0.85) 0%,
    rgba(5, 3, 8, 0.4) 20%,
    transparent 100%
  ),
    url('assets/diary-bg.webp');
}

.group-description {
  max-width: 70vw;
}

/* ---------- Primary Menu (Vertical Icons, Left) ---------- */

.primary-menu {
  width: 120px;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-right: 1px solid rgba(246, 229, 176, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: #f5e7d5;
}

.menu-item:hover {
  background: rgba(246, 229, 176, 0.08);
  color: #f6e5b0;
}

.menu-item.active {
  background: rgba(246, 229, 176, 0.15);
  border-left: 3px solid #dba85a;
  color: #f6e5b0;
}

.menu-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.menu-label {
  font-size: 0.75rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.2;
  font-weight: 500;
}

/* ---------- Secondary Menu (Left-Center) ---------- */

.secondary-menu {
  width: 200px;
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(246, 229, 176, 0.1);
  overflow-y: auto;
  max-height: calc(100vh - 72px);
  background: linear-gradient(to right, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
}

.secondary-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.secondary-items.hidden {
  display: none;
}

.secondary-item {
  padding: 0.75rem 1rem;
  font-size: 1.2rem;
  color: #cbd5e1;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.25s ease;
  text-transform: capitalize;
}

.secondary-item:hover {
  color: #f6e5b0;
  background: rgba(246, 229, 176, 0.08);
}

.secondary-item.active {
  color: #f6e5b0;
  border-left-color: #dba85a;
  background: rgba(246, 229, 176, 0.12);
  font-weight: 600;
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
  width: 50px;
  height: 50px;
  background: rgba(78, 56, 33, 0.22);
  border: 1px solid rgba(246, 229, 176, 0.3);
  border-radius: 8px;
  color: #302727;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px) saturate(1.2);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(246, 229, 176, 0.25);
  color: #f3e4b9;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 20px;
}

.swiper-pagination {
  bottom: 8% !important;
  left: 35% !important;
  width: 20% !important;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.swiper-pagination-bullet {
  background: rgba(246, 229, 176, 0.5);
  opacity: 0.8;
}

.swiper-pagination-bullet.swiper-pagination-bullet-active {
  background: #f6e5b0;
  opacity: 1;
}
  

/* ---------- Content Main (Right) ---------- */
#main-page-swiper .group-header {
  margin-top: 8rem;
}

#main-page-swiper .stories-group {
  margin-bottom: unset;
}

.diary-content {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.diary-swiper .dialogue-bubble {
  text-align: left;
}

.diary-content .dialogue-bubble {
  margin: 1rem 3rem 0;
}

.diary-content .dialogue-bubble::first-letter {
  font-size: unset;
  text-transform: none;
}

.content-section {
  display: flex; /* Deux colonnes invisibles */
  gap: 2rem; /* Espace entre colonnes */
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  height: 100%;
  width: 99%;
}

.content-section.active {
  opacity: 1;
  pointer-events: auto;
}

.diary-content h3 {
  max-width: 100%;
  height: 5vh;
  margin: 0;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(219, 168, 90, 0.28);
  border-radius: 16px 16px 0 0;
  backdrop-filter: blur(10px);
}

.bg-page h3 {
  margin: 0 0 0 7%;
  max-width: unset;
  height: unset;
  background:  unset;
  border:  unset;
  border-radius:  unset;
  backdrop-filter:  unset;
  color: #725222;
  margin-top: 6%;
  font-weight: 600;
  backdrop-filter: blur(1px);
}

.bg-page a {
  color: #725222;
}

.vcenter {
  align-items: center;
  justify-content: center;
}

.vflexcontainer {
  display: flex;
  flex-direction: column;
  height: 90vh;
  backdrop-filter: blur(1px);
}

.vflexcontainer h3 {
  flex: 0 0 auto;
  width: 100%;
}

.vflexcontainer img.w100 {
  flex: 0 0 auto;
}

.bg-page {
  background: url('assets/page-bg.webp') no-repeat;
  background-size: 100% 100%;
  height: 90vh;
}

.bg-card {
  background: url('assets/card-bg.webp') no-repeat;
  background-size: 100% 100%;
  min-width: 25vw;
  max-height: 456px;
  flex: 1 1 auto;
  margin: 1rem 0;
  display: flex;
}

.vflexcontainer .dialogue-bubble {
  background: unset;
  border: unset;
  backdrop-filter: blur(2px);
  box-shadow: unset;
  color: black;
}

.bg-card .dialogue-bubble {
  margin: auto;
}

.character-cover .w100 {
  margin: auto;
  width: 100%;
}

.swiper-slide :not(.character-cover) > img {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(246, 229, 176, 0.2) inset;
}

.see-stories-link {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  width: max-content;
  transform: translate(-70%, 0%);
}

.page-content {
  flex: 1; /* prend tout l'espace restant */
  display: flex;
  justify-content: center; /* centre horizontalement si besoin */
}

.vflexcontainer .bgm + .page-content {
  align-items: initial;
}


.w100 {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.media-frame {
  width: 45vw;
  height: 89vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.media-block {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  max-width: 100%;
  max-height: 100%;
}

.subgroup-title {
  display: block;
  width: 100%;
  font-size: 2rem;
  font-weight: 500;
  color: #dba85a;
  letter-spacing: 0.15em;
  margin: 2.5rem 0 1.5rem 0;
  padding-left: 1rem;
  font-variant: small-caps;
}

.media-block .w100 {
  display: block;
  max-width: 100%;
  max-height: calc(89vh - 2.5rem - 1.5rem - 2.3rem);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* ---------- Lecteur musique -------------*/
.bgm {
  height: fit-content;
  margin-top: 1rem;
}

.vflexcontainer .bgm {
  flex-shrink: 0;
  margin: 1rem auto 0 auto;
  width: 80%;
}

/* ---------- Scrollbar stylisé ---------- */

.secondary-menu::-webkit-scrollbar {
  width: 6px;
}

.secondary-menu::-webkit-scrollbar-track {
  background: transparent;
}

.secondary-menu::-webkit-scrollbar-thumb {
  background: rgba(219, 168, 90, 0.4);
  border-radius: 3px;
}

.secondary-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(219, 168, 90, 0.6);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .diary-container {
    flex-direction: column;
  }

  .primary-menu,
  .secondary-menu {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(246, 229, 176, 0.1);
    padding: 1rem;
  }

  .primary-menu {
    flex-direction: row;
    gap: 1rem;
  }

  .secondary-menu {
    max-height: 80px;
  }

  .secondary-items {
    flex-direction: row;
    gap: 1rem;
  }

  .content-overlay {
    padding: 2rem;
  }

  .content-overlay h2 {
    font-size: 2rem;
  }

  .content-overlay p {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .diary-container {
    padding-top: 60px;
  }

  .content-overlay {
    padding: 1.5rem;
  }

  .content-overlay h2 {
    font-size: 1.5rem;
  }

  .content-overlay p {
    font-size: 0.9rem;
  }
}


.diary-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none; /* masquée par défaut */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.diary-lightbox.open {
  display: flex;
}

.diary-lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
}

/* Boutons */
.diary-lightbox-close,
.diary-lightbox-prev,
.diary-lightbox-next {
  position: absolute;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(246, 229, 176, 0.6);
  color: #f6e5b0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.diary-lightbox-close {
  top: 2rem;
  right: 2rem;
}

.diary-lightbox-prev {
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.diary-lightbox-next {
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.diary-lightbox-close:hover,
.diary-lightbox-prev:hover,
.diary-lightbox-next:hover {
  background: rgba(246, 229, 176, 0.2);
  transform: translateY(-50%) scale(1.05);
}

.diary-lightbox-close:hover {
  transform: scale(1.05);
}

.bottom-note p {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  margin: 0;
  z-index: 10;
  font-size: 1.2rem;
  backdrop-filter: blur(5px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(246, 229, 176, 0.2) inset;
}

