/* The animated demonstrations' common parts (public/js/demo-engine.js): the block on the page (its title, the stage's
   viewport, the steps said in words, the caption and the pause button), the stage's transitions cut while a step is
   put in place, and the pointer. Each demonstration draws its own stage: public/css/builder-demo.css (the site
   generator), public/css/wordpress-demo.css (the Générateur Dowebo pour WordPress). */

/* ------------------------------------------------------------------ the block on the page */
.gdemo { margin: 36px 0 0; }
.gdemo-head h3 { max-width: 760px; margin: 0; color: var(--ink); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.15; letter-spacing: -.03em; }
.gdemo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; margin-top: 22px; }
.gdemo:not(.is-live) .gdemo-layout { grid-template-columns: minmax(0, 1fr); }
.gdemo-viewport { position: relative; overflow: hidden; border-radius: 16px; background: #1b2330; box-shadow: 0 2px 4px rgba(15, 23, 42, .08), 0 24px 60px rgba(15, 23, 42, .18); }
.gdemo-viewport[hidden] { display: none; }
.gdemo-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.gdemo:not(.is-live) .gdemo-steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gdemo-steps button { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; width: 100%; padding: 13px 14px; overflow: hidden; border: 2px solid var(--line); border-radius: 16px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.gdemo:not(.is-live) .gdemo-steps button { cursor: default; }
.gdemo-steps button:hover { border-color: #c6d2e4; }
.gdemo-steps button[aria-current="step"] { border-color: var(--blue); background: var(--surface-blue, #eef3ff); }
.gdemo-steps button:focus-visible, .gdemo-pause:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.gdemo-step-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #eef1f6; color: var(--ink); font-size: .85rem; font-weight: 800; }
.gdemo-steps button[aria-current="step"] .gdemo-step-number { background: var(--blue); color: #fff; }
.gdemo-step-body { display: grid; gap: 3px; align-content: center; min-width: 0; }
.gdemo-step-body strong { color: var(--ink); font-size: .98rem; letter-spacing: -.01em; }
.gdemo-step-text { color: var(--body); font-size: .86rem; line-height: 1.45; }
.gdemo.is-live .gdemo-steps button:not([aria-current="step"]) .gdemo-step-text { display: none; }
.gdemo-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--gdemo-progress, 0) * 100%); background: var(--blue); }
.gdemo-steps button:not([aria-current="step"]) .gdemo-progress { display: none; }
.gdemo-caption { display: none; min-height: 3em; margin: 0 0 12px; color: var(--body); font-size: .95rem; line-height: 1.5; }
.gdemo-caption[hidden] { display: none !important; }
.gdemo-pause { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; }
.gdemo-pause::before { content: ""; width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.gdemo-pause[aria-pressed="true"]::before { width: 0; height: 0; border: 6px solid transparent; border-left: 10px solid currentColor; border-right: 0; }
.gdemo-pause[hidden] { display: none; }
@media (max-width: 1000px) {
    .gdemo-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .gdemo.is-live .gdemo-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gdemo.is-live .gdemo-steps .gdemo-step-text { display: none; }
    .gdemo.is-live .gdemo-caption { display: block; }
    .gdemo-steps button { padding: 11px 12px; }
}
@media (max-width: 560px) {
    .gdemo-viewport { border-radius: 12px; }
    .gdemo-step-body strong { font-size: .9rem; }
    .gdemo-steps button { grid-template-columns: 26px minmax(0, 1fr); gap: 9px; }
    .gdemo-step-number { width: 26px; height: 26px; }
}

/* ------------------------------------------------------------------ the stage, whichever it is */
[data-gdemo-stage].is-instant, [data-gdemo-stage].is-instant * { transition: none !important; animation: none !important; }

/* The pointer, moved and pressed by the engine (its own rules win over a stage's rules for its svg and its children). */
[data-gdemo-stage] .gd-cursor { position: absolute; z-index: 60; top: 0; left: 0; width: 24px; height: 24px; transform: translate(var(--x, 640px), var(--y, 400px)); transition: transform var(--gd-move, .7s) cubic-bezier(.45, 0, .2, 1), opacity .3s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
[data-gdemo-stage] .gd-cursor svg { width: 24px; height: 24px; fill: #fff; stroke: #111827; stroke-width: 1.4; }
[data-gdemo-stage] .gd-cursor::before { content: ""; position: absolute; top: -10px; left: -10px; width: 24px; height: 24px; border-radius: 50%; background: rgba(50, 107, 255, .35); opacity: 0; transform: scale(.3); }
[data-gdemo-stage] .gd-cursor.is-down::before { animation: gd-press .45s ease-out; }
@keyframes gd-press { 0% { opacity: 1; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }
[data-gdemo-stage].no-cursor .gd-cursor { opacity: 0; }

/* ------------------------------------------------------------------ the customer area's frame (website/partials/demo-area-frame)
   In the demonstrations that show the customer area (domain-demo, mail-demo), as public/css/customer-app.css draws it:
   the Newscloud suite bar (40 px) along the top, the white rail (74 px) on the left with « Services » on pale blue. */
[data-gdemo-stage] .gd-suite { position: absolute; z-index: 2; top: 0; right: 0; left: 0; display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-bottom: 1px solid #e4e8f0; background: #fff; color: #4a5468; font: 600 10.5px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
[data-gdemo-stage] .gd-suite svg, [data-gdemo-stage] .gd-rail svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-gdemo-stage] .gd-suite svg { width: 13px; height: 13px; }
[data-gdemo-stage] .gd-suite-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 0 4px; border: 1px solid #e4e8f0; border-radius: 8px; white-space: nowrap; }
[data-gdemo-stage] .gd-suite-chip b { color: #0e1525; }
[data-gdemo-stage] .gd-suite-chip.is-plain { padding: 0 9px; }
[data-gdemo-stage] .gd-suite-chip i, [data-gdemo-stage] .gd-suite-apps i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: #1f2633; color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
[data-gdemo-stage] .gd-suite-chip i.is-blue { background: #fff; color: #145cff; box-shadow: inset 0 0 0 1px #e4e8f0; }
[data-gdemo-stage] .gd-suite-apps { display: flex; gap: 5px; }
[data-gdemo-stage] .gd-suite-apps i { width: 26px; height: 26px; border-radius: 8px; }
[data-gdemo-stage] .gd-suite-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
[data-gdemo-stage] .gd-suite-bell { display: grid; }
[data-gdemo-stage] .gd-suite-user { display: inline-flex; align-items: center; gap: 7px; color: #2a3242; white-space: nowrap; }
[data-gdemo-stage] .gd-suite-user i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eef1f6; font-size: 9px; font-style: normal; font-weight: 700; }
[data-gdemo-stage] .gd-rail { position: absolute; z-index: 2; top: 40px; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 74px; padding: 12px 0; border-right: 1px solid #e4e8f0; background: #fff; font: 600 9.5px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
[data-gdemo-stage] .gd-rail-logo { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; }
[data-gdemo-stage] .gd-rail-logo i { width: 18px; height: 22px; border-radius: 3px 8px 8px 3px; background: #145cff; box-shadow: 6px -6px 0 -3px #69c7ed; }
[data-gdemo-stage] .gd-rail-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 60px; min-height: 50px; border-radius: 12px; color: #4a5468; }
[data-gdemo-stage] .gd-rail-link svg { width: 17px; height: 17px; }
[data-gdemo-stage] .gd-rail-link.is-active { background: #eaf0ff; color: #145cff; }
[data-gdemo-stage] .gd-rail-link.is-help { color: #5b6477; }
[data-gdemo-stage] .gd-rail-sep { width: 34px; height: 1px; margin: 6px 0; background: #e4e8f0; }
