/* Hero Kastor — dégradé rouge centré → blanc */
.page-header.bg-section,
.page-header.contact-page-header-compact,
.contact-page-header-compact {
  background: linear-gradient(90deg,
    #ffffff 0%,
    #fce8e9 8%,
    #f0a0a5 18%,
    #e0454d 32%,
    #E30613 50%,
    #e0454d 68%,
    #f0a0a5 82%,
    #fce8e9 92%,
    #ffffff 100%) !important;
  background-image: linear-gradient(90deg,
    #ffffff 0%,
    #fce8e9 8%,
    #f0a0a5 18%,
    #e0454d 32%,
    #E30613 50%,
    #e0454d 68%,
    #f0a0a5 82%,
    #fce8e9 92%,
    #ffffff 100%) !important;
  position: relative;
  overflow: hidden;
}
.page-header.bg-section::before,
.page-header.contact-page-header-compact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,0,0,0.06) 28%,
    rgba(0,0,0,0.12) 50%,
    rgba(0,0,0,0.06) 72%,
    transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.page-header .page-header-box,
.page-header .container,
.page-header h1 {
  position: relative;
  z-index: 1;
}
.page-header h1,
.page-header .page-header-box h1 {
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

/* Recherche immobilière — même version améliorée que sur l'accueil */
#main-content.page-maisons .page-blog > .container {
  width: min(calc(100% - 48px), 1500px);
  max-width: 1500px !important;
  padding-right: 12px;
  padding-left: 12px;
}
#main-content.page-maisons .kastor-home-maison-card {
  width: 100%;
  max-width: none;
}
#main-content.page-maisons .kastor-home-maison-image-link {
  height: clamp(230px, 18vw, 300px);
}
.km-search-section {
  --km-red: #b51e29;
  --km-red-dark: #7e1119;
  --km-ink: #191919;
  width: min(100%, 1190px);
  margin: 34px auto 60px;
  font-family: inherit;
}
.km-search,
.km-search * {
  box-sizing: border-box;
}
.km-search {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr auto;
  gap: 12px;
  overflow: hidden;
  padding: 26px 22px 22px;
  border: 2px solid rgba(167,13,23,.70);
  border-radius: 22px;
  background: linear-gradient(135deg,#fff 0%,#fff9f9 100%);
  box-shadow: 0 24px 65px rgba(94,8,16,.18), 0 0 0 7px rgba(167,13,23,.055);
}
.km-search::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg,#6f0a12 0%,#bc1f2a 50%,#6f0a12 100%);
}
.km-field {
  min-width: 0;
}
.km-field label {
  display: block;
  margin: 0 0 8px 2px;
  color: #681018;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.km-field select,
.km-field input {
  width: 100%;
  height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(104,16,24,.22);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--km-ink);
  box-shadow: 0 4px 14px rgba(70,10,16,.035);
  font: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.km-field select:hover,
.km-field input:hover {
  border-color: rgba(167,13,23,.42);
}
.km-field select:focus,
.km-field input:focus {
  border-color: #a70d17;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(167,13,23,.11), 0 7px 18px rgba(70,10,16,.06);
}
.km-search-submit {
  align-self: end;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg,#8b101a 0%,#c62632 100%);
  color: #fff;
  box-shadow: 0 13px 28px rgba(139,16,26,.30);
  font: inherit;
  font-size: .93rem;
  font-weight: 750;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}
.km-search-submit:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg,#720b14 0%,#ae1824 100%);
  box-shadow: 0 16px 34px rgba(114,11,20,.34);
}
.km-search-submit svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.km-search-custom {
  position: relative;
  width: min(100%,760px);
  margin: 16px auto 0;
  padding: 18px 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: linear-gradient(120deg,#650811 0%,#9f111c 55%,#c32430 100%);
  color: #fff;
  box-shadow: 0 15px 38px rgba(101,8,17,.22);
  font-size: 1.08rem;
  font-weight: 750;
}
.km-search-custom strong {
  position: relative;
  font-size: clamp(1.05rem,1.5vw,1.3rem);
}
.km-search-custom a {
  position: relative;
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  background: #fff;
  color: #850e18;
  box-shadow: 0 9px 24px rgba(45,0,5,.22);
  font-weight: 850;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.km-search-custom a:hover {
  transform: translateY(-2px);
  background: #fff7f7;
  color: #6f0a12;
  box-shadow: 0 13px 28px rgba(45,0,5,.28);
}
.km-search-custom svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 1100px) {
  .km-search {
    grid-template-columns: 1fr 1fr;
  }
  .km-search-submit {
    width: 100%;
  }
}
@media (max-width: 820px) {
  #main-content.page-maisons .page-blog > .container {
    width: min(calc(100% - 30px), 1500px);
  }
  .km-search-section {
    margin-top: 24px;
    margin-bottom: 46px;
  }
  .km-search {
    padding: 20px 16px 16px;
  }
  .km-search-custom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}
@media (max-width: 560px) {
  #main-content.page-maisons .page-blog > .container {
    width: min(calc(100% - 24px), 1500px);
  }
  #main-content.page-maisons .kastor-home-maison-image-link {
    height: 220px;
  }
  .km-search-section {
    margin-top: 18px;
    margin-bottom: 38px;
  }
  .km-search {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 12px 12px;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(94,8,16,.16), 0 0 0 4px rgba(167,13,23,.045);
  }
  .km-field label {
    margin-bottom: 4px;
    font-size: .64rem;
    letter-spacing: .06em;
  }
  .km-field select,
  .km-field input {
    height: 46px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: .86rem;
  }
  .km-search-submit {
    min-height: 48px;
  }
  .km-search-custom {
    padding: 19px 14px;
    border-radius: 14px;
    font-size: .94rem;
    line-height: 1.45;
  }
  .km-search-custom a {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
  }
}



/* La recherche reste accessible sous le menu pendant la consultation des résultats. */
.km-search.km-search--fixed {
  position: fixed;
  z-index: 9000;
  margin: 0;
  max-height: calc(100dvh - var(--km-search-top, 150px) - 12px);
  overflow-y: auto;
}
@media (max-width: 560px) {
  .km-search.km-search--fixed {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
