/* ─────────────────────────────────────────────────────────────
   Agrileader Search — Widget plein écran style Doofinder
──────────────────────────────────────────────────────────────── */
:root {
  --als-green:      #0C8E44;
  --als-green-dark: #085f2e;
  --als-black:      #191919;
  --als-dark:       #1c1c1e;
  --als-gray:       #f5f6f8;
  --als-gray-2:     #ebedf0;
  --als-border:     #e4e4e4;
  --als-shadow:     0 4px 16px rgba(0,0,0,.08);
  --als-radius:     12px;
  --als-radius-sm:  8px;
  --als-font:       'Poppins', 'Carlito', sans-serif;
  --als-z:          99999;
  --als-anim:       .18s cubic-bezier(.4,0,.2,1);
  --als-header-h:   110px;
}

#als-search-wrapper { display: none !important; }
#als-search-wrapper.als-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: var(--als-z);
  background: #fff;
  font-family: var(--als-font);
  animation: alsFadeIn .15s ease-out;
}
@keyframes alsFadeIn { from { opacity: 0 } to { opacity: 1 } }

/* ── HEADER NOIR style Doofinder ── */
.als-fs-header {
  background: var(--als-dark);
  color: #fff;
  padding: 14px 0 12px;
  border-bottom: 4px solid var(--als-green);
  flex-shrink: 0;
}
.als-fs-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.als-fs-logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}
.als-fs-logo-icon { font-size: 22px; }
.als-fs-logo img { height: 32px; width: auto; display: block; }

.als-fs-search-wrap {
  flex: 1;
  position: relative;
  background: #fff;
  border-radius: var(--als-radius-sm);
  display: flex;
  align-items: center;
  padding: 6px 14px;
}
.als-fs-search-icon { color: #999; font-size: 16px; margin-right: 10px; }
.als-fs-input {
  flex: 1;
  border: none; outline: none;
  font-size: 16px;
  font-family: var(--als-font);
  color: var(--als-black);
  background: transparent;
  padding: 8px 0;
  min-width: 0;
}
.als-fs-input::placeholder { color: #aaa; }
.als-fs-clear {
  background: var(--als-gray);
  border: none; border-radius: 4px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; color: #666;
  flex-shrink: 0;
}
.als-close {
  background: none; border: none; color: #fff;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer;
  border-radius: 50%;
  transition: background var(--als-anim);
  flex-shrink: 0;
}
.als-close:hover { background: rgba(255,255,255,.1); }

/* ── Barre dernières recherches ── */
.als-recent-bar {
  max-width: 1400px;
  margin: 12px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #ccc;
  flex-wrap: wrap;
}
.als-recent-label { font-weight: 600; flex-shrink: 0; }
.als-recent-chips {
  display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0;
}
.als-recent-chip {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  padding: 5px 26px 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  position: relative;
  transition: background var(--als-anim);
}
.als-recent-chip:hover { background: rgba(255,255,255,.15); }
.als-recent-chip-x {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  font-size: 9px;
  color: #fff;
}
.als-recent-clear {
  background: none; border: none; color: var(--als-green);
  font-size: 13px; cursor: pointer;
  font-family: var(--als-font); font-weight: 600;
  text-decoration: none;
  margin-left: auto;
}
.als-recent-clear:hover { text-decoration: underline; }

/* ── BODY (zone scrollable) ── */
.als-fs-body {
  flex: 1;
  overflow-y: auto;
  background: #fff;
}

.als-fs-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* ─────────────────────────────────────────────────────────
   ÉTAT INITIAL : Populaires + Top ventes
───────────────────────────────────────────────────────── */
.als-fs-initial .als-fs-container {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.als-fs-popular {
  width: 200px;
  flex-shrink: 0;
}
.als-fs-recommended {
  flex: 1;
  min-width: 0;
}

.als-fs-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--als-black);
  margin: 0 0 16px;
  font-family: var(--als-font);
}

.als-popular-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.als-popular-list li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #444;
  transition: background var(--als-anim), color var(--als-anim);
}
.als-popular-list li:hover {
  background: var(--als-gray);
  color: var(--als-green);
}

/* ── Grille de cards produits ── */
.als-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.als-card {
  background: #fff;
  border: 1px solid var(--als-border);
  border-radius: var(--als-radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--als-black);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow var(--als-anim), transform var(--als-anim);
}
.als-card:hover {
  box-shadow: var(--als-shadow);
  transform: translateY(-2px);
}
.als-card-img-wrap {
  position: relative;
  background: #ffffff;
  padding-top: 75%;
  overflow: hidden;
}
.als-card-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; padding: 10px;
}
.als-card-img-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: #ccc;
}
.als-card-badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .04em;
  color: #fff;
  white-space: nowrap;
  width: auto;
  max-width: calc(100% - 20px);
}
.als-card-badge--promo  { background: #e74c3c; }
.als-card-badge--stock  { background: #95a5a6; color: #fff; top: 10px; left: auto; right: 10px; font-style: italic; }

.als-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.als-card-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--als-black);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.als-card-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.als-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  gap: 8px;
}
.als-card-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--als-green);
}
.als-card-cart-btn {
  background: var(--als-green);
  color: #fff;
  border: none;
  width: 36px; height: 36px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background var(--als-anim);
}
.als-card-cart-btn:hover { background: var(--als-green-dark); }

/* ─────────────────────────────────────────────────────────
   ÉTAT RÉSULTATS : filtres + grille
───────────────────────────────────────────────────────── */
.als-fs-results .als-fs-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.als-panel-filters {
  width: 260px;
  flex-shrink: 0;
  background: #eee;
  border: 1px solid var(--als-border);
  border-radius: var(--als-radius);
  overflow: hidden;
  position: sticky;
  top: 0;
  overflow-y: auto;
}
.als-filter-block {
  padding: 14px 18px;
  border-bottom: 1px solid var(--als-border);
}
.als-filter-block:last-child { border-bottom: none; }
.als-filter-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: #777; margin-bottom: 10px;
}
.als-filter-list {
  display: flex; flex-direction: column; gap: 1px;
}
.als-filter-option {
  display: flex; align-items: center; gap: 6px;
  justify-content: flex-start;
  padding: 2px 7px;
  border-radius: 5px; cursor: pointer;
  font-size: 13px; line-height: 1.3;
  transition: background var(--als-anim);
  text-align: left;
}
.als-filter-option:hover,
.als-filter-option--active { background: rgba(12,142,68,.10); color: var(--als-green); }
.als-filter-option input { accent-color: var(--als-green); cursor: pointer; flex-shrink: 0; margin: 0; }
.als-filter-label {
  flex: 0 1 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: left;
  font-weight: normal;
}
.als-filter-count {
  font-size: 10px; color: #999;
  background: var(--als-gray-2); padding: 1px 6px; border-radius: 10px;
  flex-shrink: 0;
  margin-left: 4px;
}
.als-filter-option--active .als-filter-count { background: var(--als-green); color: #fff; }
.als-filter-checkbox-label {
  font-size: 13px; cursor: pointer;
  display: flex; gap: 8px; align-items: center;
  padding: 6px 8px;
  border-radius: 5px;
}
.als-filter-checkbox-label:hover { background: var(--als-gray); }
.als-filter-checkbox-label input { accent-color: var(--als-green); }
.als-price-inputs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.als-price-inputs input {
  width: 80px; border: 1px solid var(--als-border); border-radius: 5px;
  padding: 6px 8px; font-size: 12px; font-family: var(--als-font);
}
.als-price-currency { font-size: 12px; color: #888; }

.als-results-section {
  flex: 1; min-width: 0;
}
.als-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.als-footer {
  margin-top: 24px;
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--als-border);
}
.als-see-all {
  font-size: 15px; font-weight: 600;
  color: var(--als-green); text-decoration: none;
}
.als-see-all:hover { color: var(--als-green-dark); text-decoration: underline; }

/* ── États ── */
.als-state {
  grid-column: 1 / -1;
  padding: 40px 24px;
  text-align: center;
  color: #888; font-size: 14px;
}
.als-state-icon { font-size: 44px; margin-bottom: 12px; }
.als-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--als-border); border-top-color: var(--als-green);
  border-radius: 50%; animation: alsSpin .7s linear infinite;
  margin: 60px auto;
}
@keyframes alsSpin { to { transform: rotate(360deg) } }

/* ── Bouton filtres mobile ── */
.als-mobile-filter-btn {
  display: none !important;
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--als-black);
  color: #fff;
  border: none; border-radius: 28px;
  font-size: 14px; font-family: var(--als-font);
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  cursor: pointer;
  z-index: 10;
}
.als-mobile-filter-btn-count {
  background: var(--als-green); color: #fff;
  font-size: 11px; padding: 1px 6px; border-radius: 10px;
  margin-left: 8px;
}
.als-filter-close-btn {
  display: none;
  width: 100%; padding: 12px;
  background: var(--als-green); color: #fff;
  border: none; font-family: var(--als-font);
  font-weight: 700; font-size: 14px; cursor: pointer;
  margin-top: 12px;
  border-radius: 0;
}

/* ─────────────────────────────────────────────────────────
   MODE LIGNE — liste compacte alternative aux cards
───────────────────────────────────────────────────────── */
.als-mode-line .als-card-grid,
.als-mode-line .als-results {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.als-line {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--als-border);
  border-bottom: none;
  text-decoration: none;
  color: var(--als-black);
  transition: background var(--als-anim);
  cursor: pointer;
}
/* Empêcher les enfants d'intercepter le clic */
.als-line * { pointer-events: none; }
.als-card * { pointer-events: none; }
.als-card .als-card-cart-btn { pointer-events: auto; }
.als-line:first-child { border-radius: var(--als-radius) var(--als-radius) 0 0; }
.als-line:last-child  { border-radius: 0 0 var(--als-radius) var(--als-radius); border-bottom: 1px solid var(--als-border); }
.als-line:only-child  { border-radius: var(--als-radius); border-bottom: 1px solid var(--als-border); }
.als-line:hover { background: var(--als-gray); }

.als-line-img,
.als-line-img-placeholder {
  width: 64px; height: 64px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--als-border);
  flex-shrink: 0;
}
.als-line-img { object-fit: contain; padding: 4px; }
.als-line-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #ccc;
}

.als-line-info { flex: 1; min-width: 0; }
.als-line-name {
  font-size: 15px; font-weight: 600;
  color: var(--als-black);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.als-line-name mark { background: #fff3a3; color: inherit; padding: 0 1px; border-radius: 2px; }
.als-line-desc {
  font-size: 12px; color: #666;
  margin-top: 4px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.als-line-meta {
  font-size: 11px; color: #999;
  margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.als-line-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px;
  flex-shrink: 0;
}
.als-line-price {
  font-size: 16px; font-weight: 700;
  color: var(--als-green);
  white-space: nowrap;
}
.als-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.als-badge--stock   { background: #e8f7ef; color: var(--als-green); }
.als-badge--nostock { background: #fdecea; color: #c0392b; }

/* En mode ligne, on peut élargir un peu la zone résultats */
.als-mode-line .als-fs-results .als-results-section { max-width: 100%; }

/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .als-fs-initial .als-fs-container { flex-direction: column; }
  .als-fs-popular { width: 100%; }
  .als-popular-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .als-popular-list li {
    background: var(--als-gray);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  /* En mode line sur mobile : plus compact */
  .als-mode-line .als-line { padding: 10px 12px; gap: 10px; }
  .als-mode-line .als-line-img,
  .als-mode-line .als-line-img-placeholder { width: 52px; height: 52px; }
  .als-mode-line .als-line-name { font-size: 13px; }
  .als-mode-line .als-line-desc { font-size: 11px; }
  .als-mode-line .als-line-meta { font-size: 10px; }
  .als-mode-line .als-line-price { font-size: 14px; }
  .als-mode-line .als-badge { font-size: 9px; padding: 1px 6px; }

  .als-fs-header { padding: 10px 0 8px; }
  .als-fs-header-inner { padding: 0 12px; gap: 8px; }
  .als-fs-logo { display: none; }
  .als-fs-input { font-size: 16px; padding: 6px 0; }
  .als-fs-search-wrap { padding: 4px 10px; }

  .als-recent-bar {
    padding: 0 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .als-recent-bar::-webkit-scrollbar { display: none; }
  .als-recent-clear { display: none; }

  .als-fs-container { padding: 16px 12px; }

  .als-fs-results .als-fs-container { flex-direction: column; }

  /* Drawer mobile pour filtres */
  .als-panel-filters {
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: 85%; max-width: 320px;
    z-index: calc(var(--als-z) + 5);
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 4px 0 16px rgba(0,0,0,.2);
    background: #fff;
    border-radius: 0;
    max-height: 100vh;
  }
  .als-panel-filters.als-open { transform: translateX(0); }
  .als-filter-close-btn { display: block; }
  .als-mobile-filter-btn { display: flex !important; align-items: center; }

  .als-card-grid,
  .als-results {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .als-card-body { padding: 10px; gap: 4px; }
  .als-card-name { font-size: 13px; min-height: 32px; }
  .als-card-desc { -webkit-line-clamp: 2; font-size: 11px; }
  .als-card-price { font-size: 16px; }
  .als-card-cart-btn { width: 32px; height: 32px; font-size: 14px; }
}

@media (max-width: 420px) {
  .als-card-grid,
  .als-results {
    grid-template-columns: 1fr;
  }
}

/* ── Prix ─────────────────────────────────── */
.als-price-quote {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.als-price-value { color: var(--als-green); }

/* Prix avec promo : ancien prix barré + nouveau prix rouge + badge -X% */
.als-price-regular {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 400;
  margin-right: 6px;
}
.als-price-promo {
  color: #e53e3e;
  font-size: 17px;
  font-weight: 700;
}
.als-price-badge {
  display: inline-block;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Flag PROMO en haut des cards (comme Doofinder) */
.als-card-badge--promo {
  background: #e53e3e !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 4px 10px;
  font-size: 11px;
  z-index: 2;
}

/* ── Étiquette "Vu récemment" ── */
.als-card-badge--recent {
  background: #2c3e50;
  color: #fff;
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 4px;
  top: 10px; left: 10px;
  letter-spacing: .04em;
}
.als-line-recent {
  display: inline-block;
  background: #2c3e50;
  color: #fff;
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
  vertical-align: middle;
  letter-spacing: .03em;
}


/* ─────────────────────────────────────────────────────────
   MODE OVERLAY — fenêtre modale centrée
───────────────────────────────────────────────────────── */
#als-search-wrapper.als-layout-overlay.als-open {
  background: rgba(15,15,15,.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 4vh 24px;
  align-items: center;
  justify-content: center;
}

.als-layout-overlay .als-fs-header {
  border-radius: 12px 12px 0 0;
  padding: 12px 0 10px;
}
.als-layout-overlay .als-fs-header-inner { padding: 0 18px; }

.als-layout-overlay .als-fs-body {
  border-radius: 0 0 12px 12px;
  max-height: calc(92vh - 80px);
}

/* Conteneur de l'overlay : panel centré avec ombre */
.als-layout-overlay .als-fs-header,
.als-layout-overlay .als-fs-body {
  width: min(1100px, 100%);
  margin: 0 auto;
  box-shadow: 0 16px 50px rgba(0,0,0,.30);
  border: 1px solid #fff;
}
.als-layout-overlay .als-fs-header { padding-top: 20px; }

/* Masquer le logo Agrileader en mode overlay (gain de place) */
.als-layout-overlay .als-fs-logo { display: none; }

.als-layout-overlay .als-fs-container { padding: 20px 30px; }

/* Sidebar plus compacte en overlay */
.als-layout-overlay .als-panel-filters {
  max-height: calc(92vh - 200px);
}

/* Mobile : overlay s'étend en plein écran de toute façon */
@media (max-width: 768px) {
  #als-search-wrapper.als-layout-overlay.als-open {
    padding: 0;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .als-layout-overlay .als-fs-header,
  .als-layout-overlay .als-fs-body {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
  }
}

/* ── "À partir de" devant le prix ── */
.als-price-from {
  font-size: 11px;
  font-weight: 500;
  color: #777;
  font-style: italic;
  margin-right: 3px;
  text-transform: lowercase;
  letter-spacing: 0;
}

/* ── Badge "Plusieurs déclinaisons" ── */
.als-variants-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e6efff 100%);
  color: #1e40af;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #c7d8f5;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .01em;
}

/* Variante dans la card : marge en-dessous du nom */
.als-card .als-variants-badge {
  margin-top: 4px;
  font-size: 10px;
  padding: 3px 8px;
  align-self: flex-start;
}

/* Variante dans la ligne : remplace la référence */
.als-line .als-variants-badge {
  font-size: 11px;
}

/* ── Barre de tri ── */
.als-sort-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #fafbfc;
  border: 1px solid var(--als-border);
  border-radius: 8px;
  flex-wrap: wrap;
}
.als-sort-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.als-sort-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.als-sort-btn {
  background: #fff;
  border: 1px solid var(--als-border);
  color: #555;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--als-font);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--als-anim);
  white-space: nowrap;
}
.als-sort-btn:hover {
  border-color: var(--als-green);
  color: var(--als-green);
}
.als-sort-btn--active {
  background: var(--als-green);
  border-color: var(--als-green);
  color: #fff;
}
.als-sort-btn--active:hover {
  background: var(--als-green-dark);
  color: #fff;
}

@media (max-width: 768px) {
  .als-sort-bar { padding: 8px 10px; gap: 8px; }
  .als-sort-label { font-size: 11px; }
  .als-sort-btn { font-size: 11px; padding: 5px 10px; }
}


/* ─────────────────────────────────────────────────────────
   PAGE D'ATTERRISSAGE RECHERCHE
───────────────────────────────────────────────────────── */
.als-results-page {
  font-family: var(--als-font);
  padding: 24px 0 60px;
}
.als-results-page-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Barre de recherche en haut */
.als-rp-header {
  margin-bottom: 24px;
}
.als-rp-search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border: 2px solid var(--als-border);
  border-radius: var(--als-radius);
  padding: 4px;
  max-width: 800px;
  transition: border-color var(--als-anim);
}
.als-rp-search-form:focus-within { border-color: var(--als-green); }
.als-rp-search-icon { padding: 0 12px; font-size: 18px; color: #999; }
.als-rp-input {
  flex: 1;
  border: none; outline: none;
  font-size: 16px;
  padding: 10px 8px;
  font-family: var(--als-font);
  background: transparent;
  min-width: 0;
}
.als-rp-submit {
  background: var(--als-green);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--als-font);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--als-anim);
  flex-shrink: 0;
}
.als-rp-submit:hover { background: var(--als-green-dark); }

/* Layout 2 colonnes */
.als-rp-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Adapter la sidebar dans la page */
.als-results-page .als-panel-filters {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
}

.als-rp-results-section {
  flex: 1;
  min-width: 0;
}

/* Toolbar : compteur + tri */
.als-rp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.als-rp-count {
  font-size: 14px;
  color: #555;
  font-weight: 500;
}
.als-rp-toolbar .als-sort-bar {
  margin: 0;
  background: transparent;
  border: none;
  padding: 0;
}

/* Bouton voir plus */
.als-rp-loadmore {
  margin-top: 32px;
  text-align: center;
}
.als-rp-loadmore-btn {
  background: #fff;
  border: 2px solid var(--als-green);
  color: var(--als-green);
  padding: 12px 32px;
  border-radius: 28px;
  font-weight: 700;
  font-family: var(--als-font);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--als-anim);
}
.als-rp-loadmore-btn:hover {
  background: var(--als-green);
  color: #fff;
}

@media (max-width: 768px) {
  .als-results-page-inner { padding: 0 12px; }
  .als-rp-layout { flex-direction: column; }
  .als-results-page .als-panel-filters {
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: 85%; max-width: 320px;
    z-index: calc(var(--als-z) + 5);
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 4px 0 16px rgba(0,0,0,.2);
    background: #fff;
    border-radius: 0;
    max-height: 100vh;
  }
  .als-results-page .als-panel-filters.als-open { transform: translateX(0); }
  .als-results-page .als-filter-close-btn { display: block; }
  .als-results-page .als-mobile-filter-btn { display: flex !important; align-items: center; }
  .als-rp-toolbar { flex-direction: column; align-items: flex-start; }
}


/* Fix : forcer la largeur de la grille résultats sur la page d'atterrissage */
.als-results-page #als-rp-results {
  width: 100%;
  min-height: 200px;
}
.als-results-page .als-rp-results-section {
  width: 100%;
  min-width: 0;
}


/* ── Skeleton loaders (perception de rapidité) ── */
@keyframes alsSkelPulse {
  0%   { opacity: 1; }
  50%  { opacity: .5; }
  100% { opacity: 1; }
}
.als-card--skeleton {
  pointer-events: none;
  cursor: default;
}
.als-card--skeleton:hover {
  box-shadow: none;
  transform: none;
}
.als-skel {
  background: linear-gradient(90deg, #ebedf0 0%, #f5f6f8 50%, #ebedf0 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: alsSkelShimmer 1.4s ease-in-out infinite;
}
@keyframes alsSkelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.als-skel--img {
  position: absolute;
  inset: 0;
  border-radius: 0;
}
.als-skel--line {
  height: 12px;
  margin-bottom: 6px;
}
.als-skel--80 { width: 80%; height: 14px; }
.als-skel--60 { width: 60%; }
.als-skel--40 { width: 40%; }
.als-skel--price {
  width: 60px; height: 22px; border-radius: 4px;
}


/* ── Bandeaux publicitaires ───────────────────── */
.als-banners-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.als-banner {
  border-radius: var(--als-radius);
  overflow: hidden;
  position: relative;
}
.als-banner--image .als-banner-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  text-decoration: none;
  min-height: 80px;
  transition: filter var(--als-anim);
}
.als-banner--image .als-banner-link:hover {
  filter: brightness(1.08);
  text-decoration: none;
}
.als-banner-img {
  height: 60px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border-radius: 4px;
  padding: 4px;
}
.als-banner-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.als-banner-arrow {
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform var(--als-anim);
}
.als-banner-link:hover .als-banner-arrow {
  transform: translateX(4px);
}

/* Bandeau HTML : juste le wrapper avec radius */
.als-banner--html {
  background: #fff;
  border: 1px solid var(--als-border);
  padding: 12px;
}

/* Mobile */
@media (max-width: 600px) {
  .als-banner--image .als-banner-link {
    padding: 10px 14px;
    gap: 10px;
    min-height: 60px;
  }
  .als-banner-img { height: 40px; }
  .als-banner-text { font-size: 13px; }
  .als-banner-arrow { font-size: 18px; }
}

/* Dans l'overlay : margins légères */
.als-fs-results .als-banners-container {
  margin-bottom: 16px;
}
