@import "./variables.css";
@import "./global.css";

.hero {
    min-height: 100vh;
    width: 100%;
    padding-top: 300px;
    position: relative;
    padding-bottom: 48px;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;

    background-image: url("https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?auto=format&fit=crop&w=1600&q=80");
    background-position: center;
    background-size: cover;

    transition:
        background-image .6s ease,
        transform 8s linear;

}

.hero-text {
    z-index: 3;
    position: relative;
}

.hero-text h1 {
    font-size: clamp(48px, 6vw, 110px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
}

.hero-text h1 span {
    font-weight: normal;
    font-family: var(--secondary-font);
}

.hero-text p {
    color: var(--grey-2);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.5) 45%,
            rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.hero-thubnails {
    position: absolute;
    z-index: 3;
    right: clamp(1rem, 5vw, 3rem);
    display: grid;
    gap: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.thumb-item {
    width: 130px;
    height: 110px;
    cursor: pointer;
}

.thumbnails-mobile {
    display: none;
    flex-direction: row;
    width: 100%;
    gap: 8px;
    position: relative;
    margin-bottom: 32px;
    z-index: 3;
}

.thumb-mobile-item {
    width: 90px;
    height: 90px;
}

.thumb-item,
.thumb-mobile-item {
    background-size: cover;
    background-position: center;

    opacity: .35;
    filter: blur(2px);

    transition:
        opacity .6s ease,
        filter .6s ease,
        transform .6s ease;

    overflow: hidden;
}

.thumb-active {
    opacity: 1;
    filter: blur(0);
}

.thumb-mobile-active {
    opacity: 1;
    filter: blur(0);
}

.hero-thubnails .thumb-active {
    transform: scale(1.05);
}

.thumb-1,
.thumb--1 {
    background-image: url("https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?auto=format&fit=crop&w=1600&q=80");
}

.thumb-2,
.thumb--2 {
    background-image: url("https://images.unsplash.com/photo-1492691527719-9d1e07e534b4?auto=format&fit=crop&w=1600&q=80");
}

.thumb-3,
.thumb--3 {
    background-image: url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=80");
}

.thumb-4,
.thumb--4 {
    background-image: url("https://images.unsplash.com/photo-1524504388940-b1c1722653e1?auto=format&fit=crop&w=1600&q=80");
}


/* About */
.about {
    width: 100%;
    padding-block: 48px;
}

.about-left h2 {
    color: var(--grey-2);
    text-transform: uppercase;
    font-weight: normal;
    font-size: clamp(16px, 1.2vw, 35px);
    margin-bottom: 40px;
}

.about-right article {
    color: var(--white-color);
    font-size: clamp(24px, 2vw, 36px);
    margin-bottom: 24px;
    font-weight: 400;
}

/* Services section */
.home-services {
    padding-block: 48px;
}

.home-services-header {
    margin-bottom: 48px;
}

.home-services .home-services-header h2 {
    margin-bottom: 16px;
    font-size: clamp(32px, 5vw, 50px);
}

.home-services .home-services-header p {
    margin-bottom: 40px;
    width: min(500px, 100%);
    color: var(--grey-2);
    font-size: clamp(14px, 1vw, 18px);
}

/* Home service container */
.home-services-container {
    display: grid;
    transition: color .4s ease-in;
}

.home-services-item {
    padding-block: 32px;
    border-top: 1px solid var(--black-low);
    display: flex;
    align-items: center;
    transition: .4s ease-in;
    position: relative;
    overflow: hidden;
}

.home-services-item:last-child {
    border-bottom: 1px solid var(--black-low);
}

.home-services-item:hover {
    padding-left: 32px;
}

.home-services-item h3 {
    font-size: clamp(18px, 3vw, 50px);
    position: relative;
    z-index: 1;
    transition: .4s ease-in;
}

.home-services-number {
    padding-right: 40px;
    color: var(--grey-3);
    font-family: var(--secondary-font);
}


.home-services-item:hover h3 {
    color: var(--white-color);
}

.home-services-item:hover .home-item-number {
    color: var(--black-color);
}

.service-image {
    position: absolute;
    width: 120px;
    height: 100px;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.8);
    transition:
        opacity .3s ease,
        transform .3s ease;
    z-index: 10;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.home-services-item:hover .service-image {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Home gallery */
.home-gallery {
    width: 100%;
    padding-block: 48px;
}


.gallery-left h2 {
    font-weight: bold;
    font-size: 32px;
    margin-bottom: 8px;
}

.gallery-left p {
    color: var(--grey-2);
    font-size: clamp(14px, 1vw, 18px);
    margin-bottom: 16px;
}


/* Slider for gallery */
.slider {
    position: relative;
    width: 100%;
    min-height: 80vh;
    overflow: hidden;
    user-select: none;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
}

.slide {
    flex-shrink: 0;
    width: 350px;
    height: 500px;
    margin: 0 20px;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    /* CORRIGÉ : translateY au lieu de translate */
    overflow: visible;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.slide-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    flex: 1;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transform: scale(1.3);
    user-select: none;
}


.slider-overlay {
    position: absolute;
    bottom: -1.75rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 10;
    transition: opacity .3s ease;
    opacity: 0;
}

.slider:hover .slider-overlay {
    opacity: calc(1 - var(--slider-moving, 1));
}

.project-title {
    font-weight: 500;
    font-size: .8rem;
}

.project-arrow {
    width: 16px;
    height: 16px;
}

.project-arrow svg {
    stroke: #fff;
    stroke-width: 2;
}

/* Testimobnials */
.testimonials {
    padding-block: 48px;
    min-height: 70vh;
    position: relative;
}

.testimonials h4 {
    font-size: clamp(20px, 1.5vw, 36px);
    margin-bottom: 48px;
    font-weight: 500;
}

.testi-container {
    display: grid;
    gap: 24px;
    min-height: 20vh;
}

.testi-item {
    background-color: var(--black-mid);
    border-radius: 20px;
    padding: 32px 24px;
    min-height: 20vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testi-ico img {
    width: 28px;
    margin-bottom: 64px;
}

.testi-text {
    font-size: clamp(15px, .5vw, 20px);
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--grey-2);
}

.testi-author {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--black-low);
    padding-top: 8px;
}

.testi-author-titles p:last-child {
    font-size: 12px;
    color: var(--grey-3);
    margin-top: 4px;
}

.testi-item .testi-auth-pic {
    width: 52px;
    height: 52px;
    position: relative;
    margin-right: 16px;
}

.testi-item .testi-auth-pic img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    z-index: 0;
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 800px) {
    .hero-thubnails {
        display: none;
    }

    .thumbnails-mobile {
        display: flex;
    }
}

@media (min-width: 1000px) {
    .about {
        min-height: 60vh;
    }

    .gallery-right {
        display: flex;
        justify-content: flex-end;
    }

    .home-services-header {
        display: flex;
        justify-content: space-between;
    }

    .home-services-header p {
        margin-bottom: 0;
    }

}

.cta {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-block: 40px 56px;
    text-align: center;

    background: url("https://images.unsplash.com/photo-1518623489648-a173ef7824f3?auto=format&fit=crop&w=1800&q=80") no-repeat center;
    background-size: cover;

    overflow: hidden;
}

/* Overlay */
.cta-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background-image:
        radial-gradient(rgba(255, 255, 255, 0.12) 1px,
            transparent 1px),
        linear-gradient(to bottom,
            rgba(17, 17, 17, 0.15) 0%,
            rgba(17, 17, 17, 0.85) 100%);

    background-size:
        4px 4px,
        100% 100%;

    background-repeat:
        repeat,
        no-repeat;
}

/* Contenu */
.cta-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.cta-content h5 {
    font-size: clamp(32px, 6vw, 64px);
    margin-bottom: 24px;
    font-weight: 600;
}

.cta-content span {
    font-weight: normal;
}

.cta-content p {
    margin-bottom: 40px;
    width: min(500px, 100%);
    margin-inline: auto;
}

@media (min-width: 790px) {
    .testi-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .service-image {
        display: none;
    }
}