/* === style-home-modern.css === */

/* Reset box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Corps de page */
body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f0f4f8;
  margin: 0;
  padding: 0;
  color: #1e293b;
}

/* Conteneur principal produits */
.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box;
  padding: 20px;
  background: #fff;
}

/* Cartes produits modernisées avec nuance bleu-vert */
.product-card {
  border-radius: 12px;
  box-shadow:
    0 4px 8px rgba(37, 171, 232, 0.25),
    0 8px 20px rgba(87, 215, 91, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  padding: 0;
}

.product-card:hover,
.product-card:focus-within {
  transform: translateY(-6px);
  box-shadow:
    0 8px 16px rgba(37, 171, 232, 0.35),
    0 16px 30px rgba(87, 215, 91, 0.25);
  outline: none;
}



.product-card:hover img,
.product-card:focus-within img {
  transform: scale(1.05);
}

/* Zone texte et actions */
.info {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 0 0 12px 12px;
  
}

/* Prix */
.price {
  font-weight: 700;
  font-size: 1.3rem;
  color: #e0f2f1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  margin-bottom: 8px;
}

/* Titre */
.title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Promotion */
.promo {
  font-size: 0.85rem;
  color: #a5d6a7;
  font-weight: 600;
  margin-bottom: 12px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
}

/* Actions boutons */
.actions {
  margin-top: auto;
  display: flex;
  gap: 12px;
}

.actions button,
.actions .btn-secondary {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.95rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  cursor: pointer;
}

.actions button {
  background: #25abe8;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 171, 232, 0.6);
}

.actions button:hover,
.actions button:focus {
  background: #1b8ec6;
  box-shadow: 0 6px 16px rgba(27, 142, 198, 0.8);
  outline: none;
}

.actions .btn-secondary {
  background: rgba(255, 255, 255, 0.25);
  color: #e0f2f1;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 3px 6px rgba(255, 255, 255, 0.2);
}

.actions .btn-secondary:hover,
.actions .btn-secondary:focus {
  background: rgba(255, 255, 255, 0.45);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.4);
  outline: none;
}

/* Focus visible pour accessibilité clavier */
.actions button:focus-visible,
.actions .btn-secondary:focus-visible {
  outline: 2px solid #25abe8;
  outline-offset: 2px;
}

/* Responsive : taille image et texte réduite sur petits écrans */
@media (max-width: 600px) {
  .product-card img {
    height: 180px;
  }

  .price {
    font-size: 1.1rem;
  }

  .title {
    font-size: 0.9rem;
  }

  .actions button,
  .actions .btn-secondary {
    font-size: 0.85rem;
    padding: 8px 10px;
  }
}
.old-price {
    text-decoration: line-through;
    color: #9ca3af;
    margin-right: 6px;
    font-size: 0.9em;
}
/* Carte produit : fond blanc très transparent, sans dégradé */
.product-card {
  background: rgba(255, 255, 255, 0.15) !important; /* fond très transparent */
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  color: #000; /* texte noir par défaut */
  padding: 0;
  position: relative; /* nécessaire pour position absolue bouton favoris */
}

/* Titre en noir, police fine et moderne */
.product-card .title {
  color: #000 !important;
  font-weight: 300 !important;
  font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 1rem !important;
  margin-bottom: 12px !important;
  line-height: 1.2 !important;
  text-shadow: none !important; /* supprimer ombres sur texte */
}

/* Image produit (optionnel, léger flou / transparence) */
.product-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  opacity: 0.9; /* légère transparence sur image */
  transition: transform 0.3s ease;
}

.product-card:hover img,
.product-card:focus-within img {
  transform: scale(1.03);
  opacity: 1;
}

/* Zone info (texte) : fond transparent */
.product-card .info {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background-color: transparent !important;
  color: #000 !important;
}

/* Prix en noir */
.product-card .price {
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  color: #000 !important;
  text-shadow: none !important;
  margin-bottom: 8px !important;
}

/* Actions boutons - centrage horizontal du bouton Ajouter au panier */
.product-card .actions {
  margin-top: auto;
  display: flex;
  justify-content: center; /* centrer horizontalement */
  gap: 12px;
  padding-bottom: 10px;
}

/* Bouton Ajouter au panier */
.product-card .actions button {
  background: #059669 !important; /* couleur verte */
  color: #fff !important;
  border-radius: 6px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.6);
  transition: background-color 0.3s ease;
  flex: none; /* ne pas s’étirer */
}

.product-card .actions button:hover,
.product-card .actions button:focus {
  background: #047857 !important;
  outline: none;
}

/* Bouton Ajouter aux favoris - position en haut à droite */
.product-card form.favorite-form {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  padding: 0;
  z-index: 10;
}

.product-card form.favorite-form button.btn-favorite {
  background: transparent !important;
  border: none !important;
  font-size: 1.6rem !important;
  cursor: pointer;
  color: #000 !important; /* icône noire */
  transition: color 0.3s ease;
}

.product-card form.favorite-form button.btn-favorite:hover,
.product-card form.favorite-form button.btn-favorite:focus {
  color: #059669 !important; /* vert au survol */
  outline: none;
}
