/* Custom styles pour RecipeManager */

/* Animations personnalisées */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes bounceSubtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

/* Classes utilitaires */
.animate-fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.animate-slide-up {
  animation: slideUp 0.4s ease-out;
}

.animate-bounce-subtle {
  animation: bounceSubtle 2s infinite;
}

/* Recipe Card Styles */
.recipe-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid #e5e7eb;
}

.recipe-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border-color: #f97316;
}

.recipe-card .card-image {
  background: linear-gradient(135deg, #fed7aa, #fdba74);
  position: relative;
  overflow: hidden;
}

.recipe-card .card-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.recipe-card:hover .card-image::before {
  transform: translateX(100%);
}

.recipe-card .placeholder-icon {
  color: #f97316;
  font-size: 2.5rem;
  opacity: 0.6;
}

/* Badge de temps de préparation */
.prep-time-badge {
  background: linear-gradient(135deg, #065f46, #047857);
  color: white;
  backdrop-filter: blur(10px);
}

/* Boutons avec effet gradient */
.btn-gradient {
  background: linear-gradient(135deg, #f97316, #ea580c);
  transition: all 0.3s ease;
}

.btn-gradient:hover {
  background: linear-gradient(135deg, #ea580c, #dc2626);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.4);
}

/* Animation de chargement */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Texte tronqué avec ellipse */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Styles pour les modales */
.modal-backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  animation: slideUp 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

/* Scrollbar personnalisée */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Toast notifications */
.toast {
  animation: slideUp 0.3s ease-out;
  backdrop-filter: blur(10px);
  border-left: 4px solid;
}

.toast.success {
  background: rgba(16, 185, 129, 0.95);
  border-left-color: #10b981;
  color: white;
}

.toast.error {
  background: rgba(239, 68, 68, 0.95);
  border-left-color: #ef4444;
  color: white;
}

.toast.info {
  background: rgba(59, 130, 246, 0.95);
  border-left-color: #3b82f6;
  color: white;
}

/* États de focus améliorés */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}

/* Responsive design amélioré */
@media (max-width: 640px) {
  .recipe-card:hover {
    transform: none;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  }
  
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
}

/* Animation d'apparition en cascade pour les cartes */
.recipe-card:nth-child(1) { animation-delay: 0.1s; }
.recipe-card:nth-child(2) { animation-delay: 0.2s; }
.recipe-card:nth-child(3) { animation-delay: 0.3s; }
.recipe-card:nth-child(4) { animation-delay: 0.4s; }
.recipe-card:nth-child(5) { animation-delay: 0.5s; }
.recipe-card:nth-child(6) { animation-delay: 0.6s; }

/* Effet de survol sur les boutons d'action */
.action-btn {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.action-btn:hover::before {
  width: 100px;
  height: 100px;
}

/* Amélioration de la lisibilité */
.recipe-description {
  color: #6b7280;
  line-height: 1.5;
}

.recipe-title {
  color: #1f2937;
  font-weight: 600;
  line-height: 1.2;
}

/* État actif pour la recherche */
.search-active {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1) !important;
}