/* Diiwaanu Xassida Yi — feuille unique, mobile first, sans dépendance externe. */

/* Amiri sert uniquement à l’arabe : le français utilise une police système
   qui gère correctement è, é, ï, â, ç… sans sous-ensemble latin-ext fragile. */
@font-face {
  font-family: "Amiri Site";
  src: url("../fonts/AmiriQuran-Regular.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --night: #0B1E15;
  --night-2: #07130D;
  --green: #0E6B40;
  --green-2: #12563A;
  --deep: #083A24;
  --gold: #C99A2E;
  --gold-dark: #8A6414;
  --gold-light: #F7E6A8;
  --paper: #F5F6EF;
  --paper-2: #FFFDF7;
  --ink: #14241B;
  --muted: #44564C;
  --line: rgba(14, 107, 64, .20);
  --gold-line: rgba(201, 154, 46, .42);
  --shadow: 0 16px 36px rgba(8, 58, 36, .10);
  --radius: 18px;
  --tap: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: 8px;
}

h1, h2, h3, h4, .serif {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -.015em;
}

.wrap {
  width: min(100% - 28px, 1120px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--gold-light);
  color: var(--night);
  font-weight: 700;
}
.skip-link:focus { left: 14px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- En-tête et menu ---------- */

.site-header {
  position: relative;
  overflow: hidden;
  color: #F7F4E9;
  background:
    radial-gradient(circle at 88% 0%, rgba(201,154,46,.20), transparent 42%),
    linear-gradient(155deg, var(--night), var(--green-2) 70%, var(--night-2));
}
.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.site-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  text-decoration: none;
}
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--gold-line);
}
.brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 700;
  color: #FFF7E2;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: rgba(7, 19, 13, .45);
  color: var(--gold-light);
  font-size: 1.35rem;
  line-height: 1;
}
.menu-toggle .menu-label {
  font-size: 1rem;
  font-weight: 700;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 12, 8, .62);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.menu-backdrop.is-open { opacity: 1; visibility: visible; }

.menu-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 41;
  width: min(330px, 88vw);
  height: 100dvh;
  overflow-y: auto;
  padding: 20px;
  background: var(--night-2);
  border-left: 1px solid var(--gold-line);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .22s ease, visibility .22s ease;
}
.menu-panel.is-open { transform: none; visibility: visible; }
.menu-sub {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 6px 0 4px;
  padding: 4px 0 4px 12px;
  border-left: 1px solid var(--gold-line);
}
.menu-sub li + li { margin-top: 2px; }
.menu-sub a {
  display: block;
  padding: 6px 4px;
  color: var(--gold-light);
  font-size: .98rem;
}

.menu-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.menu-panel-head strong {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--gold-light);
  font-size: 1.05rem;
}
.menu-close {
  min-width: var(--tap);
  min-height: var(--tap);
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  background: transparent;
  color: var(--gold-light);
  font-size: 1.4rem;
  line-height: 1;
}
.menu-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.menu-panel a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid rgba(247,230,168,.22);
  border-radius: 12px;
  color: #F7F4E9;
  text-decoration: none;
  font-weight: 700;
}
.menu-panel a:hover, .menu-panel a[aria-current="page"] {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(201,154,46,.10);
}
.menu-note {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(247,230,168,.22);
  color: #E3D9BC;
  font-size: 1rem;
}

.noscript-nav {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 0;
  color: var(--gold-light);
}
body.menu-open { overflow: hidden; }

/* ---------- Accueil ---------- */

.hero {
  position: relative;
  z-index: 1;
  padding: 18px 0 46px;
}
.hero-grid {
  display: grid;
  gap: 18px;
  align-items: center;
}

.hero-portrait {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.portrait-frame {
  position: relative;
  width: clamp(176px, 48vw, 232px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(247,230,168,.22), transparent 62%), var(--night);
  box-shadow: 0 18px 42px rgba(0,0,0,.38);
}
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(7,19,13,.55), 0 0 0 1px rgba(247,230,168,.28);
  pointer-events: none;
}
.portrait-frame img {
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-light);
}
.portrait-caption {
  margin: 8px 0 0;
  color: var(--gold-light);
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 12px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 700;
}
.hero h1 {
  margin: 0;
  color: #FFF9EA;
  font-size: clamp(2.35rem, 10.5vw, 3.6rem);
  line-height: 1.02;
}
.hero h1 span { display: block; color: var(--gold-light); }
.hero .lead {
  margin: 12px 0 8px;
  max-width: 34ch;
  color: #F1EEE2;
  font-size: 1.05rem;
  font-weight: 600;
}
.nonprofit {
  margin: 0 0 18px;
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 700;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
  margin-top: 18px;
}
.hero-actions .btn { width: 100%; }
.play-version { margin: 8px 0 0; color: #E5D9B4; font-size: 1rem; }

@media (min-width: 480px) {
  .hero-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  color: #14210F;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 10px 24px rgba(201,154,46,.22);
}
/* Bouton or « contourné » : texte foncé sur fond clair par défaut,
   puis variante sur le fond sombre du héros. */
.btn-gold-outline {
  color: var(--deep);
  border-color: var(--gold);
  background: #FFFDF5;
  box-shadow: inset 0 0 0 1px rgba(201,154,46,.28);
}
.btn-gold-outline:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 10px 24px rgba(201,154,46,.22);
}
.hero-actions .btn-gold-outline {
  color: var(--gold-light);
  background: rgba(7,19,13,.32);
  box-shadow: inset 0 0 0 1px rgba(247,230,168,.12);
}
.hero-actions .btn-gold-outline:hover {
  color: #14210F;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}
.btn-ghost {
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(7,19,13,.28);
}
.btn-light {
  color: var(--deep);
  border-color: var(--line);
  background: #FFF;
}

.langues {
  margin: 18px 0 0;
  padding-left: 12px;
  border-left: 2px solid rgba(247,230,168,.44);
  color: #E3D9BC;
  font-size: 1rem;
}
.langues p { margin: 0 0 4px; }
.langues p:last-child { margin-bottom: 0; }
.langues b {
  display: inline-block;
  min-width: 72px;
  color: var(--gold-light);
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ornament {
  margin: 22px 0 0;
  color: var(--gold-light);
  letter-spacing: .5em;
  font-size: 1rem;
}
.ornament-strip { margin: 16px 0 18px; color: var(--gold-light); letter-spacing: .4em; }

.phone-stage {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.phone {
  display: block;
  position: relative;
  width: min(272px, 78vw);
  aspect-ratio: 9 / 19.5;
  padding: 8px;
  border: 9px solid #06110B;
  border-radius: 34px;
  background: #0C1F16;
  box-shadow: 0 24px 56px rgba(0,0,0,.42), inset 0 0 0 1px rgba(247,230,168,.28);
}
.phone::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 50%;
  width: 74px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #06110B;
}
.phone img {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
  background: #07130D;
}
.phone-caption { color: var(--gold-light); font-size: 1rem; font-weight: 700; }

/* ---------- Sections ---------- */

section { padding: 52px 0; }
.section-head { max-width: 720px; margin-bottom: 24px; }
.section-head .kicker {
  color: var(--gold-dark);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.section-head h2 {
  margin: 6px 0 10px;
  color: var(--deep);
  font-size: clamp(1.9rem, 6vw, 2.7rem);
  line-height: 1.12;
}
.section-head p { margin: 0; color: var(--muted); }
.section-head small { display: block; margin-top: 10px; color: var(--muted); }

.card-grid, .features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #FFF;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; color: var(--deep); font-size: 1.22rem; }
.card p { margin: 0; color: var(--muted); }
.card .btn { margin-top: 14px; }
.card-index {
  color: var(--gold-dark);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.card .mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  margin-bottom: 14px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--green), var(--deep));
  color: var(--gold-light);
  font-size: 1.1rem;
  font-weight: 800;
}
.rubrique-grid .card p + p { margin-top: 8px; }
.notice, .note { margin-top: 18px; color: var(--muted); font-size: 1rem; }
.notice a, .note-links a { color: var(--green); font-weight: 700; }
.note-links { margin-top: 12px; color: var(--muted); font-size: 1rem; }

/* ---------- Galerie ---------- */

.shots-section { background: #FFF; border-block: 1px solid var(--line); }
.phone-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--gold) transparent;
}
.phone-strip figure {
  flex: 0 0 min(260px, 78vw);
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}
.phone-strip a { display: block; }
.phone-strip figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}
.phone-strip .phone { width: 100%; }
.zoom-hint { margin-top: 8px; color: var(--gold-dark); font-size: 1rem; font-weight: 700; }

/* ---------- FAQ, formulaire, contact ---------- */

.faq { background: #FFF; }
.faq-list { display: grid; gap: 12px; max-width: 820px; }
.faq details {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 14px;
  background: var(--paper-2);
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--deep); }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.faq details a { color: var(--green); font-weight: 700; }

.notify {
  padding: 24px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: var(--paper-2);
}
.notify h3 { margin: 0 0 8px; color: var(--deep); }
.notify p, .notify small { margin: 0 0 14px; color: var(--muted); }
.notify-form { display: grid; gap: 10px; max-width: 460px; }
.notify-form label { font-weight: 700; color: var(--deep); }
.notify-form input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFF;
  color: var(--ink);
  font-size: 16px;
}
.form-status { min-height: 1.4em; color: var(--green); font-size: 1rem; }

.contact-grid { display: grid; gap: 14px; }
.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: #FFF;
}
.panel h3 { margin: 0 0 4px; color: var(--deep); }
.panel p { color: var(--muted); }
.panel ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.panel a { color: var(--green); font-weight: 700; overflow-wrap: anywhere; }

footer {
  padding: 34px 0 30px;
  background: var(--night-2);
  color: #E6E0CE;
  font-size: 1rem;
}
footer a { color: var(--gold-light); }
.foot-grid { display: grid; gap: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.privacy { margin: 18px 0 0; font-weight: 700; }
.privacy a { text-decoration: underline; text-underline-offset: 4px; }
.line { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(247,230,168,.2); }

/* ---------- Bibliothèque compacte ---------- */

.library-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 0;
  background: rgba(245,246,239,.96);
  border-bottom: 1px solid var(--line);
}
.search-wrap { position: relative; }
.search-wrap input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px 10px 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFF;
  font-size: 16px;
}
.search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-size: 1.4rem;
}
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 2px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FFF;
  color: var(--deep);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}
.filter-chip[aria-pressed="true"],
.filter-chip[aria-current="page"] {
  border-color: var(--green);
  background: var(--green);
  color: #FFF;
}
.lang-switch {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 18px 0 10px;
  padding-bottom: 2px;
}
.lang-hub {
  display: grid;
  gap: 14px;
  margin: 22px 0 8px;
}
.lang-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--gold-line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: #FFF;
  box-shadow: var(--shadow);
}
.lang-card h2 { margin: 0; color: var(--deep); font-size: 1.45rem; }
.lang-count { margin: 0; color: var(--muted); font-size: 1rem; }
.lang-card .btn { justify-self: start; min-width: 190px; }
.alpha-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.alpha-index button {
  min-width: 42px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--gold-line);
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--deep);
  font-weight: 800;
}
.alpha-index button[aria-pressed="true"] { background: var(--gold-light); }

.result-count { margin: 16px 0 10px; color: var(--muted); font-size: 1rem; }
.book-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.book-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  background: linear-gradient(135deg, #062C1B 0%, #0E6B40 58%, #12563A 100%);
  box-shadow: 0 8px 20px rgba(3, 20, 12, .22);
}
.book-thumb {
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: #F7F4E9;
  object-fit: contain;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25);
}
.book-copy { min-width: 0; }
.book-row h3 {
  margin: 0;
  color: #FFF7E2;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.book-arabic {
  margin: 2px 0 0;
  color: #F7E6A8;
  font-family: "Amiri Site", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.3;
  text-align: right;
}
.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
  color: #D6E7DA;
  font-size: 1rem;
  line-height: 1.25;
}
.book-lang {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(247, 230, 168, .16);
  color: #F7E6A8;
  font-weight: 800;
}
.links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--tap);
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #F7E6A8, #C99A2E);
  color: #0B1E15;
  font-size: .95rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 4px 0 #8A6414, 0 7px 14px rgba(0, 0, 0, .28);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.read:hover { filter: brightness(1.06); }
.read:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #8A6414, 0 3px 8px rgba(0, 0, 0, .28);
}
.pdf-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 16px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(135deg, #FFFDF5 0%, #F7E6A8 55%, #C99A2E 100%);
  box-shadow: 2px 3px 0 #8A6414, 3px 5px 6px rgba(0, 0, 0, .32);
  transform: rotate(-5deg);
}
.pdf-icon::before {
  content: "PDF";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  text-align: center;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: .2px;
  color: #0B1E15;
}
.pdf-icon::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-left: 1px solid #8A6414;
  border-bottom: 1px solid #8A6414;
  background: #FFF7E2;
  transform: rotate(45deg);
}
.empty-state { padding: 28px; text-align: center; color: var(--muted); }
.book-row.is-truncated { display: none; }
.more-books {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  margin: 18px auto 4px;
  padding: 10px 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--gold-light);
  color: var(--deep);
  font-size: 1rem;
  font-weight: 800;
}
.more-books:hover { background: var(--gold); }
.more-books[hidden] { display: none; }

/* ---------- Page audio ---------- */
.audio-count { margin: 16px 0 10px; color: var(--muted); font-size: 1rem; }
.audio-grid { display: grid; gap: 12px; }
.audio-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  background: linear-gradient(135deg, #062C1B, #0E6B40);
  box-shadow: 0 8px 20px rgba(3, 20, 12, .22);
}
.audio-thumb {
  width: 56px;
  height: 56px;
  border: 1px solid var(--gold);
  border-radius: 14px;
  background: #F7F4E9;
  object-fit: contain;
}
.audio-copy { min-width: 0; }
.audio-card h2 {
  margin: 0 0 8px;
  color: #FFF7E2;
  font-size: 1.05rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.audio-duration {
  margin: -4px 0 8px;
  color: #F7E6A8;
  font-size: .95rem;
  font-weight: 700;
}
.audio-card audio { display: block; width: 100%; height: 42px; }
.audio-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  margin-top: 6px;
  color: #F7E6A8;
  font-weight: 800;
  text-decoration: none;
}

/* Retour rapide en haut, injecté par site.js sur toutes les pages. */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #14210F;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(8, 58, 36, .22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Pages de contenu ---------- */

.index-box {
  padding: 20px;
  border: 2px solid var(--gold-line);
  border-radius: var(--radius);
  background: var(--paper-2);
  text-align: center;
}
.index-box h2 { margin: 0 0 14px; color: var(--deep); font-size: 1.08rem; }
.index-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.index-grid a {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: #FFF;
  color: var(--deep);
  font-weight: 700;
  text-decoration: none;
}
.index-grid a:hover, .index-grid a[aria-current="page"] {
  border-color: var(--deep);
  color: var(--deep);
  background: var(--gold-light);
}

.chapter-index {
  list-style: none;
  counter-reset: chap;
  display: grid;
  gap: 10px;
  margin: 18px 0 24px;
  padding: 0;
  text-align: left;
}
.chapter-index li { counter-increment: chap; }
.chapter-index a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFF;
  text-decoration: none;
  color: var(--deep);
}
.chapter-index a::before {
  content: counter(chap, decimal-leading-zero);
  color: var(--gold-dark);
  font-weight: 800;
}
.intro-menu a span { font-weight: 800; color: var(--deep); }

.entry, .name-card, .chapter, .night, .rubrique {
  scroll-margin-top: 22px;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}
.entry { border-left: 3px solid var(--gold); }
.entry h2, .chapter h2, .night h2 { margin: 4px 0 14px; color: var(--deep); }
.entry p, .name-card p, .chapter p, .night p { font-size: 1.02rem; }
.entry details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.entry summary { cursor: pointer; font-weight: 700; color: var(--deep); }

.name-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 20px; }
.name-num { color: var(--gold-dark); font-size: 1rem; font-weight: 800; }
.arabic {
  margin: 6px 0;
  color: var(--green);
  font-family: "Amiri Site", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.7;
}
.latin { margin: 0 0 8px; color: var(--deep); font-weight: 700; }
.sens { margin: 0; color: var(--muted); }
.dhikr {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--green);
}
.letter { margin: 42px 0 0; color: var(--deep); font-size: 2rem; border-bottom: 1px solid var(--line); }

.chapter { border-left: 3px solid var(--green); }
.chapter-head { display: grid; gap: 14px; align-items: start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.calligraphy {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-height: 130px;
  padding: 18px;
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 20%, rgba(201,154,46,.18), transparent 60%),
    var(--paper);
  color: var(--deep);
  text-align: center;
}
.calligraphy span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 700;
}
.calligraphy small { color: var(--gold-dark); font-size: 1rem; }
.chapter h3, .night h3 { margin: 20px 0 8px; color: var(--green); font-size: 1.2rem; }
.subtitle { margin: 0 0 10px; color: var(--muted); font-style: italic; }
.chapter-num {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(14,107,64,.10);
  color: var(--green);
  font-size: 1rem;
  font-weight: 700;
}
.chapter-text { padding-top: 20px; max-width: 70ch; }
.chapter-text p { margin: 0 0 16px; }
.chapter-text p:last-child { margin-bottom: 0; }

.night { border-left: 3px solid var(--gold); }
.night-head { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.medallion {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  background: linear-gradient(145deg, var(--deep), var(--night));
  box-shadow: inset 0 0 0 4px rgba(247,230,168,.12), 0 8px 18px rgba(8,58,36,.2);
  font-size: 1.1rem;
}
.night-title h2 { margin: 2px 0 4px; }
.night-body { display: grid; grid-template-columns: 1fr; gap: 20px; padding-top: 22px; }
.block h3 { margin: 0 0 10px; color: var(--deep); }
.block ul { margin: 0; padding-left: 20px; }
.block li { margin-bottom: 6px; }
.reward { padding-top: 18px; border-top: 1px solid var(--line); }

.manifesto {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--deep), var(--night));
  color: #F7F4E9;
}
.manifesto h2 { margin: 0 0 8px; color: #FFF7E2; }
.manifesto p { margin: 0; color: #E5DCC2; }
.manifesto a { color: var(--gold-light); font-weight: 700; }

.rubrique { display: grid; gap: 18px; }
.shots { display: grid; gap: 12px; justify-items: center; }
.shots.twin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shots figure { margin: 0; }
.shots a { display: block; width: 100%; }
.shots img {
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1560;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--night);
}
.shots figcaption { margin-top: 6px; color: var(--muted); font-size: 1rem; }
.kicker {
  color: var(--gold-dark);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.copy h2 { margin: 4px 0 10px; color: var(--deep); }
.copy p, .copy li { color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Tablette ---------- */

@media (min-width: 720px) {
  .wrap { width: min(100% - 48px, 1120px); }
  .menu-toggle .menu-label { display: inline; }
  .card-grid, .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr); }
  .hero-copy { order: 1; }
  .hero-portrait { order: 2; }
  .portrait-frame { width: min(340px, 100%); }
  .phone { width: min(300px, 100%); }
  .book-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; }
  .book-thumb { width: 52px; height: 52px; }
  .lang-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .name-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter-head { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
  .night-body { grid-template-columns: minmax(230px, .85fr) minmax(0, 1.15fr); gap: 28px; }
  .reward { padding-left: 26px; padding-top: 0; border-left: 1px solid var(--line); border-top: 0; }
  .rubrique { grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); align-items: center; }
  .rubrique:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(240px, 330px); }
  .rubrique:nth-of-type(even) .shots { order: 2; }
  .rubrique:nth-of-type(even) .copy { order: 1; }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- Ordinateur ---------- */

@media (min-width: 1024px) {
  .card-grid, .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: 4.1rem; }
  .hero .lead { max-width: 42ch; font-size: 1.14rem; }
  .portrait-frame { width: 380px; }
  .name-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phone { width: 320px; }
  .lang-hub { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  section { padding: 68px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .btn:hover { transform: none; }
}
