/* 123territorial.fr - Autocomplete cadres d'emploi (panel sous le champ #t123a-home-q) */

.t123-ac-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(2, 12, 40, 0.32), 0 4px 14px rgba(2, 12, 40, 0.14);
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
  text-align: left;
  animation: t123-ac-in 140ms ease-out;
}

@keyframes t123-ac-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* la wrap qui contient le form doit être positionnée pour ancrer le panel */
.t123-hero-assistant-form { position: relative; }

.t123-ac-list {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.t123-ac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
  transition: background 100ms ease, color 100ms ease;
}

.t123-ac-item.is-active,
.t123-ac-item:hover {
  background: #eff6ff;
}

.t123-ac-item.is-active {
  background: #1d4ed8;
  color: #ffffff;
}

.t123-ac-name {
  flex: 1 1 auto;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t123-ac-name mark {
  background: rgba(250, 204, 21, 0.45);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

.t123-ac-item.is-active .t123-ac-name mark {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.t123-ac-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-size: 12px;
  color: #475569;
}

.t123-ac-item.is-active .t123-ac-meta { color: rgba(255, 255, 255, 0.92); }

.t123-ac-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
  background: #1d4ed8;
  color: #fff;
}
.t123-ac-badge-fpt { background: #1d4ed8; }
.t123-ac-badge-fpe { background: #0891b2; }
.t123-ac-badge-fph { background: #be123c; }

.t123-ac-item.is-active .t123-ac-badge {
  background: #ffffff;
  color: #1d4ed8;
}

.t123-ac-cat,
.t123-ac-fil {
  white-space: nowrap;
}

.t123-ac-empty {
  padding: 14px 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.t123-ac-hint {
  padding: 8px 14px 10px;
  font-size: 11px;
  color: #94a3b8;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  letter-spacing: 0.02em;
}

/* Responsive mobile : panel pleine largeur lisible sous l'input */
@media (max-width: 640px) {
  .t123-ac-panel {
    border-radius: 12px;
    max-height: 65vh;
  }
  .t123-ac-item {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    font-size: 14px;
  }
  .t123-ac-meta {
    width: 100%;
    font-size: 11px;
  }
  .t123-ac-hint {
    font-size: 10px;
    padding: 7px 12px 9px;
  }
}
