/* CS Theme 0.14.0 — pages/home-hero
 * Ordre de cascade conservé depuis la 0.13.0. Voir docs/CSS-0.14.0.md.
 */

#index .page-content--home {
    width: 100%;
}

@layer ps-pages {
  #index .page-content--home {
    gap: 0;
  }
}

.cs-hero {
    position: relative;

    width: 100%;
    height:
        calc(
            100svh
            - var(--cs-topbar-height)
        );

    min-height: 640px;
    max-height: 1000px;

    overflow: hidden;

    background: #222;
}

.cs-hero__viewport {
    position: relative;

    width: 100%;
    height: 100%;
}

.cs-hero__slide {
    position: absolute;
    inset: 0;

    z-index: 1;

    width: 100%;
    height: 100%;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 550ms ease,
        visibility 550ms ease;
}

.cs-hero__slide.is-active {
    z-index: 2;

    opacity: 1;
    visibility: visible;

    pointer-events: auto;
}

.cs-hero__picture {
    position: absolute;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;
}

.cs-hero__image {
    width: 100%;
    height: 100%;

    object-fit: cover;

    object-position:
        var(
            --cs-hero-position-desktop,
            center center
        );
}

.cs-hero__content {
    position: absolute;
    inset: 0;

    z-index: 2;

    display: flex;
    align-items: center;

    pointer-events: none;
}

.cs-hero__content-inner {
    width: min(
        calc(100% - 48px),
        var(--cs-container-max)
    );

    display: flex;

    padding-top: 90px;
}

.cs-hero__content-inner--left {
    justify-content: flex-start;
}

.cs-hero__content-inner--center {
    justify-content: center;

    text-align: center;
}

.cs-hero__content-inner--right {
    justify-content: flex-end;

    text-align: right;
}

.cs-hero__copy {
    width: min(470px, 100%);

    pointer-events: auto;

    transform: translateY(16%);
}

.cs-hero__slide--light {
    color: #ffffff;
}

.cs-hero__slide--dark {
    color: var(--cs-text);
}

.cs-hero__title,
.cs-hero__subtitle {
    font-size: clamp(
        32px,
        2.25vw,
        44px
    );

    line-height: 1.02;
    font-weight: 600;
}

.cs-hero__subtitle {
    margin-top: 2px;
}

.cs-hero__cta {
    min-width: 180px;
    min-height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 46px;
    padding: 12px 28px;

    background: var(--cs-beige);

    color: var(--cs-text);

    border: 0;

    font-size: 15px;
    font-weight: 400;

    text-decoration: none;
    text-transform: uppercase;

    transition:
        color 180ms ease,
        background-color 180ms ease;
}

.cs-hero__cta:hover,
.cs-hero__cta:focus {
    background: var(--cs-brown);

    color: #ffffff;
}

.cs-hero__pagination {
    position: absolute;

    left: 50%;
    bottom: 28px;

    z-index: 10;

    display: flex;

    gap: 10px;

    transform: translateX(-50%);
}

.cs-hero__dot {
    width: 12px;
    height: 12px;

    padding: 0;

    border: 0;
    border-radius: 4px;

    background:
        rgba(
            255,
            255,
            255,
            0.55
        );

    box-shadow:
        0 0 0 1px
        rgba(
            0,
            0,
            0,
            0.05
        );

    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.cs-hero__dot.is-active {
    background: var(--cs-beige);

    transform: scale(1.08);
}

@media (max-width: 767.98px) {

    .cs-hero {
        height: 70svh;

        min-height: 500px;
        max-height: 680px;
    }

    .cs-hero__image {
        object-position:
            var(
                --cs-hero-position-mobile,
                center center
            );
    }

    .cs-hero__content {
        align-items: flex-start;
    }

    .cs-hero__content-inner {
        width: 100%;

        padding:
            0
            16px;

        margin-top: 40%;
    }

    .cs-hero__copy {
        width: min(
            280px,
            85%
        );

        transform: none;
    }

    .cs-hero__title,
    .cs-hero__subtitle {
        font-size:
            clamp(
                34px,
                10vw,
                44px
            );

        line-height: 0.98;
    }

    .cs-hero__cta {
        min-width: 0;
        min-height: 42px;

        margin-top: 44px;

        padding:
            8px
            20px;

        font-size: 12px;
    }

    .cs-hero__pagination {
        bottom: 14px;

        gap: 8px;
    }

    .cs-hero__dot {
        width: 12px;
        height: 12px;
    }

}

@media (
    prefers-reduced-motion: reduce
) {

    .cs-hero__slide {
        transition: none;
    }

}
