body {
    position: relative;
    display: block;
}

/* __________________________________________premiere partie de la page home_________________________________________*/

.main {
    background-image: url("/images/fondcasque.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 2rem;
    box-shadow: 0 10px 40px rgba(14, 0, 0, .8);
    padding: 2em;
    margin: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.main h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.main p {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 2rem;
    max-width: 40rem;
}

.button {
    display: block;
    background-color: #333;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.button:hover {
    background-color: #444;
}

@keyframes fleche {

    0%,
    100% {
        transform: translateY(5px);
    }

    25% {
        transform: translateY(-10px);
    }

    50% {
        transform: translateY(5px);
    }

    75% {
        transform: translateY(-10px);
    }
}

.image1 {
    height: 40px;
    width: auto;
    animation: fleche 2.5s infinite;
    padding: 5px;
}

/*_________________________________________________________Boutton_______________________________________________________ */
button {
    position: relative;
    font-size: 18px;
    border-radius: 20px;
    width: 12em;
    height: 3em;
    z-index: 1;
    color: white;
    cursor: pointer;
    overflow: hidden;
    border: none;
}

button .text {
    color: black;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    line-height: 3em;
    background: linear-gradient(rgba(255, 255, 255, 0.473),
            rgba(150, 150, 150, 0.25));

}

button .blob {
    position: absolute;
    z-index: -1;
    border-radius: 5em;
    width: 12em;
    height: 3em;
    transition: transform 0.3s ease-in-out, background 0.3s ease-in-out;
}

button .blob:nth-child(2) {
    left: 0;
    top: 0;
    background: white;
}

button .blob:nth-child(3) {
    left: 1.8em;
    top: 0;
    z-index: -1;
    background: white;
}

button .blob:nth-child(4) {
    left: 4em;
    top: -1em;
    background: white;
}

button .blob:nth-child(5) {
    left: 4.3em;
    top: 1.6em;
    background: white;
}

button:hover .blob:nth-child(2) {
    background: #0061ff;
}

button:hover .blob:nth-child(3) {
    background: #ff1b6b;
}

button:hover .blob:nth-child(4) {
    background: #bf0fff;
}

button:hover .blob:nth-child(5) {
    background: #ff930f;
}

button:hover .blob {
    transform: scale(1.3);
}

button:active {
    border: 2px solid white;
}

/* _______________________________________presentation_______________________________________________*/
.article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    /* Add gap */
}

@media (max-width: 768px) {
    .article {
        grid-template-columns: 1fr;
        /* Stack columns */
    }

    .main {
        margin: 0.5rem;
        padding: 1rem;
    }

    .main h1 {
        font-size: 1.8rem;
        /* Smaller font */
    }
}

.content h2 {
    font-size: 2rem;
}

.box {
    position: relative;
    height: 300px;
    background: #8D4848;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 20px 50px black;
    border: 2px solid black;
    border-radius: 2rem;
    color: white;
}

#boxlogin {
    background: darkslategrey;
    box-shadow: 0 20px 50px darkslategrey;

}

.box:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.5s;
    pointer-events: none;
}

.box:hover:before {
    left: -50%;
    transform: skewX(-5deg);
}


.box .content {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid white;
    border-radius: 2rem;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 10px rgba(9, 0, 0, 0.5);

}

.box span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    box-sizing: border-box;

}

.box span:nth-child(1) {
    transform: rotate(0deg);
}


.box span:nth-child(2) {
    transform: rotate(180deg);
}


.box span:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: whitesmoke;
    animation: animate 4s linear infinite;
}

@keyframes animate {
    0% {
        transform: scaleX(0);
        transform-origin: left;
    }

    50% {
        transform: scaleX(1);
    }
}


/* _______________________________________________________HOME FIN__________________________________________________*/


@keyframes afficheprems {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes slidein {
    0% {
        margin-left: -800px;
    }

    20% {
        margin-left: -800px;
    }

    35% {
        margin-left: 0;
    }

    100% {
        margin-left: 0;
    }
}

@keyframes reveler {
    0% {
        opacity: 0;
        width: 0;
    }

    20% {
        opacity: 1;
        width: 0;
    }

    30% {
        width: 355px;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        width: 355px;
    }
}

.homefin {
    text-align: center;
    background: linear-gradient(141deg, #ccc 25%, #eee 40%, #ddd 55%);
    backdrop-filter: blur(5px);
    color: #555;
    font-weight: 300;
    font-size: 32px;
    margin: 1.5rem;
    padding: 30vh;
    border-radius: 2rem;
    box-shadow: 0 10px 40px rgba(159, 162, 177, .8);
    height: 50vh;
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
}

@media (max-width: 768px) {
    .homefin {
        padding: 5rem 1rem;
        /* Reduce padding significantly */
        height: auto;
        /* Allow auto height */
        font-size: 1.5rem;
        /* Smaller font */
        margin: 1rem;
    }

    .homefin p {
        margin-top: 2rem;
        /* Reduce top margin */
        font-size: 1rem;
    }
}

.accueilfin {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;

}

.accueilfin:first-of-type {
    animation: afficheprems 7s infinite;
}

.accueilfin:last-of-type {
    width: 0;
    animation: reveler 7s infinite;
}

.accueilfin:last-of-type span {
    margin-left: -355px;
    animation: slidein 7s infinite;
}

.homefin p {
    font-size: 12px;
    color: #999;
    margin-top: 200px;
}

.endhome {
    position: relative;
    width: 100%;
}