/* site/assets/css/pages.css
   Styles des pages interactives (Favoris, Simran, Quiz, Recherche).
   Transposé des maquettes *.dc.html (style-hover/style-focus → classes,
   couleurs exactes des design tokens). */

.page-main {
  animation: pageIn .6s cubic-bezier(.2,.7,.3,1) both;
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 24px 80px;
  box-sizing: border-box;
}
.page-main.center {
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 56px 24px 100px;
  text-align: center;
}
.page-main.narrow { max-width: 640px; }

@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow {
  width: 44px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-bottom: 14px;
}
.page-title {
  margin: 0 0 8px;
  font-family: 'Marcellus', serif;
  font-size: 38px;
  font-weight: 400;
  color: var(--fg);
}
.page-lead {
  margin: 0 0 36px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}
.page-lead.center { max-width: 420px; }

/* ===== Favoris ===== */
.fav-list { display: flex; flex-direction: column; gap: 14px; }
.fav-card {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color .25s cubic-bezier(.4,0,.2,1);
}
.fav-card:hover { border-color: #353545; }
.fav-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fav-gurmukhi {
  margin: 0;
  font-family: 'Mukta Mahee', sans-serif;
  font-size: 22px; line-height: 1.8;
  color: var(--fg);
}
.fav-fr { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.fav-source {
  font-size: 13px; font-weight: 600;
  color: var(--accent); text-decoration: none;
  transition: color .25s;
}
.fav-source:hover { color: #d9ad56; }
.fav-remove {
  flex-shrink: 0; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--accent);
  background: rgba(201,154,62,.1);
  border: 1px solid rgba(201,154,62,.35);
  border-radius: 50%; cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.fav-remove:hover { background: rgba(201,154,62,.25); }

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 14px;
  padding: 64px 32px;
  background: var(--surface);
  border: 1px dashed #353545;
  border-radius: 24px;
}
.empty-state .empty-icon { font-size: 34px; color: var(--muted); }
.empty-state h2 {
  margin: 0; font-family: 'Marcellus', serif;
  font-size: 22px; font-weight: 400; color: var(--fg);
}
.empty-state p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 400px; }
.btn-gold {
  margin-top: 8px; padding: 12px 26px;
  background: var(--accent); color: #08080c;
  font-weight: 600; font-size: 14px; text-decoration: none;
  border-radius: 9999px; display: inline-flex; align-items: center;
  transition: background .25s cubic-bezier(.4,0,.2,1);
  border: none; cursor: pointer;
}
.btn-gold:hover { background: #d9ad56; }

/* ===== Simran ===== */
.simran-title { margin: 0; font-family: 'Marcellus', serif; font-size: 34px; font-weight: 400; color: var(--fg); }
.simran-count-btn {
  position: relative; width: 300px; height: 300px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  animation: breathe 5s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.simran-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.simran-readout { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; z-index: 1; }
.simran-waheguru { font-family: 'Mukta Mahee', sans-serif; font-size: 26px; color: var(--accent); }
.simran-beads { font-family: 'Marcellus', serif; font-size: 64px; line-height: 1; color: var(--fg); }
.simran-total-label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.simran-stats { display: flex; align-items: center; gap: 24px; }
.simran-stat { display: flex; flex-direction: column; gap: 2px; }
.simran-stat-num { font-family: 'Marcellus', serif; font-size: 26px; color: var(--accent); }
.simran-stat-num.muted { color: var(--fg); }
.simran-stat-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.simran-divider { width: 1px; height: 36px; background: var(--border); }
.btn-ghost {
  padding: 10px 22px; font-family: 'Albert Sans', sans-serif;
  font-size: 13px; font-weight: 500; color: var(--muted);
  background: none; border: 1px solid var(--border); border-radius: 9999px;
  cursor: pointer; transition: all .25s cubic-bezier(.4,0,.2,1);
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

/* ===== Quiz ===== */
.quiz-card {
  display: flex; flex-direction: column; gap: 24px;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}
.quiz-head { display: flex; align-items: center; justify-content: space-between; }
.quiz-qnum { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.quiz-score { font-size: 13px; color: var(--accent); font-weight: 600; }
.quiz-bar { height: 4px; background: var(--border); border-radius: 9999px; overflow: hidden; }
.quiz-bar-fill { height: 100%; background: var(--accent); border-radius: 9999px; transition: width .3s; }
.quiz-question { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 0; }
.quiz-question-text { font-size: 17px; font-weight: 600; color: var(--fg); }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  padding: 15px 20px; text-align: left;
  font-family: 'Albert Sans', sans-serif; font-size: 15px; font-weight: 500;
  color: var(--fg); background: var(--bg);
  border: 1px solid var(--border); border-radius: 14px;
  cursor: pointer; transition: all .2s cubic-bezier(.4,0,.2,1);
}
.quiz-option:hover { border-color: var(--accent); }
.quiz-option.correct { color: var(--accent); background: rgba(201,154,62,.12); border-color: var(--accent); }
.quiz-option.wrong { color: #e07a6a; background: rgba(224,122,106,.08); border-color: rgba(224,122,106,.5); }
.quiz-option.faded { color: var(--muted); }
.quiz-explain {
  padding: 16px 18px; background: rgba(201,154,62,.06);
  border: 1px solid rgba(201,154,62,.25); border-radius: 12px;
  font-size: 14px; line-height: 1.6; color: var(--muted);
}
.quiz-explain strong { color: var(--accent); }
.quiz-next {
  align-self: center; padding: 12px 32px;
  background: var(--accent); color: #08080c; border: none;
  border-radius: 9999px; font-family: 'Albert Sans', sans-serif;
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .25s cubic-bezier(.4,0,.2,1);
}
.quiz-next:hover { background: #d9ad56; }
.quiz-result {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 16px; padding: 56px 36px;
  background: var(--surface);
  border: 1px solid rgba(201,154,62,.4);
  border-radius: 24px;
}
.quiz-result .qr-ek { font-family: 'Mukta Mahee', sans-serif; font-size: 44px; line-height: 1.4; color: var(--accent); }
.quiz-result h2 { margin: 0; font-family: 'Marcellus', serif; font-size: 30px; font-weight: 400; color: var(--fg); }
.quiz-result p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.quiz-result-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.btn-outline {
  padding: 12px 26px; color: var(--muted); background: none;
  border: 1px solid var(--border); border-radius: 9999px;
  font-family: 'Albert Sans', sans-serif; font-weight: 500; font-size: 14px;
  text-decoration: none; cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  display: inline-flex; align-items: center;
}
.btn-outline:hover { color: var(--accent); border-color: var(--accent); }

/* Quiz v2 — écran de choix du thème */
.quiz-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.quiz-theme {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 24px; text-align: left; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; cursor: pointer;
  font-family: 'Albert Sans', sans-serif;
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.quiz-theme:hover, .quiz-theme:focus-visible { border-color: var(--accent); transform: translateY(-3px); }
.quiz-theme-icon { font-family: 'Mukta Mahee', sans-serif; font-size: 26px; line-height: 1.3; color: var(--accent); }
.quiz-theme-label { font-size: 17px; font-weight: 600; color: var(--fg); }
.quiz-theme-desc { font-size: 13px; line-height: 1.5; color: var(--muted); }
.quiz-theme-best { font-size: 12px; font-weight: 600; color: var(--accent); }

/* Quiz v2 — verset/gurmukhi affiché dans la question */
.quiz-gurmukhi { margin: 0; font-family: 'Mukta Mahee', sans-serif; font-size: 22px; line-height: 1.7; color: var(--fg); }
.quiz-translit { margin: 0; font-size: 13px; font-style: italic; color: var(--muted); }

/* ===== Recherche ===== */
.search-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  transition: border-color .25s cubic-bezier(.4,0,.2,1);
}
.search-bar.focused { border-color: var(--accent); }
.search-icon { color: var(--muted); font-size: 17px; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--fg); font-family: 'Albert Sans', sans-serif;
  font-size: 15px; min-width: 0;
}
.search-submit {
  padding: 11px 24px; background: var(--accent); color: #08080c;
  border: none; border-radius: 9999px;
  font-family: 'Albert Sans', sans-serif;
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .25s cubic-bezier(.4,0,.2,1);
}
.search-submit:hover { background: #d9ad56; }
.scopes { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.scope-btn {
  padding: 8px 18px; font-family: 'Albert Sans', sans-serif;
  font-size: 13px; font-weight: 500; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9999px; cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.scope-btn.active { color: var(--accent); background: rgba(201,154,62,.1); border-color: var(--accent); }
.result-meta-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 36px 0 16px;
}
.result-count { font-size: 14px; color: var(--muted); }
.result-count .qc { color: var(--accent); }
.result-list { display: flex; flex-direction: column; gap: 14px; }
.result-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px 26px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px;
  text-decoration: none; color: inherit;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  animation: riseIn linear; animation-timeline: view(); animation-range: entry 0% entry 55%;
}
.result-card:hover { border-color: var(--accent); }
.result-card .rc-meta { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.result-card .rc-url { font-size: 13px; color: var(--muted); }
.result-card .rc-excerpt { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.result-card .rc-excerpt mark { background: rgba(201,154,62,.25); color: var(--fg); border-radius: 3px; padding: 0 2px; }
.search-empty {
  padding: 48px 32px; text-align: center; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--border); border-radius: 16px;
}
.search-error {
  padding: 16px 20px; background: rgba(224,122,106,.08);
  border: 1px solid rgba(224,122,106,.35); border-radius: 12px;
  color: #e07a6a; font-size: 14px; line-height: 1.6;
}
.search-error button { color: var(--accent); background: none; border: none; cursor: pointer; font-weight: 600; text-decoration: underline; }
/* ===== MOUVEMENT RÉDUIT =====
   Les vers et les cartes apparaissent au scroll (animation riseIn pilotée par
   animation-timeline). Pour qui a réglé son système sur « mouvement réduit »
   — vertiges, migraines vestibulaires — ce défilement animé est pénible et
   n'apportait aucun repli. Le contenu s'affiche alors directement, à son état
   final : rien ne disparaît, seule l'animation est neutralisée. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-timeline: auto !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .lecteur .verset, .lecteur .traduction-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
