/* ============================= */
/* VARIABLES GLOBALES            */
/* ============================= */
:root {
  --vert:        #2D7D5A;
  --vert-dark:   #1F6347;
  --vert-light:  #EDF6F1;
  --charcoal:    #222222;
  --slate:       #484848;
  --stone:       #717171;
  --mist:        #B0B0B0;
  --border:      #EBEBEB;
  --off-white:   #F7F7F7;
  --white:       #FFFFFF;
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-md:   0 6px 20px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg:   0 16px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --radius:      16px;
  --radius-sm:   10px;
  --radius-xl:   24px;
  --sidebar-w:   268px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--white);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================= */
/* NAVBAR                        */
/* ============================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 80px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-left a {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vert);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-right {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-link {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 50px;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

.nav-link:hover { background: var(--off-white); color: var(--charcoal); }

.btn-login {
  padding: 11px 22px;
  background: var(--charcoal);
  color: var(--white);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  transition: all 0.25s ease;
  margin-left: 6px;
}

.btn-login:hover {
  background: #000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

/* ============================= */
/* HERO                          */
/* ============================= */
.hero-explorer {
  min-height: 44vh;
  background: var(--white);
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-accent {
  position: absolute;
  bottom: 20px;
  right: 6%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,125,90,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-explorer-content {
  padding: 0 8%;
  max-width: 680px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vert);
  margin-bottom: 16px;
}

.hero-explorer h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--charcoal);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.hero-explorer h1 em {
  color: var(--vert);
  font-style: normal;
}

.hero-sub {
  color: var(--stone);
  font-size: 1rem;
  font-weight: 400;
  max-width: 460px;
  line-height: 1.8;
}

/* ============================= */
/* LAYOUT                        */
/* ============================= */
.explorer-layout {
  display: flex;
  align-items: flex-start;
  max-width: 1380px;
  margin: 0 auto;
  padding: 40px 40px 100px;
  gap: 32px;
}

/* ============================= */
/* SIDEBAR                       */
/* ============================= */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-inner {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px 22px 28px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}

.btn-reset {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--stone);
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.2s;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-reset:hover { color: var(--charcoal); }

.filter-group { margin-bottom: 24px; }

.filter-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.search-input-wrap { position: relative; }

.search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--stone);
  pointer-events: none;
}

.filter-input {
  width: 100%;
  padding: 11px 14px 11px 36px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--charcoal);
  transition: all 0.2s;
  outline: none;
}

.filter-input:focus {
  border-color: var(--vert);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(45, 125, 90, 0.08);
}

.filter-select {
  width: 100%;
  padding: 11px 36px 11px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--charcoal);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--vert);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(45, 125, 90, 0.08);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chips-loading {
  font-size: 0.8rem;
  color: var(--stone);
  font-weight: 400;
}

.chip {
  padding: 5px 13px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--slate);
  transition: all 0.2s ease;
  user-select: none;
}

.chip:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.chip.active {
  background: var(--charcoal);
  color: var(--white);
  border-color: var(--charcoal);
}

.price-range-wrap { display: flex; flex-direction: column; gap: 10px; }

.price-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.price-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  border: 2px solid var(--charcoal);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.15s;
}

.price-range::-webkit-slider-thumb:hover { transform: scale(1.15); }

.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--stone);
}

.prix-value { font-weight: 700; color: var(--charcoal); }

.btn-apply-mobile {
  display: none;
  width: 100%;
  padding: 14px;
  background: var(--vert);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(45,125,90,0.35);
}

.btn-apply-mobile:hover { background: var(--vert-dark); }

/* ============================= */
/* MAIN CONTENT                  */
/* ============================= */
.explorer-main { flex: 1; min-width: 0; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.results-count {
  font-size: 0.875rem;
  color: var(--stone);
  font-weight: 400;
  white-space: nowrap;
}

.results-count strong { color: var(--charcoal); font-weight: 700; }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 12px;
  background: var(--off-white);
  color: var(--charcoal);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
}

.filter-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--stone);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.filter-tag button:hover { color: var(--charcoal); }

.sort-select {
  padding: 9px 32px 9px 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--charcoal);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
}

.sort-select:focus {
  border-color: var(--charcoal);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

.btn-filter-mobile {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  color: var(--charcoal);
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-filter-mobile:hover { border-color: var(--charcoal); box-shadow: var(--shadow-sm); }

/* ============================= */
/* ANNONCES GRID                 */
/* ============================= */
.annonces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.grid-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
  color: var(--stone);
  font-size: 0.9rem;
  font-weight: 400;
}

.spinner {
  width: 32px; height: 32px;
  border: 2.5px solid var(--border);
  border-top-color: var(--vert);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.grid-empty svg { opacity: 0.2; margin-bottom: 16px; display: block; margin-left: auto; margin-right: auto; }

.grid-empty p {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--stone);
  line-height: 1.7;
}

/* ============================= */
/* ANNONCE CARD                  */
/* ============================= */
.annonce-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--charcoal);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: cardIn 0.35s ease forwards;
}

@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }

.annonce-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card-img-wrap {
  position: relative;
  overflow: hidden;
}

.annonce-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.annonce-card:hover img { transform: scale(1.03); }

.card-no-img {
  aspect-ratio: 4 / 3;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-no-img svg { opacity: 0.18; }

.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  color: var(--charcoal);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
  border: 1px solid rgba(0,0,0,0.08);
}

.card-body {
  padding: 14px 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card-city {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vert);
  font-weight: 700;
}

.annonce-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  color: var(--stone);
  font-size: 0.8rem;
  line-height: 1.55;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.card-tag {
  font-size: 0.68rem;
  padding: 3px 9px;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--slate);
  font-weight: 600;
}

.card-dates {
  font-size: 0.7rem;
  color: var(--stone);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.card-dates::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.card-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--charcoal);
}

.card-price.free {
  color: var(--stone);
  font-weight: 400;
  font-size: 0.8rem;
}

.card-arrow {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone);
  transition: all 0.25s;
  flex-shrink: 0;
}

.annonce-card:hover .card-arrow {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
}

/* ============================= */
/* PAGINATION                    */
/* ============================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--slate);
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--charcoal);
  color: var(--charcoal);
  background: var(--off-white);
}

.page-btn.active {
  background: var(--charcoal);
  color: var(--white);
  border-color: var(--charcoal);
}

.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.page-ellipsis {
  color: var(--stone);
  font-size: 0.875rem;
  padding: 0 4px;
  line-height: 40px;
}

/* ============================= */
/* SUGGESTIONS                   */
/* ============================= */
.suggestions-section {
  margin-top: 52px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.suggestions-header {
  margin-bottom: 24px;
}

.suggestions-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.suggestions-sub {
  font-size: 0.82rem;
  color: var(--stone);
  font-weight: 400;
  line-height: 1.6;
}

.suggestion-card {
  opacity: 0.88;
  border-style: dashed;
}

.suggestion-card:hover {
  opacity: 1;
  border-style: solid;
}

/* ============================= */
/* FOOTER                        */
/* ============================= */
footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 40px 20px;
  font-size: 0.85rem;
  font-weight: 400;
}

footer strong {
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

footer p { margin-bottom: 6px; color: rgba(255,255,255,0.6); }
footer .muted { font-size: 0.78rem; margin-top: 6px; opacity: 0.4; }

/* ============================= */
/* MOBILE OVERLAY                */
/* ============================= */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 150;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

/* ============================= */
/* RESPONSIVE                    */
/* ============================= */
@media (max-width: 1100px) {
  :root { --sidebar-w: 240px; }
  .explorer-layout { padding: 32px 24px 80px; gap: 24px; }
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    top: 0; left: -110%;
    width: 300px;
    height: 100vh;
    max-height: 100vh;
    z-index: 160;
    background: var(--white);
    border-radius: 0;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease;
    overflow-y: auto;
  }

  .sidebar.open { left: 0; }

  .sidebar-inner {
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 24px 24px 80px;
  }

  .btn-filter-mobile { display: flex; }
  .btn-apply-mobile  { display: block; }
  .explorer-layout { padding: 24px 20px 60px; }
  .explorer-main { width: 100%; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 24px; }
  .nav-link { display: none; }
  .hero-explorer h1 { font-size: 2.2rem; }
  .annonces-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

@media (max-width: 420px) {
  .annonces-grid { grid-template-columns: 1fr; }
}

/* ============================= */
/* HERO REFINE LINK              */
/* ============================= */
.hero-refine-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--stone);
  text-decoration: none;
  border: 1.5px solid var(--border);
  padding: 8px 16px;
  border-radius: 50px;
  transition: all 0.2s;
  letter-spacing: -0.01em;
}
.hero-refine-link:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
  background: var(--off-white);
}
