main {
    display: flex;
    flex-direction: row;
    font-family: var(--fa);
    #filtres {
        outline: 1px solid grey;
        width: 300px;
        background: var(--lc);
        color: var(--dc);
        padding: 0 10px 5px 10px;
        height:fit-content;
        .title-filtres {
            text-align: center;
            text-transform: uppercase;
            font-weight: bold;
            font-size: 20px;
        }
        form {
            .input-group {
                position: relative;
                margin-bottom: 20px;
                width: 100%;
                select{
                    width: 100%;
                    padding: 10px 15px;
                    font-size: 16px;
                    border: none;
                    outline: 1px solid var(--dc);
                    background: transparent;
                    color: var(--dc);
                }
                select:focus {
                    outline: 2px solid var(--dc);
                }
                label {
                    position: absolute;
                    top: 7.5px;
                    left: 5px;
                    color: var(--dc);
                    background: var(--lc);
                    padding: 0 4px;
                    transition: 0.2s ease;
                    pointer-events: none;
                }
                select:focus + label,
                select:not([value=""]) + label {
                    top: -10px;
                    left: 10px;
                    font-size: 12px;
                    color: var(--dc);
                }
            }
            .choice-list {
                margin-bottom: 10px;
                display: flex;
                flex-direction: column;
                gap: 5px;
                width: 100%;
                .label-legends {
                    font-weight: bold;
                }
                .choice-group {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    gap: 7.5px;
                    padding-left: 7.5px;
                    input[type=checkbox] {
                        -webkit-appearance: none;
                        -moz-appearance: none;
                        -ms-appearance: none;
                        appearance: none;
                        border-radius: 30%;
                        height: 14px;
                        width: 14px;
                        background: #fff;
                        border: 1px solid var(--dc);
                        cursor: pointer;
                        transition: all 0.3s;
                        &:hover {
                            border-radius: 45%;
                        }
                        &:checked {
                            border-radius: 50%;
                            background: var(--dc);
                            border: 1px solid var(--dc);
                        }
                    }
                    label {
                        cursor: pointer;
                        transition: 0.2s;
                        text-transform: capitalize;
                        &:hover {
                            color: #000;
                            transform: translateX(2.5px);
                        }
                    }
                }
            }
            .container-buttons {
                display: flex;
                flex-direction: column;
                gap: 10px;
                align-items: center;
                justify-content: center;
                width: 100%;
                margin: 0 auto;
                button, input {
                    all:unset;
                    border: none;
                    width: 100%;
                    text-align: center;
                    cursor: pointer;
                    height: 35px;
                    transition: all ease 0.3s;
                    text-transform: uppercase;
                    &[type="submit"] {
                        background: var(--vc);
                        outline: 1.5px solid var(--vc);
                        color: var(--lc);
                        &:hover {
                            background: var(--lc);
                            outline: 1.5px solid var(--vc);
                            color: var(--vc);
                        }
                    }
                    &[type="reset"] {
                        background: var(--dc);
                        outline: 1.5px solid var(--dc);
                        color: var(--lc);
                        &:hover {
                           background: var(--lc);
                            outline: 1.5px solid var(--dc);
                            color: var(--dc); 
                        }
                    }
                }
            }
        }
    }
    #content {
        width: 100%;
        padding: 0 20px 0 20px;
        h1 {
            text-transform: uppercase;
            text-align: center;
            font-size: 30px;
            color: var(--mc);
        }
        #recherche {
            .input-group {
                position: relative;
                margin-bottom: 20px;
                width: 100%;
                input {
                    width: 100%;
                    padding: 10px 15px;
                    font-size: 16px;
                    border: none;
                    outline: 1px solid var(--mc);
                    background: transparent;
                    color: var(--mc);
                }
                input:focus {
                    border-bottom: 1.5px solid var(--mc);
                    transition: 0.1s;
                }
                label {
                    position: absolute;
                    top: 7.5px;
                    left: 7.5px;
                    color: var(--mc);
                    background: white;
                    padding: 0 4px;
                    transition: 0.2s ease;
                    pointer-events: none;
                }
                input:focus + label,
                input:not(:placeholder-shown) + label {
                    top: -10px;
                    left: 10px;
                    font-size: 12px;
                    color: var(--mc);
                }
                .search-btn {
                    position: absolute;
                    right: 10px;
                    top: 50%;
                    transform: translateY(-50%);
                    border: none;
                    background: transparent;
                    padding: 0;
                    cursor: pointer;
                    transition: 0.2s;
                    img {
                        width: 20px;
                        height: 20px;
                    }
                    &:hover img {
                        width: 22px;
                        height: 22px;
                    }
                }
            }
            .result-message {
                width: 40%;
                height: 40px;
                display: flex;
                align-items: center;
                padding: 5px 7.5px;
                justify-content: center;
                margin: -5px auto 10px auto;
                &.success {
                    color: var(--vc);
                    background: rgba(0, 100, 0, 0.1);
                }
                &.error {
                    color: var(--rc);
                    background: rgba(255, 0, 0, 0.075);
                }
            }
        }
        #events {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            flex: 1;
            gap: 40px;
            align-items: stretch;
            article { 
                flex: 1 1 350px; /* permet de grandir et d’avoir une base de 400px */
                min-height: 350px; 
                display: flex;
                flex-direction: column;
                width: 400px;
                height: auto; 
                box-shadow: 2px 2px 8px 2px rgba(0,0,0,0.08);
                border-radius: 10px;
                cursor: pointer;
                transition: 0.2s;
                position: relative;
                &.passed {
                    opacity: 0.4;
                    box-shadow: 2px 2px 8px 2px rgba(0,0,0,0.15);
                    .picture {
                        .bandeau-termine {
                            position: absolute;
                            top: 50%;
                            left: 50%;
                            transform: translate(-50%, -50%) rotate(-35deg);
                            width: 100%;
                            text-transform: uppercase;
                            font-family: var(--fm);
                            background-color: var(--mc);
                            color: var(--lc);
                            font-weight: bold;
                            font-size: 50px;
                            text-align: center;
                            padding: 10px;
                            white-space: nowrap;
                        }
                    }
                    .details {
                        .date, .name {
                            color: rgb(150, 150, 150);
                        }
                        .flex-row .type, .flex-row .location {
                            color: rgb(150, 150, 150);
                        }
                    }
                    &:hover {
                        box-shadow: 2px 2px 8px 2px rgba(0,0,0,0.15);
                    }
                }
                .picture {
                    height: 300px;
                    background: rgba(0, 0, 0, 3%);
                    display: flex;
                    justify-content: center;
                    position: relative;
                    img {
                        height: 100%;
                        width: auto;
                    }
                    .countdown-tag {
                        color: var(--lc);
                        background: var(--mc);
                        padding: 5px 7.5px;
                        position: absolute;
                        top: 5px;
                        right: 10px;
                        border-radius: 10px;
                    }
                }
                .details {
                    display: flex;
                    flex-direction: column;
                    padding: 2px 7.5px 5px 7.5px;
                    flex-grow: 1;
                    .date {
                        display: flex;
                        align-items: center;
                        color: var(--mc);
                        gap: 7.5px;
                        justify-content: center;
                        img {
                            height: 20px;
                            width: auto;
                        }
                    }
                    .name {
                        display: flex;
                        align-items: center;
                        gap: 7.5px;
                        color: var(--mc);
                        font-family: var(--ft);
                        font-size: 20px;
                        text-transform: uppercase;
                        margin-bottom: 15px;
                        img {
                            height: 30px;
                            width: auto;
                        }
                    }
                    .flex-row {
                        display: flex;
                        align-items: flex-end;
                        margin-top: auto;
                        justify-content: space-between;
                        font-family: var(--fm);
                        .type, .location {
                            display: flex;
                            align-items: center;
                            gap: 7.5px;
                            color: var(--mc);
                            font-size: 18px;
                            img {
                                height: 20px;
                                width: auto;
                            }
                        }
                    }
                }
                &:hover {
                    box-shadow: 2px 2px 8px 2px rgba(0,0,0,0.15);
                    .name {
                        text-decoration: underline;
                    }
                }
            }
        }
        #pagination {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 10px;
            a {
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 7.5px 0;
                width: 35px;
                color: var(--mc);
                outline: 1px solid var(--mc);
                text-decoration: none;
                transition: 0.2s;
                &:hover {
                    background-color: var(--mc);
                    color: var(--lc);
                    border-radius: 5px;
                    transform: scale(1.1);
                }
                &.active {
                    background-color: var(--mc);
                    color: var(--lc);
                }
            }
        }
    }
}

@media (max-width: 768px) {
    main {
        flex-direction: column-reverse;
        #filtres {
            margin-top: 10px;
            outline: none;
            width: 100%;
        }
        #content {
            padding: 0 10px;
            #link-filtre {
                display: block;
                margin: 0 auto;
                padding: 7.5px 0;
                width: 90%;
                background: var(--mc);
                color: var(--lc);
                text-align: center;
                text-transform: uppercase;
                font-size: 17px;
                text-decoration: none;
            }
            h1 {
                font-size: 25px;
            }
            #recherche {
                .result-message {
                    width: 70%;
                    font-size: 15px;
                }
            }
            #events {
                article { 
                    flex: 1 1 90%;
                    width: 90%;
                    .picture img {
                         max-width: 100%;
                    }
                }
            }
        }
    }
}