/* ============================================================
   vends.fr - Améliorations CSS v2
   Dark mode affiné · Skeleton loaders · Micro-animations
   Hero v2 · Près de chez vous · Infinite scroll
   ============================================================ */

/* ============================================================
   HERO v2
   ============================================================ */
.vf-hero-v2 { overflow: hidden; }

/* Orbes de fond animés */
.vf-hero-bg-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.vf-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .18;
  animation: vf-orb-float 8s ease-in-out infinite;
}
.vf-orb-1 { width: 500px; height: 500px; background: #6366f1; top: -150px; right: -80px; animation-delay: 0s; }
.vf-orb-2 { width: 350px; height: 350px; background: #8b5cf6; bottom: -100px; left: 10%; animation-delay: -3s; }
.vf-orb-3 { width: 280px; height: 280px; background: #f97316; top: 40%; right: 30%; animation-delay: -5s; opacity: .08; }

@keyframes vf-orb-float {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-30px) scale(1.05); }
}

/* Badge hero pulsant */
.vf-hero-badge-pulse { position: relative; }
.vf-badge-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  position: relative;
}
.vf-badge-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #4ade80;
  animation: vf-pulse-dot 2s ease-out infinite;
}
@keyframes vf-pulse-dot {
  0%   { opacity: .6; transform: scale(1); }
  100% { opacity: 0;  transform: scale(2.5); }
}

/* Gradient animé sur le titre */
.vf-grad-animated {
  background: linear-gradient(270deg, #6366f1, #8b5cf6, #a78bfa, #6366f1);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: vf-grad-shift 4s ease infinite;
}
@keyframes vf-grad-shift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* Search box v2 */
.vf-hero-search-v2 {
  transition: box-shadow .3s, transform .2s;
}
.vf-hero-search-v2:focus-within {
  box-shadow: 0 12px 48px rgba(0,0,0,.35), 0 0 0 3px rgba(99,102,241,.4);
  transform: translateY(-1px);
}

/* Hero left - apparition en slide */
.vf-hero-left {
  animation: vf-slide-in-left .7s cubic-bezier(.16,1,.3,1) both;
}
@keyframes vf-slide-in-left {
  from { opacity:0; transform: translateX(-30px); }
  to   { opacity:1; transform: translateX(0); }
}

/* Social proof */
.vf-hero-proof {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vf-proof-avatars {
  display: flex;
}
.vf-proof-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  margin-left: -8px;
}
.vf-proof-avatars .vf-proof-av:first-child { margin-left: 0; }
.vf-proof-text { font-size: 13px; color: rgba(255,255,255,.75); }
.vf-proof-text strong { color: #fff; }

/* Carte flottante hero */
.vf-hero-float-card {
  position: relative;
  animation: vf-float-card .8s cubic-bezier(.16,1,.3,1) .2s both;
}
@keyframes vf-float-card {
  from { opacity:0; transform: translateY(30px) scale(.95); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}
.vf-hero-float-inner {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  width: 260px;
  box-shadow: 0 24px 64px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.15);
  animation: vf-bob 4s ease-in-out infinite;
}
@keyframes vf-bob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}
.vf-float-tag {
  display: inline-flex; align-items: center;
  background: #fef9c3; color: #ca8a04;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 100px;
  margin-bottom: 12px;
}
.vf-float-img-placeholder {
  width: 100%; height: 120px;
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--p);
  margin-bottom: 12px;
}
.vf-float-price { font-family: var(--fh); font-size: 22px; font-weight: 900; color: var(--g9); }
.vf-float-title { font-size: 13px; color: var(--g5); margin: 3px 0 6px; }
.vf-float-meta  { font-size: 12px; color: var(--g3); }
.vf-float-ia-badge {
  margin-top: 10px;
  display: inline-flex; align-items: center;
  background: #ecfdf5; color: #16a34a;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 100px;
}

/* Mini cartes orbitantes */
.vf-orbit-card {
  position: absolute;
  background: #fff;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--g7);
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  white-space: nowrap;
}
.vf-orbit-1 {
  top: -14px; right: -60px;
  animation: vf-bob 5s ease-in-out .5s infinite;
}
.vf-orbit-2 {
  bottom: 20px; right: -70px;
  animation: vf-bob 6s ease-in-out 1s infinite;
}

/* Bouton glow */
.vf-btn-glow {
  box-shadow: 0 0 0 0 rgba(99,102,241,.4);
  animation: vf-glow-pulse 3s ease-in-out infinite;
}
@keyframes vf-glow-pulse {
  0%,100% { box-shadow: 0 2px 12px rgba(99,102,241,.3); }
  50%     { box-shadow: 0 4px 28px rgba(99,102,241,.55); }
}

/* ============================================================
   SECTION "PRÈS DE CHEZ VOUS"
   ============================================================ */
.vf-section-nearby { background: var(--g1); }
[data-theme="dark"] .vf-section-nearby { background: #0f172a; }

.vf-nearby-prompt {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}
.vf-nearby-prompt-inner {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--sh);
  border: 1.5px solid var(--g1);
  animation: vf-fade-up .4s ease both;
}
[data-theme="dark"] .vf-nearby-prompt-inner { background: #1e293b; border-color: #334155; }
.vf-nearby-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe4d6, #fecdd3);
  color: var(--acc);
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.vf-nearby-prompt-inner h4 { font-family: var(--fh); font-weight: 800; color: var(--g9); margin-bottom: 8px; }
.vf-nearby-prompt-inner p  { font-size: 14px; color: var(--g5); margin-bottom: 20px; }
.vf-nearby-privacy {
  margin-top: 14px;
  font-size: 12px;
  color: var(--g5);
}
.vf-nearby-error {
  padding: 20px;
  background: #fff;
  border-radius: var(--r);
  font-size: 14px;
  text-align: center;
  border: 1.5px solid var(--g1);
}
[data-theme="dark"] .vf-nearby-error { background: #1e293b; border-color: #334155; color: var(--g5); }

/* Distance badge sur les cartes proches */
.vf-card-dist {
  display: inline-flex; align-items: center;
  background: var(--pl); color: var(--p);
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 100px;
  margin-left: 4px;
}

/* ============================================================
   SKELETON LOADERS
   ============================================================ */
@keyframes vf-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.vf-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%);
  background-size: 800px 100%;
  animation: vf-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
[data-theme="dark"] .vf-skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #263348 37%, #1e293b 63%);
  background-size: 800px 100%;
}
.vf-skeleton-img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 0;
}
.vf-skeleton-line {
  display: block;
  border-radius: 4px;
}
.vf-skeleton-card {
  pointer-events: none;
  cursor: default;
}
.vf-skeleton-card .vf-card-body {
  padding: 12px 14px 14px;
}
.vf-skeleton-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

/* ============================================================
   MICRO-ANIMATIONS - apparition cartes
   ============================================================ */
.vf-card-appear {
  opacity: 0;
  animation: vf-card-in .4s cubic-bezier(.16,1,.3,1) both;
}
@keyframes vf-card-in {
  from { opacity:0; transform: translateY(16px) scale(.98); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

/* Catégories animées */
.vf-cat-animated {
  opacity: 0;
  animation: vf-fade-up .35s ease both;
}
@keyframes vf-fade-up {
  from { opacity:0; transform: translateY(12px); }
  to   { opacity:1; transform: translateY(0); }
}

/* FAV button micro-animation */
.vf-card-fav--loading { opacity: .5; pointer-events: none; }
.vf-card-fav--pop {
  animation: vf-fav-pop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes vf-fav-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Hover card amélioré */
.vf-card {
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
}
.vf-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 40px rgba(99,102,241,.15), 0 2px 8px rgba(0,0,0,.08);
}

/* Hover catégories amélioré */
.vf-cat {
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease, border-color .15s;
}
.vf-cat:hover { transform: translateY(-6px) scale(1.03); }

/* Bouton taille sm */
.vf-btn-sm { padding: 6px 12px !important; font-size: 13px !important; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.vf-cta-banner {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: 24px;
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.vf-cta-bg-orb {
  position: absolute;
  width: 400px; height: 400px;
  background: #6366f1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .2;
  top: -100px; right: -80px;
  pointer-events: none;
}
.vf-cta-content { position: relative; }
.vf-cta-emoji { font-size: 40px; margin-bottom: 12px; animation: vf-bob 3s ease-in-out infinite; }
.vf-cta-title {
  font-family: var(--fh);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}
.vf-cta-sub { color: rgba(255,255,255,.7); font-size: 17px; margin-bottom: 32px; }
.vf-btn-cta-white {
  display: inline-flex; align-items: center;
  background: #fff; color: var(--p) !important;
  text-decoration: none !important;
  border: none; border-radius: 12px;
  padding: 14px 30px;
  font-family: var(--fb); font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  transition: var(--tr);
}
.vf-btn-cta-white:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.3); }

/* ============================================================
   DARK MODE - version affinée complète
   ============================================================ */
[data-theme="dark"] {
  --g9: #f9fafb;
  --g7: #e5e7eb;
  --g5: #9ca3af;
  --g3: #374151;
  --g1: #1f2937;
  --white: #111827;
  --sh:  0 1px 3px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.2);
  --shl: 0 8px 32px rgba(99,102,241,.18), 0 2px 8px rgba(0,0,0,.2);
}
[data-theme="dark"] body            { background: #0f172a; color: var(--g7); }
[data-theme="dark"] .vf-nav         { background: rgba(15,23,42,.96); border-bottom-color: rgba(255,255,255,.06); }
[data-theme="dark"] .vf-nav-search  { background: #1e293b; }
[data-theme="dark"] .vf-nav-search input { color: #f1f5f9; }
[data-theme="dark"] .vf-stats       { background: #0f172a; border-bottom-color: #1e293b; }
[data-theme="dark"] .vf-stat strong { color: #f1f5f9; }
[data-theme="dark"] .vf-section-recent { background: #0f172a !important; }

/* Cards */
[data-theme="dark"] .vf-card        { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .vf-card-title  { color: var(--g5); }
[data-theme="dark"] .vf-card-price  { color: #f1f5f9; }
[data-theme="dark"] .vf-card-meta   { color: #475569; }
[data-theme="dark"] .vf-card-no-img { background: #263348; }
[data-theme="dark"] .vf-card-fav    { background: rgba(30,41,59,.9); color: #94a3b8; }

/* Catégories */
[data-theme="dark"] .vf-cat         { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .vf-cat-name    { color: #e2e8f0; }
[data-theme="dark"] .vf-cat-count   { color: #64748b; }

/* Formulaires */
[data-theme="dark"] .vf-input       { background: #1e293b; border-color: #334155; color: #f1f5f9; }
[data-theme="dark"] .vf-input:focus { border-color: var(--p); box-shadow: 0 0 0 4px rgba(99,102,241,.15); }
[data-theme="dark"] .vf-btn-ghost   { background: #1e293b; border-color: #334155; color: #e2e8f0 !important; }
[data-theme="dark"] .vf-btn-ghost:hover { border-color: var(--p); color: var(--p) !important; }

/* Dropdown */
[data-theme="dark"] .vf-dropdown              { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .vf-dropdown .dropdown-item { color: #e2e8f0; }
[data-theme="dark"] .vf-dropdown .dropdown-item:hover { background: #334155; }

/* Messagerie */
[data-theme="dark"] .vf-msg-sidebar         { background: #1e293b; border-right-color: #334155; }
[data-theme="dark"] .vf-conv                { border-bottom-color: #334155; }
[data-theme="dark"] .vf-conv:hover          { background: #263348; }
[data-theme="dark"] .vf-chat                { background: #0f172a; }
[data-theme="dark"] .vf-msg-other .vf-bubble{ background: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .vf-chat-textarea       { background: #1e293b; border-color: #334155; color: #f1f5f9; }
[data-theme="dark"] .vf-chat-input-zone     { background: #1e293b; border-top-color: #334155; }
[data-theme="dark"] .vf-chat-head           { background: #1e293b; border-bottom-color: #334155; }

/* Contact / vendeur */
[data-theme="dark"] .vf-contact-card        { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .vf-seller-card         { background: #1e293b; border-color: #334155; }

/* Auth */
[data-theme="dark"] .vf-auth-page           { background: linear-gradient(135deg, #0f172a, #1e293b); }
[data-theme="dark"] .vf-auth-card           { background: #1e293b; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
[data-theme="dark"] .vf-auth-title          { color: #f1f5f9; }
[data-theme="dark"] .vf-auth-sub            { color: #94a3b8; }
[data-theme="dark"] .vf-label               { color: #cbd5e1; }
[data-theme="dark"] .vf-input-icon          { color: #64748b; }

/* Profil */
[data-theme="dark"] .vf-profil-card         { background: #1e293b; }
[data-theme="dark"] .vf-profil-name         { color: #f1f5f9; }
[data-theme="dark"] .vf-avis-card           { background: #1e293b; }
[data-theme="dark"] .vf-vendor-score-item   { background: #263348; }
[data-theme="dark"] .vf-vendor-score-num    { color: #f1f5f9; }

/* Empty state */
[data-theme="dark"] .vf-empty              { background: #1e293b; }
[data-theme="dark"] .vf-empty h4           { color: #e2e8f0; }

/* Pagination */
[data-theme="dark"] .vf-page               { background: #1e293b; border-color: #334155; color: #e2e8f0 !important; }
[data-theme="dark"] .vf-page:hover         { border-color: var(--p); color: var(--p) !important; }
[data-theme="dark"] .vf-page.active        { background: var(--p); border-color: var(--p); color: #fff !important; }

/* Admin */
[data-theme="dark"] .vf-admin-card         { background: #1e293b; }
[data-theme="dark"] .vf-admin-card-head    { border-bottom-color: #334155; color: #f1f5f9; }
[data-theme="dark"] .vf-admin-body         { background: #0f172a; }
[data-theme="dark"] .vf-admin-topbar       { background: #1e293b; border-bottom-color: #334155; }
[data-theme="dark"] .vf-kpi               { background: #1e293b; }
[data-theme="dark"] .vf-kpi-num           { color: #f1f5f9; }
[data-theme="dark"] .vf-table th          { background: #263348; color: #94a3b8; border-bottom-color: #334155; }
[data-theme="dark"] .vf-table td          { border-bottom-color: #263348; color: #e2e8f0; }
[data-theme="dark"] .vf-table tr:hover td { background: #263348; }

/* Footer */
[data-theme="dark"] .vf-footer              { background: #020617; }
[data-theme="dark"] .vf-footer-bottom       { border-top-color: rgba(255,255,255,.04); color: #475569; }

/* text-muted Bootstrap override */
[data-theme="dark"] .text-muted            { color: #64748b !important; }

/* Détail annonce */
[data-theme="dark"] .vf-detail-grid        { border-color: #334155; }
[data-theme="dark"] .vf-detail-item        { border-bottom-color: #263348; border-right-color: #334155; }
[data-theme="dark"] .vf-detail-value       { color: #e2e8f0; }
[data-theme="dark"] .vf-annonce-price      { color: #f1f5f9; }
[data-theme="dark"] .vf-annonce-title      { color: #f1f5f9; }

/* Gallery */
[data-theme="dark"] .vf-gallery-main       { background: #1e293b; }
[data-theme="dark"] .vf-gallery-nav        { background: rgba(30,41,59,.9); color: #e2e8f0; }

/* Nearby + comparateur */
[data-theme="dark"] .vf-nearby-prompt-inner { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .vf-nearby-error       { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .vf-compare-bar        { background: #1e293b; border-top-color: var(--p); }
[data-theme="dark"] .vf-compare-item       { background: #263348; }
[data-theme="dark"] .vf-compare-slot       { border-color: #475569; }
[data-theme="dark"] .vf-compare-table      { background: #1e293b; }
[data-theme="dark"] .vf-compare-table th   { background: #263348; border-bottom-color: #334155; }
[data-theme="dark"] .vf-compare-table td   { border-bottom-color: #263348; color: #e2e8f0; }
[data-theme="dark"] .vf-compare-table td:first-child { background: #1e293b; color: #94a3b8; }

/* Search dropdown */
[data-theme="dark"] #searchSuggest         { background: #1e293b; box-shadow: 0 8px 40px rgba(0,0,0,.4); }
[data-theme="dark"] .ss-item:hover         { background: #263348; color: #a5b4fc; }
[data-theme="dark"] .ss-item              { color: #e2e8f0; }
[data-theme="dark"] .ss-footer            { border-top-color: #334155; background: #1e293b; }
[data-theme="dark"] .ss-footer:hover      { background: #263348; }
[data-theme="dark"] .ss-label            { color: #64748b; }

/* Alertes */
[data-theme="dark"] .vf-alerte-card       { background: #1e293b; border-color: #334155; }

/* Toggle dark mode */
.vf-dark-toggle {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--g3);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--g5);
  cursor: pointer;
  font-size: 16px;
  transition: var(--tr);
}
.vf-dark-toggle:hover { background: var(--g1); color: var(--p); }

/* ============================================================
   CARTE DES ANNONCES (Leaflet)
   ============================================================ */
.vf-map-wrap {
  height: 480px;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh);
  position: relative;
}
.vf-map-toggle {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
  box-shadow: var(--sh);
  margin-bottom: 16px;
  width: fit-content;
}
[data-theme="dark"] .vf-map-toggle { background: #1e293b; }
.vf-map-toggle-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--g5);
  cursor: pointer;
  transition: var(--tr);
  display: flex;
  align-items: center;
  gap: 6px;
}
.vf-map-toggle-btn.active { background: var(--p); color: #fff; }
.vf-map-popup img { width:100%; height:100px; object-fit:cover; border-radius:6px; margin-bottom:6px; }
.vf-map-popup-price { font-family:var(--fh); font-size:16px; font-weight:800; color:var(--g9); }
.vf-map-popup-title { font-size:13px; color:var(--g5); margin:2px 0 6px; }

/* ============================================================
   RECHERCHE TEMPS RÉEL (dropdown nav)
   ============================================================ */
.vf-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--shl);
  z-index: 999;
  overflow: hidden;
  border: 1px solid var(--g1);
  animation: vf-fade-up .15s ease both;
}
[data-theme="dark"] .vf-search-dropdown { background: #1e293b; border-color: #334155; }
.vf-search-result {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--tr);
  text-decoration: none !important;
  color: var(--g9) !important;
}
.vf-search-result:hover { background: var(--g1); }
[data-theme="dark"] .vf-search-result:hover { background: #263348; }
.vf-search-result-img { width:44px; height:36px; border-radius:6px; object-fit:cover; background:var(--g1); flex-shrink:0; }
.vf-search-result-info { flex:1; min-width:0; }
.vf-search-result-titre { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vf-search-result-meta { font-size:12px; color:var(--g5); display:flex; gap:8px; margin-top:2px; }
.vf-search-result-prix { font-family:var(--fh); font-size:14px; font-weight:800; color:var(--p); flex-shrink:0; }
.vf-search-section-label { padding:6px 14px; font-size:11px; font-weight:700; color:var(--g5); text-transform:uppercase; letter-spacing:.5px; background:var(--g1); }
[data-theme="dark"] .vf-search-section-label { background: #263348; }
.vf-search-voir-tout { display:block; padding:10px 14px; text-align:center; font-size:13px; font-weight:600; color:var(--p)!important; text-decoration:none!important; border-top:1px solid var(--g1); transition:var(--tr); }
.vf-search-voir-tout:hover { background:var(--pl); }
[data-theme="dark"] .vf-search-voir-tout { border-top-color: #334155; }

/* ============================================================
   BADGES IA
   ============================================================ */
.vf-ia-badge-prix { display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:100px; font-size:12px; font-weight:700; }
.vf-badge-bonne-affaire { background:#dcfce7; color:#16a34a; }
.vf-badge-prix-juste    { background:#eff6ff; color:#2563eb; }
.vf-badge-prix-eleve    { background:#fef9c3; color:#ca8a04; }
.vf-prix-estimation     { font-size:12px; color:var(--g5); margin-top:4px; display:flex; align-items:center; gap:4px; }

/* ============================================================
   COMPARATEUR
   ============================================================ */
.vf-compare-bar {
  position:fixed; bottom:0; left:0; right:0;
  background:#fff;
  border-top:2px solid var(--p);
  box-shadow:0 -4px 24px rgba(0,0,0,.12);
  z-index:500; padding:12px 0;
  transform:translateY(100%);
  transition:transform .3s ease;
}
.vf-compare-bar.visible { transform:translateY(0); }
.vf-compare-items { display:flex; align-items:center; gap:12px; }
.vf-compare-item { display:flex; align-items:center; gap:8px; padding:8px 12px; background:var(--g1); border-radius:10px; font-size:13px; font-weight:600; position:relative; }
.vf-compare-item img { width:36px; height:28px; border-radius:6px; object-fit:cover; }
.vf-compare-remove { background:none; border:none; color:var(--g5); cursor:pointer; font-size:16px; line-height:1; padding:0; }
.vf-compare-slot { width:100px; height:44px; border:2px dashed var(--g3); border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--g5); }
.vf-compare-table { width:100%; border-collapse:collapse; background:#fff; border-radius:var(--r); overflow:hidden; box-shadow:var(--sh); }
.vf-compare-table th { background:var(--g1); padding:16px; text-align:center; font-size:14px; font-weight:700; border-bottom:2px solid var(--g3); }
.vf-compare-table th:first-child { text-align:left; width:140px; }
.vf-compare-table td { padding:14px 16px; border-bottom:1px solid var(--g1); text-align:center; font-size:14px; vertical-align:middle; }
.vf-compare-table td:first-child { font-weight:700; font-size:12px; color:var(--g5); text-transform:uppercase; letter-spacing:.4px; text-align:left; background:var(--g1); }
.vf-compare-table tr:last-child td { border-bottom:none; }
.vf-compare-best { color:#16a34a; font-weight:700; }
.vf-compare-worst { color:#ef4444; }
.vf-compare-img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:8px; margin-bottom:8px; }

/* ============================================================
   PROFIL VENDEUR ENRICHI
   ============================================================ */
.vf-vendor-score { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:16px 0; }
.vf-vendor-score-item { text-align:center; padding:12px 8px; background:var(--g1); border-radius:10px; transition:var(--tr); }
.vf-vendor-score-item:hover { background:var(--pl); }
.vf-vendor-score-num { font-family:var(--fh); font-size:20px; font-weight:900; color:var(--g9); display:block; }
.vf-vendor-score-label { font-size:11px; color:var(--g5); margin-top:2px; }
.vf-response-badge { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:100px; font-size:12px; font-weight:600; }
.vf-response-fast   { background:#dcfce7; color:#16a34a; }
.vf-response-medium { background:#fef9c3; color:#ca8a04; }
.vf-response-slow   { background:#fee2e2; color:#dc2626; }
.vf-trust-score { display:flex; align-items:center; gap:8px; padding:12px 16px; border-radius:10px; font-size:13px; font-weight:600; margin-bottom:12px; }
.vf-trust-high { background:#dcfce7; color:#15803d; }
.vf-trust-med  { background:#fef9c3; color:#ca8a04; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:768px) {
  .vf-hero-float-card { display: none !important; }
  .vf-nearby-prompt-inner { padding: 28px 20px; }
  .vf-cta-banner { padding: 40px 20px; }
}

/* ── Recherche vocale - hero ─────────────────────────────── */
.vf-hero-voice-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,.85);
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .18s; flex-shrink: 0;
}
.vf-hero-voice-btn:hover { background: rgba(255,255,255,.28); color: #fff; }
.vf-hero-voice-btn.listening {
  background: rgba(239,68,68,.9);
  color: #fff;
  animation: vf-mic-pulse 1s ease-in-out infinite;
}











/* ============================================================
   vends.fr - Assistant IA Acheteur
   À ajouter dans assets/css/ameliorations.css
   ============================================================ */

/* --- Conteneur principal --- */
.vf-ia-assistant {
  background: #fff;
  border: 1.5px solid #e0e7ff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(99,102,241,.08);
  overflow: hidden;
}

/* --- En-tête cliquable --- */
.vf-ia-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
  transition: background .2s;
}
.vf-ia-header:hover { background: linear-gradient(135deg, #ede9fe 0%, #dbeafe 100%); }

.vf-ia-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.vf-ia-chevron {
  color: var(--g5);
  font-size: 14px;
  transition: transform .25s ease;
}

/* --- Corps du chat --- */
.vf-ia-body {
  padding: 12px 14px 14px;
  border-top: 1px solid #e0e7ff;
}

/* --- Suggestions rapides --- */
.vf-ia-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.vf-ia-chip {
  background: #f5f3ff;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.vf-ia-chip:hover {
  background: #ede9fe;
  transform: translateY(-1px);
}

/* --- Zone messages --- */
.vf-ia-messages {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  scroll-behavior: smooth;
}
.vf-ia-messages:empty { display: none; }

.vf-ia-msg {
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 90%;
  word-break: break-word;
}
.vf-ia-msg-user {
  background: #6366f1;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.vf-ia-msg-assistant {
  background: #f5f3ff;
  color: #1e1b4b;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid #e0e7ff;
}

/* --- Typing indicator --- */
.vf-ia-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
}
.vf-ia-typing span {
  width: 6px;
  height: 6px;
  background: #6366f1;
  border-radius: 50%;
  display: inline-block;
  animation: vf-ia-bounce .9s infinite ease-in-out;
}
.vf-ia-typing span:nth-child(2) { animation-delay: .15s; }
.vf-ia-typing span:nth-child(3) { animation-delay: .30s; }
@keyframes vf-ia-bounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .5; }
  40%           { transform: scale(1);  opacity: 1;   }
}

/* --- Input row --- */
.vf-ia-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.vf-ia-input {
  flex: 1;
  border: 1.5px solid #e0e7ff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  background: #fafafa;
  transition: border-color .2s;
}
.vf-ia-input:focus {
  border-color: #6366f1;
  background: #fff;
}
.vf-ia-input:disabled { opacity: .6; cursor: not-allowed; }

.vf-ia-send {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .2s, transform .1s;
}
.vf-ia-send:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.vf-ia-send:disabled { opacity: .5; cursor: not-allowed; }

/* Responsive */
@media (max-width: 576px) {
  .vf-ia-chip { font-size: 10px; padding: 4px 10px; }
  .vf-ia-messages { max-height: 200px; }
}
/* ── Correctifs dark mode - description annonce & orbit card ── */
[data-theme="dark"] .vf-annonce-desc        { color: #cbd5e1 !important; background: transparent !important; }
[data-theme="dark"] .vf-annonce-desc p,
[data-theme="dark"] .vf-annonce-desc li,
[data-theme="dark"] .vf-annonce-desc span   { color: #cbd5e1 !important; }
[data-theme="dark"] .vf-detail-label        { color: #94a3b8 !important; }
[data-theme="dark"] .vf-detail-value        { color: #e2e8f0 !important; }

/* Orbit cards (hero home) */
[data-theme="dark"] .vf-orbit-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.4) !important;
}

/* Sections description fond blanc forcé à corriger */
[data-theme="dark"] .vf-annonce-section     { background: #1e293b !important; color: #e2e8f0 !important; }
[data-theme="dark"] .vf-annonce-section *   { color: #cbd5e1; }
[data-theme="dark"] .vf-contact-card *,
[data-theme="dark"] .vf-seller-card *       { color: #e2e8f0; }

/* ── vf-annonce-section (description + détails) ── */
.vf-annonce-section {
  background: #fff;
}
[data-theme="dark"] .vf-annonce-section {
  background: #1e293b !important;
}
[data-theme="dark"] .vf-annonce-section h5,
[data-theme="dark"] .vf-annonce-section .fw-bold { color: #f1f5f9; }
[data-theme="dark"] .vf-rich-desc               { color: #cbd5e1; }
[data-theme="dark"] .vf-rich-desc h2,
[data-theme="dark"] .vf-rich-desc h3            { color: #e2e8f0; }
[data-theme="dark"] .vf-rich-desc a             { color: #a5b4fc; }

/* ═══════════════════════════════════════════════════════════
   IMPRESSION - @media print
   Masque la nav, sidebar, boutons ; met en valeur l'annonce
   ═══════════════════════════════════════════════════════════ */
@media print {
  /* Masquer tout ce qui ne sert pas à l'impression */
  .vf-nav,
  .vf-footer,
  .vf-contact-card,
  .vf-nearby-section,
  #negBlock,
  #negVendeurBlock,
  #offreModal,
  #contreModal,
  .vf-ia-assistant,
  .vf-btn-primary,
  .vf-btn-ghost,
  .vf-share-row,
  .d-flex.gap-2.mb-3.mt-1,  /* boutons partage */
  .vf-gallery-nav,
  .vf-gallery-thumbs,
  nav, footer,
  [onclick],
  button { display: none !important; }

  /* Reset page */
  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 12pt;
    margin: 0;
    padding: 0;
  }

  /* Conteneur principal */
  .container { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }

  /* En-tête impression */
  .vf-print-header {
    display: block !important;
    border-bottom: 2px solid #6366f1;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }

  /* Photo principale */
  .vf-gallery-main img,
  .vf-gallery-main {
    width: 100% !important;
    max-height: 320px !important;
    object-fit: contain !important;
    page-break-inside: avoid;
  }

  /* Titre & prix */
  .vf-annonce-title { font-size: 20pt !important; color: #111 !important; }
  .vf-annonce-price { font-size: 18pt !important; color: #6366f1 !important; }

  /* Description & détails */
  .vf-annonce-section,
  .vf-rich-desc,
  .vf-detail-grid {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    border: 1px solid #e5e7eb !important;
    page-break-inside: avoid;
  }
  .vf-detail-label { color: #6b7280 !important; }
  .vf-detail-value { color: #111 !important; }

  /* URL en bas */
  body::after {
    content: "vends.fr - " attr(data-print-url);
    display: block;
    text-align: center;
    font-size: 9pt;
    color: #9ca3af;
    margin-top: 20px;
    border-top: 1px solid #e5e7eb;
    padding-top: 8px;
  }

  /* Forcer les liens à afficher leur URL */
  a[href]::after { content: none; }

  /* Layout 2 colonnes → 1 colonne */
  .row { display: block !important; }
  .col-lg-4, .col-lg-8, .col-md-4, .col-md-8,
  [class*="col-"] { width: 100% !important; max-width: 100% !important; }
}

/* Élément visible uniquement à l'impression (logo + URL) */
.vf-print-header { display: none; }

/* ── Assistant IA - améliorations ── */
.vf-ia-welcome {
  background: linear-gradient(135deg, #f5f3ff, #eff6ff);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .35s ease, transform .35s ease;
}
.vf-ia-welcome--visible {
  opacity: 1;
  transform: none;
}
.vf-ia-welcome-text {
  font-size: 13px;
  color: #4338ca;
  line-height: 1.5;
}

/* Gras dans les messages assistant */
.vf-ia-msg-assistant strong { color: #3730a3; }
.vf-ia-msg-assistant ul     { font-size: 13px; color: #1e1b4b; }

/* Dark mode assistant */
[data-theme="dark"] .vf-ia-assistant {
  background: #1e293b;
  border-color: #334155;
}
[data-theme="dark"] .vf-ia-header {
  background: linear-gradient(135deg, #1e1b4b, #172554);
}
[data-theme="dark"] .vf-ia-header:hover {
  background: linear-gradient(135deg, #2e2766, #1e3a5f);
}
[data-theme="dark"] .vf-ia-header .vf-ia-chevron { color: #94a3b8; }
[data-theme="dark"] .vf-ia-body {
  border-top-color: #334155;
}
[data-theme="dark"] .vf-ia-welcome {
  background: linear-gradient(135deg, #1e1b4b, #172554);
}
[data-theme="dark"] .vf-ia-welcome-text { color: #a5b4fc; }
[data-theme="dark"] .vf-ia-chip {
  background: #1e1b4b;
  color: #a5b4fc;
  border-color: #312e81;
}
[data-theme="dark"] .vf-ia-chip:hover { background: #2e2766; }
[data-theme="dark"] .vf-ia-msg-assistant {
  background: #1e1b4b;
  color: #e2e8f0;
  border-color: #312e81;
}
[data-theme="dark"] .vf-ia-msg-assistant strong { color: #c4b5fd; }
[data-theme="dark"] .vf-ia-msg-assistant ul     { color: #e2e8f0; }
[data-theme="dark"] .vf-ia-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
[data-theme="dark"] .vf-ia-input:focus { border-color: #6366f1; }
[data-theme="dark"] .vf-ia-input::placeholder { color: #64748b; }

/* ============================================================
   LANDING PAGES SEO - Catégories enrichies + Explorer par ville
   ============================================================ */

/* Grille catégories enrichie (remplace .vf-cats) */
.vf-cats-landing {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.vf-cat-landing-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.vf-cat-landing-card:hover {
  box-shadow: 0 6px 24px rgba(99,102,241,.12);
  transform: translateY(-2px);
}

.vf-cat-landing-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--g9);
  transition: background .15s;
}
.vf-cat-landing-main:hover { background: var(--pl, #f0f0ff); color: var(--g9); }
.vf-cat-landing-main .vf-cat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.vf-cat-landing-main .vf-cat-name { font-weight: 700; font-size: 14px; }
.vf-cat-landing-main .vf-cat-count { font-size: 12px; color: var(--g5); margin-top: 1px; }

/* Pastilles villes sous chaque catégorie */
.vf-cat-landing-villes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 14px;
  border-top: 1px solid rgba(0,0,0,.04);
  padding-top: 10px;
}
.vf-cat-landing-ville {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--g1, #f3f4f6);
  font-size: 12px;
  color: var(--g7);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.vf-cat-landing-ville:hover {
  background: var(--pl, #eef2ff);
  color: var(--p, #6366f1);
}
.vf-cat-landing-ville-nb {
  font-size: 10px;
  font-weight: 700;
  color: var(--g4);
  margin-left: 2px;
}

/* Section Explorer par ville */
.vf-villes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.vf-ville-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  padding: 16px 14px 12px;
  text-decoration: none;
  color: var(--g9);
  display: block;
  transition: box-shadow .2s, transform .2s;
  animation: vf-card-in .4s cubic-bezier(.16,1,.3,1) both;
}
.vf-ville-card:hover {
  box-shadow: 0 6px 20px rgba(99,102,241,.13);
  transform: translateY(-3px);
  color: var(--g9);
}
.vf-ville-card-inner { margin-bottom: 10px; }
.vf-ville-name { font-weight: 700; font-size: 15px; }
.vf-ville-nb { font-size: 12px; color: var(--g5); margin-top: 2px; }

.vf-ville-cats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.vf-ville-cat-chip {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  text-decoration: none;
  transition: transform .15s;
}
.vf-ville-cat-chip:hover { transform: scale(1.15); }

/* Dark mode */
[data-theme="dark"] .vf-cat-landing-card,
[data-theme="dark"] .vf-ville-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .vf-cat-landing-main:hover { background: #1e1b4b; }
[data-theme="dark"] .vf-cat-landing-villes { border-top-color: #334155; }
[data-theme="dark"] .vf-cat-landing-ville { background: #0f172a; color: #94a3b8; }
[data-theme="dark"] .vf-cat-landing-ville:hover { background: #1e1b4b; color: #a5b4fc; }
