
.rdb-book {
  --rdb-ink: #243128;
  --rdb-muted: #657268;
  --rdb-paper: #fbfaf5;
  --rdb-border: #d9d2bf;
  max-width: 820px;
  margin: 2rem auto;
  padding: clamp(1.2rem, 4vw, 3.5rem);
  color: var(--rdb-ink);
  background: var(--rdb-paper);
  border: 1px solid var(--rdb-border);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(40, 46, 39, .08);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.82;
}

.rdb-hero {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rdb-border);
}

.rdb-kicker {
  margin: 0 0 .6rem;
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rdb-muted);
}

.rdb-book h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.03em;
}

.rdb-subtitle {
  margin: 1rem 0 .5rem;
  font-size: 1.35rem;
  font-style: italic;
}

.rdb-deck {
  max-width: 690px;
  color: var(--rdb-muted);
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

.rdb-reading-note,
.rdb-facts {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid #8c7550;
  background: rgba(140, 117, 80, .08);
  font-family: system-ui, sans-serif;
  font-size: .96rem;
  line-height: 1.6;
}

.rdb-chapter h2,
.rdb-facts h2 {
  margin-top: 3rem;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  line-height: 1.2;
}

.rdb-chapter p {
  margin: 1.05rem 0;
}

.rdb-dropcap::first-letter {
  float: left;
  padding: .08em .1em 0 0;
  font-size: 4.9rem;
  line-height: .82;
}

.rdb-book blockquote {
  margin: 2rem 0;
  padding: .8rem 0 .8rem 1.4rem;
  border-left: 3px solid #8c7550;
  font-size: 1.18rem;
  font-style: italic;
}

.rdb-ending {
  margin-top: 3rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rdb-border);
  font-family: system-ui, sans-serif;
}

.rdb-facts ul {
  padding-left: 1.25rem;
}

.rdb-facts li + li {
  margin-top: .65rem;
}

@media (max-width: 640px) {
  .rdb-book {
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    font-size: 1rem;
  }
}

.rdb-library {
  --rdb-ink: #243128;
  --rdb-muted: #657268;
  --rdb-paper: #fbfaf5;
  --rdb-border: #d9d2bf;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0;
  color: var(--rdb-ink);
}

.rdb-library__hero {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.rdb-library__hero h1 {
  margin: .35rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.035em;
}

.rdb-library__hero > p:last-child {
  max-width: 680px;
  color: var(--rdb-muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.rdb-library__grid {
  display: grid;
  gap: 1.5rem;
}

.rdb-novel-card {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--rdb-border);
  border-radius: 24px;
  background: var(--rdb-paper);
  box-shadow: 0 18px 50px rgba(40, 46, 39, .08);
}

.rdb-novel-card__mark {
  display: grid;
  min-height: 280px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #26352c, #765f3f);
  color: #fffaf0;
  font-size: 3rem;
}

.rdb-novel-card h2 {
  margin: .35rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
}

.rdb-novel-card p {
  max-width: 720px;
  line-height: 1.7;
}

.rdb-novel-card__status {
  font-weight: 700;
  color: var(--rdb-muted);
}

.rdb-button {
  display: inline-block;
  margin-top: .75rem;
  padding: .85rem 1.2rem;
  border-radius: 999px;
  background: #243128;
  color: #fff !important;
  text-decoration: none;
  font-family: system-ui, sans-serif;
  font-weight: 700;
}

.rdb-button:hover,
.rdb-button:focus {
  transform: translateY(-1px);
  opacity: .92;
}

@media (max-width: 720px) {
  .rdb-novel-card {
    grid-template-columns: 1fr;
  }

  .rdb-novel-card__mark {
    min-height: 180px;
  }
}


/* 0.2.5 — intégration sûre avec La Façade */
body.rkdfa-module-romans .rdb-library,
body.rkdfa-module-romans .rdb-book {
  width:min(1120px,calc(100vw - 48px));
  max-width:1120px;
  margin:0 auto;
  background:#fffdf8;
  border:1px solid rgba(218,207,186,.72);
  border-radius:22px;
  box-shadow:0 24px 70px rgba(0,0,0,.22);
}
body.rkdfa-module-romans .rdb-library {padding:clamp(24px,5vw,60px)}
body.rkdfa-module-romans .rdb-book {padding:clamp(24px,5vw,68px)}
@media(max-width:760px){
  body.rkdfa-module-romans .rdb-library,
  body.rkdfa-module-romans .rdb-book{
    width:calc(100vw - 24px);
    padding:20px 15px 30px;
    border-radius:14px;
  }
}


/* 0.2.6 — Romans existants / Gardiens sécurisés */
.rdb-novel-card__mark--cover{
  overflow:hidden;
  min-height:170px;
}
.rdb-novel-card__mark--cover img{
  display:block;
  width:100%;
  height:100%;
  min-height:170px;
  object-fit:cover;
}
.rdb-novel-card--featured{
  position:relative;
}
.rdb-novel-card--featured::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  border-radius:3px;
  background:currentColor;
  opacity:.35;
}


/* ==========================================================================
   0.2.7 — un seul titre par page
   ========================================================================== */

/*
 * WordPress/Divi rend parfois le titre de la page avant le shortcode.
 * Le module Romans possède déjà son propre H1 éditorial : on masque donc
 * uniquement le titre natif du thème, jamais les titres internes du roman.
 */
body.rkdfa-module-romans .entry-title,
body.rkdfa-module-romans .et_post_meta_wrapper > h1.entry-title,
body.rkdfa-module-romans .et_pb_post_title,
body.rkdfa-module-romans .et_pb_title_container > h1,
body.rkdfa-module-romans #main-content > .container > #content-area > #left-area > article > h1:first-child {
  display:none !important;
}

/* Supprime aussi l'espace que certains modèles Divi gardent autour du titre. */
body.rkdfa-module-romans .et_post_meta_wrapper:empty,
body.rkdfa-module-romans .et_pb_post_title:empty {
  display:none !important;
}
