/* ===== COMPOSANT TOAST BEM ===== */
/* Système de notifications toast selon méthodologie BEM */
/* Notifications temporaires élégantes avec animation */

/* === BLOCK PRINCIPAL === */
.c-toast {
  min-width: 300px;
  max-width: 400px;
  background: white;
  border-radius: var(--cb-border-radius-lg, 12px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: var(--cb-spacing-4, 16px) var(--cb-spacing-5, 20px);
  margin-bottom: var(--cb-spacing-4, 16px);
  display: flex;
  align-items: center;
  gap: var(--cb-spacing-4, 16px);
  border-left: 4px solid;
  animation: c-toast-slide-in 0.4s ease-out;
  position: relative;
  font-family: inherit;
}

/* Animation de disparition automatique - gérée par JavaScript */
.c-toast--auto-dismiss {
  animation: c-toast-slide-in 0.4s ease-out;
}

/* === CONTAINER === */
.c-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  pointer-events: none;
}

.c-toast-container .c-toast {
  pointer-events: all;
}

/* === ELEMENTS === */
/* Icon/symbol at the left */
.c-toast__icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  line-height: 1;
}

/* Main content area */
.c-toast__content {
  flex: 1;
}

/* Title inside toast */
.c-toast__title {
  font-weight: var(--cb-font-weight-semibold, 600);
  margin-bottom: var(--cb-spacing-1, 4px);
  font-size: 0.95rem;
  color: var(--cb-text-primary, #333);
  line-height: 1.3;
}

/* Description/message */
.c-toast__message {
  font-size: 0.875rem;
  color: var(--cb-text-secondary, #666);
  margin: 0;
  line-height: 1.4;
}

/* Close button */
.c-toast__close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--cb-text-muted, #999);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
}

.c-toast__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--cb-text-primary, #333);
}

/* === MODIFIERS - SUCCESS STATUS === */
.c-toast--success {
  border-left-color: var(--cb-success, #28a745);
}

.c-toast--success .c-toast__icon {
  color: var(--cb-success, #28a745);
}

/* === MODIFIERS - DANGER/ERROR STATUS === */
.c-toast--error {
  border-left-color: var(--cb-danger, #dc3545);
}

.c-toast--error .c-toast__icon {
  color: var(--cb-danger, #dc3545);
}

/* === MODIFIERS - WARNING STATUS === */
.c-toast--warning {
  border-left-color: var(--cb-warning, #ffc107);
}

.c-toast--warning .c-toast__icon {
  color: var(--cb-warning, #ffc107);
}

/* === MODIFIERS - INFO STATUS === */
.c-toast--info {
  border-left-color: var(--cb-info, #17a2b8);
}

.c-toast--info .c-toast__icon {
  color: var(--cb-info, #17a2b8);
}

/* === ANIMATIONS === */
@keyframes c-toast-slide-in {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes c-toast-fade-out {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .c-toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .c-toast {
    min-width: auto;
    width: 100%;
    max-width: 100%;
  }
}

/* === POSITION VARIANTS === */
.c-toast-container--top-left {
  top: 20px;
  left: 20px;
  right: auto;
}

.c-toast-container--top-left .c-toast {
  animation: c-toast-slide-in-left 0.4s ease-out;
}

@keyframes c-toast-slide-in-left {
  from {
    transform: translateX(-400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.c-toast-container--bottom-right {
  top: auto;
  bottom: 20px;
  right: 20px;
}

.c-toast-container--bottom-left {
  top: auto;
  bottom: 20px;
  left: 20px;
  right: auto;
}
