/**
 * admin_core.css - STYLES CORE ADMIN
 * À charger EN PREMIER
 * Préfixe : blx-admin-* pour éviter les conflits
 */

/* ============================================================
   TOAST SYSTÈME
   ============================================================ */

.blx-toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.blx-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #2b2d31;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border-left: 4px solid #4299e1;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.3s ease;
  pointer-events: auto;
  min-width: 300px;
  max-width: 400px;
}

.blx-toast.active {
  opacity: 1;
  transform: translateX(0);
}

.blx-toast-icon {
  font-size: 20px;
  font-weight: bold;
  flex-shrink: 0;
}

.blx-toast-message {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

/* Variantes de toast */
.blx-toast-success {
  border-left-color: #48bb78;
}

.blx-toast-success .blx-toast-icon {
  color: #48bb78;
}

.blx-toast-error {
  border-left-color: #e53e3e;
}

.blx-toast-error .blx-toast-icon {
  color: #e53e3e;
}

.blx-toast-warning {
  border-left-color: #ed8936;
}

.blx-toast-warning .blx-toast-icon {
  color: #ed8936;
}

.blx-toast-info {
  border-left-color: #4299e1;
}

.blx-toast-info .blx-toast-icon {
  color: #4299e1;
}

/* ============================================================
   MODAL SYSTÈME
   ============================================================ */

.blx-admin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.blx-admin-modal.active {
  display: flex;
}

.blx-admin-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.blx-admin-modal-content {
  position: relative;
  background: linear-gradient(145deg, #1e1e2e, #2a2a3e);
  border: 2px solid #FFD700;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(255, 215, 0, 0.4);
  animation: blx-modal-slide-in 0.3s ease;
}

/* Tailles de modal */
.blx-admin-modal-small .blx-admin-modal-content {
  max-width: 400px;
}

.blx-admin-modal-large .blx-admin-modal-content {
  max-width: 700px;
}

@keyframes blx-modal-slide-in {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.blx-admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.blx-admin-modal-header h3 {
  margin: 0;
  color: #FFD700;
  font-size: 1.4em;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.blx-admin-modal-close {
  background: none;
  border: none;
  color: #999;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.blx-admin-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: rotate(90deg);
}

.blx-admin-modal-body {
  padding: 24px;
}

.blx-admin-modal-message {
  color: #fff;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   MODAL SUPPRESSION SPÉCIFIQUE
   ============================================================ */

.blx-delete-modal .blx-admin-modal-content {
  border-color: #e53e3e;
}

.blx-delete-modal .blx-admin-modal-header h3 {
  color: #e53e3e;
}

.blx-admin-warning {
  background: rgba(229, 62, 62, 0.1);
  border-left: 4px solid #e53e3e;
  padding: 14px 16px;
  margin: 0 0 20px 0;
  color: #ffb3ba;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 6px;
}

.blx-admin-field {
  margin-bottom: 16px;
}

.blx-admin-field label {
  display: block;
  color: #fff;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.blx-admin-field textarea {
  width: 100%;
  padding: 12px;
  background: #1a1a2e;
  border: 2px solid #444;
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.blx-admin-field textarea:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.blx-char-count {
  display: block;
  text-align: right;
  color: #666;
  font-size: 12px;
  margin-top: 4px;
}

/* ============================================================
   BOUTONS D'ACTION
   ============================================================ */

.blx-admin-modal-actions {
  display: flex;
  gap: 12px;
  padding: 0 24px 24px;
}

.blx-admin-btn {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
}

.blx-admin-btn-default {
  background: #4a5568;
}

.blx-admin-btn-default:hover {
  background: #2d3748;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 85, 104, 0.4);
}

.blx-admin-btn-cancel {
  background: #4a5568;
}

.blx-admin-btn-cancel:hover {
  background: #2d3748;
  transform: translateY(-2px);
}

.blx-admin-btn-primary {
  background: linear-gradient(145deg, #4299e1, #3182ce);
}

.blx-admin-btn-primary:hover {
  background: linear-gradient(145deg, #3182ce, #2c5282);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.blx-admin-btn-success {
  background: linear-gradient(145deg, #48bb78, #38a169);
}

.blx-admin-btn-success:hover {
  background: linear-gradient(145deg, #38a169, #2f855a);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.blx-admin-btn-danger {
  background: linear-gradient(145deg, #e53e3e, #c53030);
}

.blx-admin-btn-danger:hover {
  background: linear-gradient(145deg, #c53030, #9b2c2c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
}

.blx-admin-btn:active {
  transform: translateY(0) !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  .blx-admin-modal-content {
    width: 95%;
    margin: 20px;
  }

  .blx-admin-modal-header,
  .blx-admin-modal-body,
  .blx-admin-modal-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .blx-toast-container {
    right: 10px;
    left: 10px;
  }
  
  .blx-toast {
    min-width: auto;
    max-width: none;
  }
}

/* ============================================================
   SCROLLBAR CUSTOM POUR LES MODALS
   ============================================================ */

.blx-admin-modal-content::-webkit-scrollbar {
  width: 8px;
}

.blx-admin-modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.blx-admin-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.3);
  border-radius: 10px;
}

.blx-admin-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.5);
}
