/*
 * The Maps — barre de recherche, direction B « Posée ».
 * Le champ flotte légèrement au-dessus du panneau ; au focus, contour bleu
 * action et halo léger (21 oct. 2026 : plus de violet néon). Couleurs : DA.
 */
.tm-search {
  --tm-search-ink: #0e1f45; /* ink */
  --tm-search-muted: #5b6478; /* ink-muted */
  --tm-search-line: #e4e8f0; /* line */
  --tm-search-border: #d5dae5;
  --tm-search-accent: #2f63d6; /* bleu action */
  --tm-search-soft: rgba(47, 99, 214, 0.1); /* halo discret */
  --tm-search-soft-ink: #1f4fbf; /* bleu survol */
  --tm-search-sunken: #f1f4f9; /* surface-sunken */
  --tm-search-focus: #0b8fa3; /* focus */

  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 0 8px 0 14px;
  color: var(--tm-search-ink);
  background: #fff;
  border: 1px solid var(--tm-search-border);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(14, 31, 69, 0.06),
    0 4px 12px -4px rgba(14, 31, 69, 0.1);
  cursor: text;
  transition:
    border-color 150ms ease-out,
    box-shadow 200ms ease-out;
}

.tm-search:hover {
  border-color: #b9c1d2;
}

.tm-search:focus-within {
  border-color: var(--tm-search-accent);
  box-shadow:
    0 0 0 3px var(--tm-search-soft),
    0 4px 12px -4px rgba(14, 31, 69, 0.12);
}

.tm-search-icon {
  display: flex;
  flex: none;
  color: var(--tm-search-ink);
  transition: color 150ms ease-out;
}

.tm-search:focus-within .tm-search-icon {
  color: var(--tm-search-accent);
}

.tm-search .tm-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--tm-search-ink);
  font-family: var(--font-sans);
  font-size: var(--type-label-size);
  font-weight: var(--weight-regular);
  line-height: var(--type-label-line);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.tm-search .tm-search-input:focus,
.tm-search .tm-search-input:focus-visible {
  outline: none;
  box-shadow: none;
}

.tm-search .tm-search-input::placeholder {
  color: var(--tm-search-muted);
  opacity: 1;
}

.tm-search .tm-search-input::-webkit-search-cancel-button,
.tm-search .tm-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.tm-search-count {
  flex: none;
  padding: 5px 8px;
  color: var(--tm-search-soft-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: var(--tm-search-soft);
  border-radius: 999px;
}

.tm-search-clear {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--tm-search-muted);
  background: var(--tm-search-sunken);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background-color 150ms ease-out,
    color 150ms ease-out;
}

.tm-search-clear:hover {
  color: var(--tm-search-ink);
  background: var(--tm-search-line);
}

.tm-search-clear:focus-visible {
  outline: 2px solid var(--tm-search-focus);
  outline-offset: 2px;
}

.tm-search-count[hidden],
.tm-search-clear[hidden] {
  display: none;
}

.tm-search-kbd {
  flex: none;
  padding: 4px 6px;
  color: var(--tm-search-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-medium);
  line-height: 1;
  background: #fff;
  border: 1px solid var(--tm-search-line);
  border-radius: 6px;
}

.tm-search:focus-within .tm-search-kbd,
.tm-search.is-filled .tm-search-kbd {
  display: none;
}

.tm-search.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.tm-search.is-disabled .tm-search-kbd {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .tm-search,
  .tm-search-icon,
  .tm-search-clear {
    transition: none;
  }
}
