/* Recherche pays — hors canvas, tokens alignés TheyiaNav */

.country-search {
  --cs-panel: rgba(32, 33, 36, 0.92);
  --cs-text: #e8eaed;
  --cs-muted: #9aa0a6;
  --cs-accent: #5b6cff;
  --cs-radius: 12px;

  position: relative;
  z-index: 45;
  width: 100%;
  pointer-events: none;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.country-search * {
  box-sizing: border-box;
}

.country-search__form {
  position: relative;
  display: flex;
  align-items: center;
  pointer-events: auto;
  background: var(--cs-panel);
  border-radius: var(--cs-radius);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.34),
    0 8px 24px -8px rgba(0, 0, 0, 0.55);
}

.country-search__form:focus-within {
  box-shadow:
    0 0 0 2px var(--cs-accent),
    0 1px 2px rgba(0, 0, 0, 0.34),
    0 8px 24px -8px rgba(0, 0, 0, 0.55);
}

.country-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  flex-shrink: 0;
}

.country-search__input {
  width: 100%;
  margin: 0;
  padding: 10px 40px 10px 34px;
  border: none;
  border-radius: var(--cs-radius);
  background: transparent;
  color: var(--cs-text);
  font: 15px/1.35 "Segoe UI", system-ui, sans-serif;
  outline: none;
}

.country-search__input::placeholder {
  color: var(--cs-muted);
}

.country-search__input::-webkit-search-cancel-button {
  display: none;
}

.country-search__clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cs-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.country-search__clear:hover {
  color: var(--cs-text);
  background: rgba(255, 255, 255, 0.08);
}

.country-search__results {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  max-height: min(48vh, 320px);
  overflow-y: auto;
  pointer-events: auto;
  background: var(--cs-panel);
  border-radius: var(--cs-radius);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.34),
    0 10px 28px -8px rgba(0, 0, 0, 0.6);
}

.country-search__results.hidden,
.country-search__clear.hidden {
  display: none !important;
}

.country-search__option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cs-text);
  font: 14px/1.35 "Segoe UI", system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.country-search__option:hover,
.country-search__option.is-active {
  background: rgba(91, 108, 255, 0.22);
}

/* Capitales : préfixe "★" jaune pour les distinguer des pays */
.country-search__option--capital::before {
  content: "★\00a0";
  color: #ffd54f;
}

.country-search__option--capital {
  color: #ffe7a0;
}

.country-search__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

