* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Quicksand', sans-serif;
}

h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.baseContainer {
    width: 100%;
    max-width: 1050px;
}

.heroEvenements {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.heroEvenements h1 {
    width: fit-content;
}

.formFiltres {
    display: grid;
    grid-template-columns: repeat(6, 1fr);;
    grid-template-areas:
        "champRecherche champRecherche champRecherche champRecherche toggle toggle"
        "ville ville ville type type type"
        "submit submit submit submit reset reset";
        /* "champRecherche champRecherche toggle"
        "ville type submit"; */
    gap: 16px;
    align-items: start;
}

.formFiltres .champRecherche { grid-area: champRecherche; }
.formFiltres .btnToggle { grid-area: toggle; }
.formFiltres .ville { grid-area: ville; }
.formFiltres .type { grid-area: type; }
.formFiltres #boutonRecherche { grid-area: submit; }
.formFiltres #boutonReset { grid-area: reset; }



.formFiltres > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.formFiltres label:not(.btnToggle) {
    font-weight: 700;
}

.formFiltres input, .formFiltres select, .formFiltres button {
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font: inherit;
}



.formFiltres #boutonRecherche {
    cursor: pointer;
    font-weight: 700;
    /* margin-top: 26px; */
}

.titreSection {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.titreSection p {
    margin: 6px 0 0;
}

.grilleEvenements {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 16px;
}


#recherche, .formFiltres select, .formFiltres button, .autocomplete input {
    background-color: transparent;
    color: #fff;
}
#recherche::placeholder, .autocomplete input::placeholder {
    color: #fff;
}
#recherche:focus, .autocomplete input:focus {
    outline: none;
}
.formFiltres select option {
    background-color: #000;
    color: #fff;
}


.autocomplete {
    position: relative;
    width: 100%;
}
.suggestions {
    display: none;
    position: relative;
    top: 100%;
    left: 0;
    width: 100%;
    
    margin: 4px 0 0;
    padding: 0;
    list-style: none;

    background: transparent;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #000;

    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
}
.suggestions li {
    padding: 10px 12px;
    cursor: pointer;
    color: #fff;
}
.suggestions li:hover {
    /* background: #000000A8; */
    /* background: #ffa600A8; */
    background: #ffa60079;
}

.btnToggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: .2s;
    user-select: none;
    font-weight: 100;
    margin-top: 26px;
    min-height: 46px;
}

.btnToggle input {
    display: none;
}

/* Toggle */
.toggle {
    width: 38px;
    height: 20px;
    background: #bbb;
    border-radius: 20px;
    position: relative;
    transition: .2s;
}

.toggle::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: .2s;
}

/* Actif */
.btnToggle input:checked ~ .toggle {
    background: #FFA600;
}

.btnToggle input:checked ~ .toggle::after {
    transform: translateX(18px);
}

.btnToggle:has(input:checked) {
    border-color: #FFA600;
}


.carteEvenement {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 320px;
    max-width: calc((100% - 32px) / 3);
    min-width: 280px;
    min-height: 190px;
    padding: 16px;
    box-sizing: border-box;

    border: 1px solid #e1e1e1;
    border-radius: 14px;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;

    /* TODO: Ajouter background et mask */
    /* background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/evenenement.jpeg');
    background-size: cover;
    background-position: center;
    mask-image: linear-gradient(to right, black 20%, transparent 50%); */
}
.carteEvenement::before {
    content: "";
    position: absolute;
    inset: 0;

    /* background: url("../img/evenenement.jpeg") center/cover no-repeat;
    mask-image: linear-gradient(to left, black 0%, transparent 30%);
    -webkit-mask-image: linear-gradient(to left, black 20%, transparent 45%); */
}


.carteEvenement:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.carteEvenementLien {
    display: flex;
    flex-direction: column;
    height: 100%;

    color: inherit;
    text-decoration: none;
}

.carteEvenement:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.carteEvenement-lien:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.carteEvenement h3 {
    margin: 0 0 8px;
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.35;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.carteEvenement dl {
    margin-top: auto;
}

.carteEvenement dl > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.carteEvenement dt {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 700;
}

.carteEvenement dd {
    margin: 0;
    overflow-wrap: anywhere;
    text-align: start;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0 0;
}
.paginationTop {
    margin: 0 0 10px 0;
}

.pagination a {
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.precedent, .suivant, .pageInfo {
    width: 110px;
    /* background: rgba(0, 0, 0, 0.14); */
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    transition: 0.2s ease;
    cursor: pointer;
    font-size: 14px;
}

.aucunResultat {
    padding: 16px;
    text-align: center;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
}
.aucunResultat h3 {
    font-size: 17px;
}
.aucunResultat p {
    font-size: 15px;
}

.liensSeo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.liensSeo a {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.liensSeo a:hover {
    transform: translateY(-3px);
}

.texteSeo div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    line-height: 1.5;
}
.texteSeo div strong {
    color: #FFA600;
}

/* @media (max-width: 940px) {
    .carteEvenement {
        max-width: calc((100% - 16px) / 2);
    }
} */

.bannerMessage {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 8px;
    padding: 12px 16px;
    background-color: transparent;
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    /* border: 1px solid #FFA600; */
    border: 1px solid #e1e1e1;
}

@media (max-width: 940px) {
    .carteEvenement {
        max-width: 100%;
        min-width: 0;
    }
}

@media (max-width: 900px) {

    .formFiltres {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "champRecherche toggle"
            "ville type"
            "submit reset";
    }

    .formFiltres button {
        margin: 0;
    }

    .grilleEvenements {
        grid-template-columns: repeat(2, 1fr);
    }

    .liens-seo {
        grid-template-columns: repeat(2, 1fr);
    }
}



@media (max-width: 600px) {

    h2 {
        text-align: center;
        font-size: 16px;
    }

    .container {
        padding: 8px;
    }

    .formFiltres {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "toggle"
            "champRecherche"
            "ville"
            "type"
            "submit"
            "reset";
    }

    #boutonReset {
        margin-top: 16px;
    }

    .btnToggle {
        margin: 8px 0 0 0;
    }

    .grilleEvenements {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .liensSeo {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .liensSeo a {
        padding: 10px;
        font-size: 15px;
    }
    

    .pagination {
        gap: 12px;
        font-size: 0.9rem;
    }

    .texteSeo {
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .pagination .suivant, .pagination .precedent {
        flex: 1;
    }
    .pagination .suivant span, .pagination .precedent span {
        display: none;
    }
}