/* =============================================
   PAGE FAVORIS
   ============================================= */
.fav-page { background: #f5f5f5; min-height: 100vh; }

.fav-header {
  background: #fff;
  padding: 16px 14px 0;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.fav-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
}
.fav-back {
  width: 36px; height: 36px;
  background: #f5f5f5;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; flex-shrink: 0;
}
.fav-back svg {
  width: 18px; height: 18px;
  stroke: #1a1a1a; fill: none; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.fav-header-title {
  font-size: 18px; font-weight: 700; color: #1a1a1a; flex: 1;
}
.fav-count-badge {
  background: #F05A1A; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  white-space: nowrap;
}
.fav-tabs { display: flex; }
.fav-tab {
  flex: 1; padding: 10px 0;
  font-size: 12px; font-weight: 500; color: #999;
  border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.fav-tab.active {
  color: #F05A1A; font-weight: 700;
  border-bottom-color: #F05A1A;
}

.fav-toolbar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 8px;
}
.fav-toolbar-left { font-size: 13px; color: #666; }
.fav-toolbar-left span { font-weight: 700; color: #1a1a1a; }
.fav-sort-btn {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: #666;
  background: #f5f5f5; border: none;
  border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
.fav-sort-btn svg {
  width: 14px; height: 14px;
  stroke: #666; fill: none; stroke-width: 2;
  stroke-linecap: round;
}

.fav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 10px 20px;
}

.fav-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
}
.fav-card-link {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit; flex: 1;
}
.fav-img {
  position: relative;
  width: 100%; aspect-ratio: 1;
  background: #f8f8f8; overflow: hidden;
}
.fav-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.fav-badge {
  position: absolute; top: 8px; left: 8px;
  background: #F05A1A; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px; z-index: 1;
}
.fav-remove {
  position: absolute; top: 8px; right: 8px;
  background: #fff; border: 1px solid #eee;
  border-radius: 50%; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; z-index: 1;
  transition: background 0.15s;
}
.fav-remove svg {
  width: 14px; height: 14px;
  fill: none; stroke: #ccc; stroke-width: 2;
  transition: fill 0.15s, stroke 0.15s;
}
.fav-remove.active svg {
  fill: #F05A1A; stroke: #F05A1A;
}

.fav-info {
  padding: 10px;
  display: flex; flex-direction: column;
  gap: 5px; flex: 1;
}
.fav-name {
  font-size: 12px; font-weight: 500;
  color: #1a1a1a; line-height: 1.4; margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.fav-stars { display: flex; align-items: center; gap: 2px; }
.fav-star { width: 10px; height: 10px; fill: #e8e8e8; stroke: none; }
.fav-star.filled { fill: #F59E0B; }
.fav-rating { font-size: 10px; color: #888; margin-left: 2px; }

.fav-prices { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.fav-price-new { font-size: 13px; font-weight: 800; color: #F05A1A; }
.fav-price-old { font-size: 10px; color: #bbb; text-decoration: line-through; }

.fav-savings {
  display: inline-block;
  background: #ECFDF5; color: #059669;
  font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 6px;
}

.fav-add-btn {
  display: flex; align-items: center;
  justify-content: center; gap: 5px;
  margin: 0 8px 8px;
  padding: 9px 8px;
  background: #F05A1A; color: #fff;
  border-radius: 8px; font-size: 11px;
  font-weight: 600; text-decoration: none;
  transition: background 0.15s;
  border: none; cursor: pointer;
}
.fav-add-btn:hover { background: #d94f00; color: #fff; }
.fav-add-btn svg { flex-shrink: 0; }

/* Etat vide */
.fav-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 20px; gap: 14px; text-align: center;
}
.fav-empty-icon {
  width: 80px; height: 80px;
  background: #FFF0E8; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.fav-empty-icon svg {
  width: 36px; height: 36px;
  fill: #F05A1A; stroke: none;
}
.fav-empty h3 { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.fav-empty p { font-size: 13px; color: #999; line-height: 1.5; }
.fav-empty-btn {
  background: #F05A1A; color: #fff; border: none;
  border-radius: 12px; padding: 12px 28px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-block;
}

/* Barre partage */
.fav-share-bar {
  background: #fff;
  border-top: 1px solid #f0f0f0;
  padding: 14px;
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.fav-share-text { font-size: 13px; color: #666; }
.fav-share-btn {
  display: flex; align-items: center; gap: 5px;
  background: #f5f5f5; border: none;
  border-radius: 8px; padding: 8px 12px;
  font-size: 12px; font-weight: 500; color: #1a1a1a;
  cursor: pointer;
}
.fav-share-btn svg {
  width: 14px; height: 14px;
  stroke: #F05A1A; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Sort panel */
.fav-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 400; opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.fav-overlay.open { opacity: 1; pointer-events: all; }

.fav-sort-panel {
  position: fixed; bottom: -100%;
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 401; padding: 20px;
  transition: bottom 0.3s ease;
}
.fav-sort-panel.open { bottom: 0; }

.fav-panel-header {
  display: flex; align-items: center;
  justify-content: space-between;
  font-size: 16px; font-weight: 700; color: #1a1a1a;
  margin-bottom: 16px;
}
.fav-panel-header button {
  width: 28px; height: 28px;
  border-radius: 50%; background: #f5f5f5;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #666; cursor: pointer; border: none;
}

.fav-sort-options { display: flex; flex-direction: column; gap: 4px; }
.fav-sort-opt {
  background: none; border: none; text-align: left;
  padding: 13px 14px; font-size: 14px; font-weight: 500;
  color: #1a1a1a; cursor: pointer; border-radius: 10px;
  transition: background 0.15s;
}
.fav-sort-opt:hover { background: #f5f5f5; }
.fav-sort-opt.active { background: #FFF0E8; color: #F05A1A; font-weight: 700; }

/* Toast */
.fav-toast {
  position: fixed; bottom: 90px;
  left: 50%; transform: translateX(-50%);
  background: #1a1a1a; color: #fff;
  font-size: 13px; font-weight: 500;
  padding: 10px 20px; border-radius: 20px;
  z-index: 500; opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
  pointer-events: none;
}
.fav-toast.show { opacity: 1; }

/* Desktop */
@media (min-width: 768px) {
  .fav-grid { grid-template-columns: repeat(3, 1fr); padding: 0 14px 20px; }
}