/* Modales applicatives (uiConfirm / uiAlert / uiPrompt) — autonome, thème clair + sombre. */
.uim-overlay{
  position:fixed; inset:0; z-index:9999;
  background:rgba(15,23,42,.45);
  display:flex; align-items:center; justify-content:center;
  padding:16px;
  animation:uim-fade .12s ease-out;
}
@keyframes uim-fade{ from{opacity:0} to{opacity:1} }
.uim-box{
  background:#fff; color:#0f172a;
  width:min(440px,96vw);
  max-height:90vh; max-height:90dvh;
  overflow-y:auto;
  border-radius:14px;
  box-shadow:0 24px 64px rgba(15,23,42,.32);
  padding:20px 22px;
  animation:uim-pop .14s ease-out;
}
@keyframes uim-pop{ from{transform:translateY(8px) scale(.98);opacity:.6} to{transform:none;opacity:1} }
.uim-title{ font-weight:800; font-size:16px; color:#0f172a; margin-bottom:8px; }
.uim-msg{ color:#334155; font-size:14px; line-height:1.5; white-space:pre-line; }
.uim-input{
  width:100%; box-sizing:border-box; margin-top:14px;
  padding:9px 11px; border:1px solid #cbd5e1; border-radius:8px; font-size:14px;
}
.uim-input:focus{ outline:none; border-color:#2563eb; box-shadow:0 0 0 3px rgba(37,99,235,.18); }
.uim-foot{ display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
.uim-btn{
  padding:9px 16px; border:1px solid #cbd5e1; border-radius:8px;
  background:#fff; color:#0f172a; font-size:14px; font-weight:600; cursor:pointer;
}
.uim-btn:hover{ background:#f1f5f9; }
.uim-ok{ background:#2563eb; border-color:#2563eb; color:#fff; }
.uim-ok:hover{ background:#1d4ed8; }
.uim-btn-danger{ background:#dc2626; border-color:#dc2626; color:#fff; }
.uim-btn-danger:hover{ background:#b91c1c; }

/* Mobile : boutons faciles à toucher */
@media (max-width:480px){
  .uim-foot{ flex-wrap:wrap; }
  .uim-btn{ flex:1 1 auto; min-height:44px; }
  .uim-input{ font-size:16px; } /* anti-zoom iOS */
}

/* Thème sombre */
html.theme-dark .uim-box{ background:#0f1b2d; color:#e2e8f0; box-shadow:0 24px 64px rgba(0,0,0,.5); }
html.theme-dark .uim-title{ color:#f1f5f9; }
html.theme-dark .uim-msg{ color:#cbd5e1; }
html.theme-dark .uim-btn{ background:#1e293b; color:#e2e8f0; border-color:#334155; }
html.theme-dark .uim-btn:hover{ background:#243449; }
html.theme-dark .uim-ok{ background:#2563eb; border-color:#2563eb; color:#fff; }
html.theme-dark .uim-btn-danger{ background:#dc2626; border-color:#dc2626; color:#fff; }
html.theme-dark .uim-input{ background:#1e293b; color:#e2e8f0; border-color:#334155; }
