
/* Style de la barre supérieure */
.top-bar {
  background-color: #343a40; /* Couleur de fond sombre */
  color: #ffffff; /* Couleur du texte en blanc */
  padding: 10px 20px; /* Espacement interne */
  text-align: center; /* Centre le texte dans la barre */
  font-size: 1.4rem; /* Taille de police légèrement plus petite */
}

/* Contenu de la barre supérieure */
.top-bar-content {
  max-width: 1200px; /* Largeur maximale pour le contenu */
  margin: 0 auto; /* Centre le conteneur */
}

/* Style des paragraphes dans la barre supérieure */
.top-bar p {
  margin: 0; /* Supprime la marge par défaut */
  color: white;
}

/* Responsive : Taille des cartes produits */
@media (max-width: 768px) {
  .product-card {
    width: calc(50% - 10px); /* Deux cartes par ligne */
  }
}

@media (max-width: 480px) {
  .product-card {
    width: 100%; /* Une carte par ligne */
  }
}

/* Style pour la section héro */
.hero {
  position: relative; /* Positionnement relatif pour le contenu absolu */
  height: 400px; /* Hauteur de la section héro */
  background-image: url('imgs/st.webp'); /* Image de fond */
  background-size: cover; /* Couvre entièrement la section */
  background-position: center; /* Centre l'image de fond */
  display: flex; /* Utilisation de Flexbox pour centrer le contenu */
  align-items: center; /* Centre verticalement le contenu */
  justify-content: center; /* Centre horizontalement le contenu */
  color: #ffffff; /* Couleur du texte */
  text-align: center; /* Centre le texte */
  padding: 20px; /* Espacement interne */
}


/* Style de la section de chargement */
#loading {
  position: fixed; /* Position fixe pour couvrir toute la fenêtre */
  top: 0; /* Aligner en haut */
  left: 0; /* Aligner à gauche */
  width: 100%; /* Prendre toute la largeur de l'écran */
  height: 100%; /* Prendre toute la hauteur de l'écran */
  background-color: rgba(255, 255, 255, 0.8); /* Fond blanc transparent */
  display: flex; /* Utilisation de Flexbox pour centrer le contenu */
  align-items: center; /* Centrer verticalement */
  justify-content: center; /* Centrer horizontalement */
  z-index: 1000; /* S'assurer que la section est au-dessus des autres éléments */
}

/* Style du texte de chargement */
#loading p {
  font-size: 1.5rem; /* Taille de police pour le texte */
  color: #343a40; /* Couleur du texte */
  margin: 0; /* Supprimer les marges par défaut */
}

/* Ajout d'une animation de chargement (facultatif) */
#loading:after {
  content: ''; /* Création d'un élément pseudo après */
  display: block; /* Afficher l'élément */
  width: 40px; /* Largeur du cercle */
  height: 40px; /* Hauteur du cercle */
  border: 4px solid #28a745; /* Bordure verte */
  border-top: 4px solid transparent; /* Bord supérieur transparent */
  border-radius: 50%; /* Cercle */
  animation: spin 1s linear infinite; /* Animation de rotation */
  margin-top: 20px; /* Espace entre le texte et l'animation */
}

/* Animation de rotation */
@keyframes spin {
  0% {
    transform: rotate(0deg); /* Rotation initiale */
  }
  100% {
    transform: rotate(360deg); /* Rotation complète */
  }
}


/* General mobile styles */
@media only screen and (max-width: 768px) {
    .product-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .product-item {
        width: 90%; /* Adjust width to fit smaller screens */
        margin-bottom: 20px; /* Add space between products */
        text-align: center;
    }

    .product-item img {
        max-width: 100%;
        height: auto; /* Ensure images maintain their aspect ratio */
        border-radius: 10px; /* Add rounded corners */
    }

    .product-name, .product-price {
        font-size: 16px; /* Adjust font size for readability */
    }
    
    .product-price {
        color: #e63946; /* Maintain the price color in a readable way */
        font-weight: bold;
    }
}

/* Smaller mobile devices (portrait phones, less than 576px) */
@media only screen and (max-width: 576px) {
    .product-container {
        padding: 10px;
    }

    .product-item {
        width: 100%;
    }

    .product-item img {
        max-width: 100%;
    }

    .product-name, .product-price {
        font-size: 14px; /* Further adjust text size for small screens */
    }
}



.categories {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.category {
  text-align: center;
  text-decoration: none;
  color: #333;
  transition: transform 0.3s ease;
}

.category img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ddd;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.category:hover img {
  transform: scale(1.1);
  border-color: #333;
}

.category p {
  margin-top: 10px;
  font-size: 16px;
  font-weight: bold;
}





/* Footer container */
footer {
  background-color: #2c3e50; /* Dark background color */
  color: #fff; /* White text color */
  padding: 20px 0;
  text-align: center;
}

.footer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-bottom: 20px;
}

/* Footer social media section */
.footer-social p {
  font-size: 18px;
  margin-bottom: 10px;
}

ul.social-links {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 15px;
}

ul.social-links li {
  display: inline-block;
}

ul.social-links li a {
  text-decoration: none;
}

ul.social-links img {
  width: 30px; /* Adjust the size of the social media icons */
  height: 30px;
  transition: transform 0.3s ease;
}

ul.social-links img:hover {
  transform: scale(1.2); /* Slight zoom on hover */
}

/* Footer bottom section */
.footer-bottom {
  border-top: 1px solid #fff;
  padding-top: 10px;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
  color: #bdc3c7;
}







/* Product Wrapper */
.product-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 15px;
}

/* Carte produit */
.product-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: calc(25% - 20px); /* Largeur de 4 produits par ligne sur les grands écrans */
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Effet hover */
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Image produit */
.product-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Titre produit */
.product-card h3 {
  font-size: 1.6rem;
  color: #333;
  margin: 15px 0;
}

/* Description produit */
.product-card p {
  font-size: 1rem;
  color: #777;
  margin-bottom: 15px;
}

/* Prix produit */
.product-card p:last-child {
  font-size: 1.2rem;
  color: #ff6347;
  font-weight: bold;
  margin-top: 10px;
}

/* Titre de section centré */
.center {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
  color: white;
  font-family: 'Arial', sans-serif;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  background-color: gray;
}

/* Media Queries */

/* Petits écrans (téléphones) */
@media (max-width: 767px) {
  .product-card {
    width: calc(100% - 20px); /* 1 produit par ligne */
  }
}

/* Tablettes en mode portrait */
@media (min-width: 768px) and (max-width: 1024px) {
  .product-card {
    width: calc(50% - 20px); /* 2 produits par ligne */
  }
}

/* Tablettes en mode paysage */
@media (min-width: 1025px) and (max-width: 1199px) {
  .product-card {
    width: calc(33.33% - 20px); /* 3 produits par ligne */
  }
}

/* Grands écrans (ordinateur) */
@media (min-width: 1200px) {
  .product-card {
    width: calc(25% - 20px); /* 4 produits par ligne */
  }
}
