/**
 * session-handler.css - Styles pour la modale de session expirée
 */

/* Overlay sombre */
.session-expired-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.session-expired-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Modale */
.session-expired-modal {
  background: #1e293b;
  border-radius: 12px;
  padding: 32px 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.session-expired-overlay.visible .session-expired-modal {
  transform: scale(1);
}

/* Icône */
.session-expired-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.session-expired-icon i {
  font-size: 28px;
  color: white;
}

/* Titre */
.session-expired-title {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
}

/* Message */
.session-expired-message {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.session-expired-saved {
  color: #22c55e;
  font-size: 13px;
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.session-expired-saved i {
  font-size: 14px;
}

/* Bouton */
.session-expired-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.session-expired-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.session-expired-btn:active {
  transform: translateY(0);
}

/* Info supplémentaire */
.session-expired-info {
  color: #64748b;
  font-size: 12px;
  margin-top: 16px;
}

/* ============================================================
   COUNTDOWN DE SESSION (dans le header)
   ============================================================ */

.session-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  transition: all 0.3s ease;
}

.session-countdown i {
  font-size: 11px;
}

.session-countdown.normal {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.session-countdown.warning {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  animation: pulse-warning 1s ease-in-out infinite;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ============================================================
   MODALE WARNING (avant expiration)
   ============================================================ */

.session-warning-modal .session-expired-icon.warning-icon {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
}

.session-warning-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.session-logout-btn {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
}

.session-logout-btn:hover {
  box-shadow: 0 4px 20px rgba(100, 116, 139, 0.4) !important;
}

#warningCountdown {
  color: #ef4444;
  font-size: 18px;
}
