/* ============================================================
   Écran « Veuillez patienter » et encadré de résultat (2026.12.21.1)
   Utilisé sur tout le site par assets/js/attente.js et app/views/header.php.
   ============================================================ */

/* ---------- Écran d'attente ---------- */
#tnAttente { position: fixed; inset: 0; z-index: 10000; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
#tnAttente[hidden] { display: none; }
#tnAttente .tn-bx { background: var(--surface, #fff); border-radius: 16px; padding: 30px 28px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
#tnAttente .tn-bx:focus { outline: none; }
#tnAttente .tn-sp { width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%; border: 5px solid #DBEAFE; border-top-color: var(--primary, #2563EB); animation: tnTourne .9s linear infinite; }
#tnAttente .tn-t { font-size: 18px; font-weight: 700; margin-bottom: 6px; color: var(--dark, #0F172A); }
#tnAttente .tn-s { font-size: 14px; color: var(--muted, #475569); line-height: 1.6; }
#tnAttente .tn-d { margin-top: 10px; font-size: 13px; color: var(--muted, #475569); }
#tnAttente .tn-long { margin-top: 12px; font-size: 13px; line-height: 1.55; color: #92400E; background: #FFFBEB; border-radius: 10px; padding: 10px 12px; }
#tnAttente .tn-long[hidden] { display: none; }
#tnAttente .tn-fermer { margin-top: 10px; background: none; border: 1px solid #CBD5E1; border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; color: var(--dark, #0F172A); }
@keyframes tnTourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #tnAttente .tn-sp { animation-duration: 3s; } }

/* ---------- Encadré de résultat ---------- */
.tn-res { display: flex; gap: 16px; align-items: flex-start; border-radius: 14px; padding: 18px 20px; margin: 0 0 20px; border: 2px solid; outline: none; text-align: left; box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.tn-res .tn-ic { flex: 0 0 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 700; color: #fff; line-height: 1; }
.tn-res .tn-co { flex: 1; min-width: 0; }
.tn-res .tn-ti { font-size: 17px; font-weight: 700; margin: 2px 0 4px; }
.tn-res .tn-me { margin: 0; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.tn-res .tn-du { margin: 6px 0 0; font-size: 12.5px; opacity: .8; }
.tn-res .tn-x { margin-left: auto; background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; padding: 0 2px; min-width: 32px; min-height: 32px; }
.tn-res .tn-x:hover, .tn-res .tn-x:focus-visible { opacity: 1; }
.tn-res.tn-success { background: #ECFDF3; border-color: #16A34A; color: #14532D; } .tn-res.tn-success .tn-ic { background: #16A34A; }
.tn-res.tn-info    { background: #EFF6FF; border-color: #2563EB; color: #1E3A8A; } .tn-res.tn-info .tn-ic { background: #2563EB; }
.tn-res.tn-warning { background: #FFFBEB; border-color: #D97706; color: #78350F; } .tn-res.tn-warning .tn-ic { background: #D97706; }
.tn-res.tn-error   { background: #FEF2F2; border-color: #DC2626; color: #7F1D1D; } .tn-res.tn-error .tn-ic { background: #DC2626; }
.tn-res-pile { width: 100%; }
main.container > .tn-res-pile { margin-top: 18px; }

/* Copie flottante quand l'encadré est hors de l'écran (page ouverte plus bas) */
.tn-res.tn-flottant { position: fixed; z-index: 9990; left: 50%; transform: translateX(-50%); bottom: 18px; width: min(560px, calc(100% - 32px)); margin: 0; box-shadow: 0 16px 40px rgba(15, 23, 42, .25); animation: tnMonte .25s ease-out; }
@keyframes tnMonte { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .tn-res.tn-flottant { animation: none; } }

@media (max-width: 600px) {
    .tn-res { padding: 14px 14px; gap: 12px; }
    .tn-res .tn-ic { flex-basis: 34px; height: 34px; font-size: 18px; }
    .tn-res .tn-ti { font-size: 16px; }
    #tnAttente .tn-bx { padding: 24px 18px; }
}
@media print { #tnAttente, .tn-res.tn-flottant { display: none !important; } }
