/* ===== INVOCATIONS PREMIUM - Ma'rifat Allah =====
   Fichier : css/invocations-styles.css
   Référencé dans le HTML comme : <link rel="stylesheet" href="css/invocations-styles.css">
===================================================== */

/* ===== ONGLETS LECTURE ===== */
.lecture-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  background: white;
  border-radius: 14px;
  padding: 0.4rem;
  box-shadow: 0 2px 12px rgba(45, 95, 79, 0.1);
  width: fit-content;
  border: 1.5px solid rgba(45, 95, 79, 0.08);
}

.lecture-tab-btn {
  padding: 0.75rem 2rem;
  border: none;
  background: transparent;
  color: #888;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
}

.lecture-tab-btn:hover {
  background: rgba(45, 95, 79, 0.07);
  color: #2D5F4F;
}

.lecture-tab-btn.active {
  background: linear-gradient(135deg, #2D5F4F, #4A8B73);
  color: white;
  box-shadow: 0 4px 14px rgba(45, 95, 79, 0.3);
}

.lecture-tab-content {
  display: none;
}

.lecture-tab-content.active {
  display: block;
  animation: invFadeUp 0.4s ease;
}

/* ===== STATS BAR ===== */
.inv-stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a3a2e, #2D5F4F);
  border-radius: 16px;
  padding: 1.25rem 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inv-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem;
}

.inv-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #C9A661;
}

.inv-stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  white-space: nowrap;
}

.inv-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
}

/* ===== FILTRES DE CATÉGORIES ===== */
.invocations-categories-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 70px;
  background: var(--bg, #FAF9F7);
  z-index: 10;
  border-bottom: 1px solid rgba(45, 95, 79, 0.1);
}

.inv-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  background: white;
  border: 2px solid rgba(45, 95, 79, 0.12);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
}

.inv-filter-btn:hover {
  border-color: var(--cat-color, #2D5F4F);
  color: var(--cat-color, #2D5F4F);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.inv-filter-btn.active {
  background: var(--cat-color, #2D5F4F);
  border-color: var(--cat-color, #2D5F4F);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.inv-filter-icon { font-size: 1rem; }

/* ===== EN-TÊTES DE SECTION ===== */
.inv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid rgba(45, 95, 79, 0.08);
  flex-wrap: wrap;
  gap: 1rem;
}

.inv-section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.inv-section-icon { font-size: 2.5rem; line-height: 1; }

.inv-section-title {
  font-family: 'Amiri', serif;
  font-size: 1.7rem;
  color: #2D5F4F;
  margin: 0 0 0.2rem;
}

.inv-section-subtitle {
  font-size: 0.95rem;
  color: #888;
  margin: 0;
}

.inv-section-count {
  background: rgba(45, 95, 79, 0.08);
  color: #2D5F4F;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== SECTION PROPHÈTES ===== */
.inv-prophets-section { margin-bottom: 4rem; }

.prophets-header {
  background: linear-gradient(135deg, rgba(201, 166, 97, 0.08), rgba(45, 95, 79, 0.05));
  border-radius: 16px;
  padding: 1.5rem;
  border-bottom: none !important;
  margin-bottom: 2rem;
}

.prophets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

/* ===== CARTE PROPHÈTE ===== */
.prophet-inv-card {
  background: white;
  border-radius: 24px;
  padding: 1.75rem;
  border: 2px solid rgba(201, 166, 97, 0.2);
  box-shadow: 0 4px 24px rgba(45, 95, 79, 0.08);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.prophet-inv-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #C9A661, #2D5F4F, #4A8B73);
}

.prophet-inv-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(45, 95, 79, 0.15);
  border-color: rgba(201, 166, 97, 0.5);
}

.prophet-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.prophet-emoji-wrapper {
  position: relative;
  width: 56px; height: 56px;
  flex-shrink: 0;
}

.prophet-emoji {
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  position: relative;
  z-index: 1;
}

.prophet-emoji-glow {
  position: absolute;
  inset: -4px;
  background: radial-gradient(circle, rgba(201, 166, 97, 0.3), transparent 70%);
  border-radius: 50%;
}

.prophet-info { flex: 1; }

.prophet-badge {
  display: inline-block;
  background: linear-gradient(135deg, #C9A661, #B8944F);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  margin-bottom: 0.3rem;
}

.prophet-name {
  font-family: 'Amiri', serif;
  font-size: 1.35rem;
  color: #2D5F4F;
  margin: 0;
}

/* Boîte histoire */
.prophet-story-box {
  display: flex;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(45, 95, 79, 0.04), rgba(74, 139, 115, 0.06));
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-left: 3px solid #2D5F4F;
}

.story-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; margin-top: 0.1rem; }
.story-content { flex: 1; }
.story-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #2D5F4F; margin-bottom: 0.4rem; }
.story-text { font-size: 0.95rem; color: #444; line-height: 1.7; margin: 0; }

/* Boîte miracle */
.prophet-miracle-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(201, 166, 97, 0.1), rgba(201, 166, 97, 0.05));
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
}

.miracle-star { font-size: 1.3rem; flex-shrink: 0; }
.miracle-content { flex: 1; }
.miracle-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #B8944F; display: block; margin-bottom: 0.2rem; }
.miracle-text { font-size: 0.9rem; color: #444; font-style: italic; line-height: 1.5; }

/* Boîte invocation */
.prophet-dua-box {
  background: linear-gradient(135deg, #1a3a2e, #2D5F4F);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.prophet-arabic {
  font-family: 'Amiri', serif !important;
  font-size: 1.6rem !important;
  color: #F0E6C8 !important;
  line-height: 1.8 !important;
  direction: rtl !important;
  margin-bottom: 0.75rem !important;
}

.prophet-dua-box .inv-transcription {
  font-size: 0.875rem;
  color: rgba(240, 230, 200, 0.7);
  font-style: italic;
  margin-bottom: 0.6rem;
}

.prophet-dua-box .inv-translation {
  font-size: 1rem;
  color: #C9A661;
  font-weight: 500;
  line-height: 1.6;
  margin: 0;
}

.prophet-explanation {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.prophet-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(45, 95, 79, 0.1);
}

/* ===== GRILLE RÉGULIÈRE ===== */
.inv-regular-section { margin-bottom: 3rem; }

.inv-regular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* ===== CARTE RÉGULIÈRE ===== */
.inv-card {
  background: white;
  border-radius: 18px;
  padding: 1.5rem;
  border: 1.5px solid rgba(45, 95, 79, 0.1);
  box-shadow: 0 2px 12px rgba(45, 95, 79, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.inv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(45, 95, 79, 0.12);
  border-color: rgba(45, 95, 79, 0.25);
}

.inv-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inv-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  background: rgba(45, 95, 79, 0.08);
  color: var(--badge-color, #2D5F4F);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(45, 95, 79, 0.15);
}

.inv-times-badge {
  margin-left: auto;
  background: rgba(201, 166, 97, 0.12);
  color: #B8944F;
  padding: 0.3rem 0.65rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

.inv-copy-btn {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 0.4rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-copy-btn:hover {
  background: rgba(45, 95, 79, 0.08);
  color: #2D5F4F;
}

.inv-times-badge ~ .inv-copy-btn { margin-left: 0; }

.inv-situation-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2D5F4F;
  padding: 0.5rem 0.75rem;
  background: rgba(45, 95, 79, 0.05);
  border-radius: 8px;
}

/* Textes invocations */
.inv-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.45rem;
  color: #2D5F4F;
  text-align: center;
  direction: rtl;
  line-height: 1.9;
  margin: 0.25rem 0;
}

.inv-transcription {
  font-size: 0.875rem;
  color: #888;
  text-align: center;
  font-style: italic;
  margin: 0;
}

.inv-translation {
  font-size: 1rem;
  color: #333;
  text-align: center;
  font-weight: 500;
  line-height: 1.65;
  margin: 0;
}

.inv-explanation {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.7;
  margin: 0;
  padding: 0.75rem;
  background: rgba(45, 95, 79, 0.03);
  border-radius: 10px;
  border-left: 2px solid rgba(45, 95, 79, 0.2);
}

/* Pied de carte */
.inv-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(45, 95, 79, 0.08);
}

.inv-when-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #888;
  background: rgba(45, 95, 79, 0.05);
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  flex: 1;
  min-width: 0;
}

.inv-when-badge span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-reference-tag {
  font-size: 0.75rem;
  color: #B8944F;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

/* ===== ANIMATIONS ===== */
.inv-animate-in {
  animation: invFadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes invFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== MODE SOMBRE ===== */
[data-theme="dark"] .inv-filter-btn {
  background: #1e2a26;
  border-color: rgba(255,255,255,0.1);
  color: #e0e0e0;
}

[data-theme="dark"] .inv-filter-btn.active { color: white; }

[data-theme="dark"] .prophet-inv-card,
[data-theme="dark"] .inv-card {
  background: #1e2a26;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .prophet-story-box {
  background: rgba(255,255,255,0.04);
}

[data-theme="dark"] .prophet-miracle-box {
  background: rgba(201, 166, 97, 0.08);
}

[data-theme="dark"] .story-text,
[data-theme="dark"] .prophet-explanation,
[data-theme="dark"] .miracle-text { color: #ccc; }

[data-theme="dark"] .inv-arabic { color: #7EC8A4; }
[data-theme="dark"] .inv-translation { color: #e0e0e0; }

[data-theme="dark"] .inv-explanation {
  background: rgba(255,255,255,0.03);
  border-left-color: rgba(255,255,255,0.15);
  color: #aaa;
}

[data-theme="dark"] .inv-section-count {
  background: rgba(255,255,255,0.06);
  color: #7EC8A4;
}

[data-theme="dark"] .invocations-categories-filter {
  background: #0f1a16;
  border-bottom-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .lecture-tabs { background: #1e2a26; }

[data-theme="dark"] .inv-section-title { color: #7EC8A4; }
[data-theme="dark"] .prophet-name { color: #7EC8A4; }
[data-theme="dark"] .story-label { color: #7EC8A4; }
[data-theme="dark"] .inv-situation-title { color: #7EC8A4; }
[data-theme="dark"] .inv-section-subtitle { color: #aaa; }
[data-theme="dark"] .inv-transcription { color: #999; }
[data-theme="dark"] .inv-when-badge { color: #aaa; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .prophets-grid { grid-template-columns: 1fr; }
  .inv-regular-grid { grid-template-columns: 1fr; }

  .inv-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .inv-section-title { font-size: 1.4rem; }
  .prophet-inv-card { padding: 1.25rem; }
  .prophet-arabic { font-size: 1.4rem !important; }

  .invocations-categories-filter {
    top: 60px;
    gap: 0.4rem;
  }

  .inv-filter-btn {
    font-size: 0.8rem;
    padding: 0.45rem 0.85rem;
  }

  .lecture-tabs { width: 100%; }
  .lecture-tab-btn { flex: 1; font-size: 0.9rem; padding: 0.65rem 1rem; }

  .inv-stats-bar { padding: 1rem; }
  .inv-stat-item { padding: 0 0.75rem; }
  .inv-stat-num { font-size: 1.2rem; }
}


.inv-total-badge {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #2D5F4F, #4A8B73);
  color: white;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(45, 95, 79, 0.3);
}