/**
 * Styles pour l'interface des travaux des utilisateurs TCF Writing Simulator
 */

/* Container principal */
.tcf-user-works-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  font-family: "Inter", sans-serif;
}

/* En-tête */
.tcf-works-header {
  text-align: center;
  margin-bottom: 3rem;
}

.tcf-works-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  /* margin-bottom: 1rem; */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.tcf-works-title i {
  color: #3b82f6;
}

.tcf-works-subtitle {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* Statistiques */
.tcf-works-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tcf-stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.tcf-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tcf-stat-icon {
  margin-bottom: 1rem;
}

.tcf-stat-icon i {
  width: 2.5rem;
  height: 2.5rem;
  color: #3b82f6;
}

.tcf-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.tcf-stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

/* Message aucun travail */
.tcf-no-works {
  text-align: center;
  padding: 4rem 2rem;
  background: #ffffff;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
}

.tcf-no-works-icon {
  margin-bottom: 1.5rem;
}

.tcf-no-works-icon i {
  width: 4rem;
  height: 4rem;
  color: #9ca3af;
}

.tcf-no-works h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.tcf-no-works p {
  color: #6b7280;
  margin-bottom: 2rem;
}

/* Section des travaux */
.tcf-works-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tcf-works-section-title i {
  color: #3b82f6;
}
.tcf-works-grid .tcf-lesson-card-modern {
  max-width: 380px !important;
}
.user__work_header {
    margin-bottom: -0.5rem !important;
    gap: 0;
}
.user__work_header .tcf-lesson-title-modern {
    font-size: 1.06rem !important;
}

/* Grille des travaux */
.tcf-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.tcf-works-grid .tcf-lesson-card-modern .tcf-lesson-count-modern svg {
  width: 17px;
}
.section-py-120 {
    background: white !important;
}
/* CTA Section */
.mci-cta-uw_section {
  margin: 40px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mci-cta-container {
  background: linear-gradient(135deg, #1363DF 0%, #082A5E 100%);
  padding: 30px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.mci-cta-content {
  flex: 1;
  min-width: 250px;
}

.mci-cta-content h3 {
  margin: 0 0 15px 0;
  font-size: 24px;
  font-weight: 700;
}

.mci-cta-content p {
  margin: 0 0 20px 0;
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.9;
}

.mci-cta-button {
  display: inline-block;
  background: white;
  color: #1363DF;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mci-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mci-cta-image {
  flex-shrink: 0;
  max-width: 200px;
  margin: 0 auto;
}

/* Cartes de travail */
.tcf-work-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tcf-work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tcf-work-card.status-corrected {
  border-left: 4px solid #10b981;
}

.tcf-work-card.status-draft {
  border-left: 4px solid #f59e0b;
}

/* En-tête de la carte */
.tcf-work-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.tcf-work-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.tcf-work-status.status-corrected {
  color: #10b981;
}

.tcf-work-status.status-draft {
  color: #f59e0b;
}

.tcf-work-status i {
  width: 1rem;
  height: 1rem;
}

.tcf-work-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.tcf-work-date i {
  width: 1rem;
  height: 1rem;
}

/* Contenu de la carte */
.tcf-work-content {
  margin-bottom: 1.5rem;
}

.tcf-work-chapter,
.tcf-work-lesson,
.tcf-work-topic {
  margin-bottom: 1rem;
}

.tcf-chapter-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tcf-chapter-title i {
  color: #3b82f6;
  width: 1.25rem;
  height: 1.25rem;
}

.tcf-lesson-title {
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tcf-lesson-title i {
  color: #6b7280;
  width: 1rem;
  height: 1rem;
}

.tcf-topic-title {
  font-size: 0.875rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tcf-topic-title i {
  color: #9ca3af;
  width: 0.875rem;
  height: 0.875rem;
}

/* Informations de correction */
.tcf-correction-info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.tcf-correction-date,
.tcf-correction-score {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #0369a1;
  margin-bottom: 0.5rem;
}

.tcf-correction-date:last-child,
.tcf-correction-score:last-child {
  margin-bottom: 0;
}

.tcf-correction-date i,
.tcf-correction-score i {
  width: 1rem;
  height: 1rem;
}

/* Actions de la carte */
.tcf-work-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tcf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  justify-content: center;
  min-width: 120px;
}

.tcf-btn-primary {
  background: #3b82f6;
  color: #ffffff;
}

.tcf-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.tcf-btn-secondary {
  background: #10b981;
  color: #ffffff;
}

.tcf-btn-secondary:hover {
  background: #059669;
  transform: translateY(-1px);
}

.tcf-btn-outline {
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.tcf-btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.tcf-btn i {
  width: 1rem;
  height: 1rem;
}

/* Vue détaillée d'un travail */
.tcf-work-detail-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.tcf-work-detail-header {
  margin-bottom: 3rem;
}

.tcf-work-navigation {
  margin-bottom: 2rem;
}

.tcf-work-detail-title h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tcf-work-detail-title h1 i {
  color: #3b82f6;
}

.tcf-work-detail-subtitle {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.tcf-work-detail-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.tcf-work-date,
.tcf-correction-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
}

.tcf-work-date i,
.tcf-correction-date i {
  width: 1rem;
  height: 1rem;
}

/* Contenu du travail */
.tcf-work-detail-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
}

.tcf-tasks-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tcf-tasks-title i {
  color: #3b82f6;
}

.tcf-work-task {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #f3f4f6;
}

.tcf-work-task:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tcf-task-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.tcf-task-response h4 {
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.tcf-response-text {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 1rem;
}

.tcf-word-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.tcf-word-count i {
  width: 1rem;
  height: 1rem;
}

/* Actions de la vue détaillée */
.tcf-work-detail-actions {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #f3f4f6;
  text-align: center;
}

/* Vue de correction */
.tcf-correction-detail-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.tcf-correction-detail-header {
  margin-bottom: 3rem;
}

.tcf-correction-navigation {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tcf-correction-detail-title h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tcf-correction-detail-title h1 i {
  color: #10b981;
}

.tcf-correction-detail-subtitle {
  font-size: 1.125rem;
  color: #6b7280;
}

/* Interface de correction en lecture seule */
.tcf-correction-interface-readonly {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
}

/* Affichage simple des corrections */
.tcf-simple-corrections h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2rem;
}

.tcf-score-display h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #10b981;
  margin-bottom: 2rem;
  text-align: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 1rem;
}

.tcf-task-correction {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.tcf-task-correction h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
}

.tcf-correction-message {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
  color: #92400e;
}

.tcf-correction-html {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 1rem;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .tcf-user-works-container,
  .tcf-work-detail-container,
  .tcf-correction-detail-container {
    padding: 1rem;
  }
  .tcf-user-works-container {
    padding: 0;
  }

  .tcf-works-title svg {
    display: none;
  }
  .tcf-works-title {
    font-size: 1.6rem;
  }

  .tcf-works-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .tcf-works-grid {
    grid-template-columns: 1fr;
  }

  .tcf-work-actions {
    flex-direction: column;
  }

  .tcf-btn {
    width: 100%;
  }

  .tcf-work-detail-meta {
    flex-direction: column;
    gap: 1rem;
  }

  .tcf-correction-navigation {
    flex-direction: column;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tcf-work-card {
  animation: fadeInUp 0.3s ease-out;
}

.tcf-stat-card {
  animation: fadeInUp 0.3s ease-out;
}

.tcf-stat-card:nth-child(1) {
  animation-delay: 0.1s;
}
.tcf-stat-card:nth-child(2) {
  animation-delay: 0.2s;
}
.tcf-stat-card:nth-child(3) {
  animation-delay: 0.3s;
}
.tcf-stat-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* États de chargement */
.tcf-loading {
  opacity: 0.6;
  pointer-events: none;
}

.tcf-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Messages d'erreur */
.tcf-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  color: #dc2626;
  text-align: center;
  margin: 2rem 0;
}

/* États vides */
.tcf-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.tcf-empty-state i {
  width: 4rem;
  height: 4rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

/* ========================================
   PAGINATION STYLES - VERSION MODERNE
   ======================================== */

.tcf-pagination {
  margin-top: 3rem;
  /* padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04); */
}

.tcf-pagination-info {
  text-align: center;
  margin-bottom: 1.5rem;
  display: none;
}

.tcf-pagination-text {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  background: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tcf-pagination-nav {
  display: flex;
  justify-content: center;
  margin-top: 80px;
}

.tcf-pagination-list {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
  background: #ffffff;
  padding: 0.5rem;
  border-radius: 12px;
  /* border: 1px solid #e2e8f0; */
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); */
}

.tcf-pagination-item {
  margin: 0;
}

.tcf-pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  /* min-width: 2.75rem;
  height: 2.75rem; */
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}



.tcf-pagination-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 10px;
  z-index: -1;
}

.tcf-pagination-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  border-color: transparent;
}

.tcf-pagination-link:hover::before {
  opacity: 1;
}

.tcf-pagination-link:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.tcf-pagination-current {
  background: #1460DA;
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
  cursor: default;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.tcf-pagination-current::before {
  opacity: 1;
}

.tcf-pagination-current:hover {
  color: #ffffff;
  transform: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.tcf-pagination-prev,
.tcf-pagination-next {
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  background: #ffffff;
  /* border: 1px solid #e2e8f0; */
  border-radius: 10px;
  color: #475569;
  /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
}

.tcf-pagination-prev:hover,
.tcf-pagination-next:hover {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tcf-pagination-prev i,
.tcf-pagination-next i {
  width: 1.125rem;
  height: 1.125rem;
}

.tcf-pagination-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  color: #94a3b8;
  font-weight: 600;
  font-size: 1rem;
}

.tcf-pagination-ellipsis span {
  user-select: none;
}

/* Styles pour les statistiques améliorées */
.tcf-works-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.tcf-stats-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.tcf-stats-item i {
  width: 1rem;
  height: 1rem;
  color: #3b82f6;
}

/* Responsive pour la pagination moderne */
@media (max-width: 768px) {
  .tcf-pagination {
    padding: 1rem;
    margin-top: 2rem;
  }
  
  .tcf-pagination-list {
    gap: 0.25rem;
    padding: 0.375rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .tcf-pagination-link {
    /* min-width: 2.5rem;
    height: 2.5rem; */
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .tcf-pagination-prev,
  .tcf-pagination-next {
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
  }
  
  .tcf-pagination-prev i,
  .tcf-pagination-next i {
    width: 1rem;
    height: 1rem;
  }
  
  /* Masquer certains numéros de page sur mobile pour économiser l'espace */
  .tcf-pagination-item:not(.tcf-pagination-ellipsis):nth-child(n+6):nth-last-child(n+4) {
    display: none;
  }
  
  .tcf-pagination-text {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  
  .tcf-works-stats {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .tcf-pagination {
    padding: 0.75rem;
  }
  
  .tcf-pagination-list {
    gap: 0.125rem;
    padding: 0.25rem;
  }
  
  .tcf-pagination-link {
    min-width: 2.25rem;
    height: 2.25rem;
    font-size: 0.7rem;
  }
  
  .tcf-pagination-prev,
  .tcf-pagination-next {
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
  }
  
  /* Sur très petit écran, ne montrer que prev/next et page actuelle */
  .tcf-pagination-item:not(.tcf-pagination-ellipsis):nth-child(n+4):nth-last-child(n+3) {
    display: none;
  }
  
  .tcf-pagination-text {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }
}

/* ========================================
   PAGINATION LOADING STATES - VERSION AMÉLIORÉE
   ======================================== */

.tcf-pagination-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.tcf-loading-spinner {
  text-align: center;
  background: #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  backdrop-filter: blur(10px);
}

.tcf-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #f1f5f9;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

.tcf-loading-spinner p {
  margin: 0;
  color: #64748b;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: scale(0.95);
  }
  to { 
    opacity: 1; 
    transform: scale(1);
  }
}

/* État de chargement amélioré - SANS perturbation de layout */
.tcf-works-list.tcf-loading {
  position: relative;
  pointer-events: none;
}

/* Overlay de chargement qui ne perturbe pas le layout */
.tcf-works-list.tcf-loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  z-index: 100;
  border-radius: 12px;
  animation: fadeIn 0.2s ease-out;
}

/* Spinner centré qui ne perturbe pas le layout */
.tcf-works-list.tcf-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid #f1f5f9;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 101;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Assurer que la grille conserve sa structure pendant le chargement */
.tcf-works-grid.tcf-loading {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 1.5rem !important;
}

/* Conserver l'opacité des éléments sans changer leur disposition */
.tcf-works-list.tcf-loading .tcf-works-grid > * {
  opacity: 0.3;
  transition: opacity 0.2s ease;
}