.article-grid-layout {
    display: grid;
    /* 15px = 0.9375rem */
    gap: calc(15 / 16 * 1rem);
    margin-top: var(--space-sm);

    grid-template-columns: repeat(2, 1fr);

    justify-content: start;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    padding-bottom: 0;
}

/* ---------------------------------------------------- */
/* STYLE DE BASE DES CARTES */
/* ---------------------------------------------------- */
.article-resource-card {
    display: flex;
    position: relative;
    flex-direction: column;
    min-width: 0;
    padding: var(--space-md);
    background-color: var(--source-color-white-transparent) !important;
    border: calc(1 / 16 * 1rem) solid var(--color-book-resource-card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-z1);
    align-items: flex-start;
    align-self: start;
    margin-top: 0;
}

/* ---------------------------------------------------- */
/* 1. EN-TÊTE HORIZONTAL */
/* ---------------------------------------------------- */
.article-header-content {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
    width: 100%;
}

.article-cover-container {
    /* 250px / 16 = 15.625rem */
    width: calc(250 / 16 * 1rem);
    height: auto;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;

    overflow: hidden;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-z2);
}

.article-cover-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin-bottom: 0;
}

.article-info-base {
    flex-grow: 1;
    text-align: left;
    min-width: 0;
    margin-bottom: 0;
    margin-top: 0;
    margin-right: var(--space-md);
}

.article-title {
    font-size: var(--font-size-book-title);
    color: var(--source-color-accent-two);
    margin-top: 0;
    margin-bottom: var(--space-sm);
    line-height: var(--line-height-heading);
}

.article-subtitle {
    font-size: var(--font-size-base-plus);
    color: var(--color-article-subtitle);
    margin-bottom: var(--space-sm);
    padding: var(--space-sm);
    /* 1.4rem / 16 = 22.4px */
    line-height: calc(22.4 / 16 * 1rem);
    font-weight: var(--fw-bold);
    background-color: var(--source-color-accent-two-very-light);
    border-radius: var(--radius-sm);
}

.article-read-link {
    font-size: var(--font-size-md);
    color: var(--color-link-to-be-view);
    font-weight: var(--fw-bold);
    text-decoration: underline;
    display: inline-block;
    margin-bottom: 0;
}

.article-read-link:hover {
    transform: scale(var(--transform-scale-sm-plus));
}

/* ---------------------------------------------------- */
/* 2. SECTION CENTRÉE (Résumé et Expansion) */
/* ---------------------------------------------------- */
.article-center-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
    margin-bottom: 0;
    margin-top: 0;
}

.article-summary-wrapper {
    /* 103px / 16 = 6.4375rem */
    max-height: calc(103 / 16 * 1rem);
    overflow: hidden;
    position: relative;
    padding-bottom: 0;
    flex-grow: 1;
    min-height: 0;
    box-sizing: border-box;
    margin-top: 0;
}

/* --- DÉGRADÉ DE MASQUAGE --- */
.article-summary-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    /* 55px / 16 = 3.4375rem */
    height: calc(55 / 16 * 1rem);
    background: linear-gradient(to top,
    var(--color-white-bg) 0%,
    rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    opacity: 1;
    z-index: 5;
}

.article-summary-wrapper.expanded {
    max-height: none;
}

.article-summary-wrapper.expanded::after {
    opacity: 0;
}

.article-summary {
    margin-bottom: 0;
    height: 100%;
}

.article-description:last-child {
    margin-bottom: 0;
}

/*------------------------------------------------*/
/*------------------- @media ---------------------*/
/*------------------------------------------------*/

/* 950px = 59.375rem */
@media (max-width: calc(950 / 16 * 1rem)) {
    .article-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* 992px = 62rem */
@media (max-width: calc(992 / 16 * 1rem)) {
    .article-description {
        font-size: calc(20.8 / 16 * 1rem); /* 1.3rem */
    }
}

/* 785px = 49.0625rem */
@media (max-width: calc(785 / 16 * 1rem)) {
    .article-title {
        font-size: var(--font-size-md-plus);
    }
    .article-subtitle,
    .article-read-link,
    .tts-label {
        font-size: var(--font-size-base-plus);
    }
}

/* 576px = 36rem */
@media (max-width: calc(576 / 16 * 1rem)) {
    .article-cover-container {
        /* 200px = 12.5rem */
        width: calc(200 / 16 * 1rem);
    }
}

/* 480px = 30rem */
@media (max-width: calc(480 / 16 * 1rem)) {
    .article-grid-layout {
        gap: calc(15 / 16 * 1rem);
    }
    .article-header-content {
        flex-direction: column !important;
        align-items: center !important;
    }
    .article-info-base {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: var(--space-md) !important;
        text-align: center !important;
    }
    .article-cover-container {
        width: calc(200 / 16 * 1rem);
        margin-bottom: var(--space-sm) !important;
    }
}
/* ================================================= */
/* === MODE SOMBRE === */
/* ================================================= */
html[data-theme="dark"] .article-resource-card {
    background-color: black !important;
}

html[data-theme="dark"] .article-summary-wrapper::after {
    background: linear-gradient(to top,
    black 0%,
    rgba(255, 255, 255, 0) 100%
    );
}

html[data-theme="dark"] .article-title {
    font-weight: var(--fw-normal);
    color: lightgreen;

}

html[data-theme="dark"] .article-read-link {
    color: #ff7777;
    font-weight: var(--fw-normal);
}