/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #2E8B57;
  /* vert foncé */
  color: #333;
  line-height: 1.6;
}

/* Container */
.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  padding: 20px 0;
}

/* Header */
header {
  background-color: white;
  color: white;
  padding: 20px 0;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
}

header .slogan {
  font-style: italic;
  font-size: 1rem;
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  background-color: #2E8B57;
  z-index: 1000;
  padding: 10px 0;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #ffa500;
}

/* Sections */
section {
  background-color: white;
  margin: 20px 0;
  padding: 40px 0;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

section.light {
  background-color: #f9f9f9;
}

/* Hero */
.hero {
  background: url('https://images.unsplash.com/photo-1581091870622-4cbda06c30ed?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 80px 20px;
  border-radius: 0;
  box-shadow: none;
}

/* Grilles (Produits et Agences) */
.grid {
  display: flex;
  /* Flex pour centrer les cartes */
  flex-wrap: wrap;
  /* Passe à la ligne si nécessaire */
  justify-content: center;
  /* Centre horizontalement */
  gap: 20px;
  /* Espace entre cartes */
  margin: 0 auto;
  /* Centre la grille dans la section */
  padding: 20px 0;
  position: relative;
  /* Pour les dropdowns absolus */
  overflow: visible;
  /* Permet aux dropdowns de déborder */
}

/* Cartes */
.card {
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 20px;
  width: 220px;
  /* Largeur uniforme */
  text-align: center;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Services */
#services ul {
  list-style: none;
  padding-left: 0;
  margin-top: 15px;
}

#services ul li {
  font-size: 1.1rem;
  padding: 10px 0;
}

/* Agences */
#agences h2 {
  text-align: center;
  margin-bottom: 30px;
}

#agences .card h3 {
  color: #2E8B57;
  margin-bottom: 10px;
}

#agences .card p {
  font-size: 1rem;
  margin: 5px 0;
}

/* Footer */
footer {
  background-color: #2E8B57;
  color: white;
  text-align: center;
  padding: 15px 0;
  font-size: 0.9rem;
}

/* Logo + Header */
.logo-box {
  background-color: white;
  padding: 10px;
  border-radius: 10px;
}

.logo {
  width: 12vw;
  height: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Couleurs par ligne */
.ligne1 {
  color: #2E8B57;
  font-size: 1.4rem;
}

.ligne2 {
  color: #2E8B57;
  font-size: 1.1rem;
}

.ligne3 {
  color: #2E8B57;
  font-size: 1.1rem;
}

.ligne4 {
  color: black;
  font-size: 1rem;
}

/* Section Marques */
#marques {
  background-color: #f9f9f9;
  padding: 40px 0;
  text-align: center;
}

#marques h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: black;
}

.marques-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  align-items: center;
  justify-items: center;
}

.marque-card img {
  max-width: 100px;
  height: auto;
  transition: transform 0.3s ease;
}

.marque-card img:hover {
  transform: scale(1.1);
}

/* Header container */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  padding: 10px 20px;
}

.header-top {
  text-align: center;
  margin-bottom: 10px;
}

.logo {
  max-height: 80px;
}

.slogan {
  font-size: 1.2em;
  color: #2e7d32;
  margin-top: 5px;
}

/* Barre de recherche */
.search-container {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.search-container form {
  display: flex;
}

.search-container input {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  width: 300px;
}

.search-container button {
  padding: 8px 12px;
  border: 1px solid #2e7d32;
  background-color: #2e7d32;
  color: white;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.search-container button:hover {
  background-color: #256027;
}

/* Navigation full-width */
.site-nav {
  width: 100%;
  background-color: black;
  padding: 10px 0;
  display: flex;
  justify-content: space-around;
  box-sizing: border-box;
  z-index: 999 !important;
}

.site-nav a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  padding: 5px 10px;
}

.site-nav a:hover {
  color: darkred;
  text-decoration: none;
}

#produits .card,
#services li,
#marques .marque-card {
  transition: all 0.3s ease;
}

/* Carrousel Marques */
.marques-carousel {
  overflow: hidden;
  width: 100%;
  background-color: #f9f9f9;
  padding: 20px 0;
}

.marques-track {
  display: flex;
  gap: 20px;
}

.marque-card {
  flex: 0 0 auto;
  text-align: center;
}

.marque-card img {
  max-width: 120%;
  max-height: 80px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.marque-card img:hover {
  transform: scale(1.1);
}

.marques-link {
  text-decoration: none;
  color: black;
  font-weight: bold;
}

.marques-link:hover {
  color: darkred;
}


/* Liste des produits au survol */
/* Carte catégorie */
/* Style des catégories */
/* Style de la liste sous-catégorie */
.categorie-card {
  position: relative;
  display: inline-block;
  margin: 20px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  cursor: pointer;
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

/* Modal Content */
.modal-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 500px;
  max-height: 80vh;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #2E8B57;
}

.modal-title {
  color: #2E8B57;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 5px;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
  background-color: #f0f0f0;
  color: #000;
}

/* Modal Body */
.modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

/* Products List in Modal */
.modal-products-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-products-list li {
  padding: 12px 15px;
  margin: 5px 0;
  background: #f9f9f9;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
}

.modal-products-list li:hover {
  background: #2E8B57;
  color: white;
  border-left-color: #1e5f3f;
  transform: translateX(5px);
}

.modal-products-list hr {
  display: none;
  /* Remove HR separators in modal */
}

/* Hide original sous-categorie lists since we're using modals */
.categorie-card .sous-categorie {
  display: none !important;
}

/* Product Detail Modal Styles */
.product-detail-content {
  max-width: 400px;
  padding: 0;
}

.product-detail-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-image-container {
  width: 100%;
  height: 200px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: 150px;
  max-height: 150px;
}

.product-info {
  padding: 20px;
  text-align: center;
}

.product-detail-name {
  color: #333;
  font-size: 1.4rem;
  font-weight: bold;
  margin: 0 0 10px 0;
}

.product-detail-description {
  color: #666;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 20px 0;
}

.btn-acheter {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  max-width: 200px;
}

.btn-acheter:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* Grille pour les produits cliqués */
#produit-display .product-card {
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 10px;
}

.product-card img {
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.product-card button {
  background-color: #2E8B57;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.product-card button:hover {
  background-color: #256027;
}


/*numero whatsapp et adresse email*/
.contact-phone {
  display: inline-block;
  padding: 10px 15px;
  background-color: transparent;
  /* pas de fond */
  color: black;
  /* texte noir */
  font-weight: none;
  border-radius: 5px;
  text-decoration: none;
}

.contact-phone:hover {
  color: darkred;
  /* devient vert au survol */
}

.contact-email {
  color: black;
  /* texte noir */
  font-weight: none;
  text-decoration: none;
}

.contact-email:hover {
  color: darkred;
  /* ou autre couleur au survol */
}


/* Section Commande */
#commande {
  background: #f8f8f8;
  padding: 40px 20px;
  width: 100%;
  margin: 20px 0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

#commande form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  /* limite la largeur du formulaire */
}

#commande h2 {
  text-align: center;
  margin-bottom: 20px;
}

#commande label {
  margin-top: 10px;
}

#commande input,
#commande textarea,
#commande button {
  padding: 10px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

#commande button {
  background-color: green;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

#commande button:hover {
  background-color: darkgreen;
}

/* Style des listes de sous-catégories */
.sous-categorie {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  max-height: 150px;
  /* Hauteur maximale pour le scroll */
  overflow-y: auto;
  /* Barre de défilement verticale */
  border-top: 1px solid #ddd;
}

/* Style des éléments de la liste */
.sous-categorie li {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

/* Hover pour rendre le clic visible */
.sous-categorie li:hover {
  background-color: #e0f7fa;
}


/*section acceuil pour carousel*/
.hero {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-track-acceuil {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease-in-out;
  /* animation fluide */
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.hero-foreground {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  color: white;
  text-align: center;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
  max-width: 80%;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: white;
  background-color: rgba(0, 0, 0, 0.3);
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 3;
  border-radius: 50%;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.6);
}


/*section arrivages-promotions*/
.arrivages {
  width: 100%;
  padding: 40px 5%;
  background: #f9f9f9;
}

.entete-section {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 40px;
  color: #333;
}

.bloc {
  display: flex;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 50px;
}

.titre-cadre {
  background-color: #8B0000;
  /* rouge sombre */
  color: white;
  padding: 20px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 6px;
  text-transform: uppercase;
  flex: 0 0 250px;
  /* largeur fixe */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.carousel {
  position: relative;
  overflow: hidden;
  flex: 1;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.card {
  flex: 0 0 calc(100% / 3);
  /* 3 cartes visibles */
  margin: 0 10px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  text-align: center;
}

.card img {
  max-width: 100%;
  margin: auto;
  height: 300px;
  /* taille fixe des images */
  object-fit: contain;
  /* recadre sans déformer */
  display: block;
}

.card-desc {
  padding: 10px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 2;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-dots {
  text-align: center;
  margin-top: 15px;
}

.carousel-dots button {
  width: 12px;
  height: 12px;
  margin: 0 4px;
  border-radius: 50%;
  border: none;
  background: #bbb;
  cursor: pointer;
}

.carousel-dots button.active {
  background: #8B0000;
}

.btn-acheter {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #28a745;
  /* vert */
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-acheter:hover {
  background-color: #218838;
  /* vert plus foncé au survol */
}

/* Style pour les boutons de la section nos services */
#services li {
  list-style: none;
  padding: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Effet au survol pour les boutons de la section nos services */
#services li:hover {
  color: darkred;
  /* couleur rouge sombre */
  text-decoration: underline;
  /* souligné */
  background-color: #f8eaea;
  /* optionnel : léger fond pour surligner */
}


/* Styles des cartes a la section produits*/
#produit-display {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.produit-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 200px;
  padding: 10px;
  text-align: center;
  transition: transform 0.3s;
}

.produit-card:hover {
  transform: scale(1.05);
}

.produit-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
}

.produit-card h3 {
  margin: 10px 0 5px 0;
}

.produit-card p {
  font-size: 0.9rem;
  color: #555;
}

.produit-card button {
  margin-top: 10px;
  padding: 8px 12px;
  background-color: darkred;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.produit-card button:hover {
  background-color: #a30000;
}


/*carousel acceuil*/
.hero {
  text-align: center;
  padding: 20px;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
}

.carousel-track-acceuil {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-item {
  min-width: 100%;
  position: relative;
}

.carousel-item img {
  width: 800px;
  /* largeur fixe */
  height: 400px;
  /* hauteur fixe */
  object-fit: cover;
  /* ajuste l’image pour remplir le cadre sans déformer */
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.carousel-caption {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 4px;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  /* centré verticalement */
  transform: translateY(-50%);
  font-size: 30px;
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  z-index: 10;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}



/*barre de recherches*/
.search-container {
  position: relative;
  /* nécessaire pour positionner la liste par rapport à la barre */
  width: 100%;
  max-width: 400px;
  /* largeur max de la barre */
  margin: 0 auto;
  /* centre la barre */
}

.search-container input {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

#searchResults {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  /* fond blanc */
  color: black;
  /* texte noir */
  border: 1px solid #ccc;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  list-style: none;
  margin: 0;
  padding: 0;
}

#searchResults li {
  padding: 8px;
  cursor: pointer;
  color: black;
  /* texte noir */
  background: white;
  /* fond blanc */
}

#searchResults li:hover {
  background: #f0f0f0;
  /* gris clair au survol */
}

/* Responsive Design pour les dropdowns */
@media (max-width: 768px) {
  .categorie-card>ul.sous-categorie {
    width: 200px;
    max-height: 250px;
    left: 50%;
    transform: translateX(-50%);
  }

  .grid {
    gap: 15px;
    padding: 15px 0;
  }

  .card {
    width: 180px;
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .categorie-card>ul.sous-categorie {
    width: 180px;
    max-height: 200px;
    font-size: 14px;
  }

  .sous-categorie li {
    padding: 8px 12px;
  }

  .card {
    width: 160px;
    padding: 12px;
    font-size: 14px;
  }
}