.mm-gbc-preview { min-width: 0; color: #202432; }
.mm-gbc-preview[hidden] { display: none !important; }
.mm-gbc-preview .mm-gbc-badge { display: inline-block; padding: 5px 9px; background: #e9edf7; color: #394f84; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mm-gbc-preview h3 { margin: 14px 0 8px; font-size: 23px; line-height: 1.3; }
.mm-gbc-figure { margin: 0; padding: 12px 16px 16px; background: #fff; border: 1px solid #d7dce7; }
.mm-gbc-figure > svg { display: block; width: 100%; height: 385px; margin: auto; opacity: 0; }
.mm-gbc-figure > svg[hidden] { display: none; }
.mm-gbc-preview.is-ready .mm-gbc-figure > svg { opacity: 1; }
.mm-gbc-figure figcaption { margin-top: 10px; font-size: 15px; font-weight: 700; text-align: center; }
.mm-gbc-note { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: #555e70; }
.mm-gbc-preview .mm-gbc-warning { margin: 14px 0 0; padding: 14px; border: 1px solid #c38917; border-left-width: 5px; background: #fff4d6; color: #5b3b08; font-size: 14px; line-height: 1.6; }
.mm-gbc-preview .mm-gbc-warning p { margin: 0; font-size: inherit; line-height: inherit; }
.mm-gbc-preview .mm-gbc-warning .mm-gbc-warning-title { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.mm-gbc-warning-title svg { flex: 0 0 22px; margin-top: 1px; }
.mm-gbc-note:empty { display: none; }
.mm-gbc-source { margin-top: 8px; font-size: 12px; line-height: 1.6; color: #687185; }
.mm-gbc-prototype .mm-gbc-preview { position: sticky; top: 110px; align-self: start; padding-top: 30px; }
.mm-gbc-prototype .mm-gbc-preview h3 { font-family: inherit; font-size: 21px; }
.mm-gbc-prototype .mm-gbc-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; gap: 30px; }
.mm-gbc-prototype .mm-gbc-layout:has(> .mm-gbc-preview[hidden]) { grid-template-columns: minmax(0, 1fr); }
.mm-gbc-prototype .mm-gbc-options { min-width: 0; }
.mm-gbc-prototype .mm-gbc-options:not(.mm-config-style-editor) .mm-config-cards { grid-template-columns: minmax(0, 1fr); }
.mm-gbc-prototype .mm-gbc-options:not(.mm-config-style-editor) .mm-config-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mm-gbc-prototype .mm-gbc-options:not(.mm-config-style-editor) .mm-config-color-card > span { flex-direction: column; align-items: flex-start; padding-right: 22px; gap: 6px; }
.mm-gbc-prototype .mm-gbc-options:not(.mm-config-style-editor) .mm-config-color-card img { width: 70px; height: 70px; flex-basis: auto; object-fit: contain; }
.mm-gbc-shell-thumb { display: block; width: 70px; height: 70px; flex: 0 0 70px; background: #fff; }
.mm-gbc-preview.mm-console-landscape .mm-gbc-figure > svg { height: 245px; }
.mm-console-model { margin-bottom: 24px; }
.mm-console-model label { display: block; margin-bottom: 7px; font-weight: 700; }
.mm-console-model select { width: 100%; min-height: 44px; padding: 8px 12px; border: 2px solid #c7d0e2; background: white; color: #202432; font: inherit; }
.mm-gbc-preview fieldset { border: 0; margin: 0 0 26px; padding: 0; }
.mm-gbc-preview legend { padding: 0; margin-bottom: 14px; font-size: 18px; font-weight: 700; }
.mm-gbc-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.mm-gbc-swatch { position: relative; cursor: pointer; }
.mm-gbc-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mm-gbc-swatch > span { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 8px 12px; border: 2px solid #c7d0e2; background: #fff; font-size: 14px; }
.mm-gbc-swatch i { width: 21px; height: 21px; flex-shrink: 0; border: 1px solid #0003; border-radius: 50%; }
.mm-gbc-swatch input:checked + span { border-color: #394f84; background: #e9edf7; box-shadow: inset 0 0 0 1px #394f84; }
.mm-gbc-swatch input:focus-visible + span { outline: 3px solid #087f5b; outline-offset: 3px; }
@media (max-width: 760px) {
    .mm-gbc-prototype .mm-gbc-layout { display: block; }
    .mm-gbc-prototype .mm-gbc-preview { position: static; padding-top: 10px; }
    .mm-gbc-prototype .mm-gbc-preview h3 { margin-top: 9px; font-size: 18px; }
    .mm-gbc-prototype .mm-gbc-figure { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; }
    .mm-gbc-prototype .mm-gbc-figure > svg { height: 165px; }
    .mm-gbc-prototype .mm-gbc-figure figcaption { text-align: left; font-size: 13px; }
    .mm-gbc-prototype .mm-console-landscape .mm-gbc-figure > svg { height: 115px; }
    .mm-gbc-prototype .mm-gbc-options:not(.mm-config-style-editor) .mm-config-color-card > span { flex-direction: row; }
}
@media (max-width: 360px) {
    .mm-gbc-prototype .mm-gbc-options:not(.mm-config-style-editor) .mm-config-color-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Form presentation inspired by the one-photo lab; the demo stays independent. */
.mm-config-style-notice .mm-gbc-warning { margin: 14px 0 24px; border-radius: 9px; }
.mm-gbc-prototype .mm-config-style-notice { position: static; padding: 0; }
.mm-gbc-prototype .mm-gbc-layout { grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); gap: 28px; }
.mm-gbc-prototype .mm-gbc-layout .mm-gbc-preview { padding: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color: #19382e; }
.mm-gbc-prototype .mm-gbc-layout .mm-gbc-preview h3 { margin: 10px 0 16px; font-size: 21px; }
.mm-gbc-prototype .mm-gbc-badge { background: #e5f4eb; color: #145039; border-radius: 6px; font-size: 10px; }
.mm-gbc-prototype .mm-gbc-figure { padding: 12px 12px 16px; border-color: #dfe5df; border-radius: 18px; background: #fff; }
.mm-console-preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 4px 8px; font-size: 12px; }
.mm-console-preview-toolbar span { font-weight: 650; }
.mm-console-preview-toolbar button { border: 0; padding: 8px; background: transparent; box-shadow: none; color: #19382e; font: inherit; text-decoration: underline; text-underline-offset: 4px; }
.mm-console-preview-toolbar button:focus-visible, .mm-console-preview-viewport:focus-visible { outline: 3px solid #087f5b; outline-offset: 3px; }
.mm-console-preview-viewport { height: 460px; overflow: auto; }
.mm-console-preview-viewport svg { display: block; width: 100%; height: 100%; opacity: 0; }
.mm-gbc-preview.is-ready .mm-console-preview-viewport svg { opacity: 1; }
.mm-console-preview-viewport svg[hidden] { display: none; }
.mm-console-preview-viewport.is-zoomed svg { width: 150%; height: auto; max-width: none; }
.mm-gbc-prototype .mm-gbc-figure figcaption { margin: 10px 0 0; padding: 0 8px; color: #19382e; font-size: 13px; line-height: 1.55; }
.mm-gbc-prototype .mm-console-landscape .mm-console-preview-viewport { height: 290px; }
@media(max-width:760px) {
    .mm-gbc-prototype .mm-gbc-layout { display: block; }
    .mm-gbc-prototype .mm-gbc-layout .mm-gbc-preview { position: static; margin: 0 0 25px; }
    .mm-gbc-prototype .mm-gbc-figure { display: block; }
    .mm-console-preview-viewport { height: 315px; }
    .mm-gbc-prototype .mm-console-landscape .mm-console-preview-viewport { height: 190px; }
    .mm-gbc-prototype .mm-gbc-figure figcaption { text-align: center; }
}

/* Mobile : l'image reste sous le header pendant le choix des couleurs.
   L'aside s'efface (display: contents) pour que la figure colle sur toute la
   hauteur des options ; titre et mentions défilent normalement. */
@media(max-width:760px) {
    .mm-gbc-prototype .mm-gbc-layout { display: flex; flex-direction: column; align-items: stretch; }
    .mm-gbc-prototype .mm-gbc-layout > .mm-gbc-preview { display: contents; }
    .mm-gbc-prototype .mm-gbc-layout .mm-gbc-figure { position: sticky; top: var(--mm-config-sticky-top, 0px); z-index: 3; padding: 8px 8px 10px; box-shadow: 0 8px 12px -10px #19382e66; }
    .mm-gbc-prototype .mm-gbc-layout .mm-console-preview-toolbar { display: none; }
    .mm-gbc-prototype .mm-gbc-layout .mm-console-preview-viewport { height: min(28vh, 220px); overflow: hidden; }
    .mm-gbc-prototype .mm-gbc-layout .mm-console-landscape .mm-console-preview-viewport { height: min(20vh, 150px); }
    .mm-gbc-prototype .mm-gbc-layout .mm-console-preview-viewport.is-zoomed svg { width: 100%; height: 100%; }
    .mm-gbc-prototype .mm-gbc-layout .mm-gbc-figure figcaption { margin-top: 6px; font-size: 13px; line-height: 1.4; }
    .mm-gbc-prototype .mm-gbc-layout .mm-gbc-source { margin-bottom: 24px; }
}
