/* =========================================

   STYLE DU PLUGIN CONNECTEUR API (COMPLET)

   ========================================= */

* {

  box-sizing: border-box;

  margin: 0;

  padding: 0;

}



section {

  margin-bottom: 40px;

}



section:last-child {

  margin-bottom: 0;

}



/* --- HERO SECTION --- */

#hero {

  position: relative;

  height: 80vh;

  min-height: 500px;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  color: white;

  text-align: center;

  overflow: hidden;

  margin-bottom: 0;

}



#hero::before {

  content: '';

  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 100%;

  background-image: url('https://images.unsplash.com/photo-1510812431401-41d2bd2722f3?auto=format&fit=crop&w=1920&q=80');

  background-size: cover;

  background-position: center;

  background-attachment: fixed;

  z-index: -2;

}



#hero::after {

  content: '';

  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 100%;

  background: rgba(0, 0, 0, 0.4);

  z-index: -1;

}



#hero h1 {

  font-size: clamp(2rem, 5vw, 3rem);

  margin-bottom: 20px;

  animation: fadeInUp 1s ease forwards;

  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);

  color: white;

}



#hero p {

  font-size: clamp(1rem, 2vw, 1.2rem);

  margin-bottom: 40px;

  animation: fadeInUp 1.2s ease forwards;

  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);

}



.cta-button {

  padding: 15px 40px;

  background-color: #800020;

  color: #fff;

  border-radius: 5px;

  font-weight: bold;

  text-decoration: none;

  transition: all 0.3s ease;

  animation: fadeInUp 1.4s ease forwards;

  display: inline-block;

}



.cta-button:hover {

  background-color: #a00030;

  transform: translateY(-2px);

  box-shadow: 0 5px 15px rgba(128, 0, 32, 0.4);

}



/* --- ANIMATIONS --- */

@keyframes fadeInUp {

  0% { opacity: 0; transform: translateY(50px); }

  100% { opacity: 1; transform: translateY(0); }

}



.fade-in {

  opacity: 0;

  transform: translateY(50px);

  transition: opacity 1s ease, transform 1s ease;

}



.fade-in.visible {

  opacity: 1;

  transform: translateY(0);

}



/* --- RÉASSURANCE --- */

#reassurance {

  padding: 40px 20px;

  background: linear-gradient(135deg, #800020 0%, #a00030 100%);

  color: white;

}



.reassurance-grid {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

  gap: 30px;

  max-width: 1200px;

  margin: 0 auto;

}



.reassurance-item {

  text-align: center;

  padding: 20px;

  transition: transform 0.3s ease;

}



.reassurance-item:hover {

  transform: translateY(-5px);

}



.reassurance-icon {

  font-size: 3rem;

  margin-bottom: 15px;

  display: block;

  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));

}



.reassurance-item h3 {

  font-size: 1.2rem;

  margin-bottom: 10px;

  font-weight: bold;

}



.reassurance-item p {

  font-size: 0.95rem;

  opacity: 0.9;

  line-height: 1.5;

}



/* --- CATÉGORIES --- */

#categories {

  padding: 60px 20px;

  text-align: center;

  background-color: #f9f9f9;

}



#categories h2 {

  font-size: clamp(1.8rem, 4vw, 2.5rem);

  margin-bottom: 40px;

  color: #800020;

}



.categories-grid {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

  gap: 30px;

  max-width: 1200px;

  margin: 0 auto;

}



.product-card {

  background: white;

  border-radius: 20px;

  overflow: hidden;

  box-shadow: 0 5px 15px rgba(0,0,0,0.1);

  transition: all 0.3s ease;

}



.product-card:hover {

  transform: translateY(-10px);

  box-shadow: 0 15px 30px rgba(0,0,0,0.2);

}



.product-card-image {

  width: 100%;

  height: 400px;

  object-fit: cover;

  object-position: center;

  display: block;

  transition: transform 0.5s ease;

}



.product-card:hover .product-card-image {

  transform: scale(1.1);

}



.product-card-content {

  padding: 20px;

}



.product-card h3 {

  font-size: 1.5rem;

  margin-bottom: 15px;

  color: #333;

}



.product-button {

  padding: 10px 30px;

  background-color: #800020;

  color: #fff;

  border-radius: 5px;

  text-decoration: none;

  display: inline-block;

  transition: all 0.3s ease;

  font-weight: bold;

}



.product-button:hover {

  background-color: #a00030;

  transform: scale(1.05);

}



/* --- NOS PRODUITS (API) --- */

#nos-produits {

  padding: 80px 20px;

  background: linear-gradient(to bottom, #ffffff 0%, #f9f9f9 100%);

}



.products-header {

  text-align: center;

  margin-bottom: 60px;

}



.products-header h2 {

  font-size: clamp(2rem, 4vw, 2.8rem);

  color: #800020;

  margin-bottom: 15px;

}



.products-header p {

  font-size: 1.1rem;

  color: #666;

}



/* CORRECTION : Grille fixée à 3 colonnes */

.products-grid {

  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 30px;

  max-width: 1300px;

  margin: 0 auto 50px;

}



/* Design des cartes API */

.product-item {

  background: white;

  border-radius: 15px;

  overflow: hidden;

  box-shadow: 0 3px 10px rgba(0,0,0,0.08);

  transition: all 0.4s ease;

  position: relative;

}



.product-item:hover {

  transform: translateY(-8px);

  box-shadow: 0 12px 30px rgba(128, 0, 32, 0.15);

}



.product-image-wrapper {

  position: relative;

  overflow: hidden;

  height: 300px;

  background: #f5f5f5;

}



.product-image {

  width: 100%;

  height: 100%;

  object-fit: cover;

  transition: transform 0.6s ease;

}



.product-item:hover .product-image {

  transform: scale(1.1);

}



.product-info {

  padding: 20px;

}



.product-title {

  font-size: 1.3rem;

  color: #333;

  margin-bottom: 8px;

  font-weight: 600;

}



.product-category {

  color: #888;

  font-size: 0.9rem;

  margin-bottom: 10px;

}



.product-rating {

  font-size: 0.9rem;

  margin-bottom: 15px;

}



.product-footer {

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding-top: 15px;

  border-top: 1px solid #eee;

}



.product-price {

  font-size: 1.4rem;

  color: #800020;

  font-weight: bold;

}



.product-add-cart {

  background: #800020;

  color: white;

  border: none;

  padding: 10px 20px;

  border-radius: 5px;

  cursor: pointer;

  font-weight: bold;

  transition: all 0.3s ease;

}



.product-add-cart:hover {

  background: #a00030;

  transform: scale(1.05);

}



.products-cta {

  text-align: center;

}



/* --- AVIS CLIENTS --- */

#avis {

  padding: 60px 20px;

  text-align: center;

  position: relative;

  overflow: hidden;

  color: white;

}



#avis::before {

  content: '';

  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 100%;

  background-image: url('https://images.unsplash.com/photo-1566843972142-a7fcb70de55a?auto=format&fit=crop&w=1920&q=80');

  background-size: cover;

  background-position: center;

  z-index: -2;

}



#avis::after {

  content: '';

  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 100%;

  background: rgba(0, 0, 0, 0.7);

  z-index: -1;

}



#avis h2 {

  font-size: clamp(1.8rem, 4vw, 2.5rem);

  margin-bottom: 40px;

  position: relative;

  z-index: 1;

}



.avis-grid {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

  gap: 30px;

  max-width: 1000px;

  margin: 0 auto;

  position: relative;

  z-index: 1;

}



.avis-card {

  background: rgba(255, 255, 255, 0.15);

  backdrop-filter: blur(10px);

  border-radius: 15px;

  padding: 30px;

  transition: all 0.3s ease;

}



.avis-card:hover {

  background: rgba(255, 255, 255, 0.25);

  transform: translateY(-5px);

}



.avis-card p {

  font-size: 1.1rem;

  font-style: italic;

  margin-bottom: 15px;

  line-height: 1.6;

}



.avis-card cite {

  font-weight: bold;

  color: #ffd700;

}



/* --- À PROPOS --- */

#apropos {

  padding: 60px 20px;

  text-align: center;

  position: relative;

  color: white;

  overflow: hidden;

}



#apropos::before {

  content: '';

  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 100%;

  background-image: url('https://images.unsplash.com/photo-1504279577054-acfeccf8fc52?auto=format&fit=crop&w=1920&q=80');

  background-size: cover;

  background-position: center;

  background-attachment: fixed;

  z-index: -2;

}



#apropos::after {

  content: '';

  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 100%;

  background: rgba(0, 0, 0, 0.5);

  z-index: -1;

}



.apropos-content {

  max-width: 700px;

  margin: 0 auto;

  position: relative;

  z-index: 1;

}



#apropos h2 {

  font-size: clamp(1.8rem, 4vw, 2.5rem);

  margin-bottom: 25px;

}



#apropos p {

  font-size: 1.1rem;

  line-height: 1.8;

  margin-bottom: 30px;

}



.apropos-image {

  width: 100%;

  max-width: 500px;

  height: auto;

  border-radius: 15px;

  box-shadow: 0 10px 30px rgba(0,0,0,0.5);

  display: block;

  margin: 0 auto;

}



/* --- CORRECTIF DÉCALAGE ET ALIGNEMENT --- */



#api-conteneur-produits.products-grid {

    /* 1. On force le mode grille */

    display: grid !important;

    

    /* 2. IMPORTANT : On supprime tout alignement vertical pour que tous soient au même niveau */

    align-items: stretch !important;

    align-content: start !important;

    

    /* 3. On tue tous les espaces et textes fantômes */

    font-size: 0 !important;

    line-height: 0 !important;

    

    /* 4. On supprime les marges internes parasites */

    padding: 0 !important;

    margin-top: 0 !important;

    margin-bottom: 50px !important;

}



/* 5. CRITIQUE : Toutes les cartes produits doivent avoir la même hauteur et position de départ */

#api-conteneur-produits .product-item {

    margin: 0 !important;

    align-self: start !important;

    position: relative !important;

}



/* 6. On rétablit la taille de texte normale pour les cartes */

#api-conteneur-produits .product-item,

#api-conteneur-produits .product-item * {

    font-size: 1rem !important; 

    line-height: 1.6 !important;

}



/* 7. On rétablit la pagination */

#api-conteneur-produits .pagination-container,

#api-conteneur-produits .pagination-container * {

    font-size: 1rem !important;

}



/* --- RESPONSIVE --- */

@media (max-width: 992px) {

  #hero {

    height: 60vh;

  }



  /* Grille produits API : 2 colonnes sur tablette */

  .products-grid {

    grid-template-columns: repeat(2, 1fr) !important;

  }

}



@media (max-width: 768px) {

  /* Grille catégories et avis : 1 colonne sur mobile */

  .categories-grid,

  .avis-grid {

    grid-template-columns: 1fr;

  }



  /* Grille produits API : 1 colonne sur mobile */

  .products-grid {

    grid-template-columns: 1fr !important;

  }



  #hero::before,

  #apropos::before {

    background-attachment: scroll;

  }

}