/* Styles pour la page de commande */

.commande-section {
  min-height: 50vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.commande-section h1 {
  margin-bottom: 2rem;
  color: var(--dark-color);
  text-align: center;
}

/* Layout de la commande */
.commande-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Résumé du produit */
.product-summary {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
  padding: 1.5rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-summary h2 {
  margin-bottom: 1.5rem;
  color: var(--dark-color);
  font-size: 1.3rem;
  text-align: center;
  position: relative;
  padding-bottom: 0.8rem;
  font-family: 'Montserrat', Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}

.product-summary h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 3px;
}

.product-details {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.product-details img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
  cursor: pointer; /* Indique que l'image est cliquable */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-details img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.clickable-image::after {
  content: '🔍';
  position: absolute;
  bottom: 5px;
  right: 5px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  padding: 3px;
  font-size: 12px;
  display: none;
}

.product-details img:hover::after {
  display: block;
}

.product-info {
  flex: 1;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-info2 h3 {
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  font-family: 'Montserrat', Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}

.product-variant {
  color: #777;
  margin-bottom: 0.8rem;
}

.product-quantity-price {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #eee;
}

.product-quantity-price p {
  display: flex;
  justify-content: space-between;
}

/* Supprimer la bordure autour du champ de quantité */
#product-quantity {
  font-weight: bold;
  color: #e74c3c;
  border: none;
  background: transparent;
}

/* S'assurer que le style est cohérent pour le reste du texte */
.product-quantity-price span {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product-total {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-total .price {
  font-size: 1.3rem;
  font-weight: bold;
  color: #e74c3c;
}

.price {
  color: #e74c3c;
  font-weight: 700;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Formulaire client */
.customer-info {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
  padding: 1.5rem;
  font-family: 'Montserrat', Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
}

.customer-info h2 {
  margin-bottom: 1.5rem;
  color: var(--dark-color);
  font-size: 1.3rem;
  text-align: center;
  position: relative;
  padding-bottom: 0.8rem;
}

.customer-info h2:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 3px;
}

.form-group {
  margin-bottom: 1.2rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--dark-color);
}

.required {
  color: #e74c3c;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1rem;
  width: 100%;
  font-size: 1.1rem;
  font-weight: bold;
  background-color: #0F7CB3 ; 
  color: #ffffff ;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s, transform 0.2s;
}

.btn i {
  margin-right: 0.5rem;
}

.btn:hover {
  background-color: #128c7e;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(-1px);
}


.form-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #777;
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Message d'erreur */
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  text-align: center;
  display: none;
}

.error-message.show {
  display: block;
}

/* CSS */
.back-btn-only {
  background-color: #f1f1f1;
  color: #333;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.back-btn-only:hover {
  background-color: #e5e5e5;
  transform: translateY(-2px);
}

.back-btn-only {
  font-size: 0.9rem;
}

/* Modal pour l'aperçu d'image */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  animation: fadeIn 0.3s;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  animation: zoomIn 0.3s;
}

#modal-image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  margin: auto;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
}

.close-modal:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Améliorations pour les boutons de quantité */
.quantity-selector {
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.quantity-btn {
  width: 40px; /* Augmenter la largeur */
  height: 40px; /* Augmenter la hauteur */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  cursor: pointer;
  font-size: 1.4rem; /* Augmenter la taille de la police */
  font-weight: bold;
  transition: background-color 0.2s, color 0.2s;
  border-radius: 4px;
}

.quantity-btn:hover {
  background-color: #4285f4;
  color: white;
}

/* Style pour l'affichage de la quantité */
.quantity-display {
  font-weight: bold;
  color: #e74c3c;
  border: none;
  background: transparent;
}

/* Désactiver les flèches du champ de nombre */
#product-quantity::-webkit-inner-spin-button,
#product-quantity::-webkit-outer-spin-button,
#quick-quantity::-webkit-inner-spin-button,
#quick-quantity::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#product-quantity::-webkit-inner-spin-button,
#product-quantity::-webkit-outer-spin-button,
#quick-quantity::-webkit-inner-spin-button,
#quick-quantity::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

#product-quantity[type=number],
#quick-quantity[type=number] {
  appearance: none;           
  -moz-appearance: textfield; 
}




/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 992px) {
  .commande-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .modal-content {
    max-width: 95%;
  }
}

@media (max-width: 576px) {
  .commande-section h1 {
    font-size: 1.5rem;
  }
  
  .product-details {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .product-quantity-price p,
  .product-total {
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
  }
  
  .customer-info {
    padding: 1.2rem;
  }
  
  .close-modal {
    top: -35px;
    right: 0;
    width: 35px;
    height: 35px;
    font-size: 24px;
  }
}

