/* ══ JOSUÉ — COMPOSANTS ══════════════════════════════════ */

/* ══ CARTES ══════════════════════════════════════════════════════ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -.1px;
}

.card-body { padding: 22px; }
.card-body-flush { padding: 0; }

.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-soft);
  background: rgba(247,244,239,.6);
}

/* Card premium */
.card-premium {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  border: none;
  color: white;
}

.card-premium .card-title { color: var(--gold-bright); }

/* ══ CARTES STATISTIQUES ═════════════════════════════════════════ */
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--dur);
}

.stat-card:hover { box-shadow: var(--shadow); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--dur);
}

.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 14px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -.5px;
}

.stat-sub {
  font-size: 11.5px;
  color: var(--success);
  margin-top: 5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-sub.neutral { color: var(--text-muted); }
.stat-sub.warning { color: var(--warning); }

/* ══ BOUTONS ══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--dur) var(--ease-smooth);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .1px;
}

.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(11,31,75,.2);
}
.btn-primary:hover { background: var(--navy-mid); box-shadow: 0 4px 16px rgba(11,31,75,.3); transform: translateY(-1px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--white);
  box-shadow: 0 2px 10px rgba(201,151,28,.35);
}
.btn-gold:hover { box-shadow: 0 4px 18px rgba(201,151,28,.5); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

.btn-ghost {
  background: var(--parchment);
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--border); color: var(--text); }

.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover { background: #9a2424; }

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-lg { padding: 12px 26px; font-size: 14px; }
.btn-xl { padding: 14px 32px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }

/* ══ BADGES & PASTILLES ══════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}

.badge-sent     { background: var(--success-bg); color: var(--success); }
.badge-scheduled{ background: var(--gold-pale); color: var(--gold-muted); }
.badge-draft    { background: var(--parchment); color: var(--text-muted); border: 1px solid var(--border); }
.badge-danger   { background: var(--danger-bg); color: var(--danger); }
.badge-info     { background: var(--info-bg); color: var(--info); }
.badge-gold     { background: rgba(201,151,28,.12); color: var(--gold-muted); }

.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.pill-wa    { background: #E7F8EE; color: #1A7D4A; }
.pill-sms   { background: #EEF3FB; color: var(--navy); }
.pill-email { background: var(--gold-pale); color: var(--gold-muted); }

/* Pastille de statut */
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-sent      { background: var(--success); }
.dot-scheduled { background: var(--gold); }
.dot-draft     { background: var(--text-light); }
.dot-online    { background: var(--success); animation: dotPulse 2s ease-in-out infinite; }

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,125,74,.5); }
  50%       { box-shadow: 0 0 0 5px rgba(26,125,74,.0); }
}

/* Pastille de statut API */
.api-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
}
.api-status.online  { background: var(--success-bg); color: var(--success); }
.api-status.offline { background: var(--danger-bg); color: var(--danger); }

/* ══ FORMULAIRES ══════════════════════════════════════════════════ */
.form-field { margin-bottom: 16px; }

.form-label, .settings-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 7px;
}

.form-input, .settings-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}

.form-input:focus, .settings-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,28,.12);
}

select {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: border-color var(--dur);
}
select:focus { border-color: var(--gold); }

.search-input {
  padding: 9px 14px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
  width: 260px;
}
.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,28,.12);
}

.search-wrap {
  position: relative;
}
.search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  pointer-events: none;
}

textarea.msg-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  resize: vertical;
  min-height: 170px;
  background: var(--white);
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
textarea.msg-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,151,28,.1);
}

/* Interrupteur */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.toggle-wrap:last-child { border-bottom: none; }

.toggle-info .toggle-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.toggle-info .toggle-desc  { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

.toggle {
  width: 46px; height: 26px;
  border-radius: 13px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background .22s var(--ease-smooth);
  flex-shrink: 0;
}
.toggle.on { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); }
.toggle::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--white);
  top: 3px; left: 3px;
  transition: transform .22s var(--ease-smooth);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle.on::after { transform: translateX(20px); }

/* ══ TABLES ═══════════════════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
  font-weight: 700;
  white-space: nowrap;
  background: rgba(247,244,239,.5);
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(201,151,28,.03); }

.member-name  { font-weight: 600; color: var(--navy); }
.member-email { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.engagement-bar {
  width: 72px; height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.engagement-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  border-radius: 3px;
  transition: width .5s var(--ease-smooth);
}

/* ══ BANNIÈRE DE VERSET ══════════════════════════════════════════ */
.dashboard-welcome {
  font-size: 15px;
  margin-bottom: 14px;
}

.dashboard-welcome-greeting {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  margin-right: 6px;
}

.dashboard-welcome-message {
  font-style: italic;
  color: var(--text-light);
}

.verse-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: var(--radius-lg);
  padding: 26px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
  overflow: hidden;
}

.verse-banner::before {
  content: '✦';
  position: absolute;
  right: -20px; bottom: -30px;
  font-size: 140px;
  color: rgba(201,151,28,.06);
  font-family: var(--font-display);
  pointer-events: none;
  line-height: 1;
}

.verse-banner-icon {
  font-size: 30px;
  color: var(--gold);
  flex-shrink: 0;
  opacity: .9;
}

.verse-banner-text { flex: 1; }

.verse-quote {
  font-family: var(--font-display);
  font-size: 16px;
  color: rgba(255,255,255,.92);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 5px;
}

.verse-ref {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}

/* ══ CARTE DE VERSET (Bible) ═════════════════════════════════════ */
.verse-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 14px;
  transition: box-shadow var(--dur), transform var(--dur);
}

.verse-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.verse-card .vc-ref {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.verse-card .vc-text {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 12px;
}

.verse-card .vc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.verse-themes {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.theme-tag {
  font-size: 10.5px;
  padding: 2px 8px;
  background: var(--gold-pale);
  color: var(--gold-muted);
  border-radius: 20px;
  font-weight: 600;
}

.search-method-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.vc-context {
  display: none;
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
  margin-bottom: 4px;
  padding-top: 4px;
}

.vc-context.open {
  display: block;
}

.vc-context-line {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 3px 0;
}

.vc-context-line.target {
  color: var(--text);
  font-weight: 600;
}

.vc-context-verse {
  display: inline-block;
  min-width: 18px;
  color: var(--gold-muted);
  font-weight: 700;
  font-size: 10.5px;
}

/* ══ ÉLÉMENTS D'ACTIVITÉ ═════════════════════════════════════════ */
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--dur);
}

.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: rgba(201,151,28,.025); }

.activity-info { flex: 1; min-width: 0; }
.activity-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ══ BOUTONS DE THÈME (créateur de message) ═══════════════════════ */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 18px; }

.theme-btn {
  padding: 11px 8px 10px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  text-align: center;
  transition: all var(--dur) var(--ease-smooth);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.theme-btn:hover {
  border-color: var(--gold);
  color: var(--gold-muted);
  background: var(--gold-pale);
}

.theme-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(201,151,28,.12), rgba(201,151,28,.05));
  color: var(--gold-muted);
}

.theme-icon { font-size: 20px; display: block; margin-bottom: 5px; }

/* ══ TÉLÉPHONE D'APERÇU ══════════════════════════════════════════ */
.preview-phone {
  background: #1A1A2E;
  border-radius: 18px;
  padding: 16px;
  border: 2px solid rgba(255,255,255,.07);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.preview-avatar {
  width: 33px; height: 33px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-muted));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy-deep);
  flex-shrink: 0;
}

.preview-bubble {
  background: #2D2D42;
  border-radius: 4px 14px 14px 14px;
  padding: 12px 15px;
  max-width: 96%;
}

.preview-bubble-text {
  color: rgba(255,255,255,.88);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.preview-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.preview-tab {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--parchment);
  color: var(--text-muted);
  transition: all var(--dur);
  font-family: var(--font-body);
}

.preview-tab.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ══ CHARGEMENT ═══════════════════════════════════════════════════ */
.ai-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px 0;
}

.dot-pulse { display: flex; gap: 4px; }
.dot-pulse span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: dotBounce 1.3s ease-in-out infinite;
}
.dot-pulse span:nth-child(2) { animation-delay: .15s; }
.dot-pulse span:nth-child(3) { animation-delay: .30s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(.65); opacity: .4; }
  40%            { transform: scale(1);   opacity: 1;  }
}

/* ══ TOAST ════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--navy-deep);
  color: var(--white);
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: 9999;
  transform: translateY(16px);
  opacity: 0;
  transition: all .3s var(--ease);
  box-shadow: 0 8px 32px rgba(11,31,75,.35);
  border-left: 3px solid var(--gold);
  max-width: 360px;
  pointer-events: none;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }

/* ══ GRAPHIQUE STATISTIQUES ═══════════════════════════════════════
   Le contenu est un <svg viewBox="0 0 W H"> injecté par Analytics
   (js/bible-analytics-settings.js), pas des divs .bar — sans une
   hauteur explicite sur le svg lui-même, un <svg width="100%"> sans
   attribut height prend une hauteur intrinsèque dérivée de son
   viewBox, largement supérieure aux 180px voulus (texte/axes énormes,
   débordement de la carte). */
.stats-chart {
  height: 210px;
  padding: 10px 0 0;
}

.stats-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ══ PARAMÈTRES — CANAUX DE DIFFUSION ═══════════════════════════════ */
.channel-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
}
.channel-block:first-child { padding-top: 0; }

.channel-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
}

.channel-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--border-soft);
  color: var(--text-muted);
}
.channel-badge.configured { background: var(--success-bg); color: var(--success); }

.channel-block button.btn { margin-top: 10px; }

/* ══ ÉLÉMENT DE PROGRAMMATION RAPIDE ═════════════════════════════ */
.schedule-item {
  background: linear-gradient(90deg, var(--gold-pale), rgba(250,243,224,.4));
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 9px 14px;
  margin-bottom: 8px;
}

.schedule-time { font-size: 10px; color: var(--gold-muted); font-weight: 700; text-transform: uppercase; }
.schedule-title { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 2px; }

/* ══ CARTE PODCAST ═══════════════════════════════════════════════ */
.podcast-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  transition: box-shadow var(--dur), transform var(--dur);
  cursor: pointer;
}

.podcast-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.podcast-cover {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.podcast-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(201,151,28,.2), transparent 60%);
}

.podcast-cover.has-image { font-size: 0; }
.podcast-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.podcast-info { padding: 14px 16px; }
.podcast-title { font-weight: 700; font-size: 13.5px; color: var(--navy); margin-bottom: 3px; }
.podcast-meta  { font-size: 11px; color: var(--text-muted); }
.podcast-duration { font-size: 11px; color: var(--gold-muted); font-weight: 600; margin-top: 6px; }

/* Lecteur audio mini */
.audio-player {
  background: var(--navy-deep);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.audio-play-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: box-shadow var(--dur);
}

.audio-play-btn:hover { box-shadow: 0 0 0 6px rgba(201,151,28,.2); }

.audio-info { flex: 1; min-width: 0; }
.audio-title { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); margin-bottom: 4px; }

.audio-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.audio-progress {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width .5s linear;
}

.audio-time { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 4px; }

/* ══ CARTES ARCHÉOLOGIE / HISTOIRE ═══════════════════════════════ */
.discovery-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  padding: 20px 22px;
  margin-bottom: 14px;
  display: flex;
  gap: 16px;
  transition: box-shadow var(--dur);
}

.discovery-card:hover { box-shadow: var(--shadow); }

.discovery-year {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  min-width: 60px;
  text-align: center;
  padding-top: 2px;
}

.discovery-body { flex: 1; }
.discovery-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.discovery-text  { font-size: 13px; color: var(--text-soft); line-height: 1.65; }
.discovery-source { font-size: 11px; color: var(--text-muted); margin-top: 7px; font-style: italic; }

.discovery-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-bg);
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 6px;
}

/* ══ ENTRÉE DE DICTIONNAIRE ══════════════════════════════════════ */
.dict-entry {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}

.dict-entry:last-child { border-bottom: none; }

.dict-word {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}

.dict-phonetic { font-size: 12px; color: var(--text-muted); font-style: italic; margin-bottom: 8px; }
.dict-def      { font-size: 13.5px; color: var(--text-soft); line-height: 1.7; }
.dict-refs     { font-size: 11.5px; color: var(--gold-muted); margin-top: 7px; font-weight: 600; }

/* ══ ONGLETS ═════════════════════════════════════════════════════ */
.tab-bar {
  display: flex;
  gap: 2px;
  background: var(--parchment);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 22px;
  border: 1px solid var(--border-soft);
  width: fit-content;
}

.tab {
  padding: 7px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--dur);
  border: none;
  background: none;
  font-family: var(--font-body);
}

.tab:hover { color: var(--text); }

.tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-xs);
}

/* ══ ÉTAT VIDE ════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 40px; margin-bottom: 14px; opacity: .5; }
.empty-state-title { font-family: var(--font-display); font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.empty-state-text  { font-size: 13px; max-width: 300px; margin: 0 auto 18px; }

/* ══ BLOC DE VALIDATION ══════════════════════════════════════════ */
.validation-block {
  border-radius: 9px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.validation-block.ok   { background: var(--success-bg); color: var(--success); }
.validation-block.warn { background: var(--warning-bg); color: var(--warning); }
.validation-block.danger { background: var(--danger-bg); color: var(--danger); }

/* ══ ERREUR DE CONNEXION ═════════════════════════════════════════ */
.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
  border-left: 3px solid var(--danger);
}
.login-error.show { display: flex; align-items: center; gap: 6px; }

.login-success {
  background: var(--success-bg);
  color: var(--success);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  border-left: 3px solid var(--success);
}

.login-links {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12.5px;
}

.login-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.login-links a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.form-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ══ VALIDATION PASTORALE ══════════════════════════════════════
   Chaque contenu sensible est traité comme un manuscrit sous
   sceau : un cachet coloré signale la doctrine concernée, le
   texte se lit tel qu'il sera reçu par le fidèle.
   ================================================================ */
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}
.review-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--navy);
}
.review-subtitle {
  margin-top: 6px;
  max-width: 560px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}
.review-count-badge {
  flex-shrink: 0;
  background: var(--navy);
  color: var(--gold-bright);
  padding: 8px 18px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.review-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.review-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 26px 28px 22px;
  overflow: hidden;
  transition: box-shadow var(--dur) var(--ease-smooth);
}
.review-card:hover { box-shadow: var(--shadow); }

/* Cachet doctrinal — signature visuelle du module */
.review-seal {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px;
}
.review-seal::before {
  content: '';
  position: absolute;
  top: -32px;
  right: -32px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  opacity: .10;
}
.review-seal.theme-finance::before      { background: var(--warning); }
.review-seal.theme-guerison::before     { background: var(--info); }
.review-seal.theme-eschatologie::before { background: var(--gold); }
.review-seal.theme-keyword::before      { background: var(--danger); }

.review-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.review-flag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.review-flag-chip.theme-finance      { background: var(--warning-bg); color: var(--warning); }
.review-flag-chip.theme-guerison     { background: var(--info-bg);    color: var(--info); }
.review-flag-chip.theme-eschatologie { background: var(--gold-pale);  color: var(--gold-muted); }
.review-flag-chip.theme-keyword      { background: var(--danger-bg);  color: var(--danger); }

.review-content {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  padding: 18px 20px;
  background: var(--parchment);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  white-space: pre-wrap;
}

.review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review-note-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  background: var(--white);
}
.review-note-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-line);
}

/* Verdict de la classification IA (2e couche du garde-fou, C3) */
.review-flag-chip.theme-conversation { background: var(--gold-pale); color: var(--gold-muted); }
.review-seal.theme-conversation::before { background: var(--gold); }

.verdict-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.verdict-chip.approved         { background: var(--success-bg); color: var(--success); }
.verdict-chip.concerns         { background: var(--warning-bg); color: var(--warning); }
.verdict-chip.requiresHumanReview { background: var(--danger-bg); color: var(--danger); }
.verdict-reason {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ── Transferts pastoraux (C2) ──────────────────────────────────── */
.transfer-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  cursor: pointer;
  transition: box-shadow var(--dur);
}
.transfer-card:hover { box-shadow: var(--shadow); }

.transfer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.transfer-card-member {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}
.transfer-card-time {
  font-size: 11.5px;
  color: var(--text-muted);
}
.transfer-card-message {
  font-size: 13.5px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 10px;
}

.pastoral-status-select {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 12px;
  background: var(--white);
}

/* ── Modale simple (détail conversation transférée) ─────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,31,75,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: min(600px, 92vw);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-header h3 { font-family: var(--font-display); font-size: 16px; color: var(--text); }
.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.4;
}

.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 40px; margin-bottom: 14px; opacity: .5; }
.empty-state-title { font-family: var(--font-display); font-size: 19px; color: var(--text-soft); }
.empty-state-sub { font-size: 13px; margin-top: 6px; }

/* ══ BANNIÈRE D'ALERTE — VALIDATION PASTORALE ═══════════════════
   Visible uniquement quand une action est requise. Pas de bruit
   visuel permanent — elle apparaît, on agit, elle disparaît.
   ================================================================ */
.review-alert-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--gold-pale), var(--white));
  border: 1px solid var(--gold-line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow var(--dur) var(--ease-smooth), transform var(--dur) var(--ease-smooth);
}
.review-alert-banner:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}
.review-alert-icon {
  font-size: 26px;
  flex-shrink: 0;
}
.review-alert-text { flex: 1; }
.review-alert-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}
.review-alert-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.review-alert-arrow {
  font-size: 18px;
  color: var(--gold-muted);
  flex-shrink: 0;
}

/* ══ MODALE — MESSAGE DIRECT ═══════════════════════════════════
   Signature : une lettre scellée, pas une fenêtre générique.
   Le cachet en tête rappelle le module de validation pastorale —
   cohérence visuelle du produit, pas un composant isolé.
   ================================================================ */
.dm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 21, 47, .55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: dmFadeIn var(--dur) var(--ease-smooth);
}
@keyframes dmFadeIn { from { opacity: 0; } to { opacity: 1; } }

.dm-letter {
  width: 480px;
  max-width: 90vw;
  background: var(--parchment);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: dmRise 220ms var(--ease);
}
@keyframes dmRise {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dm-seal {
  width: 44px;
  height: 44px;
  margin: 22px auto 0;
  background: var(--navy);
  color: var(--gold-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-gold);
}

.dm-header {
  text-align: center;
  padding: 12px 28px 20px;
  border-bottom: 1px solid var(--border);
}
.dm-to-label {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dm-recipient-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 4px;
}

.dm-body { padding: 22px 28px; }
.dm-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  resize: vertical;
}
.dm-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-line);
}

.dm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px 24px;
}

/* ── Confirmation (remplace window.confirm — 25/07/2026, jugé trop
   austère par Alain) : même overlay que dm-overlay, boîte plus compacte
   puisqu'il n'y a jamais de champ à remplir, juste une décision. ──── */
.confirm-box {
  width: 380px;
  max-width: 90vw;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px 24px;
  text-align: center;
  animation: dmRise 220ms var(--ease);
}

.confirm-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--gold-pale);
  color: var(--gold-muted);
}
.confirm-icon.danger { background: var(--danger-bg); color: var(--danger); }

.confirm-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-soft);
  margin-bottom: 22px;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
