/* PLEMOS Livres : cartes de présentation des livres (shortcode [plemos_livres_cartes]), d'après le module Code Divi de David. */
.divi-books { display: flex; flex-direction: column; gap: 48px; }

.divi-book-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.06);
  text-align: center;
  font-family: inherit;
}

.divi-book-badge {
  display: inline-block;
  background: #f0f4f8;
  color: #2b4c7e;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.divi-book-title {
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  line-height: 1.2 !important;
}

.divi-book-subtitle {
  margin: 0 0 32px 0 !important;
  font-size: 18px !important;
  color: #666666 !important;
  font-style: italic !important;
  line-height: 1.4 !important;
}

.divi-book-img-wrapper {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 28px;
}

.divi-book-img-wrapper img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid #e8ecef;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.10);
}

/* Accordéon 4ème de couverture */
.divi-book-accordion {
  margin: 0 auto 32px auto;
  border: 1px solid #e8ecef;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  background: #fafbfc;
}

.divi-book-accordion details summary {
  padding: 14px 20px;
  font-weight: 600;
  font-size: 15px;
  color: #2b4c7e;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background-color 0.2s ease;
}

.divi-book-accordion details summary::-webkit-details-marker {
  display: none;
}

.divi-book-accordion details summary:hover {
  background-color: #f0f4f8;
}

.divi-book-accordion details summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: #2b4c7e;
  transition: transform 0.3s ease;
}

.divi-book-accordion details[open] summary::after {
  content: "−";
}

.divi-book-accordion-content {
  padding: 0 20px 20px 20px;
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
  border-top: 1px solid #e8ecef;
  background: #ffffff;
}

.divi-book-accordion-content p {
  margin: 14px 0 0 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  color: #4a5568 !important;
  line-height: 1.6 !important;
}

/* Boutons */
.divi-book-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.divi-book-btn {
  position: relative;
  display: inline-block;
  padding: 18px 28px;
  background-color: #f4f6f8;
  color: #333333;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  min-width: 150px;
  text-align: center;
  white-space: nowrap;
}

.divi-book-btn-text {
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.divi-book-btn-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2b4c7e;
  color: #000000;
  opacity: 0;
  transform: translateY(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Boutons avec lien : bleu pâle au survol, texte noir */
.divi-book-btn--ok .divi-book-btn-hover {
  background-color: #a9c6e0;
}

/* Bouton "Bientôt" : rouge au survol, texte blanc pour rester lisible */
.divi-book-btn--soon {
  cursor: default;
}

.divi-book-btn--soon .divi-book-btn-hover {
  background-color: #7e2b2b;
  color: #ffffff;
}

/* Bouton "Plus d'infos" : texte en gras */
.divi-book-btn--bold,
.divi-book-btn--bold .divi-book-btn-hover {
  font-weight: 800;
}

.divi-book-btn:hover .divi-book-btn-text,
.divi-book-btn:focus-within .divi-book-btn-text {
  opacity: 0;
  transform: translateY(-100%);
}

.divi-book-btn:hover .divi-book-btn-hover,
.divi-book-btn:focus-within .divi-book-btn-hover {
  opacity: 1;
  transform: translateY(0);
}

/* --- Bouton "Broché" à deux liens --- */
.divi-book-btn-hover--split {
  flex-direction: column;
  padding: 0;
}

.divi-book-btn-half {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #000000;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background-color 0.2s ease;
}

.divi-book-btn-half:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

/* Moitié sans lien (pas encore disponible) */
.divi-book-btn-half--soon {
  color: rgba(0, 0, 0, 0.45);
  cursor: default;
}

.divi-book-btn-half--soon:hover {
  background-color: transparent;
}

.divi-book-btn-divider {
  width: 70%;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.divi-book-flag-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Petits écrans : retour à la ligne pour que les boutons restent lisibles */
@media (max-width: 600px) {
  .divi-book-buttons {
    flex-wrap: wrap;
  }
}

/* Vitrine du projet de livres ([plemos_livres_vitrine]) : encart compact qui mène à /collections/ */
.plv {
  display: flex; align-items: center; gap: 28px; max-width: 760px; margin: 0 auto; padding: 22px 28px 22px 24px;
  background: #ffffff; border: 1px solid #e8ecef; border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  text-decoration: none !important; color: #4a5568; font-family: inherit; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.plv:hover { border-color: #c9d6e6; box-shadow: 0 10px 28px rgba(43, 76, 126, 0.10); }
.plv:focus-visible { outline: 2px solid #2b4c7e; outline-offset: 3px; }
.plv-pile {
  --w: 76px; --dx: 36px; --dy: 6px;
  position: relative; flex: none; display: block;
  width: calc(var(--w) + (var(--n) - 1) * var(--dx));
  height: calc(var(--w) * 1.414 + (var(--n) - 1) * var(--dy));
}
.plv-pile img {
  position: absolute; width: var(--w); height: auto; aspect-ratio: 1 / 1.414; object-fit: cover; max-width: none; margin: 0;
  left: calc(var(--k) * var(--dx)); top: calc((var(--n) - 1 - var(--k)) * var(--dy));
  border: 1px solid #e8ecef; border-radius: 2px; background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08), 0 6px 14px rgba(17, 24, 39, 0.12);
  transition: transform 0.25s ease;
}
.plv:hover .plv-pile img { transform: translateX(calc((var(--k) - (var(--n) - 1) / 2) * 6px)); }
.plv-texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; text-align: left; }
.plv-etiquette { font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: #2b4c7e; }
.plv-titre { font-size: 19px; line-height: 1.3; font-weight: 700; color: #1a1a1a; }
.plv-desc { font-size: 14.5px; line-height: 1.5; color: #4a5568; }
.plv-lien { margin-top: 4px; font-size: 14.5px; font-weight: 600; color: #2b4c7e; text-decoration: underline; text-underline-offset: 3px; }
.plv:hover .plv-lien { text-decoration-thickness: 2px; }
@media (max-width: 560px) {
  .plv { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .plv-pile img, .plv { transition: none; } }
