/* Hero recherche — catalogue prestations (style Google épuré + fond SVG animé) */

.prestations-search-hero--wow {
  --spot-x: 50%;
  --spot-y: 40%;
}

.prestations-search-hero--wow::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    520px circle at var(--spot-x) var(--spot-y),
    rgba(77, 169, 214, 0.16),
    rgba(47, 158, 106, 0.06) 35%,
    transparent 68%
  );
}

.prestations-search-hero--wow.is-spotlight::after {
  opacity: 1;
}

.prestations-search-hero--wow .prestations-search-title,
.prestations-search-hero--wow .prestations-search-lead,
.prestations-search-hero--wow .prestations-search-form,
.prestations-search-hero--wow .prestations-search-chips,
.prestations-search-hero--wow .prestations-search-results-info {
  opacity: 0;
  transform: translateY(18px);
}

.prestations-search-hero--wow.is-visible .prestations-search-title {
  animation: prestations-wow-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.05s;
}

.prestations-search-hero--wow.is-visible .prestations-search-lead {
  animation: prestations-wow-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.12s;
}

.prestations-search-hero--wow.is-visible .prestations-search-form {
  animation: prestations-wow-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.2s;
}

.prestations-search-hero--wow.is-visible .prestations-search-chips {
  animation: prestations-wow-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.32s;
}

@keyframes prestations-wow-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prestations-search-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--primary-dark);
}

.prestations-search-hero--wow .prestations-search-title {
  background: linear-gradient(
    105deg,
    var(--primary-dark) 0%,
    var(--primary-color) 38%,
    #2f9e6a 72%,
    var(--primary-dark) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes prestations-title-shine {
  0% { background-position: 0% center; }
  100% { background-position: 220% center; }
}

.prestations-search-hero--wow.is-visible .prestations-search-title {
  animation:
    prestations-wow-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    prestations-title-shine 10s linear 0.8s infinite;
}

.prestations-search-hero {
  position: relative;
  margin-top: 0.5rem;
  margin-bottom: 0;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  isolation: isolate;
}

.prestations-search-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.prestations-search-bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.prestations-search-orb {
  transform-origin: center;
  animation: prestations-search-float 14s ease-in-out infinite;
}

.prestations-search-orb--2 {
  animation-duration: 18s;
  animation-delay: -4s;
}

.prestations-search-orb--3 {
  animation-duration: 11s;
  animation-delay: -2s;
}

.prestations-search-wave {
  transform-origin: center bottom;
  animation: prestations-search-wave 9s ease-in-out infinite alternate;
}

.prestations-search-wave--2 {
  animation-duration: 12s;
  animation-delay: -3s;
}

.prestations-search-leaf {
  transform-origin: center;
  animation: prestations-search-leaf 8s ease-in-out infinite;
}

.prestations-search-leaf--2 {
  animation-duration: 10s;
  animation-delay: -2.5s;
}

.prestations-search-leaf--3 {
  animation-duration: 13s;
  animation-delay: -5s;
}

@keyframes prestations-search-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.04); }
}

@keyframes prestations-search-wave {
  0% { transform: translateX(0) scaleY(1); }
  100% { transform: translateX(-24px) scaleY(1.03); }
}

@keyframes prestations-search-leaf {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .prestations-search-orb,
  .prestations-search-wave,
  .prestations-search-leaf,
  .prestations-search-hero--wow .prestations-search-title,
  .prestations-search-hero--wow .prestations-search-lead,
  .prestations-search-hero--wow .prestations-search-form,
  .prestations-search-hero--wow .prestations-search-chips {
    animation: none !important;
  }

  .prestations-search-hero--wow .prestations-search-title,
  .prestations-search-hero--wow .prestations-search-lead,
  .prestations-search-hero--wow .prestations-search-form,
  .prestations-search-hero--wow .prestations-search-chips,
  .prestations-search-hero--wow .prestations-search-results-info {
    opacity: 1;
    transform: none;
  }

  .prestations-search-hero--wow::after,
  .prestations-search-hero--wow .prestations-search-input-wrapper::before {
    display: none;
  }

  .page-prestations-catalog .prestation-card.is-search-match,
  .page-prestations-catalog .prestation-card.is-wow-filter-in,
  .prestations-search-chip.is-chip-pulse,
  .prestations-search-results-info.is-results-pop {
    animation: none;
  }
}

.prestations-search-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

.prestations-search-lead {
  margin: 0 0 1.15rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--gray-600);
  max-width: 34rem;
}

.prestations-search-form {
  width: 100%;
  max-width: 640px;
}

.prestations-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  box-shadow:
    0 10px 32px rgba(15, 53, 80, 0.08),
    0 2px 8px rgba(15, 53, 80, 0.04);
  padding: 0.35rem 0.85rem 0.35rem 1.15rem;
  transition:
    box-shadow 0.22s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease;
}

.prestations-search-hero--wow .prestations-search-input-wrapper::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  padding: 2px;
  background: linear-gradient(
    120deg,
    rgba(77, 169, 214, 0),
    rgba(77, 169, 214, 0.55),
    rgba(47, 158, 106, 0.45),
    rgba(77, 169, 214, 0)
  );
  background-size: 220% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  animation: prestations-search-aurora 4s linear infinite;
}

.prestations-search-hero--wow .prestations-search-input-wrapper:focus-within::before {
  opacity: 1;
}

@keyframes prestations-search-aurora {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

.prestations-search-input-wrapper:focus-within {
  transform: translateY(-2px) scale(1.01);
  border-color: var(--primary-color);
  box-shadow:
    0 18px 48px rgba(77, 169, 214, 0.2),
    0 0 0 3px rgba(77, 169, 214, 0.12);
  background: radial-gradient(circle at 0% 0%, rgba(77, 169, 214, 0.05), #fff 58%);
}

.prestations-search-input-wrapper.is-typing .prestations-search-icon {
  color: var(--primary-color);
  transform: scale(1.08);
}

.prestations-search-icon {
  color: var(--gray-400);
  font-size: 1rem;
  flex-shrink: 0;
  transition: color 0.18s ease, transform 0.18s ease;
}

.prestations-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.02rem;
  color: var(--gray-800);
  padding: 0.72rem 0.25rem;
}

.prestations-search-input::placeholder {
  color: var(--gray-400);
}

.prestations-search-clear {
  border: none;
  outline: none;
  background: transparent;
  color: var(--gray-400);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.prestations-search-clear:hover {
  background: var(--gray-100);
  color: var(--gray-700);
  transform: scale(1.05);
}

.prestations-search-kbd {
  display: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-400);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
  margin-left: 0.15rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .prestations-search-kbd {
    display: inline-block;
  }
}

.prestations-search-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  width: 100%;
}

.prestations-search-chip {
  border: 1px solid rgba(15, 53, 80, 0.12);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.14s ease,
    box-shadow 0.16s ease;
}

.prestations-search-chip.is-active {
  background: linear-gradient(135deg, #fff 0%, #f0faf8 100%);
  border-color: var(--primary-color);
  box-shadow:
    0 8px 22px rgba(77, 169, 214, 0.2),
    0 0 0 3px rgba(77, 169, 214, 0.1);
  transform: translateY(-2px) scale(1.02);
}

.prestations-search-chip.is-chip-pulse {
  animation: prestations-chip-pulse 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes prestations-chip-pulse {
  0% { box-shadow: 0 0 0 0 rgba(77, 169, 214, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(77, 169, 214, 0); }
  100% { box-shadow: 0 6px 18px rgba(77, 169, 214, 0.15); }
}

.prestations-search-chip[data-prestations-search-chip="éco"].is-active,
.prestations-search-chip[data-prestations-search-chip="eco"].is-active {
  border-color: #2f9e6a;
  box-shadow:
    0 8px 22px rgba(47, 158, 106, 0.22),
    0 0 0 3px rgba(47, 158, 106, 0.12);
}

.prestations-search-results-info.is-results-pop {
  animation: prestations-results-pop 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes prestations-results-pop {
  0% { opacity: 0.4; transform: translateY(6px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.prestations-search-chip:hover:not(.is-active) {
  background: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 6px 18px rgba(77, 169, 214, 0.15);
  transform: translateY(-1px);
}

.prestations-search-chip i {
  color: var(--primary-color);
  font-size: 0.78rem;
}

.prestations-search-chip[data-prestations-search-chip="éco"] i,
.prestations-search-chip[data-prestations-search-chip="eco"] i {
  color: #2f9e6a;
}

.prestations-search-results-info {
  min-height: 1.35rem;
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.prestations-search-results-info:empty {
  display: none;
}

/* Filtrage catalogue — grille résultats plate */
.prestations-search-results-wrap {
  margin-bottom: 1.5rem;
}

.prestations-grid--results {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.35rem;
}

.page-prestations-catalog.is-catalog-filtering .prestations-cta {
  margin-top: 0.5rem;
}

.page-prestations-catalog .prestation-card.is-search-hidden {
  display: none !important;
}

.page-prestations-catalog .prestation-card--results {
  opacity: 1;
  transform: none;
  border-radius: 18px;
  border: 1px solid rgba(77, 169, 214, 0.18);
  box-shadow:
    0 10px 28px rgba(15, 53, 80, 0.07),
    0 2px 8px rgba(15, 53, 80, 0.04);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 253, 0.92) 100%);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    border-color 0.22s ease;
}

.page-prestations-catalog .prestation-card--results::after {
  display: none;
}

.page-prestations-catalog .prestation-card--results:hover,
.page-prestations-catalog .prestation-card--results.is-tilt-active {
  border-color: rgba(77, 169, 214, 0.45);
  box-shadow:
    0 20px 44px rgba(77, 169, 214, 0.18),
    0 8px 20px rgba(15, 53, 80, 0.08);
}

@keyframes prestations-card-border-glow {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

.page-prestations-catalog .prestation-card--results .prestation-card-visual--icon i {
  filter: drop-shadow(0 8px 14px rgba(77, 169, 214, 0.22));
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.page-prestations-catalog {
  padding-top: 0.75rem;
}

@media (max-width: 767px) {
  .prestations-search-hero {
    padding-top: 2rem;
  }

  .prestations-search-input {
    font-size: 0.95rem;
  }

  .prestations-search-chips {
    gap: 0.4rem;
  }

  .prestations-search-chip {
    font-size: 0.78rem;
    padding: 0.38rem 0.7rem;
  }
}
