/* [hors-planning ABC-4-16 2026-10-06] Liste de pays avec champ de recherche (Tom Select) : même style que les champs voisins.
   Chargée APRÈS tom-select.bootstrap5.min.css. [Correction 1] Reprend les règles de epe-style.css (input, select : 53 px, bordure
   1 px #aebfd0, rayon 8 px, fond blanc, police héritée, couleur var(--ink), focus-visible rouge décalé de 4 px, invalide
   aria-invalid) pour le contrôle fermé ET la liste ouverte ; aucun thème nouveau. */
.ts-wrapper { width: 100%; padding: 0; border: 0; background: none; box-shadow: none; height: auto; min-height: 0; }

/* Contrôle fermé : comme `input, select` du site. */
.ts-wrapper .ts-control {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  height: 53px;
  min-height: 53px;
  padding: 11px 38px 11px 13px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 12px;
  color: var(--ink, #172b45);
  border: 1px solid #aebfd0;
  border-radius: 8px;
  box-shadow: none;
  font: inherit;
  font-weight: inherit;
  line-height: 1.5;
  transition: none;
}
.ts-wrapper.single .ts-control::after { display: none; } /* la flèche de Tom Select cède la place au chevron des <select> */
.ts-wrapper .ts-control > .item { color: inherit; font: inherit; }
.ts-wrapper .ts-control > input {
  height: auto;
  min-height: 0;
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  outline: 0;
}
.ts-wrapper .ts-control { cursor: pointer; }

/* Focus : comme `input:focus-visible, select:focus-visible`. */
.ts-wrapper.focus .ts-control,
.ts-wrapper.single.input-active .ts-control,
.ts-wrapper.single.focus.input-active .ts-control,
.ts-wrapper .ts-control:focus-within {
  border-color: #aebfd0;
  box-shadow: none;
  outline: 3px solid var(--red, #bc283b);
  outline-offset: 4px;
}

/* Invalide : comme `.account-panel .field input[aria-invalid="true"]` (compte.css). */
.ts-wrapper:has(+ select[aria-invalid="true"]) .ts-control,
select[aria-invalid="true"] + .ts-wrapper .ts-control,
.ts-wrapper.is-invalid .ts-control {
  border-color: #b3261e;
  box-shadow: 0 0 0 1px #b3261e;
}

/* Liste ouverte : champ de recherche et options dans la police du champ. */
.ts-dropdown { font: inherit; color: var(--ink, #172b45); border: 1px solid #aebfd0; border-radius: 8px; margin-top: 4px; }
.ts-dropdown .dropdown-input,
.ts-dropdown .dropdown-input-wrap input {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 8px 13px;
  font: inherit;
  color: var(--ink, #172b45);
  background: #fff;
  border: 0;
  border-bottom: 1px solid #aebfd0;
  border-radius: 0;
}
.ts-dropdown .dropdown-input:focus { outline: 3px solid var(--red, #bc283b); outline-offset: -3px; }
.ts-dropdown .option,
.ts-dropdown .no-results { font: inherit; padding: 8px 13px; }
.ts-dropdown .no-results { padding: .5rem .75rem; }

/* Administration des élus (Bootstrap 5, `form-select` voisin d'un `form-control`) : le conteneur Tom Select hérite de la classe
   form-select (bordure, chevron, hauteur de app.css) ; elle est reprise par le contrôle, pas doublée sur le conteneur. */
.ts-wrapper.form-select {
  height: auto; padding: 0; border: 0; background: none; box-shadow: none;
}
.ts-wrapper.form-select .ts-control {
  height: calc(1.5em + .75rem + 2px);
  min-height: 0;
  padding: .375rem 2.25rem .375rem .75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  border: 1px solid #ced4da;
  border-radius: .25rem;
  background-position: right .75rem center;
}
.ts-wrapper.form-select.focus .ts-control {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25);
}
