h2{
    font-size: clamp(1.9rem, 1.6871rem + 0.8013vw, 2.2rem);
    text-transform: uppercase;
    position: relative;
    margin-inline: auto;
    width: fit-content;
}
h2:after{
    content: '';
    display: block;
    height: 3px;
    width: 60%;
    background-color: var(--red);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/*MAIN*/
.banner{
    margin-top: 3rem;
    font-size: 1.8rem;
    line-height: 4rem;
}

.kpi-items{
    display: grid;
    justify-content: space-between;
    margin-inline: auto;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    justify-items: stretch;
}

.kpi-item img{
    height: 8rem;
}
.kpi-item img:first-child{
    height: 6rem;
}

.kpi-item{
    background-color: var(--lightgrey);
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    border-radius: 1rem;
    transition: all .2s ease-in-out;
    font-weight: bold;
}

.kpi-item p{
    font-size: clamp(1.4rem, 1.2581rem + 0.5342vw, 1.6rem);
}

.kpi-item:hover{
    background-color: var(--darkgrey);
}

.tools-container{
    gap: 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: stretch;
}

.tool{
    box-shadow: var(--shadow);
    margin-inline: auto;
    height: 100%;
    width: 100%;
    border-radius: 1.5rem;
    overflow: hidden;
}

.tool img{
    height: 20rem;
    object-fit: cover;
    width: 100%;
}

.tool-box{
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.tool-title{
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.tool-barometre, .tool-carte{
    height: 50rem;
    width: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: var(--shadow);
    border-radius: 3rem;
    position: relative;
}

.tool-barometre{
    background-image: url(/src/img/barometre.png);
}

.tool-carte{
    background-image: url(/src/img/carte.png);
}

.tool-article{
    background-color: rgba(255, 255, 255, 0.8);
    position: absolute;
    bottom: 0;
    border-radius: 0 0 3rem 3rem;
    padding: 2.5rem;
}

.tool-content{
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    flex-direction: column;
}

.card{
    grid-template-columns: 40% 1fr;
    grid-template-rows: auto;
}

.event-card{
    display: flex;
    border-radius: 3rem;
    box-shadow: var(--shadow);
    margin-inline: auto;
    width: 100%;
}
.event-card img{
    border-radius: 3rem 0 0 3rem;
    width: 30%;
    object-fit: cover;
}

.event-content{
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    flex-direction: column;
    width: 70%;
}

.event-content p{
    margin-bottom: 1rem;
}

.event-title{
    font-weight: bold;
}

.event-date{
    font-style: italic;
}

.next-events{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.all-events{
    display: flex;
    margin-block: 3rem;
    margin-inline: auto;
}

@media screen and (min-width:1000px){
    .event-card{
        max-height: 50vh;
    }
}

@media screen and (max-width:768px){
    .kpi-items{
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    .tools-container{
        grid-template-columns: 1fr;
    }
    .tool {
        width: 80vw;
        margin-bottom: 3rem;
    }
    .event-card{
        width: 100%;
    }
    .next-events{
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width:450px){
    .event-card{
        flex-direction: column;
    }
    .event-card img{
        border-radius: 3rem 3rem 0 0;
        width: 100%;
    }
    .kpi-items{
        grid-template-columns: 1fr;
    }
    .event-content{
        width: 100%;
    }

}




/* CARD EVENT */

h3{
    margin: 0;
    padding: 1rem;
}

.events-container, .search-delete-container, .horaire, .lieu, .date{
    display: flex;
}

.card{
    display: grid;
    grid-template-columns: 30% 1fr;
    background-color: var(--lightgrey);
    border-radius: 1rem;
    box-shadow: 4px 4px 4px rgba(0,0,0, 0.2);
    text-decoration: none;
    color: black;
    transition: all .2s ease-in-out;
    overflow: hidden;
}

.card a{
    text-decoration: none;
    font-weight: bold;
    color: black;
    padding-top: 1rem;
    max-width: 50%;
}

.card:hover{
    box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5);
    scale: 1.01;
}

.card-container{
    display: grid;
    grid-template-rows: auto 1fr;
}

.content{
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem;
    width: 100%;
    flex-direction: column;
}

.affiche-container img:not(.no-image){
    height: 100%;
    width: 100%;
    object-fit: contain;
    background-color: var(--darkgrey);
}

.horaire, .lieu, .date{
    gap: 1rem;
}

.horaire img, .lieu img, .date img{
    height: 2rem;
    fill: var(--red);
}

.content p:not(.content p:first-child){
    font-size: 1.4rem;
}

.event-type{
    background-color: black;
    color: white;
    border-radius: 0 0 0 1rem;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 600;
    padding: 1rem 2rem;
}

.title-container{
    position: relative;
    grid-area: 1/1/1/3;
    display: grid;
    grid-template-columns: 1fr 25%;
    gap: 1rem;
    align-items: start;
}

.icons{
    /* justify-content: space-between;
    gap: 1rem; */
    justify-content: space-between;
    gap: 1rem;
    display: flex;
    align-items: flex-start;
}
.icons div{
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.icon{
    border-radius: 50%;
    aspect-ratio: 1/1;
    height: 3rem;
    width: 3rem;
    border: 1px solid var(--red);
}

.container{
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 3rem;
}

.events-container, .search-delete-container{
    gap: 1rem;
}

.public-icon{
    padding: .5rem 1rem;
    border-radius:.5rem;
    font-size: 1.2rem;
}

.tous-publics{
    background-color: rgb(12, 85, 21);
    color: white;
}
.quinze{
    background-color: rgb(20, 20, 94);
    color: white;
}
.public-averti{
    background-color: var(--red);
    color: white;
}
.jeune-public{
    background-color: rgb(15, 171, 179);
}

.no-image{
    aspect-ratio: 4/6;
    background-color: var(--darkgrey);
    padding: 5rem;
}


#index-next-event{
    text-align: center;
    margin-bottom: 3rem;
    font-size: clamp(1.8rem, 1.6581rem + 0.5342vw, 2rem);
}

@media screen and (min-width:2560px){
    .card{
        grid-template-columns: 20% 1fr;
    }
}


@media screen and (max-width:425px){
    .card{
        display: flex;
        flex-direction: column;
    }
    .date{
        border-radius: 0 0 1rem 1rem;
    }
}