/* Style de la page produit */
.product-container {
    display: flex;
    justify-content: space-between;
    margin: 30px;
}

.product-image {
    position: relative;
    width: 50%;
}

.product-image img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.product-description {
    width: 45%;
}

.product-description h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.product-description .price {
    font-size: 1.5rem;
    color: #007BFF;
    margin-bottom: 20px;
}

.product-description p {
    font-size: 1rem;
    margin-bottom: 10px;
}

.product-description ul {
    list-style-type: none;
    padding: 0;
}

.product-description ul li {
    margin-bottom: 10px;
}

.add-to-cart {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #0056b3;
}

.add-to-cart-btn {
  background-color: #007bff; /* Couleur de fond bleue */
  color: #fff; /* Texte blanc */
  border: none;
  border-radius: 5px; /* Coins arrondis */
  padding: 10px 20px; /* Espacement intérieur */
  font-size: 1rem; /* Taille de police */
  cursor: pointer; /* Curseur en forme de main */
  transition: background-color 0.3s ease; /* Animation au survol */
}

.add-to-cart-btn:hover {
  background-color: #0056b3; /* Couleur de fond plus foncée au survol */
}

.add-to-cart-btn:active {
  transform: scale(0.95); /* Effet de clic */
}
.add-to-cart-btn i {
  margin-right: 8px; /* Espace entre l'icône et le texte */
}	
@keyframes addedToCart {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.add-to-cart-btn.added {
  animation: addedToCart 0.3s ease;
}

.toast {
  visibility: hidden; /* Caché par défaut */
  min-width: 250px; /* Largeur minimale */
  background-color: #333; /* Fond sombre */
  color: #fff; /* Texte blanc */
  text-align: center; /* Centrer le texte */
  border-radius: 5px; /* Coins arrondis */
  padding: 16px; /* Espacement intérieur */
  position: fixed; /* Position fixe */
  z-index: 1000; /* Au-dessus de tout */
  bottom: 30px; /* Position en bas */
  left: 50%; /* Centrer horizontalement */
  transform: translateX(-50%); /* Ajustement pour le centrage */
  opacity: 0; /* Transparent par défaut */
  transition: opacity 0.5s, visibility 0.5s; /* Animation */
}

.toast.show {
  visibility: visible; /* Visible */
  opacity: 1; /* Opacité complète */
}
/* Style du bouton pour ouvrir la vue 3D */
.view-3d {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: background-color 0.3s;
}

.view-3d:hover {
    background-color: #218838;
}

/* Style de la fenêtre modale */
.modal-3d {
    display: none; /* Par défaut, la fenêtre modale est cachée */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 40%;
    max-height: 80%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
    background: none;
    border: none;
}

.close-modal:hover {
    color: #333;
}

/* Style du conteneur 3D */
.three-d-container canvas {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Pour que le modèle s'ajuste à l'intérieur sans déformation */
}


/* Optionnel : Ajouter des styles supplémentaires pour la fenêtre modale (ex. responsive) */
@media (max-width: 768px) {
    .product-container {
        flex-direction: column;
        align-items: center;
    }

    .product-image, .product-description {
        width: 90%;
    }
}
