1
Files
2025/themes/default/assets/css/list.css

106 lines
2.5 KiB
CSS

.articles-list {
padding: 1rem;
position: relative;
z-index: 2;
}
.articles-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 1rem;
}
.article-card {
display: flex;
flex-direction: column;
justify-content: space-between;
border-radius: 12px;
overflow: hidden;
position: relative;
background: linear-gradient(to bottom, rgba(15, 15, 15, 0.9), rgba(1, 1, 1, 0.95));
border: 1px solid rgba(255, 255, 255, 0.1);
border-top: 2px solid rgba(255, 255, 255, 0.2);
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
color: inherit;
text-decoration: none;
transition: box-shadow 0.2s ease-in-out;
}
/* Effet léger au survol */
.article-card:hover {
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
}
/* Image en haut, occupant toute la largeur */
.article-image {
height: 180px;
background-size: cover;
background-position: center;
position: relative;
border-bottom: 2px solid rgba(255, 255, 255, 0.1);
filter: brightness(0.6);
/* Image légèrement plus sombre */
transition: filter 0.2s ease-in-out;
}
/* Supprimer l'effet d'opacité au survol */
.article-card:hover .article-image {
filter: brightness(1);
}
/* Effet verre */
.article-image::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(to top, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
opacity: 0.4;
}
/* Date en haut à gauche */
.article-date {
position: absolute;
top: 160px;
left: 0;
background: #b16a00;
color: white;
font-weight: bold;
font-size: 0.75rem;
padding: 4px 12px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-left: none;
}
/* Contenu bien structuré */
.article-content {
display: flex;
flex-direction: column;
flex-grow: 1;
/* Permet à la section du bas de rester alignée */
padding: 0.8rem;
}
/* Titre bien collé sous l'image */
.article-title {
font-size: 1rem;
margin-bottom: auto;
/* Repousse la section et la durée de lecture vers le bas */
transition: color 0.2s ease-in-out;
}
/* Titre devient bleu au survol */
.article-card:hover .article-title {
color: #8ab4f8;
}
/* Métadonnées (section + durée de lecture) bien ancrées en bas */
.article-meta {
font-size: 0.8rem;
color: #bbb;
display: flex;
justify-content: space-between;
width: 100%;
margin-top: .5rem;
/* Force ces éléments à coller en bas */
}