/* =========================================================================
   BOIS PREMIUM — favoris.css
   Style : premium, naturel, chaleureux, élégant, moderne, épuré
   ========================================================================= */

/* VARIABLES ------------------------------------------------------------- */
:root {
  --bp-cream:      #faf6f0;
  --bp-beige:      #ece0cd;
  --bp-wood:       #8a5a34;
  --bp-wood-dark:  #5c3a20;
  --bp-brown:      #3d2b1f;
  --bp-black-soft: #262220;
  --bp-white:      #ffffff;
  --bp-danger:     #b3462c;
  --bp-radius-lg:  22px;
  --bp-radius-md:  14px;
  --bp-radius-sm:  8px;
  --bp-shadow:     0 10px 30px rgba(61, 43, 31, 0.08);
  --bp-shadow-hover: 0 16px 40px rgba(61, 43, 31, 0.14);
  --bp-transition: 0.25s ease;
}

/* BASE -------------------------------------------------------------------*/
.bp-favorites-page {
  background: var(--bp-cream);
  color: var(--bp-black-soft);
  font-family: inherit;
  overflow-x: hidden;
}

.bp-favorites-page * { box-sizing: border-box; }

.bp-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.bp-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* HEADER COMPATIBILITY --------------------------------------------------- */
/* La page réutilise le header global du site (assets/css/header.css).
   Ces règles servent uniquement de repli visuel si le header n'est pas
   encore branché, afin que la page reste présentable. */
.bp-fallback-header {
  background: var(--bp-white);
  border-bottom: 1px solid var(--bp-beige);
}

/* BREADCRUMB --------------------------------------------------------------*/
.bp-breadcrumb {
  padding: 18px 0;
  font-size: 0.92rem;
}
.bp-breadcrumb ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0; padding: 0;
  color: #8a7c6f;
}
.bp-breadcrumb a {
  color: var(--bp-wood-dark);
  text-decoration: none;
  font-weight: 500;
}
.bp-breadcrumb a:hover { text-decoration: underline; }
.bp-breadcrumb li[aria-current] { color: var(--bp-black-soft); font-weight: 600; }

/* PAGE HEADER --------------------------------------------------------------*/
.bp-page-header {
  padding: 10px 0 28px;
  text-align: left;
}
.bp-page-header h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--bp-brown);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.bp-page-header p {
  color: #6f6459;
  font-size: 1.02rem;
  max-width: 640px;
  margin: 0 0 6px;
}
.bp-fav-count-label {
  display: inline-block;
  font-weight: 600;
  color: var(--bp-wood-dark);
  background: var(--bp-beige);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  margin-top: 6px;
}

/* TOOLBAR --------------------------------------------------------------- */
.bp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: var(--bp-white);
  border: 1px solid var(--bp-beige);
  border-radius: var(--bp-radius-md);
  padding: 16px 18px;
  margin-bottom: 28px;
  box-shadow: var(--bp-shadow);
}

/* SEARCH ------------------------------------------------------------------*/
.bp-search {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}
.bp-search input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: 1px solid var(--bp-beige);
  border-radius: var(--bp-radius-sm);
  background: var(--bp-cream);
  font-size: 0.95rem;
  color: var(--bp-black-soft);
  transition: border-color var(--bp-transition), box-shadow var(--bp-transition);
}
.bp-search input:focus {
  outline: none;
  border-color: var(--bp-wood);
  box-shadow: 0 0 0 3px rgba(138, 90, 52, 0.15);
}
.bp-search i {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: #a4907a;
}

/* SORT ----------------------------------------------------------------- */
.bp-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.bp-sort label { font-size: 0.9rem; color: #6f6459; white-space: nowrap; }
.bp-sort select {
  padding: 10px 34px 10px 14px;
  border-radius: var(--bp-radius-sm);
  border: 1px solid var(--bp-beige);
  background: var(--bp-cream);
  font-size: 0.92rem;
  color: var(--bp-black-soft);
  cursor: pointer;
}
.bp-sort select:focus { outline: none; border-color: var(--bp-wood); }

/* BUTTONS ----------------------------------------------------------------*/
.bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--bp-transition), box-shadow var(--bp-transition), background var(--bp-transition), color var(--bp-transition);
  white-space: nowrap;
}
.bp-btn:focus-visible { outline: 3px solid rgba(138, 90, 52, 0.4); outline-offset: 2px; }
.bp-btn-primary { background: var(--bp-wood); color: var(--bp-white); }
.bp-btn-primary:hover { background: var(--bp-wood-dark); transform: translateY(-1px); }
.bp-btn-outline { background: transparent; color: var(--bp-wood-dark); border: 1.5px solid var(--bp-beige); }
.bp-btn-outline:hover { border-color: var(--bp-wood); background: var(--bp-beige); }
.bp-btn-danger { background: var(--bp-white); color: var(--bp-danger); border: 1.5px solid rgba(179, 70, 44, 0.35); }
.bp-btn-danger:hover { background: rgba(179, 70, 44, 0.08); }
.bp-btn-text { background: none; border: none; color: var(--bp-wood-dark); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 4px; }

.bp-clear-btn { margin-left: auto; }

/* FAVORITES GRID -----------------------------------------------------------*/
.bp-favorites-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  padding-bottom: 50px;
}

/* PRODUCT CARD ------------------------------------------------------------*/
.bp-favorite-card {
  position: relative;
  background: var(--bp-white);
  border: 1px solid var(--bp-beige);
  border-radius: var(--bp-radius-lg);
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  box-shadow: var(--bp-shadow);
  animation: bpFadeUp 0.45s ease both;
  transition: transform var(--bp-transition), box-shadow var(--bp-transition);
}
.bp-favorite-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bp-shadow-hover);
}

@keyframes bpFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bp-card-media {
  position: relative;
  border-radius: var(--bp-radius-md);
  overflow: hidden;
  background: var(--bp-cream);
  margin-bottom: 14px;
}
.bp-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.bp-favorite-card:hover .bp-card-img { transform: scale(1.05); }

.bp-badge-promo {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--bp-danger);
  color: var(--bp-white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  z-index: 2;
}

/* FAVORITE BUTTON -----------------------------------------------------------*/
.bp-favorite-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--bp-white);
  color: var(--bp-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(61,43,31,0.12);
  z-index: 2;
  transition: transform var(--bp-transition), background var(--bp-transition);
}
.bp-favorite-btn:hover { background: var(--bp-beige); }
.bp-favorite-btn:focus-visible { outline: 3px solid rgba(179,70,44,0.4); outline-offset: 2px; }
.bp-favorite-btn.bp-pulse,
.btn-love.bp-pulse { animation: bpHeartPulse 0.35s ease; }

@keyframes bpHeartPulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.bp-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bp-brown);
  margin: 4px 0 6px;
  min-height: 2.4em;
}
.bp-card-link { color: inherit; text-decoration: none; }
.bp-card-link:hover { color: var(--bp-wood); }

.bp-card-price {
  display: block;
  font-weight: 700;
  color: var(--bp-wood-dark);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.bp-card-status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  align-self: center;
}
.bp-card-status.in-stock { background: #e6f2e6; color: #2f6b3a; }
.bp-card-status.out-stock { background: #f5e6e6; color: var(--bp-danger); }

/* QUANTITY -----------------------------------------------------------------*/
.bp-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}
.bp-qty button {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--bp-beige);
  background: var(--bp-cream);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--bp-wood-dark);
  transition: background var(--bp-transition);
}
.bp-qty button:hover { background: var(--bp-beige); }
.bp-qty-value {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
}

/* Actions de carte */
.bp-card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bp-add-cart-btn { width: 100%; }
.bp-card-link.bp-view-link {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bp-wood-dark);
  text-decoration: underline;
  padding: 4px;
}
.bp-remove-btn {
  width: 100%;
  background: transparent;
  color: var(--bp-danger);
}

/* EMPTY STATE --------------------------------------------------------------*/
.bp-empty-state, .bp-no-result {
  text-align: center;
  padding: 70px 20px;
  background: var(--bp-white);
  border: 1px dashed var(--bp-beige);
  border-radius: var(--bp-radius-lg);
  margin-bottom: 50px;
}
.bp-empty-icon {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--bp-beige);
  color: var(--bp-wood-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.1rem;
  margin: 0 auto 20px;
}
.bp-empty-state h2, .bp-no-result h2 {
  font-size: 1.3rem;
  color: var(--bp-brown);
  margin-bottom: 8px;
}
.bp-empty-state p, .bp-no-result p {
  color: #6f6459;
  margin-bottom: 22px;
}

/* MODAL ----------------------------------------------------------------- */
.bp-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.bp-modal[hidden] { display: none; }
.bp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 34, 32, 0.55);
  animation: bpFadeIn 0.2s ease;
}
.bp-modal-dialog {
  position: relative;
  background: var(--bp-white);
  border-radius: var(--bp-radius-lg);
  max-width: 420px;
  width: 100%;
  padding: 30px 26px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: bpModalPop 0.25s ease;
}
@keyframes bpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bpModalPop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.bp-modal-dialog h2 {
  font-size: 1.2rem;
  color: var(--bp-brown);
  margin-bottom: 10px;
}
.bp-modal-dialog p { color: #6f6459; margin-bottom: 24px; }
.bp-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
body.bp-modal-open { overflow: hidden; }

/* NOTIFICATIONS ---------------------------------------------------------- */
.bp-notification {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  background: var(--bp-brown);
  color: var(--bp-white);
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
  max-width: 90vw;
  text-align: center;
}
.bp-notification.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* CONTINUE SHOPPING -------------------------------------------------------*/
.bp-continue {
  text-align: center;
  padding: 10px 0 40px;
}

/* RESPONSIVE --------------------------------------------------------------*/
@media (max-width: 1200px) {
  .bp-favorites-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .bp-favorites-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .bp-favorites-grid { grid-template-columns: 1fr; }
}

/* MOBILE -------------------------------------------------------------------*/
@media (max-width: 768px) {
  .bp-toolbar { flex-direction: column; align-items: stretch; }
  .bp-search { flex: 1 1 auto; width: 100%; }
  .bp-sort { width: 100%; justify-content: space-between; }
  .bp-sort select { flex: 1; }
  .bp-clear-btn { margin-left: 0; width: 100%; }
  .bp-favorite-btn { width: 42px; height: 42px; font-size: 1.15rem; }
  .bp-btn { padding: 12px 18px; }
  .bp-page-header h1 { font-size: 1.5rem; }
}
body {
    user-select: none;
    -webkit-user-select: none;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
}