:root {
  /* Noms des variables mis à jour avec le préfixe v7-lfs- */
  --v7-lfs-color-bg-1: #1a1a1a;      
  --v7-lfs-color-bg-2: #49494975;      
  --v7-lfs-color-bouton-1: #ff5100;
  --v7-lfs-color-accent-1: #00ffe0;
  --v7-lfs-color-stars: #ffdd00;

  --v7-lfs-text-color: #fff;
}

body { font-family: 'Segoe UI', sans-serif; }

/* =========================================
   1. LAYOUT GLOBAL
   ========================================= */
.v7-lfs-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: 30px;
  flex-wrap: wrap;
}

.v7-lfs-filters-wrap {
  padding: 24px;
  max-width: 320px;
  width: 320px;
  border: none;
  border-radius: 16px;
  background: var(--v7-lfs-color-bg-1);
}

.v7-lfs-results-wrap { 
  flex: 1; 
  min-width: 300px; 
}

/* =========================================
   2. COLONNE FILTRES
   ========================================= */
.v7-lfs-filter-block { 
  margin-bottom: 10px; 
  padding: 16px 18px; 
}

.v7-lfs-price-title,
.v7-lfs-facet-title {
  font-size: 16px; 
  margin-bottom: 12px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  color: var(--v7-lfs-text-color); 
  font-weight: 600; 
  cursor: pointer; 
  font-family: monospace;
}

.v7-lfs-checkbox-group { 
  display: flex; 
  flex-direction: column; 
  gap: 3px; 
}

.v7-lfs-hidden-content { 
  display: none; 
}

.v7-lfs-arrow {
  color: var(--v7-lfs-text-color); 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  padding: 2px 6px; 
  font-size: 10px; 
  border-radius: 5px;
}

.v7-lfs-checkbox-row label {
  font-size: 13px; 
  color: var(--v7-lfs-text-color); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  width: 100%;
}

.v7-lfs-checkbox-row input[type="checkbox"] {
  margin-right: 8px; 
  width: 14px; 
  height: 14px; 
  transform: scale(0.85);
}

.v7-lfs-count { 
  margin-left: auto; 
  color: var(--v7-lfs-text-color); 
  font-size: 0.85em; 
}

/* --- Slider Prix --- */
.v7-lfs-price-range-box { 
  display: flex; 
  flex-direction: column; 
  margin-bottom: 20px; 
}

.v7-lfs-range-wrapper { 
  position: relative; 
  height: 35px; 
}

.v7-lfs-range-wrapper input[type=range] {
  position: absolute; 
  width: 100%; 
  pointer-events: none; 
  appearance: none; 
  height: 6px; 
  border-radius: 3px; 
  background: #ccc; 
  top: 13px;
}

.v7-lfs-range-wrapper input[type=range]::-webkit-slider-thumb {
  pointer-events: auto; 
  -webkit-appearance: none; 
  height: 20px; 
  width: 20px; 
  background: var(--v7-lfs-color-bouton-1);
  border: 3px solid white; 
  border-radius: 25%; 
  box-shadow: 0 0 3px rgba(0,0,0,0.4); 
  cursor: pointer; 
  position: relative; 
  z-index: 2;
}

.v7-lfs-range-wrapper input[type=range]::-moz-range-thumb {
  pointer-events: auto; 
  height: 20px; 
  width: 20px; 
  background: var(--v7-lfs-text-color);
  border: 3px solid white; 
  border-radius: 50%; 
  box-shadow: 0 0 3px rgba(0,0,0,0.4); 
  cursor: pointer; 
  position: relative; 
  z-index: 2;
}

.v7-lfs-range-track {
  position: absolute; 
  height: 6px; 
  border-radius: 3px; 
  top: 13px; 
  left: 0; 
  right: 0; 
  /* Le dégradé dynamique est géré par JS, couleur de fond par défaut : */
  background: #ccc; 
  z-index: 1;
}

.v7-lfs-price-values { 
  font-size: 13px; 
  margin-top: 10px; 
  text-align: center; 
  color: var(--v7-lfs-text-color); 
}

/* =========================================
   3. GRILLE DE RÉSULTATS (Responsive)
   ========================================= */
#v7-lfs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1280px) {
  #v7-lfs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  #v7-lfs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  #v7-lfs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } 
}
@media (max-width: 650px) {
  #v7-lfs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  #v7-lfs-grid { grid-template-columns: 1fr; }
}

/* =========================================
   4. CARTE PRODUIT
   ========================================= */
.v7-lfs-card {
  display: flex; 
  flex-direction: column; 
  background: var(--v7-lfs-color-bg-1);
  border-radius: 25px; 
  overflow: hidden; 
  box-shadow: none; 
  transition: transform .2s ease;
}
.v7-lfs-card:hover { transform: translateY(-4px);}

/* --- Media / Image --- */
.v7-lfs-media {
  display: block; 
  background: #fff; 
  position: relative;
  overflow: hidden; /* Important pour les badges */
}

.v7-lfs-media img {
  display: block; 
  width: 100%; 
  aspect-ratio: 1 / 1; 
  object-fit: contain; 
  padding: 14px;
  transition: transform .2s;
}

.v7-lfs-card:hover .v7-lfs-media img {
  transform: scale(1.05);
}

.v7-lfs-media.no-img { 
  background: #38363682; 
  height: 180px; 
}

/* Overlay "Voir test" */
.v7-lfs-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 8px 0;
  background: var(--v7-lfs-color-bg-2);
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.v7-lfs-card:hover .v7-lfs-overlay { opacity: 1; }

/* --- Contenu --- */
.v7-lfs-content { 
  display: flex; 
  flex-direction: column; 
  justify-content: space-evenly; 
  padding: 14px; 
  min-height: 180px;
}

.v7-lfs-title {
  color: #fff; 
  font-size: 16px; 
  font-weight: 700; 
  font-family: monospace; 
  margin: 0; 
  max-height: 50px; 
  min-height: 50px;
  transition: max-height 0.5s ease; 
  overflow: hidden;
}
.v7-lfs-content:hover .v7-lfs-title {
    max-height: 100px;
}

/* --- Note / Étoiles --- */
.v7-lfs-stars-row { 
  display: flex; 
  align-items: center; 
  gap: 4px; 
}
.v7-lfs-stars { 
  display: flex; 
  gap: 2px; 
}
.v7-lfs-stars .material-symbols-rounded{
  font-size: 16px;
}
.v7-lfs-star-full { 
  font-size: 16px; 
  color: var(--v7-lfs-color-stars); 
}
.v7-lfs-star-empty { 
  font-size: 16px; 
  color: #fff; 
}

/* --- Prix --- */
.v7-lfs-price-row { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.v7-lfs-price { 
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    margin-top: 5px;
    font-size: 18px; 
    color: #fff; 
}

.label-a-partir {
  font-size: 11px;
  color: #ccc; 
  font-weight: 400;
  margin-bottom: 2px;
  font-family: 'Segoe UI', sans-serif;
  text-transform: lowercase;
}

.v7-lfs-price strong {
  font-size: 16px; 
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.prix-non-communique {
    font-size: 13px;
    color: #888;
    font-style: italic;
}

/* --- Bouton Amazon --- */
.v7-lfs-btn-row { 
  display: flex; 
  gap: 8px; 
  margin-top: 6px; 
}

.v7-lfs-btn-amazon {
  position: relative; 
  background-color: var(--v7-lfs-color-bouton-1); 
  color: white; 
  padding: 8px 12px; 
  width: 100%;
  font-size: 15px; 
  font-weight: bold; 
  text-decoration: none !important;
  outline: none; 
  display: inline-block; 
  white-space: nowrap; 
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  border-radius: 50px; 
  text-align: center; 
  font-family: monospace;
  overflow: hidden; 
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease; 
  z-index: 0;
}

.v7-lfs-btn-amazon span { position: relative; z-index: 1; }

.v7-lfs-btn-amazon::before {
  content: ''; 
  position: absolute; 
  top: -50%; 
  left: -50%; 
  width: 200%; 
  height: 200%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0.4) 60%, transparent 100%);
  transform: rotate(-45deg); 
  opacity: 0; 
  transition: transform 0.5s ease, opacity 0.5s ease; 
  z-index: 0; 
  pointer-events: none;
}

.v7-lfs-btn-amazon:hover, .v7-lfs-btn-amazon:focus, .v7-lfs-btn-amazon:active {
  background-color: #000; 
  color: var(--v7-lfs-color-bouton-1); 
  transform: scale(1.05); 
  box-shadow: 0 0 15px var(--v7-lfs-color-bouton-1); 
  cursor: pointer;
}
.v7-lfs-btn-amazon:hover::before { 
  opacity: 1; 
  transform: rotate(-45deg) translateY(120%); 
}

/* =========================================
   5. ÉLÉMENTS INTERNES (Badges, Tags)
   ========================================= */

/* --- Catégories --- */
.v7-lfs-cat-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.v7-lfs-cat-tag {
  display: flex; 
  align-items: center; 
  gap: 4px; 
  background: #38363682; 
  color: #fff;
  padding: 4px 10px; 
  border-radius: 20px; 
  text-decoration: none; 
  font-size: 13px; 
  transition: all 0.2s ease;
}
.v7-lfs-cat-tag .material-symbols-rounded { font-size: 16px; }
.v7-lfs-cat-tag:hover { background: #fff; color: #1a1a1a; }

/* --- Badges --- */
.v7-lfs-badges-container {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.v7-lfs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-bottom: 6px;
  border-radius: 50px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease;
}

.v7-lfs-badge .material-symbols-rounded {
  font-size: 14px;
  line-height: 1;
}

/* Animation badges cachés */
.v7-lfs-badge-extra {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  transform: translateX(-20px);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.v7-lfs-card:hover .v7-lfs-badge-extra {
  opacity: 1;
  max-height: 30px;
  margin-bottom: 6px;
  padding-top: 6px;
  padding-bottom: 6px;
  transform: translateX(0);
}

.v7-lfs-card:hover .v7-lfs-badge-extra:nth-child(3) { transition-delay: 0.05s; }
.v7-lfs-card:hover .v7-lfs-badge-extra:nth-child(4) { transition-delay: 0.1s; }
.v7-lfs-card:hover .v7-lfs-badge-extra:nth-child(5) { transition-delay: 0.15s; }

/* =========================================
   6. NAVIGATION & ALERTES
   ========================================= */

/* --- No Results --- */
.v7-lfs-no-results {
  color: #fff; 
  background: var(--v7-lfs-color-bg-1); 
  padding: 16px; 
  border-radius: 10px; 
  text-align: center;
}

/* --- Sticky Alert --- */
#v7-lfs-sticky-alert {
  position: fixed; 
  bottom: 10px; 
  left: 50%; 
  transform: translate(-50%, 10px);
  width: 320px; 
  max-width: 90vw; 
  background: var(--v7-lfs-color-bg-2);
  text-align: center; 
  color: #fff; 
  padding: 10px; 
  font-size: 14px; 
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); 
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
  opacity: 0; 
  transition: opacity 0.3s ease, transform 0.3s ease; 
  pointer-events: none; 
  z-index: 999;
}
#v7-lfs-sticky-alert.visible { 
  opacity: 1; 
  transform: translate(-50%, 0); 
}

/* --- Scroll Top --- */
#v7-lfs-scroll-top {
  background: var(--v7-lfs-color-bg-2); 
  font-weight: bold; 
  position: fixed; 
  bottom: 10px; 
  right: 20px; 
  z-index: 999; 
  color: #fff;
  border: none; 
  padding: 10px 14px; 
  border-radius: 10px; 
  cursor: pointer; 
  font-size: 14px; 
  display: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); 
  width: 40px; 
  transition: all 0.2s ease;
}
#v7-lfs-scroll-top:hover { 
  background: #fff; 
  color: #000; 
}

/* =========================================
   7. GESTION DES FACETTES (Voir plus)
   ========================================= */
.v7-lfs-btn-show-more {
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  margin-top: 8px; 
  padding: 6px 10px;
  border-radius: 999px; 
  font-size: 12px; 
  line-height: 1; 
  cursor: pointer; 
  border: 1px solid #ddd; 
  background: transparent; 
  color: #fff; 
  width: 60px;
}
.v7-lfs-btn-show-more:hover,
.v7-lfs-btn-show-more[aria-expanded="true"] { 
  background: var(--v7-lfs-color-bg-2); 
  color: #fff; 
}

.v7-lfs-overflow { 
  display: none; 
}

/* =========================================
   8. BARRE DES FILTRES ACTIFS
   ========================================= */
#v7-lfs-active-bar {
  display: none;
  align-items: center; 
  gap: 8px; 
  flex-wrap: wrap; 
  color: #fff; 
  margin: 0 0 16px 0;
}
#v7-lfs-active-bar.visible { display: flex; }

#v7-lfs-active-bar .v7-lfs-chips { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  align-items: center; 
}

.v7-lfs-chip {
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  background: var(--v7-lfs-color-bg-1);
  border: 1px solid rgba(255, 255, 255, 0.1); 
  color: #fff; 
  padding: 6px 10px; 
  border-radius: 20px; 
  font-size: 12px; 
  line-height: 1; 
  transition: all 0.2s ease;
}
.v7-lfs-chip:hover { 
  background: var(--v7-lfs-color-bg-2); 
  color: #fff; 
}

.v7-lfs-chip-remove {
  border: 0; 
  background: transparent; 
  cursor: pointer; 
  color: inherit; 
  padding: 0; 
  line-height: 1;
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  width: 18px; 
  height: 18px; 
  border-radius: 50%; 
  transition: all 0.2s ease;
}
.v7-lfs-chip-remove:hover { 
  background: rgba(255, 255, 255, 0.851); 
  color: #fff; 
}

.v7-lfs-chip .material-symbols-rounded { 
  font-size: 16px; 
  color: var(--v7-lfs-color-bouton-1);
}

#v7-lfs-clear-all {
  margin-left: auto; 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  background: var(--v7-lfs-color-bg-1); 
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1); 
  padding: 6px 10px; 
  border-radius: 50px; 
  font-size: 12px; 
  cursor: pointer; 
  transition: all 0.2s ease;
}
#v7-lfs-clear-all .material-symbols-rounded { 
  font-size: 18px; 
  color: var(--v7-lfs-color-bouton-1); 
}
#v7-lfs-clear-all:hover { 
  background: var(--v7-lfs-color-bg-2); 
  color: #fff; 
}
#v7-lfs-clear-all:hover .material-symbols-rounded { 
  color: #1a1a1a; 
}

/* =========================================
   9. RESPONSIVE MOBILE
   ========================================= */
@media (max-width: 768px) {
  .v7-lfs-wrapper { 
    flex-direction: column; 
    gap: 20px; 
  }
  .v7-lfs-filters-wrap { 
    max-width: 100%; 
    width: 100%; 
  }
  .v7-lfs-filter-block { 
    padding: 12px 14px; 
    margin-bottom: 8px; 
  }
  .v7-lfs-results-wrap { 
    width: 100%; 
  }
}