/* KenhoWeb Chants d'Espérance — design de l'application actuelle du
   ministère : bleu nuit #0b1c33, or #c9a227, crème #faf7f0. */
:root {
  --kwh-nuit: #0b1c33;
  --kwh-nuit-profond: #050d1a;
  --kwh-or: #c9a227;
  --kwh-creme: #faf7f0;
  --kwh-texte: #22303f;
}
* { box-sizing: border-box; }
body.kwh {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--kwh-creme);
  color: var(--kwh-texte);
}
.kwh-head {
  background: var(--kwh-nuit);
  color: #fff;
  padding: 14px 18px;
}
.kwh-brand {
  color: var(--kwh-or);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}
.kwh-fil { margin-top: 6px; font-size: 13px; color: #b9c6d6; }
.kwh-fil a { color: #e8ddba; text-decoration: none; }
.kwh-fil .kwh-sep { color: var(--kwh-or); margin: 0 4px; }
.kwh-main { max-width: 980px; margin: 0 auto; padding: 18px 14px 30px; }
.kwh-foot {
  background: var(--kwh-nuit);
  color: #b9c6d6;
  font-size: 13px;
  text-align: center;
  padding: 18px 16px;
}
.kwh-hero { text-align: center; padding: 10px 6px 4px; }
.kwh-hero h1 { color: var(--kwh-nuit); font-size: 30px; margin: 6px 0; }
.kwh-hero-sub { font-size: 16px; color: #46586c; max-width: 640px; margin: 0 auto; }

/* ── Recherche + voix ─────────────────────────────── */
.kwh-search {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(11, 28, 51, .12);
  padding: 16px;
  margin: 18px 0;
}
.kwh-mic-btn {
  display: block;
  width: 100%;
  background: linear-gradient(160deg, #d9b83c, var(--kwh-or));
  color: var(--kwh-nuit);
  border: none;
  border-radius: 14px;
  font-size: 19px;
  font-weight: 700;
  padding: 16px 12px;
  cursor: pointer;
  min-height: 56px;
}
.kwh-mic-btn.ecoute { animation: kwh-pulse 1.2s ease-in-out infinite; }
@keyframes kwh-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, .55); }
  50% { box-shadow: 0 0 0 14px rgba(201, 162, 39, 0); }
}
.kwh-voice-langs { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.kwh-voice-langs button {
  border: 1.5px solid var(--kwh-or);
  background: #fff;
  color: var(--kwh-nuit);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  cursor: pointer;
  min-height: 40px;
}
.kwh-voice-langs button.on { background: var(--kwh-nuit); color: var(--kwh-or); }
.kwh-voice-state {
  margin-top: 12px;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.45;
}
.kwh-voice-state.ok { background: #e5f2ec; border: 1px solid #2e7d5b; }
.kwh-voice-state.proches { background: #fdf3d7; border: 1px solid var(--kwh-or); }
.kwh-voice-state.erreur { background: #fdeae5; border: 1px solid #b3402a; }
.kwh-voice-state.ecoute { background: #eaf0f8; border: 1px solid #2c5a94; }
.kwh-q-label { display: block; margin: 14px 0 6px; font-weight: 600; color: var(--kwh-nuit); }
.kwh-q {
  width: 100%;
  font-size: 17px;
  padding: 13px 14px;
  border: 1.5px solid #c8d2de;
  border-radius: 12px;
  min-height: 52px;
}
.kwh-q:focus { outline: 2px solid var(--kwh-or); border-color: var(--kwh-or); }

/* ── Couvertures des recueils ─────────────────────── */
.kwh-covers { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
@media (min-width: 760px) { .kwh-covers { grid-template-columns: 1fr 1fr 1fr; } }
.kwh-cover-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  text-decoration: none;
  color: var(--kwh-nuit);
  box-shadow: 0 3px 10px rgba(11, 28, 51, .13);
}
.kwh-cover-art {
  height: 92px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kwh-cover-frame {
  position: absolute; inset: 7px;
  border: 1.5px solid rgba(201, 162, 39, .55);
  border-radius: 9px;
  pointer-events: none;
}
.kwh-cover-roman {
  position: absolute; top: 10px; left: 12px;
  color: var(--kwh-or); font-weight: 700; font-size: 14px; letter-spacing: 1px;
}
.kwh-cover-glyph { font-size: 38px; }
.kwh-cover-body { padding: 11px 13px 13px; }
.kwh-cover-name { font-weight: 700; font-size: 16px; line-height: 1.25; }
.kwh-cover-count { color: #5a6b7f; font-size: 13px; margin-top: 3px; }

/* ── Pastilles de langues ─────────────────────────── */
.kwh-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.kwh-tag {
  background: #e8edf3; color: var(--kwh-nuit);
  border-radius: 999px; font-size: 12px; padding: 3px 9px;
}
.kwh-tag-or { background: var(--kwh-or); color: var(--kwh-nuit); font-weight: 600; }
.kwh-tag-att { background: #f3e2c2; color: #7a5a12; }

/* ── Page recueil ─────────────────────────────────── */
.kwh-book-head {
  border-radius: 16px;
  color: #fff;
  padding: 22px 18px;
  position: relative;
  text-align: center;
}
.kwh-book-head .kwh-cover-roman { top: 12px; left: 14px; }
.kwh-book-glyph { font-size: 44px; display: block; }
.kwh-book-head h1 { margin: 8px 0 4px; font-size: 26px; }
.kwh-book-head p { margin: 0; color: #d7dfeb; }
.kwh-book-head .kwh-tags { justify-content: center; }
.kwh-song-list { display: flex; flex-direction: column; gap: 9px; }
.kwh-song-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 13px; padding: 12px 14px;
  text-decoration: none; color: var(--kwh-nuit);
  box-shadow: 0 2px 7px rgba(11, 28, 51, .09);
  min-height: 60px;
}
.kwh-song-num {
  background: var(--kwh-nuit); color: var(--kwh-or);
  font-weight: 700; border-radius: 9px; padding: 7px 9px;
  font-size: 14px; white-space: nowrap;
}
.kwh-song-meta { flex: 1; min-width: 0; }
.kwh-song-title { font-weight: 700; font-size: 16px; }
.kwh-song-first { color: #5a6b7f; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kwh-chev { color: var(--kwh-or); font-size: 24px; font-weight: 700; }
.kwh-none { text-align: center; color: #7a5a12; background: #fdf3d7; border-radius: 10px; padding: 12px; }

/* ── Page cantique ────────────────────────────────── */
.kwh-hymn-ref { color: var(--kwh-or); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .6px; text-align: center; }
.kwh-hymn-title { color: var(--kwh-nuit); text-align: center; font-size: 30px; margin: 4px 0 6px; }
.kwh-hymn .kwh-tags { justify-content: center; }
.kwh-tabs { display: flex; gap: 8px; justify-content: center; margin: 16px 0 4px; flex-wrap: wrap; }
.kwh-tabs button {
  border: 1.5px solid var(--kwh-or);
  background: #fff; color: var(--kwh-nuit);
  border-radius: 999px; padding: 9px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; min-height: 44px;
}
.kwh-tabs button.on { background: var(--kwh-nuit); color: var(--kwh-or); }
.kwh-lyrics { max-width: 680px; margin: 10px auto 0; }
.kwh-block { margin: 20px 0; }
.kwh-block-label {
  color: var(--kwh-or); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.kwh-block p { font-size: 20px; line-height: 1.55; margin: 2px 0; color: #16283e; }
.kwh-availability {
  background: #fdf3d7; border: 1px solid var(--kwh-or); border-radius: 12px;
  padding: 14px 16px; font-size: 16px; line-height: 1.5;
}
.kwh-note { font-style: italic; color: #5a6b7f; font-size: 14px; }
.kwh-actions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  margin: 26px 0 6px;
}
.kwh-proj-btn {
  background: var(--kwh-nuit); color: #fff;
  border: 2px solid var(--kwh-or); border-radius: 14px;
  font-size: 18px; font-weight: 700; padding: 14px 22px; cursor: pointer; min-height: 56px;
}
.kwh-melody { color: #5a6b7f; font-size: 14px; }
.kwh-prevnext {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center;
  border-top: 1px solid #ddd3b8; margin-top: 26px; padding-top: 16px;
}
.kwh-prevnext a { color: var(--kwh-nuit); font-weight: 600; text-decoration: none; max-width: 42%; }
.kwh-prevnext a.kwh-back-book { color: var(--kwh-or); }

/* ── Mode projecteur ──────────────────────────────── */
.kwh-proj {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--kwh-nuit-profond); color: #fff;
  display: flex; flex-direction: column;
}
.kwh-proj[hidden] { display: none; }
.kwh-proj-top {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 20px; color: var(--kwh-or); font-size: 15px;
}
.kwh-proj-stage {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 10px 30px; cursor: pointer;
}
.kwh-proj-label {
  color: var(--kwh-or); text-transform: uppercase; letter-spacing: 2px;
  font-size: 15px; margin-bottom: 18px;
}
.kwh-proj-lines { font-size: var(--kwh-proj-size, 42px); line-height: 1.5; font-weight: 600; }
.kwh-proj-lines p { margin: 4px 0; }
.kwh-proj-bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 14px; }
.kwh-proj-bar button {
  background: #12283f; color: #fff; border: 1.5px solid var(--kwh-or);
  border-radius: 10px; padding: 12px 18px; font-size: 16px; cursor: pointer; min-height: 52px;
}
.kwh-proj-bar button.or { background: var(--kwh-or); color: var(--kwh-nuit); font-weight: 700; }
.kwh-proj-hint { text-align: center; color: #8ea3ba; font-size: 13px; padding: 0 12px 14px; }

/* ── Mode application : cibles tactiles plus grandes ── */
body.kwh-app .kwh-song-card { min-height: 66px; }
body.kwh-app .kwh-cover-art { height: 104px; }
body.kwh-app .kwh-block p { font-size: 21px; }

/* v1.1.0 — lecteur de la mélodie piano quand elle est disponible */
.kwh-melody-ok{display:inline-flex;align-items:center;gap:.6rem;flex-wrap:wrap}
.kwh-melody-ok audio{height:38px;max-width:300px;width:100%}
.kwh-melody-label{font-weight:600}

/* Crédits photos des couvertures (hub) */
.kwh-credits { margin: 16px 4px 0; font-size: 12px; line-height: 1.5; color: #8fa3bd; text-align: center; }
