/* Jant Coran — feuille de style unique de la plateforme.
   Couleurs et typographies : charte graphique (readme.md). Trois thèmes : clair, sombre, sépia
   (html[data-theme]), réglage S1 du cahier des charges. */

:root {
  --vert: #087F6E;
  --vert-fonce: #075B50;
  --vert-clair: #DDF3EF;
  --or: #E6A817;
  --or-clair: #F7E6B0;

  --fond: #F7F8F7;
  --surface: #FFFFFF;
  --surface-2: #F0F2F0;
  --bordure: #E5E7E5;
  --texte: #263330;
  --texte-2: #64706D;
  --accent: var(--vert);
  --accent-doux: var(--vert-clair);
  --actif: #FFF8E1;

  --police: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --police-arabe: "Amiri Quran", "Amiri", "Noto Naskh Arabic", serif;
  --taille-arabe: 30px;
  --taille-traduction: 17px;

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;
  --ombre: 0 6px 20px rgba(0, 0, 0, .08);
  --entete: 64px;
  --lecteur: 0px;
  color-scheme: light;
}

:root[data-theme="sombre"] {
  --fond: #121614;
  --surface: #1A201D;
  --surface-2: #222a26;
  --bordure: #2E3833;
  --texte: #E8EEEB;
  --texte-2: #9AA8A3;
  --accent: #3FBFA6;
  --accent-doux: #173a33;
  --actif: #2a2614;
  --ombre: 0 6px 20px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

:root[data-theme="sepia"] {
  --fond: #F4ECD8;
  --surface: #FBF5E6;
  --surface-2: #EFE5CC;
  --bordure: #E0D3B4;
  --texte: #3B3222;
  --texte-2: #7A6C52;
  --accent: #7A5A12;
  --accent-doux: #EFE1BD;
  --actif: #F3E0A8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 16px/1.6 var(--police); -webkit-font-smoothing: antialiased;
  padding-bottom: var(--lecteur);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: clamp(22px, 3.5vw, 28px); }
[hidden] { display: none !important; }
.conteneur { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.etroit { max-width: 860px; }
.doux { color: var(--texte-2); }
.petit { font-size: 13px; }
.ar { font-family: var(--police-arabe); direction: rtl; unicode-bidi: isolate; }
.bidi { unicode-bidi: plaintext; }
svg[aria-hidden="true"] { width: 20px; height: 20px; flex: none; }
.tafsir-bouton svg, .titre-sourate svg { width: 18px; height: 18px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent;
  border-radius: var(--r-md); padding: 9px 16px; font-weight: 600; font-size: 15px;
  background: var(--surface-2); color: var(--texte); text-decoration: none !important; line-height: 1.2;
}
.btn:hover { filter: brightness(.97); }
.btn-principal { background: var(--vert); color: #fff; }
.btn-or { background: var(--or); color: #1c1606; }
.btn-contour { background: transparent; border-color: var(--bordure); }
.btn-grand { padding: 13px 22px; font-size: 16px; }
.btn-icone {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: transparent; color: var(--texte-2);
}
.btn-icone:hover { background: var(--surface-2); color: var(--texte); }
.btn-icone svg, .btn svg { width: 20px; height: 20px; flex: none; }
.segmente { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.segmente button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; color: var(--texte-2); font-weight: 600; font-size: 14px; }
.segmente button[aria-pressed="true"] { background: var(--surface); color: var(--texte); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--accent-doux); color: var(--accent); white-space: nowrap; }
.badge-wo { background: var(--or-clair); color: #6b4d00; }
:root[data-theme="sombre"] .badge-wo { background: #3a3012; color: var(--or); }
.badge-ar { background: var(--accent-doux); color: var(--accent); }
.badge-fr { background: var(--surface-2); color: var(--texte-2); }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 40; height: var(--entete);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bordure);
}
.entete .conteneur { display: flex; align-items: center; gap: 12px; height: 100%; max-width: 1400px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--texte); text-decoration: none !important; }
.logo img { height: 36px; }
.logo .or { color: var(--or); }
.nav { display: flex; gap: 4px; margin-left: 16px; }
.nav a { padding: 8px 12px; border-radius: var(--r-md); color: var(--texte-2); font-weight: 600; font-size: 15px; text-decoration: none; }
.nav a.actif, .nav a:hover { color: var(--texte); background: var(--surface-2); }
.entete .espace { flex: 1; }
.recherche-entete { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 0 6px 0 14px; width: min(320px, 32vw); }
.recherche-entete input { border: 0; background: transparent; outline: none; padding: 9px 0; flex: 1; min-width: 0; }
@media (max-width: 860px) {
  .nav { display: none; }
  .recherche-entete { display: none; }
  .nav.ouvert { display: flex; flex-direction: column; position: absolute; top: var(--entete); left: 0; right: 0; background: var(--surface); padding: 8px 16px 16px; border-bottom: 1px solid var(--bordure); margin: 0; }
}
@media (min-width: 861px) { .seulement-mobile { display: none !important; } }

/* ---------- Pied de page ---------- */
.pied { border-top: 1px solid var(--bordure); margin-top: 64px; padding: 32px 0; color: var(--texte-2); font-size: 14px; }
.pied .conteneur { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.pied a { color: var(--texte-2); }

/* ---------- Accueil ---------- */
.hero { padding: 48px 0 28px; text-align: center; }
.hero .signature { font-family: var(--police-arabe); font-size: 30px; color: var(--or); margin-bottom: 4px; }
.hero p { color: var(--texte-2); max-width: 640px; margin: 0 auto 22px; font-size: 18px; }
.grande-recherche { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--bordure); border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: var(--ombre); }
.grande-recherche input { flex: 1; border: 0; outline: none; background: transparent; font-size: 17px; padding: 8px 0; min-width: 0; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.suggestions a { font-size: 14px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--texte-2); }
.section { margin-top: 40px; }
.section-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-titre h2 { margin: 0; }
.carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--r-lg); padding: 16px; }
.continuer { display: flex; gap: 12px; flex-wrap: wrap; }
.continuer a { flex: 1 1 240px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--texte); text-decoration: none; }
.continuer a:hover { border-color: var(--accent); }

.grille-sourates { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.carte-sourate { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--r-md); color: var(--texte); text-decoration: none !important; transition: border-color .15s; }
.carte-sourate:hover { border-color: var(--accent); }
.carte-sourate:hover .numero { background: var(--accent); color: #fff; }
.numero { display: grid; place-items: center; width: 38px; height: 38px; flex: none; transform: rotate(45deg); border-radius: 8px; background: var(--surface-2); font-weight: 700; font-size: 14px; }
.numero span { transform: rotate(-45deg); }
.carte-sourate .noms { flex: 1; min-width: 0; }
.carte-sourate .translit { font-weight: 700; }
.carte-sourate .fr { font-size: 13px; color: var(--texte-2); }
.carte-sourate .droite { text-align: right; }
.carte-sourate .ar { font-size: 20px; }
.carte-sourate .versets { font-size: 12px; color: var(--texte-2); }

.defile-horizontal { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.carte-seance { flex: 0 0 280px; scroll-snap-align: start; color: var(--texte); text-decoration: none !important; display: flex; flex-direction: column; gap: 8px; }
.carte-seance:hover { border-color: var(--or); }
.carte-seance .titre { font-weight: 700; line-height: 1.35; }
.onde { display: flex; gap: 3px; align-items: end; height: 22px; }
.onde i { width: 4px; background: var(--or); border-radius: 2px; opacity: .8; }

.bandeau-extension { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--vert-fonce); color: #fff; border-radius: var(--r-xl); padding: 24px; }
.bandeau-extension p { margin: 4px 0 0; opacity: .85; }

/* ---------- Page de lecture ---------- */
.lecture { display: grid; grid-template-columns: 300px minmax(0, 1fr); max-width: 1400px; margin: 0 auto; }
@media (max-width: 1023px) { .lecture { grid-template-columns: minmax(0, 1fr); } }
.barre-laterale { position: sticky; top: var(--entete); height: calc(100vh - var(--entete) - var(--lecteur)); overflow: auto; border-right: 1px solid var(--bordure); padding: 16px; background: var(--fond); }
@media (max-width: 1023px) {
  .barre-laterale { position: fixed; z-index: 60; left: 0; top: 0; height: 100vh; width: min(320px, 88vw); transform: translateX(-100%); transition: transform .2s; background: var(--surface); box-shadow: var(--ombre); }
  .barre-laterale.ouverte { transform: none; }
}
.barre-laterale input { width: 100%; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--bordure); background: var(--surface); margin: 12px 0; }
.liste-laterale { list-style: none; margin: 0; padding: 0; }
.liste-laterale a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--r-md); color: var(--texte); text-decoration: none; font-size: 15px; }
.liste-laterale a:hover { background: var(--surface-2); }
.liste-laterale a.actif { background: var(--surface-2); font-weight: 700; }
.liste-laterale .n { color: var(--texte-2); width: 28px; font-variant-numeric: tabular-nums; }
.liste-laterale .point-wo { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--or); }

.barre-lecture { position: sticky; top: var(--entete); z-index: 30; background: color-mix(in srgb, var(--fond) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--bordure); }
.barre-lecture .conteneur { display: flex; align-items: center; gap: 10px; min-height: 52px; flex-wrap: wrap; max-width: 1000px; }
.barre-lecture .titre-sourate { display: flex; align-items: center; gap: 6px; font-weight: 700; background: none; border: 0; padding: 6px 8px; border-radius: var(--r-md); }
.barre-lecture .titre-sourate:hover { background: var(--surface-2); }
.barre-lecture .reperes { color: var(--texte-2); font-size: 14px; flex: 1; text-align: center; }
@media (max-width: 640px) { .barre-lecture .reperes { display: none; } }

.colonne { max-width: 1000px; margin: 0 auto; padding: 20px 16px 40px; }
.entete-sourate { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--r-xl); padding: 22px; display: grid; gap: 14px; }
.entete-sourate .haut { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.entete-sourate .nom-ar { font-size: 46px; line-height: 1.2; color: var(--texte); }
.entete-sourate h1 { font-size: 26px; margin: 0; }
.entete-sourate .sens { font-size: 20px; color: var(--texte-2); }
.entete-sourate .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.basmala { text-align: center; font-size: calc(var(--taille-arabe) * 1.05); margin: 28px 0 6px; }
.basmala + p { text-align: center; color: var(--texte-2); margin: 0 0 16px; font-size: 15px; }

/* Mode Traduction : un verset par ligne */
.verset { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 26px 0; border-bottom: 1px solid var(--bordure); scroll-margin-top: calc(var(--entete) + 64px); }
.verset.en-cours { background: linear-gradient(90deg, transparent, var(--actif) 12%, var(--actif) 88%, transparent); border-left: 3px solid var(--or); }
.verset .gauche { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.verset .cle { font-weight: 700; font-size: 14px; color: var(--texte-2); margin-bottom: 6px; }
@media (max-width: 600px) {
  .verset { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .verset .gauche { flex-direction: row; justify-content: flex-start; }
  .verset .cle { margin: 0 8px 0 0; }
}
.mots { display: flex; flex-wrap: wrap; direction: rtl; gap: 6px 14px; justify-content: flex-start; margin-bottom: 14px; }
.mot { display: inline-flex; flex-direction: column; align-items: center; background: none; border: 0; padding: 4px 4px 2px; border-radius: var(--r-sm); color: inherit; }
.mot .a { font-family: var(--police-arabe); font-size: var(--taille-arabe); line-height: 1.9; }
.mot .g { direction: ltr; font-size: 12px; color: var(--texte-2); max-width: 11em; text-align: center; line-height: 1.3; }
.mot .g.wo { color: #8a6500; }
:root[data-theme="sombre"] .mot .g.wo { color: var(--or); }
.mot:hover, .mot:focus-visible { background: var(--accent-doux); outline: none; }
.mot:hover .a { color: var(--accent); }
.mot.prononce .a { color: var(--or); }
.fin-verset { font-family: var(--police-arabe); font-size: calc(var(--taille-arabe) * .8); color: var(--or); display: inline-flex; align-items: center; padding: 0 2px; background: none; border: 0; }
.texte-verset { font-size: var(--taille-arabe); line-height: 2.1; text-align: right; margin-bottom: 14px; }
.traduction { font-size: var(--taille-traduction); line-height: 1.7; margin: 6px 0; }
.traduction .source { display: block; font-size: 12px; color: var(--texte-2); margin-top: 2px; }
.traduction-wo { border-left: 3px solid var(--or); padding-left: 12px; }

/* Tafsir wolof sous un verset */
.tafsir-verset { margin-top: 14px; }
.tafsir-bouton { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--or); background: transparent; color: var(--texte); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; }
.tafsir-bouton:hover, .tafsir-bouton[aria-expanded="true"] { background: var(--or-clair); color: #3b2c00; }
.passages { display: grid; gap: 10px; margin-top: 12px; }
.passage { background: var(--surface); border: 1px solid var(--bordure); border-left: 3px solid var(--or); border-radius: var(--r-md); padding: 12px 14px; }
.passage.en-cours { box-shadow: 0 0 0 2px var(--or) inset; }
.passage .tete { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.passage .tete .espace { flex: 1; }
.seg { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 5px 6px; border-radius: var(--r-sm); cursor: pointer; }
.seg:hover { background: var(--surface-2); }
.seg.actif { background: var(--actif); }
.seg .t { font-size: 12px; color: var(--texte-2); font-variant-numeric: tabular-nums; padding-top: 3px; }
.seg .wo { unicode-bidi: plaintext; }
.seg .wo.arabe { font-family: var(--police-arabe); font-size: 22px; direction: rtl; text-align: right; }
.seg .fr { display: block; font-size: 14px; color: var(--texte-2); font-style: italic; }
.seg .etq { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); margin-right: 6px; }
.seg .masque { color: var(--texte-2); font-style: italic; }

/* Mode Lecture : texte continu mot à mot */
.page-lecture { direction: rtl; display: flex; flex-wrap: wrap; gap: 14px 18px; padding: 24px 0; }
.page-lecture .mot .a { font-size: calc(var(--taille-arabe) * 1.1); }
.page-lecture .marque { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; }
.page-lecture .marque.en-cours .fin-verset { background: var(--or-clair); border-radius: 50%; }
.page-lecture .verset-bloc { display: contents; }
.page-lecture .verset-bloc.en-cours .mot .a { color: var(--accent); }

/* Infobulle d'un mot */
.infobulle { position: fixed; z-index: 70; max-width: 280px; background: var(--surface); color: var(--texte); border: 1px solid var(--bordure); border-radius: var(--r-md); box-shadow: var(--ombre); padding: 10px 12px; font-size: 14px; pointer-events: none; }
.infobulle .a { font-family: var(--police-arabe); font-size: 26px; direction: rtl; text-align: center; }
.infobulle dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0 0; }
.infobulle dt { color: var(--texte-2); }
.infobulle dd { margin: 0; }

/* ---------- Tiroir des réglages ---------- */
.voile { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.35); }
.tiroir { position: fixed; z-index: 60; top: 0; right: 0; height: 100vh; width: min(380px, 92vw); background: var(--surface); box-shadow: var(--ombre); overflow: auto; padding: 18px 20px 40px; transform: translateX(105%); transition: transform .2s; }
.tiroir.ouvert { transform: none; }
.tiroir header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tiroir h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-2); margin: 22px 0 10px; }
.reglage { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.reglage label { flex: 1; }
.reglage select, .reglage input[type="range"] { max-width: 55%; }
.reglage select { padding: 6px 8px; border-radius: var(--r-sm); border: 1px solid var(--bordure); background: var(--surface); }
.interrupteur { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--bordure); position: relative; flex: none; cursor: pointer; transition: background .15s; }
.interrupteur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.interrupteur:checked { background: var(--vert); }
.interrupteur:checked::after { transform: translateX(18px); }
.interrupteur:disabled { opacity: .45; cursor: not-allowed; }
.ordre-langues { display: grid; gap: 6px; }
.ordre-langues li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--bordure); border-radius: var(--r-md); list-style: none; }
.ordre-langues li span { flex: 1; }
.ordre-langues { padding: 0; margin: 0; }
.apercu-arabe { text-align: center; font-size: var(--taille-arabe); padding: 8px; background: var(--surface-2); border-radius: var(--r-md); }

/* ---------- Lecteur audio fixe ---------- */
.lecteur { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface); border-top: 1px solid var(--bordure); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.lecteur .progression { height: 4px; background: var(--accent-doux); cursor: pointer; }
.lecteur .progression i { display: block; height: 100%; width: 0; background: var(--or); }
.lecteur .conteneur { display: flex; align-items: center; gap: 12px; height: 64px; max-width: 1400px; }
.lecteur .infos { flex: 1; min-width: 0; }
.lecteur .infos b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lecteur .infos span { font-size: 13px; color: var(--texte-2); }
.lecteur .lire { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--or); color: #1c1606; display: grid; place-items: center; }
.lecteur .lire svg { width: 22px; height: 22px; }
.lecteur .temps { font-size: 13px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .lecteur .temps, .lecteur .vitesse { display: none; } }

/* ---------- Séance de tafsir ---------- */
.entete-seance { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--r-xl); padding: 22px; }
.entete-seance .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.transcription { margin-top: 18px; display: grid; gap: 2px; }
.transcription .seg { grid-template-columns: 60px minmax(0, 1fr); padding: 8px; }
.transcription .ref a { font-size: 12px; font-weight: 700; margin-left: 6px; }
.filtre-etiquettes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.filtre-etiquettes button { border: 1px solid var(--bordure); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.filtre-etiquettes button[aria-pressed="false"] { opacity: .45; }

/* ---------- Recherche ---------- */
.resultat { padding: 16px 0; border-bottom: 1px solid var(--bordure); }
.resultat .cle { font-weight: 700; font-size: 14px; }
.resultat mark { background: var(--or-clair); color: inherit; border-radius: 3px; padding: 0 2px; }
.onglets-resultats { display: flex; gap: 8px; margin: 18px 0 4px; flex-wrap: wrap; }

/* ---------- Divers ---------- */
.chargement { display: grid; place-items: center; padding: 60px 0; color: var(--texte-2); }
.chargement::before { content: ""; width: 28px; height: 28px; border: 3px solid var(--accent-doux); border-top-color: var(--accent); border-radius: 50%; animation: tourne 1s linear infinite; margin-bottom: 10px; }
@keyframes tourne { to { transform: rotate(360deg); } }
.vide { text-align: center; color: var(--texte-2); padding: 40px 0; }
.toast { position: fixed; left: 50%; bottom: calc(var(--lecteur) + 20px); transform: translateX(-50%); z-index: 80; background: var(--texte); color: var(--fond); padding: 10px 16px; border-radius: var(--r-md); font-size: 14px; box-shadow: var(--ombre); max-width: 90vw; }
.prose { max-width: 760px; }
.prose p { color: var(--texte-2); }
.etapes { counter-reset: e; display: grid; gap: 12px; padding: 0; list-style: none; }
.etapes li { counter-increment: e; display: flex; gap: 12px; align-items: flex-start; }
.etapes li::before { content: counter(e); display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--vert); color: #fff; font-weight: 700; }

/* ---------- Tafsir wolof d'une sourate (tafsir.html?n=…) ---------- */
:root { --dock: 0px; --tete: 56px; }
body.page-tafsir { padding-bottom: calc(var(--dock) + var(--lecteur)); }
body.page-tafsir[data-vue="defilement"] .pied { display: none; }
.tafsir-tete { position: sticky; top: var(--entete); z-index: 30; height: var(--tete); background: color-mix(in srgb, var(--fond) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--bordure); }
.tafsir-tete .conteneur { display: flex; align-items: center; gap: 6px; height: 100%; max-width: 1000px; }
.tafsir-tete .titre { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tafsir-tete .titre b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tafsir-tete .titre small { color: var(--texte-2); font-size: 13px; }
.tafsir-tete .espace { flex: 1; }
@media (max-width: 640px) { .seulement-large { display: none !important; } }
.reprendre { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--texte); text-decoration: none !important; margin-top: 8px; border-left: 3px solid var(--or); }
.carte-sourate .jauge, .jauge { display: block; height: 4px; border-radius: 2px; background: var(--accent-doux); margin-top: 6px; overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--or); }

/* Vue « Défilement » : un verset par écran */
body.page-tafsir[data-vue="defilement"] .tafsir-corps { height: calc(100dvh - var(--entete) - var(--tete) - var(--dock) - var(--lecteur)); }
.flux { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.flux::-webkit-scrollbar { display: none; }
.carte-flux {
  --teinte: 0; position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden;
  color: #fff; display: flex; flex-direction: column; padding: 24px 84px 22px max(20px, calc(50% - 330px)); box-sizing: border-box;
  background: linear-gradient(165deg, hsl(calc(158deg + var(--teinte) * .2deg) 70% 9%), hsl(calc(168deg + var(--teinte) * .2deg) 75% 19%) 55%, hsl(calc(190deg + var(--teinte) * .25deg) 55% 14%));
}
@media (min-width: 900px) { .carte-flux { padding-right: max(84px, calc(50% - 330px)); } }
.carte-flux .deco {
  position: absolute; inset: -20%; pointer-events: none; opacity: .55;
  background: radial-gradient(circle at 80% 10%, rgba(230, 168, 23, .28), transparent 35%), radial-gradient(circle at 10% 90%, rgba(23, 184, 151, .25), transparent 40%),
    repeating-conic-gradient(from 22.5deg, rgba(255, 255, 255, .035) 0 12.5%, transparent 0 25%);
  background-size: auto, auto, 120px 120px;
}
.carte-flux > * { position: relative; }
.carte-flux .haut-carte { display: flex; align-items: center; gap: 10px; }
.carte-flux .cle { font-weight: 700; font-size: 14px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.carte-flux .direct { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--or); font-weight: 600; }
.carte-flux .direct i { width: 8px; height: 8px; border-radius: 50%; background: var(--or); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.carte-flux .corps-carte { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; min-height: 0; overflow: auto; }
.carte-flux .texte { font-size: calc(var(--taille-arabe) * 1.15); line-height: 2.1; text-align: center; margin: 0; }
.carte-flux .texte .fin { color: var(--or); }
.mot-simple { background: none; border: 0; padding: 0 1px; color: inherit; font: inherit; border-radius: 4px; }
.mot-simple:hover { color: var(--or); }
.mot-simple.prononce { color: var(--or); }
.carte-flux .mots-sens { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 0; }
.carte-flux .mot .a { font-size: calc(var(--taille-arabe) * 1.05); }
.carte-flux .mot .g { color: rgba(255, 255, 255, .7); }
.carte-flux .mot:hover { background: rgba(255, 255, 255, .1); }
.carte-flux .mot:hover .a { color: var(--or); }
.carte-flux .fr { font-size: var(--taille-traduction); line-height: 1.6; text-align: center; margin: 0; color: rgba(255, 255, 255, .88); }
.carte-flux .legende { min-height: 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sous-titre { display: block; background: rgba(0, 0, 0, .28); border-radius: var(--r-md); padding: 10px 12px; width: 100%; }
.sous-titre .etq { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; padding: 1px 8px; border-radius: 999px; margin-bottom: 4px; }
.sous-titre .paroles { display: block; font-size: 17px; line-height: 1.5; unicode-bidi: plaintext; }
.sous-titre .paroles.arabe { font-size: 24px; text-align: right; }
.sous-titre .trad { display: block; font-size: 14px; font-style: italic; color: rgba(255, 255, 255, .75); margin-top: 4px; }
.sous-titre .masque { font-style: italic; opacity: .7; }
.paroles span { transition: opacity .2s; }
.sous-titre .paroles span:not(.dit) { opacity: .45; }
.inviter, .passer { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--or); background: rgba(0, 0, 0, .2); color: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; }
.inviter svg, .passer svg { width: 16px; height: 16px; color: var(--or); }
.passer { border-color: rgba(255, 255, 255, .35); font-weight: 500; font-size: 13px; padding: 5px 12px; }
.rail { position: absolute; right: max(10px, calc(50% - 400px)); bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.rail > * { display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: #fff; font-size: 11px; text-decoration: none !important; }
.rail svg { width: 26px; height: 26px; padding: 9px; box-sizing: content-box; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.rail > *:hover svg { background: rgba(255, 255, 255, .22); }
.rail .aime svg { color: #ff5a79; }
.coeur { position: absolute; z-index: 5; font-size: 72px; color: #ff5a79; pointer-events: none; transform: translate(-50%, -50%); animation: coeur .9s ease-out forwards; }
.coeur.centre { left: 50%; top: 45%; }
@keyframes coeur { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -110%) scale(1); opacity: 0; } }
.carte-flux.intro, .carte-flux.fin-flux { justify-content: center; text-align: center; padding-left: 20px; padding-right: 20px; }
.intro-corps { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; }
.intro-corps .surtitre { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--or); font-weight: 700; }
.intro-corps .nom-ar { font-size: 64px; line-height: 1.8; margin-bottom: 4px; }
.intro-corps h1 { margin: 0; font-size: 30px; }
.intro-corps p { margin: 0; color: rgba(255, 255, 255, .8); }
.intro-corps .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.gros-lire { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--or); color: #1c1606; display: grid; place-items: center; margin: 14px 0; box-shadow: 0 8px 26px rgba(230, 168, 23, .35); }
.gros-lire svg { width: 32px; height: 32px; }
.intro-corps .astuce { font-size: 14px; color: rgba(255, 255, 255, .7); }
.action-fin { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff; border-radius: var(--r-md); padding: 10px 18px; font-weight: 600; text-decoration: none !important; }

/* Vue « Transcription » */
.transcription-sourate { padding-top: 16px; padding-bottom: 24px; }
.transcription-sourate .filtre-etiquettes { margin: 0 0 8px; }
.filtre-etiquettes button i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.partie-titre { font-size: 15px; margin: 26px 0 8px; color: var(--texte-2); }
.partie-titre small { font-weight: 400; }
.transcription-sourate .seg { grid-template-columns: 56px minmax(0, 1fr) 38px; align-items: start; padding: 8px 6px; scroll-margin-top: calc(var(--entete) + var(--tete) + 20px); }
.transcription-sourate .seg .t { background: none; border: 0; text-align: left; padding: 3px 0 0; }
.transcription-sourate .seg .corps { cursor: pointer; }
.transcription-sourate .seg .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.transcription-sourate .seg .etq { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.transcription-sourate .seg .ref { font-size: 12px; font-weight: 700; }
.transcription-sourate .seg .texte { display: block; }
.transcription-sourate .seg .paroles { unicode-bidi: plaintext; }
.transcription-sourate .seg .paroles.arabe { display: block; font-size: 22px; text-align: right; }
.transcription-sourate .seg .trad { display: block; font-size: 14px; color: var(--texte-2); font-style: italic; }
.transcription-sourate .seg.courant { background: var(--actif); box-shadow: inset 3px 0 0 var(--or); }
.transcription-sourate .seg.courant .paroles span:not(.dit) { opacity: .45; }
.transcription-sourate .seg.passe:not(.courant) { opacity: .7; }
.transcription-sourate .seg .btn-icone { width: 32px; height: 32px; opacity: 0; }
.transcription-sourate .seg:hover .btn-icone, .transcription-sourate .seg .btn-icone:focus-visible { opacity: 1; }
@media (hover: none) { .transcription-sourate .seg .btn-icone { opacity: .6; } }

/* Vue « Mot à mot » */
.mot-a-mot { padding-top: 16px; padding-bottom: 24px; }
.ligne-verset { padding: 18px 10px; border-bottom: 1px solid var(--bordure); scroll-margin-top: calc(var(--entete) + var(--tete) + 20px); border-radius: var(--r-sm); }
.ligne-verset[role="button"] { cursor: pointer; }
.ligne-verset.actif { background: linear-gradient(90deg, transparent, var(--actif) 12%, var(--actif) 88%, transparent); box-shadow: inset 3px 0 0 var(--or); }
.ligne-verset .mots { margin-bottom: 6px; }
.ligne-verset .fin-verset { font-size: calc(var(--taille-arabe) * .7); }
.ligne-verset .traduction { margin: 0; }
.outils-verset { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.outils-verset .espace { flex: 1; }
.outils-verset .badge svg { width: 12px; height: 12px; }
.barre-transcription { position: sticky; bottom: calc(var(--dock) + var(--lecteur) + 8px); display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--bordure); border-left: 3px solid var(--or); border-radius: var(--r-md); box-shadow: var(--ombre); padding: 10px 14px; margin-top: 12px; }
.barre-transcription .meta { font-size: 12px; color: var(--texte-2); }
.barre-transcription .texte { unicode-bidi: plaintext; }
.barre-transcription .trad { font-size: 14px; color: var(--texte-2); font-style: italic; }

/* Dock : frise de toute la sourate et commandes */
.dock { position: fixed; left: 0; right: 0; bottom: var(--lecteur); z-index: 45; background: var(--surface); border-top: 1px solid var(--bordure); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); padding: 4px 0 8px; }
.dock .conteneur { position: relative; max-width: 1000px; display: grid; gap: 4px; }
.dock .revenir { position: absolute; top: -50px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: var(--vert); color: #fff; padding: 8px 16px; font-weight: 600; font-size: 14px; box-shadow: var(--ombre); }
.frise { height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.frise .piste { position: relative; width: 100%; height: 6px; border-radius: 3px; background: var(--accent-doux); }
.frise .chap { position: absolute; top: 0; height: 100%; opacity: .5; }
.frise .tick { position: absolute; top: -2px; width: 1px; height: 10px; background: var(--texte-2); opacity: .45; }
.frise .limite { position: absolute; top: -5px; width: 2px; height: 16px; background: var(--texte); border-radius: 1px; }
.frise .boucle { position: absolute; top: -4px; height: 14px; background: var(--or); opacity: .35; border-radius: 3px; }
.frise .rempli { position: absolute; left: 0; top: 0; height: 100%; background: var(--or); border-radius: 3px; mix-blend-mode: multiply; }
:root[data-theme="sombre"] .frise .rempli { mix-blend-mode: normal; opacity: .85; }
.frise .pouce { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--or); border: 2px solid var(--surface); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.frise:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.dock .commandes { display: flex; align-items: center; justify-content: center; gap: 6px; }
.dock .temps { margin-right: auto; min-width: 92px; font-size: 13px; font-variant-numeric: tabular-nums; }
.dock .temps small { color: var(--texte-2); }
.dock .lire { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--or); color: #1c1606; display: grid; place-items: center; }
.dock .lire svg { width: 22px; height: 22px; }
.dock .vitesse { margin-left: auto; min-width: 92px; text-align: right; background: none; border: 0; font-weight: 700; font-size: 14px; color: var(--texte-2); }
.dock .vitesse:hover { color: var(--texte); }
.rond-charge { width: 20px; height: 20px; border: 3px solid rgba(0, 0, 0, .2); border-top-color: #1c1606; border-radius: 50%; animation: tourne 1s linear infinite; }
.dock .outils { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dock .outils .espace { flex: 1; }
.dock .outils .segmente button { padding: 5px 12px; font-size: 13px; }
.dock .outils .segmente button:disabled { opacity: .4; cursor: not-allowed; }
.outil { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--texte-2); border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 600; }
.outil svg { width: 18px; height: 18px; }
.outil:hover { background: var(--surface-2); color: var(--texte); }
.outil[aria-pressed="true"] { background: var(--or-clair); color: #5a4100; }
:root[data-theme="sombre"] .outil[aria-pressed="true"] { background: #3a3012; color: var(--or); }
@media (max-width: 560px) {
  .dock .temps, .dock .vitesse { min-width: 0; }
  .dock .outils .segmente button { padding: 5px 9px; }
  .outil small { display: none; }
}
body.page-tafsir .toast { bottom: calc(var(--dock) + var(--lecteur) + 16px); }
