/* ===========================================================
   Z2C-MAP — Dictionnaire flottant, style V0.2 (TEST SINGLE)
   Surcouche visuelle uniquement : aucune modification du JS/API.
   Harmonisation avec les cartes d'adresses : fond sombre translucide,
   verre depoli, accent vert #85a201 et rose #f25583.
   =========================================================== */

.z2c-dico-test-anchor {
  position: relative !important;
  overflow: visible !important;
  z-index: 80;
}

.z2c-dico-test-popup[hidden] {
  display: none !important;
}

.z2c-dico-test-popup {
  position: absolute;
  inset: auto 0 auto 0;
  top: calc(100% + 9px);
  z-index: 1200;
  max-height: min(43vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-top: 3px solid #85a201;
  border-radius: 16px;
  background: rgba(19, 37, 46, 0.96);
  color: #f8fafc;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35),
              0 4px 12px rgba(0, 0, 0, 0.14);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  text-align: left;
  scrollbar-color: rgba(133, 162, 1, 0.6) transparent;
  scrollbar-width: thin;
}

/* En-tête discret dans l'esprit des blocs de résultats */
.z2c-dico-test-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #eaf3f5;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.z2c-dico-test-heading::before {
  content: '';
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #85a201;
  box-shadow: 0 0 0 3px rgba(133, 162, 1, 0.18);
}

/* Une proposition = une ligne bien cliquable, comme les cartes Z2C */
.z2c-dico-test-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin: 2px 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background-color 0.16s ease,
              border-color 0.16s ease,
              transform 0.16s ease;
}

.z2c-dico-test-item::before {
  content: '';
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border: 2px solid #85a201;
  border-radius: 50%;
}

.z2c-dico-test-item:hover,
.z2c-dico-test-item.is-active,
.z2c-dico-test-item:focus-visible {
  border-color: rgba(133, 162, 1, 0.5);
  background: rgba(133, 162, 1, 0.17);
  color: #fff;
  outline: none;
}

.z2c-dico-test-item:focus-visible {
  box-shadow: inset 0 0 0 1px #85a201;
}

.z2c-dico-test-item-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Les mots proches sont signalés sans concurrencer le libellé */
.z2c-dico-test-badge {
  flex: 0 0 auto;
  padding: 3px 9px;
  border: 1px solid rgba(242, 85, 131, 0.62);
  border-radius: 999px;
  background: rgba(242, 85, 131, 0.12);
  color: #ffb9cc;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .z2c-dico-test-popup {
    top: calc(100% + 7px);
    max-height: min(36vh, 280px);
    padding: 6px;
    border-radius: 13px;
  }

  .z2c-dico-test-heading {
    padding: 8px 10px;
  }

  .z2c-dico-test-item {
    min-height: 48px;
    padding: 11px 10px;
  }

  .z2c-dico-test-item-text {
    font-size: 0.84rem;
  }

  .z2c-dico-test-badge {
    padding: 3px 7px;
    font-size: 0.64rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .z2c-dico-test-item {
    transition: none;
  }
}
