/* Aide des shortcodes : icône « ? » + panneau latéral (Popover API). Voir DEMG_Shortcode_Help. */
.demg-help-bar { display: flex; justify-content: flex-end; margin: 0 0 12px; }

.demg-help-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin: 0; padding: 0 14px 0 6px;
  border: 1px solid #d8dce8; border-radius: 999px; background: #fff; color: #2f2483;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer; box-shadow: none; text-transform: none;
}
.demg-help-toggle > span[aria-hidden] {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; background: #edebfa; color: #2f2483; font-size: 14px; font-weight: 800;
}
.demg-help-toggle:hover { border-color: #bdb7e4; background: #f7f6ff; color: #2f2483; }
.demg-help-toggle:focus-visible, .demg-help-close:focus-visible { outline: 2px solid #2f2483; outline-offset: 2px; }

/* Panneau : à droite sur ordinateur, plein écran sur mobile */
.demg-help-panel {
  box-sizing: border-box; position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw); height: 100dvh; max-height: none;
  margin: 0; padding: 0; overflow: auto; border: 0; border-left: 1px solid #e7e8f2; background: #fff; color: #1b2233;
  box-shadow: -18px 0 50px rgba(14, 18, 32, .18); font-size: 15px; line-height: 1.6; text-align: left;
}
.demg-help-panel::backdrop { background: rgba(14, 18, 32, .45); }
.demg-help-panel:popover-open { animation: demg-help-in .2s ease-out; }
@keyframes demg-help-in { from { opacity: 0; transform: translateX(24px); } }

.demg-help-head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid #eceef4; background: #fff;
}
.demg-help-head h2 { margin: 0; color: #10162b; font-size: 17px; font-weight: 750; line-height: 1.3; letter-spacing: 0; }
.demg-help-close {
  flex: 0 0 auto; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 8px;
  background: #f1f2f6; color: #344057; font-size: 22px; line-height: 1; cursor: pointer;
}
.demg-help-close:hover { background: #e4e6ee; color: #10162b; }

.demg-help-body { padding: 18px 20px 28px; }
.demg-help-body > :first-child { margin-top: 0; }
.demg-help-body p, .demg-help-body ul, .demg-help-body ol { margin: 0 0 14px; }
.demg-help-body ul, .demg-help-body ol { padding-left: 20px; }
.demg-help-body li { margin: 0 0 6px; }
.demg-help-body h3 { margin: 22px 0 8px; color: #10162b; font-size: 15px; font-weight: 750; line-height: 1.35; }
.demg-help-body a { color: #2f2483; text-decoration: underline; }
.demg-help-body strong { color: #10162b; }
.demg-help-body img { max-width: 100%; height: auto; border-radius: 8px; }

@media (max-width: 640px) {
  .demg-help-toggle-text { display: none; }
  .demg-help-toggle { padding: 0 5px; }
  .demg-help-panel { width: 100vw; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .demg-help-panel:popover-open { animation: none; } }
