/* Suada Sovereign Sales Restitution & Executive Summary (Dinia.ai) */

/* Dual Tabs Navigation */
.restitution-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
  margin-bottom: 18px;
  margin-top: 14px;
}
.restitution-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.restitution-tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-main);
}
.restitution-tab.active {
  background: var(--suada-gold-dim);
  border-color: var(--suada-gold);
  color: var(--suada-gold);
  box-shadow: 0 0 12px var(--suada-gold-glow);
}
/* Executive Summary View Container */
.exec-summary-card {
  background: rgba(7, 10, 19, 0.65);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}
.exec-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 16px;
}
.exec-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(204, 159, 51, 0.12);
  border: 1px solid var(--suada-gold);
  color: var(--suada-gold);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.exec-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.exec-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
/* Participants Grid */
.participants-section {
  margin-bottom: 20px;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--suada-gold);
  margin-bottom: 10px;
}
.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.participant-chip {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.participant-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--suada-gold-dim);
  border: 1px solid var(--suada-gold);
  color: var(--suada-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.participant-info {
  min-width: 0;
}
.participant-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.participant-role {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Challenges & Decisions Cards */
.exec-block {
  background: rgba(13, 19, 34, 0.8);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.exec-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.exec-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exec-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.45;
}
.exec-bullet-item i {
  color: var(--suada-gold);
  flex-shrink: 0;
  margin-top: 3px;
}
.decision-card {
  background: rgba(204, 159, 51, 0.05);
  border-left: 3px solid var(--suada-gold);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 8px;
}
.decision-topic {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--suada-gold);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.decision-text {
  font-size: 0.85rem;
  color: #f1f5f9;
}
/* Action Plan Table */
.action-plan-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}
.action-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}
.action-plan-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--suada-gold);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
}
.action-plan-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}
.action-plan-table tr:last-child td {
  border-bottom: none;
}
.owner-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid #38bdf8;
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 600;
}
/* 1-Tap Action Toolbar */
.exec-actions-bar {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.btn-exec-action {
  flex: 1;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-exec-primary {
  background: var(--suada-gold);
  border: 1px solid var(--suada-gold);
  color: #070a13;
}
.btn-exec-primary:hover {
  background: var(--suada-gold-hover);
  box-shadow: 0 0 16px var(--suada-gold-glow);
}
.btn-exec-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-main);
}
.btn-exec-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-exec-pdf {
  background: rgba(197, 168, 128, 0.12);
  border: 1px solid var(--suada-gold);
  color: var(--suada-gold-hover);
}
.btn-exec-pdf:hover {
  background: var(--suada-gold);
  color: #070a13;
  box-shadow: 0 0 16px var(--suada-gold-glow);
}

/* --- Large Debriefing Slide-Over Drawer (Desktop 880px / Mobile Fullscreen) --- */
.result-actions-center {
  display: flex;
  justify-content: center;
  margin: 16px 0 6px;
}
.btn-debrief-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--suada-gold);
  border: 1px solid var(--suada-gold);
  color: #070a13;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 20px var(--suada-gold-glow);
  transition: all 0.25s ease;
}
.btn-debrief-trigger:hover {
  background: var(--suada-gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 0 28px var(--suada-gold-glow);
}
/* --- Large Debriefing Centered Modal on Desktop / Slide-over Drawer on Mobile --- */

/* Stacking hierarchy: Deep 10-frameworks audit slides above debrief modal */
#auditModalBackdrop {
  z-index: 60;
}
#auditModalBackdrop .drawer-panel {
  z-index: 61;
}
@media (min-width: 769px) {
  #debriefDrawerBackdrop {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
  }
  .drawer-panel.debrief-drawer-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 1060px;
    max-height: calc(92vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 16px;
    border: 1px solid rgba(204, 159, 51, 0.28);
    background: rgba(13, 19, 34, 0.98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 45px rgba(204, 159, 51, 0.12);
    transform: scale(0.96) translateY(12px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
  }
  #debriefDrawerBackdrop.open .drawer-panel.debrief-drawer-panel,
  #leadDrawerBackdrop.open .drawer-panel.debrief-drawer-panel {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  .debrief-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    background: rgba(13, 19, 34, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 25;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }
  .debrief-drawer-header .restitution-tabs {
    margin: 0;
    padding: 0;
    border-bottom: none;
    flex: 1;
  }
  .debrief-drawer-body {
    padding: 22px 26px 32px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* 2 colonnes sur Desktop pour les blocs Enjeux + Décisions (minimise le scroll) */
  .exec-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
  }
  .exec-two-col .exec-block {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}
@media (max-width: 768px) {
  #debriefDrawerBackdrop {
    display: block;
    padding: 0;
  }
  .drawer-panel.debrief-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    max-width: 100%;
    width: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--card-border);
    padding: 0;
    background: rgba(13, 19, 34, 0.98);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  #debriefDrawerBackdrop.open .drawer-panel.debrief-drawer-panel,
  #leadDrawerBackdrop.open .drawer-panel.debrief-drawer-panel {
    transform: translateX(0);
    opacity: 1;
  }
  .debrief-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    background: rgba(13, 19, 34, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 25;
  }
  .debrief-drawer-header .restitution-tabs {
    margin: 0;
    padding: 0;
    border-bottom: none;
    flex: 1;
  }
  .debrief-drawer-body {
    padding: 16px 14px calc(28px + env(safe-area-inset-bottom, 0px));
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .restitution-tab {
    font-size: 0.74rem;
    padding: 8px 6px;
  }
  .participants-grid {
    grid-template-columns: 1fr;
  }
  .exec-two-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
  }
  .exec-two-col .exec-block {
    margin-bottom: 0;
  }
}
/* --- Barrière d'Orientation Acoustique (Verrouillage Portrait Mobile) --- */
.orientation-barrier {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 19, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 99999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}
/* Déclenchement strict sur smartphones en mode paysage (hauteur <= 540px et écran tactile) */
@media screen and (orientation: landscape) and (max-height: 540px) and (pointer: coarse) {
  .orientation-barrier {
    display: flex;
  }
}
.orientation-barrier-card {
  max-width: 440px;
  width: 100%;
  background: rgba(13, 19, 34, 0.9);
  border: 1px solid rgba(204, 159, 51, 0.35);
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(204, 159, 51, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.orientation-phone-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(204, 159, 51, 0.12);
  border: 1px solid var(--suada-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--suada-gold);
  animation: phonePivot 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}
.orientation-phone-icon i {
  width: 26px;
  height: 26px;
}
@keyframes phonePivot {
  0% { transform: rotate(-90deg) scale(0.95); }
  60% { transform: rotate(0deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}
.orientation-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}
.orientation-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}
.orientation-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 6px 14px;
  background: rgba(204, 159, 51, 0.15);
  border: 1px solid rgba(204, 159, 51, 0.3);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--suada-gold);
}
/* ==========================================================================
   Restitution Drawer — Unified Audio Player Bar
   ========================================================================== */
.debrief-audio-bar {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.debrief-audio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.debrief-audio-meta-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
}
.debrief-audio-meta-wrap i {
  color: var(--suada-gold);
  width: 16px;
  height: 16px;
}
.debrief-audio-meta-pill {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
}
/* ==========================================================================
   Home Screen — Processing Progress Banner (Whisper + LLM)
   ========================================================================== */
.processing-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 16px auto;
  max-width: 580px;
  width: 100%;
  box-sizing: border-box;
}
.processing-banner-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #f8fafc;
}
.processing-banner-header i {
  color: var(--suada-gold, #f59e0b);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.processing-banner-desc {
  margin: 6px 0 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}
/* ==========================================================================
   Home Screen — Compact Session Bar Under Recorder
   ========================================================================== */
.last-session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 16px auto;
  max-width: 580px;
  width: 100%;
  box-sizing: border-box;
}
.last-session-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.last-session-info i {
  color: var(--suada-gold);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.last-session-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.last-session-text strong {
  font-size: 0.88rem;
  color: #f8fafc;
}
.last-session-meta {
  font-size: 0.74rem;
  color: #94a3b8;
}
.btn-debrief-trigger-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: #0b0f19;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-debrief-trigger-compact:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.btn-debrief-trigger-compact i {
  width: 15px;
  height: 15px;
}

/* Repérage d'Opportunités — Fiche Lead Terrain */
.lead-drawer-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.15), rgba(30, 41, 59, 0.7));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 8px 16px;
  color: #fbbf24;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.lead-drawer-category-badge i {
  width: 18px;
  height: 18px;
  color: #f59e0b;
}
.debrief-lead-status-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.debrief-lead-status-wrapper .pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: none;
}
.debrief-lead-status-wrapper .pill-badge i {
  width: 14px;
  height: 14px;
}
/* --- Lead Drawer : Plein Écran --- */
@media (min-width: 769px) {
  #leadDrawerBackdrop .drawer-panel.debrief-drawer-panel {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
}
