/* Composants isolés du thème, sans police ou ressource externe. */
html.epp-hm-open { overflow: hidden; }
.epp-hm-dialog {
    --epp-hm-ink: #173c55;
    --epp-hm-accent: #007b8d;
    --epp-hm-muted: #526571;
    box-sizing: border-box; position: fixed; inset: 0; margin: auto;
    width: min(580px, calc(100% - 32px)); max-width: none;
    max-height: calc(100% - 32px); max-height: calc(100dvh - 32px);
    padding: 0; border: 0; border-radius: 20px; background: #fff; color: var(--epp-hm-ink);
    box-shadow: 0 24px 80px rgba(13, 39, 57, .28); overflow: auto; overscroll-behavior: contain;
    font: inherit; text-align: left; line-height: 1.5;
}
.epp-hm-dialog:not([open]) { display: none; }
.epp-hm-dialog[open] { display: block; animation: epp-hm-appear .22s ease-out both; }
.epp-hm-dialog::backdrop { background: rgba(15, 35, 51, .58); }
.epp-hm-dialog *, .epp-hm-dialog *::before, .epp-hm-dialog *::after { box-sizing: border-box; }
.epp-hm-card { border-top: 6px solid var(--epp-hm-accent); }
.epp-hm-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 19px 24px 8px; }
.epp-hm-label { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.4; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; color: var(--epp-hm-accent); }
.epp-hm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--epp-hm-accent); flex: 0 0 9px; }
.epp-hm-dialog .epp-hm-close, .epp-hm-dialog .epp-hm-ok { appearance: none; border: 0; text-decoration: none; text-transform: none; cursor: pointer; font-family: inherit; box-shadow: none; margin: 0; }
.epp-hm-dialog .epp-hm-close { width: 44px; height: 44px; padding: 0; flex: 0 0 44px; display: grid; place-items: center; border-radius: 50%; font-size: 28px; line-height: 1; background: #edf4f6; color: var(--epp-hm-ink); }
.epp-hm-dialog .epp-hm-close:hover { background: #dcecef; }
.epp-hm-content { padding: 0 30px 24px; }
.epp-hm-dialog .epp-hm-heading { margin: 0 0 16px; padding: 0; font-family: inherit; font-size: clamp(24px, 4vw, 32px); line-height: 1.2; font-weight: 700; color: var(--epp-hm-ink); letter-spacing: -.025em; overflow-wrap: anywhere; }
.epp-hm-dialog .epp-hm-heading:focus { outline: none; }
.epp-hm-image { border-radius: 12px; overflow: hidden; background: #f0f6f7; margin: 0 0 18px; }
.epp-hm-image img { display: block; width: 100%; height: auto; max-height: min(300px, 38vh); object-fit: contain; margin: 0; }
.epp-hm-body { font-size: 16px; line-height: 1.65; color: #334d5d; white-space: pre-wrap; overflow-wrap: anywhere; }
.epp-hm-footer { display: flex; justify-content: flex-end; background: #f4f8f9; border-top: 1px solid #e1eaed; padding: 15px 30px 19px; }
.epp-hm-dialog .epp-hm-ok { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 26px; border-radius: 8px; background: var(--epp-hm-accent); color: #fff; font-size: 15px; font-weight: 700; line-height: 1.4; }
.epp-hm-dialog .epp-hm-ok:hover { background: #006171; color: #fff; }
.epp-hm-dialog button:focus-visible { outline: 3px solid #173c55; outline-offset: 3px; }
.epp-hm-admin #epp-hm-form { max-width: 860px; }
.epp-hm-admin #epp-hm-image-preview { display: block; max-width: min(340px,100%); max-height: 220px; object-fit: contain; margin-bottom: 12px; }
.epp-hm-admin [hidden] { display: none !important; }
@keyframes epp-hm-appear { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) {
    .epp-hm-dialog { width: calc(100% - 24px); border-radius: 15px; max-height: calc(100% - 24px); max-height: calc(100dvh - 24px); }
    .epp-hm-top { padding: 12px 15px 8px; }
    .epp-hm-content { padding: 0 20px 20px; }
    .epp-hm-footer { padding: 12px 20px 16px; }
    .epp-hm-dialog .epp-hm-ok { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .epp-hm-dialog[open] { animation: none; } }
