.book-single,
.book-collection {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: none;
  opacity: 0;
  transition: opacity .3s ease;
}

.book-single-active,
.book-collection-active {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(28px, 5vw, 54px);
  row-gap: 24px;
  opacity: 1;
}

/* Menu de sélection par auteur */
.books-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
  border-bottom: 2px solid rgba(214,179,106,.15);
}

.authors-menu {
  position: relative;
  z-index: 20;
}

.authors-menu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}

.authors-menu-trigger {
  min-width: 150px;
  padding: 12px 16px;
  border: 1px solid rgba(214,179,106,.32);
  border-radius: 10px;
  background: rgba(17,24,36,.88);
  color: var(--gold-light, #e8c94f);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: border-color .25s ease, background .25s ease;
}

.authors-menu-trigger:hover,
.authors-menu:focus-within .authors-menu-trigger,
.authors-menu.menu-open .authors-menu-trigger {
  border-color: rgba(214,179,106,.65);
  background: rgba(214,179,106,.12);
}

.authors-menu-icon {
  font-size: .7rem;
  transition: transform .25s ease;
}

.authors-menu:hover .authors-menu-icon,
.authors-menu:focus-within .authors-menu-icon,
.authors-menu.menu-open .authors-menu-icon {
  transform: rotate(180deg);
}

.authors-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: min(680px, calc(100vw - 48px));
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid rgba(214,179,106,.3);
  border-radius: 14px;
  background: rgba(12,18,29,.98);
  box-shadow: 0 20px 55px rgba(0,0,0,.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.authors-menu:hover .authors-dropdown,
.authors-menu:focus-within .authors-dropdown,
.authors-menu.menu-open .authors-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.author-group {
  padding: 10px;
}

.author-group h2 {
  margin: 0 0 9px;
  color: var(--gold-light, #e8c94f);
  font-family: 'Cinzel', serif;
  font-size: .88rem;
  font-weight: 600;
}

.book-tab {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(242,239,230,.68);
  font: inherit;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.book-tab:hover,
.book-tab:focus-visible {
  color: rgba(242,239,230,.95);
  background: rgba(214,179,106,.1);
}

.book-tab-active {
  color: var(--gold-light, #e8c94f);
  background: rgba(214,179,106,.14);
}

.current-book {
  margin: 0;
  color: rgba(242,239,230,.7);
  font-family: 'Cinzel', serif;
  font-size: .95rem;
}

/* Collection de nouvelles */
.collection-header {
  margin: 0;
}

.collection-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin: 0 0 12px 0;
  color: var(--gold-light, #e8c94f);
}

.collection-author {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  color: rgba(242,239,230,.65);
  font-style: italic;
}

.collection-intro {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  margin: 0;
  color: rgba(242,239,230,.75);
  line-height: 1.6;
}

/* Accordéon des nouvelles */
.novella-accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.novella-item {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: calc(var(--radius) - 8px);
  background: rgba(17,24,36,.46);
  overflow: hidden;
  transition: box-shadow .25s ease;
}

.novella-item:hover {
  box-shadow: 0 10px 30px rgba(214,179,106,.08), 0 10px 30px rgba(0,0,0,.20);
}

.novella-toggle {
  width: 100%;
  padding: clamp(18px, 3vw, 24px);
  border: none;
  background: transparent;
  color: var(--gold-light, #e8c94f);
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color .25s ease;
  position: relative;
  z-index: 1;
}

.novella-toggle:hover {
  color: var(--gold, #d6b36a);
}

.novella-toggle .toggle-icon {
  display: inline-block;
  transition: transform .3s ease;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.novella-toggle[aria-expanded="false"] .toggle-icon {
  transform: rotate(-90deg);
}

.novella-content {
  max-height: 3000px;
  overflow: hidden;
  transition: max-height .35s ease, opacity .35s ease;
  opacity: 1;
}

.novella-toggle[aria-expanded="false"] + .novella-content {
  max-height: 0;
  opacity: 0;
}

.novella-content {
  padding: 0 clamp(18px, 3vw, 24px) clamp(18px, 3vw, 24px);
  color: rgba(242,239,230,.82);
  line-height: 1.85;
  font-size: 0.95rem;
}

.novella-section {
  margin-bottom: 20px;
}

.novella-section:last-child {
  margin-bottom: 0;
}

.novella-section h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--accent-color, #d6b36a);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.novella-section p {
  margin: 0 0 14px 0;
  padding: 0;
}

.novella-section p:last-child {
  margin-bottom: 0;
}

.novella-section strong {
  color: var(--gold-light, #e8c94f);
  font-weight: 600;
}

.book-header {
  display: contents;
}

.book-info {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.book-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin: 0;
  color: var(--gold-light, #e8c94f);
}

.book-author {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  margin: 0;
  color: rgba(242,239,230,.65);
  font-style: italic;
}

.book-cover {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 100%;
  aspect-ratio: 941 / 1672;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(214,179,106,.08);
  border: 1px solid rgba(214,179,106,.25);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.book-cover:hover,
.book-cover:focus-within {
  transform: translateY(-4px);
  border-color: rgba(214,179,106,.55);
  box-shadow: 0 18px 42px rgba(0,0,0,.45);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Sections déroulables */
.book-sections {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.novella-accordion {
  grid-column: 2;
  grid-row: 2;
}

.book-section {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: calc(var(--radius) - 8px);
  background: rgba(17,24,36,.46);
  overflow: hidden;
  transition: box-shadow .25s ease;
}

.book-section:hover {
  box-shadow: 0 10px 30px rgba(214,179,106,.08), 0 10px 30px rgba(0,0,0,.20);
}

.section-toggle {
  width: 100%;
  padding: clamp(18px, 3vw, 24px);
  border: none;
  background: transparent;
  color: var(--gold-light, #e8c94f);
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color .25s ease;
  position: relative;
  z-index: 1;
}

.section-toggle:hover {
  color: var(--gold, #d6b36a);
}

.toggle-icon {
  display: inline-block;
  transition: transform .3s ease;
  font-size: 0.9rem;
}

.section-toggle[aria-expanded="false"] .toggle-icon {
  transform: rotate(-90deg);
}

.section-content {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height .35s ease, opacity .35s ease;
  opacity: 1;
}

.section-toggle[aria-expanded="false"] + .section-content {
  max-height: 0;
  opacity: 0;
}

.section-content {
  padding: 0 clamp(18px, 3vw, 24px) clamp(18px, 3vw, 24px);
  color: rgba(242,239,230,.82);
  line-height: 1.85;
  font-size: 0.95rem;
}

.section-content p {
  margin: 0 0 16px 0;
}

.section-content p:last-child {
  margin-bottom: 0;
}

.section-content strong {
  color: var(--accent-color, #d6b36a);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .book-single-active,
  .book-collection-active {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 24px;
  }

  .book-info,
  .book-cover,
  .book-sections,
  .novella-accordion {
    grid-column: 1;
  }

  .book-info { grid-row: 1; }

  .book-cover {
    grid-row: 2;
    width: min(240px, 72vw);
    margin: 0;
  }

  .book-sections,
  .novella-accordion { grid-row: 3; }

  .authors-dropdown {
    grid-template-columns: 1fr;
    max-height: 70vh;
    overflow-y: auto;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .book {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "title"
      "author"
      "description"
      "tags"
      "toggle";
    gap: 16px;
  }

  .book-description {
    grid-area: description;
  }
}

/* Modal pour livres */
.book-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: clamp(16px, 4vw, 42px);
}

.book-modal[aria-hidden="true"] {
  display: none;
}

.book-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(7px);
}

.book-modal-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 760px);
  height: min(90vh, 1000px);
  animation: slideUp .3s ease;
}

.book-modal-content img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid rgba(214,179,106,.35);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.7);
}

body.book-modal-open {
  overflow: hidden;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.book-modal-close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(214,179,106,.12);
  color: rgba(242,239,230,.8);
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  transition: all .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-modal-close:hover {
  background: rgba(214,179,106,.25);
  color: var(--gold-light, #e8c94f);
}

