.topic-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin: 25px 0 40px;
}

.topic-cards .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: inherit;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: -25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

/* ==========================
   DATE + HEADER
   ========================== */

.card-top {
    display: flex;
    gap: 12px;
}

.topic-date {
    flex: 0 0 55px;
    background: #5f93c6;
    color: #fff;
    border-radius: 6px;
    text-align: center;
    padding: 6px 4px;
}

.topic-date .month {
    display: block;
    font-size: 12px;
    font-weight: 700;
}

.topic-date .day {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.topic-date .year {
    display: block;
    font-size: 11px;
}

.topic-main {
    flex: 1;
    min-width: 0;
}

/* ==========================
   TITRE
   ========================== */

.topic-cards h3 {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.3;
    text-transform: none;
}

.topic-cards h3 a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    color: inherit;
}

/* ==========================
   AVATAR + META
   ========================== */

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header .avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.card-header .meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-header .author {
    font-weight: 600;
    line-height: 1.2;
}

.card-header .date {
    color: #888;
    font-size: 11px;
}

/* ==========================
   FORUM
   ========================== */

.forum-name {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* ==========================
   EXCERPT
   ========================== */

.topic-cards .excerpt {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================
   BOUTON
   ========================== */

.topic-cards .read-more {
    margin-top: auto;
    display: block;
    text-align: center;
    padding: 7px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #555;
    text-decoration: none;
}

.topic-cards .read-more:hover { background: #abc3d6 }

html.phpbb-dark-mode .topic-cards .read-more {
    background: #333;
    color: #dcdcdc;
}

/* ==========================
   RESPONSIVE
   ========================== */

@media (max-width: 900px) {
    .topic-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}

@media (max-width: 700px) {
    .topic-cards { grid-template-columns: 1fr }
}   

@media (max-width: 700px) {
    .topic-cards h3 a {
        white-space: normal;
        overflow: hidden;
        text-overflow: unset;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .topic-cards .excerpt {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

.card-author {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
}

.topiccards-more { margin: 15px 0 30px }

.view-more-topics {
    width: 100%;
    display: block;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: inherit;
    color: inherit;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.view-more-topics:hover { background: #abc3d6 }

html.phpbb-dark-mode .view-more-topics {
    background: #333;
    color: #dcdcdc;
}