/* RESET DE BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* Corps du document */
body {
  color: #333;
}

/* HEADER */
header {
  position: fixed;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 999;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #3a613f; /* Couleur verte pour le côté éco */
  letter-spacing: 1px;
}

.navbar nav a {
  margin: 0 1rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar nav a:hover {
  color: #3a613f;
}

.navbar .cart-btn {
  padding: 0.5rem 1rem;
  background-color: #3a613f;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.navbar .cart-btn:hover {
  background-color: #2a452c;
}

/* Sélecteur de langue */
#language-selector {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  margin-left: 1rem; /* Espace entre le bouton Panier et le sélecteur */

  /* Personnaliser la flèche du sélecteur */
  -webkit-appearance: none; /* Supprimer l'apparence par défaut sur Chrome et Safari */
  -moz-appearance: none;    /* Supprimer l'apparence par défaut sur Firefox */
  appearance: none;         /* Supprimer l'apparence par défaut */
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5" viewBox="0 0 10 5"><path fill="%23333333" d="M0 0l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 5px;
  padding-right: 2rem; /* Espace pour la flèche personnalisée */
}

/* Masquer la flèche par défaut dans Internet Explorer */
select::-ms-expand {
  display: none;
}

/* Lorsque le sélecteur est en focus */
#language-selector:focus {
  outline: none;
  border-color: #3a613f;
  box-shadow: 0 0 5px rgba(58, 97, 63, 0.5);
}

/* Effet de survol */
#language-selector:hover {
  border-color: #3a613f;
}

/* Classe pour cacher visuellement un élément mais le laisser accessible aux lecteurs d'écran */
.visually-hidden { 
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; /* Évite que le texte ne soit affiché sur plusieurs lignes */
  border: 0;
}

/* HERO SECTION */
.hero {
  height: 100vh;
  /* Image aléatoire (picsum) */
  background: url('https://picsum.photos/id/1019/1920/1080') no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #fff;
  position: relative;
}

/* Pour compenser le header en position fixed */
.hero::before {
  content: "";
  display: block;
  height: 80px; /* hauteur du header approx. */
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero .cta-btn {
  background-color: #3a613f;
  padding: 1rem 2rem;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.hero .cta-btn:hover {
  background-color: #2a452c;
}

/* SECTION ABOUT */
.about {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #3a613f;
}

.about-text p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.about-text ul {
  margin-bottom: 1rem;
  padding-left: 1.2rem;
  list-style: disc;
}

.about-text ul li {
  margin-bottom: 0.5rem;
}

.about img {
  width: 100%;
  border-radius: 10px;
}

/* SECTION PRODUITS */
.products {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
}

.products h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #3a613f;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

/* Cards produits */
.product-item {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.product-item:hover {
  transform: translateY(-5px);
}

/* PRODUCT IMAGES */
.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover; /* Assure que l'image couvre toute la zone sans déformation */
  display: block;
}

/* Si vous souhaitez ajuster spécifiquement chaque image, vous pouvez conserver les classes spécifiques */

.product-content {
  padding: 1rem;
  text-align: center;
}

.product-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.product-content p {
  margin-bottom: 1rem;
  color: #777;
}

.product-content .price {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
}

.product-content button {
  padding: 0.7rem 1.5rem;
  background-color: #3a613f;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.product-content button:hover {
  background-color: #2a452c;
}

/* SECTION TÉMOIGNAGES */
.testimonials {
  background-color: #f9f9f9;
  padding: 3rem 1rem;
}

.testimonials h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #3a613f;
}

.testimonial-cards {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 2rem;
}

.testimonial-card p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: #555;
}

.testimonial-card .client-name {
  font-weight: 600;
  color: #333;
  text-align: right;
}

/* SECTION NEWSLETTER */
.newsletter {
  max-width: 1200px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
}

.newsletter h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.newsletter p {
  margin-bottom: 2rem;
  color: #666;
}

.newsletter form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.newsletter button {
  padding: 0.8rem 2rem;
  background-color: #3a613f;
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.newsletter button:hover {
  background-color: #2a452c;
}

/* FOOTER */
footer {
  background-color: #3a613f;
  color: #fff;
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.footer-section {
  flex: 1 1 200px;
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-section a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  margin: 0.2rem 0;
}

.footer-section a:hover {
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icons i {
  font-size: 1.2rem;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.social-icons i:hover {
  opacity: 0.7;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .about {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .navbar nav {
    display: none; /* simplification : ajouter un burger menu si nécessaire */
  }

  .navbar .logo {
    margin-right: auto;
  }

  /* Ajustements pour le sélecteur de langue */
  .navbar {
    flex-wrap: wrap;
  }

  #language-selector {
    margin-left: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    width: 100%;
  }
}
