/* ==========================================================================
   SamaWeb — Motion design + fausse 3D CSS (couche additive)
   Transform / opacity only. Pas de glow, pas de particules, pas de WebGL.
   ========================================================================== */

:root {
    --swx-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --swx-motion-y: 2.25rem;
    --swx-motion-y-sm: 1.25rem;
    --swx-motion-scale: 0.94;
    --swx-motion-rx: 5deg;
    --swx-motion-dur: 1s;
    --swx-motion-dur-fast: 0.7s;
    --swx-depth-perspective: 900px;
}

@media (max-width: 767px) {
    :root {
        --swx-motion-y: 1.35rem;
        --swx-motion-y-sm: 0.85rem;
        --swx-motion-scale: 0.96;
        --swx-motion-rx: 3deg;
        --swx-motion-dur: 0.8s;
    }
}

/* -------------------------------------------------------------------------
   1. Reveals différenciés
   ------------------------------------------------------------------------- */
.swx-reveal {
    opacity: 0;
    transform: translate3d(0, var(--swx-motion-y-sm), 0);
    transition:
        opacity var(--swx-motion-dur-fast) var(--swx-motion-ease),
        transform var(--swx-motion-dur) var(--swx-motion-ease);
    transition-delay: var(--swx-reveal-delay, 0ms);
}

.swx-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Titres — entrée en fausse 3D (perspective + rise) */
.swx-reveal--title,
[data-reveal].swx-reveal--title {
    opacity: 0;
    transform:
        perspective(var(--swx-depth-perspective))
        translate3d(0, var(--swx-motion-y), 0)
        rotateX(calc(var(--swx-motion-rx) + 2deg));
    transform-origin: 50% 100%;
    transition:
        opacity var(--swx-motion-dur) var(--swx-motion-ease),
        transform var(--swx-motion-dur) var(--swx-motion-ease);
    transition-delay: var(--swx-reveal-delay, 0ms);
}

.swx-reveal--title.is-visible,
[data-reveal].swx-reveal--title.is-visible {
    opacity: 1;
    transform:
        perspective(var(--swx-depth-perspective))
        translate3d(0, 0, 0)
        rotateX(0deg);
}

.swx-reveal--title .swx-accent {
    display: inline-block;
    opacity: 0.35;
    transform: translate3d(0, 0.28em, 0);
    transition:
        opacity 0.55s var(--swx-motion-ease) 0.16s,
        transform 0.55s var(--swx-motion-ease) 0.16s;
}

.swx-reveal--title.is-visible .swx-accent {
    opacity: 1;
    transform: none;
}

/* Paragraphes */
.swx-reveal--copy {
    transform: translate3d(0, var(--swx-motion-y-sm), 0);
}

/* Images / screenshots — vient vers le visiteur */
.swx-reveal--shot,
.swx-featured [data-reveal].swx-reveal--shot,
.swx-projects--portfolio [data-reveal].swx-reveal--shot {
    opacity: 0;
    transform-origin: center bottom;
    transform:
        perspective(var(--swx-depth-perspective))
        translate3d(0, 2.5rem, -40px)
        rotateX(var(--swx-motion-rx))
        scale(var(--swx-motion-scale));
    transition:
        opacity 1s var(--swx-motion-ease),
        transform 1.15s var(--swx-motion-ease);
    transition-delay: var(--swx-reveal-delay, 0ms);
}

.swx-reveal--shot.is-visible,
.swx-featured [data-reveal].swx-reveal--shot.is-visible,
.swx-projects--portfolio [data-reveal].swx-reveal--shot.is-visible {
    opacity: 1;
    transform:
        perspective(var(--swx-depth-perspective))
        translate3d(0, 0, 0)
        rotateX(0deg)
        scale(1);
}

/* Services — lignes */
.swx-reveal--line {
    transform: translate3d(0, 1rem, 0);
}

.swx-reveal--line.is-visible {
    transform: none;
}

/* CTA — révélation plus marquée */
.swx-reveal--cta {
    transform:
        perspective(var(--swx-depth-perspective))
        translate3d(0, 1.75rem, 0)
        rotateX(1.5deg)
        scale(0.985);
    transition:
        opacity 1s var(--swx-motion-ease),
        transform 1.15s var(--swx-motion-ease);
}

.swx-reveal--cta.is-visible {
    transform:
        perspective(var(--swx-depth-perspective))
        translate3d(0, 0, 0)
        rotateX(0)
        scale(1);
}

.swx-reveal--cta .swx-cta__title {
    opacity: 0;
    transform: translate3d(0, 0.75rem, 0);
    transition:
        opacity 0.9s var(--swx-motion-ease) 0.08s,
        transform 0.9s var(--swx-motion-ease) 0.08s;
}

.swx-reveal--cta.is-visible .swx-cta__title {
    opacity: 1;
    transform: none;
}

.swx-reveal--cta .swx-cta__title .swx-accent {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, 0.35em, 0);
    transition:
        opacity 0.55s var(--swx-motion-ease) 0.28s,
        transform 0.55s var(--swx-motion-ease) 0.28s;
}

.swx-reveal--cta.is-visible .swx-cta__title .swx-accent {
    opacity: 1;
    transform: none;
}

.swx-reveal--cta .swx-cta__lead,
.swx-reveal--cta .swx-cta__actions {
    opacity: 0;
    transform: translate3d(0, 0.75rem, 0);
    transition:
        opacity 0.65s var(--swx-motion-ease),
        transform 0.65s var(--swx-motion-ease);
}

.swx-reveal--cta .swx-cta__lead {
    transition-delay: 0.22s;
}

.swx-reveal--cta .swx-cta__actions {
    transition-delay: 0.34s;
}

.swx-reveal--cta.is-visible .swx-cta__lead,
.swx-reveal--cta.is-visible .swx-cta__actions {
    opacity: 1;
    transform: none;
}

/* -------------------------------------------------------------------------
   2. Scène de profondeur + tilt
   ------------------------------------------------------------------------- */
.swx-depth-scene {
    perspective: var(--swx-depth-perspective);
}

.swx-hero.swx-depth-scene,
.swx-hero {
    perspective: var(--swx-depth-perspective);
}

.swx-hero .swx-display.swx-reveal--title {
    transform-origin: left bottom;
}

.swx-tilt {
    transform-style: preserve-3d;
    transform: translate3d(0, 0, 0);
}

.swx-tilt.is-tilting {
    will-change: transform;
}

.swx-featured__main.swx-tilt,
.swx-featured__item.swx-tilt,
.swx-projects--portfolio .swx-project.swx-tilt {
    transform-style: preserve-3d;
}

.swx-depth-layer {
    transform: translate3d(0, var(--swx-depth-y, 0px), 0);
    will-change: transform;
    transition: transform 0.15s linear;
}

@media (hover: hover) and (pointer: fine) {
    .swx-featured__main:hover .swx-featured__media,
    .swx-featured__item:hover .swx-featured__media,
    .swx-projects--portfolio .swx-project:hover .swx-project__media {
        transform: translate3d(0, var(--swx-depth-y, 0px), 12px) scale(1.01);
    }
}

/* -------------------------------------------------------------------------
   3. Méthode 01 → 04
   ------------------------------------------------------------------------- */
.swx-process[data-swx-process] {
    position: relative;
}

.swx-process__rail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--swx-border);
    overflow: hidden;
    pointer-events: none;
}

.swx-process__rail-fill {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--swx-violet);
    transform-origin: left center;
    transition: width 0.55s var(--swx-motion-ease);
}

.swx-process[data-swx-process] .swx-process__card {
    position: relative;
    opacity: 0.42;
    transform: translate3d(0, 0.65rem, 0);
    transition:
        opacity 0.55s var(--swx-motion-ease),
        transform 0.55s var(--swx-motion-ease);
}

.swx-process[data-swx-process] .swx-process__card.swx-reveal,
.swx-process[data-swx-process] .swx-process__card.swx-reveal.is-visible {
    opacity: 0.42;
    transform: translate3d(0, 0.65rem, 0);
    clip-path: none;
}

.swx-process[data-swx-process] .swx-process__card.is-active,
.swx-process[data-swx-process] .swx-process__card.swx-reveal.is-visible.is-active {
    opacity: 1;
    transform: none;
}

.swx-process[data-swx-process] .swx-process__card .swx-process__index {
    transition:
        opacity 0.45s var(--swx-motion-ease),
        transform 0.45s var(--swx-motion-ease),
        color 0.45s var(--swx-motion-ease);
    opacity: 0.35;
    transform: scale(0.92);
    transform-origin: left top;
    color: var(--swx-muted);
}

.swx-process[data-swx-process] .swx-process__card.is-active .swx-process__index {
    opacity: 0.9;
    transform: scale(1);
    color: var(--swx-violet);
}

.swx-process[data-swx-process] .swx-process__card.is-active .swx-process__title {
    color: var(--swx-ink);
}

/* -------------------------------------------------------------------------
   4. Services — marches d’escalier 3D (desktop) + liste plate (mobile)
   ------------------------------------------------------------------------- */
.swx-service-stairs {
    position: relative;
    z-index: 1;
}

/* -------------------------------------------------------------------------
   4. Services — escalier éditorial (desktop) — sans 3D (clics fiables)
   ------------------------------------------------------------------------- */
.swx-service-stairs {
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .swx-service-board[data-swx-service-stairs] {
        overflow: visible;
        padding-bottom: 0.5rem;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-stairs {
        transform: none;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-list {
        border-top: none;
        display: flex;
        flex-direction: column;
        gap: 1.15rem;
        overflow: visible;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row {
        position: relative;
        z-index: 1;
        --stair-p: 1;
        --stair-pad: 0;
        display: grid;
        grid-template-columns: 3.5rem minmax(0, 1fr) auto;
        gap: 1rem 1.25rem;
        align-items: start;
        margin: 0;
        margin-left: calc(var(--stair-pad) * 1rem);
        width: calc(100% - var(--stair-pad) * 1rem);
        max-width: 100%;
        box-sizing: border-box;
        --stair-inset: 1.9rem;
        padding: 1.85rem var(--stair-inset) 2rem;
        border: 1px solid rgba(124, 58, 237, 0.14);
        border-radius: 1.05rem;
        background:
            linear-gradient(
                165deg,
                rgba(255, 255, 255, 0.98) 0%,
                rgba(247, 246, 243, 0.96) 100%
            );
        box-shadow:
            0 14px 28px rgba(55, 30, 90, 0.08),
            0 1px 0 rgba(255, 255, 255, 0.75) inset;
        text-decoration: none;
        color: inherit;
        transform: none;
        opacity: 1;
        transition:
            border-color 0.3s ease,
            box-shadow 0.3s ease,
            margin-left 0.7s var(--swx-motion-ease),
            width 0.7s var(--swx-motion-ease);
        pointer-events: auto;
        cursor: pointer;
    }

    /* Contre-marche plate (effet marche, sans transform 3D) */
    .swx-service-board[data-swx-service-stairs] .swx-service-row::before {
        content: "";
        position: absolute;
        left: 0.75rem;
        right: 0.75rem;
        bottom: -0.45rem;
        height: 0.45rem;
        border-radius: 0 0 0.6rem 0.6rem;
        background: rgba(124, 58, 237, 0.12);
        pointer-events: none;
        z-index: -1;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row::after {
        content: "";
        position: absolute;
        left: 1.9rem;
        right: 1.9rem;
        bottom: 1.15rem;
        height: 2px;
        border-radius: 2px;
        background: var(--swx-violet);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform 0.35s var(--swx-motion-ease);
        pointer-events: none;
    }

    /* Marches : décalage gauche uniquement (pas de rotate / Z) */
    .swx-service-board[data-swx-service-stairs] .swx-service-row[data-stair-step="0"] {
        --stair-pad: 0;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row[data-stair-step="1"] {
        --stair-pad: 2.25;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row[data-stair-step="2"] {
        --stair-pad: 4.5;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row:hover::after,
    .swx-service-board[data-swx-service-stairs] .swx-service-row.is-active::after,
    .swx-service-board[data-swx-service-stairs] .swx-service-row.is-stair-focus::after,
    .swx-service-board[data-swx-service-stairs] .swx-service-row:focus-visible::after {
        transform: scaleX(1);
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row__title {
        transition: transform 0.3s var(--swx-motion-ease), color 0.25s ease;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row__arrow {
        transition: transform 0.3s var(--swx-motion-ease), color 0.25s ease;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row__index {
        transition: color 0.25s ease;
        padding-top: 0.35rem;
        line-height: 1.2;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row__meta {
        padding-top: 0.35rem;
        padding-right: 0.15rem;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row:hover,
    .swx-service-board[data-swx-service-stairs] .swx-service-row.is-stair-focus,
    .swx-service-board[data-swx-service-stairs] .swx-service-row.is-active,
    .swx-service-board[data-swx-service-stairs] .swx-service-row:focus-visible {
        border-color: rgba(124, 58, 237, 0.4);
        box-shadow:
            0 16px 32px rgba(91, 33, 182, 0.12),
            0 1px 0 rgba(255, 255, 255, 0.8) inset;
        padding-left: var(--stair-inset);
        padding-right: var(--stair-inset);
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row:hover .swx-service-row__index,
    .swx-service-board[data-swx-service-stairs] .swx-service-row.is-stair-focus .swx-service-row__index,
    .swx-service-board[data-swx-service-stairs] .swx-service-row:focus-visible .swx-service-row__index {
        color: var(--swx-violet);
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row:hover .swx-service-row__title,
    .swx-service-board[data-swx-service-stairs] .swx-service-row.is-stair-focus .swx-service-row__title,
    .swx-service-board[data-swx-service-stairs] .swx-service-row:focus-visible .swx-service-row__title {
        color: var(--swx-violet-deep);
        transform: translateX(0.28rem);
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row:hover .swx-service-row__arrow,
    .swx-service-board[data-swx-service-stairs] .swx-service-row.is-stair-focus .swx-service-row__arrow,
    .swx-service-board[data-swx-service-stairs] .swx-service-row:focus-visible .swx-service-row__arrow {
        color: var(--swx-violet);
        transform: translate(0.28rem, -0.1rem);
    }
}

@media (hover: hover) and (pointer: fine) and (max-width: 1023px) {
    .swx-service-row {
        position: relative;
        transition:
            background-color 0.35s var(--swx-motion-ease),
            border-color 0.35s var(--swx-motion-ease);
    }

    .swx-service-row::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        height: 1px;
        background: var(--swx-violet);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform 0.45s var(--swx-motion-ease);
        pointer-events: none;
    }

    .swx-service-row:hover::after,
    .swx-service-row.is-active::after {
        transform: scaleX(1);
    }

    .swx-service-row__title {
        transition: transform 0.4s var(--swx-motion-ease), color 0.35s ease;
    }

    .swx-service-row:hover .swx-service-row__title,
    .swx-service-row.is-active .swx-service-row__title {
        transform: translate3d(0.35rem, 0, 0);
        color: var(--swx-violet-deep);
    }

    .swx-service-row__arrow {
        transition: transform 0.4s var(--swx-motion-ease), color 0.35s ease;
    }

    .swx-service-row:hover .swx-service-row__arrow,
    .swx-service-row.is-active .swx-service-row__arrow {
        transform: translate3d(0.4rem, -0.15rem, 0);
        color: var(--swx-violet);
    }

    .swx-service-row__index {
        transition: color 0.35s ease, opacity 0.35s ease;
    }

    .swx-service-row:hover .swx-service-row__index,
    .swx-service-row.is-active .swx-service-row__index {
        color: var(--swx-violet);
        opacity: 1;
    }
}

.swx-service-preview {
    perspective: var(--swx-depth-perspective);
}

@media (max-width: 1023px) {
    .swx-service-board[data-swx-service-stairs] .swx-service-row {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .swx-service-board[data-swx-service-stairs] .swx-service-row::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .swx-service-board[data-swx-service-stairs] .swx-service-row {
        transition: none !important;
    }
}

.swx-service-preview__frame {
    transform-style: preserve-3d;
    transform:
        translate3d(1.25rem, 0.5rem, 0)
        rotateY(-4deg)
        scale(0.96);
    opacity: 0;
    transition:
        opacity 0.45s var(--swx-motion-ease),
        transform 0.55s var(--swx-motion-ease);
}

.swx-service-preview.is-visible .swx-service-preview__frame {
    opacity: 1;
    transform:
        translate3d(0, 0, 0)
        rotateY(-1.5deg)
        scale(1);
}

.swx-service-preview__frame.is-tilting {
    will-change: transform;
    transition: none;
}

/* -------------------------------------------------------------------------
   5. Portfolio / featured — zoom interne + plans
   ------------------------------------------------------------------------- */
.swx-featured__media,
.swx-projects--portfolio .swx-project__media {
    overflow: hidden;
    transform-style: preserve-3d;
}

.swx-featured__media img,
.swx-projects--portfolio .swx-project__media--photo > img {
    transition: transform 0.85s var(--swx-motion-ease);
    transform: scale(1.001);
}

@media (hover: hover) and (pointer: fine) {
    .swx-featured__main:hover .swx-featured__media img,
    .swx-featured__item:hover .swx-featured__media img,
    .swx-projects--portfolio .swx-project:hover .swx-project__media--photo > img {
        transform: scale(1.04);
    }
}

.swx-projects--portfolio .swx-project.swx-reveal--shot:nth-child(2) {
    --swx-reveal-delay: 70ms;
}

.swx-projects--portfolio .swx-project.swx-reveal--shot:nth-child(3) {
    --swx-reveal-delay: 140ms;
}

.swx-projects--portfolio .swx-project.swx-reveal--shot:nth-child(4) {
    --swx-reveal-delay: 210ms;
}

/* -------------------------------------------------------------------------
   6. Avis — crossfade directionnel
   ------------------------------------------------------------------------- */
.swx-reviews--monumental .swx-reviews__card {
    transition:
        opacity 0.45s var(--swx-motion-ease),
        transform 0.45s var(--swx-motion-ease);
}

.swx-reviews__track.is-shifting-next .swx-reviews__card.is-leaving {
    opacity: 0;
    transform: translate3d(-0.75rem, 0.35rem, 0);
}

.swx-reviews__track.is-shifting-prev .swx-reviews__card.is-leaving {
    opacity: 0;
    transform: translate3d(0.75rem, 0.35rem, 0);
}

.swx-reviews__track.is-shifting-next .swx-reviews__card.is-entering,
.swx-reviews__track.is-shifting-prev .swx-reviews__card.is-entering {
    opacity: 1;
    transform: none;
}

.swx-reviews__pager {
    transition: opacity 0.25s ease, transform 0.35s var(--swx-motion-ease);
}

.swx-reviews__pager.is-updating {
    opacity: 0.35;
    transform: translate3d(0, 0.2rem, 0);
}

/* -------------------------------------------------------------------------
   7. Micro-interactions
   ------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
    .swx-btn {
        transition:
            transform 0.3s var(--swx-motion-ease),
            background-color 0.3s ease,
            color 0.3s ease,
            border-color 0.3s ease;
    }

    .swx-btn:hover {
        transform: translate3d(0, -1px, 0);
    }

    .swx-btn__arrow,
    .swx-section-more__arrow,
    .swx-nav-link__arrow {
        display: inline-block;
        transition: transform 0.35s var(--swx-motion-ease);
    }

    .swx-btn:hover .swx-btn__arrow,
    .swx-section-more:hover .swx-section-more__arrow {
        transform: translate3d(0.28rem, 0, 0);
    }

    .swx-nav-link,
    .swx-footer__links a,
    .swx-section-more,
    .swx-inline-link {
        background-image: linear-gradient(currentColor, currentColor);
        background-position: 0 100%;
        background-repeat: no-repeat;
        background-size: 0 1px;
        transition: background-size 0.35s var(--swx-motion-ease), color 0.3s ease;
    }

    .swx-nav-link:hover,
    .swx-footer__links a:hover,
    .swx-section-more:hover,
    .swx-inline-link:hover {
        background-size: 100% 1px;
    }

    .swx-nav-link--cta,
    .swx-btn {
        background-image: none;
    }
}

.swx-nav__inner {
    transition: min-height 0.35s var(--swx-motion-ease);
}

.swx-nav--scrolled .swx-nav__inner {
    min-height: 3.55rem;
}

@media (min-width: 768px) {
    .swx-nav--scrolled .swx-nav__inner {
        min-height: 3.75rem;
    }
}

/* -------------------------------------------------------------------------
   8. Mobile — pas de tilt / intensité réduite
   ------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .swx-tilt {
        transform: none !important;
    }
}

/* -------------------------------------------------------------------------
   9. prefers-reduced-motion
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    :root {
        --swx-motion-y: 0px;
        --swx-motion-y-sm: 0px;
        --swx-motion-scale: 1;
        --swx-motion-rx: 0deg;
        --swx-motion-dur: 0.001ms;
        --swx-motion-dur-fast: 0.001ms;
    }

    .swx-reveal,
    .swx-reveal--title,
    .swx-reveal--copy,
    .swx-reveal--shot,
    .swx-reveal--line,
    .swx-reveal--cta,
    .swx-reveal--title .swx-accent,
    .swx-reveal--cta .swx-cta__title,
    .swx-reveal--cta .swx-cta__title .swx-accent,
    .swx-reveal--cta .swx-cta__lead,
    .swx-reveal--cta .swx-cta__actions,
    .swx-process__card,
    .swx-process__card .swx-process__index,
    .swx-process__rail-fill,
    .swx-service-preview__frame,
    .swx-reviews__card,
    .swx-reviews__pager,
    .swx-tilt,
    .swx-depth-layer,
    .swx-featured__media img,
    .swx-projects--portfolio .swx-project__media--photo > img {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
        clip-path: none !important;
        will-change: auto !important;
    }

    .swx-process__card {
        opacity: 1 !important;
    }

    .swx-process__card .swx-process__index {
        opacity: 0.85 !important;
        color: var(--swx-violet) !important;
    }

    .swx-process__rail-fill {
        width: 100% !important;
    }

    .swx-nav--scrolled .swx-nav__inner {
        transition: none;
    }

    .swx-ambient,
    .swx-ambient__slab,
    .swx-ambient__core,
    .swx-ambient__layer,
    .swx-ambient__orb,
    .swx-ambient__stage,
    .swx-ambient__scene {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }

    .swx-ambient {
        opacity: 0.55;
    }
}

/* ==========================================================================
   Fond ambiant — sculpture CSS 3D hero + CTA soft
   ========================================================================== */
.swx-ambient {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    perspective: 1200px;
    transform-style: preserve-3d;
    --swx-amb-x: 0;
    --swx-amb-y: 0;
    --swx-amb-idle: 0deg;
    --swx-amb-breathe: 1;
}

.swx-hero > .swx-ambient,
.swx-cta > .swx-ambient {
    z-index: 0;
}

.swx-hero > .swx-hero__inner,
.swx-cta > .swx-cta__title,
.swx-cta > .swx-cta__lead,
.swx-cta > .swx-cta__actions,
.swx-cta > .swx-cta__glow {
    position: relative;
    z-index: 2;
}

.swx-cta:has(> .swx-ambient) {
    overflow: hidden;
}

/* --- Hero : plans 3D empilés à droite --- */
.swx-ambient--hero .swx-ambient__stage {
    position: absolute;
    top: 6%;
    right: 2%;
    width: min(48vw, 34rem);
    height: min(82%, 38rem);
    perspective: 1400px;
    transform-style: preserve-3d;
    transform-origin: 55% 45%;
    transform:
        translate3d(
            calc(var(--swx-amb-x) * 22px),
            calc(var(--swx-amb-y) * 16px),
            0
        )
        rotateX(calc(var(--swx-amb-y) * -9deg + var(--swx-amb-idle)))
        rotateY(calc(var(--swx-amb-x) * 14deg + 18deg))
        rotateZ(calc(var(--swx-amb-x) * -2deg))
        scale(var(--swx-amb-breathe));
    will-change: transform;
}

.swx-ambient--hero .swx-ambient__scene {
    position: absolute;
    inset: 8% 10% 10% 12%;
    transform-style: preserve-3d;
    transform: rotateX(18deg) rotateY(-28deg) rotateZ(8deg);
}

.swx-ambient--hero .swx-ambient__slab,
.swx-ambient--hero .swx-ambient__core {
    position: absolute;
    display: block;
    border-radius: 1.35rem;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.swx-ambient--hero .swx-ambient__slab--shadow {
    inset: 18% 8% 6% 18%;
    border-radius: 1.5rem;
    background: rgba(88, 28, 135, 0.22);
    filter: blur(28px);
    transform: translate3d(18px, 42px, -120px) scale(1.05);
    opacity: 0.9;
}

.swx-ambient--hero .swx-ambient__slab--a {
    width: 78%;
    height: 58%;
    top: 8%;
    left: 4%;
    background:
        linear-gradient(
            145deg,
            rgba(237, 233, 254, 0.95) 0%,
            rgba(167, 139, 250, 0.88) 42%,
            rgba(109, 40, 217, 0.82) 100%
        );
    box-shadow:
        0 28px 50px rgba(88, 28, 135, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transform:
        translate3d(
            calc(var(--swx-amb-x) * -18px),
            calc(var(--swx-amb-y) * -10px),
            -90px
        )
        rotateX(4deg)
        rotateY(-6deg);
}

.swx-ambient--hero .swx-ambient__slab--b {
    width: 72%;
    height: 52%;
    top: 18%;
    left: 16%;
    background:
        linear-gradient(
            155deg,
            rgba(255, 255, 255, 0.92) 0%,
            rgba(196, 181, 253, 0.9) 38%,
            rgba(124, 58, 237, 0.88) 100%
        );
    box-shadow:
        0 22px 40px rgba(91, 33, 182, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transform:
        translate3d(
            calc(var(--swx-amb-x) * 8px),
            calc(var(--swx-amb-y) * 6px),
            -20px
        )
        rotateX(2deg)
        rotateY(4deg);
}

.swx-ambient--hero .swx-ambient__slab--c {
    width: 64%;
    height: 46%;
    top: 28%;
    left: 28%;
    background:
        linear-gradient(
            160deg,
            #f5f3ff 0%,
            #c4b5fd 35%,
            #7c3aed 78%,
            #5b21b6 100%
        );
    box-shadow:
        0 18px 36px rgba(76, 29, 149, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform:
        translate3d(
            calc(var(--swx-amb-x) * 28px),
            calc(var(--swx-amb-y) * 20px),
            70px
        )
        rotateX(-2deg)
        rotateY(8deg);
    opacity: 0.88;
}

.swx-ambient--hero .swx-ambient__slab--d {
    width: 34%;
    height: 22%;
    top: 54%;
    left: 52%;
    border-radius: 0.85rem;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(221, 214, 254, 0.4) 45%,
            rgba(167, 139, 250, 0.28) 100%
        );
    box-shadow:
        0 10px 22px rgba(91, 33, 182, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transform:
        translate3d(
            calc(var(--swx-amb-x) * 40px),
            calc(var(--swx-amb-y) * 28px),
            140px
        )
        rotateX(-6deg)
        rotateY(12deg);
    opacity: 0.55;
}

.swx-ambient--hero .swx-ambient__core {
    width: 18%;
    height: 18%;
    top: 36%;
    left: 38%;
    border-radius: 0.85rem;
    background:
        linear-gradient(145deg, #ffffff 0%, #ddd6fe 55%, #a78bfa 100%);
    box-shadow:
        0 10px 24px rgba(91, 33, 182, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transform:
        translate3d(
            calc(var(--swx-amb-x) * 34px),
            calc(var(--swx-amb-y) * 24px),
            200px
        )
        rotateY(18deg)
        rotateX(-10deg);
}

/* Voile : texte gauche lisible, droite ouverte pour la 3D */
.swx-ambient--hero .swx-ambient__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            90deg,
            var(--swx-bg) 0%,
            var(--swx-bg) 38%,
            rgba(247, 246, 243, 0.55) 52%,
            rgba(247, 246, 243, 0.12) 66%,
            transparent 78%
        );
}

/* --- CTA : volumes soft uniquement --- */
.swx-ambient--cta .swx-ambient__layer {
    position: absolute;
    inset: -10%;
    transform-style: preserve-3d;
    will-change: transform;
}

.swx-ambient--cta .swx-ambient__layer--back {
    transform:
        translate3d(calc(var(--swx-amb-x) * 12px), calc(var(--swx-amb-y) * 10px), -40px)
        rotateX(calc(var(--swx-amb-y) * -1deg + var(--swx-amb-idle)))
        rotateY(calc(var(--swx-amb-x) * 1.2deg))
        scale(var(--swx-amb-breathe));
}

.swx-ambient--cta .swx-ambient__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(36px);
    opacity: 0.5;
}

.swx-ambient--cta .swx-ambient__orb--a {
    width: min(48vw, 30rem);
    height: min(48vw, 30rem);
    top: -18%;
    left: -8%;
    background: radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.38), transparent 68%);
}

.swx-ambient--cta .swx-ambient__orb--b {
    width: min(36vw, 22rem);
    height: min(36vw, 22rem);
    bottom: -12%;
    right: -6%;
    background: radial-gradient(circle at 50% 50%, rgba(196, 181, 253, 0.24), transparent 70%);
}

.swx-ambient--cta .swx-ambient__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 70% 60% at 50% 45%, rgba(17, 17, 17, 0.12), rgba(17, 17, 17, 0.7) 78%);
}

@media (max-width: 1023px) {
    .swx-ambient--hero .swx-ambient__stage {
        width: min(62vw, 24rem);
        height: min(68%, 28rem);
        right: -2%;
        top: 10%;
        opacity: 0.85;
    }

    .swx-ambient--hero .swx-ambient__veil {
        background:
            linear-gradient(
                90deg,
                var(--swx-bg) 0%,
                rgba(247, 246, 243, 0.9) 48%,
                rgba(247, 246, 243, 0.25) 70%,
                transparent 90%
            );
    }
}

@media (max-width: 767px) {
    .swx-ambient--hero .swx-ambient__stage {
        width: 58vw;
        right: -6%;
        opacity: 0.65;
        height: 52%;
        top: 18%;
    }

    .swx-ambient--hero .swx-ambient__slab--d,
    .swx-ambient--hero .swx-ambient__core {
        display: none;
    }

    .swx-ambient--hero .swx-ambient__veil {
        background:
            linear-gradient(
                90deg,
                var(--swx-bg) 0%,
                rgba(247, 246, 243, 0.92) 58%,
                transparent 100%
            );
    }
}

@media (prefers-reduced-motion: reduce) {
    .swx-ambient--hero .swx-ambient__stage,
    .swx-ambient--hero .swx-ambient__slab,
    .swx-ambient--hero .swx-ambient__core,
    .swx-ambient--cta .swx-ambient__layer {
        transform: none !important;
        will-change: auto !important;
    }

    .swx-ambient--hero .swx-ambient__scene {
        transform: rotateX(12deg) rotateY(-18deg) !important;
    }

    .swx-ambient {
        opacity: 0.55;
    }
}
