/* index.css */


/* ------------------------------------------------------------- */
.hero {
    padding: 60px 0px;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-robot-image {
    position: absolute;
    right: 20px;
    top: 40px;
    z-index: -1;
    opacity: 0.85;
    transform: translateX(50%) translateY(0);
    user-select: none;
}

.social-proof {
    flex-direction: column;
    margin-top: 30px;
    gap: 20px;
    align-items: center;
    width: var(--social-proof-width);
    min-width: var(--social-proof-width);
    transform: scale(0.85);
}

.hero-space-container {
    width: var(--social-proof-width);
    min-width: var(--social-proof-width);
    transform: scale(0.85);
}

.social-proof .separator {
    width: 70%;
}

.social-proof .item {
    flex-direction: column;
    align-items: center;
    gap: 0px;
    white-space: nowrap;
}

.social-proof-item-infos {
    width:fit-content;
    gap: 10px;
    align-items: center;
}

.social-proof-item-numbers {
    font-size: 28px;
    font-weight: 700;
}

.social-proof-item-description {
    font-size: 16px;
    color: var(--gray-text-color);
}

.hero-content {
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.hero-content {
    margin-left: auto;
    margin-right: auto;

    .actions {
        margin-top: 10px;
        gap: 20px;
        width:fit-content;
    }

    .item {
        color: var(--gray-text-color);
        font-size: 15px;
        font-weight: 500;
        flex-direction: column;
        flex-grow: 1;
        flex-basis: 0;  /* Ignorer la taille du contenu initial */
        align-items: center;
        gap: 8px;
    }

    .item span {
        text-align: center;
    }

    .price {
        color: white;
        font-size: 22px;
        font-weight: 600;
    }
}


.perspective {
    opacity: 0.75;
    position: relative;
    gap: 20px;
    top: 0%;
    left: 50%;
    width: 110vw;
    height: 600px;
    transform-origin: 50% 50%;
    transform: translate(-50%, -35%) perspective(800px) rotateX(60deg) scale(1.1);
    overflow: hidden;
    justify-content: center;
    margin-bottom: -200px;

    background-color: rgba(255, 255, 255, 0);

    .cache1 {
        position: absolute;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 100%);
        left: 0;
        right: 0;
        top: 0;
        height: 350px;
    }

    .cache2 {
        position: absolute;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
        left: 0;
        right: 0;
        bottom: 0;
        height: 250px;
    }

    .col {
        z-index: -2;
        flex-direction: column;
        gap: 20px;
    }
    .item {
        display: flex;
        width: var(--perspective-items-width);
        height: calc(var(--perspective-items-width) / (670 / 376));
        min-height: calc(var(--perspective-items-width) / (670 / 376));
        flex-basis: 0;
        border-radius: var(--perspective-items-radius);
        border: 2px solid var(--primary-color);
        align-items: center;
        justify-content: center;
        
    }

    .item img{
        width: 100%;
        aspect-ratio: 670/376;
        object-fit: contain;
        border-radius: var(--perspective-items-radius);
    }

    .item img.logo{
        height: 80%;
    }

    .item span {
        font-size: 38px;
        font-weight: 700;
        letter-spacing: 1px;
    }
}

.perspective .col {
    position: relative;
    top: 0%;
    animation: crawl 60s linear 0s infinite;
    animation-duration: 40s;
}

@keyframes crawl {
    0% {
        top: 0%;
        opacity: 1;
    }
    5% {
        opacity: 1;
    }
    100% {
        top: -177%;
    }
}

.fade-in {
    animation: fadeInAnimation 1s;
}

@keyframes fadeInAnimation {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in-75 {
    animation: fadeInAnimation75 1s;
}

@keyframes fadeInAnimation75 {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.75;
    }
}

.top-courses {
    flex-direction: column;
    gap: 35px;
    width: 100%;
    margin-bottom: 50px;

    .courses-container {
        width: 100%;
        position: relative;
        gap: 30px;
    }

    a.course {
        display: flex;
        text-decoration: none;
        flex-direction: column;
        background-color: var(--course-card-background);
        border: 1px solid #024287;
        border-radius: 8px;
        flex-grow: 1;
        flex-basis: 0;
        user-select: none;
        cursor: pointer;
        box-sizing: content-box;
        position: relative;
        height: 420px;
        /* transition: border-color .3s cubic-bezier(.165, .84, .44, 1), box-shadow .3s cubic-bezier(.165, .84, .44, 1); */
        

        .infos {
            flex-direction: column;
            padding: 20px 20px;
            gap: 12px;
            z-index: 2;

            span {
                font-size: 16px;
                color: var(--gray-text-color);
            }

            .info-bubble {
                font-size: 14px;
                font-weight: 700;
                color: #77ACFC;
                text-align: center;
                background-color: rgba(20, 110, 245, 0.23);
                border-radius: 12px;
                padding: 4px 12px;
                width: fit-content;
            }
        }
    }

    a.course:hover {
        border: 1px solid var(--yellow-color);
        box-shadow: 0 0 37px 1px rgba(239,255,0,0.45);
    }

    a.course img.vignette {
        border-radius: 8px 8px 0 0;
        aspect-ratio: 670/376;
        width: 100%;
    }
}

.expert::before {
    content: "";
    background-image: url('/images/home-jonathan.jpg');
    background-position: right;
    background-repeat: no-repeat;
    background-size: auto 100%;
    position: absolute;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    z-index: -1;
    opacity: 0.7;
}

.expert {
    position: relative; 
    flex-direction: column;
    gap: 35px;

    h2 {
        margin-top: 60px;
        width:fit-content;
        align-self: center;
    }

    .subtitle {
        align-self: center;
    }

    .video-container {
        margin-top: 25px;
        margin-bottom: 25px;
        width: 100%;
        max-width: 700px;
        height: auto;
        aspect-ratio: 1920/1080;
        justify-content: center;
        position: relative;
        align-self: center;

        video {
            height: auto;
            width: 100%;
            aspect-ratio: 1920/1080;
        }
    }

    .brand-icons {
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        width: fit-content;
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
    }

    .border {
        min-width: 5px;
        background-color: var(--accent-color);
        height: 60px;
    }

    .name-and-infos {
        margin-bottom: 40px;

    }

    .infos {
        padding-left: 15px;
        flex-direction: column;
        height: 60px;

        .name {
            font-size: 35px;
            font-weight: 700;
            line-height: 1.1;
        }

        .details {
            color: var(--gray-text-color);
            font-size: 15px;
            white-space: pre;
        }
    }
}

.become-dev {
    flex-direction: column;
    gap: 0px;
    background-color: white;
    color: black;
    padding-top: 80px;
    padding-left: 0px;
    padding-right: 0px;
    align-items: center;

    .horizontal-padding-container {
        flex-direction: column;
        padding-left: var(--section-horizontal-padding);
        padding-right: var(--section-horizontal-padding);
    }

    h2 {
        width: fit-content;
        align-self: center;
        margin-bottom: 25px;
    }

    .subtitle {
        align-self: center;
        margin-bottom: 50px;
    }

    h3 {
        font-size: 28px;
        font-weight: 700;
    }

    .image-and-content {
        gap: 35px;
        padding: 25px var(--section-horizontal-padding) 40px var(--section-horizontal-padding);
        align-items: center;

        img {
            height: 275px;
        }

        .title-and-content {
            flex-direction: column;
            gap: 20px;
            p {
                font-size: 16px;
            }
        }
    }

    .triangle1 {
            width: 100%;
            height: 50px;
            background-color: var(--gray-section-color);
            clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
    }

    .triangle2 {
            width: 100%;
            height: 50px;
            background-color: var(--gray-section-color);
            clip-path: polygon(0% 0%, 100% 0%, 100% 100%);
    }
}





/* -------------------------------------------------------------------------------- */

/* if screen width is higher than 1300px */
@media only screen and (min-width: 1200px) {
    .hero-robot-image {
        right: calc(20px + (50% - 600px));
    }

    h1 {
        font-size: 83px;
    }
}


@media only screen and (max-width: 1080px) {
    .brand-icons {
        display: none;
    }
}

@media only screen and (max-width: 970px) {
    .hero-robot-image {
        right: calc(21.62vw - 181.006px);
    }

    .social-proof, .hero-space-container {
        display: none;
    }

    .top-courses .courses-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .top-courses a.course {
        max-width: 410px;
        width: 410px;
        flex-basis: auto;
        height: 450px;
    }
}

/* --- MOBILE --- */
.swap-order-mobile-1 {
    order: 1;
}

.swap-order-mobile-2 {
    order: 2;
}

@media only screen and (max-width: 650px) {
    .swap-order-mobile-2 {
        order: -1;
    }

    .hero {
        padding: 30px 0px;
    }

    section {
        padding-left: 20px;
        padding-right: 20px;
    }

    h1 {
        font-size: 55px;
    }

    .hero-content .actions {
        flex-direction: column;
        gap: 40px;
    }

    .perspective {
        height: 550px;
        transform: translate(-50%, -40%) perspective(800px) rotateX(60deg) scale(1.1);
    }

    .hero-robot-image {
        opacity: 0.6;
    }

    .subtitle {
        font-size: 20px;
    }

    .top-courses a.course {
        max-width: 350px;
        height: 420px;
    }
    
    .image-and-content {
        flex-direction: column;
    }

    .become-dev div.image-and-content img {
        height: 200px;
    }

    .expert::before {
        opacity: 0.3;
    }
}
