/* AOC Hero Slider — v1.2.0 */

.aoc-hero-slider {
    --aoc-hero-desktop: 520px;
    --aoc-hero-tablet: 470px;
    --aoc-hero-mobile: 410px;
    --aoc-hero-content: 1180px;
    --aoc-hero-overlay: .48;
    --aoc-hero-accent: #b01b32;
    --aoc-hero-speed: 700ms;

    position: relative;
    width: 100%;
    height: var(--aoc-hero-desktop);
    min-height: 380px;
    overflow: hidden;
    background: #151515;
    isolation: isolate;
}


/*
 * Pleine largeur ("full bleed")
 * Le shortcode peut être placé dans un conteneur VamTam limité.
 * Cette règle fait sortir uniquement le slider de ce conteneur sans modifier le thème.
 */
.aoc-hero-slider.aoc-hero-slider--full-bleed {
    width: 100vw;
    max-width: none !important;

    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    left: auto;
    right: auto;
}

/* Évite qu'une règle VamTam appliquée aux éléments de contenu ne re-limite le slider. */
.aoc-hero-slider.aoc-hero-slider--full-bleed,
.aoc-hero-slider.aoc-hero-slider--full-bleed .aoc-hero-slider__track,
.aoc-hero-slider.aoc-hero-slider--full-bleed .aoc-hero-slide {
    box-sizing: border-box;
}


.aoc-hero-slider__track,
.aoc-hero-slide {
    position: absolute;
    inset: 0;
}

.aoc-hero-slide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 0;

    transition:
        opacity var(--aoc-hero-speed) ease,
        visibility 0s linear var(--aoc-hero-speed);
}

.aoc-hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;

    transition:
        opacity var(--aoc-hero-speed) ease,
        visibility 0s linear 0s;
}

.aoc-hero-slide__image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transform: scale(1.025);
    transition: transform 7s ease;
}

.aoc-hero-slide.is-active .aoc-hero-slide__image {
    transform: scale(1);
}

.aoc-hero-slide__shade {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(8, 8, 8, calc(var(--aoc-hero-overlay) + .18)) 0%,
            rgba(8, 8, 8, var(--aoc-hero-overlay)) 42%,
            rgba(8, 8, 8, calc(var(--aoc-hero-overlay) * .62)) 74%,
            rgba(8, 8, 8, calc(var(--aoc-hero-overlay) * .42)) 100%
        );
}

.aoc-hero-slide__inner {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;

    width: min(calc(100% - 48px), var(--aoc-hero-content));
    height: 100%;

    margin: 0 auto;
}

.aoc-hero-slide--left .aoc-hero-slide__inner {
    justify-content: flex-start;
}

.aoc-hero-slide--center .aoc-hero-slide__inner {
    justify-content: center;
    text-align: center;
}

.aoc-hero-slide--right .aoc-hero-slide__inner {
    justify-content: flex-end;
    text-align: right;
}

.aoc-hero-slide__content {
    width: min(680px, 64vw);
    color: #fff;

    opacity: 0;
    transform: translateY(18px);

    transition:
        opacity 540ms ease 120ms,
        transform 540ms ease 120ms;
}

.aoc-hero-slide.is-active .aoc-hero-slide__content {
    opacity: 1;
    transform: translateY(0);
}

.aoc-hero-slide__eyebrow {
    margin-bottom: 18px;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;

    color: rgba(255, 255, 255, .82);
}

.aoc-hero-slide__title {
    margin: 0;

    font-family: inherit;
    font-size: clamp(38px, 4vw, 64px);
    line-height: .99;
    font-weight: 760;
    letter-spacing: -.035em;

    color: #fff !important;
}

.aoc-hero-slide__text {
    max-width: 620px;

    margin: 22px 0 0;

    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.65;
    font-weight: 400;

    color: rgba(255, 255, 255, .78) !important;
}

.aoc-hero-slide--center .aoc-hero-slide__text {
    margin-left: auto;
    margin-right: auto;
}

.aoc-hero-slide--right .aoc-hero-slide__text {
    margin-left: auto;
}

.aoc-hero-slide__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 28px;
}

.aoc-hero-slide--center .aoc-hero-slide__actions {
    justify-content: center;
}

.aoc-hero-slide--right .aoc-hero-slide__actions {
    justify-content: flex-end;
}

.aoc-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 12px 20px;

    border: 1px solid transparent;
    border-radius: 8px;

    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    text-decoration: none !important;

    transition:
        transform .18s ease,
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.aoc-hero-button:hover {
    transform: translateY(-1px);
}

.aoc-hero-button--primary {
    background: var(--aoc-hero-accent);
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.aoc-hero-button--primary:hover {
    filter: brightness(.94);
    color: #fff !important;
}

.aoc-hero-button--secondary {
    border-color: rgba(255, 255, 255, .72);
    background: rgba(255, 255, 255, .04);
    color: #fff !important;
    backdrop-filter: blur(2px);
}

.aoc-hero-button--secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .11);
    color: #fff !important;
}

/* Controls */
.aoc-hero-slider__arrow {
    position: absolute;
    z-index: 4;
    top: 50%;

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

    width: 46px;
    height: 46px;

    margin: 0;
    padding: 0;

    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50%;

    background: rgba(15, 15, 15, .22);
    color: #fff;

    transform: translateY(-50%);
    cursor: pointer;

    backdrop-filter: blur(4px);

    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

.aoc-hero-slider__arrow:hover {
    background: rgba(15, 15, 15, .48);
    border-color: rgba(255, 255, 255, .8);
}

.aoc-hero-slider__arrow span {
    display: block;
    margin-top: -2px;

    font-size: 34px;
    line-height: 1;
}

.aoc-hero-slider__arrow--prev {
    left: 24px;
}

.aoc-hero-slider__arrow--next {
    right: 24px;
}

.aoc-hero-slider__controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 24px;

    display: flex;
    align-items: center;
    gap: 12px;

    transform: translateX(-50%);
}

.aoc-hero-slider__dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aoc-hero-slider__dot {
    width: 8px;
    height: 8px;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 999px;

    background: rgba(255, 255, 255, .48);

    cursor: pointer;

    transition:
        width .2s ease,
        background .2s ease;
}

.aoc-hero-slider__dot.is-active {
    width: 28px;
    background: #fff;
}

.aoc-hero-slider__pause {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;

    border: 1px solid rgba(255,255,255,.42);
    border-radius: 50%;
    background: rgba(15,15,15,.24);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.aoc-hero-slider__pause:hover,
.aoc-hero-slider__pause:focus-visible {
    background: rgba(15,15,15,.52);
    border-color: rgba(255,255,255,.82);
    outline: none;
}

.aoc-hero-slider__pause-icon {
    display: block;
    font-size: 12px;
    line-height: 1;
}

@media (max-width: 1000px) {
    .aoc-hero-slider {
        height: var(--aoc-hero-tablet);
    }

    .aoc-hero-slide__inner {
        width: min(calc(100% - 56px), var(--aoc-hero-content));
    }

    .aoc-hero-slide__content {
        width: min(620px, 78vw);
    }

    .aoc-hero-slide__title {
        font-size: clamp(36px, 6vw, 54px);
    }
}

@media (max-width: 680px) {
    .aoc-hero-slider {
        height: var(--aoc-hero-mobile);
        min-height: 320px;
    }

    .aoc-hero-slide__shade {
        background:
            linear-gradient(
                90deg,
                rgba(8, 8, 8, calc(var(--aoc-hero-overlay) + .20)) 0%,
                rgba(8, 8, 8, calc(var(--aoc-hero-overlay) + .10)) 70%,
                rgba(8, 8, 8, var(--aoc-hero-overlay)) 100%
            );
    }

    .aoc-hero-slide__inner {
        width: calc(100% - 36px);
    }

    .aoc-hero-slide__content {
        width: 100%;
    }

    .aoc-hero-slide__eyebrow {
        margin-bottom: 13px;
        font-size: 10px;
        letter-spacing: .18em;
    }

    .aoc-hero-slide__title {
        font-size: clamp(32px, 10vw, 44px);
        line-height: 1.02;
    }

    .aoc-hero-slide__text {
        margin-top: 16px;
        font-size: 14px;
        line-height: 1.55;
    }

    .aoc-hero-slide__actions {
        gap: 9px;
        margin-top: 20px;
    }

    .aoc-hero-button {
        min-height: 44px;
        padding: 11px 15px;
        font-size: 12px;
    }

    .aoc-hero-slider__arrow {
        display: none;
    }

    .aoc-hero-slider__controls {
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aoc-hero-slide,
    .aoc-hero-slide__image,
    .aoc-hero-slide__content,
    .aoc-hero-slider__dot,
    .aoc-hero-slider__arrow,
    .aoc-hero-slider__pause {
        transition: none !important;
        animation: none !important;
    }
}


/* Limite les micro-débordements horizontaux liés aux arrondis de viewport sur mobile. */
@media (max-width: 680px) {
    .aoc-hero-slider.aoc-hero-slider--full-bleed {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }
}
