/* Tasfiya Tarbia — feuille de style (charte : DESIGN.md). Mobile d'abord. */

/* ------------------------------------------------------------------ jetons */
:root {
	--reliure: #12392D;
	--reliure-2: #0D2C22;
	--ink: #16312A;
	--bg: #F6F0E5;
	--paper: #FFFAF0;
	--gold: #E9C686;
	--gold-ink: #86601F;
	--muted: #486158;
	--line: #D9DED3;
	--plank: #E4D6B8;
	--on-dark: #F6F0E5;
	--on-dark-2: #BFD0C5;
	--focus: #12392D;
	--c1: #12392D; --c2: #1D4A3B; --c3: #0F3A40; --c4: #3B3A22; --c5: #25402F; --k: #12392D; --f: #2C4234;
	--serif: 'Newsreader', 'Iowan Old Style', Georgia, 'Amiri', serif;
	--sans: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', 'Amiri', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--ar: 'Amiri', 'Traditional Arabic', serif;
	--wrap: 1180px;
	--r: 10px;
	--r-lg: 16px;
	color-scheme: light;
}
html.nuit {
	--reliure: #0B1F18;
	--reliure-2: #081812;
	--ink: #EDE6D6;
	--bg: #0F241D;
	--paper: #15302A;
	--gold-ink: #E9C686;
	--muted: #A9B8AE;
	--line: #284A3E;
	--plank: #2A4236;
	--focus: #E9C686;
	color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 86px; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font: 400 18px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.has-player { padding-bottom: 108px; }
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold-ink); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.site-header :focus-visible, .hero :focus-visible, .rub-hero :focus-visible, .book-hero :focus-visible, .deck :focus-visible, .player :focus-visible, .site-footer :focus-visible, .podcast-band :focus-visible { outline-color: var(--gold); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--reliure); padding: 10px 16px; border-radius: var(--r); font-weight: 700; }
.skip:focus { top: 12px; }
[lang="ar"] { font-family: var(--ar); font-weight: 400; letter-spacing: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.ti { font-size: 1.2em; line-height: 1; vertical-align: -0.15em; }
.empty { color: var(--muted); max-width: 60ch; }

/* ------------------------------------------------------------------ boutons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 20px; border-radius: var(--r); border: 1.5px solid transparent;
	font: 700 16px/1.2 var(--sans); text-decoration: none; white-space: nowrap;
	transition: background-color .15s, border-color .15s, color .15s;
}
.btn-gold { background: var(--gold); color: #12392D; }
.btn-gold:hover { background: #F2D59E; }
.btn-ink { background: var(--reliure); color: var(--on-dark); }
html.nuit .btn-ink { background: var(--gold); color: #12392D; }
.btn-ink:hover { background: var(--reliure-2); }
.btn-ghost { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold-ink); }
.btn-ghost[aria-pressed="true"], .btn-ghost.is-on { border-color: var(--gold-ink); color: var(--gold-ink); }
.btn-ghost-light { border-color: rgba(246, 240, 229, .35); color: var(--on-dark); background: transparent; }
.btn-ghost-light:hover { border-color: var(--gold); color: var(--gold); }
.icon-btn {
	display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
	border: 0; background: transparent; color: inherit;
}
.icon-btn:hover { background: rgba(246, 240, 229, .1); }
.icon-btn .ti { font-size: 24px; }
.chip {
	display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
	border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper);
	font-size: 15px; font-weight: 600; text-decoration: none;
}
.chip:hover { border-color: var(--gold-ink); }

/* ------------------------------------------------------------------ recherche */
.searchbar {
	display: flex; align-items: center; gap: 8px; max-width: 560px;
	background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 5px 5px 5px 14px;
}
.searchbar > .ti { color: var(--muted); font-size: 22px; flex: none; }
.searchbar input {
	flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
	font: 400 17px var(--sans); padding: 10px 4px; outline: none;
}
.searchbar input::placeholder { color: var(--muted); opacity: .85; }
.searchbar:focus-within { border-color: var(--gold-ink); box-shadow: 0 0 0 3px rgba(233, 198, 134, .35); }
.searchbar .btn { min-height: 44px; padding: 0 16px; }
.search-dark { background: #FFFAF0; border-color: transparent; }
.search-dark input { color: #16312A; }
.search-dark > .ti, .search-dark input::placeholder { color: #486158; }

/* ------------------------------------------------------------------ en-tête */
.site-header { background: var(--reliure); color: var(--on-dark); position: sticky; top: 0; z-index: 30; transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 8px 24px -14px rgba(0, 0, 0, .55); }
@media (min-width: 601px) { .admin-bar .site-header { top: 46px; } }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; margin-right: auto; }
.logo-mark { width: 44px; height: 41px; color: var(--gold); flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font: 600 21px/1.05 var(--serif); letter-spacing: .005em; }
.logo-ar { font-size: 15px; color: var(--gold); margin-top: 3px; text-align: left; }
.header-actions { display: flex; align-items: center; gap: 2px; }
[data-theme-toggle] .ti-sun, html.nuit [data-theme-toggle] .ti-moon { display: none; }
html.nuit [data-theme-toggle] .ti-sun { display: inline; }
.mainnav { display: none; }
.search-panel { background: var(--reliure-2); padding: 14px 0 18px; }
.search-panel .searchbar { max-width: none; }

@media (min-width: 960px) {
	.header-row { min-height: 78px; gap: 20px; }
	.burger { display: none; }
	.mainnav { display: block; }
	.mainnav > ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
	.mainnav > ul > li > a, .mainnav > ul > li > button {
		display: inline-flex; align-items: center; gap: 4px; min-height: 46px; padding: 0 14px;
		border: 0; background: none; color: var(--on-dark); font: 600 16.5px var(--sans); text-decoration: none; border-radius: var(--r);
	}
	.mainnav > ul > li > a:hover, .mainnav > ul > li > button:hover, .mainnav li.open > button { background: rgba(246, 240, 229, .1); }
	.mainnav .ti-chevron-down { transition: transform .2s; font-size: 18px; }
	.mainnav li.open .ti-chevron-down { transform: rotate(180deg); }
	.mega {
		position: absolute; left: 0; right: 0; top: 100%; background: var(--reliure-2); color: var(--on-dark);
		border-top: 1px solid rgba(233, 198, 134, .25); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .45);
		visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility 0s .18s;
	}
	.mainnav li.open .mega { visibility: visible; opacity: 1; transform: none; transition: opacity .18s, transform .18s; }
	.mega-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; padding-top: 28px; padding-bottom: 28px; }
	.mega-theme { font: 500 22px var(--serif); color: var(--gold); text-decoration: none; display: block; margin-bottom: 10px; }
	.mega ul { list-style: none; margin: 0; padding: 0; }
	.mega li a { display: block; padding: 6px 0; color: var(--on-dark-2); text-decoration: none; font-size: 15.5px; line-height: 1.35; }
	.mega li a:hover { color: var(--on-dark); text-decoration: underline; }
	.mega-foot { grid-column: 1 / -1; border-top: 1px solid rgba(246, 240, 229, .12); padding-top: 18px; }
}

/* ------------------------------------------------------------------ tiroir mobile */
.drawer {
	position: fixed; inset: 0; z-index: 60; background: var(--bg); color: var(--ink);
	overflow-y: auto; padding: 0 20px 40px;
}
.drawer[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; min-height: 70px; margin: 0 -20px 16px; padding: 0 20px; background: var(--reliure); color: var(--on-dark); }
.drawer .searchbar { margin-bottom: 12px; max-width: none; }
.drawer details { border-bottom: 1px solid var(--line); }
.drawer summary {
	display: flex; align-items: center; gap: 10px; min-height: 60px; list-style: none; cursor: pointer;
	font: 500 23px var(--serif);
}
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary .count { font: 600 14px var(--sans); color: var(--muted); }
.drawer summary .ti { margin-left: auto; transition: transform .2s; color: var(--muted); }
.drawer details[open] summary .ti { transform: rotate(180deg); }
.drawer details ul { list-style: none; margin: 0 0 14px; padding: 0; }
.drawer details li a { display: block; padding: 10px 0 10px 14px; border-left: 2px solid var(--line); text-decoration: none; font-size: 17px; }
.drawer details li:first-child a { font-weight: 700; }
.drawer-link { display: flex; align-items: center; min-height: 60px; border-bottom: 1px solid var(--line); font: 500 23px var(--serif); text-decoration: none; }
.drawer .socials { margin-top: 20px; }
.socials { display: flex; gap: 6px; }
.socials a { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 20px; text-decoration: none; }

/* ------------------------------------------------------------------ blocs */
.block { padding: 44px 0; }
.block-head { margin-bottom: 20px; max-width: 62ch; }
.block-head h2 { font-size: 30px; }
.block-head h2 a { text-decoration: none; }
.block-head h2 a:hover { text-decoration: underline; text-decoration-color: var(--gold-ink); }
.block-head p { color: var(--muted); margin: 6px 0 0; font-size: 17px; }
.more { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--gold-ink); text-decoration: underline; text-decoration-thickness: 1.5px; }
@media (min-width: 768px) {
	.block { padding: 64px 0; }
	.block-head h2 { font-size: 36px; }
}

/* ------------------------------------------------------------------ accueil : en-tête */
.hero { background: var(--reliure); color: var(--on-dark); padding: 28px 0 40px; overflow: hidden; }
.hero-grid { display: grid; gap: 28px; }
.hero-ar { font-size: clamp(54px, 15vw, 112px); line-height: 1.15; color: var(--gold); margin: 0 0 6px; text-align: left; }
.hero h1 { font-size: clamp(32px, 6.4vw, 54px); font-weight: 500; margin-bottom: 14px; }
.hero .lead { color: var(--on-dark-2); font-size: 18px; max-width: 46ch; margin-bottom: 22px; }
.hero .searchbar { background: #FFFAF0; border-color: transparent; }
.hero .searchbar input { color: #16312A; }
.hero .searchbar > .ti, .hero .searchbar input::placeholder { color: #486158; }
.now {
	align-self: end; background: var(--reliure-2); border: 1px solid rgba(233, 198, 134, .3);
	border-radius: var(--r-lg); padding: 22px;
}
.now-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; color: var(--gold); font-weight: 700; font-size: 15.5px; margin-bottom: 10px; }
.now-date { color: var(--on-dark-2); font-weight: 400; font-size: 15px; }
.now h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; margin-bottom: 8px; }
.now-meta { color: var(--on-dark-2); font-size: 16px; margin-bottom: 0; }
.now-meta a { color: inherit; }
.now-actions { display: flex; align-items: center; gap: 18px; }
.now-act-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.now-link { color: var(--on-dark); font-weight: 700; font-size: 17px; }
.now-time { color: var(--on-dark-2); font-size: 15px; }
/* l'onde : une barre par tranche de l'audio, dorée une fois écoutée */
.now-wave { display: flex; align-items: center; gap: 2px; height: 64px; margin: 20px 0 22px; }
.now-wave span { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--gold); opacity: .38; transition: opacity .2s; transform-origin: center; }
.now-wave span.on { opacity: 1; }
.now.is-playing .now-wave span { animation: onde 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -83ms); }
@keyframes onde { from { transform: scaleY(.7); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .now.is-playing .now-wave span { animation: none; } }
@media (min-width: 600px) { .now-wave { gap: 3px; height: 84px; margin: 26px 0 28px; } }
.now .bar { height: 4px; border-radius: 2px; background: rgba(246, 240, 229, .18); margin: -6px 0 16px; overflow: hidden; }
.now .bar i { display: block; height: 100%; background: var(--gold); }
.play-xl {
	display: inline-grid; place-items: center; width: 66px; height: 66px; flex: none; border-radius: 50%;
	border: 0; background: var(--gold); color: #12392D; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .5);
	transition: transform .12s;
}
.play-xl .ti { font-size: 28px; }
.play-xl:active { transform: scale(.96); }
@media (min-width: 900px) {
	.hero { padding: 56px 0 72px; }
	.hero-grid { grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
	.hero-ar { margin-bottom: 0; }
}

/* ------------------------------------------------------------------ étagère et livres */
.shelf-row { margin-bottom: 40px; }
.shelf-row:last-child { margin-bottom: 0; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 14px; }
.shelf-head h3, .shelf-head h2 { font-size: 26px; }
.shelf-head a { text-decoration: none; }
.shelf-head a:hover { text-decoration: underline; text-decoration-color: var(--gold-ink); }
.shelf-head p { color: var(--muted); margin: 0; font-size: 16px; flex: 1 1 280px; }
.shelf {
	list-style: none; margin: 0 -20px; padding: 6px 20px 22px;
	display: grid; grid-auto-flow: column; grid-auto-columns: 136px; gap: 18px;
	overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
	background: linear-gradient(to bottom, transparent calc(100% - 12px), var(--plank) calc(100% - 12px), var(--plank) calc(100% - 4px), transparent calc(100% - 4px));
	background-size: 100% 100%;
}
.shelf > * { scroll-snap-align: start; }
@media (min-width: 768px) {
	.shelf { grid-auto-columns: 158px; gap: 24px; margin: 0; padding: 6px 0 24px; }
	.shelf-wrap { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); overflow: visible; background: none; row-gap: 36px; }
}
.book a { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.cover {
	position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 3px 9px 9px 3px;
	background: var(--c1); color: var(--on-dark);
	box-shadow: inset 7px 0 0 rgba(0, 0, 0, .22), inset 8px 0 0 rgba(255, 255, 255, .07), 0 10px 18px -10px rgba(13, 44, 34, .65);
	transition: transform .18s ease;
}
.cover.c2 { background: var(--c2); } .cover.c3 { background: var(--c3); } .cover.c4 { background: var(--c4); }
.cover.c5 { background: var(--c5); } .cover.k { background: var(--k); } .cover.f { background: var(--f); }
.cover::after { /* tranchefile et usure légère */
	content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
	background: linear-gradient(100deg, rgba(255, 255, 255, .06), transparent 30%, transparent 70%, rgba(0, 0, 0, .12));
}
.cover-frame {
	position: absolute; inset: 9px 9px 9px 16px; border: 1px solid rgba(233, 198, 134, .55); border-radius: 2px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 8px; text-align: center;
}
.cover-frame::before, .cover-frame::after {
	content: ''; position: absolute; left: 50%; width: 7px; height: 7px; background: var(--gold); transform: translateX(-50%) rotate(45deg);
}
.cover-frame::before { top: -4px; } .cover-frame::after { bottom: -4px; }
.cover-ar { font-family: var(--ar); color: var(--gold); font-size: 19px; line-height: 1.5; }
.cover-title { font: 500 14.5px/1.22 var(--serif); color: var(--on-dark); hyphens: auto; overflow-wrap: anywhere; }
.cover-orn { width: 34px; height: 1px; background: rgba(233, 198, 134, .7); }
.book a:hover .cover { transform: translateY(-4px); }
.book-name { font-weight: 700; font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: 14px; line-height: 1.35; margin-top: -6px; }
.book-progress { color: var(--gold-ink); font-weight: 700; }
.book-lg { width: 190px; }
.book-lg .cover-ar { font-size: 28px; }
.book-lg .cover-title { font-size: 19px; }
.book-lg .book-name, .book-lg .book-meta { display: none; }
.book-sm .cover-ar { font-size: 15px; }
.book-sm .cover-title { font-size: 12.5px; }
.book-sm .book-name { font-size: 14px; }
.shelf-small { grid-auto-columns: 112px; gap: 14px; }

/* ------------------------------------------------------------------ lignes de leçon */
.episodes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ep {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
	padding: 14px 0; border-bottom: 1px solid var(--line);
}
.toc-list .ep, [data-aside-list].episodes .ep { grid-template-columns: 2.1em auto 1fr auto; }
.ep-num { font: 500 19px var(--serif); color: var(--muted); text-align: right; }
.ep-play {
	display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
	border: 1.5px solid var(--reliure); background: transparent; color: var(--reliure); flex: none;
}
html.nuit .ep-play { border-color: var(--gold); color: var(--gold); }
.ep-play .ti { font-size: 20px; }
.ep-play:hover, .ep.playing .ep-play { background: var(--reliure); color: var(--gold); }
html.nuit .ep-play:hover, html.nuit .ep.playing .ep-play { background: var(--gold); color: #12392D; }
.ep-body { min-width: 0; }
.ep-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; font-size: 17px; line-height: 1.35; text-decoration: none; }
.ep-title:hover { text-decoration: underline; text-decoration-color: var(--gold-ink); }
.ep.playing .ep-title { color: var(--gold-ink); }
.ep-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin-top: 3px; font-size: 14.5px; color: var(--muted); }
.ep-rub { color: inherit; text-decoration: none; }
.ep-rub:hover { text-decoration: underline; }
.ep-meta .ti { font-size: 15px; }
.ep-done-label { display: none; color: var(--gold-ink); font-weight: 700; }
.ep.done .ep-done-label { display: inline; }
.ep.done .ep-num { color: var(--gold-ink); }
.ep-actions { display: flex; align-items: center; }
.ep-actions a, .ep-actions button {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	border: 0; background: transparent; color: var(--muted); text-decoration: none;
}
.ep-actions a:hover, .ep-actions button:hover { color: var(--ink); background: rgba(18, 57, 45, .07); }
.ep-actions [aria-pressed="true"] { color: var(--gold-ink); }
.episodes.compact .ep { gap: 10px; padding: 9px 0; }
.episodes.compact .ep-play { width: 38px; height: 38px; }
.episodes.compact .ep-play .ti { font-size: 16px; }
.episodes.compact .ep-title { font-size: 15px; font-weight: 600; }
.episodes.compact .ep-meta { font-size: 13.5px; margin-top: 1px; }
.episodes.compact .ep-num { font-size: 16px; }
.episodes.compact .ep.current { background: linear-gradient(90deg, rgba(233, 198, 134, .22), transparent); }
@media (max-width: 519px) {
	.hide-xs { display: none !important; }
	.ep { gap: 12px; }
	.toc-list .ep { grid-template-columns: 1.7em auto 1fr auto; }
}

/* ------------------------------------------------------------------ en-têtes de rubrique et de livre */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 14px 0; font-size: 15px; color: var(--muted); }
.crumbs a { color: inherit; }
.crumbs .ti { font-size: 14px; opacity: .7; }
.rub-hero, .book-hero { background: var(--reliure); color: var(--on-dark); padding: 34px 0 40px; }
.rub-hero h1, .book-hero h1 { font-size: clamp(32px, 6vw, 50px); margin-bottom: 12px; }
.rub-hero .lead, .book-hero .lead { color: var(--on-dark-2); max-width: 58ch; font-size: 18px; }
.rub-ar, .book-ar { font-size: clamp(30px, 7vw, 46px); color: var(--gold); margin: 0 0 4px; line-height: 1.4; text-align: left; }
.rub-facts { color: var(--gold); font-weight: 700; margin: 0; }
.rub-hero .searchbar { margin-top: 8px; }
.rub-hero .book-actions { margin-top: 18px; }
.book-hero-grid { display: grid; gap: 26px; justify-items: start; }
.book-hero-cover .book-lg { width: 150px; }
.book-author { font: italic 500 20px var(--serif); color: var(--on-dark-2); margin: -4px 0 12px; }
.book-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--gold); font-weight: 700; margin-bottom: 14px; }
.book-progress-bar { max-width: 420px; margin: 4px 0 18px; }
.book-progress-bar .bar { height: 6px; border-radius: 3px; background: rgba(246, 240, 229, .16); overflow: hidden; }
.book-progress-bar .bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.book-progress-bar p { margin: 6px 0 0; font-size: 15px; color: var(--on-dark-2); }
.book-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 768px) {
	.rub-hero, .book-hero { padding: 48px 0 56px; }
	.book-hero-grid { grid-template-columns: auto 1fr; gap: 48px; align-items: center; }
	.book-hero-cover .book-lg { width: 210px; }
}
.toc-grid { display: grid; gap: 40px; }
.toc-aside h2 { font-size: 22px; margin-bottom: 14px; }
@media (min-width: 1000px) {
	.toc-grid { grid-template-columns: 1fr 300px; gap: 56px; }
	.toc-aside .shelf-small { grid-auto-flow: row; grid-template-columns: 1fr 1fr; background: none; padding: 0; overflow: visible; }
}

/* ------------------------------------------------------------------ page de leçon */
.lesson { padding-bottom: 48px; }
.lesson-grid { display: grid; gap: 36px; }
.lesson-kicker { display: flex; flex-wrap: wrap; gap: 4px 12px; font-weight: 700; color: var(--gold-ink); margin: 6px 0 10px; font-size: 16px; }
.lesson-kicker a { color: var(--muted); font-weight: 400; }
.lesson h1 { font-size: clamp(28px, 5.4vw, 42px); margin-bottom: 22px; }
.deck {
	position: relative; overflow: hidden; background: var(--c1); color: var(--on-dark);
	border-radius: var(--r-lg); padding: 22px 20px 18px;
}
.deck.c2 { background: var(--c2); } .deck.c3 { background: var(--c3); } .deck.c4 { background: var(--c4); } .deck.c5 { background: var(--c5); } .deck.f { background: var(--f); }
.deck-ar { position: absolute; right: -6px; bottom: -18px; font-size: 88px; line-height: 1; color: var(--gold); opacity: .12; pointer-events: none; white-space: nowrap; }
.deck-row { position: relative; display: flex; align-items: center; gap: 16px; }
.deck-info { display: flex; flex-direction: column; min-width: 0; }
.deck-info strong { font-size: 18px; }
.deck-info span { color: var(--on-dark-2); font-size: 15px; }
.scrub { position: relative; height: 8px; margin: 22px 0 8px; border-radius: 4px; background: rgba(246, 240, 229, .2); cursor: pointer; touch-action: none; }
.scrub::before { content: ''; position: absolute; inset: -12px 0; }
.scrub i { display: block; height: 100%; border-radius: 4px; background: var(--gold); }
.deck-time { position: relative; display: flex; justify-content: space-between; font-size: 14.5px; color: var(--on-dark-2); }
.speeds { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.speeds button { min-height: 38px; min-width: 52px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(246, 240, 229, .3); background: transparent; color: var(--on-dark); font-weight: 700; font-size: 14.5px; }
.speeds button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #12392D; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 16px; }
.lesson-actions .btn { flex: 1 1 auto; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 26px; }
.share-row > span { color: var(--muted); font-size: 15px; margin-right: 2px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 26px; }
.pn a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--paper); text-decoration: none; }
.pn a:hover { border-color: var(--gold-ink); }
.pn span { color: var(--muted); font-size: 14px; font-weight: 700; }
.pn strong { font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn-next { text-align: right; grid-column: 2; }
.lesson-stats { color: var(--muted); font-size: 15px; }
.aside-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 16px 8px; }
.aside-card h2 { font-size: 24px; }
.aside-sub { margin: 2px 0 12px; font-size: 15px; color: var(--muted); }
@media (min-width: 1000px) {
	.lesson-grid { grid-template-columns: 1fr 360px; gap: 56px; align-items: start; }
	.lesson-aside { position: sticky; top: 86px; }
	.aside-card { max-height: calc(100vh - 120px); overflow-y: auto; overscroll-behavior: contain; }
	.deck { padding: 26px 28px 22px; }
}

/* ------------------------------------------------------------------ accueil : habillage oriental (en-tête, carte « Dernier audio ajouté », « Ajoutés récemment ») */
/* frise d'étoiles à huit branches (khatam) et de losanges, à peine visible */
:root { --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' fill='none' stroke='%23E9C686' stroke-width='1' opacity='.13'%3E%3Cpath d='M30 17l3.8 3.8h5.4v5.4L43 30l-3.8 3.8v5.4h-5.4L30 43l-3.8-3.8h-5.4v-5.4L17 30l3.8-3.8v-5.4h5.4zM0-13l3.8 3.8h5.4v5.4L13 0 9.2 3.8v5.4H3.8L0 13l-3.8-3.8h-5.4V3.8L-13 0l3.8-3.8v-5.4h5.4zM60-13l3.8 3.8h5.4v5.4L73 0l-3.8 3.8v5.4h-5.4L60 13l-3.8-3.8h-5.4V3.8L47 0l3.8-3.8v-5.4h5.4zM0 47l3.8 3.8h5.4v5.4L13 60l-3.8 3.8v5.4H3.8L0 73l-3.8-3.8h-5.4v-5.4L-13 60l3.8-3.8v-5.4h5.4zM60 47l3.8 3.8h5.4v5.4L73 60l-3.8 3.8v5.4h-5.4L60 73l-3.8-3.8h-5.4v-5.4L47 60l3.8-3.8v-5.4h5.4zM30-5l5 5-5 5-5-5zM30 55l5 5-5 5-5-5zM0 25l5 5-5 5-5-5zM60 25l5 5-5 5-5-5z'/%3E%3C/svg%3E"); }
.hero { background-image: var(--motif); background-size: 60px 60px; background-position: center top; }
.recent { padding-bottom: 8px; }
.recent-panel {
	--frame-bg: var(--reliure);
	position: relative; isolation: isolate; overflow: hidden;
	background-color: var(--reliure); color: var(--on-dark);
	background-image: var(--motif); background-size: 60px 60px; background-position: center top;
	border-radius: var(--r-lg); padding: 34px 18px 18px;
	box-shadow: 0 18px 40px -26px rgba(13, 44, 34, .8);
}
.now { --frame-bg: var(--reliure-2); position: relative; isolation: isolate; padding: 32px 26px 26px; box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .7); }
/* double filet doré, comme un cadre d'enluminure, avec un losange au milieu du haut */
.recent-panel::before, .now::before {
	content: ''; position: absolute; inset: 8px; z-index: -1; pointer-events: none;
	border: 1px solid rgba(233, 198, 134, .5); border-radius: 10px;
	box-shadow: inset 0 0 0 3px var(--frame-bg), inset 0 0 0 4px rgba(233, 198, 134, .22);
}
.recent-panel::after, .now::after {
	content: ''; position: absolute; left: 50%; top: 4px; width: 9px; height: 9px; background: var(--gold);
	transform: translateX(-50%) rotate(45deg); pointer-events: none;
}
.recent-head { position: relative; text-align: center; margin: 0 auto 18px; max-width: 46ch; }
.recent-head h2 { font-size: clamp(28px, 5vw, 38px); color: var(--on-dark); }
.recent-head p { color: var(--on-dark-2); font-size: 16.5px; margin: 6px 0 0; }
/* grand bouton lecture de la carte : un rond doré plein */
.now .play-xl { width: 84px; height: 84px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); transition: transform .12s, background-color .15s; }
.now .play-xl:hover { background: #F1D6A3; }
.now .play-xl .ti { font-size: 32px; }
@media (min-width: 900px) { .now { align-self: center; padding: 42px 42px 36px; } }
/* les lignes, en clair sur le vert */
.recent-list { border-top: 0; position: relative; }
.recent-list .ep { border-bottom-color: rgba(233, 198, 134, .2); padding: 13px 0; }
.recent-list .ep-title { color: var(--on-dark); }
.recent-list .ep.playing .ep-title, .recent-list .ep-title:hover { color: var(--gold); text-decoration-color: var(--gold); }
.recent-list .ep-meta { color: var(--on-dark-2); }
.recent-list .ep-date { color: var(--gold); font-weight: 700; }
.recent-list .ep-done-label, .recent-list .ep-actions [aria-pressed="true"] { color: var(--gold); }
.recent-list .ep-actions a, .recent-list .ep-actions button { color: var(--on-dark-2); }
.recent-list .ep-actions a:hover, .recent-list .ep-actions button:hover { color: var(--gold); background: rgba(246, 240, 229, .08); }
.recent :focus-visible { outline-color: var(--gold); }
/* bouton lecture : un rond cerclé d'or, plein au survol et pendant l'écoute */
.recent-list .ep-play, html.nuit .recent-list .ep-play { width: 50px; height: 50px; border-color: var(--gold); background: transparent; color: var(--gold); }
.recent-list .ep-play:hover, .recent-list .ep.playing .ep-play,
html.nuit .recent-list .ep-play:hover, html.nuit .recent-list .ep.playing .ep-play { background: var(--gold); color: #12392D; }
@media (min-width: 768px) {
	.recent-panel { padding: 46px 40px 26px; }
	.recent-panel::before { inset: 10px; }
	.recent-panel::after { top: 6px; }
	.recent-head { margin-bottom: 24px; }
}
@media (min-width: 1000px) {
	/* deux colonnes, lues de haut en bas : les plus récentes à gauche */
	.recent-list { columns: 2; column-gap: 56px; }
	.recent-list .ep { break-inside: avoid; }
}

/* ------------------------------------------------------------------ accueil : sections */
.duo-grid { display: grid; gap: 44px; }
@media (min-width: 900px) { .duo-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
.podcast-band {
	display: grid; gap: 22px; background: var(--reliure); color: var(--on-dark);
	border-radius: var(--r-lg); padding: 26px 22px;
}
.podcast-band h2 { font-size: 28px; margin-bottom: 8px; }
.podcast-band p { color: var(--on-dark-2); margin: 0; max-width: 46ch; }
.pod-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(246, 240, 229, .14); }
.pod-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 12px 0; border-bottom: 1px solid rgba(246, 240, 229, .14); }
.pod-name strong { display: block; font-size: 16.5px; }
.pod-name span { color: var(--on-dark-2); font-size: 14.5px; }
.pod-links { display: flex; gap: 8px; }
.pod-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(246, 240, 229, .3); text-decoration: none; font-weight: 700; font-size: 14.5px; }
.pod-links a:hover { border-color: var(--gold); color: var(--gold); }
.podcast-band .btn { justify-self: start; }
@media (min-width: 900px) {
	.podcast-band { grid-template-columns: 1fr 1.3fr; padding: 40px 44px; column-gap: 56px; }
	.podcast-band .btn { grid-column: 1; grid-row: 2; align-self: start; }
	.pod-list { grid-column: 2; grid-row: 1 / span 2; }
}
.why-grid { display: grid; gap: 10px; }
.why-ar { font-size: 64px; line-height: 1.3; color: var(--gold-ink); opacity: .55; margin: 0; text-align: left; }
@media (min-width: 900px) {
	.why-grid { grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: center; }
	.why-ar { font-size: 104px; text-align: right; }
}

/* ------------------------------------------------------------------ textes */
.prose { max-width: 68ch; }
.prose h2 { font-size: 30px; margin: 1.4em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 23px; margin: 1.3em 0 .4em; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); font: italic 500 21px/1.55 var(--serif); }
.prose a { color: var(--gold-ink); text-decoration-thickness: 1.5px; }
.about-rub { padding: 8px 0 56px; }
.about-rub h2 { font-size: 26px; }
.page-prose { padding-bottom: 20px; }

/* ------------------------------------------------------------------ pagination */
.pager .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pager .page-numbers { display: inline-grid; place-items: center; min-width: 46px; min-height: 46px; padding: 0 12px; border-radius: var(--r); border: 1.5px solid var(--line); text-decoration: none; font-weight: 700; background: var(--paper); }
.pager .page-numbers.current { background: var(--reliure); color: var(--on-dark); border-color: var(--reliure); }

/* ------------------------------------------------------------------ pied de page */
.site-footer { background: var(--reliure-2); color: var(--on-dark-2); padding: 48px 0 28px; font-size: 16px; }
.site-footer .brand { color: var(--on-dark); margin-bottom: 14px; }
.footer-grid { display: grid; gap: 30px; }
.footer-brand p { max-width: 36ch; }
.site-footer h2 { font: 700 15px var(--sans); color: var(--gold); margin-bottom: 10px; letter-spacing: .01em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; color: var(--on-dark); }
.site-footer li a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(246, 240, 229, .12); font-size: 14.5px; }
.footer-legal [lang="ar"] { color: var(--gold); font-size: 18px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; } }

/* ------------------------------------------------------------------ lecteur fixe */
.player {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--reliure-2); color: var(--on-dark);
	box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .6); transform: translateY(110%); transition: transform .25s ease;
	padding-bottom: env(safe-area-inset-bottom);
}
.player.show { transform: none; }
.player-seek { display: flex; align-items: center; gap: 12px; padding-top: 10px; }
.player-seek .num { font-size: 13.5px; color: var(--on-dark-2); min-width: 44px; font-variant-numeric: tabular-nums; }
.player-seek .num:last-child { text-align: right; }
.player-range {
	--p: 0%; flex: 1; height: 28px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none;
	touch-action: none;
}
.player-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--gold) var(--p), rgba(246, 240, 229, .2) var(--p)); }
.player-range::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(246, 240, 229, .2); }
.player-range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--gold); }
.player-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--gold); border: 3px solid var(--reliure-2); box-shadow: 0 0 0 1px var(--gold); }
.player-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 3px solid var(--reliure-2); box-shadow: 0 0 0 1px var(--gold); }
.player-range:disabled { cursor: default; opacity: .5; }
.player-range:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.player .player-bar { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.player-main { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--gold); color: #12392D; flex: none; }
.player-main .ti { font-size: 24px; }
.player-info { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.player-info a, .player-info strong { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--on-dark); text-decoration: none; }
.player-info span { color: var(--on-dark-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-ctrls { display: flex; align-items: center; gap: 2px; }
.player-ctrls button { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 22px; border: 0; background: transparent; color: var(--on-dark); font-weight: 700; font-size: 15px; }
.player-ctrls button:hover { background: rgba(246, 240, 229, .1); }
.player-ctrls .ti { font-size: 22px; }
@media (max-width: 599px) { .player .opt { display: none; } }

/* ------------------------------------------------------------------ retour en haut */
.to-top {
	position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 45; display: grid; place-items: center;
	width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(233, 198, 134, .45); background: var(--reliure); color: var(--gold);
	box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .6); cursor: pointer;
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s, bottom .25s;
}
.to-top .ti { font-size: 24px; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--reliure-2); }
.to-top:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
body.has-player .to-top { bottom: calc(134px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .to-top, .site-header { transition: none; } }

/* ------------------------------------------------------------------ messages */
.toast {
	position: fixed; left: 50%; bottom: 100px; z-index: 70; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--r); font-weight: 700; font-size: 15.5px;
	transition: opacity .2s, transform .2s; max-width: calc(100% - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ formulaire de contact */
.contact-sec { margin: 28px 0; padding: 24px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
.contact-sec h2 { margin-top: 0; }
.contact-form label { display: block; font-weight: 700; margin-bottom: 6px; }
.contact-form input, .contact-form textarea {
	width: 100%; font: 400 17px var(--sans); color: var(--ink); background: var(--bg);
	border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 14px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--gold-ink); box-shadow: 0 0 0 3px rgba(233, 198, 134, .35); }
.cf-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .cf-row { grid-template-columns: 1fr 1fr; } }
.cf-piege { position: absolute; left: -9999px; }
.contact-msg { padding: 12px 16px; border-radius: var(--r); margin-bottom: 14px; font-weight: 700; }
.contact-msg.ok { background: #E3EEE3; color: #1F4D2B; }
.contact-msg.err { background: #F6E3DA; color: #7A2E14; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------------ bandeau de consentement (ga-consent.js) */
html #ga-consent { background: var(--reliure-2); color: var(--on-dark); border: 1px solid rgba(233, 198, 134, .3); border-radius: var(--r-lg); font-family: var(--sans); font-size: 15.5px; bottom: 96px; }
html #ga-consent button { border-radius: var(--r); min-height: 44px; font-weight: 700; }
html #ga-consent button[data-c="yes"] { background: var(--gold); color: #12392D; border-color: var(--gold); }

/* ------------------------------------------------------------------ mouvement réduit */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ correctifs de mise en page (vérifiés sur 375 px) */
.searchbar input { width: 0; }
.hero-grid > *, .book-hero-grid > *, .lesson-grid > *, .toc-grid > *, .duo-grid > *, .footer-grid > *, .why-grid > * { min-width: 0; }
.logo-name { white-space: nowrap; }
.hero-ar { white-space: nowrap; font-size: clamp(50px, 14vw, 92px); }
.book-hero .cover { box-shadow: inset 7px 0 0 rgba(0, 0, 0, .25), inset 8px 0 0 rgba(255, 255, 255, .07), 0 0 0 1px rgba(233, 198, 134, .28), 0 24px 40px -18px rgba(0, 0, 0, .7); background-image: linear-gradient(160deg, rgba(255, 255, 255, .07), transparent 55%); }
@media (max-width: 420px) {
	.logo-name { font-size: 19px; }
	.logo-mark { width: 38px; height: 35px; }
	.brand { gap: 9px; }
	.icon-btn { width: 44px; height: 44px; }
	.header-row { gap: 6px; }
	.searchbar .btn { padding: 0 12px; }
	.now { padding: 18px; }
	.now h2 { font-size: 22px; }
}
@media (max-width: 767px) {
	.book-hero-grid { grid-template-columns: auto 1fr; align-items: end; gap: 18px; }
	.book-hero-cover .book-lg { width: 112px; }
	.book-hero-cover .book-lg .cover-ar { font-size: 17px; }
	.book-hero-cover .book-lg .cover-title { font-size: 13px; }
	.book-hero-text { grid-column: 1 / -1; }
}
