/* Boîtes de dialogue et notifications BUCREP (remplacent SweetAlert2). Voir app-dialog.js. */
.app-dlg-overlay { position: fixed; inset: 0; z-index: 11050; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15,23,42,.45); animation: appDlgFade .15s ease; }
.app-dlg-overlay--clear { background: transparent; pointer-events: none; }
.app-dlg-overlay--clear .app-dlg { pointer-events: auto; }
.app-dlg { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 70px rgba(15,23,42,.25); outline: 0; color: #334155; }
.app-dlg-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px; background: #f7fafd; border-bottom: 1px solid #e2e8f0; }
.app-dlg-head > i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #e7f3fa; color: #0d80be; font-size: 1rem; flex-shrink: 0; }
.app-dlg-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.02rem; font-weight: 700; color: #176b9c; overflow-wrap: anywhere; }
.app-dlg-x { border: 0; background: transparent; color: #64748b; font-size: 1.1rem; line-height: 1; padding: 4px; border-radius: 6px; }
.app-dlg-x:hover { background: #e7f3fa; color: #0d80be; }
.app-dlg--error .app-dlg-head > i, .app-dlg--danger .app-dlg-head > i { background: #fff1f2; color: #dc3545; }
.app-dlg--error .app-dlg-head h2, .app-dlg--danger .app-dlg-head h2 { color: #b42334; }
.app-dlg--warning .app-dlg-head > i { background: #fff7e6; color: #b7791f; }
.app-dlg-body { padding: 20px 22px; overflow-y: auto; font-size: .92rem; overflow-wrap: anywhere; }
.app-dlg-body:empty { display: none; }
.app-dlg-body ul { padding-left: 1.2rem; margin: .5rem 0 0; }
.app-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 22px; background: #fafcfe; border-top: 1px solid #e2e8f0; }
.app-dlg-foot .btn { min-height: 40px; padding: 8px 18px; font-size: .85rem; font-weight: 600; border-radius: 8px; }
.app-dlg-foot .btn-primary { background: #0d80be; border-color: #0d80be; }
.app-dlg-foot .btn-primary:hover { background: #106cb2; border-color: #106cb2; }
.app-dlg-extra { padding: 0 22px 14px; font-size: .8rem; color: #64748b; }
.app-dlg-extra:empty { display: none; }
.app-dlg-err { margin-top: 10px; color: #b42334; font-size: .84rem; }
.app-dlg-loader { display: flex; justify-content: center; padding: 14px 0 4px; }
@keyframes appDlgFade { from { opacity: 0; } to { opacity: 1; } }

html[data-bs-theme=dark] .app-dlg { background: #0b2c49; border-color: #1d4d78; color: #d3e6f5; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
html[data-bs-theme=dark] .app-dlg-head { background: #103a5e; border-bottom-color: #1d4d78; }
html[data-bs-theme=dark] .app-dlg-head > i { background: rgba(13,128,190,.25); color: #8fd0f3; }
html[data-bs-theme=dark] .app-dlg-head h2 { color: #8fd0f3; }
html[data-bs-theme=dark] .app-dlg-x { color: #a9c8e0; }
html[data-bs-theme=dark] .app-dlg-x:hover { background: rgba(13,128,190,.25); color: #fff; }
html[data-bs-theme=dark] .app-dlg--error .app-dlg-head > i, html[data-bs-theme=dark] .app-dlg--danger .app-dlg-head > i { background: rgba(220,53,69,.22); color: #ff8a95; }
html[data-bs-theme=dark] .app-dlg--error .app-dlg-head h2, html[data-bs-theme=dark] .app-dlg--danger .app-dlg-head h2 { color: #ff8a95; }
html[data-bs-theme=dark] .app-dlg--warning .app-dlg-head > i { background: rgba(255,193,7,.18); color: #ffd76a; }
html[data-bs-theme=dark] .app-dlg-foot { background: #0a2740; border-top-color: #1d4d78; }
html[data-bs-theme=dark] .app-dlg-extra { color: #a9c8e0; }
