/*
 * The homepage's animated editor mock (widget 2): the .pf-ed stage driven by
 * platform_editor.js, with its own demo palette. Split from platform.css on
 * the builder_canvas.css model; it reads the .pf tokens, so platform.css
 * loads first (platform.js imports both, in that order).
 */

/* The mock editor. Its own palette: the demo shows a tenant site, whose colors
   are deliberately not Devanta's brand tokens. */
.pf-ed {
    --pf-ed-chrome: var(--brand-rail);
    --pf-ed-gutter: var(--brand-canvas);
    --pf-ed-line: var(--brand-line);
    --pf-ed-line-soft: var(--brand-line-soft);
    --pf-ed-frame-line: #2b2b20;
    --pf-ed-frame-soft: #d8d4c8;
    --pf-ed-bar-line: #000;
    --pf-ed-preview: #f4f2ea;
    --pf-ed-sel-bg: var(--brand-lime-surface);
    --pf-ed-ok: var(--brand-lime-ink);
    --pf-ed-del: var(--brand-danger);
    --pf-ed-del-soft: var(--brand-danger-on-ink);

    /* The pending queue's amber signal on the dark bar (--hb-warn-*). */
    --pf-ed-warn-bg: #3a3418;
    --pf-ed-warn-line: #7f6f1e;
    --pf-ed-warn-ink: #e7d98a;
    --pf-ed-warn-dot: #e2c447;
    --pf-ed-warn-dot-rgb: 226, 196, 71;
    /* Lime on the dark dock: « Ajouter » (--hb-lime-shade). */
    --pf-ed-lime-shade: #2f3a12;

    /* The mock's chrome, the half that is not the fake site below: the dark
       bar, the rail and the small print. Named here for the reason the site
       colors are, rather than inlined down the file. */
    --pf-ed-bar-ink: #cfcdc0;
    --pf-ed-bar-edge: #3a3a2b;
    --pf-ed-bar-well: #242419;
    --pf-ed-chip: #f1eee6;
    --pf-ed-rail-ink: #b6b3a4;
    --pf-ed-rail-dim: #c2bfb2;
    --pf-ed-rail-faint: #9a9789;
    --pf-ed-band-ink: #b5b0a6;
    --pf-ed-label: #6b6960;
    --pf-ed-meta: #a9a596;
    --pf-ed-caption: #5d5b52;

    /* Chez Margot's compiled theme (Preset::Margot, light scheme), copied by hand. */
    --pf-ed-site-bg: #ffffff;
    --pf-ed-site-panel: #fafafa;
    --pf-ed-site-line: #e6e6e6;
    --pf-ed-site-ink: #141414;
    --pf-ed-site-muted: #5a5a5a;
    --pf-ed-site-faint: #8f8f8f;
    --pf-ed-site-acc: #b94643;
    --pf-ed-site-acc-text: #af3c3b;
    --pf-ed-site-radius: 4px;
    --pf-ed-site-display: 'Libre Caslon Text', georgia, serif;
    --pf-ed-site-body: 'Karla', system-ui, sans-serif;
    --pf-ed-site-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --pf-ed-site-board: #161616;
    --pf-ed-site-board-frame: #333333;
    --pf-ed-site-chalk-line: rgba(255, 255, 255, 0.28);
    --pf-ed-site-open: #1d6b34;
    --pf-ed-site-open-bg: #e6f2e9;

    /* The template's own photographs, cut down to 640px for the mock. */
    --pf-ed-photo-salle: url("../images/editor-demo/salle-Hj08W4O.webp");
    --pf-ed-photo-cave: url("../images/editor-demo/cave-3R-B3Zf.webp");
    --pf-ed-photo-ardoise: url("../images/editor-demo/ardoise-qJMm1lO.webp");
    --pf-ed-photo-cheffe: url("../images/editor-demo/cheffe-xyPlSAx.webp");
    --pf-ed-photo-passe: url("../images/editor-demo/passe-WQ5waiW.webp");
    --pf-ed-photo-hero: url("../images/editor-demo/hero-u6ubPxM.webp");

    --pf-ed-scale: 1;
    --pf-ed-x: 620px;
    --pf-ed-y: 520px;
    --pf-ed-scroll: 0px;
    --pf-ed-drag: 0px;
    --pf-ed-modal: 0;
    --pf-ed-mlib: 0;
    --pf-ed-ripple: 1;


    color: var(--pf-ink);
}

.pf-ed__wrap {
    --pf-ed-fit: var(--pf-ed-scale);
    position: relative;
    height: calc(640px * var(--pf-ed-fit));
}

.pf-ed__shell {
    position: absolute;
    top: 0;
    left: 0;
    width: 1120px;
    height: 640px;
    transform-origin: top left;
    transform: scale(var(--pf-ed-fit));
    border-radius: 14px;
    overflow: hidden;
    background: var(--pf-ed-gutter);
    border: 1px solid var(--pf-ed-frame-line);
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.65);
    font-size: 10px;
}

/* ---- shell top bar ---- */
.pf-ed__bar {
    position: relative;
    z-index: 4;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    background: var(--pf-dark);
    color: var(--pf-cream);
    border-bottom: 1px solid var(--pf-ed-bar-line);
}

.pf-ed__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--pf-font-display);
    font-stretch: 115%;
    font-weight: 650;
    font-size: 15px;
    letter-spacing: -0.03em;
}

.pf-ed__brand-mark {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    background: var(--pf-lime);
    color: var(--pf-ink);
    border-radius: 7px;
}

.pf-ed__brand-mark .brand-logo {
    width: 15px;
    height: 15px;
}

.pf-ed__site-name {
    padding-left: 14px;
    border-left: 1px solid var(--pf-dark-slot);
    font-size: 10.5px;
    font-weight: 600;
}

.pf-ed__ghost {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--pf-font-mono);
    font-size: 8.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pf-ed-bar-ink);
    border: 1px solid var(--pf-ed-bar-edge);
    padding: 7px 12px;
    border-radius: var(--pf-pill);
}

/* The page switcher, undo and redo, and the autosave: the editor's bar carries them since v6. */
.pf-ed__pages {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: var(--pf-ed-bar-well);
    border: 1px solid var(--pf-ed-bar-edge);
    border-radius: 7px;
    font-size: 9.5px;
    font-weight: 600;
    white-space: nowrap;
}

.pf-ed__pages i {
    font-size: 8.5px;
    color: var(--pf-on-dark-faint);
}

.pf-ed__pages i:last-child {
    font-size: 6.5px;
}

.pf-ed__history {
    display: inline-flex;
    gap: 2px;
}

.pf-ed__history-btn {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--pf-ed-bar-edge);
    background: var(--pf-ed-bar-well);
    font-size: 8px;
}

.pf-ed__history-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.pf-ed__history-btn:last-child {
    border-radius: 0 6px 6px 0;
    color: var(--pf-on-dark-faint);
}

.pf-ed__save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    color: var(--pf-on-dark-faint);
}

.pf-ed__save-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--pf-ed-ok);
}

.pf-ed__state-pending,
.pf-ed.is-modified .pf-ed__state-live {
    display: none;
}

.pf-ed.is-modified .pf-ed__state-pending {
    display: inline;
}

/* ---- the pending-changes queue ----
   One verb to go live: the chip is the only publish control, and an empty
   queue renders an inert one, as .hb-queue does in the editor. */
.pf-ed__queue-idle,
.pf-ed__queue-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--pf-pill);
    white-space: nowrap;
    font-family: var(--pf-font-mono);
    font-size: 8.5px;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.pf-ed__queue-idle {
    background: var(--pf-ed-bar-well);
    border: 1px solid var(--pf-dark-slot);
    color: var(--pf-on-dark-faint);
}

.pf-ed__queue-chip {
    display: none;
    background: var(--pf-ed-warn-bg);
    border: 1px solid var(--pf-ed-warn-line);
    color: var(--pf-ed-warn-ink);
    transition: box-shadow 0.25s ease;
}

.pf-ed.is-modified .pf-ed__queue-idle {
    display: none;
}

.pf-ed.is-modified .pf-ed__queue-chip {
    display: inline-flex;
}

.pf-ed.is-pulse-queue .pf-ed__queue-chip {
    box-shadow: 0 0 0 5px rgba(var(--pf-ed-warn-dot-rgb), 0.3);
}

.pf-ed__queue-dot {
    width: 6px;
    height: 6px;
    flex: none;
    border-radius: 50%;
    background: var(--pf-dark-slot);
}

.pf-ed__queue-chip .pf-ed__queue-dot {
    background: var(--pf-ed-warn-dot);
}

.pf-ed__queue-chip i {
    font-size: 7px;
    opacity: 0.75;
}

.pf-ed__queue-panel {
    display: none;
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 5;
    width: 252px;
    flex-direction: column;
    padding: 12px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-ed-line);
    border-radius: 10px;
    box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.5);
    color: var(--pf-ink);
}

.pf-ed.is-queue .pf-ed__queue-panel {
    display: flex;
}

.pf-ed__queue-eyebrow {
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.pf-ed__queue-saved,
.pf-ed__cat-count {
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    color: var(--pf-faint);
}

.pf-ed__queue-item {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 7px;
    background: var(--pf-ed-chrome);
    border: 1px solid var(--pf-ed-line-soft);
    border-radius: 7px;
    font-size: 9px;
}

.pf-ed.is-modified .pf-ed__queue-item--hero,
.pf-ed.is-swapped .pf-ed__queue-item--moved,
.pf-ed.is-cta .pf-ed__queue-item--cta {
    display: flex;
}

.pf-ed__queue-scope {
    flex: none;
    padding: 2px 5px;
    border-radius: var(--pf-pill);
    background: var(--pf-ed-chip);
    color: var(--pf-muted);
    font-family: var(--pf-font-mono);
    font-size: 7px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pf-ed__queue-time {
    flex: none;
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    color: var(--pf-faint);
}

.pf-ed__queue-publish {
    text-align: center;
    padding: 8px 0;
    background: var(--pf-lime);
    color: var(--pf-ink);
    border-radius: 8px;
    font-family: var(--pf-font-mono);
    font-size: 9px;
    letter-spacing: 0.05em;
    font-weight: 600;
    transition: box-shadow 0.25s ease;
}

.pf-ed.is-pulse-publish .pf-ed__queue-publish {
    box-shadow: 0 0 0 5px rgba(var(--pf-lime-rgb), 0.35);
}

/* The confirmation is the editor's own toast (.app-toast): bottom, centered, above the dock. */
.pf-ed__toast {
    position: absolute;
    left: 50%;
    bottom: 56px;
    z-index: 15;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 9px 12px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-ed-line);
    border-radius: 10px;
    font-size: 9.5px;
    color: var(--pf-ink);
    box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.pf-ed.is-published .pf-ed__toast {
    opacity: 1;
    transform: translate(-50%, 0);
}

.pf-ed__toast-dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--pf-lime);
}

.pf-ed__toast-link {
    font-family: var(--pf-font-mono);
    font-size: 8px;
    color: var(--pf-ed-ok);
    text-decoration: underline;
}

/* ---- the body: the page fills it, the structure floats over it (.hb-panel), the dock under it ---- */
.pf-ed__body {
    position: relative;
    height: 594px;
}

.pf-ed__panel {
    position: absolute;
    z-index: 6;
    top: 10px;
    bottom: 54px;
    left: 10px;
    width: 250px;
    display: none;
    flex-direction: column;
    padding: 12px;
    overflow: hidden;
    background: var(--pf-ed-chrome);
    border: 1px solid var(--pf-ed-line);
    border-radius: 12px;
    box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.45);
}

.pf-ed.is-structure .pf-ed__panel {
    display: flex;
}

.pf-ed__panel-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--pf-ed-line);
    border-radius: 6px;
    background: var(--pf-surface);
    font-size: 9px;
    color: var(--pf-muted);
}

.pf-ed__panel-label {
    margin: 5px 0 0;
    font-family: var(--pf-font-mono);
    font-size: 8px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.pf-ed__add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 12px;
    padding: 9px 0;
    border-radius: 9px;
    background: var(--pf-lime);
    color: var(--pf-ink);
    font-family: var(--pf-font-mono);
    font-size: 9px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.pf-ed__node,
.pf-ed__lib-item {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 8px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-ed-line-soft);
}

.pf-ed__grip {
    font-family: var(--pf-font-mono);
    font-size: 10px;
    color: var(--pf-ed-rail-ink);
    flex: none;
}

.pf-ed__node-icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 6px;
    font-size: 10px;
    background: var(--pf-ed-chip);
    color: var(--pf-faint);
}

.pf-ed__node-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    overflow: hidden;
}

.pf-ed__node-name {
    font-size: 9.5px;
    font-weight: 600;
}

/* The open block, as the structure marks it. */
.pf-ed:not(.is-sel-cta) .pf-ed__node--hero,
.pf-ed.is-sel-cta .pf-ed__node--cta {
    border-color: var(--pf-lime);
    background: var(--pf-ed-sel-bg);
}

.pf-ed__node-chev {
    flex: none;
    font-size: 7.5px;
    color: var(--pf-ed-rail-dim);
}

.pf-ed__node-meta {
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    color: var(--pf-ed-rail-faint);
}

.pf-ed__panel-hint {
    margin: 12px 0 0;
    font-size: 8.5px;
    line-height: 1.5;
    color: var(--pf-faint);
}

/* Block order. The structure and the canvas share it, so the reorder step is one
   class on the root; the CTA block only exists once it has been added. A seam
   carries the order of the block above it and follows it when the two swap,
   so document order alone decides which side of that block it lands on. */
.pf-ed__ins--top { order: 0; }
.pf-ed__node--announce, .pf-ed__sec--announce, .pf-ed__ins--announce { order: 1; }
.pf-ed__node--hero, .pf-ed__sec--hero, .pf-ed__ins--hero { order: 2; }
.pf-ed__node--ardoise, .pf-ed__sec--ardoise, .pf-ed__ins--ardoise { order: 3; }
.pf-ed__node--carte, .pf-ed__sec--carte, .pf-ed__ins--carte { order: 4; }
.pf-ed__node--cheffe, .pf-ed__sec--cheffe, .pf-ed__ins--cheffe { order: 5; }
.pf-ed__node--testimonials, .pf-ed__sec--testimonials, .pf-ed__ins--testimonials { order: 6; }
.pf-ed__node--hours, .pf-ed__sec--hours, .pf-ed__ins--hours { order: 7; }
.pf-ed__node--cta, .pf-ed__sec--cta, .pf-ed__ins--cta { order: 8; }

.pf-ed.is-swapped .pf-ed__node--testimonials,
.pf-ed.is-swapped .pf-ed__sec--testimonials,
.pf-ed.is-swapped .pf-ed__ins--testimonials {
    order: 5;
}

.pf-ed.is-swapped .pf-ed__node--cheffe,
.pf-ed.is-swapped .pf-ed__sec--cheffe,
.pf-ed.is-swapped .pf-ed__ins--cheffe {
    order: 6;
}

.pf-ed:not(.is-cta) .pf-ed__node--cta,
.pf-ed:not(.is-cta) .pf-ed__sec--cta,
.pf-ed:not(.is-cta) .pf-ed__ins--cta {
    display: none;
}

.pf-ed.is-dragging .pf-ed__node--testimonials {
    position: relative;
    z-index: 3;
    transform: translateY(var(--pf-ed-drag)) rotate(-0.7deg);
    box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.45);
}

.pf-ed.is-dragging .pf-ed__node--testimonials .pf-ed__grip {
    color: var(--pf-ed-ok);
}

/* ---- the canvas: the page in the whole frame ---- */
.pf-ed__canvas {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--pf-ed-gutter);
}

/* The preview is laid out at a device width and scaled to fit the desk
   (ADR-0007), so the phone keeps its own width instead of stretching the
   page across the pane. The open structure pushes the page aside. */
.pf-ed__desk {
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    padding: 12px 12px 56px;
    overflow: hidden;
    transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pf-ed.is-structure .pf-ed__desk {
    padding-left: 272px;
}

/* platform_editor.js measures the stops in each state at once: nothing may be read mid-slide. */
.pf-ed.is-measuring .pf-ed__desk,
.pf-ed.is-measuring .pf-ed__frame {
    transition: none;
}

.pf-ed__frame {
    width: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    background: var(--pf-surface);
    border: 1px solid var(--pf-ed-frame-soft);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 44px -24px rgba(0, 0, 0, 0.45);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The frame keeps the desk height, so its width is what sets the ratio: 244
   over the 526px desk is about 393 x 852, a reference phone viewport. */
.pf-ed.is-mobile .pf-ed__frame {
    width: 244px;
}

/* ---- the dock under the page (.hb-dock) ----
   Centered by its margins, not a transform, which platform_editor.js could not measure. */
.pf-ed__dock {
    position: absolute;
    z-index: 7;
    right: 0;
    bottom: 10px;
    left: 0;
    display: flex;
    width: fit-content;
    margin-inline: auto;
    align-items: center;
    gap: 3px;
    padding: 4px;
    background: var(--pf-dark);
    color: var(--pf-cream);
    border-radius: 11px;
    box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
}

.pf-ed__dock-btn,
.pf-ed__dock-icon,
.pf-ed__dock-zoom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 26px;
    border-radius: 7px;
    font-family: var(--pf-font-mono);
    font-size: 8px;
    letter-spacing: 0.03em;
    transition: background 0.2s ease, color 0.2s ease;
}

.pf-ed__dock-btn {
    padding: 0 9px;
}

.pf-ed__dock-btn i,
.pf-ed__dock-icon i {
    font-size: 9px;
}

.pf-ed__dock-btn--add {
    background: var(--pf-ed-lime-shade);
    color: var(--pf-lime);
}

.pf-ed__dock-icon {
    width: 26px;
}

.pf-ed__dock-icon--sm {
    width: 20px;
}

.pf-ed__dock-zoom {
    min-width: 34px;
    color: var(--pf-on-dark-faint);
}

.pf-ed__dock-view {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.pf-ed__dock-sep {
    width: 1px;
    height: 16px;
    margin: 0 3px;
    background: var(--pf-ed-bar-edge);
}

.pf-ed.is-structure .pf-ed__dock-btn--structure {
    background: var(--pf-lime);
    color: var(--pf-ink);
    font-weight: 600;
}

.pf-ed:not(.is-mobile) .pf-ed__dock-dev--desktop,
.pf-ed.is-mobile .pf-ed__dock-dev--mobile {
    background: var(--pf-cream);
    color: var(--pf-ink);
}

.pf-ed__zoom-panel,
.pf-ed__zoom-full,
.pf-ed.is-structure .pf-ed__zoom-fit,
.pf-ed.is-mobile .pf-ed__zoom-fit,
.pf-ed.is-mobile .pf-ed__zoom-panel {
    display: none;
}

.pf-ed.is-structure:not(.is-mobile) .pf-ed__zoom-panel,
.pf-ed.is-mobile .pf-ed__zoom-full {
    display: inline;
}

.pf-ed__view {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: var(--pf-ed-site-bg);
}

.pf-ed__page {
    display: flex;
    flex-direction: column;
    transform: translateY(calc(var(--pf-ed-scroll) * -1));
}

.pf-ed__flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(60% 60% at 50% 50%, rgba(var(--pf-lime-rgb), 0.55), transparent 70%);
}

.pf-ed.is-published .pf-ed__flash {
    animation: pf-ed-flash 0.9s ease-out forwards;
}

@keyframes pf-ed-flash {
    from { opacity: 0.9; }
    to { opacity: 0; }
}

.pf-ed.is-swapped .pf-ed__sec--testimonials {
    animation: pf-ed-moved 0.6s ease-out forwards;
}

@keyframes pf-ed-moved {
    from { box-shadow: inset 0 0 0 2px rgba(var(--pf-lime-rgb), 1); }
    to { box-shadow: inset 0 0 0 2px rgba(var(--pf-lime-rgb), 0); }
}

.pf-ed:not(.is-sel-cta) .pf-ed__sec--hero,
.pf-ed.is-sel-cta .pf-ed__sec--cta {
    outline: 2px solid var(--pf-lime);
    outline-offset: -2px;
}

/* Between two blocks: a zero-height row whose pill only shows on hover, so the
   page keeps its real rhythm (.hb-ins). The pill straddles the seam here, where
   .hb-ins__btn sits a half-height above it: align-items already centers it in a
   zero-height row, so that rule's translateY(-50%) shifts it a second time. */
.pf-ed__ins {
    position: relative;
    z-index: 3;
    height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.pf-ed.is-seam .pf-ed__ins--hours {
    opacity: 1;
}

.pf-ed__ins-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--pf-pill);
    background: var(--pf-dark);
    color: var(--pf-lime);
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 0 0 3px var(--pf-ed-site-bg);
    transition: box-shadow 0.25s ease;
}

.pf-ed.is-pulse-add .pf-ed__ins--hours .pf-ed__ins-btn {
    box-shadow: 0 0 0 3px var(--pf-ed-site-bg), 0 0 0 8px rgba(var(--pf-lime-rgb), 0.3);
}

/* The selected block's one bar (.hb-blockbar), a tab hooked to its top-left and lifted above it:
   by an offset, not a transform, which platform_editor.js could not measure. */
.pf-ed__bb {
    position: absolute;
    z-index: 4;
    bottom: 100%;
    left: 0;
    display: none;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    padding: 3px;
    background: var(--pf-dark);
    color: var(--pf-cream);
    border-radius: 7px 7px 0 0;
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.pf-ed:not(.is-sel-cta) .pf-ed__sec--hero > .pf-ed__bb,
.pf-ed.is-sel-cta .pf-ed__sec--cta > .pf-ed__bb {
    display: flex;
}

.pf-ed__bb-name {
    flex: none;
    padding: 0 5px;
    color: var(--pf-lime);
}

.pf-ed__bb-sep {
    flex: none;
    width: 1px;
    height: 13px;
    margin: 0 2px;
    background: var(--pf-ed-bar-edge);
}

.pf-ed__bb-btn {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 5px;
    height: 20px;
    padding: 0 7px;
    border-radius: 5px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.25s ease;
}

.pf-ed__bb-btn i {
    font-size: 8px;
}

.pf-ed__bb-layout {
    flex-shrink: 1;
    min-width: 0;
}

.pf-ed__bb-layout i:last-child {
    font-size: 6px;
    opacity: 0.7;
}

.pf-ed__bb-rank {
    flex: none;
    color: var(--pf-on-dark-faint);
}

.pf-ed.is-layouts .pf-ed__bb-layout {
    background: var(--pf-cream);
    color: var(--pf-ink);
}

.pf-ed.is-layouts .pf-ed__bb-rank {
    color: var(--pf-muted);
}

.pf-ed.is-pulse-variant .pf-ed__bb-layout {
    box-shadow: 0 0 0 3px rgba(var(--pf-lime-rgb), 0.45);
}

/* In the phone frame, as on a phone, the bar keeps the layout's rank and drops the words. */
.pf-ed.is-mobile .pf-ed__bb-label,
.pf-ed.is-mobile .pf-ed__bb-word {
    display: none;
}

.pf-ed__sel-tool {
    display: grid;
    flex: none;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    color: var(--pf-ed-bar-ink);
    font-size: 9px;
}

.pf-ed__sel-tool--del {
    color: var(--pf-ed-del-soft);
}

/* The layouts of the hero's type (.hb-layouts), in the flow under the bar: open, they push the
   block down rather than cover it. The pointer resting on one tries it on the page. */
.pf-ed__layouts {
    position: relative;
    z-index: 4;
    display: none;
    flex-direction: column;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    padding: 7px;
    background: var(--pf-dark);
    border-radius: 0 9px 9px;
    box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.55);
}

.pf-ed.is-layouts .pf-ed__layouts {
    display: flex;
}

.pf-ed__layouts-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--pf-font-mono);
    font-size: 6.5px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.pf-ed__layouts-eyebrow {
    color: var(--pf-lime);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.pf-ed__layouts-count {
    color: var(--pf-on-dark-faint);
}

.pf-ed__layouts-row {
    display: flex;
    gap: 5px;
    overflow: hidden;
}

/* ---- the mock tenant site inside the frame: Chez Margot, on its own theme ---- */
.pf-ed__site-nav {
    order: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 24px;
    background: var(--pf-ed-site-bg);
    border-bottom: 1px solid var(--pf-ed-site-line);
}

.pf-ed__site-logo {
    font-family: var(--pf-ed-site-display);
    font-weight: 700;
    font-size: 9.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pf-ed-site-ink);
}

.pf-ed__site-theme {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--pf-ed-site-line);
    border-radius: var(--pf-ed-site-radius);
    font-size: 8px;
    color: var(--pf-ed-site-acc-text);
}

.pf-ed__site-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-ed__burger {
    display: none;
    flex-direction: column;
    gap: 3px;
    padding: 4px 2px;
}

.pf-ed__burger span {
    display: block;
    width: 13px;
    height: 1.5px;
    background: var(--pf-ed-site-ink);
}

.pf-ed.is-mobile .pf-ed__site-links {
    display: none;
}

.pf-ed.is-mobile .pf-ed__burger {
    display: flex;
}

.pf-ed__site-eyebrow,
.pf-ed__sec-head,
.pf-ed__now-eyebrow {
    font-family: var(--pf-ed-site-mono);
    font-size: 6.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pf-ed-site-acc-text);
}

.pf-ed__site-btn {
    display: inline-block;
    padding: 9px 14px;
    background: var(--pf-ed-site-acc);
    color: var(--pf-ed-site-bg);
    border-radius: var(--pf-ed-site-radius);
    font-family: var(--pf-ed-site-mono);
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pf-ed__site-btn--sm {
    padding: 6px 10px;
    font-size: 6.5px;
}

.pf-ed__site-p {
    margin: 8px 0 0;
    font-family: var(--pf-ed-site-body);
    font-size: 9.5px;
    line-height: 1.6;
    color: var(--pf-ed-site-muted);
}

.pf-ed__site-link-acc {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--pf-ed-site-mono);
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pf-ed-site-acc-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pf-ed__h2 {
    font-family: var(--pf-ed-site-display);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.05;
    text-transform: uppercase;
    color: var(--pf-ed-site-ink);
}

/* The section label and its rule (_section_head.html.twig). */
.pf-ed__sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--pf-ed-site-faint);
}

.pf-ed__sec-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--pf-ed-site-line);
}

.pf-ed__pad {
    padding: 26px 24px;
    background: var(--pf-ed-site-bg);
}

.pf-ed__pad--panel {
    background: var(--pf-ed-site-panel);
    border-block: 1px solid var(--pf-ed-site-line);
}

.pf-ed__announce {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
    padding: 9px 24px;
    background: var(--pf-ed-site-acc);
    color: var(--pf-ed-site-bg);
    font-family: var(--pf-ed-site-body);
    font-size: 8.5px;
    font-weight: 500;
}

.pf-ed__announce-tag {
    font-family: var(--pf-ed-site-mono);
    font-size: 6.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* The hero, in the layout the demo starts from: text, then the photo beside it. */
.pf-ed__hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding: 30px 24px 34px;
    background: var(--pf-ed-site-bg);
}

.pf-ed__hero-text {
    flex: 1 1 200px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.pf-ed__hero-h {
    min-height: 1em;
    font-family: var(--pf-ed-site-display);
    font-weight: 700;
    font-size: 30px;
    line-height: 0.98;
    letter-spacing: -0.015em;
    text-transform: uppercase;
    color: var(--pf-ed-site-ink);
}

/* The title is typed in place (.hb-field): the ring while it holds the caret, the caret while the demo types. */
.pf-ed.is-focused .pf-ed__hero-h {
    outline: 2px solid var(--pf-lime);
    outline-offset: 4px;
    border-radius: 2px;
}

.pf-ed__caret {
    display: none;
    width: 2px;
    height: 0.85em;
    margin-left: 2px;
    vertical-align: -0.05em;
    background: currentcolor;
}

.pf-ed.is-typing .pf-ed__caret {
    display: inline-block;
    animation: pf-caret 0.9s steps(1, end) infinite;
}

.pf-ed__hero-lead {
    margin: 0 0 4px;
    font-family: var(--pf-ed-site-mono);
    font-size: 8.5px;
    color: var(--pf-ed-site-muted);
}

/* The médiathèque chapter swaps the hero's photograph: the root's `is-photo` decides which one is current. */
.pf-ed__media--hero {
    position: relative;
    flex: 1 1 200px;
    min-width: 0;
    aspect-ratio: 3 / 2;
    background-image: var(--pf-ed-photo-cave);
    transition: background-image 0.5s ease;
}

.pf-ed.is-photo .pf-ed__media--hero {
    background-image: var(--pf-ed-photo-salle);
}

/* « Changer l’image » over the photo under the pointer (.hb-image-pick): the way into the médiathèque. */
.pf-ed__pill {
    position: absolute;
    z-index: 3;
    display: none;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 5px;
    background: var(--pf-dark);
    color: var(--pf-ed-bar-ink);
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    transition: box-shadow 0.25s ease;
}

.pf-ed__pill--photo {
    top: 8px;
    left: 8px;
}

.pf-ed.is-photo-pill .pf-ed__pill--photo {
    display: inline-flex;
}

.pf-ed.is-pulse-pick .pf-ed__pill--photo {
    box-shadow: 0 0 0 5px rgba(var(--pf-lime-rgb), 0.3);
}

/* The layout chapter: the same hero content, laid out as « Image plein écran »
   (blocks/hero/full-screen.html.twig), the title centered over the photograph, first tried
   under the pointer (is-peek) then picked (is-variant). */
.pf-ed:is(.is-variant, .is-peek) .pf-ed__hero {
    overflow: hidden;
    min-height: 330px;
    justify-content: center;
    padding: 40px 32px;
    text-align: center;
    background: var(--pf-ed-site-ink);
}

.pf-ed:is(.is-variant, .is-peek) .pf-ed__media--hero {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    background-position: center 72%;
}

.pf-ed:is(.is-variant, .is-peek) .pf-ed__media--hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.52);
}

.pf-ed:is(.is-variant, .is-peek) .pf-ed__hero-text {
    position: relative;
    z-index: 1;
    flex: 0 1 470px;
    align-items: center;
}

.pf-ed:is(.is-variant, .is-peek) .pf-ed__hero-h,
.pf-ed:is(.is-variant, .is-peek) .pf-ed__hero-lead,
.pf-ed:is(.is-variant, .is-peek) .pf-ed__hero .pf-ed__site-eyebrow {
    color: var(--pf-ed-site-bg);
}

.pf-ed:is(.is-variant, .is-peek) .pf-ed__hero-h {
    font-size: 34px;
}

.pf-ed:is(.is-variant, .is-peek) .pf-ed__hero > * {
    animation: pf-ed-relayout 0.6s ease-out both;
}

@keyframes pf-ed-relayout {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pf-ed.is-mobile .pf-ed__hero-h {
    font-size: 22px;
}

.pf-ed.is-mobile:is(.is-variant, .is-peek) .pf-ed__hero {
    min-height: 380px;
    padding: 32px 18px;
}

.pf-ed.is-mobile:is(.is-variant, .is-peek) .pf-ed__hero-h {
    font-size: 25px;
}

.pf-ed__layout--after,
.pf-ed.is-variant .pf-ed__layout--before {
    display: none;
}

.pf-ed.is-variant .pf-ed__layout--after {
    display: inline;
}

/* The chalkboard (blocks/ardoise/craie.html.twig): the board in its frame, the photo beside it. */
.pf-ed__ardoise {
    display: flex;
    flex-wrap: wrap;
    border-radius: var(--pf-ed-site-radius);
    overflow: hidden;
    background: var(--pf-ed-site-board-frame);
}

.pf-ed__board {
    flex: 2 1 300px;
    min-width: 0;
    margin: 6px;
    padding: 20px 24px;
    background: var(--pf-ed-site-board);
    color: var(--pf-ed-site-bg);
}

.pf-ed__h2--chalk {
    color: var(--pf-ed-site-bg);
}

.pf-ed__board-note {
    font-family: var(--pf-ed-site-body);
    font-size: 7.5px;
}

.pf-ed__board-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 18px;
    row-gap: 2px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--pf-ed-site-chalk-line);
}

.pf-ed__board-course {
    width: 56px;
    font-family: var(--pf-ed-site-mono);
    font-size: 6px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.pf-ed__board-dish {
    flex: 1 1 160px;
    font-family: var(--pf-ed-site-display);
    font-size: 10.5px;
}

.pf-ed__board-formulas {
    display: flex;
    flex-wrap: wrap;
    column-gap: 22px;
    row-gap: 4px;
    margin-top: 12px;
    font-family: var(--pf-ed-site-body);
    font-size: 8.5px;
}

.pf-ed__board-photo {
    flex: 1 1 140px;
    min-height: 130px;
}

/* The evening menu (price_list::duo): two families, a dotted leader to each price. */
.pf-ed__menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px 30px;
    margin-top: 14px;
}

.pf-ed__menu-name {
    padding-bottom: 6px;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--pf-ed-site-ink);
    font-family: var(--pf-ed-site-mono);
    font-size: 6.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pf-ed-site-acc-text);
}

.pf-ed__menu-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
}

.pf-ed__menu-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pf-ed__menu-dish {
    font-family: var(--pf-ed-site-display);
    font-size: 10px;
    font-weight: 700;
    color: var(--pf-ed-site-ink);
}

.pf-ed__menu-dots {
    flex: 1;
    border-bottom: 1px dotted var(--pf-ed-site-faint);
}

.pf-ed__menu-price {
    font-family: var(--pf-ed-site-mono);
    font-size: 8px;
    font-weight: 600;
    color: var(--pf-ed-site-ink);
}

.pf-ed__menu-desc {
    font-family: var(--pf-ed-site-body);
    font-size: 8px;
    color: var(--pf-ed-site-muted);
}

/* The chef (content::split_wide): the photograph on two thirds, the text beside it. */
.pf-ed__cheffe {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.pf-ed__cheffe-photo {
    flex: 2 1 260px;
    aspect-ratio: 16 / 10;
    border-radius: var(--pf-ed-site-radius);
}

.pf-ed__cheffe-text {
    flex: 1 1 160px;
    min-width: 0;
}

.pf-ed__quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.pf-ed__quote {
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: var(--pf-ed-site-bg);
    border: 1px solid var(--pf-ed-site-line);
    border-radius: var(--pf-ed-site-radius);
}

.pf-ed__quote-text {
    flex: 1;
    margin: 0 0 10px;
    font-family: var(--pf-ed-site-display);
    font-size: 9.5px;
    line-height: 1.5;
    color: var(--pf-ed-site-ink);
}

.pf-ed__quote-name {
    font-family: var(--pf-ed-site-body);
    font-size: 8.5px;
    font-weight: 700;
    color: var(--pf-ed-site-ink);
}

.pf-ed__quote-role {
    font-family: var(--pf-ed-site-mono);
    font-size: 6.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pf-ed-site-faint);
}

/* The hours (opening_status::live): today's state, then the week. */
.pf-ed__hours {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 32px;
    margin-top: 14px;
}

.pf-ed__now {
    flex: 1 1 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pf-ed__now-eyebrow {
    color: var(--pf-ed-site-faint);
}

.pf-ed__now-state {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: var(--pf-pill);
    background: var(--pf-ed-site-open-bg);
    color: var(--pf-ed-site-open);
    font-family: var(--pf-ed-site-body);
    font-size: 8.5px;
    font-weight: 700;
}

.pf-ed__now-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.pf-ed__now-headline {
    font-family: var(--pf-ed-site-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--pf-ed-site-ink);
}

.pf-ed__week {
    flex: 2 1 240px;
    display: flex;
    flex-direction: column;
}

.pf-ed__week-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px solid var(--pf-ed-site-line);
    font-family: var(--pf-ed-site-body);
    font-size: 8.5px;
    color: var(--pf-ed-site-ink);
}

.pf-ed__week-row--today {
    font-weight: 700;
    color: var(--pf-ed-site-acc-text);
}

.pf-ed__band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 36px 24px;
    background: var(--pf-ed-site-ink);
}

.pf-ed__band-h {
    font-family: var(--pf-ed-site-display);
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    color: var(--pf-ed-site-bg);
}

.pf-ed__band-p {
    margin: 5px 0 0;
    font-family: var(--pf-ed-site-body);
    font-size: 9px;
    color: var(--pf-ed-band-ink);
}

/* ---- the « Mise en page » tiles: a frozen thumbnail per layout, then its label ---- */
.pf-ed__vs-tile {
    flex: none;
    width: 74px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--pf-ed-bar-edge);
    border-radius: 7px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.25s ease;
}

.pf-ed.is-peek .pf-ed__vs-tile--hero-full {
    border-color: var(--pf-on-dark-faint);
    background: var(--pf-ed-bar-well);
}

.pf-ed:not(.is-variant) .pf-ed__vs-tile--hero-split,
.pf-ed.is-variant .pf-ed__vs-tile--hero-full {
    border-color: var(--pf-lime);
    background: var(--pf-ed-bar-well);
}


.pf-ed__vs-name {
    font-family: var(--pf-font-mono);
    font-size: 6px;
    line-height: 1.3;
    color: var(--pf-ed-bar-ink);
}

.pf-ed:not(.is-variant) .pf-ed__vs-tile--hero-split .pf-ed__vs-name,
.pf-ed.is-variant .pf-ed__vs-tile--hero-full .pf-ed__vs-name {
    color: var(--pf-lime);
    font-weight: 600;
}

.pf-ed__vs-shot {
    position: relative;
    display: block;
    height: 36px;
    overflow: hidden;
    border-radius: 4px;
    background: var(--pf-ed-site-bg);
}

.pf-ed__vs-photo {
    position: absolute;
    inset: 0;
    display: none;
}

.pf-ed__vs-copy {
    position: absolute;
    top: 50%;
    left: 5px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    transform: translateY(-50%);
}

.pf-ed__vs-bar {
    width: 26px;
    height: 3px;
    border-radius: 1px;
    background: var(--pf-ed-site-ink);
}

.pf-ed__vs-bar--short {
    width: 17px;
}

.pf-ed__vs-btn {
    width: 12px;
    height: 4px;
    margin-top: 2px;
    border-radius: 1px;
    background: var(--pf-ed-site-acc);
}

.pf-ed__vs-shot--hero-split .pf-ed__vs-photo {
    display: block;
    inset: 4px 4px 4px 52%;
}

.pf-ed__vs-shot--hero-centered .pf-ed__vs-copy,
.pf-ed__vs-shot--hero-full .pf-ed__vs-copy {
    left: 50%;
    align-items: center;
    transform: translate(-50%, -50%);
}

.pf-ed__vs-shot--hero-centered .pf-ed__vs-bar {
    width: 40px;
}

.pf-ed__vs-shot--hero-centered .pf-ed__vs-bar--short {
    width: 28px;
}

.pf-ed__vs-shot--hero-full .pf-ed__vs-photo,
.pf-ed__vs-shot--hero-affiche .pf-ed__vs-photo {
    display: block;
}

.pf-ed__vs-shot--hero-full .pf-ed__vs-photo::after,
.pf-ed__vs-shot--hero-affiche .pf-ed__vs-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.5);
}

.pf-ed__vs-shot--hero-affiche .pf-ed__vs-copy {
    top: auto;
    bottom: 5px;
    transform: none;
}

.pf-ed__vs-shot--hero-full .pf-ed__vs-bar,
.pf-ed__vs-shot--hero-affiche .pf-ed__vs-bar {
    background: var(--pf-ed-site-bg);
}

/* ---- the two modals: block library and médiathèque ----
   Both fill the same 928x500 slot in the stage and share the head, foot and
   button chrome; only the body differs. `--pf-ed-modal` and `--pf-ed-mlib`
   drive their open/close, so the two can never be mid-transition together. */
.pf-ed__backdrop {
    position: absolute;
    inset: 0;
    z-index: 8;
    background: rgba(23, 23, 15, 0.45);
    pointer-events: none;
    opacity: max(var(--pf-ed-modal), var(--pf-ed-mlib));
}

.pf-ed__modal {
    position: absolute;
    left: 96px;
    top: 74px;
    width: 928px;
    height: 500px;
    z-index: 9;
    flex-direction: column;
    background: var(--pf-surface);
    border: 1px solid var(--pf-ed-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}

.pf-ed__backdrop,
.pf-ed__modal {
    display: none;
}

.pf-ed__modal--lib {
    opacity: var(--pf-ed-modal);
    transform: scale(calc(0.96 + 0.04 * var(--pf-ed-modal)));
}

.pf-ed__modal--media {
    opacity: var(--pf-ed-mlib);
    transform: scale(calc(0.96 + 0.04 * var(--pf-ed-mlib)));
}

.pf-ed.is-modal .pf-ed__backdrop,
.pf-ed.is-mlib .pf-ed__backdrop {
    display: block;
}

.pf-ed.is-modal .pf-ed__modal--lib,
.pf-ed.is-mlib .pf-ed__modal--media {
    display: flex;
}

/* ---- modal chrome shared by both ---- */
.pf-ed__modal-head {
    flex: none;
    height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-bottom: 1px solid var(--pf-ed-line);
    background: var(--pf-ed-chrome);
}

.pf-ed__modal-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 152px;
    flex: none;
}

.pf-ed__modal-title {
    font-family: var(--pf-font-display);
    font-stretch: 115%;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1;
}

.pf-ed__modal-count,
.pf-ed__browse-meta {
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.pf-ed__search {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 10px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-ed-line);
    border-radius: var(--pf-pill);
}

.pf-ed__search-icon {
    font-size: 11px;
    color: var(--pf-faint);
}

.pf-ed__search-ph {
    flex: 1;
    min-width: 0;
    font-size: 9.5px;
    color: var(--pf-ed-meta);
}

.pf-ed__kbd {
    font-family: var(--pf-font-mono);
    font-size: 7px;
    letter-spacing: 0.06em;
    color: var(--pf-faint);
    border: 1px solid var(--pf-ed-line);
    border-radius: 4px;
    padding: 3px 5px;
}

.pf-ed__upload {
    flex: none;
}

.pf-ed__modal-close {
    flex: none;
    font-size: 11px;
    color: var(--pf-faint);
}

.pf-ed__modal-body {
    flex: 1;
    min-height: 0;
    display: flex;
}

.pf-ed__modal-foot {
    flex: none;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-top: 1px solid var(--pf-ed-line);
    background: var(--pf-ed-chrome);
}

.pf-ed__modal-keys,
.pf-ed__modal-chosen {
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.06em;
    color: var(--pf-faint);
}

.pf-ed__modal-keys i {
    font-size: 9px;
}

.pf-ed__modal--lib .pf-ed__modal-chosen {
    opacity: 0;
    color: var(--pf-ed-ok);
    transition: opacity 0.25s ease;
}

.pf-ed.is-picked .pf-ed__modal--lib .pf-ed__modal-chosen {
    opacity: 1;
}

/* ---- block library: category rail ---- */
.pf-ed__cats {
    width: 168px;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 10px;
    border-right: 1px solid var(--pf-ed-line);
    background: var(--pf-ed-chrome);
}

.pf-ed__cats-label {
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pf-faint);
    padding: 0 8px 6px;
}

.pf-ed__cat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 7px;
    border: 1px solid transparent;
}

.pf-ed__cat-name {
    flex: 1;
    min-width: 0;
    font-size: 9px;
    font-weight: 600;
}

/* One category is always current: "Tous les blocs" until the demo picks one. */
.pf-ed:not(.is-cat) .pf-ed__cat--all,
.pf-ed.is-cat .pf-ed__cat--conversion {
    background: var(--pf-dark);
    color: var(--pf-cream);
    border-color: var(--pf-dark);
}

.pf-ed:not(.is-cat) .pf-ed__cat--all .pf-ed__cat-count,
.pf-ed.is-cat .pf-ed__cat--conversion .pf-ed__cat-count {
    color: var(--pf-lime);
}

/* ---- block library: catalog ---- */
.pf-ed__catalog {
    width: 252px;
    flex: none;
    overflow: hidden;
    padding: 12px 12px 20px;
    border-right: 1px solid var(--pf-ed-line);
}

.pf-ed.is-cat .pf-ed__group:not(.pf-ed__group--conversion) {
    display: none;
}

.pf-ed__group-name {
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pf-muted);
}

.pf-ed__group-count {
    font-family: var(--pf-font-mono);
    font-size: 7px;
    color: var(--pf-faint);
}

.pf-ed__lib-item {
    gap: 8px;
    padding: 0 9px;
    margin-bottom: 5px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.pf-ed__lib-item .pf-ed__node-name {
    font-size: 9px;
}

.pf-ed__lib-item .pf-ed__node-meta {
    font-size: 7px;
}

.pf-ed__lib-check {
    margin-left: auto;
    flex: none;
    font-size: 8px;
    color: var(--pf-ed-ok);
    opacity: 0;
}

.pf-ed.is-pv-panel .pf-ed__lib-item--panel,
.pf-ed.is-pv-cta .pf-ed__lib-item--cta {
    background: var(--pf-ed-sel-bg);
    border-color: var(--pf-lime);
}

.pf-ed.is-pv-panel .pf-ed__lib-item--panel .pf-ed__node-icon,
.pf-ed.is-pv-cta .pf-ed__lib-item--cta .pf-ed__node-icon {
    background: var(--pf-dark);
    color: var(--pf-lime);
}

.pf-ed.is-picked .pf-ed__lib-item--cta .pf-ed__lib-check {
    opacity: 1;
}

/* ---- block library: preview pane ---- */
.pf-ed__preview {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--pf-ed-gutter);
}

.pf-ed__preview-bar {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 30px;
    padding: 0 14px;
    border-bottom: 1px solid var(--pf-ed-line);
    background: var(--pf-ed-chrome);
}

.pf-ed__preview-label {
    font-family: var(--pf-font-mono);
    font-size: 7.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pf-faint);
}

.pf-ed__preview-caption {
    display: none;
    margin-left: auto;
    font-size: 9px;
    font-weight: 600;
}

.pf-ed.is-pv-panel .pf-ed__preview-caption--panel,
.pf-ed.is-pv-cta .pf-ed__preview-caption--cta {
    display: block;
}

.pf-ed__stage,
.pf-ed__side-detail {
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 16px;
}

.pf-ed__preview-hint {
    font-size: 9px;
    color: var(--pf-faint);
}

.pf-ed__preview-card {
    display: none;
    width: 100%;
    background: var(--pf-ed-site-bg);
    border: 1px solid var(--pf-ed-site-line);
    padding: 16px;
}

.pf-ed.is-pv-panel .pf-ed__preview-card--panel,
.pf-ed.is-pv-cta .pf-ed__preview-card--cta {
    display: block;
}

.pf-ed.is-pv-panel .pf-ed__preview-hint,
.pf-ed.is-pv-cta .pf-ed__preview-hint {
    display: none;
}

.pf-ed__preview-card--cta {
    background: none;
    border: 0;
    padding: 0;
}

.pf-ed__preview-card--panel {
    padding: 28px 20px;
    background: var(--pf-ed-site-panel);
    text-align: center;
}

.pf-ed__preview-card--panel .pf-ed__site-p {
    margin: 8px 0 14px;
}

/* ---- block library: the hovered block's card, and the confirm ---- */
.pf-ed__detail {
    flex: none;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--pf-ed-line);
    background: var(--pf-surface);
}

.pf-ed__detail-card {
    display: none;
    flex-direction: column;
    gap: 5px;
    min-height: 52px;
}

.pf-ed:not(.is-pv-panel):not(.is-pv-cta) .pf-ed__detail-card--none,
.pf-ed.is-pv-panel .pf-ed__detail-card--panel,
.pf-ed.is-pv-cta .pf-ed__detail-card--cta {
    display: flex;
}

.pf-ed__detail-title {
    font-size: 10px;
    font-weight: 600;
}

.pf-ed__detail-desc,
.pf-ed__side-alt {
    font-size: 8.5px;
    line-height: 1.5;
    color: var(--pf-muted);
}

.pf-ed__chip {
    font-family: var(--pf-font-mono);
    font-size: 7px;
    letter-spacing: 0.05em;
    color: var(--pf-muted);
    background: var(--pf-bg);
    border: 1px solid var(--pf-ed-line);
    border-radius: var(--pf-pill);
    padding: 3px 7px;
}

.pf-ed__detail-actions,
.pf-ed__side-actions {
    display: none;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 12px;
}

.pf-ed.is-picked .pf-ed__detail-actions,
.pf-ed.is-media-pick .pf-ed__side-actions {
    display: flex;
}

.pf-ed__upload,
.pf-ed__modal-cancel,
.pf-ed__modal-confirm,
.pf-ed__modal-use {
    font-family: var(--pf-font-mono);
    font-size: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--pf-ink);
    padding: 8px 12px;
    border-radius: var(--pf-pill);
}

.pf-ed__modal-cancel {
    border: 1px solid var(--pf-line-dash);
}

.pf-ed__upload,
.pf-ed__modal-confirm,
.pf-ed__modal-use {
    text-align: center;
    background: var(--pf-lime);
    transition: box-shadow 0.25s ease;
}

.pf-ed.is-pulse-confirm .pf-ed__modal-confirm,
.pf-ed.is-pulse-use .pf-ed__modal-use {
    box-shadow: 0 0 0 5px rgba(var(--pf-lime-rgb), 0.35);
}

/* ---- médiathèque: the browsing grid ---- */
.pf-ed__browse {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pf-ed__browse-bar {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 32px;
    padding: 0 16px;
    border-bottom: 1px solid var(--pf-ed-line);
    background: var(--pf-ed-chrome);
}

.pf-ed__tiles {
    flex: 1;
    min-height: 0;
    padding: 16px;
}

.pf-ed__tile-thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--pf-ed-line);
    border-radius: 8px;
    overflow: hidden;
}

/* The tint is what reads as "selected" at a glance; the ring alone is too quiet
   against a busy photograph. */
.pf-ed.is-media-pick .pf-ed__tile--pick .pf-ed__tile-thumb {
    border-color: var(--pf-ink);
    box-shadow: inset 0 0 0 2px var(--pf-ink);
}

.pf-ed.is-media-pick .pf-ed__tile--pick .pf-ed__tile-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(var(--pf-lime-rgb), 0.22);
}

.pf-ed__tile-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-family: var(--pf-font-mono);
    font-size: 6.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pf-ed-del);
    background: var(--pf-surface);
    border: 1px solid var(--pf-ed-del-soft);
    border-radius: var(--pf-pill);
    padding: 2px 5px;
}

.pf-ed__tile-check {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 1;
    display: none;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--pf-lime);
    border: 1px solid var(--pf-ink);
    font-size: 8px;
    color: var(--pf-ink);
}

.pf-ed.is-media-pick .pf-ed__tile--pick .pf-ed__tile-check {
    display: grid;
}

.pf-ed__tile-name {
    font-family: var(--pf-font-mono);
    font-size: 7px;
    color: var(--pf-muted);
}

/* ---- médiathèque: the selected image's details ---- */
.pf-ed__side {
    width: 288px;
    flex: none;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--pf-ed-line);
    background: var(--pf-ed-chrome);
}

.pf-ed__side-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.pf-ed__side-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--pf-ed-line);
    border-radius: 50%;
    color: var(--pf-faint);
    font-size: 12px;
}

.pf-ed__side-card {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    align-self: start;
}

.pf-ed.is-media-pick .pf-ed__side-card {
    display: flex;
}

.pf-ed.is-media-pick .pf-ed__side-empty {
    display: none;
}

.pf-ed__side-preview {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--pf-ed-line);
    border-radius: 9px;
}

.pf-ed__side-title {
    font-size: 10px;
    font-weight: 600;
}

.pf-ed__side-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid var(--pf-ed-line);
}

.pf-ed__side-value {
    font-family: var(--pf-font-mono);
    font-size: 8px;
}

/* The tenant's photographs, shared by the page, the médiathèque grid, the
   detail pane, the inspector's image field and the layout thumbnails. */
.pf-ed__photo {
    background-color: var(--pf-ed-site-line);
    background-position: center;
    background-size: cover;
}

.pf-ed__photo--salle { background-image: var(--pf-ed-photo-salle); }
.pf-ed__photo--cave { background-image: var(--pf-ed-photo-cave); }
.pf-ed__photo--ardoise { background-image: var(--pf-ed-photo-ardoise); }
.pf-ed__photo--cheffe { background-image: var(--pf-ed-photo-cheffe); }
.pf-ed__photo--passe { background-image: var(--pf-ed-photo-passe); }
.pf-ed__photo--hero { background-image: var(--pf-ed-photo-hero); }

/* ---- the pointer that drives the demo ---- */
.pf-ed__cursor {
    color: var(--pf-dark);
    position: absolute;
    left: var(--pf-ed-x);
    top: var(--pf-ed-y);
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.pf-ed.is-dragging .pf-ed__cursor {
    transform: scale(0.9);
}

.pf-ed__ripple {
    position: absolute;
    left: var(--pf-ed-x);
    top: var(--pf-ed-y);
    z-index: 19;
    display: none;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border-radius: 50%;
    border: 2px solid var(--pf-lime);
    pointer-events: none;
    opacity: calc(1 - var(--pf-ed-ripple));
    transform: scale(calc(0.25 + 1.65 * var(--pf-ed-ripple)));
}

.pf-ed.is-clicking .pf-ed__ripple {
    display: block;
}

/* ---- chapter strip: the demo's table of contents, and its only control ----
   A stacked timeline beside the mock, laid out by the Bootstrap grid in
   platform/_editor_demo.html.twig. Below that grid's breakpoint the mock is
   scaled far too small to steer, so the strip does not render at all. */
.pf-ed__chapter {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 11px 14px 13px;
    border-radius: 10px;
    text-align: left;
    font-family: var(--pf-font-body);
    font-size: 0.7rem;
    background: transparent;
    border: 1px solid var(--pf-dark-chip-line);
    color: var(--pf-on-dark-faint);
    overflow: hidden;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.12s ease;
}

.pf-ed__chapter.is-active {
    font-weight: 600;
    background: rgba(var(--pf-lime-rgb), 0.12);
    border-color: rgba(var(--pf-lime-rgb), 0.45);
    color: var(--pf-lime-tint);
}

.pf-ed__chapter-num {
    font-family: var(--pf-font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    color: var(--pf-ed-caption);
}

.pf-ed__chapter.is-active .pf-ed__chapter-num {
    color: var(--pf-lime);
}

.pf-ed__chapter-label {
    line-height: 1.3;
    text-wrap: balance;
}

.pf-ed__chapter-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.07);
}

.pf-ed__chapter-fill {
    display: block;
    height: 100%;
    width: 0;
    background: rgba(var(--pf-lime-rgb), 0.25);
}

.pf-ed__chapter.is-active .pf-ed__chapter-fill {
    background: var(--pf-lime);
}

/* ---- a phone: the editor as a phone shows it (under Bootstrap's lg) ----
   The desktop shell would scale to a third and print 3px text, so a phone gets its own
   composition, 270 x 470 scaled to the column: the page in its phone layout across the frame,
   the dock with its marks only, the structure rising from it, the modals over everything. The
   page takes the rules the « Vue mobile » chapter gives the desktop frame, and that chapter,
   with no device to switch here, reads the page instead (« Relire »). */
@media (max-width: 767.98px) {
    .pf-ed__wrap {
        --pf-ed-fit: calc(var(--pf-ed-scale) * 1120 / 270);
        height: calc(470px * var(--pf-ed-fit));
    }

    .pf-ed__shell {
        width: 270px;
        height: 470px;
        border-radius: 12px;
    }

    .pf-ed__bar {
        height: 38px;
        gap: 6px;
        padding: 0 8px;
    }

    .pf-ed__brand-name,
    .pf-ed__site-name,
    .pf-ed__save,
    .pf-ed__ghost,
    .pf-ed__queue-words {
        display: none;
    }

    .pf-ed__queue-idle,
    .pf-ed__queue-chip {
        padding: 6px 8px;
    }

    .pf-ed__queue-panel {
        width: 230px;
    }

    .pf-ed__body {
        height: 432px;
    }

    .pf-ed__desk,
    .pf-ed.is-structure .pf-ed__desk {
        padding: 0 0 44px;
    }

    .pf-ed__frame,
    .pf-ed.is-mobile .pf-ed__frame {
        width: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .pf-ed__dock {
        bottom: 7px;
    }

    .pf-ed__dock-label,
    .pf-ed__dock-view {
        display: none;
    }

    .pf-ed__panel {
        top: 16%;
        right: 6px;
        bottom: 42px;
        left: 6px;
        width: auto;
    }

    .pf-ed__node {
        height: 30px;
        margin-bottom: 3px;
    }

    .pf-ed__site-links {
        display: none;
    }

    .pf-ed__burger {
        display: flex;
    }

    .pf-ed__hero-h {
        font-size: 22px;
    }

    .pf-ed:is(.is-variant, .is-peek) .pf-ed__hero {
        min-height: 300px;
        padding: 32px 18px;
    }

    .pf-ed:is(.is-variant, .is-peek) .pf-ed__hero-h {
        font-size: 25px;
    }

    .pf-ed__bb-word,
    .pf-ed__bb-label {
        display: none;
    }

    /* No category column to pick « Conversion » from: the list narrows to the block the demo adds. */
    .pf-ed.is-cat .pf-ed__lib-item:not(.pf-ed__lib-item--type-cta) {
        display: none;
    }

    .pf-ed.is-mobile .pf-ed__dock-read {
        background: var(--pf-lime);
        color: var(--pf-ink);
        font-weight: 600;
    }

    .pf-ed.is-mobile .pf-ed__sec > .pf-ed__bb,
    .pf-ed.is-mobile .pf-ed__layouts {
        display: none;
    }

    .pf-ed.is-mobile .pf-ed__sec {
        outline: 0;
    }

    .pf-ed__modal {
        top: 44px;
        right: 6px;
        bottom: 6px;
        left: 6px;
        width: auto;
        height: auto;
    }

    .pf-ed__modal-head {
        height: 40px;
        gap: 8px;
        padding: 0 10px;
    }

    .pf-ed__modal-heading {
        flex: 1;
        width: auto;
    }

    .pf-ed__search,
    .pf-ed__upload,
    .pf-ed__modal-foot,
    .pf-ed__cats,
    .pf-ed__preview-bar,
    .pf-ed__stage,
    .pf-ed__side-detail {
        display: none;
    }

    .pf-ed__modal-body {
        flex-direction: column;
    }

    .pf-ed__catalog {
        flex: 1;
        width: auto;
        min-height: 0;
        border-right: 0;
    }

    .pf-ed__preview,
    .pf-ed__side {
        flex: none;
        width: auto;
        border-left: 0;
        border-top: 1px solid var(--pf-ed-line);
    }

    .pf-ed__browse-meta + .pf-ed__browse-meta {
        display: none;
    }

    .pf-ed__tiles {
        --bs-gutter-x: 8px;
        --bs-gutter-y: 8px;

        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* The demo stops being a film and becomes seven stills the chapter
       buttons page through (see assets/platform_editor.js). */
    .pf-ed *,
    .pf-ed *::before,
    .pf-ed *::after {
        transition: none;
        animation: none;
    }

    .pf-ed__cursor {
        display: none;
    }
}
