/* ===== BOUTON FAVORI (coeur sur les cartes) ===== */
.btn-favori {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
  color: var(--mist);
  transition: transform var(--t), box-shadow var(--t), color var(--t);
}
.btn-favori:hover { transform: scale(1.15); box-shadow: 0 3px 10px rgba(0,0,0,0.2); }
.btn-favori.active { color: var(--crimson); }

/* ===== ANNONCES PAGE ===== */
.annonces-page { padding: 28px 0 56px; }

.search-bar-top {
  background: var(--white); border-radius: var(--r);
  padding: 16px 20px; margin-bottom: 20px;
  border: 1.5px solid var(--cloud);
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.search-bar-top .form-input { flex: 2; min-width: 200px; margin: 0; }
.search-bar-top .form-input.ville { flex: 1; min-width: 150px; }

.annonces-layout { display: grid; grid-template-columns: 252px 1fr; gap: 20px; align-items: start; }

/* ===== FILTERS SIDEBAR ===== */
.filters-sidebar {
  background: var(--white); border-radius: var(--r);
  padding: 20px; border: 1.5px solid var(--cloud);
  box-shadow: var(--sh-xs);
  position: sticky; top: 80px;
}
.filters-title {
  font-size: 13px; font-weight: 800; margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--cloud);
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Manrope', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.7px; color: var(--ink);
}
.filters-reset {
  font-size: 11.5px; color: var(--cobalt); cursor: pointer; font-weight: 700;
  text-transform: none; letter-spacing: 0;
}
.filters-reset:hover { text-decoration: underline; }

.filter-group {
  margin-bottom: 20px; padding-bottom: 20px;
  border-bottom: 1px solid var(--cloud);
}
.filter-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.filter-group-title {
  font-size: 10px; font-weight: 800; color: var(--mist);
  text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 12px;
  font-family: 'Manrope', system-ui, sans-serif;
}

.filter-option {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 13.5px; font-weight: 500; transition: background var(--t); user-select: none;
}
.filter-option:hover { background: var(--fog); }
.filter-option input[type=radio],
.filter-option input[type=checkbox] {
  accent-color: var(--cobalt); width: 15px; height: 15px; cursor: pointer;
}
/* SVG icons in filter list labels */
.filter-option svg { vertical-align: middle; flex-shrink: 0; color: var(--mist); }

/* Prix range — prevent overflow in narrow sidebar */
.filter-option .count { color: var(--mist); font-size: 11.5px; margin-left: auto; }

.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-range input {
  width: 100%; min-width: 0;
  padding: 8px 8px; border: 1.5px solid var(--cloud); border-radius: var(--r-sm);
  font-size: 12.5px; outline: none; font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ink); background: var(--white);
  transition: border-color var(--t);
  /* Hide number spinner arrows to save space */
  -moz-appearance: textfield;
}
.price-range input::-webkit-outer-spin-button,
.price-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-range input:focus { border-color: var(--cobalt); }

/* ===== RESULTS ===== */
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.results-count { font-size: 14px; color: var(--mist); font-weight: 500; }
.results-count strong { color: var(--ink); font-weight: 700; }

.sort-select {
  padding: 7px 12px; border: 1.5px solid var(--cloud); border-radius: var(--r-sm);
  font-size: 13.5px; outline: none; cursor: pointer;
  background: var(--white); color: var(--ink);
  transition: border-color var(--t);
  font-family: 'Manrope', system-ui, sans-serif; font-weight: 600;
}
.sort-select:focus { border-color: var(--cobalt); }

/* Active filter chips */
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--night); color: var(--white);
  padding: 5px 11px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background var(--t);
  font-family: 'Manrope', system-ui, sans-serif; letter-spacing: 0.2px;
}
.filter-chip:hover { background: var(--night-2); }
.filter-chip svg { flex-shrink: 0; }

/* Mobile filters toggle */
.mobile-filters-btn {
  display: none; align-items: center; gap: 6px;
  background: var(--white); border: 1.5px solid var(--cloud);
  padding: 8px 16px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  font-family: 'Manrope', system-ui, sans-serif; color: var(--ink);
}

/* ===== LIST ITEM VIEW ===== */
.annonce-list-item {
  background: var(--white); border-radius: var(--r);
  display: flex; overflow: hidden;
  border: 1.5px solid var(--cloud);
  box-shadow: var(--sh-xs);
  margin-bottom: 10px;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.annonce-list-item:hover {
  border-color: var(--cobalt);
  box-shadow: var(--sh-sm);
  transform: translateY(-1px);
}
.list-item-img {
  width: 176px; min-height: 136px; flex-shrink: 0;
  position: relative; background: var(--fog); overflow: hidden;
}
.list-item-img img { width: 100%; height: 100%; object-fit: cover; }
.list-item-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.list-item-titre {
  font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.3;
  font-family: 'Manrope', system-ui, sans-serif;
}
.list-item-prix {
  font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -0.4px;
}
.list-item-meta {
  display: flex; gap: 14px; font-size: 12.5px;
  color: var(--mist); margin-top: auto; flex-wrap: wrap; font-weight: 500;
}
.list-item-desc {
  font-size: 13.5px; color: var(--mist); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== ANNONCE DETAIL ===== */
.annonce-detail-layout {
  display: grid; grid-template-columns: 1fr 330px; gap: 24px;
  align-items: start;
}

/* Gallery */
.gallery {
  border-radius: var(--r); overflow: hidden;
  background: var(--ink); margin-bottom: 16px;
}
.gallery-main { width: 100%; aspect-ratio: 4/3; object-fit: cover; cursor: pointer; }
.gallery-main-placeholder {
  width: 100%; aspect-ratio: 4/3; display: flex;
  align-items: center; justify-content: center; font-size: 56px;
  background: var(--fog); color: var(--cloud);
}
.gallery-thumbs {
  display: flex; gap: 6px; padding: 8px;
  background: var(--white); flex-wrap: wrap;
  border-top: 1px solid var(--cloud);
}
.gallery-thumb {
  width: 70px; height: 52px; object-fit: cover;
  border-radius: var(--r-sm); cursor: pointer; opacity: .55;
  transition: opacity var(--t); border: 2px solid transparent;
}
.gallery-thumb.active, .gallery-thumb:hover {
  opacity: 1; border-color: var(--cobalt);
}

.annonce-title-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px; margin-bottom: 6px;
}
.annonce-detail-title {
  font-size: 22px; font-weight: 800; line-height: 1.25;
  font-family: 'Manrope', system-ui, sans-serif; letter-spacing: -0.3px;
}
.annonce-detail-prix {
  font-size: 30px; font-weight: 700; color: var(--ink);
  margin-bottom: 12px; letter-spacing: -0.8px;
}
.annonce-detail-meta {
  display: flex; gap: 14px; font-size: 12.5px;
  color: var(--mist); margin-bottom: 20px; flex-wrap: wrap; font-weight: 500;
}
.annonce-detail-meta span { display: flex; align-items: center; gap: 4px; }

.annonce-section {
  background: var(--white); border-radius: var(--r);
  padding: 20px 22px; margin-bottom: 12px;
  border: 1.5px solid var(--cloud);
}
.annonce-section-title {
  font-size: 10px; font-weight: 800; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--cloud);
  font-family: 'Manrope', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 1.2px; color: var(--mist);
}

/* Criteria table */
.criteria-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.criteria-item label {
  font-size: 10.5px; color: var(--mist); display: block;
  font-family: 'Manrope', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 3px;
}
.criteria-item span { font-size: 14px; font-weight: 600; color: var(--ink); }

/* Seller card */
.seller-card {
  background: var(--white); border-radius: var(--r);
  padding: 22px; border: 1.5px solid var(--cloud);
  box-shadow: var(--sh-xs);
  position: sticky; top: 80px;
}
.seller-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.avatar-lg {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--night); color: var(--white);
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: 'Manrope', system-ui, sans-serif;
}
.seller-name { font-size: 15.5px; font-weight: 700; font-family: 'Manrope', system-ui, sans-serif; color: var(--ink); }
.seller-since { font-size: 12px; color: var(--mist); font-weight: 500; margin-top: 2px; }

/* Classes for seller card inline elements (replaces hardcoded inline styles) */
.seller-profile-link {
  font-size: 12.5px; color: var(--cobalt); font-weight: 600;
  display: inline-block; margin-top: 4px;
}
.seller-profile-link:hover { text-decoration: underline; }

.seller-owns-badge {
  padding: 11px 14px; background: var(--cobalt-l);
  border-radius: var(--r-sm); font-size: 13px; color: var(--cobalt);
  font-weight: 700; text-align: center; margin-bottom: 12px;
  border: 1px solid oklch(82% 0.12 236);
}

.seller-safety-tip {
  margin-top: 16px; padding: 14px;
  background: var(--fog); border-radius: var(--r-sm);
  font-size: 12.5px; color: var(--mist); line-height: 1.55;
}
.seller-safety-tip strong {
  display: block; margin-bottom: 4px; color: var(--ink); font-weight: 700;
}

.seller-location {
  margin-top: 10px; padding: 16px 18px;
  background: var(--white); border-radius: var(--r);
  border: 1.5px solid var(--cloud); box-shadow: var(--sh-xs);
}
.seller-location-label {
  font-size: 11px; color: var(--mist); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700;
}
.seller-location-city { font-size: 15px; font-weight: 700; color: var(--ink); }
.seller-location-dept { font-size: 12.5px; color: var(--mist); margin-top: 2px; }

.annonce-cat-link { color: var(--cobalt); font-weight: 600; }
.annonce-cat-link:hover { text-decoration: underline; }

.contact-form { margin-top: 14px; }
.contact-form textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--cloud); border-radius: var(--r-sm);
  font-size: 13.5px; resize: vertical; min-height: 100px;
  font-family: 'Manrope', system-ui, sans-serif;
  transition: border-color var(--t), box-shadow var(--t); margin-bottom: 12px;
  color: var(--ink);
}
.contact-form textarea:focus {
  outline: none; border-color: var(--cobalt);
  box-shadow: 0 0 0 3px oklch(53% 0.27 236 / 0.12);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex; align-items: center; gap: 5px;
  justify-content: center; margin-top: 36px;
}
.page-btn {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  border: 1.5px solid var(--cloud);
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  background: var(--white); color: var(--slate);
  transition: all var(--t); display: flex; align-items: center; justify-content: center;
  font-family: 'Manrope', system-ui, sans-serif;
}
.page-btn:hover { border-color: var(--cobalt); color: var(--cobalt); background: var(--cobalt-l); }
.page-btn.active { background: var(--night); color: var(--white); border-color: var(--night); }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }

@media (max-width: 900px) {
  .annonces-layout { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; display: none; }
  .filters-sidebar.open { display: block; }
  .mobile-filters-btn { display: flex; }
  .annonce-detail-layout { grid-template-columns: 1fr; }
  .seller-card { position: static; }
  .list-item-img { width: 130px; }
}
@media (max-width: 600px) {
  .annonce-list-item { flex-direction: column; }
  .list-item-img { width: 100%; min-height: 200px; }
}
