/* GLOBAL STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
      display: flex;
  flex-direction: column;
  min-height: 100vh; /* Prend toute la hauteur de la fenêtre */
  font-family: 'Arial', sans-serif;
  background-color: #f4f4f4;
  color: #333;
}

h1, h2, h3 {
  font-weight: normal;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .logo h1 {
  font-size: 2rem;
  color: #FF5F5F;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

header nav ul li a {
  color: #333;
  font-size: 1rem;
  transition: color 0.3s;
}

header nav ul li a:hover {
  color: #FF5F5F;
}

/* Menu principal */
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li {
  position: relative; /* Nécessaire pour que le sous-menu soit positionné correctement */
}

nav ul li a {
  color: #333;
  font-size: 1rem;
  display: block;
}

/* Sous-menu */
.submenu {
  display: none; /* Cacher le sous-menu par défaut */
  position: absolute; /* Placer le sous-menu sous le menu principal */
  top: 100%; /* Le sous-menu se place juste en dessous de l'élément parent */
  left: 0;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  width: 200px; /* Largeur du sous-menu */
  padding: 10px 0;
}

.submenu li a {
  padding: 10px 20px;
  font-size: 0.9rem;
  color: #333;
  text-align: left;
}

/* Afficher le sous-menu au survol de "Cours" */
.menu-cours:hover .submenu {
  display: block;
}


nav ul li a:hover {
  color: #000000; /* Couleur de survol du menu */
}


/* CONTENU */

/* Style pour la section des produits */
#content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 40px 10px;
}

/* Style pour les catégories */
.category {
  margin-bottom: 30px;
    margin-left: 15px;
    margin-right: 20px;
    overflow: hidden;
}

.category-title {
  font-size: 2em;
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  text-transform: uppercase;
  font-weight: bold;
}

/* Conteneur du défilement horizontal */
.scrolling-wrapper {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 4px;
  scroll-behavior: smooth; /* Ajoute un effet de défilement fluide */
}

.scrolling-wrapper::-webkit-scrollbar {
  height: 8px;
}

.scrolling-wrapper::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 10px;
}

.scrolling-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

@media (max-width: 768px) {
  .product-card {
    width: 150px; /* Réduit la taille des cartes sur les écrans plus petits */
  }
}

@media (max-width: 480px) {
  .product-card {
    width: 150px; /* Encore plus petit sur les très petits écrans */
  }
}


/* Carte produit */
.product-card {
  width: 200px; /* Cette valeur peut être ajustée selon la taille que vous souhaitez */
  min-width: 150px; /* Valeur minimum pour que les produits restent bien proportionnés */
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease-in-out;
  flex-shrink: 0; /* Empêche les cartes de rétrécir si l'écran est plus petit */
}

.product-card:hover {
  transform: scale(1.02);
}

/* Image du produit */
.product-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-bottom: 2px solid #f4f4f4;
}

/* Titre du produit */
.product-title {
  font-size: 1.1em;
  margin: 8px;
  color: #333;
  text-align: center;
}

/* Description du produit */
.product-description {
  padding: 0 15px;
  font-size: 0.9em;
  color: #666;
  text-align: center;
}

/* Prix du produit */
.product-price {
  font-size: 1.1em;
  color: #28a745; /* Vert pour les produits gratuits */
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

.product-price-euro {
  font-size: 1.1em;
  color: #FF0800; /* Vert pour les produits gratuits */
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

/* Bouton */
.btn {
  display: block;
  width: 80%;
  margin: 10px auto;
  padding: 10px;
  text-align: center;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #0056b3;
}



/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  background-color: #333;
  color: white;
  margin-top: auto;         /* Pousse le footer au bas de la page */
}

footer .socials {
  margin-bottom: 10px;
}

footer .socials a {
  margin: 0 10px;
  color: white;
  font-size: 1.2rem;
  transition: color 0.3s;
}

footer .socials a:hover {
  color: #FF5F5F;
}
