/* ================================================================
   FIXEO v8 — SECONDARY SMART SEARCH BAR + INLINE RESULTS + VEDETTE
   Mirrors HERO smart search but renders results inline (no modal)
   Design: 100% consistent with hero bar (SSB) + artisan card styles
   ================================================================ */

/* ── Section container ── */
#secondary-search-section {
  background: linear-gradient(180deg, rgba(13,13,26,0) 0%, rgba(20,20,40,0.6) 50%, rgba(13,13,26,0) 100%);
  padding-bottom: 0;
}
#secondary-search-section .section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
#secondary-search-section .section-header p {
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════
   SECONDARY SEARCH BAR  (.ssb2-*)
   ═══════════════════════════════════════════════════════════ */

.ssb2-bar-wrap {
  width: 100%;
  max-width: 840px;
  margin: 0 auto 28px;
  position: relative;
  z-index: 10;
}

/* ── Main bar card ── */
.ssb2-bar-card {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ssb2-bar-card:focus-within {
  border-color: rgba(225,48,108,0.5);
  box-shadow: 0 8px 48px rgba(0,0,0,0.4), 0 0 0 4px rgba(225,48,108,0.12);
}

/* ── Segment ── */
.ssb2-segment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  flex: 1;
  min-width: 0;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ssb2-segment:hover {
  background: rgba(255,255,255,0.04);
}
.ssb2-seg-nlp {
  flex: 1.8;
}
.ssb2-seg-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}
.ssb2-seg-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.ssb2-seg-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.ssb2-seg-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  font-family: 'Cairo', sans-serif;
  font-weight: 500;
  width: 100%;
  padding: 0;
  line-height: 1.4;
}
.ssb2-seg-input::placeholder {
  color: rgba(255,255,255,0.3);
  font-size: 0.88rem;
}
.ssb2-seg-select {
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  font-family: 'Cairo', sans-serif;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  line-height: 1.4;
}
.ssb2-seg-select option {
  background: #1a1a2e;
  color: #fff;
}

/* ── Divider ── */
.ssb2-seg-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
  align-self: center;
}

/* ── Clear button ── */
.ssb2-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.ssb2-clear-btn:hover {
  background: rgba(225,48,108,0.2);
  color: #fff;
}

/* ── Search button ── */
.ssb2-btn-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  min-width: 140px;
  padding: 0 24px;
  background: linear-gradient(135deg, #E1306C 0%, #833AB4 60%, #405DE6 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: 0 20px 20px 0;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: background-position 0.4s ease, transform 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}
.ssb2-btn-search svg {
  width: 17px;
  height: 17px;
  stroke: #fff;
  flex-shrink: 0;
}
.ssb2-btn-search:hover {
  background-position: 100% 0;
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(225,48,108,0.45), inset 0 0 0 1px rgba(255,255,255,0.15);
}
.ssb2-btn-search:active { transform: scale(0.98); }

/* ── Quick filters row ── */
.ssb2-filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 0 4px;
}
.ssb2-filters-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
  flex-shrink: 0;
}
.ssb2-qfilter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.77rem;
  font-weight: 600;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ssb2-qfilter:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}
.ssb2-qfilter.active {
  background: rgba(225,48,108,0.18);
  border-color: rgba(225,48,108,0.45);
  color: #E1306C;
}
.ssb2-qdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.ssb2-qfilter.active .ssb2-qdot {
  opacity: 1;
  background: #E1306C;
  box-shadow: 0 0 6px rgba(225,48,108,0.7);
}


/* ═══════════════════════════════════════════════════════════
   INLINE SEARCH RESULTS  (#ssb2-results-section)
   ═══════════════════════════════════════════════════════════ */

#ssb2-results-section {
  margin-top: 24px;
  animation: ssb2-fadein 0.35s ease forwards;
}
@keyframes ssb2-fadein {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header bar above results */
.ssb2-results-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
#ssb2-results-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.ssb2-results-close {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: all 0.2s ease;
}
.ssb2-results-close:hover {
  background: rgba(225,48,108,0.12);
  border-color: rgba(225,48,108,0.3);
  color: rgba(225,48,108,0.9);
}

/* Results grid: 2-col on desktop, 1-col mobile */
#ssb2-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* ── Empty state ── */
.ssb2-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 18px;
}
.ssb2-empty-icon   { font-size: 2.5rem; margin-bottom: 10px; }
.ssb2-empty-title  { font-size: 1rem; font-weight: 700; color: rgba(255,255,255,0.6); margin-bottom: 6px; }
.ssb2-empty-sub    { font-size: 0.82rem; }


/* ═══════════════════════════════════════════════════════════
   ARTISAN CARD  (.ssb2-card)
   Mirrors .hsm-artisan-card for visual consistency
   ═══════════════════════════════════════════════════════════ */

.ssb2-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  padding: 18px 18px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.ssb2-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(225,48,108,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.ssb2-card:hover {
  border-color: rgba(225,48,108,0.35);
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.ssb2-card:hover::before { opacity: 1; }

/* Featured card (first result) */
.ssb2-card--featured {
  border-color: rgba(225,48,108,0.4);
  background: rgba(225,48,108,0.07);
}
.ssb2-card--featured::after {
  content: '🥇 Meilleur résultat';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #FFD700;
  background: rgba(255,215,0,0.1);
  border: 1px solid rgba(255,215,0,0.25);
  border-radius: 6px;
  padding: 2px 7px;
}

/* ── Avatar ── */
.ssb2-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #E1306C, #833AB4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 14px rgba(225,48,108,0.3);
  font-family: 'Cairo', sans-serif;
  letter-spacing: 0.01em;
}
.ssb2-avail-dot {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #12122a;
}
.ssb2-avail-dot.available { background: #20c997; }
.ssb2-avail-dot.busy      { background: #ffa502; }
.ssb2-avail-dot.offline   { background: #6c757d; }

/* ── Card info ── */
.ssb2-card-info {
  min-width: 0;
  flex: 1;
}
.ssb2-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.ssb2-card-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.ssb2-badge-available {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(32,201,151,0.18);
  border: 1px solid rgba(32,201,151,0.35);
  color: #20c997;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ssb2-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ssb2-meta-sep { color: rgba(255,255,255,0.18); }
.ssb2-stars {
  color: #FFD700;
  font-size: 0.7rem;
  letter-spacing: -1px;
}
.ssb2-card-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.ssb2-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.67rem;
  font-weight: 600;
}
.ssb2-badge.trust {
  background: rgba(32,201,151,0.12);
  border-color: rgba(32,201,151,0.25);
  color: #20c997;
}
.ssb2-badge.fast {
  background: rgba(252,175,69,0.12);
  border-color: rgba(252,175,69,0.25);
  color: #FCAF45;
}

/* ── Card actions ── */
.ssb2-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  min-width: 110px;
}
.ssb2-btn-reserve {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 14px;
  border-radius: 11px;
  background: linear-gradient(135deg, #E1306C, #833AB4);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Cairo', sans-serif;
  box-shadow: 0 3px 12px rgba(225,48,108,0.35);
  white-space: nowrap;
}
.ssb2-btn-reserve:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(225,48,108,0.5);
}
.ssb2-btn-express {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 11px;
  background: rgba(252,175,69,0.12);
  border: 1px solid rgba(252,175,69,0.35);
  color: #FCAF45;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Cairo', sans-serif;
  white-space: nowrap;
}
.ssb2-btn-express:hover {
  background: rgba(252,175,69,0.2);
  border-color: rgba(252,175,69,0.55);
  transform: translateY(-1px);
}


/* ═══════════════════════════════════════════════════════════
   ARTISANS VEDETTE  (#ssb2-vedette-section)
   ═══════════════════════════════════════════════════════════ */

#ssb2-vedette-section,
.ssb2-vedette-section {
  margin-top: 48px;
}

/* Header */
.ssb2-vedette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ssb2-vedette-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ssb2-vedette-title > span:first-child {
  font-size: 1.4rem;
}
.ssb2-vedette-title h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.ssb2-vedette-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(225,48,108,0.2), rgba(131,58,180,0.2));
  border: 1px solid rgba(225,48,108,0.3);
  color: rgba(255,255,255,0.75);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Grid: 5 columns desktop → 3 tablet → 2 mobile */
.ssb2-vedette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

/* Vedette cards reuse .ssb2-card but are more compact */
.ssb2-vedette-grid .ssb2-card {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 16px 14px;
  align-items: start;
  cursor: pointer;
}
.ssb2-vedette-grid .ssb2-card--featured::after {
  display: none; /* no best-result label in vedette */
}

/* In vedette, avatar goes full width centered */
.ssb2-vedette-grid .ssb2-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 1rem;
  margin: 0 auto 8px;
}
.ssb2-vedette-grid .ssb2-card-info {
  text-align: center;
}
.ssb2-vedette-grid .ssb2-card-top {
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.ssb2-vedette-grid .ssb2-card-name {
  font-size: 0.85rem;
  display: block;
  text-align: center;
}
.ssb2-vedette-grid .ssb2-badge-available {
  font-size: 0.6rem;
  padding: 1px 6px;
}
.ssb2-vedette-grid .ssb2-card-meta {
  font-size: 0.7rem;
  justify-content: center;
  gap: 5px;
}
.ssb2-vedette-grid .ssb2-card-badges {
  justify-content: center;
}
.ssb2-vedette-grid .ssb2-badge {
  font-size: 0.62rem;
  padding: 1px 5px;
}
.ssb2-vedette-grid .ssb2-card-actions {
  flex-direction: row;
  min-width: 0;
  width: 100%;
  gap: 6px;
  grid-column: 1 / -1;
}
.ssb2-vedette-grid .ssb2-btn-reserve,
.ssb2-vedette-grid .ssb2-btn-express {
  flex: 1;
  padding: 7px 6px;
  font-size: 0.72rem;
  border-radius: 9px;
}

/* ── "Voir plus" button ── */
.ssb2-vedette-more-wrap {
  text-align: center;
  margin-top: 8px;
  padding-bottom: 16px;
}
.ssb2-btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
}
.ssb2-btn-more:hover {
  background: rgba(225,48,108,0.12);
  border-color: rgba(225,48,108,0.35);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.ssb2-btn-more::after {
  content: '↓';
  font-size: 1rem;
  opacity: 0.6;
}

/* ── Loading skeleton for vedette ── */
.ssb2-vedette-grid .ssb2-skeleton {
  height: 200px;
  border-radius: 18px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: ssb2-skeleton-shimmer 1.4s linear infinite;
}
@keyframes ssb2-skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
  .ssb2-vedette-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .ssb2-vedette-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  /* Bar: stack vertically on small screens */
  .ssb2-bar-card {
    flex-direction: column;
    border-radius: 18px;
    gap: 0;
  }
  .ssb2-segment {
    width: 100%;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .ssb2-seg-divider {
    display: none;
  }
  .ssb2-btn-search {
    width: 100%;
    border-radius: 0 0 17px 17px;
    padding: 16px 24px;
    min-width: 0;
    font-size: 1rem;
  }
  /* Results: 1 column */
  #ssb2-results-grid {
    grid-template-columns: 1fr;
  }
  /* Cards on mobile */
  .ssb2-card {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 14px 14px;
  }
  .ssb2-card-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    min-width: 0;
    gap: 8px;
  }
  .ssb2-btn-reserve, .ssb2-btn-express {
    flex: 1;
    padding: 10px 8px;
  }
  /* Vedette: 2 columns on mobile */
  .ssb2-vedette-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ssb2-filters-row {
    gap: 6px;
  }
  .ssb2-qfilter {
    font-size: 0.72rem;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .ssb2-vedette-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ssb2-card-meta {
    font-size: 0.7rem;
    gap: 5px;
  }
}
