/* Page Appels : collègues et historique côte à côte, panneau d'appel en tête. */

.calls-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  align-items: start;
  gap: 16px;
}

/* --- Appel en cours --- */
.call-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-bottom: 16px;
  padding: 20px 24px;
  border-color: var(--color-accent-border);
  box-shadow: var(--shadow-card), var(--glow-accent);
}

/* Halo qui pulse autour de l'avatar pendant la sonnerie et la communication. */
.call-panel-avatar .avatar {
  box-shadow: 0 0 0 0 rgb(34 197 94 / 45%);
  animation: call-avatar-pulse 1.6s ease-out infinite;
}

@keyframes call-avatar-pulse {
  70% { box-shadow: 0 0 0 16px rgb(34 197 94 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0%); }
}

.call-panel-text {
  flex: 1 1 200px;
}

.call-panel-text h2 {
  margin: 0 0 2px;
  font-size: 1.2rem;
}

.call-panel-status {
  margin: 0;
  color: var(--color-text-muted);
}

.call-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.call-panel-actions [aria-pressed="true"] {
  background: var(--color-danger-fill);
  border-color: var(--color-danger-border);
  color: var(--color-danger);
}

/* --- Listes --- */
.call-contact-list,
.call-history-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.call-contact-item,
.call-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
}

.call-contact-item:hover,
.call-history-item:hover {
  background: var(--color-surface-hover);
}

.call-contact-text,
.call-history-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.call-contact-name,
.call-history-name {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-contact-presence,
.call-history-details {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.call-contact-item-online .call-contact-presence {
  color: var(--color-success);
}

.call-history-direction {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--color-surface-muted);
  border-radius: 50%;
  color: var(--color-text-soft);
}

.call-history-direction .icon {
  width: 18px;
  height: 18px;
}

.call-history-status-missed .call-history-direction,
.call-history-status-failed .call-history-direction {
  background: var(--color-danger-fill);
  color: var(--color-danger);
}

.call-history-status-missed .call-history-name,
.call-history-status-failed .call-history-name {
  color: var(--color-danger);
}

.call-history-status-answered .call-history-direction {
  background: var(--color-accent-fill);
  color: var(--color-accent-strong);
}
