/**
 * 🚀 Styles - Système de Validation de Prestations
 * Interface moderne et intuitive pour la validation client
 */

/* ============================================================================ */
/* PAGE DE VALIDATION */
/* ============================================================================ */

.validation-page {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  padding: 2rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================================================ */
/* EN-TÊTE DE VALIDATION */
/* ============================================================================ */

.validation-header {
  text-align: center;
  margin-bottom: 3rem;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.validation-breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.validation-breadcrumb a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s;
}

.validation-breadcrumb a:hover {
  color: #2563eb;
}

.validation-breadcrumb .separator {
  margin: 0 0.5rem;
  color: #9ca3af;
}

.validation-breadcrumb .current {
  color: #1f2937;
  font-weight: 500;
}

.validation-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.validation-subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================================ */
/* CARTES D'INFORMATIONS */
/* ============================================================================ */

.info-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f3f4f6;
}

.service-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.service-type {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.service-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  transition: background 0.2s;
}

.detail-item:hover {
  background: #f3f4f6;
}

.detail-item i {
  color: #3b82f6;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.detail-item span {
  color: #4b5563;
  font-size: 0.95rem;
}

.service-location {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #eff6ff;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
}

.service-location i {
  color: #3b82f6;
  font-size: 1.2rem;
}

.service-location span {
  color: #1e40af;
  font-weight: 500;
}

/* ============================================================================ */
/* STATUT DE VALIDATION */
/* ============================================================================ */

.validation-status-section {
  margin-bottom: 2rem;
}

.status-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-left: 4px solid #f59e0b;
  transition: transform 0.3s ease;
}

.status-card:hover {
  transform: translateX(4px);
}

.status-card.status-green {
  border-left-color: #10b981;
}

.status-card.status-red {
  border-left-color: #ef4444;
}

.status-card.status-orange {
  border-left-color: #f59e0b;
}

.status-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.status-card.status-orange .status-icon {
  background: #fef3c7;
  color: #f59e0b;
}

.status-card.status-green .status-icon {
  background: #d1fae5;
  color: #10b981;
}

.status-card.status-red .status-icon {
  background: #fee2e2;
  color: #ef4444;
}

.status-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.status-content p {
  color: #6b7280;
  margin: 0;
}

/* ============================================================================ */
/* FORMULAIRES DE VALIDATION */
/* ============================================================================ */

.validation-form-section {
  margin-bottom: 2rem;
}

.validation-form-wrapper {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.validation-form-wrapper h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h5 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section h5::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 2px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ============================================================================ */
/* ZONE D'UPLOAD */
/* ============================================================================ */

.file-upload-area {
  position: relative;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  background: #f9fafb;
}

.file-upload-area:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.file-upload-area.has-files {
  border-color: #10b981;
  background: #ecfdf5;
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-placeholder {
  color: #6b7280;
  font-size: 0.95rem;
}

.upload-placeholder i {
  font-size: 2rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
  display: block;
}

.upload-preview {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.upload-preview-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  aspect-ratio: 1;
}

.upload-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview-item .remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.upload-preview-item .remove-btn:hover {
  background: #dc2626;
}

/* ============================================================================ */
/* ACTIONS DE VALIDATION */
/* ============================================================================ */

.validation-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.btn-approve,
.btn-reject {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 150px;
  justify-content: center;
}

.btn-approve {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-approve:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-reject {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.btn-reject:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.btn-approve:disabled,
.btn-reject:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================================================ */
/* HISTORIQUE DE VALIDATION */
/* ============================================================================ */

.validation-history {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.validation-history h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.history-timeline {
  position: relative;
  padding-left: 2rem;
}

.history-timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -1.5rem;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #10b981;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 3px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.timeline-date {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.timeline-description {
  color: #4b5563;
  margin-bottom: 0.5rem;
}

.timeline-notes {
  font-style: italic;
  color: #6b7280;
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
}

/* ============================================================================ */
/* CONTESTATIONS */
/* ============================================================================ */

.disputes-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.disputes-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.dispute-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: #fef2f2;
  border-left: 4px solid #f59e0b;
}

.dispute-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dispute-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.dispute-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.dispute-status.status-orange {
  background: #fef3c7;
  color: #d97706;
}

.dispute-status.status-gray {
  background: #f3f4f6;
  color: #6b7280;
}

.dispute-date {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.dispute-description {
  color: #4b5563;
  margin-bottom: 0.5rem;
}

.dispute-refund {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ============================================================================ */
/* MODALE DE CONTESTATION */
/* ============================================================================ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.2s;
}

.close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* ============================================================================ */
/* BOUTONS D'ACTION */
/* ============================================================================ */

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-secondary {
  background: #f3f4f6;
  color: #4b5563;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-dispute {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.btn-dispute:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.btn-support {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
}

.btn-support:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* ============================================================================ */
/* MESSAGES D'ERREUR ET CHARGEMENT */
/* ============================================================================ */

.info-loading {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.info-loading i {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  color: #dc2626;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.error-message i {
  font-size: 1.2rem;
}

/* ============================================================================ */
/* RESPONSIVE */
/* ============================================================================ */

@media (max-width: 768px) {
  .validation-page {
    padding: 1rem 0;
  }
  
  .validation-header {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .validation-header h1 {
    font-size: 2rem;
  }
  
  .service-details {
    grid-template-columns: 1fr;
  }
  
  .service-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .status-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .validation-actions {
    flex-direction: column;
  }
  
  .btn-approve,
  .btn-reject {
    width: 100%;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .upload-preview {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

@media (max-width: 480px) {
  .validation-form-wrapper {
    padding: 1.5rem;
  }
  
  .dispute-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .timeline-item {
    padding-left: 1.5rem;
  }
  
  .timeline-marker {
    left: -1rem;
  }
}

/* ============================================================================ */
/* ANIMATIONS */
/* ============================================================================ */

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

.validation-form-wrapper {
  animation: fadeIn 0.5s ease;
}

.status-card {
  animation: fadeIn 0.5s ease 0.2s both;
}

.info-card {
  animation: fadeIn 0.5s ease 0.1s both;
}

/* ============================================================================ */
/* ACCESSIBILITÉ */
/* ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.btn:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ============================================================================ */
/* UTILITAIRES */
/* ============================================================================ */

.text-center {
  text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
