/* ====== TELEPRO ====== */
#sec-telepro {
  background: linear-gradient(135deg, #f0f4ff 0%, #fef8f3 100%);
  min-height: calc(100vh - 60px);
  padding-bottom: 30px;
}

.tp-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  padding: 20px 24px; margin-bottom: 16px;
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(26,35,126,0.25);
  color: white;
  position: relative; overflow: hidden;
}
.tp-header::before {
  content: ""; position: absolute; top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,171,0,0.25), transparent 60%);
  animation: tpHeaderGlow 5s ease-in-out infinite;
}
@keyframes tpHeaderGlow {
  0%,100% { transform: scale(1); opacity: 0.7; }
  50%     { transform: scale(1.15); opacity: 1; }
}
.tp-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px; font-weight: 900; letter-spacing: 2px;
  margin: 0; color: white;
  position: relative; z-index: 1;
}
.tp-subtitle { font-size: 12px; color: rgba(255,255,255,0.85); margin-top: 4px; position: relative; z-index: 1; }

.tp-stats { display: flex; gap: 12px; position: relative; z-index: 1; }
.tp-stat {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 10px 18px; text-align: center;
  min-width: 90px;
}
.tp-stat-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px; font-weight: 900; color: #ffab00;
  text-shadow: 0 0 12px rgba(255,171,0,0.5);
}
.tp-stat-lab { font-size: 10px; color: rgba(255,255,255,0.9); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

.tp-admin-panel {
  background: white; border-radius: 14px; padding: 20px;
  margin-bottom: 16px; box-shadow: 0 6px 20px rgba(26,35,126,0.08);
}
.tp-section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: 1.5px;
  color: #1a237e; text-transform: uppercase;
  margin: 0 0 14px 0; padding-bottom: 8px; border-bottom: 2px solid #ff6d00;
}
.tp-admin-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
.tp-import-box, .tp-dispatch-box {
  background: linear-gradient(135deg, #fafbff, #fff);
  border: 1px solid #e0e4ff; border-radius: 12px; padding: 16px;
}
.tp-import-box h4, .tp-dispatch-box h4 {
  color: #1a237e; font-size: 14px; margin: 0 0 8px 0;
}
.tp-hint { font-size: 11px; color: #888; margin: 4px 0 10px 0; }
.tp-import-box input[type=file] {
  display: block; margin-bottom: 10px; width: 100%;
  padding: 8px; border: 1px dashed #ff6d00; border-radius: 8px; background: #fff8ec;
}
.tp-result-ok {
  margin-top: 10px; padding: 10px 14px; border-radius: 8px;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: #1b5e20; font-weight: 600; font-size: 13px;
  border-left: 3px solid #2e7d32;
}
.tp-result-err {
  margin-top: 10px; padding: 10px 14px; border-radius: 8px;
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: #c62828; font-weight: 600; font-size: 13px;
  border-left: 3px solid #c62828;
}
.tp-result-err code { background: rgba(0,0,0,0.08); padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.tp-result-info {
  margin-top: 10px; padding: 10px 14px; border-radius: 8px;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #0d47a1; font-weight: 600; font-size: 13px;
  border-left: 3px solid #1565c0;
}

.tp-dispatch-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tp-dispatch-row label { font-size: 12px; font-weight: 600; color: #555; min-width: 150px; }
.tp-telepro-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-telepro-chip {
  background: white; padding: 6px 10px; border-radius: 16px;
  border: 1px solid #e0e4ff; font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.tp-telepro-chip input { accent-color: #ff6d00; }
.tp-chip-count {
  background: #ff6d00; color: white; padding: 1px 7px;
  border-radius: 10px; font-size: 10px; font-weight: 700;
}

.tp-pool-info {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding-top: 14px; border-top: 1px solid #eef;
}
.tp-pool-stat {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-radius: 10px; padding: 14px; text-align: center;
}
.tp-pool-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px; font-weight: 900; color: #ff6d00;
}
.tp-pool-lab { font-size: 11px; color: #555; text-transform: uppercase; margin-top: 3px; }

.tp-workspace {
  background: white; border-radius: 14px; padding: 18px;
  box-shadow: 0 6px 20px rgba(26,35,126,0.08);
}
.tp-workspace-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; flex-wrap: wrap; gap: 10px;
}
.tp-filters select {
  padding: 8px 14px; border: 1px solid #e0e4ff; border-radius: 8px;
  background: white; font-size: 13px; font-weight: 600; color: #1a237e;
  cursor: pointer;
}

.tp-leads-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 60vh; overflow-y: auto;
}
.tp-lead-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 10px;
  background: linear-gradient(135deg, #fafbff, #ffffff);
  border: 1px solid #eef;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.tp-lead-row:hover {
  transform: translateX(4px);
  border-color: #ff6d00;
  box-shadow: 0 6px 18px rgba(255,109,0,0.2);
  background: linear-gradient(135deg, #fff9e6, #fff);
}
.tp-lead-row.tp-done { opacity: 0.65; }
.tp-lead-row.tp-done:hover { opacity: 1; }
.tp-lead-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; font-family: 'Orbitron', sans-serif;
  box-shadow: 0 3px 10px rgba(26,35,126,0.3);
}
.tp-lead-info { flex: 1; min-width: 0; }
.tp-lead-name { font-size: 14px; font-weight: 700; color: #1a237e; }
.tp-lead-meta { font-size: 12px; color: #666; margin-top: 2px; }
.tp-lead-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tp-lead-action {
  background: linear-gradient(135deg, #ff6d00, #ffab00);
  color: white; padding: 5px 12px; border-radius: 16px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  box-shadow: 0 3px 8px rgba(255,109,0,0.3);
}
.tp-outcome-badge {
  padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 700;
}
.tp-oc-rdv        { background: #e8f5e9; color: #1b5e20; border: 1px solid #66bb6a; }
.tp-oc-interested { background: #e3f2fd; color: #0d47a1; border: 1px solid #42a5f5; }
.tp-oc-callback   { background: #fff3e0; color: #e65100; border: 1px solid #ffa726; }
.tp-oc-noanswer   { background: #f5f5f5; color: #666; border: 1px solid #bdbdbd; }
.tp-oc-voicemail  { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ab47bc; }
.tp-oc-wrongnum   { background: #ffebee; color: #c62828; border: 1px solid #ef5350; }
.tp-oc-refused    { background: #ffebee; color: #c62828; border: 1px solid #ef5350; }
.tp-oc-blacklist  { background: #212121; color: white; border: 1px solid #000; }
.tp-empty {
  text-align: center; padding: 40px 20px;
  color: #666; font-size: 14px;
}

/* ===== Modal appel lead ===== */
.lead-call-header {
  background: linear-gradient(135deg, #1a237e, #3949ab) !important;
  color: white !important;
}
.lead-call-header h2 { color: white !important; }
.lead-call-header .modal-close { color: white !important; }
.lc-contact-card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  padding: 14px 18px; border-radius: 12px;
  margin-bottom: 14px;
  border-left: 4px solid #ff6d00;
}
.lc-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; font-family: 'Orbitron', sans-serif;
  box-shadow: 0 4px 14px rgba(26,35,126,0.3);
}
.lc-name { font-size: 18px; font-weight: 800; color: #1a237e; }
.lc-phone { font-size: 14px; margin-top: 2px; }
.lc-phone a { text-decoration: none; }
.lc-address { font-size: 12px; color: #666; margin-top: 2px; }
.lc-location { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lc-badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 16px;
  font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.lc-badge-dep { background: linear-gradient(135deg, #1a237e, #3949ab); color: white; }
.lc-badge-cp  { background: linear-gradient(135deg, #ff6d00, #ffab00); color: white; }
.lc-badge-ville { background: white; color: #1a237e; border: 1px solid #e0e4ff; }

.lc-script {
  background: #fafbff; border-radius: 10px; padding: 14px;
  margin-bottom: 14px; border-left: 3px solid #1a237e;
}
.lc-script h4 {
  font-family: 'Orbitron', sans-serif; font-size: 12px;
  color: #1a237e; letter-spacing: 1px; margin: 0 0 8px 0;
}
.lc-script-body { font-size: 13px; line-height: 1.6; color: #333; }
.lc-script-body p { margin: 0 0 8px 0; }
.lc-me { color: #ff6d00; font-weight: 700; }

.lc-outcome h4 {
  font-family: 'Orbitron', sans-serif; font-size: 12px;
  color: #1a237e; letter-spacing: 1px; margin: 0 0 10px 0;
}
.lc-outcome-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.lc-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: #f5f7ff; border-radius: 8px;
  cursor: pointer; font-size: 13px; transition: all 0.2s;
  border: 1px solid transparent;
  color: #1a237e !important;
}
.lc-opt span { color: #1a237e !important; }
.lc-opt:hover { background: #eef0ff; border-color: #ff6d00; }
.lc-opt input { accent-color: #ff6d00; }

/* Forcer visibilité du contenu du modal call */
#leadCallModal .modal-body,
#leadCallModal .modal-body * { color: inherit; }
#leadCallModal .modal-body { color: #1a237e; }
#leadCallModal .lc-script-body,
#leadCallModal .lc-script-body * { color: #333 !important; }
#leadCallModal textarea { color: #333 !important; }
.lc-opt:has(input:checked) {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-color: #ff6d00;
  box-shadow: 0 3px 8px rgba(255,109,0,0.2);
  font-weight: 700;
}
.lc-callback-picker {
  margin-top: 10px; padding: 12px 14px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border: 2px solid #ff6d00; border-radius: 10px;
}
.lc-callback-picker h5 {
  margin: 0 0 8px 0; font-size: 12px;
  font-family: 'Orbitron', sans-serif; letter-spacing: 1px;
  color: #ff6d00;
}
.lc-cb-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lc-cb-row input {
  padding: 8px 12px; border: 1px solid #ff6d00;
  border-radius: 8px; font-size: 13px;
  background: white;
}
.lc-cb-quick { display: inline-flex; gap: 4px; margin-left: 4px; }
.lc-cb-quick button {
  background: white; border: 1px solid #ff6d00;
  color: #ff6d00; padding: 6px 10px;
  border-radius: 6px; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.lc-cb-quick button:hover {
  background: linear-gradient(135deg, #ff6d00, #ffab00); color: white;
}

.lc-outcome textarea {
  width: 100%; min-height: 60px;
  padding: 10px 14px; border: 1px solid #e0e4ff;
  border-radius: 8px; font-family: inherit; font-size: 13px;
}

@media (max-width: 768px) {
  .tp-admin-row { grid-template-columns: 1fr; }
  .lc-outcome-grid { grid-template-columns: 1fr; }
}

/* Double s\u00e9curit\u00e9 : seuls les admins voient le panel admin */
body:not(.role-admin) #tpAdminPanel { display: none !important; }
body:not(.role-admin) .tp-admin-panel { display: none !important; }

/* Badge createur sur evenements agenda (vue admin) */
.ev-creator {
  display: inline-block; padding: 1px 7px;
  border-radius: 10px; font-size: 9px; font-weight: 700;
  background: linear-gradient(135deg, #ff6d00, #ffab00);
  color: white; margin-left: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.ev-creator-inline {
  font-size: 11px; padding: 2px 10px; margin-left: 8px;
  background: linear-gradient(135deg, #1a237e, #3949ab);
}

/* Bulles utilisateurs connectes plus compactes */
#sec-supervision .connected-user-card {
  padding: 10px 14px !important;
  gap: 10px !important;
  min-width: 200px !important;
}
#sec-supervision .cu-avatar {
  width: 34px !important; height: 34px !important;
  font-size: 12px !important;
}
#sec-supervision .cu-name { font-size: 13px !important; }
#sec-supervision .cu-duration { font-size: 10px !important; }
#sec-supervision .connected-user-card > div[style*="font-size:11px"],
#sec-supervision .connected-user-card > div[style*="font-size:10px"] {
  font-size: 10px !important;
}
#sec-supervision .btn-force-disconnect {
  padding: 4px 8px !important;
  font-size: 10px !important;
}
#sec-supervision .connected-user-card::before {
  top: 6px !important; right: 30px !important;
  font-size: 10px !important;
}

/* Bulles ultra-compactes */
#sec-supervision .connected-user-card {
  padding: 8px 12px !important;
  max-width: 260px;
  min-width: 180px !important;
  font-size: 11px !important;
}
#sec-supervision .cu-avatar {
  width: 28px !important; height: 28px !important;
  font-size: 10px !important;
}
#sec-supervision .cu-name { font-size: 12px !important; }
#sec-supervision .cu-duration { font-size: 9px !important; }
#sec-supervision .btn-force-disconnect {
  padding: 3px 6px !important;
  font-size: 9px !important;
}

/* Bulles v3 encore plus compactes */
#sec-supervision .connected-user-card {
  padding: 6px 10px !important;
  max-width: 200px !important;
  min-width: 150px !important;
  gap: 6px !important;
  border-radius: 10px !important;
}
#sec-supervision .cu-avatar {
  width: 24px !important; height: 24px !important;
  font-size: 9px !important; flex: 0 0 24px !important;
}
#sec-supervision .cu-name { font-size: 11px !important; font-weight: 700 !important; }
#sec-supervision .cu-duration { font-size: 9px !important; }
#sec-supervision .btn-force-disconnect {
  padding: 2px 6px !important;
  font-size: 8px !important;
  white-space: nowrap;
}
#sec-supervision .connected-user-card::before {
  top: 3px !important; right: 6px !important;
  font-size: 8px !important;
}

.sup-purge-btn {
  background: linear-gradient(135deg, #ff6d00, #ffab00);
  color: white; border: none;
  padding: 8px 14px; border-radius: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(255,109,0,0.3);
}
.sup-purge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255,109,0,0.5);
}
