/* =============================================
   Hero Slider - Premium
   ============================================= */
.hero {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 450px;
    max-height: 650px;
    overflow: hidden;
    background: #060c1a;
}

.hero .swiper {
    width: 100%;
    height: 100%;
}

/* --- Slide --- */
.hero__slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background with Ken Burns */
.hero__slide-bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: kenBurns 20s ease alternate infinite;
    will-change: transform;
}

@keyframes kenBurns {
    0% {
        transform: scale(1.0) translate(0, 0);
    }

    100% {
        transform: scale(1.08) translate(-6px, -3px);
    }
}

.swiper-slide-active .hero__slide-bg {
    animation-play-state: running;
}

/* Overlay sombre uniforme */
.hero__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(6, 12, 26, 0.9) 0%, rgba(6, 12, 26, 0.35) 50%, rgba(6, 12, 26, 0.2) 100%),
        radial-gradient(ellipse at center, rgba(6, 12, 26, 0.15) 0%, rgba(6, 12, 26, 0.5) 100%);
    z-index: 1;
}

/* Subtle blue tint */
.hero__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 40, 80, 0.12);
    z-index: 1;
    pointer-events: none;
}

/* --- Content : chevauche la voiture, au dessus --- */
.hero__slide-content {
    position: absolute;
    left: 15%;
    top: 50%;
    z-index: 4;
    max-width: 420px;
    text-align: left;
    padding: 1.5rem 1.8rem;
    background: rgba(6, 12, 26, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    opacity: 0;
    transform: translateY(-50%) translateX(-200px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.swiper-slide-active .hero__slide-content {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Tag */
.hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.25rem 0.75rem;
    background: rgba(43, 78, 162, 0.25);
    border: 1px solid rgba(43, 78, 162, 0.4);
    color: var(--color-accent-bright, #5B8DEF);
    font-size: 0.6rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-radius: 50px;
    margin-bottom: 0.6rem;
}

.hero__tag::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-accent-bright, #5B8DEF);
    animation: tagPulse 2s ease infinite;
}

@keyframes tagPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(91, 141, 239, 0.4);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 0 5px rgba(91, 141, 239, 0);
    }
}

/* Title - compact */
.hero__title {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: var(--fw-extrabold);
    line-height: 1.2;
    color: var(--color-white);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.hero__title span {
    color: var(--color-accent-bright, #5B8DEF);
    position: relative;
}

.hero__title span::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 1px;
    width: 100%;
    height: 2px;
    background: var(--color-accent, #2B4EA2);
    border-radius: 2px;
    opacity: 0.5;
}

/* Subtitle - compact */
.hero__subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.55;
    margin-bottom: 0.9rem;
}

/* Action buttons - compact */
.hero__actions {
    display: flex;
    gap: 0.6rem;
}

.hero__actions .btn {
    padding: 0.45rem 1.1rem;
    font-size: 0.65rem;
}

/* --- Car image : chevauche le texte, en dessous --- */
.hero__car {
    position: absolute;
    /* right: -2%; */
    top: 50%;
    transform: translateY(-50%) translateX(250px);
    width: 60%;
    max-width: 680px;
    z-index: 2;
    object-fit: contain;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.5));
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.swiper-slide-active .hero__car {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    animation: carFloat 4s ease-in-out 1.5s infinite;
}

@keyframes carFloat {

    0%,
    100% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(calc(-50% - 6px));
    }
}

/* --- Navigation arrows --- */
.hero .swiper-button-prev,
.hero .swiper-button-next {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    top: 50%;
}

.hero .swiper-button-prev {
    left: 16px;
}

.hero .swiper-button-next {
    right: 16px;
}

.hero .swiper-button-prev:hover,
.hero .swiper-button-next:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: scale(1.08);
}

.hero .swiper-button-prev::after,
.hero .swiper-button-next::after {
    font-size: 13px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
}

.hero .swiper-button-prev:hover::after,
.hero .swiper-button-next:hover::after {
    color: #fff;
}

/* --- Pagination: progress bar --- */
.hero .swiper-pagination {
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    display: flex;
    gap: 0;
    height: 3px;
    z-index: 10;
}

.hero .swiper-pagination-bullet {
    flex: 1;
    width: auto;
    height: 3px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
    margin: 0 !important;
    position: relative;
    overflow: hidden;
    transition: none;
}

.hero .swiper-pagination-bullet::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--color-accent-bright, #5B8DEF);
    transition: none;
}

.hero .swiper-pagination-bullet-active::after {
    animation: paginationFill 6s linear forwards;
}

@keyframes paginationFill {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* --- Slide counter --- */
.hero__counter {
    position: absolute;
    bottom: 16px;
    right: 20px;
    z-index: 10;
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-family: var(--font-heading);
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    font-weight: var(--fw-medium);
}

.hero__counter-current {
    font-size: 1.3rem;
    font-weight: var(--fw-extrabold);
    color: var(--color-white);
    line-height: 1;
}

.hero__counter-sep {
    margin: 0 3px;
    opacity: 0.3;
}

.hero__counter-total {
    font-size: 0.8rem;
}

/* --- Decorative vertical text --- */
.hero__deco-line {
    position: absolute;
    left: var(--container-padding);
    bottom: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.6rem;
    font-weight: var(--fw-semibold);
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.hero__deco-line::before {
    content: '';
    width: 1px;
    height: 35px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.25));
}

/* --- Responsive --- */
@media (max-width: 1023px) {
    .hero {
        height: 60vh;
        min-height: 400px;
        max-height: 550px;
    }

    .hero__slide-content {
        left: 25%;
        max-width: 340px;
        padding: 1.2rem 1.3rem;
    }

    .hero__car {
        width: 55%;
        right: -5%;
        opacity: 0.3;
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
    }

    .swiper-slide-active .hero__car {
        opacity: 0.35;
        animation: none;
    }

    .hero .swiper-button-prev,
    .hero .swiper-button-next {
        width: 36px;
        height: 36px;
    }

    .hero__deco-line {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero {
        height: 55vh;
        min-height: 360px;
        max-height: 480px;
    }

    .hero__slide-content {
        left: 4%;
        right: 4%;
        max-width: none;
        padding: 1rem 1rem;
        border-radius: 12px;
    }

    .hero__car {
        display: none;
    }

    .hero .swiper-button-prev,
    .hero .swiper-button-next {
        display: none;
    }

    .hero__actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero__title {
        font-size: clamp(1.2rem, 5vw, 1.6rem);
    }

    .hero__subtitle {
        font-size: 0.78rem;
    }

    .hero__counter {
        bottom: 10px;
        right: 12px;
    }

    .hero__counter-current {
        font-size: 1rem;
    }
}