
#ressources{
    background-color: #f6f7f3;

    main{
        @media(max-width: 810px){
            display: flex;
            flex-direction: column-reverse;
        }
    }
    .layout-content{
        // padding-top: 1rem;

        .content_container{
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 2rem;

            #block-quartiers-de-demain-titredepage{
                margin-top: 3rem;
                margin-left: 15%;
                margin-bottom: 1rem;
                width: 70%;
                @media(max-width: 810px){
                    display: flex;
                    margin:auto;
                    margin-top: 10rem;
                }
                h1{
                    width: fit-content;
                    margin: auto;
                    text-transform: none;
                    color: black;
                    font-size: 2rem;
                    font-family: "gilroy-medium"
                }
                
                
            }
            .views-element-container{
                margin-left: 15%;
                width: 60%;
                @media(max-width: 810px){
                    margin-left: 0%;
                    width: 90%;
                } 
                h3{
                    &::before{
                        content:"";
                        display: block;
                        border-bottom: solid 2px $blue_QDD;
                        // width: 80% ;
                        margin: auto;
                    }
                    text-align: center;
                    div{
                        .field_name{
                            h2{
                                margin-bottom: 0.6rem;
                                a{
                                    font-family: "gilroy-light";
                                    color: $blue_QDD;
                                    font-size: 1.2rem;
                                }
                            }
                        }
                        .field_description{
                            margin-left: 10%;
                            margin-right: 10%;
                            font-family: "gilroy-light";
                            p{
                                margin-top: 0.6rem;
                            }
                        }
                    }
                    .type-Kit-de-communication{
                        background-color: $blue_QDD;
                        .field_name h2 {
                            margin: 0;
                            a{
                                color: white;
                            }
                        }
                        
                    }
                    
                }
                h3:has(div.type-Kit-de-communication){
                    margin-bottom: 0;
                    .field_name{
                        padding-top: 1rem;
                    }
                }
                button.voir-plus{
                    background-color: transparent;
                    color: $blue_QDD;
                    border: solid $blue_QDD 0.5px;
                    padding: 0.3rem;
                    display: flex;
                    margin: auto;
                }
                .view-rows-wrapper{
                    display: flex;
                    flex-direction: row;
                    flex-wrap: wrap;
                    
                    
                    .views-row{
                        // width: 30%;
                        font-size: 0.5rem;
                        margin-bottom: 1rem;
                        .views-field-title-1,
                        .views-field-field-sous-titre-1{
                            font-family: "gilroy-medium";
                            color: $blue_QDD;
                            font-size: 00.6rem;
                            margin-bottom: 0;
                        } 
                        .views-field-body-1{
                            font-family: "gilroy-light";
                        }

                        p{
                            font-size: 0.5rem;
                        }  
                        .views-field-field-mots-clefs{
                            // margin-top: 0.5rem;
                            // display: flex;
                            // flex-direction: row !important;
                            // .field-content{
                            //     border: solid 1px $blue_QDD;
                            //     margin-right: 0.2rem;
                            //     padding: 1.3%;
                            //     padding-bottom: 0.2%;
                            //     padding-top: 0.2%;
                            //     font-size: 0.4rem;
                            //     font-family: "gilroy-semibold";
                            //     a{
                            //         color: $blue_QDD;
                            //     }
                            
                            // }

                        }  
                        .views-field-field-site{
                            margin-top: 0.5rem;
                            div {
                                a {
                                    position: relative;
                                    padding-left: 20px; // Ajuster selon la taille de l'icône
                                    &:before {
                                        content: "";
                                        position: absolute;
                                        left: 0;
                                        top: 50%;
                                        transform: translateY(-50%);
                                        width: 1em;
                                        height: 1em;
                                        background-image: url("../img/map_pointer.svg");
                                        background-size: contain;
                                        background-repeat: no-repeat;
                                    }
                                    color: $red_QDD;
                                    font-family: "gilroy-semibold";
                                }
                            }
                        }  
                        .views-field-field-liens{
                            margin-top: 0.5rem;

                        }
                        .views-field-field-documents{
                            margin-top: 0.5rem;

                        }
                        .views-field-field-date-ressource{

                        }
                        .type-documentation{
                            .field_body,
                            .field_field_images{
                                display: none;
                            }
                        }


                        .type-podcast{
                            .content-ressource{
                                display: grid;
                                grid-template-columns: 1fr 1.2fr;
                                grid-template-rows: repeat(5 1fr);
                                margin-top: 1rem;
                                .field_field_images{
                                   grid-column: 1;
                                   grid-row: 1 /span 5;
                                   padding: 0 1rem 1rem 1rem;
                                    img{
                                        width: 100%;
                                        height: auto;
                                        aspect-ratio: 1 / 1;
                                        object-fit: cover;
                                        border-radius: 9px;
                                    }
                                }
                                .field_title, h2{
                                    margin-top: 0;
                                }
                                .field_title,
                                .field_field_sous_titre,
                                .field_field_author,
                                .field_field_date_ressource,
                                .field_body,
                                .field_field_mots_clefs,
                                .field_field_site,
                                .field_field_documents,
                                .field_field_liens{
                                   grid-column: 2;
                                   
                                }

                            }
                           
                        }
                        .type-vidéo{
                            .content-ressource{
                                margin: 1rem;
                            }
                            .field_body{
                                opacity: 1 !important;
                                transform: none !important;
                            }
                            a img{
                                max-width: 100%;
                                height: auto;
                                object-fit: cover;
                                border-radius: 9px;
                            }
                        }
                        .type-kit-de-communication{
                           div.content-ressource{
                                display: flex;
                                flex-direction: column;
                                align-items: center;
                                background-color: $blue_QDD;
                                color: white;
                                padding: 1rem 3rem;
                                
                                .field_title{
                                    display: none;
                                }
                                .field_field_sous_titre{
                                    text-align: center;
                                    font-size: 0.9rem;
                                    font-family: 'gilroy-light';
                                    color: white;
                                }
                                .field_body{
                                    text-align: center;
                                    font-size: 0.7rem;
                                    font-family: 'gilroy-light';
                                }
                                .field_field_liens{
                                    width: fit-content;
                                    a{  
                                        display: flex;
                                        flex-direction: row;
                                        padding-left: 0.5rem;
                                        display: inline-flex;
                                        align-items: center;
                                        color: white;
                                        background: black;
                                        text-transform: uppercase;
                                        font-size: 0.6rem;
                                        svg{
                                            display: none;
                                        }
                                        &::after{
                                            display: inline-flex;
                                            content: url("../img/noun-arrow-to-right.svg");
                                            padding-right: 0.2rem;
                                            padding-left: 0.2rem;
                                        }
                                    }
                                }
                            }
                        }
                    }
                   

                    .views-row:has(.type-podcast){
                        width: 50%;
                        @media(max-width: 810px){
                            width: 100%;
                        }
                    }
                    .views-row:has(.type-documentation){
                        width: 25%;
                        @media(max-width: 810px){
                            width: 50%;
                        }
                    }
                    .views-row:has(.type-vidéo){
                        width: 50%;
                        @media(max-width: 810px){
                            width: 100%;
                        }
                    }
                    .views-row:has(.type-Kit-de-communication){
                        width: 100%;
                    }

                }



                // }
                
            }
            
        }
    }
}
