.avdefile {
    margin: 15vh auto 0 auto;
    width: 70%;
    position: relative;
    max-width: 1000px;
    overflow: hidden;
    min-height: auto;
    align-items: center;
}

.avdefile img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
}

.avdefile:hover .btnDroit {
    display: block;
    animation: slideLeft 1s;
}

.avdefile:not(:hover) .btnDroit {
    animation: slideRetourBtnRight 1s;
    transition-delay: 1s;
    transition-property: opacity;
    opacity: 0;
}

.avdefile:hover .btnGauche {
    display: block;
    animation: slideRight 1s;
}

.avdefile:not(:hover) .btnGauche {
    animation: slideRetourBtnLeft 1s;
    transition-delay: 1s;
    transition-property: opacity;
    opacity: 0;
}

@keyframes slideRight {
    from {
        transform: translateX(-100px);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(100px);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideRetourBtnLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-100px);
        opacity: 0;
    }
}

@keyframes slideRetourBtnRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100px);
        opacity: 0;
    }
}

.btnDroit,
.btnGauche {
    cursor: pointer;
    position: absolute;
    top: 35.5%;
    border: none;
    color: black;
    transition: all 0.5s;
    width: 30px;
    height: 30px;
    font-size: 1.8em;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    background-color: rgba(182, 182, 182, 0.2);
    border-radius: 50%;
}

#btn-icon {
    position: relative;
}


.btnDroit:hover #btn-icon {
    animation: enfuirDroite 0.6s;
    animation-iteration-count: 2;
}

@keyframes enfuirDroite {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(5px)
    }

    50% {
        transform: translateX(0);
    }

    75% {
        transform: translateX(5px);
    }

    100% {
        transform: translateX(0)
    }
}

.btnGauche:hover #btn-icon {
    animation: enfuirGauche 0.6s;
    animation-iteration-count: 2;
}

@keyframes enfuirGauche {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px)
    }

    50% {
        transform: translateX(0);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0)
    }
}

.btnDroit {
    right: 0;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    margin: 60px 2px 0 2px;
    display: inline-block;
    background-color: #b0adad;
    transition: all .3s;
    position: relative;
    bottom: 20px;
}

.actif,
.dot:hover {
    background: #717171;
}

.avdefile:hover .cta {
    opacity: 1;
    animation: slideDown 1s;
}

.avdefile:not(:hover) .cta {
    animation: slideUp 1s;
    transition-delay: 1s;
    transition-property: opacity;
    opacity: 0;
}

@keyframes slideDown {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100px);
        opacity: 0;
    }
}


.wrapper {
    display: flex;
    justify-content: center;
}

.cta {
    display: flex;
    padding: 1.5%;
    position: absolute;
    bottom: 40px;
    margin-bottom: 20px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 20px;
    color: white;
    background: orangered;
    transition: 1s;
    opacity: 0;
    box-shadow: 6px 6px 0 black;
}

.cta:focus {
    outline: none;
}

.cta:hover {
    transition: 0.5s;
    box-shadow: 10px 10px 0 #FBC638;
}

.cta #esp {
    transition: 0.5s;
    margin-right: 0px;
}

.cta:hover #flecheSpe {
    transition: 0.5s;
    margin-right: 5px;
}

#flecheSpe {
    width: 20px;
    margin-left: 10px;
    position: relative;
    top: 0.5%;
}

path.one {
    transition: 0.4s;
    transform: translateX(-60%);
}

path.two {
    transition: 0.5s;
    transform: translateX(-30%);
}

.cta:hover path.three {
    animation: color_anim 1s infinite 0.2s;
}

.cta:hover path.one {
    transform: translateX(0%);
    animation: color_anim 1s infinite 0.6s;
}

.cta:hover path.two {
    transform: translateX(0%);
    animation: color_anim 1s infinite 0.4s;
}

/* SVG animations */

@keyframes color_anim {
    0% {
        fill: white;
    }

    50% {
        fill: #FBC638;
    }

    100% {
        fill: white;
    }
}

@media (max-width: 850px) {
    .avdefile {
        width: 100%;
    }

    .vid {
        width: 100%;
    }
}

@media (max-width: 768px) {

    .btnDroit,
    .btnGauche {
        top: 30%;
    }

    .btnGauche {
        display: block;
        opacity: 1;
    }

    .avdefile:hover .btnDroit {
        animation: none;
    }

    .avdefile:hover .btnGauche {
        animation: none;
        opacity: 1;
        display: block;
    }

    .avdefile:not(:hover) .btnDroit {
        animation: none;
        opacity: 1;
    }

    .avdefile:not(:hover) .btnGauche {
        animation: none;
        opacity: 1;
    }

    .avdefile:hover .cta {
        animation: none;
    }

    .avdefile:not(:hover) .cta {
        animation: none;
        opacity: 1;
    }

    .cta {
        display: flex;
    }

}

@media (max-width: 700px) {
    .dot {
        height: 12.5px;
        width: 12.5px;
    }

}

@media (max-width: 500px) {
    .wrapper {
        margin-bottom: 20px;
    }
}

@media (max-width: 500px) {

    .btnDroit,
    .btnGauche {
        top: 20%;
    }
}

#imgGrand{
    display: none;
}

@media (max-width: 400px) {
    .btnDroit,
    .btnGauche {
        top: 35%;
    }

    #imgPetit{
        display: none;
    }

    #imgGrand{
        display: block;
    }
}