/* ---------- Suggestions ---------- */
.ee-recherche, .ee-catalogue { --ee-accent: #7d6597; --ee-accent-dark: #654f7d; }
.ee-recherche { position: relative; display: flex; width: 100%; max-width: 640px; margin: 0 auto; }
.ee-recherche__input { flex: 1; min-width: 0; padding: 10px 44px 10px 14px; border: 1px solid #c8c8c8; border-radius: 6px; font-size: 16px; background: #fff; color: #222; }
.ee-recherche__input:focus { outline: 2px solid var(--ee-accent); outline-offset: 0; border-color: var(--ee-accent); }
.ee-recherche__submit { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #555; padding: 8px; cursor: pointer; line-height: 0; }
.ee-recherche__results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 9999; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid #ddd; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.15); text-align: left; }
.ee-recherche__results[hidden] { display: none; }
.ee-recherche__item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: #222; text-decoration: none; border-bottom: 1px solid #f0f0f0; }
a.ee-recherche__item:hover, .ee-recherche__item.is-active { background: #f0eef4; }
.ee-recherche__thumb { width: 44px; height: 56px; object-fit: contain; flex: none; }
.ee-recherche__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ee-recherche__title { font-weight: 600; line-height: 1.25; }
.ee-recherche__meta { font-size: 12px; color: #666; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ee-recherche__heading { padding: 8px 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ee-accent); background: #f6f4f9; }
.ee-recherche__item--static { cursor: default; }
.ee-recherche__empty { padding: 14px 12px; color: #666; }
.ee-recherche__all { display: block; padding: 10px 12px; text-align: center; font-weight: 600; color: var(--ee-accent); text-decoration: none; }
.ee-recherche__all:hover, .ee-recherche__all.is-active { background: #f0eef4; }

/* ---------- Ajout au panier ---------- */
.ee-cart { display: inline-flex; align-items: stretch; gap: 4px; flex: none; }
.ee-cart__step { width: 28px; border: 1px solid #c8c8c8; background: #fff; border-radius: 4px; cursor: pointer; font-size: 16px; line-height: 1; color: #333; padding: 0; }
.ee-cart__step:hover { background: #f0eef4; }
.ee-cart__qtybox { display: inline-flex; align-items: stretch; gap: 4px; }
.ee-cart__qty { width: 44px; text-align: center; border: 1px solid #c8c8c8; border-radius: 4px; padding: 4px 2px; font-size: 14px; -moz-appearance: textfield; }
.ee-cart__qty::-webkit-outer-spin-button, .ee-cart__qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ee-cart__add { border: 0; border-radius: 4px; background: var(--ee-accent); color: #fff; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ee-cart__add:hover { background: var(--ee-accent-dark); }
.ee-cart__add:disabled { opacity: .75; cursor: default; }
.ee-cart__add.is-added { background: #46b450; }
/* ---------- Éléments communs ---------- */
.ee-price { flex: none; font-weight: 600; white-space: nowrap; }
.ee-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 1.6; color: #fff; background: #999; }
.ee-badge--available { background: #46b450; }
.ee-badge--orderable { background: #d98e04; }
.ee-badge--preorder { background: #c0392b; }
.ee-badge--unavailable { background: #888; }
.ee-badge--used { background: #7a5c9e; }
.ee-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Page catalogue ---------- */
.ee-catalogue { max-width: 1000px; margin: 0 auto; }
.ee-catalogue__form { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: #f6f4f9; border: 1px solid #eee3d9; border-radius: 8px; }
.ee-recherche__note { padding: 8px 12px; font-size: 12px; font-style: italic; color: var(--ee-accent); background: #fffaf0; border-bottom: 1px solid #f0f0f0; }
.ee-catalogue__fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ee-catalogue__fields label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.ee-catalogue__fields input { padding: 9px 12px; border: 1px solid #c8c8c8; border-radius: 6px; font-size: 16px; font-weight: 400; }
.ee-catalogue__filters { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.ee-catalogue__filters label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.ee-catalogue__filters label.is-empty { opacity: .45; }
.ee-count { color: #888; font-size: 12px; }
.ee-catalogue__actions { display: flex; gap: 10px; }
.ee-catalogue__btn { padding: 9px 18px; border: 1px solid var(--ee-accent); border-radius: 6px; background: #fff; color: var(--ee-accent); font-weight: 600; cursor: pointer; }
.ee-catalogue__btn--primary { background: var(--ee-accent); color: #fff; }
.ee-catalogue__btn:disabled { opacity: .4; cursor: default; }
.ee-catalogue__layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; margin-top: 16px; }
.ee-facet__radios label { display: flex; align-items: center; gap: 6px; padding: 4px 6px; font-size: 13px; cursor: pointer; }
.ee-facet__radios label span:nth-of-type(1) { flex: 1; }
.ee-facet__radios label.is-empty { opacity: .45; }
.ee-facet-reset { width: 100%; margin-bottom: 8px; font-size: 13px; padding: 7px 10px; }
.ee-catalogue__chips { display: flex; flex-direction: column; gap: 6px; }
.ee-catalogue__chips:not(:empty) { margin-bottom: 8px; }
.ee-chip { text-align: left; padding: 5px 10px; border: 0; border-radius: 14px; background: var(--ee-accent); color: #fff; font-size: 12px; cursor: pointer; }
.ee-chip:hover { background: #6f4a2f; }
.ee-facet { border-bottom: 1px solid #eee; padding: 8px 0; }
.ee-facet summary { cursor: pointer; font-weight: 700; color: var(--ee-accent); padding: 4px 0; }
.ee-facet__list { list-style: none; margin: 4px 0 0; padding: 0; max-height: 280px; overflow-y: auto; }
.ee-facet__item { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 5px 6px; border: 0; background: transparent; text-align: left; font-size: 13px; cursor: pointer; border-radius: 4px; color: #222; }
.ee-facet__item:hover { background: #f0eef4; }
.ee-facet__item.is-active { background: var(--ee-accent); color: #fff; }
.ee-facet__count { flex: none; color: #888; font-size: 12px; }
.ee-facet__item.is-active .ee-facet__count { color: #fff; }
.ee-catalogue__count { margin: 0 0 8px; color: #666; }
.ee-catalogue__bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ee-sort { font-size: 14px; color: #444; }
.ee-sort select { margin-left: 6px; }
.ee-row { display: flex; gap: 16px; align-items: center; padding: 12px 4px; border-bottom: 1px solid #eee; }
.ee-row__cover { flex: none; width: 66px; }
.ee-row__img { width: 66px; height: 90px; object-fit: contain; display: block; }
.ee-row__body { flex: 1; min-width: 0; }
.ee-row__title { margin: 0 0 2px; font-size: 16px; line-height: 1.3; }
.ee-row__title a { color: inherit; text-decoration: none; }
.ee-row__title a:hover { text-decoration: underline; }
.ee-row__by, .ee-row__ref { margin: 0; font-size: 13px; color: #666; }
.ee-row__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ee-catalogue__pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 20px 0; }

@media (max-width: 600px) {
  .ee-catalogue__fields { grid-template-columns: 1fr; }
  .ee-catalogue__layout { grid-template-columns: 1fr; }
  .ee-row { flex-wrap: wrap; }
  .ee-row__side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}

/* ---------- Suggestions : liste à gauche, aperçu du produit à droite ---------- */
.ee-recherche__results--wide { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); width: max(100%, min(920px, calc(100vw - 24px))); overflow: hidden; max-height: none; }
.ee-recherche__list { max-height: 65vh; overflow-y: auto; border-right: 1px solid #e6e6ee; }
.ee-recherche__preview { max-height: 65vh; overflow-y: auto; padding: 16px 24px; background: #fff; }
.ee-recherche__title strong { font-weight: 700; }
.ee-recherche__title { font-weight: 400; font-size: 16px; }
.ee-recherche__thumb { width: 48px; height: 62px; }
.ee-preview { display: flex; flex-direction: column; gap: 8px; }
.ee-preview__cover { display: block; text-align: center; }
.ee-preview__img { width: 100%; max-height: 180px; object-fit: contain; display: block; }
.ee-preview__h { margin: 4px 0 0; font-size: 18px; line-height: 1.2; font-weight: 400; }
.ee-preview__h a, .ee-preview__title { color: inherit; text-decoration: none; }
.ee-preview__ref { margin: 0; color: #888; font-size: 14px; }
.ee-preview__by { margin: 0; color: #555; font-size: 13px; }
.ee-preview__price { font-size: 22px; margin: 6px 0; }
.ee-preview__line { border-top: 1px solid #e6e6ee; border-bottom: 1px solid #e6e6ee; padding: 12px 0; }
.ee-preview__status { text-align: right; font-weight: 500; }
.ee-preview__status--available { color: #1a8f4c; }
.ee-preview__status--orderable { color: #c47a00; }
.ee-preview__status--preorder { color: #c0392b; }
.ee-preview .ee-cart { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 4px; }
.ee-preview .ee-cart__qtybox { gap: 0; border: 1px solid #c8c8c8; }
.ee-preview .ee-cart__step, .ee-preview .ee-cart__qty { border: 0; border-radius: 0; height: 38px; }
.ee-preview .ee-cart__step { width: 38px; }
.ee-preview .ee-cart__qty { border-left: 1px solid #c8c8c8; border-right: 1px solid #c8c8c8; }
.ee-preview .ee-cart__add { border-radius: 24px; padding: 10px 22px; font-size: 15px; font-weight: 500; }
.ee-preview__go { align-self: flex-start; color: var(--ee-accent); font-weight: 600; text-decoration: none; }
@media (max-width: 700px) {
  .ee-recherche__results--wide { display: block; width: 100%; }
  .ee-recherche__list { border-right: 0; }
  .ee-recherche__preview { display: none; }
}

/* ---------- Style « FiboSearch » : barre en pastille, liste compacte, aperçu épuré ---------- */
.ee-recherche__input { padding: 9px 14px 9px 42px; border: 2px solid var(--ee-accent); border-radius: 28px; font-size: 14px; box-shadow: none; }
.ee-recherche__input:focus { outline: 0; box-shadow: 0 0 0 3px rgba(125,101,151,.18); }
.ee-recherche__submit { right: auto; left: 8px; color: var(--ee-accent); }
.ee-recherche__results { border: 0; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.ee-recherche__results--wide { width: max(100%, min(820px, calc(100vw - 24px))); grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); }
.ee-recherche__list { max-height: 60vh; border-right: 0; background: #fff; padding: 4px 0; }
.ee-recherche__heading { padding: 8px 12px 4px; background: transparent; color: #9a9a9a; font-size: 11px; font-weight: 600; }
.ee-recherche__item { gap: 10px; padding: 5px 12px; border-bottom: 0; }
a.ee-recherche__item:hover, .ee-recherche__item.is-active { background: #ececec; }
.ee-recherche__thumb { width: 28px; height: 38px; }
.ee-recherche__title { font-size: 13px; line-height: 1.3; color: #444; }
.ee-recherche__list .ee-recherche__meta { display: none; }
.ee-recherche__all { padding: 12px; font-size: 11px; font-weight: 500; text-transform: uppercase; color: #777; letter-spacing: .02em; }
.ee-recherche__preview { max-height: 60vh; padding: 0 0 12px; border-left: 1px solid #eee; }
.ee-preview { gap: 6px; }
.ee-preview > :not(.ee-preview__cover) { margin-left: 18px; margin-right: 18px; }
.ee-preview__img { max-height: 210px; }
.ee-preview .ee-preview__h { margin-top: 10px; font-size: 17px; line-height: 1.3; font-weight: 400; text-transform: none; color: #333; font-family: inherit; }
.ee-preview .ee-preview__h a, .ee-preview .ee-preview__title { color: #333; font-weight: 400; }
.ee-preview__ref { font-size: 12px; color: #999; }
.ee-preview__by { font-size: 12px; }
.ee-preview .ee-preview__price { font-size: 17px; font-weight: 700; color: #222; margin: 6px 18px 2px; }
.ee-preview__line { border: 0; border-top: 1px solid #eee; padding: 10px 0 4px; font-size: 13px; color: #555; }
.ee-preview__status { text-align: left; font-size: 13px; font-weight: 400; color: #555; }
.ee-preview .ee-cart { margin-top: 8px; }
.ee-preview .ee-cart__qtybox { border-color: #ddd; }
.ee-preview .ee-cart__step, .ee-preview .ee-cart__qty { height: 34px; border-color: #ddd; }
.ee-preview .ee-cart__step { width: 32px; }
.ee-preview .ee-cart__add { background: var(--ee-accent); padding: 8px 18px; font-size: 13px; white-space: normal; line-height: 1.2; text-align: center; }
@media (max-width: 700px) { .ee-recherche__results--wide { width: 100%; } }

form.ee-recherche input.ee-recherche__input[type="search"] { padding: 9px 14px 9px 42px; border: 2px solid var(--ee-accent); border-radius: 28px; font-size: 14px; height: auto; box-shadow: none; background: #fff; }
form.ee-recherche input.ee-recherche__input[type="search"]:focus { box-shadow: 0 0 0 3px rgba(125,101,151,.18); outline: 0; }
form.ee-recherche button.ee-recherche__submit { right: auto; left: 8px; background: transparent; border: 0; color: var(--ee-accent); padding: 8px; box-shadow: none; }

/* ---------- Compactage (1.13.2) ---------- */
.ee-recherche__item { padding: 3px 12px; gap: 8px; }
.ee-recherche__thumb { width: 24px; height: 33px; }
.ee-recherche__body { gap: 0; }
.ee-recherche__title { line-height: 1.25; }
.ee-recherche__heading { padding: 6px 12px 2px; }
.ee-recherche__all { padding: 8px 12px; }
.ee-preview { gap: 4px; }
.ee-preview__cover { height: 150px; margin-top: 12px; }
.ee-preview__img { width: 100%; height: 150px; max-height: none; object-fit: contain; }
.ee-preview .ee-preview__h { margin-top: 6px; font-size: 15px; line-height: 1.25; }
.ee-preview__by { font-size: 12px; color: #666; line-height: 1.3; }
.ee-preview__ref { font-size: 11px; }
.ee-preview__badges { gap: 4px; }
.ee-preview .ee-badge { font-size: 10px; padding: 0 7px; }
.ee-preview .ee-preview__price { margin: 4px 18px 0; font-size: 16px; }
.ee-preview .ee-cart { margin-top: 4px; }

/* ---------- Aperçu sans défilement (1.13.3) ---------- */
.ee-recherche__preview { max-height: none; overflow: visible; padding: 0 0 8px; }
.ee-preview { gap: 2px; }
.ee-preview__cover { height: 120px; margin-top: 8px; }
.ee-preview__img { height: 120px; }
.ee-preview .ee-preview__h { margin-top: 4px; font-size: 14px; }
.ee-preview__by, .ee-preview__ref { margin-top: 0; margin-bottom: 0; }
.ee-preview__badges { margin-top: 2px; }
.ee-preview .ee-preview__price { margin: 2px 18px 0; font-size: 15px; }
.ee-preview .ee-cart { margin-top: 4px; }
.ee-preview .ee-cart__step, .ee-preview .ee-cart__qty { height: 30px; }
.ee-preview .ee-cart__add { padding: 6px 16px; }
.ee-preview .ee-cart__qty { width: 40px; }

/* ---------- Quantité : largeur fixe partout (1.13.4) ---------- */
.ee-cart .ee-cart__qtybox { flex: none; }
.ee-cart input.ee-cart__qty { flex: none; width: 56px; min-width: 0; max-width: 56px; box-sizing: border-box; }
.ee-preview .ee-cart input.ee-cart__qty { width: 40px; max-width: 40px; }

/* ---------- Lien « Voir le panier » (1.14.2) ---------- */
.ee-cart { flex-wrap: wrap; }
.ee-cart .ee-cart__view { flex-basis: 100%; text-align: right; font-size: 13px; font-weight: 600; color: var(--ee-accent); text-decoration: underline; }

/* ---------- 1.16.1 : survol pour tous les résultats, « Voir tous » toujours visible ---------- */
.ee-recherche__item:hover { background: #ececec; }
.ee-recherche__all { position: sticky; bottom: 0; padding: 5px 12px; font-size: 11px; background: #fff; border-top: 1px solid #eee; }
.ee-recherche__all:hover, .ee-recherche__all.is-active { background: #ececec; }

/* ---------- 1.17.0 : prix et pastille « Occasion » dans la liste ---------- */
.ee-recherche__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; margin-left: 6px; text-align: right; }
.ee-recherche__side .ee-price { font-size: 12px; font-weight: 600; color: #333; }
.ee-recherche__side .ee-badge { font-size: 9px; padding: 0 6px; line-height: 1.5; }

/* ---------- 1.17.1 : couverture de l'aperçu, taille fixe quoi qu'en dise le thème ---------- */
.ee-recherche .ee-preview__cover { display: block; height: 120px; overflow: hidden; }
.ee-recherche .ee-preview__cover img.ee-preview__img { width: 100% !important; height: 120px !important; max-width: 100% !important; max-height: 120px !important; object-fit: contain !important; }

/* ---------- 1.17.4 : champ, boutons et tri sur une seule ligne ---------- */
.ee-catalogue__form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.ee-catalogue__fields { flex: 1 1 320px; display: block; }
.ee-catalogue__fields label { width: 100%; }
.ee-catalogue__form .ee-sort { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; color: #444; }
.ee-catalogue__form .ee-sort select { margin-left: 0; min-width: 200px; }
.ee-catalogue__bar { justify-content: flex-start; }
.ee-badges { justify-content: flex-end; }
