:root{--eml-gold:#C99700;--eml-gold-dark:#9A7200;--eml-blue:#7B5727;--eml-blue-dark:#543B1B;--eml-bg:#FAF8F5;--eml-line:#F0EBE0;--eml-muted:#9F7641;--eml-success:#16855B;--eml-danger:#C93C37}
@keyframes eml-spin{to{transform:rotate(360deg)}}
@keyframes eml-pulse{0%,100%{opacity:.55;transform:scale(.985)}50%{opacity:1;transform:scale(1)}}
.eml-page{position:fixed;inset:0;z-index:2147483000;background:rgba(250,248,245,.84);backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;padding:22px;opacity:0;visibility:hidden;pointer-events:none;transition:.18s ease}
.eml-page.is-visible{opacity:1;visibility:visible;pointer-events:auto}
.eml-card{width:min(520px,94vw);background:#fff;border:1px solid var(--eml-line);border-radius:var(--dgid-radius-xl,20px);box-shadow:0 24px 70px rgba(84,59,27,.18);padding:26px 28px;text-align:center;color:var(--eml-blue-dark)}
.eml-brand{display:flex;align-items:center;justify-content:center;gap:13px;margin-bottom:15px}.eml-brand img{width:76px;max-height:58px;object-fit:contain;border-radius:var(--dgid-radius-xs,4px)}.eml-brand strong{font-size:1.22rem;letter-spacing:.02em;color:var(--eml-blue-dark)}
.eml-ring{width:64px;height:64px;margin:4px auto 15px;border-radius:50%;border:6px solid #F3E7BD;border-top-color:var(--eml-gold);animation:eml-spin .9s linear infinite}
.eml-title{font-size:1.05rem;font-weight:800;color:var(--eml-blue-dark);margin:0}.eml-subtitle{font-size:.87rem;color:var(--eml-muted);margin:6px 0 0}
.eml-progress-shell{margin:18px 0 8px;text-align:left}.eml-progress-row{display:flex;justify-content:space-between;gap:10px;font-size:.78rem;color:var(--eml-muted);margin-bottom:7px}.eml-progress{height:9px;background:#F7F4ED;border-radius:var(--dgid-radius-pill,999px);overflow:hidden}.eml-progress>span{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--eml-gold),#E3B628);transition:width .35s ease;border-radius:inherit}
.eml-steps{display:grid;gap:7px;margin-top:16px;text-align:left}.eml-step{display:flex;align-items:center;gap:9px;font-size:.79rem;color:#B6884C}.eml-step i{width:17px;height:17px;border-radius:50%;border:2px solid #E1D6C8;display:inline-flex;align-items:center;justify-content:center;font-size:9px;flex:0 0 auto}.eml-step.is-done{color:#315E4B}.eml-step.is-done i{background:var(--eml-success);border-color:var(--eml-success);color:#fff}.eml-step.is-active{color:var(--eml-blue-dark);font-weight:700}.eml-step.is-active i{border-color:var(--eml-gold);border-top-color:transparent;animation:eml-spin .8s linear infinite}
.eml-panel-host{position:relative!important}.eml-panel{position:absolute;inset:0;z-index:999;background:rgba(255,255,255,.78);backdrop-filter:blur(2px);display:flex;align-items:center;justify-content:center;border-radius:inherit;min-height:90px}.eml-panel-card{background:#fff;border:1px solid var(--eml-line);border-radius:var(--dgid-radius-lg,16px);box-shadow:0 8px 26px rgba(84,59,27,.10);padding:15px 18px;display:flex;align-items:center;gap:11px;color:var(--eml-blue-dark);font-size:.84rem;font-weight:700;max-width:86%}.eml-panel-spinner,.eml-button-spinner{display:inline-block;border-radius:50%;border:3px solid #F1E5BC;border-top-color:var(--eml-gold);animation:eml-spin .8s linear infinite;flex:0 0 auto}.eml-panel-spinner{width:26px;height:26px}.eml-button-spinner{width:15px;height:15px;border-width:2px;margin-right:7px;vertical-align:-2px}
.eml-button-busy{cursor:wait!important;opacity:.86!important}.eml-skeleton{position:relative;overflow:hidden;background:#F7F4ED;border-radius:var(--dgid-radius-sm,8px);color:transparent!important}.eml-skeleton:after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.75),transparent);animation:eml-shimmer 1.2s infinite}@keyframes eml-shimmer{100%{transform:translateX(100%)}}
.eml-toast{position:fixed;right:20px;top:20px;z-index:2147483001;max-width:min(420px,calc(100vw - 40px));padding:14px 16px;border-radius:var(--dgid-radius-md,12px);background:#fff;border:1px solid var(--eml-line);box-shadow:0 12px 36px rgba(84,59,27,.16);display:flex;gap:10px;align-items:flex-start}.eml-toast.success{border-left:5px solid var(--eml-success)}.eml-toast.error{border-left:5px solid var(--eml-danger)}.eml-toast strong{display:block;color:var(--eml-blue-dark)}.eml-toast span{display:block;color:var(--eml-muted);font-size:.82rem;margin-top:2px}
@media(max-width:640px){.eml-card{padding:22px 18px}.eml-brand img{width:64px}.eml-page{padding:12px}.eml-toast{right:10px;top:10px;max-width:calc(100vw - 20px)}}

.eml-page[aria-hidden="true"]{visibility:hidden;pointer-events:none}
.eml-page .eml-progress-shell[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.eml-ring,.eml-step.is-active i,.eml-button-spinner,.eml-panel-spinner{animation-duration:2s}}

/* Fiche intégrée : le loader couvre la zone du cadre, pas l'en-tête (titre + fermeture). */
.mgmt-frame-shell>.eml-panel{top:var(--mgmt-frame-head-h,60px);border-radius:0 0 inherit inherit}
