/*
 * Terroirs et Territoires — recherche "Lieux".
 * V1.4 : finition visuelle + icône SVG stable sur tous les navigateurs.
 */

.tet-search {
  width: min(100%, 980px);
}

.tet-search__header {
  margin-bottom: 2.35rem;
}

.tet-search__intro {
  margin: 0 0 1.4rem;
  max-width: 720px;
  font-size: 1.06rem;
  line-height: 1.6;
}

.tet-search__form {
  max-width: 860px;
}

.tet-search__field {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 62px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tet-search__field:focus-within {
  border-color: rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.035);
}

.tet-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1rem 1.15rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
}

.tet-search__input::placeholder {
  color: rgba(0, 0, 0, 0.42);
  opacity: 1;
}

.tet-search__button {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  border: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.11);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
}

.tet-search__button:hover,
.tet-search__button:focus-visible {
  background: rgba(0, 0, 0, 0.035);
}

.tet-search__icon {
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tet-search__results {
  margin-top: 0;
}

.tet-search__results-head {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.tet-search__results-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
}

.tet-search__query {
  font-size: 0.94rem;
  opacity: 0.62;
}

.tet-search__list {
  display: grid;
  gap: 0;
}

.tet-search__result {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 1.6rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.tet-search__result--no-image {
  grid-template-columns: 1fr;
}

.tet-search__media {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.035);
}

.tet-search__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.tet-search__media:hover img {
  transform: scale(1.015);
}

.tet-search__content {
  align-self: center;
}

.tet-search__result-title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.28rem, 2vw, 1.72rem);
  line-height: 1.22;
}

.tet-search__result-title a {
  color: inherit;
  text-decoration: none;
}

.tet-search__result-title a:hover,
.tet-search__result-title a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.tet-search__excerpt {
  margin: 0 0 0.9rem;
  max-width: 700px;
  line-height: 1.58;
}

.tet-search__more {
  display: inline-block;
  font-weight: 600;
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.tet-search__pager {
  margin-top: 2rem;
}

@media (max-width: 720px) {
  .tet-search__header {
    margin-bottom: 1.8rem;
  }

  .tet-search__field {
    min-height: 54px;
  }

  .tet-search__button-label {
    display: none;
  }

  .tet-search__button {
    min-width: 54px;
    padding: 0 0.95rem;
  }

  .tet-search__results-head {
    display: block;
  }

  .tet-search__query {
    margin-top: 0.35rem;
  }

  .tet-search__result {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.35rem 0;
  }

  .tet-search__media {
    max-width: 100%;
  }
}
