/* Cloudinary Upload Component */
.cloudinary-upload {
  margin: 20px 0;
}

.upload-container {
  position: relative;
}

.upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  background: #fafafa;
  transition: all 0.3s ease;
  cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: #3498db;
  background: #f0f8ff;
}

.upload-content i {
  font-size: 3rem;
  color: #3498db;
  margin-bottom: 15px;
}

.upload-content h4 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 1.2rem;
}

.upload-content p {
  margin: 0 0 20px 0;
  color: #666;
  font-size: 0.9rem;
}

.upload-btn {
  font-size: 0.9rem;
}

.upload-preview {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  background: white;
}

.preview-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.preview-media {
  flex: 0 0 auto;
}

.preview-media img,
.preview-media video {
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-progress {
  text-align: center;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 4px;
  animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
  0% { width: 0%; }
  50% { width: 60%; }
  100% { width: 100%; }
}

.progress-text {
  color: #666;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .upload-area {
    padding: 30px 15px;
  }
  
  .preview-content {
    flex-direction: column;
    text-align: center;
  }
  
  .preview-actions {
    flex-direction: row;
    justify-content: center;
  }
  
  .upload-content i {
    font-size: 2rem;
  }
}

/* Animation */
.upload-area {
  position: relative;
  overflow: hidden;
}

.upload-area::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(52, 152, 219, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.5s ease;
  opacity: 0;
}

.upload-area:hover::before {
  animation: shimmer 0.5s ease;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
    opacity: 0;
  }
}

/* Success state */
.upload-preview {
  border-color: #28a745;
  background: #f8fff9;
}

/* Error state */
.upload-error {
  border-color: #dc3545;
  background: #fff8f8;
}

.upload-error .upload-content i {
  color: #dc3545;
}

/* Loading state */
.upload-progress .progress-fill {
  background: linear-gradient(90deg, #ffc107, #ff6b6b);
}

/* Animations pour les notifications */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}
