/* ============================================================
   DÉHIMA MUSIC — Modules Spirituels (Évangile, Chants, Prières, Live)
   Thème : Lumière Douce · Or Sacré · Responsive
   ============================================================ */

/* ===== MODULE CARDS SPIRITUELLES ===== */
.module-hero {
  position: relative;
  padding: 5rem 1.5rem 3.5rem;
  text-align: center;
  overflow: hidden;
}
.module-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.22) saturate(0.6);
}
.module-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(254,250,244,0.08) 0%, rgba(254,250,244,0.88) 100%);
}
.module-hero-content { position: relative; z-index: 2; max-width: 680px; margin: 0 auto; }
.module-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700;
  color: var(--text); line-height: 1.15; margin-bottom: 0.8rem;
}
.module-hero p { font-size: 1rem; color: var(--text-m); line-height: 1.75; }
.module-icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-ll), var(--gold));
  font-size: 32px; margin: 0 auto 1.5rem;
  box-shadow: 0 6px 24px rgba(184,134,11,0.25);
  animation: iconFloat 3s ease-in-out infinite;
}
@keyframes iconFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ===== DAY TABS (vendredi/dimanche) ===== */
.day-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  background: var(--cream2); border-radius: 14px;
  padding: 5px; margin-bottom: 2rem; width: fit-content;
}
.day-tab {
  padding: 9px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  color: var(--text-m); background: transparent;
  border: none; transition: all var(--transition);
}
.day-tab.active {
  background: white; color: var(--gold);
  box-shadow: var(--shadow-s);
}

/* ===== SPIRITUAL CARD ===== */
.spiritual-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
}
.spiritual-card:hover {
  box-shadow: var(--shadow); border-color: rgba(184,134,11,0.3);
  transform: translateY(-3px);
}
.spiritual-card-header {
  padding: 1.4rem 1.4rem 0;
}
.spiritual-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 1rem; flex-shrink: 0;
}
.sc-icon-gold    { background: var(--gold-bg); }
.sc-icon-crimson { background: rgba(139,38,53,0.08); }
.sc-icon-blue    { background: var(--blue-bg); }
.sc-icon-purple  { background: var(--purple-bg); }
.sc-icon-green   { background: var(--green-bg); }

.spiritual-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 4px;
}
.spiritual-card-ref {
  font-size: 12px; color: var(--text-s); margin-bottom: 0.8rem;
  font-style: italic;
}
.spiritual-card-excerpt {
  font-size: 13px; color: var(--text-m); line-height: 1.65;
  padding: 0 1.4rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.spiritual-card-actions {
  padding: 1rem 1.4rem 1.4rem;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  border-top: 1px solid var(--border-s); margin-top: 1.2rem;
}

/* ===== AUDIO PLAYER INLINE ===== */
.audio-player-inline {
  background: var(--cream2); border-radius: 12px;
  padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 12px;
}
.apl-label {
  font-size: 12px; font-weight: 700; color: var(--text-m); flex-shrink: 0;
  min-width: 80px;
}
.apl-play {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold); color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; transition: all var(--transition);
}
.apl-play:hover { transform: scale(1.1); box-shadow: 0 4px 14px rgba(184,134,11,0.35); }
.apl-play.playing { background: var(--crimson); }
.apl-progress {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--cream3); cursor: pointer; position: relative;
}
.apl-progress-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-l));
  transition: width 0.3s linear;
  pointer-events: none;
}
.apl-time { font-size: 11px; color: var(--text-s); flex-shrink: 0; }

/* ===== SPIRITUAL DETAIL PAGE ===== */
.spiritual-detail {
  max-width: 820px; margin: 0 auto; padding: 2.5rem 1.5rem;
}
.spiritual-section {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.8rem; margin-bottom: 1.5rem;
}
.spiritual-section-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin-bottom: 1rem;
}
.spiritual-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--text);
}
.spiritual-text {
  font-size: 1rem; color: var(--text-m); line-height: 2;
  white-space: pre-wrap;
}
.spiritual-text.italic { font-style: italic; font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; }

/* ===== LIVE STREAM ===== */
.live-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition);
}
.live-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.live-thumb {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: linear-gradient(135deg, var(--cream2), var(--cream3));
}
.live-thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-thumb-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 40px;
}
.live-badge {
  position: absolute; top: 12px; left: 12px;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.live-badge.is-live {
  background: var(--crimson); color: white;
  animation: livePulse 2s ease-in-out infinite;
}
.live-badge.scheduled {
  background: var(--gold); color: white;
}
.live-badge.upcoming {
  background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(42,95,143,0.25);
}
@keyframes livePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(139,38,53,0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(139,38,53,0); }
}
.live-dot-r {
  width: 7px; height: 7px; border-radius: 50%;
  background: white; animation: blink 1s step-end infinite;
}
.live-card-body { padding: 1.2rem 1.4rem; }
.live-card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.live-card-meta { font-size: 13px; color: var(--text-m); margin-bottom: 12px; line-height: 1.5; }
.live-embed-wrap {
  position: relative; padding-bottom: 56.25%;
  border-radius: var(--radius); overflow: hidden;
  background: #000; margin-top: 1.5rem;
}
.live-embed-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: none;
}

/* ===== CHANT CARD ===== */
.chant-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); transition: all var(--transition);
}
.chant-card:hover { box-shadow: var(--shadow-s); border-color: rgba(184,134,11,0.3); }
.chant-card-header {
  padding: 1.2rem 1.4rem; display: flex; align-items: flex-start; gap: 12px;
}
.chant-part-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; padding: 3px 10px; border-radius: 8px;
  background: var(--purple-bg); color: var(--purple);
}
.chant-lyrics {
  background: var(--cream2); margin: 0 1.4rem; border-radius: 10px;
  padding: 1rem 1.2rem;
  font-family: 'Cormorant Garamond', serif; font-size: 1.05rem;
  color: var(--text); line-height: 2; white-space: pre-wrap;
}
.chant-tabs { display: flex; gap: 6px; padding: 1rem 1.4rem 0; }
.chant-tab {
  padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700;
  cursor: pointer; border: 1px solid var(--border); color: var(--text-m);
  background: transparent; transition: all var(--transition);
}
.chant-tab.active { background: var(--gold); color: white; border-color: var(--gold); }
.chant-content-panel { display: none; padding: 0 1.4rem 1.4rem; margin-top: 1rem; }
.chant-content-panel.active { display: block; }

/* ===== PRIERE CARD ===== */
.priere-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
  transition: all var(--transition); cursor: pointer;
}
.priere-card:hover { box-shadow: var(--shadow-s); border-color: rgba(184,134,11,0.3); }
.priere-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 0.8rem; }
.priere-category-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: var(--purple-bg); display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.priere-card-title { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 700; }
.priere-card-meta { font-size: 12px; color: var(--text-s); margin-top: 2px; }
.priere-card-preview {
  font-size: 13px; color: var(--text-m); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.priere-expand {
  margin-top: 1rem; border-top: 1px solid var(--border-s); padding-top: 1rem;
  display: none;
}
.priere-expand.open { display: block; }
.priere-full-text {
  font-size: 0.95rem; color: var(--text-m); line-height: 2;
  white-space: pre-wrap; font-family: 'Cormorant Garamond', serif; font-size: 1.05rem;
}

/* ===== ADMIN MODULE SIDEBAR ===== */
.admin-module-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 2px 7px; border-radius: 6px;
  margin-left: auto; background: var(--gold-bg); color: var(--gold);
}

/* ===== FORM EDITOR (rich text areas) ===== */
.form-textarea-rich {
  width: 100%; min-height: 160px; padding: 12px 16px;
  background: var(--cream2); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 15px;
  transition: border-color var(--transition); outline: none;
  resize: vertical; line-height: 1.75;
}
.form-textarea-rich:focus { border-color: var(--gold); background: white; }

/* ===== SEQUENCE PRIERE ===== */
.sequence-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: all var(--transition);
}
.sequence-card:hover { box-shadow: var(--shadow-s); }
.sequence-steps {
  display: flex; flex-direction: column; gap: 8px; margin-top: 1rem;
}
.sequence-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--cream2); border-radius: 10px;
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold); color: white; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .module-hero { padding: 4rem 1rem 2.5rem; }
  .module-hero h1 { font-size: 1.8rem; }
  .spiritual-detail { padding: 1.5rem 1rem; }
  .chant-tabs { overflow-x: auto; }
  .audio-player-inline { flex-wrap: wrap; }
  .apl-label { min-width: auto; }
  .live-embed-wrap { border-radius: 10px; }
}

@media (max-width: 480px) {
  .day-tabs { width: 100%; }
  .day-tab { flex: 1; text-align: center; }
}
