/* =====================================================================
   Nos pieux prédécesseurs (sl-*) — /salaf
   Couleurs : jetons du thème actif (--c-*) ; teinte par génération : --h.
   Aucune représentation figurative : médaillons calligraphiques et motifs géométriques.
   ===================================================================== */
.sl-page {
  --sl-gold: var(--c-gold, #c89b5e);
  --sl-gold-2: var(--c-gold-light, #e9c98f);
  --sl-night: #0b2a22;
  --sl-night-2: #0e1f33;
  --sl-paper: var(--c-paper, #fffdf8);
  --sl-line: var(--c-border-soft, rgba(0,0,0,.08));
  --sl-ink: var(--c-ink, #1d2a26);
  --sl-head: var(--c-heading, #0f3a2c);
  --sl-muted: var(--c-muted, #6b7470);
  --sl-r: 22px;
  --h: 152;
  max-width: 1320px; margin: 0 auto; padding: 1rem 16px 3rem; display: grid; gap: 1.6rem; color: var(--sl-ink);
}
.sl-page *:focus-visible { outline: 3px solid var(--sl-gold); outline-offset: 2px; border-radius: 8px; }
.sl-page [lang="ar"] { font-family: var(--font-arabic, 'Amiri', serif); }

/* ---------- Hero ---------- */
.sl-hero {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 30px; color: #fff; padding: clamp(1.4rem, 3.5vw, 2.8rem);
  background:
    radial-gradient(1200px 420px at 85% -10%, rgba(233,201,143,.28), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, hsl(var(--h) 60% 30% / .55), transparent 60%),
    linear-gradient(135deg, var(--sl-night) 0%, #0f3b30 45%, var(--sl-night-2) 100%);
  box-shadow: 0 30px 60px -30px rgba(6,24,19,.65), inset 0 0 0 1px rgba(233,201,143,.18);
}
.sl-hero::after { content: ""; position: absolute; inset: 10px; border-radius: 22px; border: 1px solid rgba(233,201,143,.22); pointer-events: none; z-index: -1; }
.sl-hero-pattern {
  position: absolute; inset: 0; z-index: -1; opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23e9c98f' stroke-width='1'%3E%3Cpath d='M40 6l9.9 24.1L74 40l-24.1 9.9L40 74l-9.9-24.1L6 40l24.1-9.9z'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='7'/%3E%3Cpath d='M0 0l12 12M80 0L68 12M0 80l12-12M80 80L68 68'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
}
.sl-hero-inner { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.sl-hero-slim .sl-hero-inner { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.sl-eyebrow { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .85rem; border-radius: 999px; font-size: .78rem; letter-spacing: .04em;
  background: rgba(233,201,143,.14); border: 1px solid rgba(233,201,143,.4); color: var(--sl-gold-2); }
.sl-hero-calli { margin: .9rem 0 0; font-family: var(--font-quran, var(--font-arabic, 'Amiri', serif)) !important; font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.3;
  background: linear-gradient(180deg, #f8e7c4 10%, #c89b5e 90%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 2px 30px rgba(233,201,143,.15); }
.sl-hero h1 { margin: .2rem 0 .6rem; font-family: var(--font-heading, Georgia, serif); font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; color: #fff; letter-spacing: -.01em; }
.sl-lead { margin: 0; max-width: 62ch; color: rgba(255,255,255,.82); font-size: clamp(.98rem, 1.6vw, 1.1rem); line-height: 1.7; }

.sl-search { position: relative; margin-top: 1.3rem; max-width: 620px; }
.sl-search > i { position: absolute; inset-inline-start: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--sl-gold); }
.sl-search input { width: 100%; padding: .95rem 3rem .95rem 2.9rem; border-radius: 999px; border: 1px solid rgba(233,201,143,.45);
  background: rgba(255,255,255,.96); color: #10261f; font-size: 1rem; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); }
[dir="rtl"] .sl-search input { padding: .95rem 2.9rem .95rem 3rem; }
.sl-search input:focus { outline: none; border-color: var(--sl-gold); box-shadow: 0 0 0 4px rgba(200,155,94,.35); }
.sl-search kbd { position: absolute; inset-inline-end: 1rem; top: 50%; transform: translateY(-50%); background: #f1e7d4; color: #6b5427; border-radius: 6px; padding: .05rem .45rem; font-size: .75rem; }

.sl-gens { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.sl-gens button { --h: 45; display: inline-flex; align-items: center; gap: .35rem; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff;
  padding: .38rem .9rem; border-radius: 999px; font-size: .84rem; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.sl-gens button:hover { transform: translateY(-1px); border-color: rgba(233,201,143,.7); }
.sl-gens button.is-active { background: linear-gradient(135deg, #e9c98f, #c89b5e); color: #2a1c05; border-color: transparent; font-weight: 600; }
.sl-gens-light { margin-top: -.6rem; }
.sl-gens-light button { color: var(--sl-ink); background: var(--sl-paper); border-color: var(--sl-line); }
.sl-gens-light button:hover { border-color: var(--sl-gold); }

.sl-hero-hadith { position: relative; padding: 1.5rem 1.4rem 1.2rem; border-radius: 22px; color: #2b2210; transform: rotate(.6deg);
  background: linear-gradient(160deg, #fffaf0, #f4e6c8); box-shadow: 0 24px 50px -20px rgba(0,0,0,.6), inset 0 0 0 1px rgba(160,120,50,.25); }
.sl-hero-hadith::before { content: ""; position: absolute; inset: 7px; border-radius: 16px; border: 1px dashed rgba(160,120,50,.35); pointer-events: none; }
.sl-hadith-tag { display: inline-flex; gap: .35rem; align-items: center; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8a6420; font-weight: 700; }
.sl-hadith-ar { margin: .7rem 0; font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 2; color: #0f4d37; text-align: center; }
.sl-hadith-tr { margin: 0 0 .7rem; font-style: italic; color: #4a3d22; line-height: 1.6; text-align: center; }
.sl-hadith-ref { display: flex; justify-content: center; gap: .35rem; font-size: .8rem; color: #7a5a1e; font-weight: 600; }

.sl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-top: 1.8rem; }
.sl-kpis > div { padding: .85rem 1rem; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(233,201,143,.25); backdrop-filter: blur(4px); }
.sl-kpis strong { display: block; font-size: clamp(1.4rem, 3vw, 2rem); font-family: var(--font-heading, serif); color: var(--sl-gold-2); font-variant-numeric: tabular-nums; line-height: 1.1; }
.sl-kpis span { font-size: .78rem; color: rgba(255,255,255,.72); }

/* ---------- Onglets ---------- */
.sl-tabs { position: sticky; top: calc(var(--header-h, 72px) + .4rem); z-index: 20; display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap;
  padding: .4rem; margin: -2.6rem auto 0; width: fit-content; max-width: 100%; border-radius: 999px; background: var(--sl-paper); border: 1px solid var(--sl-line);
  box-shadow: 0 14px 34px -18px rgba(0,0,0,.35); }
.sl-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.05rem; border-radius: 999px; color: var(--sl-ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.sl-tabs a span { font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; background: var(--c-gold-soft, #f6ecd9); color: var(--c-gold-text, #7a5a1e); font-variant-numeric: tabular-nums; }
.sl-tabs a:hover { background: var(--c-gold-soft, #f6ecd9); }
.sl-tabs a.is-active { background: linear-gradient(135deg, #0f3b30, #145a45); color: #fff; }
.sl-tabs a.is-active span { background: rgba(233,201,143,.25); color: #f6dfb0; }

/* ---------- Boutons & puces ---------- */
.sl-btn-ghost { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--sl-gold); background: transparent;
  color: var(--c-gold-text, #7a5a1e); font-weight: 600; font-size: .86rem; cursor: pointer; transition: background .2s, transform .2s; }
.sl-btn-ghost:hover { background: var(--c-gold-soft, #f6ecd9); transform: translateY(-1px); }
.sl-btn-ghost.is-busy i { animation: sl-spin .8s linear infinite; }
@keyframes sl-spin { to { transform: rotate(360deg); } }
.sl-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 999px; font-size: .74rem; text-decoration: none;
  background: hsl(var(--h) 45% 45% / .1); color: hsl(var(--h) 55% 28%); border: 1px solid hsl(var(--h) 45% 45% / .25); }
.sl-chip:hover { border-color: var(--sl-gold); }
.sl-icon-btn { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--sl-line); background: var(--sl-paper); color: var(--sl-muted); cursor: pointer; transition: .2s; }
.sl-icon-btn:hover { color: var(--c-gold-text, #7a5a1e); border-color: var(--sl-gold); }
.sl-icon-btn.is-done { color: #157a52; border-color: #157a52; }

/* ---------- Sources ---------- */
.sl-src { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .76rem; color: var(--sl-muted); }
.sl-src-type { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .66rem; }
.sl-src.is-quran .sl-src-type { background: #e6f4ec; color: #136b47; }
.sl-src.is-hadith .sl-src-type { background: #eef0fb; color: #3a4aa0; }
.sl-src.is-athar .sl-src-type { background: #f7efe0; color: #8a5a10; }
.sl-src.is-book .sl-src-type { background: #f1f1ee; color: #555; }
.sl-src-ref a { color: inherit; }
.sl-verified { display: inline-flex; align-items: center; gap: .2rem; padding: .08rem .45rem; border-radius: 999px; background: #e3f5ea; color: #13724a; font-weight: 700; font-size: .68rem; }

/* ---------- Parole (carte) ---------- */
.sl-quote { position: relative; margin: 0; padding: 1.3rem 1.3rem 1rem; border-radius: var(--sl-r); background:
  linear-gradient(160deg, hsl(var(--h) 50% 50% / .07), transparent 45%), var(--sl-paper); border: 1px solid var(--sl-line);
  box-shadow: 0 10px 30px -22px rgba(0,0,0,.35); break-inside: avoid; display: grid; gap: .7rem; transition: transform .25s, box-shadow .25s, border-color .25s; }
.sl-quote:hover { transform: translateY(-2px); border-color: hsl(var(--h) 40% 50% / .45); box-shadow: 0 18px 40px -22px rgba(0,0,0,.45); }
.sl-quote-mark { position: absolute; inset-inline-end: 1rem; top: .2rem; font-size: 3.6rem; line-height: 1; color: hsl(var(--h) 40% 45% / .16); font-family: Georgia, serif; }
.sl-quote-ar { margin: 0; font-size: clamp(1.2rem, 2.1vw, 1.45rem); line-height: 2.05; color: var(--c-green-text, #0f4d37); text-align: right; }
.sl-quote-tr { margin: 0; line-height: 1.7; font-size: .98rem; color: var(--sl-ink); }
.sl-quote-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; padding-top: .7rem; border-top: 1px dashed var(--sl-line); }
.sl-quote-actions { margin-inline-start: auto; display: inline-flex; gap: .35rem; }
.sl-quote-who { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--sl-ink); margin-inline-end: auto; }
.sl-quote-who strong { display: block; font-size: .9rem; color: var(--sl-head); }
.sl-quote-who small { display: block; font-size: .72rem; color: var(--sl-muted); }
.sl-quote.is-hero { padding: clamp(1.4rem, 3vw, 2.2rem); border-width: 1px; background:
  radial-gradient(600px 200px at 100% 0%, rgba(233,201,143,.18), transparent 60%), var(--sl-paper); }
.sl-quote.is-hero .sl-quote-ar { font-size: clamp(1.45rem, 3vw, 2rem); text-align: center; }
.sl-quote.is-hero .sl-quote-tr { font-size: clamp(1.02rem, 1.8vw, 1.18rem); text-align: center; font-style: italic; max-width: 70ch; margin-inline: auto; }
.sl-quote.is-entering { animation: sl-fade .5s ease both; }
@keyframes sl-fade { from { opacity: 0; transform: translateY(8px); } }

.sl-mini-medal { flex: 0 0 auto; display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-size: 1.15rem;
  color: #f8e7c4; background: radial-gradient(circle at 30% 25%, hsl(var(--h, 152) 50% 38%), hsl(var(--h, 152) 60% 18%)); box-shadow: inset 0 0 0 2px rgba(233,201,143,.6); }

/* ---------- Parole du jour ---------- */
.sl-daily { display: grid; gap: .8rem; }
.sl-daily-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sl-daily-head h2 { margin: 0; display: flex; gap: .5rem; align-items: center; font-size: 1.15rem; color: var(--sl-head); }
.sl-daily-head h2 i { color: var(--sl-gold); }

/* ---------- Méthode ---------- */
.sl-method { padding: 1.2rem 1.4rem; border-radius: var(--sl-r); background: var(--sl-paper); border: 1px solid var(--sl-line); border-inline-start: 4px solid var(--sl-gold); }
.sl-method h2 { margin: 0 0 .6rem; font-size: 1.08rem; display: flex; gap: .5rem; align-items: center; color: var(--sl-head); }
.sl-method ol { margin: 0; padding-inline-start: 1.25rem; display: grid; gap: .4rem; font-size: .93rem; line-height: 1.6; }
.sl-none { display: flex; justify-content: center; align-items: center; gap: .5rem; padding: 1.5rem; border-radius: var(--sl-r); background: var(--sl-paper); border: 1px dashed var(--sl-line); color: var(--sl-muted); }
.sl-none[hidden] { display: none; }

/* ---------- Générations ---------- */
.sl-gen { display: grid; gap: 1.1rem; scroll-margin-top: calc(var(--header-h, 72px) + 4.5rem); }
.sl-gen[hidden] { display: none; }
.sl-gen-head { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.2rem; align-items: center; padding: 1.3rem 1.4rem;
  border-radius: var(--sl-r); overflow: hidden; background: linear-gradient(120deg, hsl(var(--h) 45% 45% / .12), transparent 60%), var(--sl-paper); border: 1px solid var(--sl-line); }
.sl-gen-head::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: linear-gradient(180deg, hsl(var(--h) 55% 45%), var(--sl-gold)); }
.sl-gen-num { position: relative; display: grid; place-items: center; width: 4.6rem; height: 4.6rem; }
.sl-gen-num::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, hsl(var(--h) 55% 38%), hsl(var(--h) 60% 20%));
  clip-path: polygon(50% 0, 64% 15%, 85% 15%, 85% 36%, 100% 50%, 85% 64%, 85% 85%, 64% 85%, 50% 100%, 36% 85%, 15% 85%, 15% 64%, 0 50%, 15% 36%, 15% 15%, 36% 15%); }
.sl-gen-num span { position: relative; font-size: 2rem; color: #f8e7c4; line-height: 1; }
.sl-gen-period { display: inline-flex; gap: .4rem; align-items: center; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: hsl(var(--h) 45% 32%); font-weight: 700; }
.sl-gen-titles h2 { margin: .25rem 0 .2rem; font-family: var(--font-heading, serif); font-size: clamp(1.35rem, 2.6vw, 1.85rem); color: var(--sl-head); }
.sl-gen-titles h2 small { font-size: 1.15rem; color: var(--c-green-text, #0f4d37); font-weight: 400; margin-inline-start: .3rem; }
.sl-gen-tag { margin: 0; color: var(--sl-muted); font-size: .9rem; }
.sl-gen-intro p { margin: 0 0 .6rem; font-size: .92rem; line-height: 1.65; }
.sl-gen-proof { margin: 0; padding: .6rem .8rem; border-radius: 12px; background: hsl(var(--h) 40% 50% / .07); display: grid; gap: .25rem; font-size: .82rem; }
.sl-gen-proof span { font-size: 1.05rem; color: var(--c-green-text, #0f4d37); line-height: 1.8; }
.sl-gen-proof em { color: var(--sl-ink); }
.sl-gen-proof cite { font-style: normal; color: var(--c-gold-text, #7a5a1e); font-weight: 600; font-size: .75rem; }

/* ---------- Cartes de fiche ---------- */
.sl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .9rem; }
.sl-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; padding: 1.05rem; border-radius: var(--sl-r); text-decoration: none; color: var(--sl-ink);
  background: linear-gradient(165deg, hsl(var(--h) 55% 50% / .08), transparent 55%), var(--sl-paper); border: 1px solid var(--sl-line); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.sl-card::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(233,201,143,.22), transparent 70%); opacity: 0; transition: opacity .3s; }
.sl-card:hover { transform: translateY(-4px); border-color: var(--sl-gold); box-shadow: var(--shadow-gold, 0 18px 40px -20px rgba(160,110,30,.45)); color: var(--sl-ink); }
.sl-card:hover::after { opacity: 1; }
.sl-card[hidden] { display: none; }
.sl-medal { position: relative; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; }
.sl-medal::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 25%, hsl(var(--h) 50% 40%), hsl(var(--h) 60% 17%));
  clip-path: polygon(50% 0, 64% 15%, 85% 15%, 85% 36%, 100% 50%, 85% 64%, 85% 85%, 64% 85%, 50% 100%, 36% 85%, 15% 85%, 15% 64%, 0 50%, 15% 36%, 15% 15%, 36% 15%); }
.sl-medal::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid rgba(233,201,143,.65); }
.sl-medal span { position: relative; font-size: 1.55rem; color: #f8e7c4; line-height: 1; }
.sl-card.is-woman .sl-medal::before { background: radial-gradient(circle at 30% 25%, #8a5a8a, #3b1f3d); }
.sl-card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.sl-card-name { font-family: var(--font-heading, serif); font-size: 1.12rem; font-weight: 700; color: var(--sl-head); line-height: 1.25; }
.sl-card-ar { font-size: 1.12rem; color: var(--c-green-text, #0f4d37); line-height: 1.5; }
.sl-card-role { font-size: .8rem; color: hsl(var(--h) 45% 30%); font-weight: 600; }
.sl-card-sum { margin-top: .25rem; font-size: .86rem; line-height: 1.55; color: var(--sl-ink); opacity: .88; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sl-card-foot { display: flex; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .55rem; border-top: 1px solid var(--sl-line); font-size: .75rem; color: var(--sl-muted); }
.sl-card-foot span { display: inline-flex; gap: .3rem; align-items: center; }
.sl-card-count { color: var(--c-gold-text, #7a5a1e); font-weight: 600; }
.sl-card.is-compact { grid-template-columns: auto minmax(0, 1fr); }

/* ---------- Frise ---------- */
.sl-section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.sl-section-head h2 { margin: 0; display: flex; gap: .55rem; align-items: center; font-size: 1.3rem; color: var(--sl-head); font-family: var(--font-heading, serif); }
.sl-section-head h2 small { font-size: 1.05rem; color: var(--c-green-text, #0f4d37); font-weight: 400; }
.sl-section-head p { margin: 0; color: var(--sl-muted); font-size: .88rem; }
.sl-timeline { list-style: none; margin: 0; padding: 1.4rem 0 .6rem; display: flex; gap: .6rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; position: relative; }
.sl-timeline::before { content: ""; position: absolute; top: .55rem; inset-inline: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--sl-gold), transparent); }
.sl-timeline li { flex: 0 0 168px; scroll-snap-align: start; position: relative; }
.sl-timeline li[hidden] { display: none; }
.sl-timeline li::before { content: ""; position: absolute; top: -1.1rem; inset-inline-start: 1rem; width: 12px; height: 12px; border-radius: 50%; background: hsl(var(--h) 55% 40%); box-shadow: 0 0 0 3px var(--sl-paper), 0 0 0 4px var(--sl-gold); }
.sl-timeline a { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .8rem; border-radius: 14px; text-decoration: none; color: var(--sl-ink);
  background: var(--sl-paper); border: 1px solid var(--sl-line); border-top: 3px solid hsl(var(--h) 55% 42%); transition: border-color .2s, transform .2s; }
.sl-timeline a:hover { border-color: var(--sl-gold); transform: translateY(-2px); }
.sl-tl-date { font-weight: 700; color: var(--c-gold-text, #7a5a1e); font-size: .85rem; font-variant-numeric: tabular-nums; }
.sl-tl-name { font-weight: 700; color: var(--sl-head); line-height: 1.25; font-size: .92rem; }
.sl-tl-gen { font-size: .72rem; color: var(--sl-muted); }
.sl-disclaimer { display: flex; justify-content: center; align-items: center; gap: .5rem; margin: 0; font-size: .82rem; color: var(--sl-muted); text-align: center; }

/* ---------- Fiche ---------- */
.sl-hero-person { padding-bottom: 1.6rem; }
.sl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .82rem; color: rgba(255,255,255,.7); }
.sl-crumbs a { color: var(--sl-gold-2); text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.sl-crumbs a:hover { text-decoration: underline; }
.sl-crumbs-pos { margin-inline-start: auto; padding: .1rem .6rem; border-radius: 999px; border: 1px solid rgba(233,201,143,.35); font-variant-numeric: tabular-nums; }
.sl-person { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); align-items: center; margin-top: 1.4rem; }
.sl-person-medal { position: relative; display: grid; place-items: center; width: clamp(7.5rem, 16vw, 11rem); aspect-ratio: 1; }
.sl-person-medal::before { content: ""; position: absolute; inset: 0; background: conic-gradient(from 22.5deg, #f8e7c4, #c89b5e, #f8e7c4, #a87b3e, #f8e7c4);
  clip-path: polygon(50% 0, 64% 15%, 85% 15%, 85% 36%, 100% 50%, 85% 64%, 85% 85%, 64% 85%, 50% 100%, 36% 85%, 15% 85%, 15% 64%, 0 50%, 15% 36%, 15% 15%, 36% 15%); }
.sl-person-medal::after { content: ""; position: absolute; inset: 4px; background: radial-gradient(circle at 30% 25%, hsl(var(--h) 50% 32%), #071d17 80%);
  clip-path: polygon(50% 0, 64% 15%, 85% 15%, 85% 36%, 100% 50%, 85% 64%, 85% 85%, 64% 85%, 50% 100%, 36% 85%, 15% 85%, 15% 64%, 0 50%, 15% 36%, 15% 15%, 36% 15%); }
.sl-person-medal span { position: relative; z-index: 1; max-width: 72%; text-align: center; font-size: clamp(1.05rem, 2.4vw, 1.55rem); line-height: 1.45; color: #f8e7c4; }
.sl-person-id h1 { margin: .5rem 0 .1rem; }
.sl-person-ar { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--sl-gold-2); line-height: 1.5; }
.sl-person-role { margin: .4rem 0 0; color: rgba(255,255,255,.85); font-size: 1.02rem; }
.sl-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 1.5rem 0 0; }
.sl-facts > div { padding: .7rem .85rem; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(233,201,143,.3); min-width: 0; }
.sl-facts > div.is-wide { grid-column: 1 / -1; }
.sl-facts dt { display: flex; gap: .35rem; align-items: center; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.62); font-weight: 600; }
.sl-facts dt i { color: var(--sl-gold-2); }
.sl-facts dd { margin: .25rem 0 0; color: #fff; font-size: .92rem; line-height: 1.45; }
.sl-facts dd small { color: rgba(255,255,255,.65); }
.sl-facts-ar { display: block; font-size: 1.12rem; color: #f8e7c4; line-height: 1.8; }
.sl-facts-tr { display: block; font-size: .85rem; color: rgba(255,255,255,.78); font-style: italic; }

.sl-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 1.4rem; align-items: start; }
.sl-toc, .sl-side { position: sticky; top: calc(var(--header-h, 72px) + 1rem); max-height: calc(100vh - var(--header-h, 72px) - 2rem); overflow: auto; scrollbar-width: thin; }
.sl-toc { padding: 1rem; border-radius: var(--sl-r); background: var(--sl-paper); border: 1px solid var(--sl-line); }
.sl-toc h2 { margin: 0 0 .5rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--c-gold-text, #7a5a1e); }
.sl-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; counter-reset: toc; }
.sl-toc a { display: flex; gap: .5rem; padding: .4rem .55rem; border-radius: 10px; font-size: .86rem; color: var(--sl-ink); text-decoration: none; counter-increment: toc; }
.sl-toc a::before { content: counter(toc, arabic-indic); min-width: 1rem; color: var(--sl-gold); }
.sl-toc a:hover, .sl-toc a.is-active { background: var(--c-gold-soft, #f6ecd9); color: var(--sl-head); font-weight: 600; }

.sl-article { display: grid; gap: 1.2rem; min-width: 0; }
.sl-sec { padding: clamp(1.1rem, 2.4vw, 1.6rem); border-radius: var(--sl-r); background: var(--sl-paper); border: 1px solid var(--sl-line); scroll-margin-top: calc(var(--header-h, 72px) + 1rem); }
.sl-sec > h2 { margin: 0 0 1rem; display: flex; align-items: center; gap: .6rem; font-family: var(--font-heading, serif); font-size: clamp(1.2rem, 2.2vw, 1.45rem); color: var(--sl-head); }
.sl-sec > h2 i { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 12px; font-size: 1rem; color: #f8e7c4; background: linear-gradient(135deg, hsl(var(--h) 55% 38%), hsl(var(--h) 60% 20%)); }
.sl-count { margin-inline-start: .2rem; padding: .05rem .55rem; border-radius: 999px; background: var(--c-gold-soft, #f6ecd9); color: var(--c-gold-text, #7a5a1e); font-size: .8rem; font-family: var(--font-body, sans-serif); }
.sl-summary { margin: 0; font-size: clamp(1.05rem, 1.9vw, 1.22rem); line-height: 1.75; color: var(--sl-head); font-family: var(--font-heading, serif); padding-inline-start: 1rem; border-inline-start: 4px solid var(--sl-gold); }
.sl-prose p { margin: 0 0 1rem; line-height: 1.85; font-size: 1.01rem; }
.sl-prose p:last-child { margin-bottom: 0; }
.sl-prose p:first-child::first-letter { float: inline-start; font-family: var(--font-heading, serif); font-size: 3.4rem; line-height: .9; padding-inline-end: .5rem; padding-top: .3rem; color: hsl(var(--h) 55% 32%); }
[dir="rtl"] .sl-prose p:first-child::first-letter { float: none; font-size: inherit; padding: 0; color: inherit; }

.sl-virtues { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: .8rem; }
.sl-virtue { display: flex; flex-direction: column; gap: .55rem; padding: 1rem 1.05rem; border-radius: 16px; background: linear-gradient(160deg, rgba(233,201,143,.14), transparent 60%), var(--sl-paper); border: 1px solid rgba(200,155,94,.3); }
.sl-virtue-ar { margin: 0; font-size: 1.18rem; line-height: 1.95; color: var(--c-green-text, #0f4d37); text-align: right; }
.sl-virtue-text { margin: 0; font-size: .93rem; line-height: 1.65; }
.sl-virtue .sl-src { margin-top: auto; }

.sl-traits { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; position: relative; }
.sl-traits::before { content: ""; position: absolute; top: .5rem; bottom: .5rem; inset-inline-start: 1.25rem; width: 2px; background: linear-gradient(180deg, var(--sl-gold), hsl(var(--h) 45% 45% / .25)); }
.sl-trait { position: relative; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; }
.sl-trait-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; color: #f8e7c4;
  background: linear-gradient(135deg, hsl(var(--h) 55% 38%), hsl(var(--h) 60% 20%)); box-shadow: 0 0 0 4px var(--sl-paper), 0 0 0 5px rgba(200,155,94,.5); }
.sl-trait-body { padding: .9rem 1rem; border-radius: 16px; background: hsl(var(--h) 30% 50% / .05); border: 1px solid var(--sl-line); }
.sl-trait-body h3 { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--sl-head); }
.sl-trait-body p { margin: 0 0 .55rem; line-height: 1.7; font-size: .95rem; }
.sl-trait-ar { font-size: 1.15rem !important; color: var(--c-green-text, #0f4d37); text-align: right; line-height: 1.9 !important; }

.sl-quotes { display: grid; gap: .9rem; }
.sl-chain { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1rem; align-items: center; }
.sl-chain-col { padding: 1rem; border-radius: 16px; background: hsl(var(--h) 30% 50% / .05); border: 1px solid var(--sl-line); height: 100%; }
.sl-chain-col h3 { margin: 0 0 .6rem; font-size: .9rem; display: flex; gap: .4rem; align-items: center; color: var(--sl-head); }
.sl-chain-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.sl-chain-col li { padding: .25rem .65rem; border-radius: 999px; background: var(--sl-paper); border: 1px solid var(--sl-line); font-size: .84rem; }
.sl-chain-self { display: grid; place-items: center; width: 5.4rem; aspect-ratio: 1; border-radius: 50%; text-align: center; font-size: .95rem; line-height: 1.4; padding: .5rem;
  color: #f8e7c4; background: radial-gradient(circle at 30% 25%, hsl(var(--h) 50% 36%), #0a241c); box-shadow: 0 0 0 3px var(--sl-paper), 0 0 0 4px var(--sl-gold); }
.sl-works { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.sl-works li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .8rem; border-radius: 12px; border: 1px solid var(--sl-line); flex-wrap: wrap; }
.sl-works li span[lang="ar"] { font-size: 1.1rem; color: var(--c-green-text, #0f4d37); }
.sl-sources { margin: 0; padding-inline-start: 1.3rem; display: grid; gap: .35rem; font-size: .9rem; color: var(--sl-ink); }

.sl-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: stretch; }
.sl-pager a { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-radius: 16px; background: var(--sl-paper); border: 1px solid var(--sl-line); text-decoration: none; color: var(--sl-head); font-weight: 600; transition: border-color .2s, transform .2s; }
.sl-pager a:hover { border-color: var(--sl-gold); transform: translateY(-2px); }
.sl-pager a small { display: block; font-weight: 400; font-size: .72rem; color: var(--sl-muted); }
.sl-pager .is-next { justify-content: flex-end; text-align: end; }
.sl-pager .is-back { font-size: .85rem; }

.sl-side { display: grid; gap: .9rem; }
.sl-side-card { display: block; padding: 1.05rem; border-radius: var(--sl-r); background: var(--sl-paper); border: 1px solid var(--sl-line); text-decoration: none; color: var(--sl-ink); }
.sl-side-gen { background: linear-gradient(160deg, hsl(var(--h) 45% 45% / .12), transparent 70%), var(--sl-paper); }
.sl-side-label { display: inline-flex; gap: .35rem; align-items: center; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-gold-text, #7a5a1e); font-weight: 700; }
.sl-side-card h2 { margin: .3rem 0 .5rem; font-size: 1.05rem; color: var(--sl-head); }
.sl-side-ar { margin: 0 0 .35rem; font-size: 1.05rem; line-height: 1.85; color: var(--c-green-text, #0f4d37); }
.sl-side-tr { margin: 0 0 .35rem; font-size: .84rem; font-style: italic; line-height: 1.55; }
.sl-side-card cite { font-style: normal; font-size: .74rem; color: var(--c-gold-text, #7a5a1e); font-weight: 600; }
.sl-side-link { display: flex; align-items: center; gap: .7rem; font-weight: 600; color: var(--sl-head); transition: border-color .2s; }
.sl-side-link:hover { border-color: var(--sl-gold); color: var(--sl-head); }
.sl-side-link > i:first-child { font-size: 1.3rem; color: var(--sl-gold); }
.sl-side-link span { flex: 1; font-size: .9rem; }
.sl-side-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .2rem; }
.sl-side-list a { display: flex; align-items: center; gap: .6rem; padding: .4rem .45rem; border-radius: 12px; text-decoration: none; color: var(--sl-ink); }
.sl-side-list a:hover { background: var(--c-gold-soft, #f6ecd9); }
.sl-side-list strong { display: block; font-size: .86rem; color: var(--sl-head); }
.sl-side-list small { display: block; font-size: .72rem; color: var(--sl-muted); }

/* ---------- Paroles ---------- */
.sl-themes { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.sl-themes button { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--sl-line); background: var(--sl-paper); color: var(--sl-ink); font-size: .86rem; cursor: pointer; transition: .2s; }
.sl-themes button i { color: var(--sl-gold); }
.sl-themes button span { font-size: .7rem; padding: 0 .4rem; border-radius: 999px; background: var(--c-gold-soft, #f6ecd9); color: var(--c-gold-text, #7a5a1e); font-variant-numeric: tabular-nums; }
.sl-themes button:hover { border-color: var(--sl-gold); transform: translateY(-1px); }
.sl-themes button.is-active { background: linear-gradient(135deg, #0f3b30, #145a45); color: #fff; border-color: transparent; }
.sl-themes button.is-active i { color: var(--sl-gold-2); }
.sl-masonry { columns: 3 340px; column-gap: .9rem; }
.sl-masonry .sl-quote { margin-bottom: .9rem; }
.sl-masonry .sl-quote[hidden] { display: none; }
.sl-quote.is-flash { animation: sl-flash 1.6s ease; }
@keyframes sl-flash { 0%, 100% { box-shadow: 0 10px 30px -22px rgba(0,0,0,.35); } 30% { box-shadow: 0 0 0 4px var(--sl-gold); } }

/* ---------- Répertoire ---------- */
.sl-dir { scroll-margin-top: calc(var(--header-h, 72px) + 4.5rem); }
.sl-dir[hidden] { display: none; }
.sl-dir .sl-section-head h2 i { color: hsl(var(--h) 50% 38%); }
.sl-dir-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: .5rem; }
.sl-dir-list li[hidden] { display: none; }
.sl-dir-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main died" "ar badge"; gap: .2rem .8rem; padding: .7rem .9rem; border-radius: 14px; height: 100%;
  background: var(--sl-paper); border: 1px solid var(--sl-line); border-inline-start: 3px solid hsl(var(--h) 45% 45% / .55); text-decoration: none; color: var(--sl-ink); }
a.sl-dir-row { transition: border-color .2s, transform .2s; }
a.sl-dir-row:hover { border-color: var(--sl-gold); transform: translateY(-1px); color: var(--sl-ink); }
.sl-dir-main { grid-area: main; min-width: 0; display: grid; gap: .1rem; }
.sl-dir-main strong { color: var(--sl-head); font-size: .95rem; }
a.sl-dir-row .sl-dir-main strong { text-decoration: underline; text-decoration-color: var(--sl-gold); text-underline-offset: 3px; }
.sl-dir-main small { color: var(--sl-muted); font-size: .76rem; font-style: italic; }
.sl-dir-main em { font-style: normal; font-size: .78rem; color: hsl(var(--h) 45% 30%); }
.sl-dir-ar { grid-area: ar; font-size: 1.08rem; color: var(--c-green-text, #0f4d37); }
.sl-dir-died { grid-area: died; font-weight: 700; color: var(--c-gold-text, #7a5a1e); font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sl-dir-badge { grid-area: badge; align-self: end; display: inline-flex; gap: .25rem; align-items: center; font-size: .68rem; padding: .08rem .5rem; border-radius: 999px; background: #e3f5ea; color: #13724a; font-weight: 700; white-space: nowrap; }
.sl-dir-f { color: #8a5a8a; font-size: .8rem; }

/* ---------- Mode sombre (jetons du thème + ajustements des badges clairs) ---------- */
[data-bs-theme="dark"] .sl-src.is-quran .sl-src-type, html.dark .sl-src.is-quran .sl-src-type { background: rgba(19,107,71,.3); color: #8fe0b8; }
[data-bs-theme="dark"] .sl-src.is-hadith .sl-src-type, html.dark .sl-src.is-hadith .sl-src-type { background: rgba(58,74,160,.35); color: #b9c3ff; }
[data-bs-theme="dark"] .sl-src.is-athar .sl-src-type, html.dark .sl-src.is-athar .sl-src-type { background: rgba(138,90,16,.35); color: #f3cf8f; }
[data-bs-theme="dark"] .sl-src.is-book .sl-src-type, html.dark .sl-src.is-book .sl-src-type { background: rgba(255,255,255,.1); color: #ddd; }
[data-bs-theme="dark"] .sl-verified, [data-bs-theme="dark"] .sl-dir-badge, html.dark .sl-verified, html.dark .sl-dir-badge { background: rgba(19,114,74,.3); color: #8fe0b8; }
[data-bs-theme="dark"] .sl-chip, html.dark .sl-chip { color: hsl(var(--h) 55% 75%); }

/* ---------- Adaptation ---------- */
@media (max-width: 1180px) {
  .sl-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .sl-toc { position: static; max-height: none; grid-column: 1 / -1; }
  .sl-toc ol { display: flex; flex-wrap: wrap; gap: .3rem; }
}
@media (max-width: 980px) {
  .sl-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .sl-hero-hadith { transform: none; }
  .sl-gen-head { grid-template-columns: auto minmax(0, 1fr); }
  .sl-gen-intro { grid-column: 1 / -1; }
  .sl-layout { grid-template-columns: minmax(0, 1fr); }
  .sl-side { position: static; max-height: none; }
  .sl-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sl-page { padding-inline: 12px; gap: 1.2rem; }
  .sl-hero { border-radius: 22px; }
  .sl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sl-tabs { margin-top: -1.8rem; border-radius: 18px; }
  .sl-tabs a { padding: .5rem .75rem; font-size: .85rem; }
  .sl-person { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .sl-facts { grid-template-columns: minmax(0, 1fr); }
  .sl-chain { grid-template-columns: minmax(0, 1fr); }
  .sl-chain-self { justify-self: center; }
  .sl-pager { grid-template-columns: 1fr 1fr; }
  .sl-pager .is-back { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .sl-gen-num { width: 3.6rem; height: 3.6rem; }
  .sl-gen-num span { font-size: 1.6rem; }
  .sl-quote-actions { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) { .sl-page * { animation: none !important; transition: none !important; } }
@media print { .sl-tabs, .sl-toc, .sl-side, .sl-pager, .sl-quote-actions, .sl-search, .sl-gens { display: none !important; } .sl-hero { color: #000; background: none; box-shadow: none; } }
