/* ==========================================================================
   mac-home-featured-b.css — accueil « Les solutions les plus choisies »
   Variante B1 « panneau blanc flottant » validée par le propriétaire le 2026-11-30
   (maquette audits/2026-11-30-accueil-solutions-choisies/maquette-v2.html) :
   photo sur fond clair fondue (multiply, plus de boîte blanche), produit jamais assombri,
   titre + prix dans un panneau blanc posé sur le bas de la carte, aucun badge « -xx% ».
   Gabarit : templates/cms/_partials/mac-blocks.tpl (bloc featured_solutions_v2).
   Hydratation : macthemeconfig.php (prix HT/TTC selon le client + prix de référence barré).
   Chargée après mac-mineral-direct.css (head.tpl) ; spécificité renforcée par .mac-home-v2-featured.
   Rollback : retirer le <link> dans head.tpl + restaurer le gabarit.
   ========================================================================== */

.mac-home-v2-featured .mac-home-v2-featured__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.mac-home-v2-featured .mac-hfb-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #f3f1ec;
  color: #0e1a33;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(14, 26, 51, .08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.mac-home-v2-featured .mac-hfb-card::after { content: none; }
.mac-home-v2-featured .mac-hfb-card:hover,
.mac-home-v2-featured .mac-hfb-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(14, 26, 51, .16);
}

/* Photo : produit entier au-dessus du panneau, fondu dans le fond de la carte */
.mac-home-v2-featured .mac-hfb-img {
  position: absolute;
  inset: 0 0 96px 0;
  display: block;
  margin: 0;
  padding: 14px 14px 0;
  aspect-ratio: auto;
  background: transparent;
}
.mac-home-v2-featured .mac-hfb-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Panneau blanc flottant : titre + prix toujours sur fond uni */
.mac-home-v2-featured .mac-hfb-meta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(14, 26, 51, .12);
}
.mac-home-v2-featured .mac-hfb-name {
  color: #0e1a33;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em; /* 2 lignes réservées : prix alignés d'une carte à l'autre */
}

.mac-home-v2-featured .mac-hfb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mac-home-v2-featured .mac-hfb-pill {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 6px;
  padding: 0;
  background: none;
  color: #0e1a33;
  line-height: 1.15;
}
.mac-home-v2-featured .mac-hfb-old {
  font-size: 14px;
  font-weight: 600;
  color: #5d6579;
  text-decoration: line-through;
}
.mac-home-v2-featured .mac-hfb-now {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.mac-home-v2-featured .mac-hfb-tax {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #5d6579;
}
.mac-home-v2-featured .mac-hfb-oos {
  flex-basis: 100%;
  font-size: 12px;
  font-weight: 700;
  color: #5d6579;
}
.mac-home-v2-featured .mac-hfb-go {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0e1a33;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  transition: transform .18s ease;
}
.mac-home-v2-featured .mac-hfb-card:hover .mac-hfb-go { transform: translateX(2px); }

@media (max-width: 1000px) {
  .mac-home-v2-featured .mac-home-v2-featured__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .mac-home-v2-featured .mac-home-v2-featured__grid { gap: 12px; }
  .mac-home-v2-featured .mac-hfb-img { bottom: 104px; padding: 10px 10px 0; }
  .mac-home-v2-featured .mac-hfb-meta { left: 8px; right: 8px; bottom: 8px; padding: 10px 11px; }
  .mac-home-v2-featured .mac-hfb-name { font-size: 14px; }
  .mac-home-v2-featured .mac-hfb-now { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .mac-home-v2-featured .mac-hfb-card,
  .mac-home-v2-featured .mac-hfb-go { transition: none; }
}
