@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,300;1,9..144,600&family=Lora:ital,wght@0,400;0,500;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,500;1,400&display=swap');

/* Neutralise les styles de boutons/étiquettes des thèmes (ex. Flatsome) */
.ef-wrapper :where(button) { text-transform: none; letter-spacing: normal; margin: 0; min-height: 0; line-height: 1.3; box-shadow: none; }
.ef-wrapper { position: relative; }
/* ============================================================
   Elegant Filter — elegant-filter.css
   Three skins: aurora · obsidian · ivory
   ============================================================ */

/* ── Custom properties (Aurora default) ─────────────────── */
.ef-wrapper {
  --ef-accent:        #7c6ef5;
  --ef-accent-2:      #f5a26e;
  --ef-bg:            #ffffff;
  --ef-surface:       #f7f6ff;
  --ef-border:        rgba(124,110,245,.18);
  --ef-text:          #1a1830;
  --ef-muted:         #7e7a9a;
  --ef-check-bg:      #ffffff;
  --ef-check-active:  var(--ef-accent);
  --ef-pill-bg:       #ededfb;
  --ef-pill-active:   var(--ef-accent);
  --ef-pill-text:     var(--ef-accent);
  --ef-pill-text-act: #ffffff;
  --ef-shadow:        0 8px 40px rgba(124,110,245,.12);
  --ef-radius:        18px;
  --ef-radius-sm:     10px;
  --ef-font:          'DM Sans', system-ui, sans-serif;
  --ef-font-display:  'Fraunces', Georgia, serif;
  --ef-transition:    .22s cubic-bezier(.4,0,.2,1);
  --ef-loader-color:  var(--ef-accent);
}

/* ── Skin: Obsidian ──────────────────────────────────────── */
.ef-skin-obsidian {
  --ef-accent:        #a78bfa;
  --ef-accent-2:      #f472b6;
  --ef-bg:            #0f0e1a;
  --ef-surface:       #1a1830;
  --ef-border:        rgba(167,139,250,.15);
  --ef-text:          #e8e4ff;
  --ef-muted:         #7e7a9a;
  --ef-check-bg:      #1a1830;
  --ef-check-active:  var(--ef-accent);
  --ef-pill-bg:       #252240;
  --ef-pill-active:   var(--ef-accent);
  --ef-pill-text:     #a78bfa;
  --ef-pill-text-act: #0f0e1a;
  --ef-shadow:        0 8px 40px rgba(0,0,0,.5);
}

/* ── Skin: Ivory ─────────────────────────────────────────── */
.ef-skin-ivory {
  --ef-accent:        #c8994f;
  --ef-accent-2:      #a8c8a0;
  --ef-bg:            #faf8f3;
  --ef-surface:       #f0ece0;
  --ef-border:        rgba(200,153,79,.2);
  --ef-text:          #2c2416;
  --ef-muted:         #8a7d62;
  --ef-check-bg:      #faf8f3;
  --ef-check-active:  var(--ef-accent);
  --ef-pill-bg:       #f0ece0;
  --ef-pill-active:   var(--ef-accent);
  --ef-pill-text:     #c8994f;
  --ef-pill-text-act: #ffffff;
  --ef-shadow:        0 8px 40px rgba(200,153,79,.1);
  --ef-font:          'Lora', Georgia, serif;
  --ef-font-display:  'Cormorant Garamond', Georgia, serif;
}

/* ── Import Google Fonts ─────────────────────────────────── */

/* ── Base reset ──────────────────────────────────────────── */
.ef-wrapper *,
.ef-wrapper *::before,
.ef-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Panel ───────────────────────────────────────────────── */
.ef-panel {
  font-family: var(--ef-font);
  background: var(--ef-bg);
  border: 1px solid var(--ef-border);
  border-radius: var(--ef-radius);
  box-shadow: var(--ef-shadow);
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ef-text);
  position: relative;
  overflow: hidden;
}

/* Decorative gradient blob */
.ef-panel::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ef-accent) 0%, transparent 70%);
  opacity: .07;
  pointer-events: none;
}

.ef-layout-horizontal .ef-panel {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 20px 24px;
}
.ef-layout-horizontal .ef-block {
  min-width: 180px;
  flex: 1 1 180px;
}

/* ── Panel header ────────────────────────────────────────── */
.ef-panel__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.ef-layout-horizontal .ef-panel__header {
  width: 100%;
  margin-bottom: 4px;
}

.ef-panel__title {
  font-family: var(--ef-font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ef-text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.ef-panel__title svg {
  width: 18px; height: 18px;
  stroke: var(--ef-accent);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
}

/* ── Reset all button ────────────────────────────────────── */
.ef-reset-all {
  background: none;
  border: 1px solid var(--ef-border);
  border-radius: 50px;
  color: var(--ef-muted);
  font-family: var(--ef-font);
  font-size: .78rem;
  padding: 4px 12px;
  cursor: pointer;
  transition: var(--ef-transition);
}
.ef-reset-all:hover {
  border-color: var(--ef-accent);
  color: var(--ef-accent);
}

/* ── Search block ────────────────────────────────────────── */
.ef-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ef-search-icon {
  position: absolute;
  left: 13px;
  width: 16px; height: 16px;
  stroke: var(--ef-muted);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  pointer-events: none;
}
.ef-search-input {
  width: 100%;
  background: var(--ef-surface);
  border: 1.5px solid var(--ef-border);
  border-radius: 50px;
  color: var(--ef-text);
  font-family: var(--ef-font);
  font-size: .9rem;
  padding: 10px 38px 10px 38px;
  outline: none;
  transition: var(--ef-transition);
}
.ef-search-input::placeholder { color: var(--ef-muted); }
.ef-search-input:focus {
  border-color: var(--ef-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ef-accent) 14%, transparent);
}
.ef-search-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--ef-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  transition: color var(--ef-transition);
}
.ef-search-clear:hover { color: var(--ef-accent); }

/* ── Collapsible block ───────────────────────────────────── */
.ef-block {
  border-top: 1px solid var(--ef-border);
  padding-top: 2px;
}
.ef-block--search { border-top: none; margin-bottom: 4px; }

.ef-block__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--ef-text);
  font-family: var(--ef-font);
  font-size: .9rem;
  font-weight: 500;
  padding: 12px 0;
  cursor: pointer;
  gap: 8px;
  transition: color var(--ef-transition);
}
.ef-block__toggle:hover { color: var(--ef-accent); }

.ef-chevron {
  width: 16px; height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  transition: transform var(--ef-transition);
  flex-shrink: 0;
}
.ef-block__toggle[aria-expanded="false"] .ef-chevron {
  transform: rotate(-90deg);
}

.ef-block__body {
  overflow: hidden;
  transition: max-height .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
}
.ef-block--collapsed .ef-block__body {
  max-height: 0 !important;
  opacity: 0;
}

/* ── Checklist ───────────────────────────────────────────── */
.ef-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ef-border) transparent;
}
.ef-checklist::-webkit-scrollbar { width: 4px; }
.ef-checklist::-webkit-scrollbar-thumb { background: var(--ef-border); border-radius: 2px; }

.ef-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--ef-radius-sm);
  cursor: pointer;
  transition: background var(--ef-transition);
}
.ef-check:hover { background: var(--ef-surface); }

.ef-check__input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.ef-check__box {
  width: 18px; height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--ef-border);
  border-radius: 5px;
  background: var(--ef-check-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ef-transition);
  position: relative;
}
.ef-check__box::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) scale(0);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1);
  position: absolute;
  top: 1px;
}
.ef-check__input:checked ~ .ef-check__box {
  background: var(--ef-check-active);
  border-color: var(--ef-check-active);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ef-accent) 35%, transparent);
}
.ef-check__input:checked ~ .ef-check__box::after {
  transform: rotate(45deg) scale(1);
}
.ef-check__input:focus-visible ~ .ef-check__box {
  outline: 2px solid var(--ef-accent);
  outline-offset: 2px;
}

.ef-check__label {
  flex: 1;
  font-size: .875rem;
  color: var(--ef-text);
  transition: color var(--ef-transition);
}
.ef-check:has(.ef-check__input:checked) .ef-check__label {
  color: var(--ef-accent);
  font-weight: 500;
}

.ef-check__count {
  font-size: .75rem;
  color: var(--ef-muted);
  background: var(--ef-surface);
  border-radius: 50px;
  padding: 1px 7px;
  min-width: 22px;
  text-align: center;
}

/* ── Price range slider ──────────────────────────────────── */
.ef-price-range { padding-bottom: 14px; }

.ef-range-track {
  position: relative;
  height: 4px;
  background: var(--ef-surface);
  border-radius: 2px;
  margin: 16px 0 10px;
}
.ef-range-fill {
  position: absolute;
  top: 0; height: 100%;
  background: linear-gradient(90deg, var(--ef-accent), var(--ef-accent-2));
  border-radius: 2px;
  pointer-events: none;
}

.ef-range {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  pointer-events: all;
  -webkit-appearance: none;
}
.ef-range--min { z-index: 2; }
.ef-range--max { z-index: 3; }

/* Thumb visual (overlaid via pseudo) */
.ef-range-track::before,
.ef-range-track::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ef-bg);
  border: 2.5px solid var(--ef-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  pointer-events: none;
  transition: box-shadow var(--ef-transition);
}
.ef-range-track:has(.ef-range--min:focus-visible)::before,
.ef-range-track:has(.ef-range--max:focus-visible)::after {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ef-accent) 22%, transparent);
}

.ef-price-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  color: var(--ef-muted);
  justify-content: space-between;
}
.ef-price-min, .ef-price-max {
  font-weight: 600;
  color: var(--ef-text);
}

/* ── Sort pills ──────────────────────────────────────────── */
.ef-sort-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 14px;
}
.ef-sort-pill {
  background: var(--ef-pill-bg);
  border: 1.5px solid transparent;
  border-radius: 50px;
  color: var(--ef-pill-text);
  font-family: var(--ef-font);
  font-size: .8rem;
  font-weight: 500;
  padding: 5px 13px;
  cursor: pointer;
  transition: var(--ef-transition);
}
.ef-sort-pill:hover {
  border-color: var(--ef-accent);
}
.ef-sort-pill.is-active {
  background: var(--ef-pill-active);
  color: var(--ef-pill-text-act);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--ef-accent) 30%, transparent);
}

/* ── Active filter chips ─────────────────────────────────── */
.ef-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  transition: min-height var(--ef-transition);
}
.ef-active-filters:not(:empty) { min-height: 32px; margin-bottom: 8px; }

.ef-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--ef-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ef-accent) 30%, transparent);
  border-radius: 50px;
  color: var(--ef-accent);
  font-family: var(--ef-font);
  font-size: .78rem;
  font-weight: 500;
  padding: 4px 8px 4px 12px;
  animation: ef-chip-in .2s cubic-bezier(.34,1.56,.64,1);
}
@keyframes ef-chip-in {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: scale(1); }
}
.ef-chip__remove {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  opacity: .7;
  transition: opacity var(--ef-transition);
}
.ef-chip__remove:hover { opacity: 1; }

/* ── Apply button (mobile) ───────────────────────────────── */
.ef-panel__footer { margin-top: 10px; }
.ef-apply-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--ef-accent), var(--ef-accent-2));
  border: none;
  border-radius: 50px;
  color: #fff;
  font-family: var(--ef-font);
  font-size: .9rem;
  font-weight: 600;
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--ef-transition);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--ef-accent) 35%, transparent);
}
.ef-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--ef-accent) 45%, transparent);
}
.ef-apply-btn:active { transform: translateY(0); }
.ef-apply-btn__count {
  background: rgba(255,255,255,.25);
  border-radius: 50px;
  font-size: .75rem;
  padding: 2px 8px;
}
/* Hide apply on desktop sidebar */
@media (min-width: 769px) {
  .ef-layout-sidebar .ef-panel__footer { display: none; }
}

/* ── Drawer / Mobile ─────────────────────────────────────── */
.ef-drawer-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--ef-bg);
  border: 1.5px solid var(--ef-border);
  border-radius: 50px;
  color: var(--ef-text);
  font-family: var(--ef-font);
  font-size: .9rem;
  font-weight: 500;
  padding: 9px 18px 9px 14px;
  cursor: pointer;
  box-shadow: var(--ef-shadow);
  position: relative;
}
.ef-drawer-toggle__icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ef-drawer-toggle__icon span {
  display: block;
  width: 16px; height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: var(--ef-transition);
}
.ef-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--ef-accent);
  color: #fff;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: .68rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  animation: ef-badge-pop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes ef-badge-pop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.ef-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  transition: opacity .3s ease;
}

.ef-layout-drawer .ef-panel {
  position: fixed;
  left: -100%;
  top: 0; bottom: 0;
  width: min(340px, 90vw);
  border-radius: 0 var(--ef-radius) var(--ef-radius) 0;
  z-index: 9999;
  overflow-y: auto;
  transition: left .35s cubic-bezier(.4,0,.2,1);
  padding-top: 60px;
}
.ef-layout-drawer.ef-drawer-open .ef-panel { left: 0; }
.ef-layout-drawer.ef-drawer-open .ef-drawer-overlay { display: block; opacity: 1; }

.ef-drawer-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--ef-surface);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  cursor: pointer;
  color: var(--ef-text);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--ef-transition);
}
.ef-drawer-close:hover { background: var(--ef-accent); color: #fff; }

@media (max-width: 768px) {
  .ef-layout-drawer .ef-drawer-toggle { display: flex; }
}

/* ── Loader ──────────────────────────────────────────────── */
.ef-loader {
  display: none;
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ef-bg) 70%, transparent);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  border-radius: var(--ef-radius);
  z-index: 10;
}
.ef-loader.is-active { display: flex; }

.ef-loader__ring {
  width: 36px; height: 36px;
  border: 3px solid var(--ef-border);
  border-top-color: var(--ef-loader-color);
  border-radius: 50%;
  animation: ef-spin .7s linear infinite;
}
@keyframes ef-spin { to { transform: rotate(360deg); } }

/* ── No results ──────────────────────────────────────────── */
.ef-no-results {
  text-align: center;
  color: var(--ef-muted);
  font-family: var(--ef-font);
  font-size: 1rem;
  padding: 40px 20px;
}

/* ── Fade-in for results ─────────────────────────────────── */
.ef-results-fade-in {
  animation: ef-fade-in .35s ease;
}
@keyframes ef-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── Layout sidebar : filtre à gauche / produits à droite ── */
.ef-shop-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
  clear: both;
}
.ef-shop-layout > .ef-wrapper {
  flex: 0 0 290px;
  width: 290px;
  position: sticky;
  top: 24px;
}
.ef-shop-results {
  flex: 1 1 0;
  min-width: 0;
}
.ef-shop-results > .products {
  width: 100% !important;
  margin-left: 0 !important;
}
@media (max-width: 900px) {
  .ef-shop-layout { flex-direction: column; }
  .ef-shop-layout > .ef-wrapper { flex: none; width: 100%; position: static; }
}


/* ── v1.1 : corrections de compatibilité thème ───────────── */
.ef-wrapper input.ef-search-input {
  height: auto; margin: 0; padding: 10px 38px;
  border: 1.5px solid var(--ef-border); border-radius: 50px;
  background: var(--ef-surface); box-shadow: none; font-size: .9rem;
}
.ef-wrapper input.ef-search-input:focus {
  border-color: var(--ef-accent); background: var(--ef-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ef-accent) 14%, transparent);
}
.ef-wrapper label.ef-check { display: flex; margin: 0; font-size: .875rem; font-weight: 400; }
.ef-wrapper .ef-check__label { font-weight: 400; }
.ef-wrapper .ef-check:has(.ef-check__input:checked) .ef-check__label { font-weight: 600; }
.ef-wrapper .ef-checklist__item { margin: 0; list-style: none; }

/* Curseur de prix : poignées natives, chacune déplaçable */
.ef-wrapper .ef-range-track::before,
.ef-wrapper .ef-range-track::after { display: none; }
.ef-wrapper .ef-range {
  -webkit-appearance: none; appearance: none;
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 100%; height: 0; margin: 0; padding: 0;
  background: transparent; opacity: 1; pointer-events: none; border: 0;
}
.ef-wrapper .ef-range::-webkit-slider-runnable-track { background: transparent; height: 0; }
.ef-wrapper .ef-range::-moz-range-track { background: transparent; height: 0; }
.ef-wrapper .ef-range::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; cursor: grab;
  width: 18px; height: 18px; border-radius: 50%; margin-top: -9px;
  background: var(--ef-bg); border: 2.5px solid var(--ef-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.ef-wrapper .ef-range::-moz-range-thumb {
  pointer-events: auto; cursor: grab;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ef-bg); border: 2.5px solid var(--ef-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.ef-wrapper .ef-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ef-accent) 25%, transparent);
}

/* Placement */
.ef-results-slot { min-width: 0; transition: opacity .2s ease; }
.ef-wrapper.ef-in-sidebar { width: 100%; margin-bottom: 24px; }
.ef-layout-sidebar .ef-panel__footer { display: none; }
