.article { margin-top: 0; width: 100%; .category-header-top { display: flex; flex-direction: column; align-items: start; justify-content: space-between; .breadcrumb { font-size: 0.85rem; margin-bottom: 1.5rem; text-transform: uppercase; line-height: 1.3; &__separator { margin: 0 0.4rem; } } @media ($tablet) { flex-direction: row; } } h2 { font-family: Gelasio; font-weight: normal; font-size: 1.8rem; position: relative; display: inline-block; margin-top: 2rem; margin-bottom: 2rem; &::after { content: ''; display: block; position: absolute; height: 5px; width: 100%; // bottom: -1.1rem; left: 0; z-index: 2; } p { line-height: 1.3; &:last-of-type { margin-top: 0.3rem; margin-bottom: 0.3rem; } } p + p { font-size: 1.6rem; } @media ($tablet) { p { font-size: 2.2rem !important; } p + p { font-size: 1.6rem !important; } &::after { bottom: -0.4rem; } } } // Category color gradients on h2::after &.category--le-laboratoire h2::after { background: linear-gradient(to bottom, transparent 0%, $laboratoire 30%); } &.category--manifestations-scientifiques h2::after { background: linear-gradient(to bottom, transparent 0%, $manifestations 30%); } &.category--publications-et-productions h2::after { background: linear-gradient(to bottom, transparent 0%, $publications 30%); } &.category--mediation-scientifique h2::after { background: linear-gradient(to bottom, transparent 0%, $mediations 30%); } &.category--ressources h2::after { background: linear-gradient(to bottom, transparent 0%, $ressources 30%); } .article-type { display: inline-block; margin-top: 2rem; font-family: $font-primary; font-size: 0.85rem; text-transform: uppercase; background-color: $light-gray; padding: 0.2rem 0.6rem; } .maj { font-family: $font-primary; font-size: 0.85rem !important; color: $less-dark-gray; margin-top: 1rem; margin-bottom: 2.5rem; text-transform: uppercase; } .imgs { width: 100%; margin-bottom: 3rem; figure { width: 100%; img { width: 100%; height: auto; } figcaption { font-family: $font-primary; font-size: 0.85rem; color: $less-dark-gray; margin-top: 0.5rem; font-style: italic; } @media ($tablet) { width: 50%; } } &--swiper { display: flex; align-items: center; gap: 0.5rem; @media ($tablet) { width: 50%; } .swiper { flex: 1; min-width: 0; } figure { width: 100%; } .swiper-pagination { position: static; margin-top: 0.5rem; text-align: center; } .swiper-pagination-bullet-active { background-color: $less-dark-gray !important; } } } .article-content { display: flex; flex-direction: column-reverse; gap: 3rem; @media ($tablet) { flex-direction: row; } } .sidebar { background-color: $light-light-gray; @media ($tablet) { width: 25%; padding: 0.8rem; flex-shrink: 0; } .sidebar-container { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: 1.5rem; } .sidebar-section { display: flex; flex-direction: column; gap: 0.8rem; line-height: 1.4; p { margin: 0; } &.reference-bibliographique { display: inline-block; em, i { font-style: italic; } strong { font-weight: bold; } } } p { font-family: $font-primary; } .link-button { width: fit-content; } .imgs--portrait { @media ($tablet) { width: calc(100% + 1.6rem); margin-left: -0.8rem; margin-right: -0.8rem; } .sidebar-portrait { width: 100%; } } .sidebar-portrait { width: 100%; img { width: 100%; height: auto; } figcaption { font-family: $font-primary; font-size: 0.85rem; color: $less-dark-gray; margin-top: 0.5rem; font-style: italic; } } } .main-content-text { margin-top: 1rem; flex: 1; min-height: unset; /* Affichage posts newsletter */ &:has(table[role=presentation]) { p:not(table[role=presentation] p):not(.maj) { display: none; } table { &[role=presentation] p { margin: unset; } td { vertical-align: top; } br { display: none; } } } > *:not(.article-field) { font-size: 1.25rem; } a { text-decoration: underline; } // Les cards d'annonces liées sont imbriquées dans .main-content-text : // leur titre est un
. Sans ces règles, ces // div héritent du line-height: 1 du reset et les div vides ont une hauteur // nulle (texte serré, paragraphes collés). :not([class]) épargne les div // structurelles des templates, qui ont toutes une classe. div:not([class]) { line-height: 1.4; &:empty { height: 1rem; } } // Les div vides en fin de corps (aucun div non vide après elles) ne // doivent pas creuser d'espace avant les mots-clés. Sélecteur interpolé // via @at-root : Ruby Sass supprime sinon silencieusement le :has(~ …), // ce qui masquerait toutes les div vides. @at-root #{"#{&} div:not([class]):empty:not(:has(~ div:not([class]):not(:empty)))"} { display: none; } // Le reset applique `font: inherit` à strong/b/em/i : on restaure gras et // italique pour tout le corps de texte (paragraphes, listes, citations…), // pas seulement sous
, sinon le formatage disparaît dans les