/**** Reset ****/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/**** Style général de la page ****/

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f2f4f6;
    font-family: sans-serif;
}

header,
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 20px;
}

header h1 {
    text-align: center;
    text-transform: uppercase;
    font-size: 30px;
    font-weight: 700;
    color: #00214d;
}

.main__content {
    flex-grow: 1;
}

.container {
    position: relative;
    margin: 20px auto;
    max-width: 850px;
    width: 100%;
    padding: 5px 20px;
}

.container::before,
.container::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    background-color: #1b2d45;
    color: #ffffff;
    z-index: 5;
}

.container::before {
    content: "Début";
    text-transform: uppercase;
    top: 0;
}

.container::after {
    content: "Fin";
    text-transform: uppercase;
    bottom: 0;
}

.timeline__blocks {
    margin: 65px 0;
}

.timeline__blocks::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 100%;
    border-left: 2px solid #484848;
}

.timeline__block {
    position: relative;
    width: calc(50% - 20px);
    margin: 20px 0;
    border-radius: 15px;
    box-shadow: 0 5px 8px 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: appear 3s ease-in-out forwards;
}

/**** animation appear ****/

@keyframes appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.timeline__block:nth-child(1) {
    animation-delay: 0.5s;
}

.timeline__block:nth-child(2) {
    animation-delay: 1s;
}

.timeline__block:nth-child(3) {
    animation-delay: 1.5s;
}

.timeline__block:nth-child(4) {
    animation-delay: 2s;
}

.timeline__block:nth-child(5) {
    animation-delay: 2.5s;
}

.timeline__block:nth-child(6) {
    animation-delay: 3s;
}

.timeline__block:nth-child(7) {
    animation-delay: 3.5s;
}


.timeline__block:nth-child(even) {
    left: calc(50% + 20px);
}

.timeline__block::before {
    content: "";
    position: absolute;
    top: 0;
    right: -29px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #111111;
}

.timeline__block:nth-child(even)::before {
    left: -31px;
}

.article__header {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 10px;
    background-color: #111111;
}

.article__header h2 {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 2px;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.4;
}

.article__header h3 {
    position: absolute;
    background-color: #fffffe;
    color: #00214d;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    font-style: italic;
    border: 1px solid #eeeeee;
    padding: 2px 10px;
    border-radius: 10px;
}

.timeline__block:nth-child(odd) .article__header h3 {
    right: -125px;
    top: 0;
}

.timeline__block:nth-child(even) .article__header h3 {
    left: -125px;
    top: 0;
}

.article__body {
    padding: 10px;
    font-size: 17px;
    color: #1b2d45;
    line-height: 1.4;
}

.timeline__block:nth-child(1) .article__header,
.timeline__block:nth-child(1)::before {
    background-color: #2b34b8;
}

.timeline__block:nth-child(1) .article__header h3 {
    color: #2b34b8;
}


.timeline__block:nth-child(2) .article__header,
.timeline__block:nth-child(2)::before {
    background-color: #d83232;
}

.timeline__block:nth-child(2) .article__header h3 {
    color: #d83232;
}

.timeline__block:nth-child(3) .article__header,
.timeline__block:nth-child(3)::before {
    background-color: #111111;
}

.timeline__block:nth-child(3) .article__header h3 {
    color: #111111;
}

.timeline__block:nth-child(4) .article__header,
.timeline__block:nth-child(4)::before {
    background-color: #2bb891;
}

.timeline__block:nth-child(4) .article__header h3 {
    color: #2bb891;
}

.timeline__block:nth-child(5) .article__header,
.timeline__block:nth-child(5)::before {
    background-color: #e4e70d;
}

.timeline__block:nth-child(5) .article__header h3 {
    color: #e4e70d;
}

.timeline__block:nth-child(6) .article__header,
.timeline__block:nth-child(6)::before {
    background-color: #328cdd;
}

.timeline__block:nth-child(6) .article__header h3 {
    color: #328cdd;
}

.timeline__block:nth-child(7) .article__header,
.timeline__block:nth-child(7)::before {
    background-color: #6d071a;
}

.timeline__block:nth-child(7) .article__header h3 {
    color: #6d071a;
}

footer span {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #00214d;
}

/**** Responsive design ****/

@media screen and (max-width: 678px) {

    .container::before,
    .container::after {
        left: 20px;
        transform: translateX(-2px);
    }

    .timeline__blocks {
        padding-left: 20px;
    }

    .timeline__blocks::before {
        left: 20px;
    }

    .timeline__block {
        width: 100%;
    }

    .timeline__block::before {
        left: -31px;
    }

    .timeline__block:nth-child(even) {
        left: 0;
    }

    .article__header h3 {
        position: static;
        background-color: transparent;
        border: none;
        color: #ffffff !important;
        margin-top: 8px;
        padding: 0;
        text-align: center;
        font-size: 16px;
    }

}