:root {
  --bd-header-height: 90px;
  --bd-bg: #05070c;
  --bd-card: rgba(14, 20, 34, 0.82);
  --bd-card-strong: rgba(18, 27, 46, 0.96);
  --bd-line: rgba(255, 255, 255, 0.1);
  --bd-text: #f5f7ff;
  --bd-muted: #a8b3c7;
  --bd-cyan: #00e5ff;
  --bd-purple: #a855f7;
  --bd-orange: #ff7a18;
  --bd-green: #36e29b;
  --bd-radius-xl: 32px;
  --bd-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.bd-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(0, 229, 255, 0.14), transparent 32%),
    radial-gradient(circle at 90% 18%, rgba(168, 85, 247, 0.16), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(255, 122, 24, 0.1), transparent 35%),
    var(--bd-bg);
  color: var(--bd-text);
  font-family: "Segoe UI", system-ui, sans-serif;
  overflow-x: hidden;
}

body.bd-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
}

/* Stabilise la barre de menu et force les sections à passer en dessous */
body.bd-page .main-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bd-header-height);
  width: 100%;
  z-index: 5000;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  background: rgba(6, 10, 18, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

body.bd-page .bd-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  height: auto;
  padding: 0;
  color: var(--bd-text);
  text-decoration: none;
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #061018;
  font-weight: 900;
  background: linear-gradient(135deg, var(--bd-cyan), var(--bd-purple));
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
}

body.bd-page .navbar {
  width: auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.1rem;
}

body.bd-page .navbar a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--bd-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

body.bd-page .navbar a:hover {
  color: var(--bd-text);
  transform: translateY(-2px);
}

body.bd-page .navbar a i { color: var(--bd-cyan) !important; }

body.bd-page .nav-donate {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: #041018 !important;
  background: linear-gradient(135deg, var(--bd-cyan), var(--bd-green));
}

body.bd-page .nav-donate i { color: #041018 !important; }
body.bd-page .close-btn { display: none; }

.bd-main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: calc(var(--bd-header-height) + 32px) clamp(1rem, 4vw, 4rem) 4rem;
}

.bd-main section { scroll-margin-top: calc(var(--bd-header-height) + 24px); }

.bd-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.08);
  color: var(--bd-cyan);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bd-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  color: #061018;
  background: linear-gradient(135deg, var(--bd-cyan), var(--bd-green));
  font-size: 0.78rem;
  font-weight: 900;
}

.bd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 46px;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--bd-text);
  text-decoration: none;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bd-btn:hover { transform: translateY(-3px); }
.bd-btn-primary { color: #041018; background: linear-gradient(135deg, var(--bd-cyan), var(--bd-green)); box-shadow: 0 18px 40px rgba(0, 229, 255, 0.18); }
.bd-btn-ghost { border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); }
.disabled-link { pointer-events: none; opacity: 0.85; }

.bd-hero-home {
  position: relative;
  min-height: calc(100vh - var(--bd-header-height) - 52px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 5rem);
  border: 1px solid var(--bd-line);
  border-radius: var(--bd-radius-xl);
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)), rgba(7, 12, 24, 0.72);
  box-shadow: var(--bd-shadow);
  overflow: hidden;
}

.bd-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,7,12,0.92), rgba(5,7,12,0.62), rgba(5,7,12,0.95)), url("./Concept_Art/AM7.jpg") center/cover no-repeat;
  opacity: 0.42;
  transform: scale(1.04);
}

.bd-hero-content, .bd-hero-showcase { position: relative; z-index: 2; }
.bd-hero-content h1 { max-width: 850px; margin: 1.2rem 0 1rem; font-size: clamp(2.4rem, 6vw, 6rem); line-height: 0.95; letter-spacing: -0.07em; }
.bd-hero-content p { max-width: 680px; margin: 0; color: var(--bd-muted); font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.8; }
.bd-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.bd-hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; margin-top: 2rem; }
.bd-hero-stats article { padding: 1rem; border: 1px solid var(--bd-line); border-radius: 18px; background: rgba(255, 255, 255, 0.055); }
.bd-hero-stats strong { display: block; color: var(--bd-text); font-size: 1rem; }
.bd-hero-stats span { display: block; margin-top: 0.3rem; color: var(--bd-muted); font-size: 0.82rem; }

.bd-hero-showcase { display: grid; grid-template-columns: 1fr 0.55fr; gap: 1rem; align-items: end; }
.bd-showcase-card, .bd-mini-card { position: relative; overflow: hidden; border: 1px solid var(--bd-line); border-radius: 26px; background: var(--bd-card-strong); box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38); }
.bd-showcase-card img, .bd-mini-card img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card-main { min-height: 520px; }
.card-main .bd-label { position: absolute; top: 1rem; left: 1rem; z-index: 3; }
.bd-showcase-info { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; padding: 1rem; border-radius: 20px; background: rgba(4, 8, 15, 0.82); backdrop-filter: blur(14px); }
.bd-showcase-info h3, .bd-showcase-info p { margin: 0; }
.bd-showcase-info p { margin-top: 0.35rem; color: var(--bd-muted); }
.bd-mini-stack { display: grid; gap: 1rem; }
.bd-mini-card { height: 250px; }
.bd-mini-card span { position: absolute; left: 0.8rem; bottom: 0.8rem; padding: 0.35rem 0.65rem; border-radius: 999px; color: #061018; background: var(--bd-cyan); font-weight: 900; font-size: 0.8rem; }

.bd-section-header { max-width: 820px; margin-bottom: 1.5rem; }
.bd-section-header h2 { margin: 0.9rem 0 0.6rem; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -0.05em; }
.bd-section-header p { margin: 0; color: var(--bd-muted); line-height: 1.8; }
.bd-section-header-row { max-width: none; display: flex; justify-content: space-between; gap: 1rem; align-items: end; }

.bd-dev-section, .bd-featured-section, .bd-library-section, .bd-reader-section, .bd-roadmap-section { margin-top: clamp(3rem, 7vw, 7rem); }
.bd-dev-grid { display: grid; grid-template-columns: 1.45fr repeat(3, minmax(0, 1fr)); gap: 1rem; }
.bd-dev-card { min-height: 220px; padding: 1.3rem; border: 1px solid var(--bd-line); border-radius: 24px; background: var(--bd-card); backdrop-filter: blur(16px); }
.bd-dev-card-large { display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
.bd-dev-icon, .bd-dev-card > i { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; color: #061018; background: linear-gradient(135deg, var(--bd-cyan), var(--bd-purple)); font-size: 1.3rem; }
.bd-dev-card h3 { margin: 0.9rem 0 0.55rem; }
.bd-dev-card-large h3 { margin-top: 0; }
.bd-dev-card p { margin: 0; color: var(--bd-muted); line-height: 1.7; }
.bd-progress { margin-top: 1.4rem; }
.bd-progress-top { display: flex; justify-content: space-between; color: var(--bd-muted); font-weight: 700; }
.bd-progress-top strong { color: var(--bd-cyan); }
.bd-progress-line { height: 10px; margin-top: 0.7rem; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.bd-progress-line span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--bd-cyan), var(--bd-purple)); }
.bd-status { display: inline-flex; margin-top: 1rem; padding: 0.36rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 900; }
.status-progress { color: var(--bd-cyan); background: rgba(0, 229, 255, 0.1); }
.status-soon { color: var(--bd-orange); background: rgba(255, 122, 24, 0.1); }

.bd-slider-controls { display: flex; gap: 0.7rem; }
.bd-slider-btn { width: 46px; height: 46px; border: 1px solid var(--bd-line); border-radius: 50%; color: var(--bd-text); background: rgba(255, 255, 255, 0.07); cursor: pointer; transition: transform 0.25s ease, background 0.25s ease; }
.bd-slider-btn:hover { transform: translateY(-3px); background: rgba(0, 229, 255, 0.12); }
.bd-featured-slider { position: relative; overflow: hidden; border: 1px solid var(--bd-line); border-radius: var(--bd-radius-xl); background: rgba(9, 14, 26, 0.85); box-shadow: var(--bd-shadow); }
.bd-slide { display: none; grid-template-columns: 360px 1fr; gap: 2rem; align-items: center; padding: clamp(1rem, 3vw, 2rem); min-height: 460px; animation: bdFade 0.55s ease both; }
.bd-slide.active { display: grid; }
@keyframes bdFade { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
.bd-slide-cover { height: 400px; overflow: hidden; border-radius: 26px; border: 1px solid var(--bd-line); }
.bd-slide-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.bd-slide-content h3 { margin: 1rem 0 0.8rem; font-size: clamp(2rem, 4vw, 4rem); line-height: 0.98; letter-spacing: -0.05em; }
.bd-slide-content p { max-width: 720px; color: var(--bd-muted); line-height: 1.8; }
.bd-slide-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.2rem 0 1.5rem; }
.bd-slide-meta span { padding: 0.55rem 0.8rem; border-radius: 999px; color: var(--bd-muted); background: rgba(255, 255, 255, 0.07); }
.bd-slider-dots { display: flex; justify-content: center; gap: 0.55rem; margin-top: 1rem; }
.bd-slider-dots button { width: 10px; height: 10px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,0.24); cursor: pointer; }
.bd-slider-dots button.active { width: 32px; border-radius: 999px; background: var(--bd-cyan); }

.bd-toolbar { display: flex; gap: 0.85rem; flex-wrap: wrap; margin: 1.7rem 0 0.8rem; }
.bd-search-box { flex: 1 1 280px; min-height: 50px; display: flex; align-items: center; gap: 0.75rem; padding: 0 1rem; border: 1px solid var(--bd-line); border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.bd-search-box i { color: var(--bd-cyan); }
.bd-search-box input, .bd-toolbar select { min-height: 50px; border: none; outline: none; color: var(--bd-text); background: transparent; font: inherit; }
.bd-search-box input { width: 100%; }
.bd-toolbar select { min-width: 190px; padding: 0 1rem; border: 1px solid var(--bd-line); border-radius: 999px; background: #0b1020; }
.bd-result-count { min-height: 24px; color: var(--bd-muted); }
.bd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.bd-card { overflow: hidden; border: 1px solid var(--bd-line); border-radius: 26px; background: var(--bd-card); box-shadow: 0 16px 45px rgba(0,0,0,0.28); transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease; }
.bd-card:hover { transform: translateY(-8px); border-color: rgba(0, 229, 255, 0.36); box-shadow: 0 24px 60px rgba(0, 229, 255, 0.12); }
.bd-card-cover { position: relative; height: 330px; overflow: hidden; background: #0a0f1d; }
.bd-card-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 0.45s ease; }
.bd-card:hover .bd-card-cover img { transform: scale(1.06); }
.bd-card-badge { position: absolute; top: 0.85rem; left: 0.85rem; padding: 0.35rem 0.7rem; border-radius: 999px; color: #061018; background: var(--bd-cyan); font-size: 0.76rem; font-weight: 900; }
.bd-card-info { padding: 1.1rem; }
.bd-card-chapter { color: var(--bd-cyan); font-size: 0.82rem; font-weight: 900; }
.bd-card-info h3 { margin: 0.4rem 0; color: var(--bd-text); font-size: 1.15rem; }
.bd-card-info p { min-height: 48px; margin: 0 0 1rem; color: var(--bd-muted); line-height: 1.55; }
.bd-card-btn { width: 100%; min-height: 42px; border: 1px solid rgba(0, 229, 255, 0.25); border-radius: 999px; color: var(--bd-text); background: rgba(0, 229, 255, 0.08); font-weight: 850; cursor: pointer; transition: background 0.25s ease, transform 0.25s ease; }
.bd-card-btn:hover { background: rgba(0, 229, 255, 0.16); transform: translateY(-2px); }

.bd-reader-section { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(1.3rem, 4vw, 3rem); border: 1px solid var(--bd-line); border-radius: var(--bd-radius-xl); background: radial-gradient(circle at top right, rgba(0,229,255,0.12), transparent 35%), rgba(255,255,255,0.045); }
.bd-reader-text h2 { margin: 1rem 0; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1; letter-spacing: -0.05em; }
.bd-reader-text p { color: var(--bd-muted); line-height: 1.8; }
.bd-reader-features { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.3rem; }
.bd-reader-features span { padding: 0.55rem 0.75rem; border-radius: 999px; color: var(--bd-muted); background: rgba(255,255,255,0.07); }
.bd-reader-preview { overflow: hidden; border: 1px solid var(--bd-line); border-radius: 28px; background: #070b14; box-shadow: var(--bd-shadow); }
.bd-reader-topbar { display: flex; gap: 0.45rem; padding: 0.9rem; border-bottom: 1px solid var(--bd-line); }
.bd-reader-topbar span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.22); }
.bd-reader-screen { min-height: 380px; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem; }
.reader-arrow { width: 44px; height: 44px; border: 1px solid var(--bd-line); border-radius: 50%; color: var(--bd-text); background: rgba(255,255,255,0.06); }
.reader-page { min-height: 320px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed rgba(0,229,255,0.28); border-radius: 24px; background: linear-gradient(135deg, rgba(0,229,255,0.08), rgba(168,85,247,0.08)), rgba(255,255,255,0.04); }
.reader-page span { color: var(--bd-cyan); font-weight: 900; }
.reader-page h3 { margin: 0.6rem 0; font-size: 2rem; }
.reader-page p { margin: 0; color: var(--bd-muted); }
.bd-reader-bottom { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem; padding: 0.9rem; border-top: 1px solid var(--bd-line); }
.bd-reader-bottom span { padding: 0.35rem 0.65rem; border-radius: 999px; color: var(--bd-muted); background: rgba(255,255,255,0.06); font-size: 0.82rem; }

.bd-roadmap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.bd-roadmap article { padding: 1.3rem; border: 1px solid var(--bd-line); border-radius: 24px; background: var(--bd-card); }
.bd-roadmap span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 16px; color: #061018; background: linear-gradient(135deg, var(--bd-cyan), var(--bd-green)); font-weight: 950; }
.bd-roadmap h3 { margin: 1rem 0 0.5rem; }
.bd-roadmap p { margin: 0; color: var(--bd-muted); line-height: 1.65; }

.bd-modal { position: fixed; inset: 0; z-index: 7000; display: none; place-items: center; padding: 1rem; }
.bd-modal.active { display: grid; }
.bd-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(12px); }
.bd-modal-content { position: relative; z-index: 2; width: min(560px, 100%); padding: 1.5rem; border: 1px solid var(--bd-line); border-radius: 28px; background: radial-gradient(circle at top right, rgba(0,229,255,0.12), transparent 36%), #0b1020; box-shadow: var(--bd-shadow); }
.bd-modal-close { position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px; border: 1px solid var(--bd-line); border-radius: 50%; color: var(--bd-text); background: rgba(255,255,255,0.06); cursor: pointer; }
.bd-modal-content h3 { margin: 1rem 0 0.6rem; font-size: 2rem; }
.bd-modal-content p { color: var(--bd-muted); line-height: 1.7; }
.bd-modal-meta { display: flex; flex-wrap: wrap; gap: 0.65rem; margin: 1rem 0 1.2rem; }
.bd-modal-meta span { padding: 0.45rem 0.7rem; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--bd-muted); }

.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .bd-hero-home, .bd-reader-section { grid-template-columns: 1fr; }
  .bd-hero-showcase { max-width: 760px; }
  .bd-dev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bd-roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  body.bd-page .main-header { padding: 0 1rem; }
  body.bd-page .burger { display: block; z-index: 5600; }
  body.bd-page .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(82vw, 360px);
    height: 100vh;
    padding: 5.5rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.4rem;
    background: rgba(7, 11, 20, 0.98);
    transform: translateX(-110%);
    transition: transform 0.3s ease;
    z-index: 5500;
  }
  body.bd-page .navbar.active { transform: translateX(0); }
  body.bd-page .navbar a { width: 100%; padding: 0.9rem; border-radius: 16px; background: rgba(255,255,255,0.045); }
  body.bd-page .close-btn { display: block; position: absolute; top: 1.2rem; right: 1.2rem; color: var(--bd-text); font-size: 2rem; cursor: pointer; }
  .bd-main { padding-inline: 1rem; }
  .bd-hero-home { min-height: auto; padding: 1.2rem; }
  .bd-hero-stats { grid-template-columns: 1fr; }
  .bd-hero-showcase { grid-template-columns: 1fr; }
  .card-main, .bd-mini-card { min-height: auto; height: 340px; }
  .bd-mini-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-slide { grid-template-columns: 1fr; }
  .bd-slide-cover { height: 320px; }
  .bd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-card-cover { height: 250px; }
  .bd-dev-grid, .bd-roadmap { grid-template-columns: 1fr; }
  .bd-dev-card-large { grid-template-columns: 1fr; }
  .bd-section-header-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .bd-main { padding-top: calc(var(--bd-header-height) + 20px); }
  .bd-hero-content h1 { font-size: 2.35rem; }
  .bd-grid { grid-template-columns: 1fr; }
  .bd-card-cover { height: 330px; }
  .bd-mini-stack { grid-template-columns: 1fr; }
  .bd-reader-screen { grid-template-columns: 1fr; }
  .reader-arrow { display: none; }
}

/**********************************************************************************************************/

/* =========================================================
   PATCH FINAL HEADER BD
   Corrige le menu qui dépasse à droite
   À mettre tout en bas de bd.css
========================================================= */

@media (min-width: 1101px) {
  .main-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: none !important;
    height: 90px !important;
    margin: 0 !important;
    padding: 0 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    z-index: 9999 !important;
    background: rgba(6, 10, 18, 0.96) !important;
  }

  .main-header .logo,
  .main-header .bd-logo {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    margin: 0 26px 0 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
  }

  .main-header .burger {
    display: none !important;
  }

  .main-header .navbar {
    position: static !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-direction: row !important;
    gap: 22px !important;
    overflow: visible !important;
  }

  .main-header .navbar a {
    width: auto !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
  }

  .main-header .navbar .nav-donate {
    padding: 14px 30px !important;
    border-radius: 999px !important;
  }

  .main-header .user-actions {
    flex: 0 0 auto !important;
    width: auto !important;
    margin-left: 18px !important;
    margin-right: 0 !important;
    white-space: nowrap !important;
  }

  .main-header .login-btn {
    margin-right: 0 !important;
    white-space: nowrap !important;
  }
}

/* À partir de 1100px, on passe en menu burger pour éviter que les liens sortent à droite */
@media (max-width: 1100px) {
  .main-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: none !important;
    height: 90px !important;
    margin: 0 !important;
    padding: 0 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    box-sizing: border-box !important;
    z-index: 9999 !important;
    background: rgba(6, 10, 18, 0.96) !important;
  }

  .main-header .logo,
  .main-header .bd-logo {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-header .burger {
    display: block !important;
    position: relative !important;
    z-index: 10001 !important;
    font-size: 2rem !important;
    color: #00e5ff !important;
    cursor: pointer !important;
  }

  .main-header .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: min(82vw, 360px) !important;
    height: 100vh !important;
    padding: 5.5rem 1.2rem 1.2rem !important;
    background: #080d18 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    transform: translateX(-110%) !important;
    transition: transform 0.3s ease !important;
    z-index: 10000 !important;
    overflow-y: auto !important;
  }

  .main-header .navbar.active {
    transform: translateX(0) !important;
  }

  .main-header .navbar a {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0.9rem 1rem !important;
    margin: 0 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    white-space: nowrap !important;
  }

  .main-header .navbar .nav-donate {
    margin-top: 0.5rem !important;
    color: #061018 !important;
    background: linear-gradient(135deg, #00e5ff, #36e29b) !important;
  }

  .main-header .close-btn {
    display: block !important;
    position: absolute !important;
    top: 1.2rem !important;
    right: 1.2rem !important;
    font-size: 2rem !important;
    color: #fff !important;
    cursor: pointer !important;
    z-index: 10002 !important;
  }
}

/* Espace sous le header fixe */
.bd-main {
  padding-top: 120px !important;
}

/* =====================================================================
   PATCH RESPONSIVE FINAL — bd.html uniquement
   Objectif : scrollbar visible, aucune double barre, header au-dessus,
   hero lisible sur 13/14/16 pouces, tablettes, mobiles et grands écrans.
   À conserver tout en bas de bd.css pour écraser les anciens réglages.
===================================================================== */

/* Une seule barre de défilement : le scroll reste porté par html, pas par body */
html {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
}

body.bd-page {
  height: auto !important;
  min-height: 100svh;
  overflow-x: clip !important;
  overflow-y: visible !important;
}

body.bd-page.menu-open {
  overflow: hidden !important;
}

/* Header fixe, mais sans couvrir la barre de défilement native à droite */
body.bd-page .main-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: var(--bd-scrollbar-gap, 16px) !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: var(--bd-header-height, 90px) !important;
  margin: 0 !important;
  padding: 0 clamp(18px, 2vw, 32px) !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  z-index: 12000 !important;
  isolation: isolate;
}

/* Les sections restent toujours sous la barre fixe pendant le scroll */
body.bd-page .bd-main {
  position: relative;
  z-index: 1;
  width: min(1680px, 100%);
  margin: 0 auto !important;
  padding: calc(var(--bd-header-height, 90px) + 28px) clamp(1rem, 3vw, 4rem) 4rem !important;
}

body.bd-page .bd-main section {
  position: relative;
  z-index: 1;
  scroll-margin-top: calc(var(--bd-header-height, 90px) + 28px) !important;
}

/* Le header gagne toujours contre les cartes, sections, animations et popups non modales */
body.bd-page .bd-hero-home,
body.bd-page .bd-dev-section,
body.bd-page .bd-featured-section,
body.bd-page .bd-library-section,
body.bd-page .bd-reader-section,
body.bd-page .bd-roadmap-section {
  z-index: 1;
}

body.bd-page .bd-modal {
  z-index: 13000;
}

/* HERO desktop : contenu visible sans devoir scroller sur 13/14/16 pouces */
body.bd-page .bd-hero-home {
  min-height: min(760px, calc(100svh - var(--bd-header-height, 90px) - 56px));
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: clamp(1.4rem, 3vw, 4.2rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 4.5rem);
}

body.bd-page .bd-hero-content h1 {
  font-size: clamp(3rem, 5vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin: 1rem 0 0.85rem;
}

body.bd-page .bd-hero-content p {
  font-size: clamp(0.98rem, 1.15vw, 1.15rem);
  line-height: 1.68;
}

body.bd-page .bd-hero-actions,
body.bd-page .bd-hero-stats {
  margin-top: clamp(1.1rem, 2vw, 1.7rem);
}

body.bd-page .bd-hero-stats article {
  padding: clamp(0.75rem, 1.2vw, 1rem);
}

body.bd-page .card-main {
  min-height: clamp(360px, 46svh, 500px);
}

body.bd-page .bd-mini-card {
  height: clamp(175px, 22svh, 245px);
}

/* 13/14/16 pouces : on évite les cartes coupées dans le hero */
@media (min-width: 1101px) and (max-width: 1500px) {
  body.bd-page .bd-hero-home {
    grid-template-columns: minmax(0, 1.1fr) minmax(350px, 0.82fr);
    gap: clamp(1.2rem, 2.4vw, 2.8rem);
    padding: clamp(1.6rem, 3.3vw, 3.4rem);
  }

  body.bd-page .bd-hero-content h1 {
    font-size: clamp(2.9rem, 4.8vw, 4.75rem);
  }

  body.bd-page .bd-hero-content p {
    max-width: 620px;
    line-height: 1.62;
  }

  body.bd-page .card-main {
    min-height: clamp(340px, 43svh, 450px);
  }

  body.bd-page .bd-mini-card {
    height: clamp(160px, 20svh, 220px);
  }

  body.bd-page .bd-showcase-info {
    padding: 0.9rem;
  }
}

/* Écrans peu hauts : correction spécifique laptop 768/800/900px de hauteur */
@media (min-width: 1101px) and (max-height: 900px) {
  body.bd-page .bd-main {
    padding-top: calc(var(--bd-header-height, 90px) + 20px) !important;
  }

  body.bd-page .bd-hero-home {
    min-height: calc(100svh - var(--bd-header-height, 90px) - 40px);
    padding: clamp(1.35rem, 3vw, 3rem);
  }

  body.bd-page .bd-kicker {
    padding: 0.36rem 0.72rem;
    font-size: 0.76rem;
  }

  body.bd-page .bd-hero-content h1 {
    font-size: clamp(2.7rem, 4.4vw, 4.45rem);
    margin: 0.85rem 0 0.65rem;
  }

  body.bd-page .bd-hero-content p {
    line-height: 1.58;
  }

  body.bd-page .bd-hero-actions,
  body.bd-page .bd-hero-stats {
    margin-top: 1rem;
  }

  body.bd-page .bd-btn {
    min-height: 42px;
    padding: 0.68rem 1rem;
  }

  body.bd-page .bd-hero-stats article {
    padding: 0.72rem 0.85rem;
  }

  body.bd-page .card-main {
    min-height: clamp(320px, 42svh, 410px);
  }

  body.bd-page .bd-mini-card {
    height: clamp(150px, 19svh, 195px);
  }
}

/* Grands écrans 22/24 pouces et plus : meilleure largeur sans agrandir excessivement */
@media (min-width: 1700px) {
  body.bd-page .bd-main {
    width: min(1840px, 100%);
    padding-inline: clamp(2rem, 3.2vw, 5rem) !important;
  }

  body.bd-page .bd-hero-home {
    min-height: min(820px, calc(100svh - var(--bd-header-height, 90px) - 64px));
    grid-template-columns: minmax(0, 1.05fr) minmax(460px, 0.9fr);
  }

  body.bd-page .bd-hero-content h1 {
    font-size: clamp(4rem, 4.8vw, 6.35rem);
  }

  body.bd-page .card-main {
    min-height: clamp(430px, 42svh, 540px);
  }

  body.bd-page .bd-mini-card {
    height: clamp(210px, 20svh, 270px);
  }
}

/* Burger/tablette : le menu reprend toute la largeur logique et ne touche pas la scrollbar */
@media (max-width: 1100px) {
  body.bd-page .main-header {
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1.2rem !important;
  }

  body.bd-page .bd-main {
    width: 100%;
    padding-top: calc(var(--bd-header-height, 90px) + 20px) !important;
  }

  body.bd-page .main-header .navbar {
    max-width: min(86vw, 380px) !important;
  }
}

/* Tablettes */
@media (max-width: 900px) {
  body.bd-page .bd-hero-home {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: clamp(1rem, 4vw, 2rem);
    border-radius: 26px;
  }

  body.bd-page .bd-hero-content h1 {
    font-size: clamp(2.55rem, 9vw, 4.2rem);
    line-height: 1;
    letter-spacing: -0.045em;
  }

  body.bd-page .bd-hero-showcase {
    width: 100%;
    max-width: 720px;
  }

  body.bd-page .card-main {
    min-height: 340px;
    height: 340px;
  }

  body.bd-page .bd-mini-card {
    height: 230px;
  }
}

/* Mobile */
@media (max-width: 560px) {
  body.bd-page .bd-main {
    padding-inline: 0.85rem !important;
    padding-bottom: 3rem !important;
  }

  body.bd-page .bd-hero-home {
    padding: 1rem;
    border-radius: 22px;
  }

  body.bd-page .bd-kicker {
    max-width: 100%;
    font-size: 0.68rem;
    line-height: 1.35;
    white-space: normal;
  }

  body.bd-page .bd-hero-content h1 {
    font-size: clamp(2.25rem, 12vw, 3.2rem);
  }

  body.bd-page .bd-hero-content p {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  body.bd-page .bd-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.bd-page .bd-btn {
    width: 100%;
  }

  body.bd-page .bd-hero-stats {
    grid-template-columns: 1fr;
  }

  body.bd-page .bd-hero-showcase,
  body.bd-page .bd-mini-stack {
    grid-template-columns: 1fr;
  }

  body.bd-page .card-main {
    height: auto;
    min-height: 0;
  }

  body.bd-page .card-main > img {
    height: 245px;
    object-fit: cover;
  }

  body.bd-page .bd-showcase-info {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 0.85rem;
  }

  body.bd-page .bd-mini-card {
    height: 260px;
  }
}

/* =========================================================
   LECTURE GRATUITE BD / WEBTOON - BD.HTML UNIQUEMENT
   Ajout non destructif : section publique + lecteur modal + likes locaux
========================================================= */

.bd-free-section {
  margin-top: clamp(3rem, 7vw, 7rem);
}

.bd-free-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.bd-free-card {
  overflow: hidden;
  border: 1px solid var(--bd-line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025)), var(--bd-card);
  box-shadow: 0 18px 55px rgba(0,0,0,0.28);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.bd-free-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 229, 255, 0.36);
  box-shadow: 0 28px 70px rgba(0, 229, 255, 0.12);
}

.bd-free-cover {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: #08101f;
}

.bd-free-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.bd-free-card:hover .bd-free-cover img { transform: scale(1.055); }

.bd-free-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(5,7,12,0.92), transparent);
  pointer-events: none;
}

.bd-free-badge-row {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.bd-free-type,
.bd-free-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.68rem;
  border-radius: 999px;
  color: #061018;
  background: linear-gradient(135deg, var(--bd-cyan), var(--bd-green));
  font-size: 0.76rem;
  font-weight: 950;
}

.bd-free-status {
  color: var(--bd-text);
  background: rgba(5, 8, 15, 0.72);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
}

.bd-free-card-content {
  padding: 1.15rem;
}

.bd-free-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.bd-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.62rem;
  border-radius: 999px;
  color: var(--bd-muted);
  background: rgba(255,255,255,0.06);
  font-size: 0.82rem;
  font-weight: 750;
}

.bd-stat-pill i { color: var(--bd-cyan); }

.bd-free-card h3 {
  margin: 0 0 0.5rem;
  color: var(--bd-text);
  font-size: 1.35rem;
  line-height: 1.15;
}

.bd-free-card p {
  min-height: 72px;
  margin: 0;
  padding: 0;
  color: var(--bd-muted) !important;
  line-height: 1.65;
}

.bd-free-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1rem;
}

.bd-free-read-btn {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  color: #041018;
  background: linear-gradient(135deg, var(--bd-cyan), var(--bd-green));
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 16px 35px rgba(0, 229, 255, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bd-free-read-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(0, 229, 255, 0.24);
}

.bd-like-btn {
  min-width: 76px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  color: var(--bd-text);
  background: rgba(255,255,255,0.07);
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.bd-like-btn i { color: #ff4f7b; }
.bd-like-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,0.11); }
.bd-like-btn.is-liked { border-color: rgba(255,79,123,0.38); background: rgba(255,79,123,0.14); }

body.bd-reader-open { overflow: hidden !important; }

.bd-free-reader-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  place-items: center;
  padding: clamp(0.6rem, 2vw, 1.3rem);
}

.bd-free-reader-modal.active { display: grid; }

.bd-free-reader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(14px);
}

.bd-free-reader-panel {
  position: relative;
  z-index: 2;
  width: min(1220px, 100%);
  height: min(880px, calc(100vh - 2rem));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  background: radial-gradient(circle at top right, rgba(0,229,255,0.14), transparent 34%), #070b14;
  box-shadow: 0 34px 110px rgba(0,0,0,0.72);
}

.bd-free-reader-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.bd-free-reader-header h3 {
  margin: 0.55rem 0 0.2rem;
  color: var(--bd-text);
  font-size: clamp(1.35rem, 2.4vw, 2.3rem);
  line-height: 1.05;
}

.bd-free-reader-header p {
  max-width: 720px;
  margin: 0;
  padding: 0;
  color: var(--bd-muted) !important;
  line-height: 1.55;
}

.bd-free-reader-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.bd-free-reader-close {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 50%;
  color: var(--bd-text);
  background: rgba(255,255,255,0.07);
  cursor: pointer;
}

.bd-free-reader-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.75rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bd-reader-mode-btn {
  min-height: 36px;
  padding: 0 0.85rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: var(--bd-muted);
  background: rgba(255,255,255,0.06);
  font-weight: 850;
  cursor: pointer;
}

.bd-reader-mode-btn.active {
  color: #041018;
  border-color: transparent;
  background: linear-gradient(135deg, var(--bd-cyan), var(--bd-green));
}

.bd-reader-progress {
  margin-left: auto;
  color: var(--bd-muted);
  font-weight: 800;
}

.bd-free-reader-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: stretch;
  gap: 0.8rem;
  padding: 1rem;
}

.bd-reader-pages {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  border: 1px solid rgba(0,229,255,0.16);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(0,229,255,0.06), rgba(168,85,247,0.06)), rgba(255,255,255,0.035);
}

.bd-reader-page-img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.38);
}

.bd-free-reader-main.is-vertical {
  grid-template-columns: 1fr;
}

.bd-free-reader-main.is-vertical .bd-reader-nav { display: none; }

.bd-free-reader-main.is-vertical .bd-reader-pages {
  display: block;
  padding: 1rem;
  text-align: center;
}

.bd-free-reader-main.is-vertical .bd-reader-page-img {
  width: min(860px, 100%);
  max-width: 100%;
  max-height: none;
  margin: 0 auto 1rem;
}

.bd-reader-nav {
  align-self: center;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
  color: var(--bd-text);
  background: rgba(255,255,255,0.07);
  cursor: pointer;
}

.bd-reader-nav:disabled,
.bd-free-reader-footer .bd-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none !important;
}

.bd-free-reader-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.bd-free-reader-footer span {
  color: var(--bd-muted);
  text-align: center;
  font-weight: 800;
}

@media (min-width: 1500px) {
  .bd-free-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bd-free-cover { height: 390px; }
}

@media (max-width: 1180px) {
  .bd-free-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .bd-free-grid { grid-template-columns: 1fr; }
  .bd-free-cover { height: 320px; }
  .bd-free-actions { grid-template-columns: 1fr; }
  .bd-like-btn { width: 100%; }
  .bd-free-reader-panel { height: calc(100vh - 1rem); border-radius: 20px; }
  .bd-free-reader-header { flex-direction: column; }
  .bd-free-reader-header-actions { width: 100%; justify-content: space-between; }
  .bd-free-reader-toolbar { align-items: stretch; }
  .bd-reader-progress { width: 100%; margin-left: 0; }
  .bd-free-reader-main { grid-template-columns: 1fr; padding: 0.75rem; }
  .bd-reader-pages { min-height: 360px; }
  .bd-reader-nav { display: none; }
  .bd-free-reader-footer { flex-wrap: wrap; }
  .bd-free-reader-footer span { order: -1; width: 100%; }
  .bd-free-reader-footer .bd-btn { flex: 1 1 130px; }
}


/* =========================================================
   PATCH RESPONSIVE LECTEUR GRATUIT - MOBILE / TABLETTE
   Corrige la lecture mobile : plus de contenu écrasé, vrais scrolls tactiles,
   mode webtoon lisible, boutons non superposés.
========================================================= */

.bd-free-reader-panel,
.bd-free-reader-main,
.bd-reader-pages {
  min-width: 0;
}

.bd-reader-pages {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.bd-free-reader-main.is-vertical {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.bd-free-reader-main.is-vertical .bd-reader-pages {
  overflow: visible;
}

@media (max-width: 1024px) {
  .bd-free-reader-modal {
    padding: 0.65rem;
    place-items: stretch;
  }

  .bd-free-reader-panel {
    width: 100%;
    height: calc(100dvh - 1.3rem);
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
  }

  .bd-free-reader-header,
  .bd-free-reader-toolbar,
  .bd-free-reader-footer {
    flex: 0 0 auto;
  }

  .bd-free-reader-header {
    padding: 0.9rem 1rem;
  }

  .bd-free-reader-header h3 {
    font-size: clamp(1.25rem, 4vw, 1.8rem);
  }

  .bd-free-reader-header p {
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .bd-free-reader-toolbar {
    padding: 0.65rem 1rem;
  }

  .bd-free-reader-main {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 0.7rem;
    overflow: hidden;
  }

  .bd-reader-pages {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0.7rem;
    place-items: start center;
    align-content: start;
    overflow: auto;
  }

  .bd-reader-page-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .bd-free-reader-main.is-vertical {
    display: block;
    padding: 0.7rem;
    overflow-y: auto;
  }

  .bd-free-reader-main.is-vertical .bd-reader-pages {
    display: block;
    width: min(760px, 100%);
    height: auto;
    margin: 0 auto;
    padding: 0.45rem;
    overflow: visible;
  }

  .bd-free-reader-main.is-vertical .bd-reader-page-img {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 0.75rem;
    border-radius: 12px;
  }

  .bd-free-reader-modal.is-vertical-reader .bd-free-reader-footer {
    display: none;
  }

  .bd-free-reader-modal.is-vertical-reader .bd-reader-progress {
    width: 100%;
    margin-left: 0;
    color: var(--bd-cyan);
  }

  .bd-reader-nav {
    display: none !important;
  }
}

@media (max-width: 720px) {
  body.bd-reader-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
  }

  .bd-free-reader-modal {
    padding: 0;
  }

  .bd-free-reader-panel {
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .bd-free-reader-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: start;
    padding: 0.75rem 0.85rem;
  }

  .bd-free-reader-header .bd-label {
    padding: 0.28rem 0.55rem;
    font-size: 0.68rem;
  }

  .bd-free-reader-header h3 {
    margin: 0.42rem 0 0.15rem;
    font-size: 1.28rem;
    letter-spacing: -0.02em;
  }

  .bd-free-reader-header p {
    font-size: 0.82rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }

  .bd-free-reader-header-actions {
    width: auto !important;
    justify-content: flex-end;
    gap: 0.5rem;
  }

  .bd-like-btn-reader {
    min-width: 66px;
    min-height: 40px;
    padding: 0 0.75rem;
  }

  .bd-free-reader-close {
    width: 40px;
    height: 40px;
  }

  .bd-free-reader-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    padding: 0.65rem 0.85rem;
  }

  .bd-reader-mode-btn {
    width: 100%;
    min-height: 38px;
    padding: 0 0.65rem;
    font-size: 0.82rem;
  }

  .bd-reader-progress {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    font-size: 0.92rem;
  }

  .bd-free-reader-main {
    padding: 0.6rem;
  }

  .bd-reader-pages {
    padding: 0.55rem;
    border-radius: 16px;
  }

  .bd-free-reader-main.is-vertical {
    padding: 0.55rem;
  }

  .bd-free-reader-main.is-vertical .bd-reader-pages {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .bd-free-reader-main.is-vertical .bd-reader-page-img {
    margin-bottom: 0.55rem;
    border-radius: 8px;
    box-shadow: none;
  }

  .bd-free-reader-footer {
    padding: 0.55rem 0.7rem 0.75rem;
    gap: 0.5rem;
  }

  .bd-free-reader-footer span {
    font-size: 0.82rem;
  }

  .bd-free-reader-footer .bd-btn {
    min-height: 42px;
    padding: 0.65rem 0.8rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 390px) {
  .bd-free-reader-header {
    padding: 0.65rem;
  }

  .bd-free-reader-header p {
    display: none;
  }

  .bd-free-reader-toolbar {
    padding: 0.55rem 0.65rem;
  }

  .bd-reader-mode-btn {
    font-size: 0.78rem;
  }

  .bd-free-reader-main,
  .bd-free-reader-main.is-vertical {
    padding: 0.45rem;
  }

  .bd-reader-pages {
    padding: 0.45rem;
  }
}

/* =====================================================================
   PATCH FINAL — STABILITÉ MENU, ANIMATIONS PLUS RAPIDES, SECTION SOUTIEN
   Scope limité à body.bd-page / bd.html
===================================================================== */

/* Empêche l’animation bizarre du menu lorsque la largeur passe en mode burger.
   L’animation est activée uniquement pendant une action volontaire de l’utilisateur. */
body.bd-page .main-header .navbar {
  transition: none !important;
}

body.bd-page.bd-menu-animate .main-header .navbar {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.bd-page.bd-menu-resizing .main-header,
body.bd-page.bd-menu-resizing .main-header * {
  transition: none !important;
}

/* Garde le header en dehors de la scrollbar native à droite. */
body.bd-page .main-header {
  right: var(--bd-scrollbar-gap, 0px) !important;
  width: auto !important;
  min-width: 0 !important;
}

/* Animations d’apparition plus rapides et déclenchées plus tôt. */
body.bd-page .reveal-up {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.36s ease, transform 0.36s ease;
  will-change: opacity, transform;
}

body.bd-page .reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  body.bd-page .reveal-up,
  body.bd-page .main-header .navbar {
    transition: none !important;
  }
}

body.bd-page .bd-support-section {
  position: relative;
  z-index: 1;
  margin-top: clamp(3rem, 7vw, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: stretch;
  padding: clamp(1.4rem, 4vw, 3.4rem);
  border: 1px solid rgba(0, 229, 255, 0.16);
  border-radius: var(--bd-radius-xl);
  background:
    radial-gradient(circle at 12% 20%, rgba(0, 229, 255, 0.16), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(54, 226, 155, 0.13), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
    rgba(7, 12, 24, 0.78);
  box-shadow: var(--bd-shadow);
  overflow: hidden;
}

body.bd-page .bd-support-glow {
  position: absolute;
  inset: auto -12% -45% 30%;
  height: 280px;
  background: radial-gradient(circle, rgba(0,229,255,0.18), transparent 68%);
  pointer-events: none;
}

body.bd-page .bd-support-content,
body.bd-page .bd-support-card {
  position: relative;
  z-index: 2;
}

body.bd-page .bd-support-content h2 {
  max-width: 980px;
  margin: 1rem 0;
  color: var(--bd-text);
  font-size: clamp(2rem, 4.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

body.bd-page .bd-support-content > p {
  max-width: 780px;
  margin: 0;
  color: var(--bd-muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.85;
}

body.bd-page .bd-support-highlight {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.6rem;
  padding: 1.1rem;
  border: 1px solid rgba(0, 229, 255, 0.16);
  border-radius: 22px;
  background: rgba(0, 229, 255, 0.07);
}

body.bd-page .bd-support-highlight i {
  color: var(--bd-cyan);
  font-size: 1.35rem;
}

body.bd-page .bd-support-highlight p {
  margin: 0;
  color: var(--bd-text);
  line-height: 1.7;
  font-weight: 650;
}

body.bd-page .bd-support-card {
  align-self: center;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--bd-line);
  border-radius: 28px;
  background: rgba(5, 9, 18, 0.78);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

body.bd-page .bd-support-card h3 {
  margin: 0 0 0.55rem;
  color: var(--bd-text);
  font-size: clamp(1.35rem, 2vw, 2rem);
}

body.bd-page .bd-support-card-intro {
  margin: 0 0 1.2rem;
  color: var(--bd-muted);
  line-height: 1.7;
}

body.bd-page .bd-support-methods {
  display: grid;
  gap: 0.95rem;
}

body.bd-page .bd-support-method {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  background: rgba(255,255,255,0.055);
}

body.bd-page .bd-support-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #061018;
  background: linear-gradient(135deg, var(--bd-cyan), var(--bd-green));
  font-size: 1.25rem;
}

body.bd-page .bd-support-method strong {
  display: block;
  color: var(--bd-text);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

body.bd-page .bd-support-method p {
  margin: 0;
  padding: 0;
  color: var(--bd-muted);
  line-height: 1.6;
}

body.bd-page .bd-support-method small {
  display: block;
  margin-top: 0.35rem;
  color: rgba(168, 179, 199, 0.82);
  line-height: 1.45;
}

body.bd-page .bd-donation-placeholder {
  color: var(--bd-cyan);
  font-weight: 900;
  white-space: nowrap;
}

body.bd-page .bd-paypal-link {
  width: fit-content;
  margin-top: 0.85rem;
  min-height: 42px;
  padding: 0.7rem 1rem;
}

body.bd-page .bd-support-section {
  scroll-margin-top: calc(var(--bd-header-height, 90px) + 28px) !important;
}

@media (max-width: 980px) {
  body.bd-page .bd-support-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body.bd-page .bd-support-section {
    padding: 1.1rem;
    border-radius: 24px;
  }

  body.bd-page .bd-support-highlight,
  body.bd-page .bd-support-method {
    grid-template-columns: 1fr;
  }

  body.bd-page .bd-support-method {
    padding: 0.9rem;
  }

  body.bd-page .bd-paypal-link {
    width: 100%;
  }
}



/* =====================================================================
   PATCH LECTEUR GRATUIT — fermeture sans retour en haut de page
   Le scroll de la section est mémorisé à l'ouverture puis restauré à la fermeture.
   Scope limité à bd.html via body.bd-page.
===================================================================== */
@media (max-width: 720px) {
  body.bd-page.bd-reader-open {
    position: fixed !important;
    top: calc(var(--bd-reader-scroll-y, 0px) * -1) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
  }
}


/* =====================================================================
   PATCH FINAL — IMAGES ENTIÈRES, ZOOM RESTAURÉ, CARTES UNIFORMISÉES
   Scope limité à la carte d’introduction et au slider « Histoires en préparation ».
===================================================================== */

/* Carte principale : l’image reste entière. */
body.bd-page .bd-hero-showcase .bd-showcase-card {
  background:
    radial-gradient(circle at center, rgba(0, 229, 255, 0.07), transparent 66%),
    #070b14;
}

body.bd-page .bd-hero-showcase .bd-showcase-card > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  transition: transform 0.45s ease !important;
}

/* Les deux petites cartes épousent directement la taille de leur image :
   aucune bande ni bordure noire autour des visuels. */
body.bd-page .bd-hero-showcase .bd-mini-stack {
  justify-items: center;
  align-items: end;
}

body.bd-page .bd-hero-showcase .bd-mini-card {
  width: fit-content !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  display: inline-grid;
  place-items: center;
  justify-self: center;
  overflow: hidden;
  line-height: 0;
  border: 0 !important;
  border-radius: 26px;
  background: transparent !important;
  box-shadow: none !important;
}

body.bd-page .bd-hero-showcase .bd-mini-card span {
  line-height: 1.2;
}

body.bd-page .bd-hero-showcase .bd-mini-card > img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: clamp(175px, 22svh, 250px);
  display: block;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: inherit;
  transition: transform 0.45s ease !important;
}

/* Zoom au survol restauré. */
body.bd-page .bd-hero-showcase .bd-showcase-card:hover > img,
body.bd-page .bd-hero-showcase .bd-mini-card:hover > img {
  transform: scale(1.045) !important;
}

/* Toutes les cartes de « Histoires en préparation » partagent le même design. */
body.bd-page .bd-featured-slider .bd-slide-cover {
  height: auto !important;
  min-height: 0 !important;
  align-self: start;
  overflow: hidden;
  border: 0 !important;
  border-radius: 26px;
  background: transparent !important;
}

body.bd-page .bd-featured-slider .bd-slide-cover img {
  width: 100% !important;
  height: auto !important;
  max-height: 620px;
  display: block;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: inherit;
  transition: transform 0.45s ease !important;
}

body.bd-page .bd-featured-slider .bd-slide-cover:hover img {
  transform: scale(1.045) !important;
}

body.bd-page .bd-synopsis-title {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.25rem 0 0.35rem;
  color: var(--bd-cyan);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.bd-page .bd-synopsis-text {
  margin-top: 0;
}

body.bd-page .bd-slide-credits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0.35rem;
}

body.bd-page .bd-slide-credits span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.78rem;
  border: 1px solid rgba(0, 229, 255, 0.16);
  border-radius: 999px;
  color: var(--bd-muted);
  background: rgba(0, 229, 255, 0.065);
  font-size: 0.88rem;
}

body.bd-page .bd-slide-credits i {
  color: var(--bd-cyan);
}

body.bd-page .bd-slide-credits strong {
  color: var(--bd-text);
}

@media (max-width: 820px) {
  body.bd-page .bd-featured-slider .bd-slide-cover img {
    width: auto !important;
    max-width: 100% !important;
    max-height: 560px;
    margin-inline: auto;
  }
}

@media (max-width: 560px) {
  body.bd-page .bd-hero-showcase .card-main > img {
    height: 300px !important;
    object-fit: contain !important;
  }

  body.bd-page .bd-hero-showcase .bd-mini-card > img {
    max-height: 420px;
  }

  body.bd-page .bd-slide-credits {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.bd-page .bd-slide-credits span {
    width: 100%;
    border-radius: 16px;
  }
}

/* =====================================================================
   CORRECTION DÉFINITIVE — SUPPRESSION DES ZONES NOIRES DES MINI-CARTES
   Les cartes Manga/Webtoon prennent maintenant exactement la largeur
   calculée depuis les proportions originales de chaque image.
===================================================================== */
body.bd-page .bd-hero-showcase .bd-mini-stack {
  justify-items: center !important;
  align-items: end !important;
}

body.bd-page .bd-hero-showcase .bd-mini-card {
  width: fit-content !important;
  max-width: 100% !important;
  height: fit-content !important;
  min-width: 0 !important;
  min-height: 0 !important;
  justify-self: center !important;
  align-self: end !important;
  display: inline-block !important;
  position: relative !important;
  overflow: hidden !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 26px !important;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

body.bd-page .bd-hero-showcase .bd-mini-card > img {
  width: auto !important;
  height: clamp(175px, 22svh, 250px) !important;
  max-width: 100% !important;
  max-height: none !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  transition: transform 0.45s ease !important;
}

/* Le badge reste attaché au coin inférieur gauche de l'image. */
body.bd-page .bd-hero-showcase .bd-mini-card > span {
  position: absolute !important;
  left: 0.8rem !important;
  right: auto !important;
  bottom: 0.8rem !important;
  z-index: 2 !important;
}

/* Conservation du zoom demandé au survol. */
body.bd-page .bd-hero-showcase .bd-mini-card:hover > img {
  transform: scale(1.045) !important;
}

@media (max-width: 900px) {
  body.bd-page .bd-hero-showcase .bd-mini-card > img {
    height: clamp(210px, 34vw, 330px) !important;
  }
}

@media (max-width: 560px) {
  body.bd-page .bd-hero-showcase .bd-mini-card > img {
    height: min(420px, 92vw) !important;
  }
}

/*********************************/

/* Titres des projets alignés à gauche */
body.bd-page .bd-featured-slider .bd-slide-content h3 {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left !important;
  justify-self: start !important;
}

/* =====================================================================
   AJOUT NON DESTRUCTIF — MODE PLEIN ÉCRAN DU LECTEUR
   Le bouton fonctionne avec l’API Fullscreen et utilise un secours CSS
   sur les navigateurs mobiles qui ne permettent pas le plein écran natif.
===================================================================== */
body.bd-page .bd-reader-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
}

body.bd-page .bd-reader-fullscreen-btn i {
  pointer-events: none;
}

body.bd-page .bd-reader-fullscreen-btn.active {
  color: #041018;
  border-color: transparent;
  background: linear-gradient(135deg, var(--bd-cyan), var(--bd-green));
}

body.bd-page .bd-free-reader-panel:fullscreen,
body.bd-page .bd-free-reader-panel:-webkit-full-screen,
body.bd-page .bd-free-reader-modal.is-css-fullscreen .bd-free-reader-panel {
  width: 100vw !important;
  max-width: none !important;
  height: 100dvh !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: radial-gradient(circle at top right, rgba(0,229,255,0.14), transparent 34%), #070b14;
  box-shadow: none !important;
}

body.bd-page .bd-free-reader-panel:fullscreen::backdrop {
  background: #03050a;
}

body.bd-page .bd-free-reader-modal.is-css-fullscreen {
  inset: 0 !important;
  padding: 0 !important;
  place-items: stretch !important;
  background: #03050a;
}

body.bd-page .bd-free-reader-modal.is-css-fullscreen .bd-free-reader-backdrop {
  display: none;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-reader-pages {
  border-radius: 16px;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-reader-page-img {
  max-height: calc(100dvh - 220px);
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-main.is-vertical .bd-reader-page-img {
  max-height: none;
}

@media (max-width: 720px) {
  body.bd-page .bd-free-reader-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.bd-page .bd-reader-fullscreen-btn {
    min-width: 0;
    padding-inline: 0.45rem;
  }

  body.bd-page .bd-reader-fullscreen-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-reader-page-img {
    max-height: none;
  }
}

@media (max-width: 420px) {
  body.bd-page .bd-free-reader-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  body.bd-page .bd-reader-fullscreen-btn {
    grid-column: 1 / -1;
  }
}


/* =====================================================================
   CRÉDITS MODIFIABLES SUR CHAQUE CARTE — AUTEUR / PRODUCTION
   Ajout non destructif : les métadonnées existantes restent flexibles.
===================================================================== */
body.bd-page .bd-free-meta {
  align-items: center;
}

body.bd-page .bd-free-meta .bd-credit-pill {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.bd-page .bd-free-meta .bd-credit-pill strong {
  color: var(--bd-text);
  font-weight: 900;
}

body.bd-page .bd-free-meta .bd-credit-pill .fa-clapperboard {
  color: var(--bd-green);
}


/* =====================================================================
   CORRECTIF DE SÉCURITÉ — LE CONTENU NE RESTE PLUS INVISIBLE
   Par défaut, les sections sont visibles. La classe bd-js-loading est
   ajoutée brièvement par bd.js uniquement pendant l'initialisation.
===================================================================== */
body.bd-page .reveal-up {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

html.bd-js-loading body.bd-page .reveal-up {
  opacity: 0 !important;
  transform: translateY(12px) !important;
}

html.bd-js-loading body.bd-page .reveal-up.is-visible,
body.bd-page .reveal-up.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* =====================================================================
   CORRECTIF RESPONSIVE — LECTURE PLEIN ÉCRAN MOBILE ET TABLETTE
   Scope limité au lecteur gratuit. Le desktop conserve le plein écran
   natif ; mobile/tablette utilisent un plein écran CSS plus stable.
===================================================================== */

body.bd-page .bd-free-reader-modal.is-css-fullscreen,
body.bd-page .bd-free-reader-modal.is-fullscreen-reader {
  --bd-reader-safe-top: env(safe-area-inset-top, 0px);
  --bd-reader-safe-right: env(safe-area-inset-right, 0px);
  --bd-reader-safe-bottom: env(safe-area-inset-bottom, 0px);
  --bd-reader-safe-left: env(safe-area-inset-left, 0px);
}

body.bd-page .bd-free-reader-modal.is-css-fullscreen {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: 0 !important;
  width: 100% !important;
  height: var(--bd-reader-viewport-height, 100dvh) !important;
  min-height: 100svh;
  z-index: 25000 !important;
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

body.bd-page .bd-free-reader-modal.is-css-fullscreen .bd-free-reader-panel,
body.bd-page .bd-free-reader-panel:fullscreen,
body.bd-page .bd-free-reader-panel:-webkit-full-screen {
  width: 100% !important;
  height: var(--bd-reader-viewport-height, 100dvh) !important;
  min-height: 100svh;
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding-top: var(--bd-reader-safe-top) !important;
  padding-right: var(--bd-reader-safe-right) !important;
  padding-bottom: var(--bd-reader-safe-bottom) !important;
  padding-left: var(--bd-reader-safe-left) !important;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header,
body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-toolbar,
body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-footer {
  flex: 0 0 auto;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
}

/* Mode page : la planche entière tient dans l’espace réellement disponible. */
body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-page-reader .bd-reader-pages {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  padding: clamp(0.35rem, 1.4vw, 0.9rem) !important;
  overflow: hidden !important;
  touch-action: pan-x pan-y;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-page-reader .bd-reader-page-img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: clamp(6px, 1.4vw, 14px);
}

/* Mode webtoon : le scroll appartient uniquement à la zone centrale. */
body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-free-reader-main {
  display: block !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-reader-pages {
  width: min(860px, 100%) !important;
  height: auto !important;
  min-height: 100% !important;
  margin: 0 auto !important;
  padding: clamp(0.35rem, 1.5vw, 1rem) !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-reader-page-img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 auto clamp(0.45rem, 1.4vw, 1rem) !important;
  object-fit: contain !important;
}

@media (max-width: 1024px) {
  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 0.65rem !important;
    padding: 0.72rem clamp(0.72rem, 2vw, 1rem) !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header > div:first-child {
    min-width: 0;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header h3 {
    margin: 0.35rem 0 0 !important;
    font-size: clamp(1.1rem, 3.4vw, 1.65rem) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header p {
    display: none !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header-actions {
    width: auto !important;
    min-width: 0;
    gap: 0.45rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-like-btn-reader,
  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-close {
    min-height: 40px !important;
    height: 40px !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-close {
    width: 40px !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-toolbar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
    padding: 0.55rem clamp(0.65rem, 2vw, 1rem) !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-reader-mode-btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 0 0.5rem !important;
    font-size: clamp(0.72rem, 2vw, 0.86rem) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-reader-progress {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    font-size: 0.82rem !important;
    line-height: 1.25;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-main {
    padding: clamp(0.35rem, 1.4vw, 0.7rem) !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 0.55rem !important;
    padding: 0.55rem clamp(0.65rem, 2vw, 1rem) !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-footer > span {
    display: none !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-footer .bd-btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 40px !important;
    padding: 0.55rem 0.65rem !important;
    font-size: 0.8rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-free-reader-footer {
    display: none !important;
  }
}

@media (max-width: 560px) {
  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header {
    padding: 0.55rem 0.6rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header .bd-label {
    padding: 0.24rem 0.5rem !important;
    font-size: 0.64rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header h3 {
    font-size: 1.08rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-like-btn-reader {
    min-width: 58px !important;
    padding: 0 0.55rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-toolbar {
    padding: 0.45rem 0.55rem !important;
    gap: 0.35rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-reader-fullscreen-btn span {
    display: none !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-reader-fullscreen-btn i {
    margin: 0 !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-main {
    padding: 0.35rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-footer {
    padding: 0.45rem 0.55rem calc(0.45rem + var(--bd-reader-safe-bottom)) !important;
  }
}

/* Téléphones et petites tablettes en paysage : priorité maximale à l’image. */
@media (max-width: 1024px) and (orientation: landscape) and (max-height: 620px) {
  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 0.35rem 0.55rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header .bd-label {
    display: none !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-header h3 {
    margin: 0 !important;
    font-size: 1rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-like-btn-reader,
  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-close {
    height: 34px !important;
    min-height: 34px !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-close {
    width: 34px !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto !important;
    align-items: center !important;
    padding: 0.32rem 0.55rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-reader-progress {
    grid-column: auto !important;
    width: auto !important;
    white-space: nowrap;
    font-size: 0.75rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-reader-mode-btn {
    min-height: 32px !important;
    font-size: 0.72rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-main {
    padding: 0.28rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-footer {
    padding: 0.35rem 0.55rem !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader .bd-free-reader-footer .bd-btn {
    min-height: 34px !important;
    padding-block: 0.35rem !important;
  }
}

/* =====================================================================
   CORRECTION FINALE — CARTES MANGA ET WEBTOON DE MÊME DIMENSION
   Scope limité aux deux mini-cartes du hero.
   Les deux conteneurs ont exactement la même largeur et la même hauteur.
===================================================================== */
body.bd-page .bd-hero-showcase .bd-mini-stack {
  align-items: stretch !important;
  justify-items: stretch !important;
}

body.bd-page .bd-hero-showcase .bd-mini-card {
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(175px, 22svh, 250px) !important;
  min-height: 0 !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  display: block !important;
  border-radius: 26px !important;
  overflow: hidden !important;
}

body.bd-page .bd-hero-showcase .bd-mini-card > img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: inherit !important;
}

/* Tablettes : dimensions identiques, sans étirer les cartes sur toute la page. */
@media (max-width: 900px) {
  body.bd-page .bd-hero-showcase .bd-mini-stack {
    justify-items: center !important;
  }

  body.bd-page .bd-hero-showcase .bd-mini-card {
    width: min(100%, 280px) !important;
    height: clamp(210px, 34vw, 330px) !important;
    justify-self: center !important;
  }
}

/* Mobiles : même format vertical pour Manga et Webtoon. */
@media (max-width: 560px) {
  body.bd-page .bd-hero-showcase .bd-mini-card {
    width: min(100%, 310px) !important;
    height: min(420px, 92vw) !important;
  }
}

/* =====================================================================
   CORRECTION CIBLÉE — PLEIN ÉCRAN : SCROLL MODE PAGE + WEBTOON SANS ESPACE
   Scope strictement limité au lecteur lorsqu'il est en plein écran.
===================================================================== */

/* Mode page : la planche garde toute sa hauteur et la zone centrale
   devient défilable si l'image dépasse la hauteur disponible. */
body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-page-reader .bd-reader-pages {
  display: grid !important;
  place-items: start center !important;
  align-content: start !important;
  justify-content: center !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y !important;
  scrollbar-gutter: stable;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-page-reader .bd-reader-page-img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: top center !important;
}

/* Mode webtoon : les pages sont collées les unes aux autres.
   Suppression du padding du conteneur, des marges, arrondis et ombres
   qui produisaient une séparation visible entre deux pages. */
body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-reader-pages {
  padding: 0 !important;
  line-height: 0 !important;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-reader-page-img,
body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-reader-page-img + .bd-reader-page-img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  vertical-align: top !important;
}

/* Sur mobile et tablette, on conserve un scroll tactile fluide et une
   surface de lecture occupant toute la largeur disponible. */
@media (max-width: 1024px) {
  body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-page-reader .bd-reader-pages {
    padding: clamp(0.25rem, 1vw, 0.55rem) !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-free-reader-main {
    padding-inline: 0 !important;
  }

  body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-reader-pages {
    width: 100% !important;
    max-width: 860px !important;
  }
}

/* =====================================================================
   CORRECTION CIBLÉE — MODE WEBTOON SANS CARTE BLEUE NI ESPACE
   Scope limité au lecteur lorsqu'il utilise le mode vertical/webtoon.
   Aucun changement de structure HTML ou de logique JavaScript.
===================================================================== */

/* La zone principale reste le seul conteneur de défilement du webtoon. */
body.bd-page .bd-free-reader-modal.is-vertical-reader .bd-free-reader-main,
body.bd-page .bd-free-reader-modal.is-vertical-reader .bd-free-reader-main.is-vertical {
  gap: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Suppression complète de la carte bleutée derrière les planches. */
body.bd-page .bd-free-reader-modal.is-vertical-reader .bd-reader-pages,
body.bd-page .bd-free-reader-modal.is-vertical-reader .bd-free-reader-main.is-vertical .bd-reader-pages {
  display: block !important;
  width: min(860px, 100%) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

/* Les pages sont jointives : aucune marge, aucun gap, aucune ombre. */
body.bd-page .bd-free-reader-modal.is-vertical-reader .bd-reader-page-img,
body.bd-page .bd-free-reader-modal.is-vertical-reader .bd-reader-page-img + .bd-reader-page-img,
body.bd-page .bd-free-reader-modal.is-vertical-reader .bd-free-reader-main.is-vertical .bd-reader-page-img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  vertical-align: top !important;
  object-fit: contain !important;
  object-position: top center !important;
}

/* Même résultat en plein écran natif ou de secours. */
body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-free-reader-main,
body.bd-page .bd-free-reader-modal.is-css-fullscreen.is-vertical-reader .bd-free-reader-main {
  padding-inline: 0 !important;
  background: transparent !important;
}

body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-reader-pages,
body.bd-page .bd-free-reader-modal.is-css-fullscreen.is-vertical-reader .bd-reader-pages {
  width: min(860px, 100%) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

@media (max-width: 1024px) {
  body.bd-page .bd-free-reader-modal.is-vertical-reader .bd-reader-pages,
  body.bd-page .bd-free-reader-modal.is-fullscreen-reader.is-vertical-reader .bd-reader-pages,
  body.bd-page .bd-free-reader-modal.is-css-fullscreen.is-vertical-reader .bd-reader-pages {
    width: 100% !important;
    max-width: 100% !important;
  }
}
