/* ===== Espace Équipe ===== */
#sec-equipe {
  background: linear-gradient(135deg, #f0f4ff 0%, #fef8f3 100%);
  min-height: calc(100vh - 60px);
}
.unread-badge {
  display: inline-block;
  background: #c62828; color: white;
  padding: 1px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700;
  margin-left: 6px;
  animation: eqPulse 1.5s ease-in-out infinite;
}
@keyframes eqPulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.15); }
}

.eq-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 16px;
  margin-top: 16px; height: calc(100vh - 140px);
}
.eq-sidebar {
  background: white; border-radius: 14px;
  padding: 16px; box-shadow: 0 6px 20px rgba(26,35,126,0.08);
  overflow-y: auto;
}
.eq-sidebar-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  color: #1a237e; text-transform: uppercase;
  margin: 0 0 12px 0; padding-bottom: 8px;
  border-bottom: 2px solid #ff6d00;
}
.eq-user-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  cursor: pointer; margin-bottom: 4px;
  transition: all 0.2s; border: 1px solid transparent;
}
.eq-user-item:hover {
  background: #f5f7ff; border-color: #e0e4ff;
}
.eq-user-item.eq-user-selected {
  background: linear-gradient(135deg, #1a237e, #3949ab);
  border-color: #ff6d00;
}
.eq-user-item.eq-user-selected .eq-user-name,
.eq-user-item.eq-user-selected .eq-user-role {
  color: white !important;
}
.eq-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 12px;
  flex: 0 0 36px;
}
.eq-user-info { flex: 1; min-width: 0; }
.eq-user-name { font-size: 13px; font-weight: 700; color: #1a237e; }
.eq-user-role { font-size: 10px; color: #888; text-transform: capitalize; }
.eq-dot-on {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #00e676; margin-left: 4px;
  box-shadow: 0 0 8px #00e676;
  animation: eqPulse 1.4s ease-in-out infinite;
}
.eq-unread {
  background: #c62828; color: white;
  padding: 2px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700;
}

.eq-main {
  background: white; border-radius: 14px;
  box-shadow: 0 6px 20px rgba(26,35,126,0.08);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.eq-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: white;
}
.eq-header h3 {
  margin: 0; font-family: 'Orbitron', sans-serif;
  font-size: 16px; letter-spacing: 1px; color: white !important;
}
.eq-sub { font-size: 11px; color: rgba(255,255,255,0.8); margin: 2px 0 0 0; letter-spacing: 0.5px; }

.eq-tabs {
  display: flex; padding: 8px; gap: 4px;
  background: #f5f7ff; border-bottom: 1px solid #e0e4ff;
}
.eq-subtab {
  flex: 1; padding: 10px 16px;
  background: transparent; border: none; cursor: pointer;
  border-radius: 8px; font-size: 13px; font-weight: 700;
  color: #666; transition: all 0.2s;
}
.eq-subtab:hover { background: #eef0ff; color: #1a237e; }
.eq-subtab.active {
  background: linear-gradient(135deg, #ff6d00, #ffab00);
  color: white;
  box-shadow: 0 3px 10px rgba(255,109,0,0.3);
}

.eq-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.eq-chat-box {
  flex: 1; overflow-y: auto; padding: 20px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(41,121,255,0.15), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(255,109,0,0.12), transparent 50%),
    linear-gradient(135deg, #0a0e1c 0%, #141a2e 50%, #0a0e1c 100%);
  position: relative;
  overflow: hidden;
}
.eq-chat-box::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,171,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,171,0,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 90%);
  animation: eqGridDrift 60s linear infinite;
  pointer-events: none;
}
@keyframes eqGridDrift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 40px 40px, 40px 40px; }
}
.eq-chat-box::after {
  content: "🤖";
  position: absolute;
  font-size: 180px;
  right: -30px; bottom: -30px;
  opacity: 0.06;
  pointer-events: none;
  animation: eqRobotFloat 8s ease-in-out infinite;
}
@keyframes eqRobotFloat {
  0%,100% { transform: translate(0,0) rotate(-5deg); }
  50%     { transform: translate(-8px,-12px) rotate(5deg); }
}
.eq-chat-box .eq-robot-emoji {
  position: absolute;
  font-size: 32px;
  opacity: 0.1;
  animation: eqRobotDrift 20s linear infinite;
  pointer-events: none;
}
.eq-chat-box .eq-re-1 { top: 10%; left: 15%; animation-delay: 0s; }
.eq-chat-box .eq-re-2 { top: 60%; left: 35%; animation-delay: -5s; }
.eq-chat-box .eq-re-3 { top: 30%; left: 70%; animation-delay: -10s; }
.eq-chat-box .eq-re-4 { top: 75%; left: 80%; animation-delay: -15s; }
@keyframes eqRobotDrift {
  0%,100% { transform: translate(0,0) rotate(0deg); opacity: 0.08; }
  25%     { transform: translate(20px,-15px) rotate(90deg); opacity: 0.15; }
  50%     { transform: translate(-10px,-25px) rotate(180deg); opacity: 0.1; }
  75%     { transform: translate(-20px,10px) rotate(270deg); opacity: 0.12; }
}

/* Bulles en mode dark */
.eq-msg-me .eq-msg-bubble {
  background: linear-gradient(135deg, #ff6d00, #ffab00);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 14px rgba(255,109,0,0.35), 0 0 20px rgba(255,171,0,0.2);
  position: relative; z-index: 2;
}
.eq-msg-other .eq-msg-bubble {
  background: rgba(41,121,255,0.15);
  color: #e0e4ff;
  border: 1px solid rgba(100,180,255,0.4);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3), 0 0 20px rgba(41,121,255,0.15);
  position: relative; z-index: 2;
}
.eq-msg-me .eq-msg-time { color: rgba(255,255,255,0.85); }
.eq-msg-other .eq-msg-time { color: rgba(180,192,224,0.7); }

.eq-date-sep {
  background: rgba(255,171,0,0.15) !important;
  color: #ffab00 !important;
  border: 1px solid rgba(255,171,0,0.3);
  font-family: 'Orbitron', sans-serif;
  z-index: 2; position: relative;
}

.eq-chat-empty {
  color: rgba(224,228,255,0.5) !important;
  position: relative; z-index: 2;
}
.eq-chat-empty::before {
  content: "🤖"; display: block;
  font-size: 80px; margin-bottom: 12px;
  opacity: 0.3;
  animation: eqRobotFloat 4s ease-in-out infinite;
}

.eq-chat-input {
  background: linear-gradient(135deg, #0a0e1c, #141a2e) !important;
  border-top: 1px solid rgba(255,171,0,0.2) !important;
}
.eq-chat-input input {
  background: rgba(0,0,0,0.4) !important;
  border: 1px solid rgba(255,171,0,0.3) !important;
  color: white !important;
}
.eq-chat-input input::placeholder { color: #5a6688; }
.eq-chat-input input:focus {
  border-color: #ffab00 !important;
  box-shadow: 0 0 0 3px rgba(255,171,0,0.2), 0 0 18px rgba(255,171,0,0.35) !important;
}
.eq-chat-input button {
  background: linear-gradient(135deg, #ff6d00, #ffab00) !important;
  box-shadow: 0 4px 14px rgba(255,109,0,0.4);
}
.eq-chat-input button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255,109,0,0.55);
}
.eq-chat-empty {
  text-align: center; padding: 60px 20px;
  color: #aaa; font-size: 14px;
}
.eq-date-sep {
  text-align: center;
  font-size: 11px; font-weight: 700;
  color: #888; letter-spacing: 1px;
  margin: 16px 0 8px 0;
  padding: 4px 12px;
  background: rgba(26,35,126,0.05);
  border-radius: 10px;
  display: inline-block;
  position: relative; left: 50%; transform: translateX(-50%);
}
.eq-msg { display: flex; margin-bottom: 8px; }
.eq-msg-me { justify-content: flex-end; }
.eq-msg-other { justify-content: flex-start; }
.eq-msg-bubble {
  max-width: 70%; padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.5;
  position: relative;
}
.eq-msg-me .eq-msg-bubble {
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: white;
  border-top-right-radius: 4px;
}
.eq-msg-other .eq-msg-bubble {
  background: white;
  color: #333;
  border: 1px solid #eef;
  border-top-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(26,35,126,0.05);
}
.eq-msg-time {
  font-size: 9px; opacity: 0.7;
  margin-top: 4px; text-align: right;
}

.eq-chat-input {
  display: flex; gap: 8px; padding: 12px 16px;
  background: #fafbff; border-top: 1px solid #eef;
}
.eq-chat-input input {
  flex: 1; padding: 12px 16px;
  border: 1px solid #e0e4ff; border-radius: 24px;
  font-size: 14px; outline: none;
  transition: all 0.2s;
}
.eq-chat-input input:focus {
  border-color: #ff6d00;
  box-shadow: 0 0 0 3px rgba(255,109,0,0.1);
}
.eq-chat-input button {
  padding: 10px 20px; border-radius: 24px;
  font-weight: 700; font-size: 13px;
}

.eq-history-list {
  flex: 1; overflow-y: auto; padding: 12px 16px;
}
.eq-hist-row {
  display: grid;
  grid-template-columns: 140px 100px 1fr;
  gap: 12px;
  padding: 10px 14px;
  background: white;
  border-radius: 8px; margin-bottom: 6px;
  border: 1px solid #eef;
  font-size: 12px;
  transition: all 0.2s;
}
.eq-hist-row:hover {
  background: #fff9e6;
  border-color: #ff6d00;
  transform: translateX(3px);
}
.eq-hist-time { color: #888; font-family: monospace; }
.eq-hist-cat {
  padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 700; text-align: center;
}
.eq-hist-action { color: #333; }

#sec-equipe #eq-panel-history .toolbar {
  padding: 12px 16px;
  background: #fafbff;
  border-bottom: 1px solid #eef;
}

@media (max-width: 900px) {
  .eq-layout { grid-template-columns: 1fr; height: auto; }
  .eq-sidebar { max-height: 240px; }
}

/* ===== DASHBOARD - harmonisation avec le reste ===== */
#sec-dashboard {
  background: linear-gradient(135deg, #f0f4ff 0%, #fef8f3 50%, #f5f0ff 100%);
  min-height: calc(100vh - 60px);
  padding-bottom: 30px;
  position: relative;
}
#sec-dashboard::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(41,121,255,0.08), transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(255,109,0,0.07), transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(255,171,0,0.04), transparent 55%);
}
#sec-dashboard .content { position: relative; z-index: 1; }

/* KPI row premium */
#sec-dashboard .kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
#sec-dashboard .kpi-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%) !important;
  border-radius: 14px !important;
  padding: 18px 20px !important;
  box-shadow: 0 6px 24px rgba(26,35,126,0.08), 0 0 0 1px rgba(26,35,126,0.05) !important;
  border: none !important;
  position: relative; overflow: hidden;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
#sec-dashboard .kpi-card::before {
  content: ""; position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, #1a237e, #ff6d00);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#sec-dashboard .kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(26,35,126,0.15), 0 0 0 1px rgba(255,171,0,0.3) !important;
}
#sec-dashboard .kpi-card:hover::before { transform: scaleX(1); }
#sec-dashboard .kpi-card .kpi-label {
  font-size: 11px !important; font-weight: 700 !important;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: #888 !important; margin-bottom: 8px;
  font-family: 'Orbitron', sans-serif;
}
#sec-dashboard .kpi-card .kpi-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 34px !important; font-weight: 900 !important;
  background: linear-gradient(135deg, #1a237e, #ff6d00);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
  line-height: 1;
}
#sec-dashboard .kpi-card .kpi-sub {
  font-size: 11px; color: #666; margin-top: 6px;
}
#sec-dashboard .kpi-card.red .kpi-value,
#sec-dashboard .kpi-card.green .kpi-value,
#sec-dashboard .kpi-card.blue .kpi-value,
#sec-dashboard .kpi-card.orange .kpi-value,
#sec-dashboard .kpi-card.purple .kpi-value {
  background: linear-gradient(135deg, #1a237e, #ff6d00);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}

/* Cartes dashboard premium */
#sec-dashboard .chart-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%) !important;
  border-radius: 14px !important;
  padding: 18px !important;
  box-shadow: 0 6px 24px rgba(26,35,126,0.08), 0 0 0 1px rgba(26,35,126,0.05) !important;
  border: none !important;
  position: relative; overflow: hidden;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
#sec-dashboard .chart-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(26,35,126,0.15), 0 0 0 1px rgba(255,171,0,0.3) !important;
}
#sec-dashboard .chart-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px !important; font-weight: 700 !important;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: #1a237e !important;
  margin: 0 0 14px 0 !important;
  padding-left: 14px; position: relative;
}
#sec-dashboard .chart-card h3::before {
  content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 18px;
  background: linear-gradient(180deg, #ff6d00, #ffab00);
  border-radius: 2px;
}

/* Barres Pipeline */
#sec-dashboard .bar-row {
  display: grid; grid-template-columns: auto 1fr;
  gap: 12px; align-items: center;
  margin-bottom: 10px;
}
#sec-dashboard .bar-label {
  font-size: 11px; font-weight: 700; color: #1a237e;
  white-space: nowrap;
}
#sec-dashboard .bar-track {
  background: #eef0ff; border-radius: 20px;
  height: 24px; overflow: hidden; position: relative;
}
#sec-dashboard .bar-fill {
  height: 100%; border-radius: 20px;
  display: flex; align-items: center; justify-content: flex-end;
  color: white; font-weight: 800; font-size: 12px;
  padding-right: 10px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) inset;
}

/* Donut + légende */
#sec-dashboard .donut-container {
  display: flex; align-items: center; gap: 20px;
  justify-content: center;
}
#sec-dashboard .legend { display: flex; flex-direction: column; gap: 6px; }
#sec-dashboard .legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #333; font-weight: 600;
}
#sec-dashboard .legend-dot {
  width: 12px; height: 12px; border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

/* Sections : France map déjà stylée, garder cohérence */
#sec-dashboard .france-map-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%) !important;
  border-radius: 14px !important;
  padding: 20px !important;
  box-shadow: 0 6px 24px rgba(26,35,126,0.08), 0 0 0 1px rgba(26,35,126,0.05) !important;
}
#sec-dashboard .france-map-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #1a237e !important;
}

/* ===== Toast notifications messages ===== */
.eq-toast-container {
  position: fixed; top: 80px; right: 20px;
  z-index: 10000; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.eq-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  min-width: 300px; max-width: 380px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0a0e1c, #1a237e);
  border: 1px solid rgba(255,171,0,0.5);
  border-radius: 12px;
  color: white; cursor: pointer;
  box-shadow: 0 12px 40px rgba(26,35,126,0.4), 0 0 30px rgba(255,171,0,0.25);
  animation: eqToastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative; overflow: hidden;
}
.eq-toast::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, #ff6d00, #ffab00);
}
@keyframes eqToastIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.eq-toast-out {
  animation: eqToastOut 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes eqToastOut {
  to { transform: translateX(120%); opacity: 0; }
}
.eq-toast-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #ff6d00, #ffab00);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; font-family: 'Orbitron', sans-serif;
  flex: 0 0 40px;
  box-shadow: 0 3px 10px rgba(255,109,0,0.4);
}
.eq-toast-content { flex: 1; min-width: 0; }
.eq-toast-title {
  font-size: 13px; font-weight: 700;
  color: #ffab00;
  margin-bottom: 3px;
}
.eq-toast-body {
  font-size: 12px; color: #e0e4ff;
  line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.eq-toast-close {
  background: rgba(255,255,255,0.1);
  border: none; color: white;
  width: 24px; height: 24px; border-radius: 50%;
  cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 24px;
  transition: all 0.2s;
}
.eq-toast-close:hover {
  background: #c62828;
  transform: rotate(90deg);
}
