/* The sur mesure page (platform/bespoke.html.twig), on the platform's --pf-* tokens.
   Layout is Bootstrap's, in the markup: what lives here is type, color, the card
   stack and what moves. */

/* The script faces of three showcased sites. Their own sheets (braises.css,
   engraving.css, mehdi-zaidi.css) never load on the platform. */
@font-face {
    font-family: "Caveat";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/caveat-variable-jM9h_2u.woff2") format("woff2-variations");
}

@font-face {
    font-family: "Dancing Script";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/dancing-script-400-ANssx1z.woff2") format("woff2");
}

@font-face {
    font-family: "Nanum Pen Script";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/nanum-pen-script-400-_Y996b9.woff2") format("woff2");
}

.pf-bsp {
    --pf-bsp-maxw: 1200px;
    --pf-bsp-overlap: clamp(80px, 12vw, 170px);
    --pf-bsp-cycle: 4200ms;
    --pf-bsp-light: color-mix(in srgb, var(--pf-cream) 18%, var(--pf-dark));
    --pf-bsp-shadow-front: 0 60px 100px -40px rgba(23, 23, 15, 0.6);
    --pf-bsp-shadow-side: 0 30px 60px -30px rgba(23, 23, 15, 0.35);

    overflow-x: clip;
}

/* Each showcased site's own colors and script face: the identity the page shows
   off, so not platform tokens. The sizes give « signature » the same width in
   all three faces, so the gap after « votre » never changes. */
.pf-bsp--cd-coach {
    --pf-bsp-accent: #ef834b;
    --pf-bsp-tint: #141110;
    --pf-bsp-sig-ink: #c1591a;
    --pf-bsp-sig-font: "Caveat", cursive;
    --pf-bsp-sig-weight: 700;
    --pf-bsp-sig-size: 1.29em;
}

.pf-bsp--tiff {
    --pf-bsp-accent: #c24a7c;
    --pf-bsp-tint: #3a2a24;
    --pf-bsp-sig-ink: #c24a7c;
    --pf-bsp-sig-font: "Dancing Script", cursive;
    --pf-bsp-sig-weight: 400;
    --pf-bsp-sig-size: 1.25em;
}

.pf-bsp--mehdi-zaidi {
    --pf-bsp-accent: #4be3b0;
    --pf-bsp-tint: #15122e;
    --pf-bsp-sig-ink: #2346ff;
    --pf-bsp-sig-font: "Nanum Pen Script", cursive;
    --pf-bsp-sig-weight: 400;
    --pf-bsp-sig-size: 1.27em;
}

.pf-bsp-wrap {
    max-width: var(--pf-bsp-maxw);
    margin-inline: auto;
    padding-inline: var(--pf-gutter);
}

.pf-bsp-hero__title,
.pf-bsp-h2,
.pf-bsp-step__n,
.pf-bsp-step__title,
.pf-bsp-panel__name,
.pf-bsp-panel__spine,
.pf-bsp-done__title,
.pf-bsp-bar__value,
.pf-offer__name {
    font-family: var(--pf-font-display);
    font-stretch: 115%;
    letter-spacing: -0.025em;
}

.pf-bsp-h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    line-height: 1.05;
    text-wrap: balance;
}

.pf-bsp-lead {
    color: var(--pf-on-dark);
    font-size: 0.98rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.pf-bsp-lead--light {
    color: var(--pf-muted);
}

.pf-bsp-dot {
    width: 9px;
    height: 9px;
    background: var(--pf-bsp-accent);
}

/* ---- Hero ---- */

.pf-bsp-hero__title {
    font-size: clamp(2.4rem, 5.4vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: -0.035em;
}

.pf-bsp-hero__line {
    column-gap: 0.22em;
    min-height: 1.3em;
}

/* The four words share one grid cell, so the line is as wide as the widest and
   nothing moves when the face changes. */
.pf-bsp-sig {
    display: inline-grid;
}

.pf-bsp-sig__word {
    grid-area: 1 / 1;
    justify-self: start;
    align-self: center;
    position: relative;
    visibility: hidden;
    padding: 0 0.06em;
    font-family: var(--pf-bsp-sig-font);
    font-weight: var(--pf-bsp-sig-weight);
    font-size: var(--pf-bsp-sig-size);
    font-stretch: normal;
    line-height: 1.05;
    color: var(--pf-bsp-sig-ink);
}

/* The clip-path makes the word a stacking context, which keeps the underline's
   negative z-index behind its letters. */
.pf-bsp-sig__word.is-active {
    visibility: visible;
    animation: pf-bsp-draw 1.3s cubic-bezier(0.65, 0, 0.25, 1) both;
}

.pf-bsp-sig__word::after {
    content: "";
    position: absolute;
    left: 0.1em;
    right: 0.1em;
    bottom: 0.02em;
    height: 0.07em;
    z-index: -1;
    border-radius: 0.1em;
    background: var(--pf-lime);
    transform: rotate(-2.5deg) scaleX(0);
    transform-origin: left center;
}

.pf-bsp-sig__word.is-active::after {
    animation: pf-bsp-underline 0.6s 1s cubic-bezier(0.6, 0, 0.3, 1) both;
}

@keyframes pf-bsp-draw {
    from {
        clip-path: inset(-30% 100% -30% -10%);
    }

    to {
        clip-path: inset(-30% -10% -30% -10%);
    }
}

@keyframes pf-bsp-underline {
    to {
        transform: rotate(-2.5deg) scaleX(1);
    }
}

.pf-bsp-hero__lead {
    color: var(--pf-muted);
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    line-height: 1.6;
}

.pf-bsp-pick {
    border: 1px solid var(--pf-line-dash);
    background: transparent;
    color: var(--pf-ink);
    transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}

.pf-bsp-pick:hover {
    border-color: var(--pf-ink);
}

.pf-bsp-pick.is-active {
    background: var(--pf-ink);
    border-color: var(--pf-ink);
    color: var(--pf-cream);
}

.pf-bsp-pick__bar {
    height: 3px;
    background: var(--pf-lime);
    transform: scaleX(0);
    transform-origin: left center;
}

.is-cycling .pf-bsp-pick.is-active .pf-bsp-pick__bar {
    animation: pf-bsp-fill var(--pf-bsp-cycle) linear forwards;
}

.is-paused .pf-bsp-pick.is-active .pf-bsp-pick__bar,
.is-offscreen .pf-bsp-pick.is-active .pf-bsp-pick__bar {
    animation-play-state: paused;
}

@keyframes pf-bsp-fill {
    to {
        transform: scaleX(1);
    }
}

.pf-bsp-stage {
    max-width: 920px;
    margin: clamp(24px, 3vw, 36px) auto calc(-1 * var(--pf-bsp-overlap));
    padding-inline: var(--pf-gutter);
}

.pf-bsp-stage__tilt {
    aspect-ratio: 924 / 570;
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
    will-change: transform;
}

/* data-pos is the card's place relative to the active one: 0 in front, 1 to
   the right, 2 to the left. */
.pf-bsp-card {
    --pf-bsp-side: 14%;

    z-index: 2;
    background: var(--pf-dark);
    box-shadow: var(--pf-bsp-shadow-side);
    cursor: pointer;
    transition: transform 1s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.7s ease, box-shadow 1s ease;
}

.pf-bsp-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--pf-bg);
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 1s ease;
}

.pf-bsp-card[data-pos="0"] {
    z-index: 4;
    box-shadow: var(--pf-bsp-shadow-front);
    cursor: default;
}

.pf-bsp-card[data-pos="0"]::after {
    opacity: 0;
}

.pf-bsp-card[data-pos="1"] {
    transform: translateX(var(--pf-bsp-side)) scale(0.8) rotate(4deg);
}

.pf-bsp-card[data-pos="2"] {
    transform: translateX(calc(-1 * var(--pf-bsp-side))) scale(0.8) rotate(-4deg);
}

@media (min-width: 992px) {
    .pf-bsp-card {
        --pf-bsp-side: 36%;
    }
}

.pf-bsp-card__shot {
    flex-basis: 0;
    min-height: 0;
    object-position: top left;
}

/* ---- Browser chrome ---- */
.pf-bsp-chrome {
    height: 30px;
}

.pf-bsp-chrome--tall {
    height: 38px;
}

.pf-bsp-chrome__light {
    width: 8px;
    height: 8px;
    background: var(--pf-bsp-light);
}

.pf-bsp-chrome__caption,
.pf-bsp-chrome__url,
.pf-bsp-chrome__live {
    font-family: var(--pf-font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
}

.pf-bsp-chrome__caption {
    color: var(--pf-on-dark-faint);
}

.pf-bsp-chrome__url {
    min-width: 0;
    max-width: 300px;
    background: var(--pf-dark-slot);
    color: var(--pf-on-dark);
}

.pf-bsp-chrome__live {
    color: var(--pf-lime);
}

.pf-bsp-chrome__pulse {
    width: 8px;
    height: 8px;
    background: var(--pf-success);
    animation: pf-bsp-pulse 2s infinite;
}

@keyframes pf-bsp-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--pf-success) 50%, transparent);
    }

    70%,
    100% {
        box-shadow: 0 0 0 10px transparent;
    }
}

/* ---- Dark bands ---- */
.pf-bsp-dark {
    --pf-focus: var(--pf-lime);

    background: var(--pf-dark);
    color: var(--pf-cream);
}

.pf-bsp-dark .pf-eyebrow {
    color: var(--pf-lime);
}

/* Rises under the hero's card stack, which overlaps it by --pf-bsp-overlap. */
.pf-bsp-dark--lip {
    border-radius: clamp(28px, 5vw, 64px) clamp(28px, 5vw, 64px) 0 0;
}

.pf-bsp-compare-band {
    --pf-bsp-maxw: 1080px;

    padding-top: calc(var(--pf-bsp-overlap) + clamp(48px, 6vw, 88px));
    padding-bottom: var(--pf-block);
}

/* ---- Before and after ---- */
.pf-bsp-compare {
    --pf-bsp-pos: 50%;
    --pf-bsp-knob: clamp(36px, 7vw, 46px);

    aspect-ratio: 924 / 540;
    border: 1px solid var(--pf-dark-line-2);
    background: var(--pf-dark-slot);
    box-shadow: 0 40px 90px -40px rgba(var(--pf-lime-rgb), 0.28);
}

.pf-bsp-compare__shot {
    object-position: top left;
}

.pf-bsp-compare__shot--after {
    clip-path: inset(0 0 0 var(--pf-bsp-pos));
}

.pf-bsp-compare__range {
    opacity: 0;
    cursor: ew-resize;
    touch-action: pan-y;
}

.pf-bsp-compare__line {
    left: var(--pf-bsp-pos);
    width: 2px;
    margin-left: -1px;
    background: var(--pf-lime);
}

.pf-bsp-compare__knob {
    top: 50%;
    left: var(--pf-bsp-pos);
    width: var(--pf-bsp-knob);
    height: var(--pf-bsp-knob);
    margin: calc(-0.5 * var(--pf-bsp-knob)) 0 0 calc(-0.5 * var(--pf-bsp-knob));
    background: var(--pf-lime);
    color: var(--pf-ink);
    font-size: 1.05rem;
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5);
}

.pf-bsp-compare__range:focus-visible ~ .pf-bsp-compare__knob {
    outline: 2px solid var(--pf-cream);
    outline-offset: 3px;
}

.pf-bsp-tag {
    background: color-mix(in srgb, var(--pf-dark) 82%, transparent);
    color: var(--pf-cream);
    font-family: var(--pf-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
}

.pf-bsp-tag--lime {
    background: var(--pf-lime);
    color: var(--pf-ink);
}

@media (max-width: 575.98px) {
    .pf-bsp-tag {
        font-size: 0.54rem;
        letter-spacing: 0.06em;
    }
}

/* ---- Steps ---- */

.pf-bsp-steps__list {
    gap: clamp(56px, 7vw, 100px);
}

.pf-bsp-step__n {
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    line-height: 0.9;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--pf-ink);
}

.pf-bsp-step__title {
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
}

.pf-bsp-step__text {
    color: var(--pf-ink-soft);
    font-size: 0.98rem;
    line-height: 1.65;
    text-wrap: pretty;
}

.pf-bsp-kit {
    border: 1px solid var(--pf-line);
    background: var(--pf-bg);
}

.pf-bsp-kit__item {
    border: 1px solid var(--pf-line);
    background: var(--pf-surface);
}

.pf-bsp-kit__item--dashed {
    border-style: dashed;
    border-color: var(--pf-line-hover);
}

.pf-bsp-kit__icon {
    width: 28px;
    height: 28px;
    background: var(--pf-lime);
    font-size: 0.72rem;
}

.pf-bsp-kit__item--dashed .pf-bsp-kit__icon {
    border: 1px dashed var(--pf-faint);
    background: transparent;
    color: var(--pf-muted);
}

.pf-bsp-kit__note {
    color: var(--pf-muted);
}

.pf-bsp-window {
    border: 1px solid var(--pf-line);
    background: var(--pf-dark);
}

.pf-bsp-window__shot {
    height: auto;
    aspect-ratio: 924 / 540;
    object-position: top left;
}

.pf-bsp-window__note,
.pf-bsp-pin__label {
    font-family: var(--pf-font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
}

.pf-bsp-window__note {
    color: var(--pf-cream);
}

/* Placed on tiff.webp: a new capture moves what they point at. */
.pf-bsp-pin {
    transform: translate(-11px, -11px);
}

.pf-bsp-pin--1 {
    left: 20%;
    top: 5.5%;
}

.pf-bsp-pin--2 {
    left: 38.5%;
    top: 30%;
}

.pf-bsp-pin--3 {
    left: 79%;
    top: 91%;
}

.pf-bsp-pin__dot {
    width: 22px;
    height: 22px;
    border: 3px solid var(--pf-ink);
    background: var(--pf-lime);
    box-shadow: 0 0 0 6px rgba(var(--pf-lime-rgb), 0.35);
    color: var(--pf-ink);
    font-family: var(--pf-font-mono);
    font-size: 0.5rem;
    line-height: 1;
}

.pf-bsp-pin__label {
    background: var(--pf-ink);
    color: var(--pf-cream);
}

/* ---- The four sites ---- */
/* A phone stacks the sites, each whole above its name. From lg the open panel
   takes the capture's own ratio, so the site shows uncropped; the image keeps
   that width in the narrow panels too, which show its left edge. */
.pf-bsp-panels-frame {
    container-type: inline-size;
}

.pf-bsp-panel {
    background: var(--pf-bsp-tint);
    color: var(--pf-surface);
    cursor: pointer;
}

.pf-bsp-panel__shot {
    width: 100%;
    height: auto;
    aspect-ratio: 1848 / 1080;
    object-position: top left;
}

.pf-bsp-panel__spine {
    display: none;
}

.pf-bsp-panel__name {
    font-size: 1.15rem;
    line-height: 1.2;
}

.pf-bsp-panel__trade {
    color: var(--pf-on-dark);
}

@media (min-width: 992px) {
    .pf-bsp-panels {
        --pf-bsp-closed: 104px;
        --pf-bsp-open: calc(100cqw - 2 * var(--pf-bsp-closed) - 2rem);

        height: calc(var(--pf-bsp-open) * 1080 / 1848);
    }

    .pf-bsp-panel {
        flex: 0 0 var(--pf-bsp-closed);
        min-width: 0;
        transition: flex-basis 0.7s cubic-bezier(0.7, 0, 0.2, 1);
    }

    .pf-bsp-panel.is-open {
        flex-basis: var(--pf-bsp-open);
    }

    .pf-bsp-panel__shot {
        position: absolute;
        top: 0;
        left: 0;
        width: var(--pf-bsp-open);
        max-width: none;
        height: 100%;
    }

    .pf-bsp-panel__shade {
        background: linear-gradient(180deg, transparent 80%, color-mix(in srgb, var(--pf-dark) 80%, transparent) 100%);
    }

    .pf-bsp-panel__body {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
    }

    .pf-bsp-panel:not(.is-open) .pf-bsp-panel__shade {
        background: color-mix(in srgb, var(--pf-dark) 45%, transparent);
    }

    .pf-bsp-panel:not(.is-open) .pf-bsp-panel__open {
        display: none;
    }

    .pf-bsp-panel:not(.is-open) .pf-bsp-panel__spine {
        display: block;
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        font-size: 1.15rem;
    }
}

/* ---- Offer and callback ---- */
.pf-offer {
    border: 2px solid var(--pf-dark-chip-line);
    background: var(--pf-dark-chip);
    color: inherit;
    cursor: pointer;
    transition: background-color 0.25s, border-color 0.25s;
}

.pf-offer:hover {
    border-color: color-mix(in srgb, var(--pf-lime) 55%, transparent);
}

.pf-offer:has(input:checked) {
    border-color: var(--pf-lime);
    background: rgba(var(--pf-lime-rgb), 0.08);
}

.pf-offer:has(input:focus-visible) {
    outline: 2px solid var(--pf-lime);
    outline-offset: 3px;
}

.pf-offer--undecided {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--pf-cream) 22%, transparent);
    background: transparent;
}

.pf-offer--undecided:has(input:checked) {
    background: transparent;
}

/* Bootstrap paints a checked radio with its own blue and a white dot image: both
   are re-pointed here, at the selectors' own weight plus this card's. */
.pf-offer .pf-offer__radio {
    width: 22px;
    height: 22px;
    border: 2px solid var(--pf-cream);
    background-color: transparent;
    cursor: pointer;
}

.pf-offer .pf-offer__radio:checked {
    --bs-form-check-bg-image: radial-gradient(circle, var(--pf-lime) 0 4.5px, transparent 5.5px);

    border-color: var(--pf-cream);
    background-color: transparent;
}

.pf-offer .pf-offer__radio:focus {
    border-color: var(--pf-cream);
    box-shadow: none;
}

.pf-offer__name {
    font-size: 1.2rem;
    line-height: 1.1;
}

.pf-offer--undecided .pf-offer__name {
    flex: 1 1 0;
    min-width: 0;
    font-family: var(--pf-font-body);
    font-size: 1rem;
    font-stretch: normal;
    letter-spacing: normal;
}

.pf-offer__time {
    border: 1px solid var(--pf-dark-chip-line);
    color: var(--pf-on-dark-soft);
    font-family: var(--pf-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
}

.pf-offer__desc {
    padding-left: 38px;
    color: var(--pf-on-dark);
    font-size: 0.9rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.pf-offer__badge {
    top: -11px;
    right: 24px;
    background: var(--pf-lime);
    color: var(--pf-ink);
    font-family: var(--pf-font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
}

@media (max-width: 575.98px) {
    .pf-offer__desc {
        padding-left: 0;
    }
}

.pf-bsp-sheet,
.pf-bsp-done {
    --pf-focus: var(--pf-lime-deep);

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

.pf-bsp-sheet .form-control {
    min-height: 48px;
    border-color: var(--pf-line-dash);
    background: var(--pf-surface);
}

.pf-bsp-sheet__note {
    color: var(--pf-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.pf-bsp-done {
    max-width: 640px;
}

.pf-bsp-done__icon {
    width: 56px;
    height: 56px;
    background: var(--pf-lime);
    font-size: 1.3rem;
}

.pf-bsp-done__title {
    font-size: 1.5rem;
}

.pf-bsp-done__text {
    color: var(--pf-ink-soft);
    line-height: 1.6;
}

/* ---- Phone call bar ---- */
.pf-bsp-bar {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--pf-line);
    background: color-mix(in srgb, var(--pf-bg) 94%, transparent);
    backdrop-filter: blur(10px);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s;
}

.pf-bsp-bar.is-shown {
    transform: none;
    visibility: visible;
}

.pf-bsp-bar__label {
    color: var(--pf-muted);
    font-family: var(--pf-font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.08em;
}

.pf-bsp-bar__value {
    font-size: 0.98rem;
}

/* ---- Reveal ---- */
[data-pf-reveal] {
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-pf-reveal].is-pending {
    opacity: 0;
    transform: translateY(36px);
}

@media (prefers-reduced-motion: reduce) {
    .pf-bsp-card,
    .pf-bsp-card::after,
    .pf-bsp-stage__tilt,
    .pf-bsp-panel,
    .pf-bsp-bar {
        transition: none;
    }

    .pf-bsp-sig__word.is-active,
    .pf-bsp-sig__word.is-active::after,
    .pf-bsp-chrome__pulse {
        animation: none;
    }

    .pf-bsp-sig__word::after {
        transform: rotate(-2.5deg);
    }
}
