/* Formulaire de recherche annuaire, pose dans le canvas Tiers par nationtiers. */

.nationtiers-annuaire {
    margin: 0 0 12px 0;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.nationtiers-annuaire-ligne {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nationtiers-annuaire-titre {
    font-weight: 600;
}

.nationtiers-annuaire-resultats {
    margin-top: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.nationtiers-resultat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.nationtiers-resultat-nom {
    font-weight: 600;
}

.nationtiers-resultat-detail {
    font-size: 12px;
    flex: 1 1 auto;
}

/* Champ rempli depuis l annuaire : la teinte dit d ou vient la valeur. */
.nationtiers-rempli {
    background-color: #eef6ff;
}

/* 1.2.0 - indication du mode deduit de la saisie, et annonce de remplissage. */
.nationtiers-mode-info {
	margin-left: 8px;
	font-size: 0.9em;
	font-style: italic;
}
.nationtiers-annonce {
	margin: 6px 0 0 0;
}

/* 1.2.0 - menu deroulant de l annuaire. Jusqu a 500 entrees : la hauteur est
   bornee et le defilement interne, sinon le menu deborde de la page. */
.ui-autocomplete.nationtiers-menu,
#nationtiers-terme + .ui-autocomplete {
	max-height: 22em;
	overflow-y: auto;
	overflow-x: hidden;
}
.nationtiers-suggestion {
	padding: 2px 4px;
	line-height: 1.3;
}
.nationtiers-suggestion .nationtiers-resultat-detail {
	display: block;
	font-size: 0.85em;
}

/* 1.3.0 - l enseigne affichee a cote de la raison sociale dans le menu. */
.nationtiers-resultat-enseigne {
	font-style: italic;
	opacity: 0.8;
}

/* 1.4.0 - voyant de concordance et bandeau de doublon.
   Les couleurs ne portent jamais l information seules : chaque etat porte un
   motif en clair, lisible sans distinguer les teintes. */
.nationtiers-voyant { margin: 6px 0 0 0; }
.nationtiers-etat {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	border-left: 4px solid #999;
	background: #f4f4f4;
}
.nationtiers-etat-vert   { border-left-color: #2a7; background: #eef7f0; }
.nationtiers-etat-orange { border-left-color: #e90; background: #fdf3e3; }
.nationtiers-etat-rouge  { border-left-color: #c33; background: #fbecec; }
.nationtiers-etat-gris   { border-left-color: #aaa; background: #f4f4f4; }
.nationtiers-pastille { font-weight: bold; margin-right: 6px; }
.nationtiers-doublon {
	margin-top: 4px;
	padding: 3px 8px;
	border-left: 4px solid #e90;
	background: #fdf3e3;
}
.nationtiers-doublon-certain { border-left-color: #c33; background: #fbecec; }
.nationtiers-doublon-niveau { font-weight: bold; margin-right: 6px; }

/* 1.5.0 - comparaison avec une fiche existante. Les differences se voient au
   fond de ligne, pas seulement a la case cochee. */
.nationtiers-comparaison {
	margin-top: 8px;
	padding: 8px 10px;
	border: 1px solid #c9c9d4;
	border-radius: 4px;
	background: #fbfbfd;
}
.nationtiers-comparaison-titre { font-weight: bold; margin-bottom: 6px; }
/* Meme grammaire que l ecran de comparaison de nationconfig : teinte de fond
   par etat, pastille a droite, actions en fin de ligne. */
.nationtiers-comparaison-table td { vertical-align: top; }
.nationtiers-valeur { max-width: 22em; word-break: break-word; }
.nationtiers-ligne-differente td { background-color: rgba(217, 130, 0, 0.06); }
.nationtiers-ligne-absente    td { background-color: rgba(179, 38, 30, 0.06); }
.nationtiers-ligne-conforme   td { opacity: 0.55; }
.nationtiers-ligne-validee    td { background-color: rgba(31, 95, 158, 0.06); }
.nationtiers-pastille {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 9px;
	font-size: 0.85em;
	color: #fff;
}
.nationtiers-etatcmp-absente    { background-color: #b3261e; }
.nationtiers-etatcmp-differente { background-color: #d98200; }
.nationtiers-etatcmp-conforme   { background-color: #2a7d4f; }
.nationtiers-etatcmp-validee    { background-color: #1f5f9e; }
.nationtiers-comparaison-barre { margin-top: 8px; }

/* 1.6.0 - avertissement de reglage divergent, visible des administrateurs. */
.nationtiers-alerte-const {
	margin-bottom: 10px;
	padding: 8px 12px;
	border-left: 5px solid #d98200;
	background: #fdf3e3;
}
.nationtiers-alerte-const ul { margin: 6px 0; }

/* 1.8.2 - le filtre se distingue du terme cherche.
   Le terme interroge l index et porte la couleur de surlignage du parc ;
   le filtre restreint et porte la sienne. Voir la meme teinte sur l annonce
   du filtre, pour que l oeil relie les deux sans effort. */
.nationtiers-marque-filtre {
	background-color: rgba(31, 95, 158, 0.18);
	border-bottom: 2px solid #1f5f9e;
	font-weight: bold;
}
.nationtiers-mode-info {
	padding: 1px 6px;
	border-left: 3px solid #1f5f9e;
	background-color: rgba(31, 95, 158, 0.08);
}

/* 1.8.3 - le niveau de certitude se voit a la couleur du bandeau.
   Un identifiant identique est un fait ; un nom proche est une question. */
.nationtiers-doublon-entreprise { border-left-color: #d98200; background: #fdf3e3; }
.nationtiers-doublon-probable {
	border-left-color: #7a9cc6;
	background: rgba(122, 156, 198, 0.10);
}
