article.node-type-ressource{
    margin-bottom: 1rem ;
    padding-right: 1rem;  
    h2{
        text-align: left !important; 
    }
    .ext{
        color: black;
    }
    svg.ext{
        display: none;
    }
    :visited {
        color: black;
      }
    a{
        color: black;
    }
    .wrapper-ressource{    
        display: flex;
        flex-direction: column;
        position: relative;
        .card-link {
            position: absolute;
            inset: 0;
            z-index: 10;
            display: block;
        }
        .field--name-field-type-de-ressource{
            order: 2;
        }
        .field--name-field-type-de-media{
            order: 1;
            
        }                               
        .field--name-field-type-de-ressource, 
        .field--name-field-type-de-media{
            grid-column: 1;
            text-transform: uppercase;
            line-height: 1.1rem;
            margin-top: 0.5rem;                                              
            a{
                color: $blue-light;
                font-weight: 900;
                font-size: 0.8rem;
                pointer-events: none;
                cursor: default;
            }
        }
        .field--name-title{
            grid-column: 2;
            margin-top: 0.5rem;
            order: 4;
            margin-bottom: 0;
            h2{
                margin: 0;
                line-height: 1.2rem;
                margin-left: 0 !important;
                line-height: 0;
                margin-bottom: 0 !important;
                a{
                    color: $black;
                    font-size: 0.9rem;
                    font-weight: 900;
                    font-style: normal;
                    display: -webkit-box;
                    -webkit-box-orient: vertical;
                    -webkit-line-clamp: 4;
                
                    overflow: hidden;
                    text-overflow: ellipsis;
                
                    line-height: 1.4em;
                 
                }
                @media (max-width: 810px) {
                    line-height: 0 !important;                                       
                } 
            }
        }
        .field--name-field-auteur-s-{
            grid-column: 2;
            margin-top: 0.5rem;
            font-weight: 800;
            line-height: 1.1rem;
            order: 6 !important;
            font-size: 0.8rem;
            p{
                margin: 0;
                
            }
            .field__label{
                display:none;
            }
        }
        .field--name-field-sous-titre{
            grid-column: 2;
            margin-top: 0.8rem;
            order: 5;
            font-size: 0.9rem;
            font-weight: 900;
            line-height: 1.3 !important;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 3;
            overflow: hidden;
            text-overflow: ellipsis;
            
        }
        .field--name-field-edition{
            order: 7;
            grid-column: 2;
            margin-top: 0.5rem;
            font-size: 0.8rem;
            p{
                margin: 0;
            }
            .field__label{
                display:none;
            }
        }
        .field--name-field-images{
            order: 3;
            grid-column: 1;
            .field__item{
                height: 100px;
            }
            img{
                height: 100%;
                width: auto;
                border: solid 1px gray;
            }
        }
        .field--name-field-date-de-parution{
            grid-column: 2;
            margin-top: 0.3rem;
            order: 8;
            font-size: 0.8rem;
        }
        .field--name-field-mots-clefs{
            order: 9;
            grid-column: 2;
            display: flex;
            margin-top: 0.5rem;
            flex-direction: row;
            flex-wrap: wrap;
        
            .field__item{
                margin-right: 0.5rem;
                // padding-left: 0.3rem;
                padding-right: 0.3rem;
                margin-bottom: 0.3rem;
                font-size: 0.7rem;
            
                a{
                    background: $blue-dark;
                    color: $white;
                    font-weight: 800;
                    // vertical-align: super;
                    padding-left: 0.1rem;
                    padding-right: 0.1rem;
                    display: inline-flex;
                    pointer-events: none;
                    cursor: default;
                }
            }
        }

        ul.links.inline{
            display: none;
        }
    } 

    &.type-publications-issues-du-programme{
        // background-color: $background-actus;
            min-width: 300px;

        .wrapper-ressource{
            display: grid;
            grid-template-columns: 1fr 1.8fr; 
            grid-template-rows: repeat(5 1fr);
            .field--name-field-type-de-ressource{
                order: 2;
                grid-row: 2;
                grid-column: 1 /span 2;
                margin-bottom: 0.5rem;
            }
            .field--name-field-type-de-media{
                order: 1;
                grid-row: 1;
                grid-column: 1 /span 2;
            }
            .field--name-field-images{
                order: 3;
                grid-row: 3 /span 5;
                height: auto;
                width: 90%;
                img{
                    height: auto;
                    width: 90%;
                    border: 1px solid #a3a3a3;
                }
            }
            .field--name-title{
                grid-row: 3;
                margin-top: 0;
                padding-bottom: 0.4rem;
                h2{
                    margin-left: 0 !important;
                    line-height: 0;
                    a{
                        color: $blue-light;
                        font-size: 1.3rem;
                        font-style: normal;
                        line-height: 1.2em !important;
                    }
                }
                
            }
            .field--name-field-sous-titre{
                margin-top: 0;
                line-height: 1;
                grid-row: 4;
                a,
                a:visited{
                grid-row: 4;
                color: $blue-light;
                font-size: 1rem;
                font-weight: 800;
                }
            }
            .field--name-field-auteur-s-{
                // grid-row: 5;
            }
            .field--name-field-edition{
                grid-row: 6;
                line-height: 1.1;
            }
            .field--name-field-date-de-parution{
                grid-row: 7;
            }
            .field--name-field-mots-clefs{
                grid-row: 8;
                margin-top: 0.5rem;
                left: -0.2rem;
                position: relative;
            }
        }
    }
    &.type-paroles-de-laureats{
                .wrapper-ressource{
            .field--name-field-type-de-ressource{
                order: 2;
            }
            .field--name-field-type-de-media{
                order: 1;
                
            }
            .field--name-field-images{
                order: 3;
            }
            .field--name-title{
            }
            .field--name-field-sous-titre{
            }
            .field--name-field-auteur-s-{
            }
            .field--name-field-edition{
            }
            .field--name-field-date-de-parution{
            }
            .field--name-field-mots-clefs{
            }
        }
        // background-color: $background-actus;
    }
    @media (max-width: 479px) {
        margin-left: 0;                                                
    }   


    &.type-presse{
        .field--name-field-images{
            display: none;
        }
    }




}
.type-les-projets-en-images.views-row{
    width: 50% !important;
    // min-width: 0 !important;
    min-width: 550px !important;
    max-width: 0 !important;
    @media (max-width: 479px) {
        min-width: 100% !important;
    } 

    article.node-type-ressource.type-les-projets-en-images {
        .wrapper-ressource {
        display: grid;
        grid-template-columns: 2fr 1fr !important;
        width: 100%; 
        max-width: 100%; 
        // gap: 1rem;
        column-gap: 1rem;
        align-items: start;
        @media (max-width: 479px) {
            display: flex;
            flex-direction: column;
            padding-left: 1rem !important;
        }
    
        .field--name-field-images {
            grid-column: 1;
            grid-row: 3 / span 8;
            width: 100%;
            img {
            width: 100%;
            height: auto;
            margin-top: 1rem;
            object-fit: cover;
            border: 1px solid #ccc;
            
            }
           
            .field__item{
                height: fit-content;
                @media (max-width: 479px) {
                    // margin-bottom: 4rem;
                    height: auto;
                }
            }
        }
        .field--name-field-type-de-media{
            grid-column: 1 /span 2;
            grid-row: 2;
        }
        .field--name-field-type-de-ressource{
            grid-column: 1 /span 2;
            grid-row: 1;
        }
        // Forcer les champs texte à ne pas déborder

        .field--name-title,
        .field--name-field-sous-titre,
        .field--name-field-auteur-s-,
        .field--name-field-edition,
        .field--name-field-date-de-parution,
        .field--name-field-mots-clefs {
            grid-column: 2;
            width: 100%; 
            box-sizing: border-box;
            padding: 0;
            margin: 0;
        }
        .field--name-title{
            // h2{font-size: 0.9rem;}
            grid-row: 3;
            margin-bottom: 0.5rem;
        }
        .field--name-field-sous-titre{
            grid-row: 4;
        }
        .field--name-field-auteur-s-{
            grid-row: 5;
        }
        .field--name-field-edition{
            grid-row: 6;
            line-height: 1;
        }
        .field--name-field-date-de-parution{
            grid-row: 7;
        }
        .field--name-field-mots-clefs{
            grid-row: 8;
        }
    
        // Supprimer les marges internes de h2, p, etc.
        h2, p {
            margin: 0;
            padding: 0;
        }
        }
    }
}  
  