/* =====================================================================
   BailSecurity - fenêtre d'information (js/info.js)
   ---------------------------------------------------------------------
   Confirme, au milieu de l'écran, qu'une opération est prise en compte (enregistrement, modification, suppression,
   archivage, envoi) ou qu'elle ne l'est pas, et pourquoi. Elle se ferme par « Fermer », la croix, Échap ou Entrée,
   sans faire défiler la page. Indépendante des feuilles de style des pages (accueil, espace, console, pages isolées).
   ===================================================================== */
.bs-info-voile {
	--bi-encre: #1E2640; --bi-texte: #3A4252; --bi-doux: #6B7385;
	--bi-teinte: #1F7A4D; --bi-fond: #E6F5EC; --bi-halo: rgba(31,122,77,.10);
	position: fixed; inset: 0; z-index: 40000; display: flex; align-items: center; justify-content: center; padding: 16px;
	background: rgba(22,27,40,.36); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
	overscroll-behavior: contain; animation: bi-voile .16s ease-out both;
}
.bs-info-voile[data-genre="erreur"] { --bi-teinte: #B3261E; --bi-fond: #FCEAE8; --bi-halo: rgba(179,38,30,.10); }
.bs-info-voile[data-genre="attention"] { --bi-teinte: #9A5800; --bi-fond: #FFF2DC; --bi-halo: rgba(154,88,0,.12); }
.bs-info-voile[data-genre="info"] { --bi-teinte: #3E4CC9; --bi-fond: #ECEEFE; --bi-halo: rgba(62,76,201,.10); }
.bs-info-voile.ferme { animation: bi-voile-fin .14s ease-in both; }

.bs-info {
	position: relative; box-sizing: border-box; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow: auto;
	margin: 0; padding: 30px 28px 22px; text-align: center; background: #fff; color: var(--bi-texte);
	border-radius: 22px; border-top: 4px solid var(--bi-teinte);
	box-shadow: 0 28px 70px -18px rgba(22,28,45,.42), 0 2px 8px rgba(22,28,45,.08);
	font: 400 15px/1.55 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	animation: bi-entree .24s cubic-bezier(.2,.8,.2,1) both;
}
.bs-info-voile.ferme .bs-info { animation: bi-sortie .14s ease-in both; }
.bs-info:focus { outline: none; }

.bs-info-ico {
	display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 50%;
	background: var(--bi-fond); color: var(--bi-teinte); box-shadow: 0 0 0 9px var(--bi-halo);
}
.bs-info-ico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.bs-info-ico svg .bi-trait { stroke-dasharray: 40; stroke-dashoffset: 40; animation: bi-trait .42s .14s cubic-bezier(.4,0,.2,1) forwards; }

.bs-info-titre { margin: 0 0 8px; color: var(--bi-encre); font: 700 19px/1.25 "Syne", "Manrope", system-ui, sans-serif; letter-spacing: -.01em; }
.bs-info-texte { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.bs-info-texte b { color: var(--bi-encre); }
.bs-info-detail { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #F5F6FA; color: var(--bi-doux); font-size: 13px; line-height: 1.45; text-align: left; white-space: pre-line; overflow-wrap: anywhere; }

/* fenêtre élargie : alerte de doublon (js/doublons.js), comparaison de la saisie et de la fiche existante */
.bs-info.bs-info-large { width: min(580px, 100%); }
.bs-info-large .bs-info-texte { text-align: left; }
.bs-info-tableau { margin: 14px 0 0; overflow-x: auto; border: 1px solid #E3E6EF; border-radius: 12px; }
/* colonnes fixes : une valeur longue (adresse e-mail) passe à la ligne au lieu d'être coupée */
.bs-info-tableau table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13.5px; line-height: 1.4; text-align: left; }
/* !important : l'espace (php/Menu.php) impose white-space: nowrap aux cellules, par héritage */
.bs-info-tableau col.bi-col-libelle { width: 27%; }
.bs-info-tableau th, .bs-info-tableau td { padding: 7px 10px; border-bottom: 1px solid #EEF0F5; vertical-align: top; white-space: normal !important; overflow-wrap: anywhere; word-break: break-word; }
.bs-info-tableau tr:last-child th, .bs-info-tableau tr:last-child td { border-bottom: 0; }
.bs-info-tableau thead th { background: #F5F6FA; color: var(--bi-doux); font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.bs-info-tableau tbody th { color: var(--bi-doux); font-weight: 600; word-break: normal; overflow-wrap: normal; hyphens: none; }
.bs-info-tableau td { color: var(--bi-encre); }
.bs-info-tableau tr.ecart td { background: var(--bi-fond); font-weight: 700; }
.bs-info-tableau tr.ecart th::after { content: " ≠"; color: var(--bi-teinte); font-weight: 700; }

.bs-info-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.bs-info-ok {
	min-width: 132px; padding: 11px 22px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--bi-encre); color: #fff; font: 700 14px/1.2 "Manrope", system-ui, sans-serif; letter-spacing: .01em;
	box-shadow: 0 6px 16px -6px rgba(30,38,64,.55); transition: background .15s, transform .15s, box-shadow .15s;
}
.bs-info-ok:hover { background: #2C3760; box-shadow: 0 10px 20px -8px rgba(30,38,64,.6); }
.bs-info-ok:active { transform: none; }
/* suites proposées après une confirmation (« Enregistrer un autre bien »…) : une par ligne, « Fermer » en dernier */
.bs-info-actions.bs-info-suites { flex-direction: column; align-items: stretch; gap: 8px; }
/* !important : les feuilles de l'espace (css/pastel.css) imposent une bordure transparente à tous les boutons */
.bs-info-suite {
	padding: 11px 18px; border: 1px solid #CDD2E0 !important; border-radius: 999px !important; cursor: pointer; background: #F6F7FB !important; color: var(--bi-encre) !important;
	font: 700 14px/1.25 "Manrope", system-ui, sans-serif; transition: background .15s, border-color .15s;
}
.bs-info-suite:hover { background: #ECEEF6 !important; border-color: #A9B0C6 !important; }
.bs-info-suite:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bi-teinte); }
.bs-info-suites .bs-info-ok { background: transparent; color: var(--bi-doux); box-shadow: none; }
.bs-info-suites .bs-info-ok:hover { background: #F1F2F6; color: var(--bi-encre); transform: none; box-shadow: none; }
.bs-info-ok:focus-visible { outline: 3px solid var(--bi-halo); outline-offset: 3px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bi-teinte); }

.bs-info-x {
	position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; display: grid; place-items: center;
	border: 0; border-radius: 50%; background: transparent; color: var(--bi-doux); font: 400 24px/1 system-ui, sans-serif; cursor: pointer;
	transition: background .15s, color .15s;
}
.bs-info-x:hover { background: #F1F2F6; color: var(--bi-encre); }
.bs-info-x:focus-visible { outline: 2px solid var(--bi-teinte); outline-offset: 1px; }

/* messages historiques (#AffichageJava, #RetourAjax) : repris dans la fenêtre, leur bandeau n'apparaît plus */
html.bs-info-pret #AffichageJava:not(.bs-info-garde), html.bs-info-pret #RetourAjax:not(.bs-info-garde), html.bs-info-pret #MessageJava:not(.bs-info-garde) { display: none !important; }

@keyframes bi-voile { from { opacity: 0; } to { opacity: 1; } }
@keyframes bi-voile-fin { to { opacity: 0; } }
@keyframes bi-entree { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bi-sortie { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes bi-trait { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
	.bs-info-voile, .bs-info, .bs-info-voile.ferme, .bs-info-voile.ferme .bs-info { animation: none; }
	.bs-info-ico svg .bi-trait { animation: none; stroke-dashoffset: 0; }
	.bs-info-ok { transition: none; }
}
@media (max-width: 420px) {
	.bs-info { padding: 26px 20px 18px; border-radius: 18px; }
	.bs-info-tableau table { font-size: 13px; }
	.bs-info-tableau col.bi-col-libelle { width: 31%; }
	.bs-info-tableau th, .bs-info-tableau td { padding: 6px 7px; }
	.bs-info-ok { width: 100%; }
}
@media print { .bs-info-voile { display: none !important; } }
