:root {
  --parchment: #F4ECD8;
  --paper: #FBF6E9;
  --paper-dim: #F0E8D2;
  --ink: #14110C;
  --ink-soft: #2D2519;
  --ink-mid: #5A4F3D;
  --ink-muted: #857862;
  --gold: #9C7B2E;
  --gold-light: #C9A55C;
  --emerald: #1B5E3F;
  --red: #9C2E2E;
  --blue: #2E4A9C;
  --rule: rgba(20, 17, 12, 0.18);
  --rule-soft: rgba(20, 17, 12, 0.08);
  --shadow-card: 0 2px 8px rgba(20, 17, 12, 0.06), 0 1px 2px rgba(20, 17, 12, 0.04);
  --shadow-active: 0 6px 20px rgba(20, 17, 12, 0.18);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--parchment);
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(156, 123, 46, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 88% 80%, rgba(27, 94, 63, 0.05) 0%, transparent 45%);
  -webkit-font-smoothing: antialiased;
}

.top-bar {
  border-bottom: 1px solid var(--rule);
  padding: 1.1rem 1.5rem;
  text-align: center;
  background: rgba(244, 236, 216, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.brand-mark { color: var(--gold); font-size: 1.7rem; line-height: 1; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.surah-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.surah-name-tr {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.surah-name-ar {
  font-family: 'Amiri', serif;
  font-size: 2.3rem;
  color: var(--emerald);
  margin-bottom: 1rem;
  font-weight: 700;
  direction: rtl;
}
.ornament {
  width: 100px;
  height: 22px;
  margin: 1rem auto;
  color: var(--gold);
  display: block;
}
.basmala {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: var(--ink-soft);
  direction: rtl;
  margin-top: 1rem;
}

.selector-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}
.select-field { position: relative; }
.select-field label {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}
.select-field select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 0.95rem 2.5rem 0.95rem 1.1rem;
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}
.select-field select:hover { border-color: var(--gold); }
.select-field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(156, 123, 46, 0.15);
}
.select-field::after {
  content: '';
  position: absolute;
  right: 1.1rem;
  bottom: 1.25rem;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  pointer-events: none;
}

.verse-block {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 2.25rem 1.75rem;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: var(--shadow-card);
}
.verse-block::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 3px 3px;
}
.verse-arabic {
  font-family: 'Amiri', serif;
  font-size: 2.5rem;
  line-height: 2;
  text-align: center;
  color: var(--ink);
  direction: rtl;
  margin-bottom: 1.5rem;
  font-weight: 700;
}
.verse-number {
  display: inline-block;
  font-size: 1.3rem;
  color: var(--gold);
  margin-right: 0.4rem;
  vertical-align: middle;
  font-weight: 400;
}
.verse-divider {
  text-align: center;
  color: var(--gold);
  font-size: 0.7rem;
  margin: 1.25rem 0;
  letter-spacing: 0.5em;
}
.verse-translation {
  font-family: 'Lora', serif;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink-soft);
  text-align: center;
  font-weight: 500;
  font-style: italic;
  max-width: 580px;
  margin: 0 auto;
}
.placeholder-note, .placeholder-inline {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-style: italic;
  font-weight: 500;
}
.placeholder-inline {
  font-family: 'Lora', serif;
  direction: ltr;
  display: inline-block;
}

.mufassir-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-align: center;
  margin-bottom: 1rem;
}
.mufassir-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.mufassir-card {
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  padding: 1.25rem 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  display: block;
}
.mufassir-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 17, 12, 0.1);
}
.mufassir-card.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-active);
  transform: translateY(-2px);
}
.mufassir-card.active .card-name { color: var(--paper); }
.mufassir-card.active .card-meta { color: var(--gold-light); }
.mufassir-card.active .card-decor { color: var(--gold-light); opacity: 1; }
.card-decor {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
  line-height: 1;
  opacity: 0.9;
}
.card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.card-meta {
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-muted);
  font-style: italic;
}

.tafsir-display {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}
.tafsir-display.empty {
  background: transparent;
  border: 1.5px dashed var(--rule);
  box-shadow: none;
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.tafsir-empty-msg {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-muted);
  font-weight: 500;
}
.tafsir-empty-msg::before {
  content: '☞';
  display: block;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
  font-style: normal;
}

.tafsir-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(156, 123, 46, 0.04) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.tafsir-title-block { flex: 1; min-width: 0; }
.tafsir-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.tafsir-source-line {
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: 0.2rem;
}
.tafsir-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-shrink: 0;
}

.checked-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--emerald);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  position: relative;
  box-shadow: 0 2px 6px rgba(27, 94, 63, 0.3);
}
.checked-badge svg { width: 16px; height: 16px; }
.checked-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-family: 'Lora', serif;
  font-size: 0.78rem;
  font-weight: 500;
  font-style: italic;
  width: 240px;
  text-align: left;
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.checked-badge::before {
  content: '';
  position: absolute;
  top: calc(100% + 2px);
  right: 10px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 5;
}
.checked-badge:hover::after,
.checked-badge:hover::before {
  opacity: 1;
  visibility: visible;
}

.share-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--rule);
  color: var(--ink-mid);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.share-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(156, 123, 46, 0.06);
}
.share-btn svg { width: 14px; height: 14px; }

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--paper);
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === TAFSIR TURC : SANS ASCENSEUR — affichage complet === */
.tafsir-scroll {
  padding: 1.5rem 1.75rem;
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.8;
  color: var(--ink-soft);
}
.tafsir-scroll p { margin-bottom: 1.1rem; }
.tafsir-scroll p:last-child { margin-bottom: 0; }
.tafsir-scroll div { margin-bottom: 0.6rem; }
.tafsir-scroll div:empty { min-height: 1em; margin-bottom: 0.6rem; }

.arabic-toggle {
  border-top: 1px solid var(--rule);
  background: rgba(156, 123, 46, 0.05);
}
.arabic-toggle-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: background 0.2s;
}
.arabic-toggle-btn:hover { background: rgba(156, 123, 46, 0.1); }
.arabic-toggle-btn .chevron {
  display: inline-block;
  transition: transform 0.3s ease;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
}
.arabic-toggle-btn.expanded .chevron { transform: rotate(180deg); }
.arabic-toggle-btn .icon {
  color: var(--gold);
  font-family: 'Amiri', serif;
  font-size: 1.2rem;
  font-weight: 700;
}

/* === ZONE ARABE : déploiement complet sans limite de hauteur === */
.arabic-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease;
}
.arabic-content.expanded { max-height: 9999px; }

.arabic-scroll {
  padding: 1.5rem 1.75rem;
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 2.1;
  color: var(--ink-soft);
  direction: rtl;
  text-align: right;
  border-top: 1px solid var(--rule-soft);
}
.arabic-scroll p { margin-bottom: 1rem; }
.arabic-scroll div { margin-bottom: 1rem; }
.arabic-scroll div:empty { min-height: 1em; margin-bottom: 1rem; }

.footer-admin {
  text-align: center;
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-soft);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.footer-admin a {
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--rule);
  padding-bottom: 1px;
}
.footer-admin a:hover { color: var(--gold); border-color: var(--gold); }

/* ===== HOME : Hero + Progress ===== */
.home-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}
.hero {
  text-align: center;
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.hero-mark {
  font-size: 3rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.85rem;
}
.hero-mission {
  font-family: 'Lora', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero-mission strong {
  font-style: normal;
  color: var(--gold);
  font-weight: 700;
}
 
/* Progression */
.progress-block {
  max-width: 520px;
  margin: 0 auto;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 0.5rem;
}
.progress-value {
  font-size: 1.25rem;
  color: var(--emerald);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.progress-bar {
  height: 10px;
  background: rgba(20, 17, 12, 0.08);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--emerald) 100%);
  border-radius: 5px;
  transition: width 0.8s ease;
  min-width: 4px;
}
.progress-meta {
  text-align: center;
  margin-top: 0.55rem;
  font-family: 'Lora', serif;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-style: italic;
}
 
/* Section Sourates */
.section-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-align: center;
  margin-bottom: 1.5rem;
}
 
/* Grille des sourates */
.surahs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}
.surah-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.1rem 0.85rem 0.85rem;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.surah-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(20, 17, 12, 0.1);
}
.surah-card-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.surah-card-name-tr {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}
.surah-card-name-ar {
  font-family: 'Amiri', serif;
  font-size: 1.4rem;
  color: var(--emerald);
  font-weight: 700;
  direction: rtl;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.surah-card-info {
  font-family: 'Lora', serif;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}
.surah-card-progress {
  width: 100%;
  height: 4px;
  background: rgba(20, 17, 12, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: auto;
}
.surah-card-progress-fill {
  height: 100%;
  background: var(--emerald);
  border-radius: 2px;
}
 
/* ===== Verse Navigation (prev/next) ===== */
.verse-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.verse-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.25s ease;
  box-shadow: var(--shadow-card);
}
.verse-nav-btn:hover:not(.disabled) {
  border-color: var(--gold);
  background: rgba(156, 123, 46, 0.04);
  transform: translateY(-2px);
}
.verse-nav-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.verse-nav-btn.next {
  text-align: right;
  justify-content: flex-end;
}
.nav-arrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  line-height: 1;
}
.nav-label-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.nav-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.nav-target {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
/* Mobile pour les nouveautés */
@media (max-width: 600px) {
  .home-main { padding: 2rem 1rem 4rem; }
  .hero-title { font-size: 2rem; }
  .hero-mission { font-size: 0.95rem; }
  .surahs-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.6rem;
  }
  .surah-card { padding: 0.9rem 0.6rem 0.7rem; }
  .surah-card-name-tr { font-size: 1.1rem; }
  .surah-card-name-ar { font-size: 1.2rem; }
  .verse-nav { gap: 0.5rem; }
  .verse-nav-btn { padding: 0.85rem 0.85rem; gap: 0.5rem; }
  .nav-arrow { font-size: 1.4rem; }
  .nav-target { font-size: 0.85rem; }
  .nav-label { font-size: 0.65rem; }
}

/* ===== HERO BANNER (image) ===== */
.hero-banner {
  margin: 0 auto 2.5rem;
  max-width: 800px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--rule);
}
.hero-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* La progression reste séparée sous la bannière */
.hero-progress {
  max-width: 760px;
  margin: 0 auto 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

/* ===== Sélecteur avec flèches de navigation intégrées ===== */
.selector-row.with-nav {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 0.6rem;
  align-items: end;
}
.nav-arrow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0; /* aligné avec le bas des selects */
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
  line-height: 1;
}
.nav-arrow-btn:hover:not(.disabled) {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--paper);
  transform: translateY(-1px);
}
.nav-arrow-btn.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* Sur mobile : flèches plus compactes */
@media (max-width: 600px) {
  .selector-row.with-nav {
    grid-template-columns: auto 1fr 1fr auto;
    gap: 0.4rem;
  }
  .nav-arrow-btn {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }
}

/* Très petits écrans : flèches encore plus compactes */
@media (max-width: 400px) {
  .nav-arrow-btn {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }
}

@media (max-width: 600px) {
  .hero-banner {
    border-radius: 12px;
    margin-bottom: 2rem;
  }
  .hero-progress {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 600px) {
  main { padding: 2.25rem 1rem 4rem; }
  .surah-name-tr { font-size: 2.4rem; }
  .surah-name-ar { font-size: 1.95rem; }
  .verse-arabic { font-size: 1.95rem; line-height: 1.95; }
  .verse-translation { font-size: 1.05rem; }
  .verse-block { padding: 1.75rem 1.1rem; }
  .basmala { font-size: 1.3rem; }
  .select-field select { padding: 0.85rem 2.2rem 0.85rem 0.9rem; font-size: 1rem; }
  .mufassir-grid { gap: 0.5rem; }
  .mufassir-card { padding: 1rem 0.5rem; }
  .card-name { font-size: 1.05rem; }
  .card-meta { font-size: 0.62rem; }
  .card-decor { font-size: 0.95rem; }
  .tafsir-scroll, .arabic-scroll { padding: 1.25rem 1.1rem; }
  .tafsir-title { font-size: 1.25rem; }
  .tafsir-header { padding: 1rem 1.1rem 0.9rem; gap: 0.5rem; }
  .checked-badge::after { right: -10px; width: 200px; font-size: 0.74rem; }
}

/* ============================================
   À AJOUTER À LA FIN DE assets/style.css
   ============================================ */

/* === Badge qualité dans l'en-tête du tafsir === */
.quality-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: help;
  position: relative;
  flex-shrink: 0;
}
.quality-badge svg {
  width: 18px;
  height: 18px;
}
.quality-badge.green {
  background: var(--emerald);
  box-shadow: 0 2px 6px rgba(27, 94, 63, 0.35);
}
.quality-badge.gold {
  background: linear-gradient(135deg, #C9A55C, #9C7B2E);
  box-shadow: 0 2px 8px rgba(156, 123, 46, 0.4);
}

/* Tooltip au survol */
.quality-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-family: 'Lora', serif;
  font-size: 0.78rem;
  font-weight: 500;
  font-style: italic;
  width: 280px;
  text-align: left;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.quality-badge::before {
  content: '';
  position: absolute;
  top: calc(100% + 4px);
  right: 11px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10;
}
.quality-badge:hover::after,
.quality-badge:hover::before {
  opacity: 1;
  visibility: visible;
}

/* === Mini-indicateur sur les cartes mufassir === */
.mufassir-card {
  position: relative; /* nécessaire pour le positionnement absolu du dot */
}
.card-state-dot {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  z-index: 2;
}
.card-state-dot.green {
  background: var(--emerald);
  box-shadow: 0 0 0 2px var(--paper);
}
.card-state-dot.gold {
  background: linear-gradient(135deg, #C9A55C, #9C7B2E);
  box-shadow: 0 0 0 2px var(--paper);
}
/* Sur carte active (fond foncé), le contour doit s'adapter */
.mufassir-card.active .card-state-dot.green,
.mufassir-card.active .card-state-dot.gold {
  box-shadow: 0 0 0 2px var(--ink);
}

/* Mobile : tooltip plus compact */
@media (max-width: 600px) {
  .quality-badge::after {
    width: 220px;
    right: -8px;
    font-size: 0.74rem;
    padding: 0.5rem 0.75rem;
  }
}

/* ============================================
   À AJOUTER À LA FIN DE admin/admin.css
   STYLES POUR LA PAGE stats.php
   ============================================ */

/* Filtres en haut */
.stats-filters {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.stats-filters .select-field {
  flex: 0 0 220px;
}
.stats-filters .btn-primary {
  height: 51px;
  padding: 0 1.25rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Récap cards */
.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.stats-card {
  background: rgba(156, 123, 46, 0.06);
  border: 1.5px solid rgba(156, 123, 46, 0.25);
  border-radius: 12px;
  padding: 1.3rem 1rem;
  text-align: center;
}
.stats-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.stats-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

/* Tables stats */
.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-family: 'Lora', serif;
  font-size: 0.95rem;
}
.stats-table th {
  text-align: left;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mid);
  padding: 0.7rem 0.5rem;
  border-bottom: 2px solid var(--rule);
}
.stats-table th.num {
  text-align: right;
}
.stats-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
}
.stats-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.stats-table tbody tr:hover {
  background: rgba(156, 123, 46, 0.04);
}

.role-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  background: rgba(156, 123, 46, 0.15);
  color: var(--gold);
  border-radius: 4px;
  font-weight: 600;
}

.stats-link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--rule);
}
.stats-link:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.check-mark.gold {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.88rem;
}
.check-mark.muted {
  color: var(--ink-muted);
  opacity: 0.5;
}

/* Mobile */
@media (max-width: 600px) {
  .stats-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .stats-filters .select-field {
    flex: 1 1 auto;
  }
  .stats-filters .btn-primary {
    height: auto;
    padding: 0.85rem 1rem;
    justify-content: center;
  }
  .stats-value {
    font-size: 2rem;
  }
  .stats-table {
    font-size: 0.82rem;
  }
  .stats-table td, .stats-table th {
    padding: 0.55rem 0.35rem;
  }
}

/* Bandeau "Bu tefsir özetlenmiştir" entre le tafsir et le bouton Arapça */
.summarized-notice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.5rem;
  background: rgba(156, 123, 46, 0.08);
  border-top: 1px solid rgba(156, 123, 46, 0.3);
  border-bottom: 1px solid rgba(156, 123, 46, 0.15);
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.summarized-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
}
.summarized-text {
  flex: 1;
}
.summarized-text strong {
  color: var(--gold);
  font-weight: 700;
}
 
/* Mobile : un peu plus compact */
@media (max-width: 600px) {
  .summarized-notice {
    padding: 0.75rem 1.1rem;
    font-size: 0.88rem;
    gap: 0.5rem;
  }
}
