/* =====================================================
   GLOBAL BUTTONS
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.7rem 1.2rem;
  border-radius: 10px;

  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;
  border: none;
  outline: none;

  transition: var(--transition-base);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* =====================
   PRIMARY BUTTON
   ===================== */

.btn-primary {
  background: var(--primary);
  color: var(--text-inv);
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent);
  transition: 0.5s;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* =====================
   SECONDARY BUTTON
   ===================== */

.btn-secondary {
  background: var(--secondary);
  color: var(--text-inv);
  border: 1px solid var(--secondary);
  transition: var(--transition-base);
}

.btn-secondary:hover {
  background: #475569;
  border-color: #475569;
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

/* DANGER (logout) */
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: var(--text-inv);
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transform: translateY(-2px);
}

.btn-warning {
  background: var(--warning);
  color: var(--text-inv);
  border: 1px solid var(--warning);
}

.btn-warning:hover {
  filter: brightness(1.1);
}

.form-group label, .form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
}

.field-help {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Info Banners */
.info-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  line-height: 1.5;
  transition: var(--transition-base);
  animation: slideUp var(--transition-base);
}

.info-banner:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.8);
  box-shadow: var(--shadow-md);
}

.info-banner-text {
  color: var(--text-main);
  font-size: 0.95rem;
}

.badge-sell, .badge-buy {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-sell {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: pulse-soft 2s infinite ease-in-out;
}

.badge-buy {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  animation: pulse-soft 2s infinite ease-in-out;
}
/* =====================================================
   ALERTS / NOTIFICATIONS (BASÉES SUR LES TOASTS)
   ===================================================== */
.alert, .flash-message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: #ffffff !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  border-left: 4px solid transparent;
  margin-bottom: 1rem;
  transition: var(--transition-base);
  animation: slideDown var(--transition-base);
}

.alert:hover, .flash-message:hover {
  transform: scale(1.02);
}

.alert *, .flash-message * {
  color: #ffffff !important;
}

.alert-error, .alert-danger {
  border-left-color: #fca5a5;
  background: rgba(239, 68, 68, 0.95);
}

.alert-success {
  border-left-color: #6ee7b7;
  background: rgba(16, 185, 129, 0.95);
}

.alert-info, .alert-warning {
  border-left-color: #fcd34d;
  background: rgba(245, 158, 11, 0.95);
}

.alert-close, .flash-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7) !important;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}

.alert-close:hover, .flash-close:hover {
  color: #ffffff !important;
}

.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  background: #ffffff; /* Fond blanc pur pour contraste maximal */
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  z-index: 9999; /* Z-index encore plus élevé */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  
  /* Animation par défaut masqué par JS */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.cookie-text {
  flex: 1;
}

.cookie-text strong {
  display: block;
  font-size: 1.25rem;
  color: #0f172a; /* Texte très sombre */
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.cookie-text p {
  margin: 0;
  font-size: 1rem;
  color: #475569; /* Gris foncé lisible */
  line-height: 1.6;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-actions .btn-outline {
  border-color: #cbd5e1;
  color: #64748b;
}

.cookie-actions .btn-outline:hover {
  background: #f1f5f9;
  color: #0f172a;
}

@media (max-width: 850px) {
  .cookie-content {
    flex-direction: column;
    text-align: left;
    align-items: flex-start;
    gap: 1.25rem;
  }
  
  .cookie-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
