@import url('global.css');
:root {
  --banner-height: 500px;
  --banner-shadow: 4px 4px 6px rgba(0, 0, 0, 0.7);
  --product-gap: 24px;
  --product-img-size: 300px; /* taille optimisée pour la grille */
}

/* Banner */
.banner {
  position: relative;
  background-image: url(../img/banniere.webp);
  color: #fff;
  text-align: center;
  background-size: cover;
  background-position: center;
  height: var(--banner-height);
  background-repeat: no-repeat;
}

.banner .title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.banner h1 {
  margin: 0;
  font-size: 48px;
  text-shadow: var(--banner-shadow);
}

/* ===== VERSION DESKTOP ===== */

/* Desktop (769px et plus) */
@media (min-width: 769px) {
  .banner .title {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: none;
  }
}

/* Container */
.container {
  margin: 0 auto;
  padding: 20px;
  background-color:rgba(247, 241, 227,1.0)
}

.content {
  width: 90%;
  margin: 0 auto;
}

/* Grid produits */
.product {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 320px));
  gap: 30px;
  margin-top: 30px;
  justify-items: center;
  max-width: calc(4 * 320px + 3 * 30px);
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* Carte produit */
.amongus-red {
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

/* Lien produit */
.amongus-red a {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
}

/* Image produit */
.img {
  width: 300px;
  height: 300px;
  border-radius: 12px;
  background: url("../img/among1.png") no-repeat center center;
  background-size: cover;
  background-position: center;
  margin: 0 auto;
}

/* Titre et description */
.title {
  font-size: 17px;
  font-weight: bold;
  margin-top: 10px;
  text-align: center;
}

.short-description {
  font-size: 14px;
  color: #555;
  margin-top: 8px;
  text-align: center;
  max-width: 90%;
}

.price {
  font-size: 24px;
  color: rgba(192, 57, 43,1.0);
  font-weight: bold;
  margin-top: 10px;
  text-align: center;
}

/* Responsive : moins de 1200px, auto-fit */
@media (max-width: 1200px) {
  .product {
    grid-template-columns: repeat(auto-fit, minmax(220px, 240px));
    gap: 30px;
    max-width: calc(2 * 240px + 1 * 30px);
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
}

/* ===== RESPONSIVE DESIGN AMÉLIORÉ ===== */

/* Tablettes (768px et moins) */
@media (max-width: 768px) {
  .banner {
    height: 300px;
  }
  
  .banner .title {
    width: 100%;
  }
  
  .banner h1 {
    font-size: 28px;
    width: 100%;
    text-align: center;
  }
  
  .container {
    padding: 15px;
  }
  
  .content {
    width: 95%;
  }
  
  .product {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-width: none;
  }
  
  .img {
    width: 300px;
    height: 300px;
  }
  
  .title {
    font-size: 16px;
  }
  
  .short-description {
    font-size: 13px;
  }
  
  .price {
    font-size: 20px;
  }
}

/* Mobiles (480px et moins) */
@media (max-width: 480px) {
  .banner {
    height: 200px;
  }
  
  .banner .title {
    width: 100%;
  }
  
  .banner h1 {
    font-size: 20px;
    width: 100%;
    text-align: center;
    padding: 0 10px;
  }
  
  .container {
    padding: 10px;
  }
  
  .content {
    width: 98%;
  }
  
  .product {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
  }
  
  .amongus-red {
    padding: 12px;
    margin: 0 auto;
    max-width: 280px;
  }
  
  .img {
    width: 200px;
    height: 200px;
  }
  
  .title {
    font-size: 15px;
    margin-top: 8px;
  }
  
  .short-description {
    font-size: 12px;
    margin-top: 6px;
  }
  
  .price {
    font-size: 18px;
    margin-top: 8px;
  }
}

/* Très petits écrans (320px et moins) */
@media (max-width: 320px) {
  .banner {
    height: 150px;
  }
  
  .banner .title {
    width: 100%;
  }
  
  .banner h1 {
    font-size: 16px;
    width: 100%;
    text-align: center;
    padding: 0 5px;
  }
  
  .container {
    padding: 8px;
  }
  
  .amongus-red {
    padding: 10px;
    max-width: 250px;
  }
  
  .img {
    width: 150px;
    height: 150px;
  }
  
  .title {
    font-size: 14px;
  }
  
  .short-description {
    font-size: 11px;
  }
  
  .price {
    font-size: 16px;
  }
}
