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

228 lines
5.0 KiB
CSS

.articles-list {
padding: 1rem;
position: relative;
/* Place au-dessus de .article-content (z-index: 2) pour que les dropdowns ne soient pas masqués */
z-index: 5;
}
.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, var(--surface-charcoal-90), var(--surface-onyx-95));
border: 1px solid var(--bg-white-10);
border-top: 2px solid var(--bg-white-20);
box-shadow: 0 6px 14px var(--overlay-black-50);
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 var(--overlay-black-70);
}
/* Image en haut, occupant toute la largeur */
.article-image {
height: 180px;
background-size: cover;
background-position: center;
position: relative;
border-bottom: 2px solid var(--bg-white-10);
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, var(--bg-white-05), var(--transparent));
opacity: 0.4;
}
/* Date en haut à gauche */
.article-date {
position: absolute;
top: 160px;
left: 0;
background: var(--accent-orange);
color: var(--text-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: var(--link-blue);
}
/* Métadonnées (section + durée de lecture) bien ancrées en bas */
.article-meta {
font-size: 0.8rem;
color: var(--text-soft);
display: flex;
justify-content: space-between;
width: 100%;
margin-top: .5rem;
/* Force ces éléments à coller en bas */
}
.featured-section {
padding: 1rem;
}
.featured-card {
display: flex;
gap: 1.5rem;
padding: 1.5rem;
border-radius: 12px;
background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(12, 12, 12, 0.92));
border: 1px solid rgba(255, 255, 255, 0.06);
box-shadow: 0 14px 26px rgba(0, 0, 0, 0.35);
align-items: stretch;
}
.featured-card__image {
display: block;
flex: 0 0 42%;
border-radius: 10px;
overflow: hidden;
background: linear-gradient(135deg, #1f1f1f, #101010);
}
.featured-card__image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.featured-card__image--placeholder {
width: 100%;
height: 100%;
min-height: 220px;
background: linear-gradient(135deg, #2a2a2a, #161616);
}
.featured-card__body {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.85rem;
color: var(--text-softer);
}
.featured-card__meta {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
align-items: center;
font-size: 0.9rem;
color: var(--text-muted);
}
.featured-card__meta time {
font-size: 0.85rem;
color: var(--text-soft);
}
.featured-card__title {
margin: 0;
font-size: 1.6rem;
line-height: 1.2;
}
.featured-card__title a {
color: var(--text-white);
text-decoration: none;
}
.featured-card__title a:hover,
.featured-card__title a:focus {
color: var(--accent-blue);
}
.featured-card__summary {
margin: 0;
font-size: 1rem;
line-height: 1.6;
color: var(--text-soft);
}
.featured-card__cta {
align-self: flex-start;
padding: 0.45rem 1rem;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.12);
text-decoration: none;
color: var(--text-softer);
font-weight: 600;
letter-spacing: 0.02em;
transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}
.featured-card__cta:hover,
.featured-card__cta:focus {
color: var(--text-white);
border-color: rgba(255, 255, 255, 0.3);
background: rgba(255, 255, 255, 0.08);
}
.featured-card__section {
text-transform: uppercase;
font-size: 0.85rem;
letter-spacing: 0.08em;
color: var(--text-muted2);
}
@media (max-width: 900px) {
.featured-card {
flex-direction: column;
}
.featured-card__image {
flex: none;
width: 100%;
aspect-ratio: 16 / 9;
}
}