/* Variables de couleur */
:root {
  --primary-color: #3398b1;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

/* Container principal */
.essuie-glace-order-form {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Cartes de pack */
.pack-card {
  transition: all 0.3s ease;
  border: 2px solid #dee2e6;
  cursor: pointer;
}

.pack-card:hover,
.pack-card.active {
  border-color: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pack-card .form-check-input:checked ~ .form-check-label {
  color: var(--primary-color);
}

.pack-card .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Détails du pack */
.pack-details {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #dee2e6;
}

.pack-products {
  margin-top: 15px;
}

.pack-products table {
  font-size: 0.9rem;
}

/* Formulaire */
.order-form .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.order-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.order-form .text-danger {
  color: var(--danger-color);
}

/* Boutons */
.btn-primary,
.btn-outline-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-primary:hover,
.btn-outline-primary:hover {
  background-color: #0b5ed7 !important;
  border-color: #0a58ca !important;
  color: white !important;
}

.btn-outline-primary {
  background-color: transparent !important;
  color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color) !important;
  color: white !important;
}

/* Accordéon */
.accordion-button:not(.collapsed) {
  background-color: var(--primary-color);
  color: white;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Messages */
.order-messages {
  margin-top: 20px;
}

.alert {
  border-radius: 0.375rem;
}

/* Responsive */
@media (max-width: 768px) {
  .essuie-glace-order-form {
    padding: 10px;
  }

  .pack-card {
    margin-bottom: 15px;
  }

  .pack-products table {
    font-size: 0.8rem;
  }
}

/* Animation de chargement */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.fa-spinner.fa-spin {
  animation: spin 1s linear infinite;
}

/* Description de campagne */
.campaign-description {
  background-color: var(--light-color);
  padding: 20px;
  border-radius: 0.375rem;
  border-left: 4px solid var(--primary-color);
}

.campaign-description h1,
.campaign-description h2,
.campaign-description h3 {
  color: var(--primary-color);
}

/* Image de campagne */
.campaign-image {
  text-align: center;
}

.campaign-image img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Tableau des commandes d'essuie-glace dans le compte utilisateur */
.digi-wiper-orders-container {
  width: 100%;
  margin-top: 40px;
}

.digi-wiper-orders-container h2 {
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 24px;
  font-weight: 600;
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 10px;
}

.digi-wiper-orders-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: none;
}

.digi-wiper-orders-table thead {
  background-color: #2d2d2c;
  color: white;
}

/* Style pour les headers WooCommerce dans notre tableau */
.digi-wiper-orders-table .woocommerce-orders-table__header {
  background-color: #2d2d2c;
  color: white !important;
}

.digi-wiper-orders-table .woocommerce-orders-table__header .nobr {
  color: white !important;
}

.digi-wiper-orders-table thead th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.digi-wiper-orders-table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid #e9ecef;
}

.digi-wiper-orders-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.digi-wiper-orders-table tbody tr:hover {
  background-color: #e3f2fd;
  transform: translateY(1px);
}

.digi-wiper-orders-table td {
  padding: 15px;
  border: none;
  vertical-align: middle;
}

.digi-wiper-orders-table .order-number a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
}

.digi-wiper-orders-table .order-number a:hover {
  color: #764ba2;
  text-decoration: underline;
}

.digi-wiper-orders-table .center-info {
  font-weight: 500;
  color: #2c3e50;
}

.digi-wiper-orders-table .order-date {
  color: #6c757d;
  font-size: 14px;
  font-style: italic;
}

.digi-wiper-orders-table .actions-cell {
  text-align: center;
}

.digi-csv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.digi-csv-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
  text-decoration: none;
  color: white;
}

/* Tableau réassort */
#tableau_reassort {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#tableau_reassort .reassort-table-header th {
  font-weight: 600;
  padding: 12px;
  border: none;
  text-transform: uppercase;
  font-size: 0.875rem;
  background-color: var(--primary-color) !important;
  color: #fff;
  letter-spacing: 0.5px;
}

#tableau_reassort tbody tr:nth-child(odd) {
  background-color: #ccc;
}

#tableau_reassort tbody tr:hover {
  background-color: #e9ecef;
  transform: translateY(1px);
  transition: all 0.2s ease;
}

#tableau_reassort td {
  padding: 12px;
  vertical-align: middle;
  border: none;
  border-top: 1px solid #dee2e6;
}

#tableau_reassort .reassort-reference {
  font-weight: bold;
  color: var(--dark-color);
  font-size: 0.95rem;
}

#tableau_reassort .reassort-designation {
  font-size: 0.9em;
  color: #6c757d;
  line-height: 1.4;
}

#tableau_reassort .product-quantity {
  width: 100px;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
  .digi-wiper-orders-table {
    font-size: 14px;
  }

  .digi-wiper-orders-table thead th,
  .digi-wiper-orders-table td {
    padding: 10px 8px;
  }

  .digi-csv-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  #tableau_reassort {
    font-size: 0.875rem;
  }

  #tableau_reassort .reassort-table-header th {
    padding: 8px;
    font-size: 0.75rem;
  }

  #tableau_reassort td {
    padding: 8px;
  }

  #tableau_reassort .reassort-designation {
    font-size: 0.8em;
  }

  #tableau_reassort .product-quantity {
    width: 80px;
  }
}

/* Prix barrés */
.price-strikethrough {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 0.9em;
}

/* Prix promotionnels */
.promotional-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.promotional-price strong {
  font-size: 1.1em;
  color: #dc3545;
}

.promotional-price .badge {
  font-size: 0.75em;
  animation: pulse-promo 2s infinite;
}

@keyframes pulse-promo {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Tableau réassort */
.reassort-order-table th {
  background-color: #70ad47;
  color: white;
  font-weight: 600;
}
