/* =================================================================
   ORDER LIST CSS - Mobile First Design
   Tableau de Bord Client pour iMagin.K
================================================================= */

/* Variables CSS (à définir dans le fichier principal si pas déjà fait) */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --accent-color: #17a2b8;
  --light-bg: #f8f9fa;
  --dark-text: #343a40;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;
}

/* =================================================================
   EN-TÊTE DE PAGE
================================================================= */

.display-5 {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0;
}

/* Responsive pour l'en-tête */
@media (max-width: 768px) {
  .d-flex.justify-content-between.align-items-center {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch !important;
  }
  
  .display-5 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
  }
}

/* Bouton principal "Lancer un Nouveau Projet" */
.btn-primary.btn-lg {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.btn-primary.btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  background: linear-gradient(135deg, #0056b3, var(--primary-color));
}

.btn-primary.btn-lg:active {
  transform: translateY(0);
}

/* =================================================================
   TABLEAU DES COMMANDES
================================================================= */

/* Conteneur principal du tableau */
.card.shadow-sm {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  border: none;
  overflow: hidden;
}

/* En-tête du tableau */
.table thead th {
  background-color: var(--light-bg);
  color: var(--dark-text);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 1.2rem 1rem;
  border-bottom: 2px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Corps du tableau */
.table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f3f4;
}

.table tbody tr:hover {
  background-color: #f8f9ff;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.table tbody td {
  padding: 1.2rem 1rem;
  vertical-align: middle;
  font-size: 0.95rem;
}

/* Numéro de commande */
.table tbody td .fw-bold {
  color: var(--primary-color);
  font-size: 1rem;
}

/* Nom du projet avec icône */
.table tbody td .d-flex.align-items-center i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.table tbody td .fw-medium {
  color: var(--dark-text);
  font-weight: 500;
}

/* Badges de statut améliorés */
.table .badge {
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
  font-weight: 500;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 100px;
  justify-content: center;
}

.table .badge.bg-warning {
  background-color: var(--warning-color) !important;
  color: #856404 !important;
}

.table .badge.bg-info {
  background-color: var(--info-color) !important;
  color: white !important;
}

.table .badge.bg-success {
  background-color: var(--success-color) !important;
  color: white !important;
}

.table .badge.bg-danger {
  background-color: var(--danger-color) !important;
  color: white !important;
}

.table .badge.bg-secondary {
  background-color: var(--secondary-color) !important;
  color: white !important;
}

/* Bouton "Voir les Détails" */
.btn-outline-primary.btn-sm {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
}

.btn-outline-primary.btn-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

/* =================================================================
   SECTION "AUCUN PROJET"
================================================================= */

.text-center.py-5 {
  padding: 3rem 1rem !important;
}

.text-center.py-5 .fa-rocket {
  color: var(--secondary-color);
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.text-center.py-5 h3 {
  color: var(--dark-text);
  font-weight: 700;
  margin-bottom: 1rem;
}

.text-center.py-5 .lead {
  color: var(--secondary-color);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Boutons de la section vide */
.d-flex.justify-content-center.gap-3 {
  gap: 1rem !important;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .d-flex.justify-content-center.gap-3 {
    flex-direction: column;
  }
  
  .d-flex.justify-content-center.gap-3 .btn {
    width: 100%;
  }
}

/* Bouton secondaire */
.btn-outline-secondary.btn-lg {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline-secondary.btn-lg:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(108, 117, 125, 0.2);
}

/* Carte "Pourquoi choisir iMagin.K" */
.card.bg-light {
  background-color: var(--light-bg) !important;
  border-radius: 10px;
  margin-top: 2rem;
}

.card.bg-light .card-body {
  padding: 2rem;
}

.card.bg-light h5 {
  color: var(--dark-text);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.card.bg-light .fa-lightbulb {
  color: var(--warning-color);
}

.card.bg-light .row .col-md-4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card.bg-light small {
  color: var(--secondary-color);
  font-weight: 500;
}

/* =================================================================
   CARTES DE STATISTIQUES RAPIDES
================================================================= */

.row.mt-5 h3 {
  color: var(--dark-text);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Cartes de statistiques */
.card.border-0 {
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.card.border-0::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
  transition: opacity 0.3s ease;
  opacity: 0;
}

.card.border-0:hover::before {
  opacity: 1;
}

.card.border-0:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card.border-0 .card-body {
  padding: 2rem;
  text-align: center;
}

.card.border-0 i {
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.card.border-0:hover i {
  transform: scale(1.1);
}

.card.border-0 .card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card.border-0 .card-text.h4 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
}

/* Couleurs spécifiques pour chaque carte */
.card.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), #0056b3) !important;
}

.card.bg-info {
  background: linear-gradient(135deg, var(--info-color), #138496) !important;
}

.card.bg-success {
  background: linear-gradient(135deg, var(--success-color), #1e7e34) !important;
}

.card.bg-warning {
  background: linear-gradient(135deg, var(--warning-color), #e0a800) !important;
  color: #856404 !important;
}

/* =================================================================
   ANIMATIONS CSS
================================================================= */

/* Animation fadeInUp */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* États initiaux pour les animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Délais pour l'effet d'escalier */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* =================================================================
   RESPONSIVE DESIGN
================================================================= */

/* Tablettes */
@media (max-width: 992px) {
  .table-responsive {
    border-radius: 12px;
  }
  
  .card.border-0 .card-body {
    padding: 1.5rem;
  }
  
  .card.border-0 .card-text.h4 {
    font-size: 2rem;
  }
}

/* Mobiles */
@media (max-width: 768px) {
  .container-fluid {
    padding: 1rem;
  }
  
  .table thead th,
  .table tbody td {
    padding: 0.8rem 0.5rem;
    font-size: 0.9rem;
  }
  
  .table .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    min-width: auto;
  }
  
  .text-center.py-5 {
    padding: 2rem 0 !important;
  }
  
  .text-center.py-5 .fa-rocket {
    font-size: 3rem !important;
  }
  
  .card.bg-light .card-body {
    padding: 1.5rem;
  }
  
  .card.bg-light .row .col-md-4 {
    margin-bottom: 1rem;
    justify-content: center;
  }
  
  .row.mt-5 .col-md-3 {
    margin-bottom: 1rem;
  }
}

/* Très petits écrans */
@media (max-width: 576px) {
  .display-5 {
    font-size: 1.8rem;
  }
  
  .btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
  
  .table {
    font-size: 0.85rem;
  }
  
  .table thead th {
    font-size: 0.75rem;
  }
}