/* =========================================================================
   Bayan — styles propres à chaque écran
   ========================================================================= */

/* ---- Accueil ---- */
.motif-bg {
  background-image:
    radial-gradient(circle at 100% 0%, rgba(201, 162, 39, 0.12), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(11, 79, 60, 0.10), transparent 40%);
}
.greeting { font-family: var(--font-display); font-size: 26px; color: var(--title); margin: 4px 0 2px; }
.greeting-sub { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; }

.hero-card {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to) 70%);
  color: var(--on-hero);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-2);
  cursor: pointer;
}
.hero-card::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-conic-gradient(from 0deg, rgba(201, 162, 39, 0.10) 0deg 45deg, transparent 45deg 90deg);
  -webkit-mask-image: radial-gradient(circle at 85% 15%, black, transparent 60%);
  mask-image: radial-gradient(circle at 85% 15%, black, transparent 60%);
  pointer-events: none;
}
.hero-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--on-hero-gold); font-weight: 700; position: relative; }
.hero-card .ar { color: var(--on-hero); font-size: 28px; margin: 12px 0 6px; position: relative; }
.hero-fr { font-family: var(--font-display); font-size: 18px; line-height: 1.5; margin: 0 0 10px; position: relative; }
.hero-ref { font-size: 13px; color: var(--on-hero-gold); position: relative; }

.progress-row { display: flex; gap: 12px; margin-top: 16px; }
.progress-stat {
  flex: 1; background: var(--surface); border-radius: var(--radius-md); padding: 14px 8px;
  text-align: center; box-shadow: var(--shadow-1);
}
.progress-stat .num { font-family: var(--font-display); font-size: 26px; color: var(--accent); display: block; }
.progress-stat .lbl { font-size: 11.5px; color: var(--text-dim); }

.continue-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-1);
  cursor: pointer; border: 1px solid var(--border); width: 100%; text-align: left;
}
.continue-card .body { flex: 1; min-width: 0; }
.continue-card .title { font-weight: 700; color: var(--title); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-card .sub { font-size: 12.5px; color: var(--text-dim); }
.badge-circle {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft); color: var(--on-accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
}

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.quick-action {
  background: var(--surface); border-radius: var(--radius-md); padding: 16px;
  box-shadow: var(--shadow-1); text-align: left; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
}
.quick-action svg { width: 22px; height: 22px; color: var(--gold); }
.quick-action .t { font-weight: 700; font-size: 14px; color: var(--title); }
.quick-action .s { font-size: 12px; color: var(--text-dim); }

/* ---- Sourates : recherche, filtres, liste ---- */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 11px 16px; margin-bottom: 14px;
}
.search-bar svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }
.search-bar input { border: none; outline: none; flex: 1; font-size: 15px; background: transparent; min-width: 0; }

.filter-toggle-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--accent);
  cursor: pointer; margin-bottom: 10px;
}
.filter-panel { background: var(--surface); border-radius: var(--radius-md); padding: 14px; margin-bottom: 14px; border: 1px solid var(--border); }
.filter-panel h4 { margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); }
.filter-panel .chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-panel .chip-group:last-child { margin-bottom: 0; }
.result-count { font-size: 13px; color: var(--text-dim); margin: 4px 0 12px; }

.sourate-list { display: flex; flex-direction: column; gap: 10px; }
.sourate-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border-radius: var(--radius-md); padding: 12px 14px;
  box-shadow: var(--shadow-1); cursor: pointer; border: 1px solid transparent;
}
.sourate-row:active { border-color: var(--gold); }
.sourate-num {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--on-accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
}
.sourate-num.read { background: var(--gold-soft); color: var(--on-gold-soft); }
.sourate-info { flex: 1; min-width: 0; }
.sourate-info .name { font-weight: 700; font-size: 15px; color: var(--title); }
.sourate-info .name-fr { font-size: 12.5px; color: var(--text-dim); }
.sourate-meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex-shrink: 0; }
.sourate-name-ar { font-family: var(--font-quran); font-size: 18px; color: var(--ar-text); direction: rtl; line-height: 1.4; }
.sourate-row.locked .sourate-info, .sourate-row.locked .sourate-num { opacity: .6; }
.lock-ic { color: var(--gold); display: flex; }
.lock-ic svg { width: 16px; height: 16px; }
.check-read { color: var(--success); display: flex; }

/* ---- Fiche (sourate expliquée ou courte) ---- */
.detail-header { padding: 4px 22px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 14px; }
.detail-header .info { flex: 1; min-width: 0; }
.detail-header .name { font-family: var(--font-display); font-size: 24px; color: var(--title); }
.detail-header .name-ar { font-family: var(--font-quran); font-size: 24px; color: var(--ar-text); direction: rtl; line-height: 1.5; }
.detail-header .name-fr { color: var(--text-dim); font-size: 14px; margin-top: 2px; }
.detail-header .tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 6px; }

.section-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 14px 22px 0; scrollbar-width: none; }
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs .tab {
  flex-shrink: 0; padding: 7px 13px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600;
  color: var(--text-dim); cursor: pointer;
}
.section-tabs .tab.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.detail-body { padding: 18px 22px 8px; }
.detail-block { margin-bottom: 22px; }
.detail-block h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--gold); margin: 0 0 8px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.detail-block p { margin: 0; line-height: 1.65; font-size: 15px; white-space: pre-line; }

.verse-card {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: var(--on-hero); border-radius: var(--radius-md); padding: 20px; position: relative; overflow: hidden;
}
.verse-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.verse-card-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--on-hero-gold); font-weight: 700; }
.verse-card blockquote { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 1.55; font-style: italic; }
.verse-card cite { display: block; margin-top: 12px; font-style: normal; font-size: 13px; color: var(--on-hero-gold); font-weight: 600; }
.verse-card .icon-btn { color: var(--on-hero-gold); margin: -8px -8px -8px 0; }
.verse-card .icon-btn:hover { background: rgba(255, 255, 255, 0.1); }

.concept-list { display: flex; flex-direction: column; gap: 10px; }
.concept-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.concept-item .term { font-weight: 700; color: var(--accent); font-size: 14px; }
.concept-item .def { font-size: 13.5px; color: var(--text-dim); margin-top: 2px; }

.notes-area {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; font-size: 14px; resize: vertical; min-height: 70px; background: var(--surface);
}
.detail-footer { display: flex; gap: 10px; padding: 18px 22px 4px; }

/* Sourate courte : versets */
.notice {
  background: var(--warn-soft); color: var(--on-warn-soft); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; line-height: 1.55; margin-bottom: 18px;
}
.basmala { text-align: center; font-size: 24px; margin: 4px 0 18px; }
.verset { padding: 14px 0; border-bottom: 1px solid var(--border); }
.verset:last-child { border-bottom: none; }
.verset-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.verset-num {
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--gold);
  color: var(--gold); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.verset .fr { margin: 6px 0 0; font-size: 15px; line-height: 1.6; }
.verset details { margin-top: 8px; font-size: 13px; color: var(--text-dim); }
.verset summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.verset details p { margin: 6px 0 0; line-height: 1.55; white-space: pre-line; }
.credit-line { font-size: 12px; color: var(--text-dim); margin-top: 12px; line-height: 1.5; }

/* ---- Écran de déblocage ---- */
.unlock { padding: 8px 22px 8px; text-align: center; }
.unlock .ic {
  width: 56px; height: 56px; border-radius: 50%; margin: 6px auto 14px;
  background: linear-gradient(135deg, #E8C766, #0F5C43); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.unlock .ic svg { width: 26px; height: 26px; }
.unlock h2 { font-family: var(--font-display); color: var(--title); margin: 0 0 6px; font-size: 24px; }
.unlock .price { font-size: 22px; font-weight: 700; color: var(--accent); margin: 10px 0 2px; }
.unlock .price-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; }
.unlock ul { text-align: left; padding: 0; margin: 0 0 18px; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.unlock li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.unlock .soon { font-size: 12.5px; color: var(--text-dim); margin-top: 10px; }

/* ---- Quiz ---- */
.quiz-question { margin-bottom: 20px; }
.quiz-question .qnum { font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.quiz-question h3 { font-family: var(--font-display); font-size: 19px; color: var(--title); margin: 6px 0 16px; line-height: 1.4; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  text-align: left; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px; font-size: 14.5px; cursor: pointer;
}
.quiz-option.correct { border-color: var(--success); background: var(--success-soft); color: var(--success); font-weight: 600; }
.quiz-option.wrong { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.quiz-option:disabled { cursor: default; }
.quiz-progress { display: flex; gap: 5px; margin-bottom: 20px; }
.quiz-progress .dot { flex: 1; height: 5px; border-radius: var(--radius-pill); background: var(--border); }
.quiz-progress .dot.done { background: var(--accent); }
.quiz-progress .dot.current { background: var(--gold); }
.quiz-result { text-align: center; padding: 30px 10px; }
.quiz-result .score-big { font-family: var(--font-display); font-size: 52px; color: var(--accent); }
.quiz-result .score-lbl { color: var(--text-dim); margin-bottom: 24px; }
.quiz-result .btn { margin-bottom: 10px; }

/* ---- Favoris ---- */
.fav-item {
  background: var(--surface); border-radius: var(--radius-md); padding: 16px;
  box-shadow: var(--shadow-1); margin-bottom: 12px; border: 1px solid var(--border); cursor: pointer;
}
.fav-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.fav-source { font-size: 12.5px; font-weight: 700; color: var(--gold); }
.fav-item blockquote { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 16px; color: var(--title); line-height: 1.5; }
.fav-item .ar { font-size: 22px; }
.fav-note { margin-top: 6px; font-size: 13.5px; color: var(--text); background: var(--bg-dim); padding: 10px 12px; border-radius: var(--radius-sm); white-space: pre-line; }

/* ---- Mots (bientôt) ---- */
.coming-soon { text-align: center; padding: 40px 12px; color: var(--text-dim); line-height: 1.6; }
.coming-soon .ar { text-align: center; font-size: 34px; }

/* ---- Profil ---- */
.profile-header { text-align: center; padding: 10px 0 20px; }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, #E8C766, #0F5C43);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-quran); font-size: 30px; color: #fff;
}
.profile-header h2 { margin: 0; font-family: var(--font-display); color: var(--title); font-size: 22px; }
.profile-header p { margin: 4px 0 0; color: var(--text-dim); font-size: 13.5px; }

.juz-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.juz-cell {
  aspect-ratio: 1; border-radius: 10px; background: var(--accent-soft); border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--on-accent-soft); cursor: pointer;
}
.juz-cell.complete { background: var(--accent); color: var(--on-accent); }
.juz-cell.partial { background: var(--gold-soft); color: var(--on-gold-soft); }

.settings-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }
.settings-row {
  background: var(--surface); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: none; width: 100%; text-align: left; font-size: 14.5px;
}
button.settings-row { cursor: pointer; }
.settings-row .lbl { font-size: 14.5px; font-weight: 500; }
.settings-row .lbl.danger { color: var(--danger); }
.settings-row select { max-width: 55%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.settings-row input[type=range] { width: 120px; accent-color: var(--accent); }
.status-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--gold-soft); color: var(--on-gold-soft); }
.voice-hint { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.55; }
.voice-hint.ok { background: var(--accent-soft); color: var(--on-accent-soft); }
.voice-hint.warn { background: var(--warn-soft); color: var(--on-warn-soft); }
.voice-hint strong { display: block; margin-bottom: 3px; }
.footer-note { margin-top: 28px; font-size: 12px; line-height: 1.6; text-align: center; color: var(--text-dim); }

/* =========================================================================
   Section Mots (phase 3)
   ========================================================================= */
.petit { font-size: 12.5px; line-height: 1.5; }
.bar-track { height: 8px; background: var(--accent-soft); border-radius: var(--radius-pill); overflow: hidden; margin-top: 8px; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: var(--radius-pill); transition: width .4s ease; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }

/* Accueil : mot du jour, objectif */
.mot-du-jour {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  margin-top: 14px; padding: 16px 18px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-1);
}
.mot-du-jour .hero-eyebrow { color: var(--gold); }
.mdj-sens { font-family: var(--font-display); font-size: 20px; color: var(--title); margin: 4px 0 2px; }
.mdj-ar { font-family: var(--font-quran); font-size: 30px; color: var(--ar-text); direction: rtl; line-height: 1.6; flex-shrink: 0; }
.badge-circle.mdj-ar { font-size: 16px; }
.objectif-strip {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; width: 100%;
  margin-top: 12px; padding: 12px 16px; text-align: left; cursor: pointer; font-size: 13.5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-dim);
}
.objectif-strip strong { color: var(--accent); }
.objectif-strip .bar-track { grid-column: 1 / -1; margin-top: 6px; }
.objectif-tete { display: flex; justify-content: space-between; font-size: 14px; }
.objectif-tete strong { color: var(--accent); }
.objectif .petit { margin: 8px 0 0; }

/* Liste des mots */
.mot-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border-radius: var(--radius-md); padding: 10px 14px;
  box-shadow: var(--shadow-1); cursor: pointer; border: 1px solid transparent;
}
.mot-row:active { border-color: var(--gold); }
.mot-info { flex: 1; min-width: 0; }
.mot-info .name { font-weight: 700; font-size: 15px; color: var(--title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mot-info .name-fr { font-size: 12.5px; color: var(--text-dim); }
.mot-row-ar { font-family: var(--font-quran); font-size: 24px; color: var(--ar-text); direction: rtl; line-height: 1.6; flex-shrink: 0; }
.mot-row.locked .mot-info { opacity: .6; }

/* Fiche mot */
.mot-tete { text-align: center; padding: 4px 0 18px; }
.mot-ar { font-family: var(--font-quran); font-size: 54px; color: var(--ar-text); direction: rtl; line-height: 1.7; }
.mot-tete .icon-btn.audio, .carte-mot .icon-btn.audio { margin: 0 auto; background: var(--accent-soft); }
.icon-btn.audio.playing { background: var(--gold); color: #0A3D2C; }
.mot-translit { color: var(--text-dim); font-size: 15px; margin-top: 8px; }
.mot-sens { font-family: var(--font-display); font-size: 26px; color: var(--title); margin-top: 4px; }
.mot-formes { margin-top: 10px; font-size: 14px; }
.ar-inline { font-family: var(--font-quran); font-size: 20px; color: var(--ar-text); direction: rtl; unicode-bidi: isolate; }
.verset mark { background: var(--gold-soft); color: inherit; border-radius: 6px; padding: 0 3px; }
.verset-titre { font-size: 12px; font-weight: 700; color: var(--gold); }
.lien-sourate {
  margin-top: 8px; padding: 0; background: none; border: none; cursor: pointer;
  color: var(--accent); font-size: 13px; font-weight: 600; text-align: left;
}

/* Puces « mots » dans les fiches de sourate */
.puces-mots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.puce-mot {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
}
.puce-mot .pm-ar { font-family: var(--font-quran); font-size: 20px; color: var(--ar-text); direction: rtl; line-height: 1.6; }
.puce-mot .pm-sens { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.puce-mot.locked { opacity: .75; }

/* Révision */
.carte-mot { text-align: center; padding: 22px 18px; }
.carte-mot .qnum { font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.carte-mot .btn { margin-top: 18px; }

/* Favoris : mots */
.fav-mot { display: flex; align-items: center; gap: 14px; }
.fav-mot-txt { flex: 1; min-width: 0; }
.status-pill.complet { background: var(--accent-soft); color: var(--on-accent-soft); }
.settings-row .email { font-size: 13px; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }

/* ---------- Présentation de bienvenue (phase 5) ---------- */
.onboarding {
  position: fixed; inset: 0; z-index: 80; background: var(--bg);
  display: flex; flex-direction: column; overflow-y: auto;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}
.onb-haut { display: flex; align-items: center; justify-content: center; position: relative; padding: 18px 16px 6px; }
.onb-points { display: flex; gap: 6px; }
.onb-points span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: width .2s, background .2s; }
.onb-points span.active { background: var(--gold); width: 22px; border-radius: 4px; }
.onb-passer { position: absolute; right: 12px; top: 8px; margin: 0; padding: 10px; font-size: 13.5px; border: none; text-decoration: underline; }
.onb-corps {
  flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 18px 24px 8px; max-width: 520px; width: 100%; margin: 0 auto;
}
.onb-logo { width: 88px; height: 88px; font-size: 34px; margin: 32px auto 22px; }
.onb-titre { font-family: var(--font-display); color: var(--title); font-size: 26px; line-height: 1.3; margin: 8px 0 12px; }
.onb-desc { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; margin: 0 0 8px; max-width: 360px; }
.onb-choix { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 6px; }
.onb-choix .chip { padding: 12px 18px; font-size: 14.5px; }
.onb-choix .onb-niveau { width: 100%; max-width: 320px; }
.onb-heure {
  margin-top: 20px; width: 100%; max-width: 260px; text-align: center;
  font: 600 26px var(--font-body); color: var(--text); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 14px;
}
.onb-ok { color: var(--success); font-weight: 600; margin-top: 16px; }
.onb-resume { width: 100%; max-width: 360px; margin-top: 14px; text-align: left; }
.onb-verset {
  margin: auto 0 0; padding-top: 22px; width: 100%;
}
.onb-verset > .ar, .onb-verset figcaption {
  background: var(--surface); border: 1px solid var(--border);
}
.onb-verset > .ar { margin: 0; font-size: 22px; line-height: 2; border-radius: var(--radius-md) var(--radius-md) 0 0; border-bottom: none; padding: 14px 18px 0; }
.onb-verset figcaption { border-radius: 0 0 var(--radius-md) var(--radius-md); border-top: none; padding: 4px 18px 14px; text-align: left; }
.onb-verset-fr { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; margin: 0; font-style: italic; }
.onb-verset-ref { font-size: 12px; color: var(--on-gold-soft); margin: 8px 0 0; font-weight: 600; }
.onb-verset details { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; }
.onb-credit { text-align: center; margin: 10px 0 0; }
.onb-pied { display: flex; gap: 10px; padding: 14px 24px 22px; max-width: 520px; width: 100%; margin: 0 auto; }
.onb-pied .btn { flex: 1; }

/* ---------- Badges ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 12px 6px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); opacity: .55;
}
.badge-tile .ic { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg-dim); }
.badge-tile .ic svg { width: 20px; height: 20px; }
.badge-tile .name { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.badge-tile .desc { font-size: 11px; line-height: 1.35; }
.badge-tile.unlocked { opacity: 1; border-color: var(--gold); }
.badge-tile.unlocked .ic { background: var(--gold-soft); color: var(--on-gold-soft); }

/* ---------- Sources et crédits ---------- */
.link-btn {
  background: none; border: none; padding: 0; font: inherit; color: var(--accent);
  text-decoration: underline; cursor: pointer;
}
.credits-bloc p { font-size: 14px; line-height: 1.6; margin: 0 0 6px; }
.credits-bloc a { color: var(--accent); word-break: break-word; }
.credits-notice { white-space: pre-wrap; font-size: 11.5px; line-height: 1.5; color: var(--text-dim); background: var(--bg-dim); padding: 10px; border-radius: var(--radius-sm); overflow-x: auto; }
.settings-row input[type="time"] { font: 600 15px var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 8px; }
