/* === TITRES PRINCIPAUX === */
h1,
h2,
h3,
.section-title,
.filter-group h3 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: 0.4px;
}

/* === TEXTES COURANTS & LISTES === */
body,
p,
a,
li,
label,
.search-filters label,
.filter-options,
.pagination,
input,
select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-color);
}

/* === FILTRES ET UI FORM INPUTS === */
.search-filters select,
.search-filters input,
input[type="text"],
input[type="email"],
textarea,
button,
.filter-button,
.search-btn {
  font-family: var(--font-sans);
}

/* === SEARCH BANNER TEXT === */
.hero-banner h1,
.hero-banner p {
  font-family: var(--font-title);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.filter-group h3 {
  font-size: 1.1rem;
  font-family: var(--font-title);
  color: var(--secondary-color);
}

.filter-button,
.search-btn {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.result-title,
.logement-card h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  color: var(--secondary-color);
}

body {
  font-family: var(--font-family);
}

.search-page {
  display: block;
  width: 100%;
}

.search-layout-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  width: 100%;
}

h2 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 2.4rem;
  letter-spacing: 0.5px;
  color: var(--secondary-color);
}

p,
a,
li {
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  color: var(--text-color);
}

/* HERO BANNER */

.hero-banner {
  position: relative;
  width: 100%;
  height: 80vh !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  background-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.6),
      rgba(0, 0, 0, 0.2)
    ),
    url("your-image-url-here"); /* already handled via inline in template */
}

.hero-banner .overlay {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  width: 100%;
}

.overlay h1 {
  font-size: 3rem;
  margin: 0;
}

.overlay p {
  font-size: 1.5rem;
  color: var(--primary-color);
}

/* Filters */
.search-filters {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-size: 0.95rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.filter-group h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3rem;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scrollable-box {
  max-height: 200px;
  overflow-y: auto;
  padding-right: 6px;
}

.scrollable-box::-webkit-scrollbar {
  width: 5px;
}

.scrollable-box::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.filter-button-wrapper,
.filter-reset-wrapper {
  display: flex;
  justify-content: center;
}

.reset-button {
  display: inline-block;
  margin-top: 0.5rem;
  background-color: transparent;
  color: var(--secondary-color);
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
}
.reset-button:hover {
  color: #000;
  text-decoration: none;
}

.search-filters select {
  padding: 8px;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fafafa;
  transition: border-color 0.3s ease;
}

.search-filters select:focus {
  border-color: var(--primary-color);
  outline: none;
}

.search-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #444;
  cursor: pointer;
}

.search-filters input[type="checkbox"],
.search-filters input[type="radio"] {
  accent-color: var(--primary-color, #bfa66b);
  transform: scale(1.1);
}

.logements-results {
  flex: 1;
}

.numeric-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.numeric-filters input[type="radio"] {
  display: none;
}

.numeric-filters label {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: #f9f9f9;
}

.numeric-filters input[type="radio"]:checked + label {
  background-color: var(--primary-color, #bfa66b);
  color: white;
  border-color: var(--primary-color, #bfa66b);
}

.filter-button-wrapper,
.filter-reset-wrapper {
  display: flex;
  justify-content: center;
}

.filter-button {
  margin-top: 1rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.reset-button {
  margin-top: 0.5rem;
  background: none;
  border: none;
  color: #555;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.reset-button:hover {
  color: #000;
  text-decoration: none;
}

/* SEARCH BAR */
.compact-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  width: fit-content;
  margin: 2rem auto;
}

.search-input input {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 0.4rem 0.8rem;
  border: 1px solid #ddd;
  transition: border-color 0.3s;
}

.search-input input:focus {
  border-color: var(--primary-color);
  outline: none;
}

.search-input:last-of-type {
  border-right: none;
}

.search-input label {
  display: block;
  font-size: 0.6rem;
  color: #888;
  margin-bottom: 0.1rem;
  white-space: nowrap;
}

.search-input input {
  border: none;
  outline: none;
  font-size: 0.85rem;
  background-color: transparent;
  padding: 0;
}

.date-input {
  cursor: pointer;
}

.search-btn {
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.view-switcher {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.view-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 30px;
  background: white;
  font-size: 0.9rem;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
}

.view-btn i {
  margin-right: 5px;
}

.view-btn.active,
.view-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-light);
}

#logement-map {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #ddd;
  margin-top: 1rem;
}

logement-list-card {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap; /* pour desktop par défaut */
  width: 100%;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  border: 1px solid var(--light-border);
}

.logement-list-card:hover {
  box-shadow: var(--shadow-hover);
}

.logement-thumb-wrapper {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logement-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.logement-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-title);
}

.image-wrapper {
  flex: 0 0 200px;
  height: 160px;
  overflow: hidden;
}

.logement-list-card .info {
  flex: 1;
  padding: 1rem;
}

.logement-list-card h3 {
  font-size: 1.25rem;
  color: var(--secondary-color);
}

.litepicker {
  max-width: 95vw !important;
  min-width: 0 !important;
  width: 100% !important;
  font-size: 0.98em;
}

.litepicker .button-cancel {
  color: #bfa66b !important;
  font-size: 1.1em;
  padding: 0.3em 0.8em;
  border-radius: 6px;
  background: none !important;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.litepicker .button-cancel:hover {
  background: #f3e9d2 !important;
}

.litepicker .button-apply {
  background: #bfa66b !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 1.08em;
  border-radius: 6px;
  border: none;
  padding: 0.45em 1.2em;
  margin-left: 0.7em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(191, 166, 107, 0.1);
  transition: background 0.18s, color 0.18s;
}
.litepicker .button-apply:hover,
.litepicker .button-apply:focus {
  background: #a88a4c !important;
  color: #fff !important;
}

.logement-stars i {
  font-size: 1.1em;
  vertical-align: middle;
  margin-right: 1px;
}
.logement-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: center;
}

@media (min-width: 769px) {
  .search-layout-container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    align-items: flex-start;
  }

  .search-filters {
    flex: 0 0 300px;
    display: block !important; /* override toggle hidden */
    margin-top: 0;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 100px; /* optionally keep filters visible while scrolling */
    height: fit-content;
  }

  .logements-results {
    flex: 1;
  }

  .toggle-filters-btn {
    display: none;
  }
}

@media (max-width: 768px) {
  .search-layout-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    align-items: flex-start;
  }

  .logements-results {
    order: 1;
  }

  .overlay h1 {
    font-size: 1.2rem;
  }

  .overlay p {
    font-size: 1rem;
    margin-bottom: 0px;
  }

  .hero-banner {
    height: 50vh !important;
    background-attachment: scroll;
    padding: 2rem 1rem;
    text-align: center;
    background-size: contain;
  }

  .hero-banner .overlay {
    padding: 1rem;
  }

  .logement-list-card {
    flex-direction: column !important;
  }

  .logement-list-card .info {
    padding: 1rem;
  }

  .image-wrapper {
    width: 100%;
    height: auto;
  }

  .image-wrapper {
    width: 100%;
    height: auto;
    max-height: 200px;
    overflow: hidden;
  }

  .logement-thumb {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }

  .view-btn {
    padding: 0.2rem 0.5rem;
    font-size: 0.6rem;
  }

  .search-filters {
    order: 0; /* show first */
    width: 100%;
    display: none;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1rem 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    background: white;
    border-radius: 12px;
  }

  .search-filters.show {
    display: block;
  }

  .toggle-filters-btn {
    width: fit-content;
    margin: 1rem auto 0;
    font-size: 1rem;
    border-radius: 30px;
    background: var(--primary-color, #bfa66b);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    display: block;
  }

  .toggle-filters-btn:hover {
    background-color: #d4af7f;
  }

  .logements-results {
    order: 1;
    width: 100%;
  }


  .compact-search-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.1em;
    padding: 1.2em 0.7em 1.2em 0.7em;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(191, 166, 107, 0.1);
    width: 100%;
    max-width: 340px;
    margin: 1.5em auto;
  }
  .compact-search-bar .search-input {
    width: 100%;
    min-width: 0;
    margin-bottom: 0.2em;
  }
  .compact-search-bar label {
    font-size: 0.98em;
    color: #bfa66b;
    font-weight: 600;
    margin-bottom: 0.2em;
    letter-spacing: 0.02em;
  }
  .compact-search-bar input[type="text"],
  .compact-search-bar input[type="number"] {
    width: 100%;
    padding: 0.55em 0.9em;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    background: #faf9f7;
    font-size: 1.08em;
    margin-bottom: 0.1em;
    color: #2b3d55;
    transition: border-color 0.2s;
  }
  .compact-search-bar input[type="text"]:focus,
  .compact-search-bar input[type="number"]:focus {
    border-color: #bfa66b;
    outline: none;
    background: #fff;
  }
  .compact-search-bar button,
  .compact-search-bar .search-btn {
    width: 100%;
    margin-top: 0.7em;
    min-width: 0;
    border-radius: 999px;
    background: #bfa66b;
    color: #fff;
    font-weight: 700;
    font-size: 1.2em;
    padding: 0.7em 0;
    border: none;
    box-shadow: 0 2px 8px rgba(191, 166, 107, 0.1);
    transition: background 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .compact-search-bar button:hover,
  .compact-search-bar .search-btn:hover {
    background: #a88a4c;
    color: #fff;
  }

  .compact-search-bar .date-input,
  .compact-search-bar input#datepicker {
    font-size: 1em;
    padding: 0.55em 2.2em 0.55em 0.9em; /* space for icon */
    border-radius: 8px;
    height: 2.6em;
    background: #faf9f7
      url("data:image/svg+xml,%3Csvg width='18' height='18' fill='none' stroke='%23bfa66b' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 9h18'/%3E%3C/svg%3E")
      no-repeat right 0.8em center/1.2em auto;
    box-sizing: border-box;
    color: #2b3d55;
    border: 1px solid #e5e5e5;
    margin-bottom: 0.1em;
    transition: border-color 0.2s;
  }
  .compact-search-bar .date-input:focus,
  .compact-search-bar input#datepicker:focus {
    border-color: #bfa66b;
    background-color: #fff;
    outline: none;
  }

  .litepicker {
    max-width: 340px !important;
    min-width: 0 !important;
    width: 100% !important;
    font-size: 0.97em;
  }
  .litepicker .container__months {
    flex-direction: column !important;
    gap: 0.5em;
  }
}
