/**
 * Styles pour le système de devis
 */

/* Widget Panier (header) */
.devis-cart-widget {
  display: inline-block;
  position: relative;
}

.devis-cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.devis-cart-link:hover {
  text-decoration: none;
  opacity: 0.8;
}

.devis-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: #dc3545;
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.devis-cart-count[data-count="0"] {
  display: none;
}

.devis-cart-count.pulse {
  animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Bouton Ajouter au Devis */
.devis-add-button-wrapper {
  margin: 20px 0;
}

.devis-add-btn {
  position: relative;
  min-width: 200px;
  padding: 12px 24px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.devis-add-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.devis-add-success {
  display: inline-block;
  padding: 12px 24px;
  background: #28a745;
  color: white;
  border-radius: 4px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page Panier */
.devis-cart-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.devis-cart-empty {
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: #6c757d;
}

.devis-cart-products {
  margin-bottom: 40px;
}

.devis-products-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.devis-products-table th,
.devis-products-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.devis-products-table th {
  background: #f8f9fa;
  font-weight: 600;
}

.devis-products-table tr {
  transition: opacity 0.3s ease;
}

.devis-product-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  margin-right: 10px;
  border-radius: 4px;
  vertical-align: middle;
}

.devis-quantity-input {
  width: 80px;
  padding: 6px 12px;
  text-align: center;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

.devis-cart-actions {
  text-align: right;
  margin-top: 20px;
}

/* Formulaire */
.devis-form-wrapper {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
}

.devis-form-wrapper h2 {
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.form-control:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-actions {
  margin-top: 30px;
  text-align: center;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert ul {
  margin: 0;
  padding-left: 20px;
}

/* Grid System Simple */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .devis-products-table {
    font-size: 14px;
  }
  
  .devis-products-table th,
  .devis-products-table td {
    padding: 10px;
  }
  
  .devis-product-thumb {
    width: 40px;
    height: 40px;
  }
}

/* Buttons styles */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-primary {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #004085;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #545b62;
  border-color: #4e555b;
}

.btn-danger {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 18px;
}

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