/* ==========================================================
   STYLE VENTES V2 — Cohérent avec style_index_v2.css
   idf-immobilier.com — Accent VERT pour les ventes
   ========================================================== */

/* ===================== VARIABLES ===================== */
:root {
  --bleu: #0064E0;
  --bleu-clair: #e8f1fd;
  --vert: #00A86B;
  --vert-clair: #e0f8ed;
  --rouge: #E63946;
  --violet: #7c3aed;
  --orange: #FF8C00;
  
  --noir: #1a1a2e;
  --gris-900: #2d2d3f;
  --gris-700: #555;
  --gris-500: #888;
  --gris-300: #ccc;
  --gris-100: #f0f2f5;
  --blanc: #ffffff;
  
  --ombre-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --ombre-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --ombre-lg: 0 8px 30px rgba(0, 0, 0, 0.10);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 50px;
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================== BASE ===================== */
body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--gris-100) 0%, #e8ecf1 100%);
  color: var(--gris-900);
  min-height: 100vh;
}

/* ===================== HEADER ===================== */
.main-header {
  background: var(--blanc) !important;
  border-bottom: 3px solid var(--bleu) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  backdrop-filter: blur(10px);
}

.logo-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -1px;
  color: var(--noir);
  line-height: 1.2;
}

.text-accent {
  color: var(--orange);
}

.logo-slogan {
  font-size: 10px;
  color: var(--gris-500);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ===================== BOUTONS HEADER SOBRES ===================== */
/* ===== BOUTON DE BASE ===== */
.hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  line-height: 1.2;
  cursor: pointer;
  background: var(--blanc);
  color: var(--gris-700);
  border: 1px solid var(--gris-300);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.hdr-btn i {
  font-size: 15px;
  color: var(--gris-500);
  transition: color 0.25s ease;
}

/* Compteur (pastille) */
.hdr-count {
  background: var(--gris-100);
  color: var(--gris-500);
  padding: 1px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  transition: all 0.25s ease;
}

/* ===== HOVER PAR RUBRIQUE ===== */
.hdr-loc:hover { border-color: #0064E0; color: #0064E0; background: #f0f6ff; }
.hdr-loc:hover i { color: #0064E0; }
.hdr-loc:hover .hdr-count { background: #dbeafe; color: #0064E0; }

.hdr-ven:hover { border-color: #059669; color: #059669; background: #ecfdf5; }
.hdr-ven:hover i { color: #059669; }
.hdr-ven:hover .hdr-count { background: #d1fae5; color: #059669; }

.hdr-publier { color: #dc2626; border-color: #fca5a5; background: var(--blanc); }
.hdr-publier i { color: #dc2626; }
.hdr-publier:hover { border-color: #dc2626; color: #dc2626; background: #fef2f2; }
.hdr-publier:hover i { color: #dc2626; }

.hdr-pro:hover { border-color: #7c3aed; color: #7c3aed; background: #f5f3ff; }
.hdr-pro:hover i { color: #7c3aed; }

.hdr-annuaire:hover { border-color: #7c3aed; color: #7c3aed; background: #f5f3ff; }
.hdr-annuaire:hover i { color: #7c3aed; }

/* ===== GROUPES GAUCHE / DROITE ===== */
.nav-group-left,
.nav-group-right {
  flex-shrink: 1;
}

/* ===== FIX DESKTOP — SPLIT GAUCHE/DROITE ===== */
@media (min-width: 992px) {
  .navbar-nav {
    display: flex !important;
    width: 100%;
  }
  .nav-group-right {
    margin-left: auto !important;
  }
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--blanc);
    padding: 16px 20px;
    border-top: 1px solid var(--gris-100);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
  }
  .navbar-nav { gap: 0 !important; }
  .nav-group-left,
  .nav-group-right {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .nav-group-left {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--gris-100);
  }
  .hdr-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 10px;
  }
  .hdr-count { margin-left: auto; }
}

/* ===================== BREADCRUMB ===================== */
.breadcrumb-custom {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
}
.breadcrumb-custom li a { color: var(--vert); text-decoration: none; font-weight: 500; }
.breadcrumb-custom li a:hover { text-decoration: underline; }
.breadcrumb-custom li.active { color: var(--gris-500); }
.breadcrumb-custom li + li::before { content: '›'; margin-right: 8px; color: var(--gris-300); }

/* ===================== PAGE HEADER ===================== */
.page-header-block {
  background: linear-gradient(135deg, #d1f5e4 0%, #e0f8ed 50%, #ddf3e8 100%);
  border-radius: var(--radius-md);
  padding: 30px 35px;
  box-shadow: var(--ombre-sm);
  border-left: 5px solid var(--vert);
}
.page-header-block h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--noir);
  margin-bottom: 8px;
}
.page-header-block p { color: var(--gris-700); margin: 0; font-size: 0.95rem; }

/* ===================== SECTION TITLE ===================== */
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--vert);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title-icon { font-size: 1.4rem; }

/* ===================== FILTRES ===================== */
.filters-box {
  background: var(--blanc);
  border-radius: var(--radius-md);
  padding: 20px 25px;
  box-shadow: var(--ombre-md);
  margin-bottom: 25px;
  border: 1px solid rgba(0, 168, 107, 0.08);
}
.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.filters-header h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--vert);
}
.filters-header h5 i { margin-right: 6px; }

.btn-toggle-filters {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  border: 2px solid var(--vert);
  background: transparent;
  color: var(--vert);
  cursor: pointer;
  transition: var(--transition);
}
.btn-toggle-filters.is-active,
.btn-toggle-filters:hover { background: var(--vert); color: var(--blanc); }

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  background: linear-gradient(135deg, #E63946, #ff4d5e);
  color: var(--blanc);
  text-decoration: none;
  transition: var(--transition);
}
.btn-reset:hover { color: var(--blanc); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(230, 57, 70, 0.3); }

.btn-reset-mobile {
  display: inline-block;
  padding: 10px 30px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(135deg, #E63946, #ff4d5e);
  color: var(--blanc);
  text-decoration: none;
}

.filters-body {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  padding-top: 15px;
  border-top: 1px solid var(--gris-100);
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--gris-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  border: 1.5px solid var(--vert);
  background: transparent;
  color: var(--vert);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.filter-chip:hover { background: rgba(0, 168, 107, 0.08); color: var(--vert); text-decoration: none; }
.filter-chip.active {
  background: linear-gradient(135deg, #00A86B, #00c47d);
  color: var(--blanc);
  border-color: var(--vert);
  box-shadow: 0 2px 8px rgba(0, 168, 107, 0.25);
}

/* ===================== RESULTS HEADER ===================== */
.results-header {
  background: linear-gradient(135deg, #00A86B, #008c59);
  color: var(--blanc);
  padding: 14px 20px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}
.results-header i { margin-right: 8px; }
.results-sort-info { font-size: 0.8rem; font-weight: 500; font-style: italic; opacity: 0.85; }

/* ===================== TABLE ===================== */
.table-card {
  background: var(--blanc);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--ombre-md);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-top: none;
}
.table { font-size: 13px; margin-bottom: 0; }
.table thead th {
  background: linear-gradient(180deg, #f8fafc, #f0f8f4);
  color: var(--gris-700);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  border-bottom: 2px solid var(--vert);
  padding: 12px 10px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.table tbody td {
  padding: 11px 10px;
  vertical-align: middle;
  color: var(--gris-700);
  border-bottom: 1px solid var(--gris-100);
}
.table tbody tr:hover { background-color: #e0f8ed !important; }
.visited-row { background-color: #d8f3e6 !important; }

/* ===================== BADGES DPE ===================== */
.badge-dpe { font-weight: bold; color: #000; padding: 4px 9px; border-radius: 6px; min-width: 30px; display: inline-block; text-align: center; font-size: 12px; }
.dpe-A { background-color: #008000; color: white !important; }
.dpe-B { background-color: #3cb371; }
.dpe-C { background-color: #9acd32; }
.dpe-D { background-color: #ffd700; }
.dpe-E { background-color: #ffa500; }
.dpe-F { background-color: #ff4500; color: white !important; }
.dpe-G { background-color: #8b0000; color: white !important; }
.dpe-NC { background-color: #ccc; }

/* ===================== PHOTO COUNT ===================== */
.photo-count { color: var(--vert); font-weight: 600; }

/* ===================== BOUTON VOIR ===================== */
.btn-voir {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  border: 1.5px solid var(--vert);
  color: var(--vert);
  text-decoration: none;
  transition: var(--transition);
}
.btn-voir:hover { background: var(--vert); color: var(--blanc); text-decoration: none; }

/* ===================== CARDS MOBILE ===================== */
.card-annonce {
  background: var(--blanc);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 5px solid var(--vert);
  border-radius: var(--radius-sm);
  margin-bottom: 15px;
  padding: 18px;
  box-shadow: var(--ombre-sm);
}
.card-annonce-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--vert);
}
.card-annonce-date { font-size: 0.8rem; color: var(--gris-500); }
.card-annonce-prix { font-size: 1.3rem; color: var(--rouge); font-family: var(--font-display); font-weight: 800; }
.card-annonce-body .info-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--gris-100);
  font-size: 0.85rem;
}
.card-annonce-body .info-line .label { color: var(--gris-500); font-weight: 500; }
.card-annonce-body .info-line .value { font-weight: 600; color: var(--gris-900); }
.card-annonce-cta {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #00A86B, #00c47d);
  color: var(--blanc);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition);
}
.card-annonce-cta:hover { color: var(--blanc); box-shadow: 0 4px 15px rgba(0, 168, 107, 0.35); }
.empty-state { background: var(--blanc); border-radius: var(--radius-sm); box-shadow: var(--ombre-sm); }

/* ===================== SEO SECTION ===================== */
.seo-section {
  background: linear-gradient(135deg, #d1f5e4 0%, #e0f8ed 50%, #fff8f0 100%);
  border-radius: var(--radius-md);
  padding: 30px 35px;
  box-shadow: var(--ombre-sm);
  border-left: 5px solid var(--vert);
}
.seo-section h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--vert); margin-bottom: 12px; }
.seo-section h2 i { margin-right: 6px; }
.seo-section p { color: var(--gris-700); line-height: 1.7; margin-bottom: 8px; }
.seo-section .small-text { font-size: 0.85rem; color: var(--gris-500); }

/* ===================== PAGINATION ===================== */
.pagination-custom { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0; }
.pagination-custom li a {
  display: inline-flex; align-items: center; gap: 5px; padding: 10px 18px;
  border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: 700; font-size: 13px;
  background: var(--blanc); color: var(--vert); border: 1.5px solid var(--vert); text-decoration: none; transition: var(--transition);
}
.pagination-custom li a:hover { background: var(--vert); color: var(--blanc); text-decoration: none; }
.pagination-custom li.current {
  padding: 10px 18px; border-radius: var(--radius-sm); font-family: var(--font-display);
  font-weight: 800; font-size: 13px; background: linear-gradient(135deg, #00A86B, #008c59); color: var(--blanc);
}
.pagination-custom li.disabled a { opacity: 0.4; pointer-events: none; cursor: default; }

/* ===================== FOOTER ===================== */
.footer-dark { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #e0e0e0; }
.footer-dark h5 { font-family: var(--font-display); font-weight: 700; color: var(--blanc); margin-bottom: 18px; }
.footer-dark p, .footer-dark li { color: #adb5bd; }
.footer-dark a { color: #e0e0e0; text-decoration: none; transition: var(--transition); }
.footer-dark a:hover { color: var(--orange) !important; }
.footer-links li { margin-bottom: 8px; }
.footer-hr { border-top: 1px solid #2d3a4f; margin: 20px 0; }

/* ===================== DESKTOP-ONLY ===================== */
.desktop-only { display: block; }
@media (max-width: 768px) { .desktop-only { display: none !important; } }

/* ===================== MOBILE GENERAL ===================== */
@media (max-width: 576px) {
  .page-header-block { padding: 20px; }
  .page-header-block h1 { font-size: 1.15rem; }
  .filters-box { padding: 15px; }
  .filters-body { gap: 12px; }
  .results-header { flex-direction: column; gap: 5px; text-align: center; }
  .footer-dark { text-align: center; }
  .footer-links li { margin-bottom: 10px; }
}

/* ==============================================
   FIX TABLE VENTES (isolation du style index)
   Le style_index_v2.css impose table-layout:fixed
   et des largeurs th:nth-child pour 7 colonnes.
   La page ventes a 10 colonnes → on override ici.
   ============================================== */
.page-ventes .table {
  table-layout: auto !important;
}

.page-ventes .table thead th,
.page-ventes .table tbody td {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* Réinitialiser les largeurs fixes du style_index_v2 */
.page-ventes .table th:nth-child(1),
.page-ventes .table th:nth-child(2),
.page-ventes .table th:nth-child(3),
.page-ventes .table th:nth-child(4),
.page-ventes .table th:nth-child(5),
.page-ventes .table th:nth-child(6),
.page-ventes .table th:nth-child(7) {
  width: auto !important;
}

/* Assurer que le bouton Voir reste visible */
.page-ventes .table td:last-child {
  min-width: 80px;
}