/* ──────────────────────────────────────────────────────────
   book-spiritual.css — Page Livre premium spirituelle
   Palette : beige #F7F3EA / doré #C8A96A / vert #6B8F71
   Aucun gris brut. Aucun bloc plat sans vie.
   ────────────────────────────────────────────────────────── */

.page-book-spiritual {
  --bk-beige:    #F7F3EA;
  --bk-beige-2:  #efe7d2;
  --bk-ivory:    #fdfaf1;
  --bk-sand:     #e9dcb8;
  --bk-gold:     #C8A96A;
  --bk-gold-d:   #a4853f;
  --bk-gold-l:   #e3c891;
  --bk-green:    #6B8F71;
  --bk-green-d:  #4d6b53;
  --bk-night:    #2E2A26;
  --bk-night-2:  #4a3a1f;
  --bk-muted:    #847660;

  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(200,169,106,.18), transparent 60%),
    radial-gradient(900px 460px at 92% 110%, rgba(107,143,113,.14), transparent 60%),
    var(--bk-beige);
  color: var(--bk-night);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Container helper (assume site has .container; we add fallback) ── */
.bk-page .container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ───────── 1. HERO ───────── */
.bk-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
  background:
    linear-gradient(180deg, rgba(253,250,241,.6), transparent 40%),
    linear-gradient(170deg, var(--bk-ivory) 0%, var(--bk-beige) 60%, var(--bk-beige-2) 100%);
  border-bottom: 1px solid rgba(200,169,106,.22);
}
.bk-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.bk-hero-glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  filter: blur(110px); opacity: .55; animation: bkGlow 11s ease-in-out infinite;
}
.bk-hero-glow--a { top: -160px; left: -120px; background: radial-gradient(circle, rgba(200,169,106,.55), transparent 70%); }
.bk-hero-glow--b { bottom: -180px; right: -120px; background: radial-gradient(circle, rgba(107,143,113,.45), transparent 70%); animation-delay: -5s; }
@keyframes bkGlow { 0%,100% { transform: scale(1) translate(0,0); } 50% { transform: scale(1.08) translate(20px,-12px); } }

.bk-hero-calligraphy {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  font-family: 'Amiri', 'Scheherazade New', serif;
  font-size: clamp(160px, 28vw, 380px); font-weight: 700;
  color: rgba(200,169,106,.10);
  pointer-events: none; user-select: none; line-height: 1;
  white-space: nowrap;
}

.bk-hero-inner { position: relative; z-index: 2; text-align: center; animation: bkFade .7s ease both; }
.bk-hero-orn { display: block; font-size: 22px; color: var(--bk-gold); margin-bottom: 12px; opacity: .7; }
.bk-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(200,169,106,.18), rgba(200,169,106,.08));
  border: 1px solid rgba(200,169,106,.32);
  color: var(--bk-night-2); font-size: 13px; font-weight: 600;
  letter-spacing: .02em; margin-bottom: 22px;
}
.bk-hero-title { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 18px; }
.bk-hero-title-ar {
  font-family: 'Amiri', 'Scheherazade New', serif;
  font-size: clamp(44px, 6.5vw, 78px); font-weight: 700;
  color: var(--bk-night); line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}
.bk-hero-title-fr {
  font-size: clamp(22px, 2.6vw, 32px); font-weight: 600;
  color: var(--bk-gold-d); letter-spacing: .01em;
}
.bk-hero-tagline {
  max-width: 640px; margin: 0 auto 28px;
  font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6;
  color: var(--bk-muted); font-style: italic;
}
.bk-hero-meta {
  list-style: none; padding: 0; margin: 0 auto 30px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px;
  font-size: 14.5px; color: var(--bk-night-2);
}
.bk-hero-meta li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 12px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(200,169,106,.22);
  backdrop-filter: blur(6px);
}
.bk-hero-meta li strong { color: var(--bk-night); font-weight: 700; }
.bk-hero-meta li em { font-style: normal; color: var(--bk-muted); margin-left: 4px; }
.bk-hero-meta-icon { font-size: 16px; }
.bk-hero-meta-complete { color: var(--bk-green-d) !important; font-weight: 600; }

.bk-hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.bk-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 14px;
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform .25s cubic-bezier(.2,.7,.3,1.2), box-shadow .25s ease, background .25s ease;
}
.bk-btn-icon { font-size: 13px; }
.bk-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--bk-gold) 0%, var(--bk-gold-d) 100%);
  box-shadow: 0 10px 26px -10px rgba(164,133,63,.55), inset 0 1px 0 rgba(255,255,255,.25);
}
.bk-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(164,133,63,.7); }
.bk-btn-ghost {
  color: var(--bk-night-2);
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(200,169,106,.35);
}
.bk-btn-ghost:hover { background: rgba(255,255,255,.9); transform: translateY(-2px); border-color: var(--bk-gold); }

/* ───────── 2. ACTIONS BAR ───────── */
.bk-section { padding: 56px 0; }
.bk-section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: clamp(22px, 2.4vw, 28px); font-weight: 700;
  color: var(--bk-night); margin: 0 0 6px;
}
.bk-section-title-orn { color: var(--bk-gold); font-size: 18px; }
.bk-section-sub {
  margin: 0 0 28px; color: var(--bk-muted);
  font-size: 15px; font-style: italic;
}

.bk-actions-section { padding: 24px 0 8px; }
.bk-actions {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  background: linear-gradient(180deg, var(--bk-ivory), rgba(247,243,234,.85));
  border: 1px solid rgba(200,169,106,.25);
  border-radius: 18px; padding: 14px 18px;
  box-shadow: 0 8px 28px -16px rgba(46,42,38,.18);
}
.bk-search { position: relative; flex: 1 1 320px; min-width: 240px; }
.bk-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--bk-gold-d); font-size: 20px; pointer-events: none;
}
.bk-search-input {
  width: 100%; padding: 12px 16px 12px 44px;
  font-size: 15px; color: var(--bk-night);
  background: #fff; border: 1px solid rgba(200,169,106,.25);
  border-radius: 12px; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  font-family: inherit;
}
.bk-search-input::placeholder { color: var(--bk-muted); }
.bk-search-input:focus { border-color: var(--bk-gold); box-shadow: 0 0 0 4px rgba(200,169,106,.15); }

.bk-actions-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-tool {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,.7); border: 1px solid rgba(200,169,106,.25);
  color: var(--bk-night-2); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.bk-tool:hover { transform: translateY(-1px); background: #fff; border-color: var(--bk-gold); }
.bk-tool-ico { font-size: 16px; }
.bk-tool-lbl { font-size: 13.5px; }

.bk-share-hint {
  margin-top: 10px; min-height: 24px; padding: 6px 12px;
  font-size: 13.5px; color: var(--bk-green-d);
  opacity: 0; transform: translateY(-4px); transition: opacity .25s ease, transform .25s ease;
}
.bk-share-hint.is-on { opacity: 1; transform: translateY(0); }

/* ───────── 3. FILTRES ───────── */
.bk-themes-section { padding-top: 40px; }
.bk-filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 4px 0;
}
.bk-filter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(200,169,106,.28);
  color: var(--bk-night-2); font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  transition: all .25s cubic-bezier(.2,.7,.3,1.2);
}
.bk-filter:hover { background: #fff; transform: translateY(-1px); border-color: var(--bk-gold); }
.bk-filter.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--bk-gold) 0%, var(--bk-gold-d) 100%);
  border-color: transparent;
  box-shadow: 0 8px 22px -10px rgba(164,133,63,.55);
}
.bk-filter-ico { font-size: 15px; }
.bk-filter-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: 10px; font-size: 11.5px; font-weight: 700;
  background: rgba(46,42,38,.08); color: var(--bk-night-2);
}
.bk-filter.is-active .bk-filter-count { background: rgba(255,255,255,.25); color: #fff; }

/* ───────── 4. CHAPITRES ───────── */
.bk-chapters-section { padding-top: 24px; }
.bk-chapters {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}
.bk-chapter {
  position: relative; display: flex; gap: 16px;
  padding: 20px 22px;
  background: linear-gradient(180deg, var(--bk-ivory), #fff);
  border: 1px solid rgba(200,169,106,.22);
  border-radius: 18px; text-decoration: none; color: inherit;
  box-shadow: 0 6px 18px -12px rgba(46,42,38,.18);
  transition: transform .3s cubic-bezier(.2,.7,.3,1.2), box-shadow .3s ease, border-color .3s ease;
  animation: bkRise .6s ease both;
  overflow: hidden;
}
.bk-chapter::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--bk-gold), var(--bk-gold-l));
  opacity: 0; transition: opacity .3s ease;
}
.bk-chapter:hover {
  transform: translateY(-4px);
  border-color: rgba(200,169,106,.5);
  box-shadow: 0 18px 38px -18px rgba(46,42,38,.28);
}
.bk-chapter:hover::before { opacity: 1; }

.bk-chapter-icon {
  flex: 0 0 56px; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(200,169,106,.16), rgba(107,143,113,.10));
  border: 1px solid rgba(200,169,106,.22);
}
.bk-chapter-body { flex: 1 1 auto; min-width: 0; }
.bk-chapter-title {
  margin: 0 0 4px; font-size: 16.5px; font-weight: 700;
  color: var(--bk-night); line-height: 1.35;
}
.bk-chapter-title-ar {
  font-family: 'Amiri', 'Scheherazade New', serif;
  font-size: 18px; color: var(--bk-gold-d); line-height: 1.4;
  margin-bottom: 6px;
}
.bk-chapter-sub {
  margin: 4px 0 10px; font-size: 13.5px; color: var(--bk-muted);
  font-style: italic; line-height: 1.5;
}
.bk-chapter-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed rgba(200,169,106,.3);
}
.bk-chapter-count {
  font-size: 12.5px; font-weight: 600; color: var(--bk-green-d);
  letter-spacing: .02em;
}
.bk-chapter-go {
  font-size: 18px; color: var(--bk-gold-d);
  transition: transform .25s ease;
}
.bk-chapter:hover .bk-chapter-go { transform: translateX(4px); }

/* Coloration thématique discrète sur l'icône */
.bk-chapter[data-theme="croyance"]     .bk-chapter-icon { background: linear-gradient(135deg, rgba(200,169,106,.22), rgba(200,169,106,.08)); }
.bk-chapter[data-theme="connaissance"] .bk-chapter-icon { background: linear-gradient(135deg, rgba(107,143,113,.22), rgba(107,143,113,.08)); }
.bk-chapter[data-theme="invocation"]   .bk-chapter-icon { background: linear-gradient(135deg, rgba(227,200,145,.35), rgba(200,169,106,.10)); }
.bk-chapter[data-theme="pratique"]     .bk-chapter-icon { background: linear-gradient(135deg, rgba(233,220,184,.6), rgba(247,243,234,.4)); }
.bk-chapter[data-theme="ethique"]      .bk-chapter-icon { background: linear-gradient(135deg, rgba(107,143,113,.18), rgba(200,169,106,.10)); }
.bk-chapter[data-theme="societe"]      .bk-chapter-icon { background: linear-gradient(135deg, rgba(46,42,38,.10), rgba(200,169,106,.10)); }

.bk-chapters-empty {
  text-align: center; padding: 60px 20px;
  color: var(--bk-muted); font-style: italic; font-size: 15px;
}
.bk-chapters-empty span { display: block; font-size: 36px; margin-bottom: 10px; opacity: .7; }

/* ───────── 6. NOOR IA ───────── */
.bk-noor-section {
  background:
    radial-gradient(700px 360px at 50% 0%, rgba(107,143,113,.10), transparent 60%),
    linear-gradient(180deg, transparent, rgba(247,243,234,.6));
  border-top: 1px solid rgba(200,169,106,.18);
  padding: 64px 0 80px;
}
.bk-noor-head { text-align: center; margin-bottom: 36px; }
.bk-noor-pastille {
  display: inline-block; padding: 6px 14px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--bk-green-d);
  background: rgba(107,143,113,.14);
  border: 1px solid rgba(107,143,113,.28);
  margin-bottom: 14px; letter-spacing: .02em;
}
.bk-noor-title { justify-content: center; }
.bk-noor-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.bk-noor-card {
  padding: 24px;
  background: linear-gradient(180deg, #fff, var(--bk-ivory));
  border: 1px solid rgba(200,169,106,.25);
  border-radius: 20px;
  box-shadow: 0 8px 22px -16px rgba(46,42,38,.18);
  transition: transform .3s ease, box-shadow .3s ease;
}
.bk-noor-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -20px rgba(46,42,38,.28); }
.bk-noor-card-head { text-align: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px dashed rgba(200,169,106,.32); }
.bk-noor-card-icon { display: block; font-size: 36px; margin-bottom: 8px; }
.bk-noor-card-title { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--bk-night); }
.bk-noor-card-sub { margin: 0; font-size: 13.5px; color: var(--bk-muted); font-style: italic; }
.bk-noor-card-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.bk-noor-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  text-decoration: none; color: var(--bk-night-2);
  background: rgba(247,243,234,.6);
  border: 1px solid transparent;
  transition: all .25s ease;
}
.bk-noor-step:hover { background: #fff; border-color: rgba(200,169,106,.32); transform: translateX(2px); }
.bk-noor-step-num {
  flex: 0 0 24px; width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bk-gold); color: #fff;
  font-size: 12px; font-weight: 700;
}
.bk-noor-step-icon { font-size: 16px; }
.bk-noor-step-text { flex: 1 1 auto; font-size: 14px; font-weight: 500; }

/* ───────── 7. MINI PLAYER ───────── */
.bk-mini {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--bk-night) 0%, var(--bk-night-2) 100%);
  color: #fff; border-radius: 16px;
  box-shadow: 0 16px 40px -16px rgba(46,42,38,.55);
  animation: bkRise .5s ease both;
}
.bk-mini-icon { font-size: 22px; }
.bk-mini-label { font-size: 12px; opacity: .8; }
.bk-mini-link {
  display: inline-block; margin-top: 2px;
  font-size: 14px; font-weight: 600; color: var(--bk-gold-l);
  text-decoration: none; border-bottom: 1px dashed rgba(227,200,145,.5);
}

/* ───────── Animations ───────── */
@keyframes bkFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bkRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ───────── RTL : tableau de bord propre ───────── */
[dir="rtl"] .bk-chapter::before { left: auto; right: 0; }
[dir="rtl"] .bk-chapter:hover .bk-chapter-go { transform: translateX(-4px); }
[dir="rtl"] .bk-noor-step:hover { transform: translateX(-2px); }
[dir="rtl"] .bk-search-input { padding: 12px 44px 12px 16px; }
[dir="rtl"] .bk-search-icon { left: auto; right: 14px; }

/* ───────── Responsive ───────── */
@media (max-width: 720px) {
  .bk-hero { padding: 60px 0 50px; }
  .bk-hero-meta { gap: 8px 14px; font-size: 13.5px; }
  .bk-hero-meta li { padding: 6px 10px; }
  .bk-actions { padding: 12px; }
  .bk-actions-tools { flex: 1 1 100%; }
  .bk-tool-lbl { display: none; }
  .bk-tool { padding: 10px 12px; }
  .bk-chapters { grid-template-columns: 1fr; }
  .bk-section { padding: 44px 0; }
  .bk-mini { right: 12px; bottom: 12px; padding: 10px 14px; }
}

/* ───────── Accessibilité ───────── */
@media (prefers-reduced-motion: reduce) {
  .bk-chapter, .bk-hero-glow, .bk-btn, .bk-noor-card, .bk-noor-step, .bk-tool { animation: none !important; transition: none !important; }
}

.bk-chapter:focus-visible,
.bk-btn:focus-visible,
.bk-tool:focus-visible,
.bk-filter:focus-visible,
.bk-search-input:focus-visible,
.bk-noor-step:focus-visible {
  outline: 2px solid var(--bk-gold); outline-offset: 3px;
}
