/* Historique des champs des fiches prospect/client : « Renseigné par » à droite du libellé, anciennes valeurs en encart. */
.bo-historique-entete{font-size:.68rem;font-style:normal;font-weight:400;color:#6b7280;text-align:right}
.dark .bo-historique-entete{color:#9ca3af}

.bo-historique{box-sizing:border-box;width:100%;margin-top:4px;padding:4px 8px 3px;border:1px solid #e5e7eb;border-radius:8px;background:#f9fafb;font-size:.68rem;line-height:1.3;color:#6b7280}
.dark .bo-historique{border-color:rgba(255,255,255,.1);background:rgba(255,255,255,.03);color:#9ca3af}
.bo-historique-titre{display:flex;align-items:center;gap:4px;margin-bottom:1px;font-size:.6rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#6b7280}
.bo-historique-titre svg{width:11px;height:11px;color:#d97706}
.bo-historique-nombre{padding:0 6px;border-radius:99px;background:#fef3c7;color:#b45309;font-size:.58rem;letter-spacing:0}
.dark .bo-historique-nombre{background:rgba(217,119,6,.2);color:#fbbf24}

.bo-historique table{width:100%;border-collapse:collapse}
.bo-historique tr+tr td{border-top:1px dashed #e5e7eb}
.dark .bo-historique tr+tr td{border-top-color:rgba(255,255,255,.08)}
.bo-historique td{padding:2px 10px 2px 0;vertical-align:middle}
.bo-historique td:last-child{padding-right:0}
.bo-historique-valeur{width:100%;font-weight:600;color:#374151;white-space:pre-line;overflow-wrap:anywhere}
.dark .bo-historique-valeur{color:#e5e7eb}
.bo-historique-valeur.vide{font-weight:400;font-style:italic;color:#9ca3af}
.bo-historique-qui{white-space:nowrap}
.bo-historique-qui>span:last-child{vertical-align:middle}
.bo-historique-pastille{display:inline-grid;place-items:center;width:14px;height:14px;margin-right:4px;border-radius:50%;vertical-align:middle;
    background:hsl(var(--teinte) 70% 90%);color:hsl(var(--teinte) 55% 32%);font-size:.52rem;font-weight:700;font-style:normal}
.dark .bo-historique-pastille{background:hsl(var(--teinte) 40% 28%);color:hsl(var(--teinte) 70% 85%)}
.bo-historique-pastille.systeme{background:#e5e7eb;color:#6b7280}
.dark .bo-historique-pastille.systeme{background:rgba(255,255,255,.1);color:#9ca3af}
.bo-historique-quand{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}

.bo-historique-plus{margin:2px 0 1px;padding:0 8px;border:1px solid #fcd34d;border-radius:99px;background:#fffbeb;font-size:.62rem;font-weight:600;color:#b45309;cursor:pointer}
.bo-historique-plus:hover{background:#fef3c7}
.dark .bo-historique-plus{border-color:rgba(217,119,6,.4);background:rgba(217,119,6,.12);color:#fbbf24}

/* Téléphone : l'auteur et la date passent sous la valeur. */
@media (max-width:640px){
    .bo-historique tr{display:grid;grid-template-columns:1fr auto;column-gap:10px}
    .bo-historique td{padding:0;border:0!important}
    .bo-historique tr+tr{border-top:1px dashed #e5e7eb;margin-top:2px;padding-top:2px}
    .bo-historique-valeur{grid-column:1/-1}
    .bo-historique-qui,.bo-historique-quand{padding-top:1px!important}
}

/* Filament range le contenu sous le champ en ligne (flex) : l'encart d'historique prend toute la largeur, à la ligne. */
.fi-sc.fi-inline:has(.bo-historique){flex-wrap:wrap}
.fi-sc.fi-inline > :has(.bo-historique),.fi-sc.fi-inline > :has(.bo-historique) > .fi-sc-component{flex:1 1 100%;width:100%}

/* Survol d'une ligne. */
.bo-historique tbody tr{transition:background-color .12s}
.bo-historique tbody tr:hover{background:#fef3c7}
.bo-historique tbody tr:hover td:first-child{box-shadow:inset 2px 0 0 #f59e0b}
.dark .bo-historique tbody tr:hover{background:rgba(217,119,6,.14)}
.bo-historique td:first-child{padding-left:4px}
.bo-historique td:last-child{padding-right:4px}
@media (max-width:640px){
    .bo-historique tbody tr{padding-left:4px;padding-right:4px}
    .bo-historique td:first-child,.bo-historique td:last-child{padding-left:0;padding-right:0}
    .bo-historique tbody tr:hover td:first-child{box-shadow:none}
    .bo-historique tbody tr:hover{box-shadow:inset 2px 0 0 #f59e0b}
}

/* Historique sous une ligne de tableau (e-mails, téléphones de la fiche), en grille. */
.fi-fo-table-repeater tr.bo-historique-rang>td{padding:0 12px 8px!important;border-top:0!important;width:100%}
.bo-historique-ligne{margin-top:0}
.bo-historique-ligne .bo-historique-titre{text-transform:none;letter-spacing:0;font-size:.68rem;font-weight:500;margin-bottom:0}
.bo-historique-ligne-entete{font-style:italic;color:#6b7280}
.bo-historique-grille{display:grid;grid-template-columns:1fr auto auto;column-gap:12px;margin-top:2px}
.bo-historique-rangee{display:contents}
.bo-historique-rangee>span{padding:2px 0;border-top:1px dashed #e5e7eb}
.dark .bo-historique-rangee>span{border-top-color:rgba(255,255,255,.08)}
.bo-historique-rangee:first-child>span{border-top:0}
.bo-historique-rangee:hover>span{background:#fef3c7}
.dark .bo-historique-rangee:hover>span{background:rgba(217,119,6,.14)}
.bo-historique-champ{white-space:nowrap;color:#9ca3af;font-weight:500}
.bo-historique-grille .bo-historique-valeur{width:auto}
.bo-historique-grille .bo-historique-qui{white-space:nowrap}
@media (max-width:640px){
    .bo-historique-grille{grid-template-columns:1fr auto}
    .bo-historique-grille .bo-historique-valeur{grid-column:1/-1}
    .bo-historique-grille .bo-historique-qui,.bo-historique-grille .bo-historique-quand{border-top:0;padding-top:0;text-align:left}
}
@media (max-width:640px){
    .fi-fo-table-repeater tr.bo-historique-rang,.fi-fo-table-repeater tr.bo-historique-rang>td{display:block;width:100%;box-sizing:border-box}
    .fi-fo-table-repeater tr.bo-historique-rang{padding:0 12px 14px!important}
    .fi-fo-table-repeater tr.bo-historique-rang>td{padding:0!important}
}

/* Signature d'une saisie : [icône] Steph le 27/10/26 à 17:48. */
.bo-historique-signature{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}
.bo-historique-signature svg{width:12px;height:12px;flex:none;opacity:.75}
