.ressource-media {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.ressource-media video,
.ressource-media iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.ressources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.ressource-card {
    padding: 1rem;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--surface-card);
    box-shadow: 0 4px 14px rgba(45, 111, 159, .08);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--color-primary) 8%, transparent);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ressource-card:hover {
    border-color: var(--primary-300);
    box-shadow: 0 8px 22px rgba(45, 111, 159, .14);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--color-primary) 14%, transparent);
    transform: translateY(-2px);
}

.ressource-card figure {
    margin: 0 0 .75rem;
    aspect-ratio: 16 / 9;
    border-radius: 7px;
    overflow: hidden;
    background: var(--surface-subtle);
}

.ressource-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ressource-card h2 {
    margin: 0 0 .35rem;
    font-size: 1.05rem;
}

.ressource-rubrique {
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
}

/* ------------------------------ Encart « Pourquoi ressources » ------------------------------ */

.ressources-intro{
    margin-bottom: 1.5rem;
}

.ressources-why {
    margin: .75rem 0 0;
    border: 1px dashed var(--border-soft);
    border-radius: 7px;
    background: var(--surface-subtle);
}

.ressources-why summary {
    padding: .55rem .9rem;
    color: var(--link-color);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
}

.ressources-why summary:hover,
.ressources-why summary:focus-visible {
    color: var(--primary-900);
}

.ressources-why p {
    margin: 0;
    padding: 0 .9rem .75rem;
    font-size: .92rem;
    color: var(--muted);
}

/* ------------------------------ Détail d'une ressource ------------------------------ */

.ressource-figure {
    margin: 0 0 1.25rem;
    padding: .75rem;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--surface-subtle);
}

.ressource-figure img {
    display: block;
    max-width: 100%;
    max-height: 24rem;
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 7px;
    object-fit: contain;
}

.ressource-figure--left {
    float: left;
    width: min(45%, 22rem);
    margin: 0 1.25rem .75rem 0;
}

.ressource-figure--right {
    float: right;
    width: min(45%, 22rem);
    margin: 0 0 .75rem 1.25rem;
}

.ressource-figure--left img,
.ressource-figure--right img {
    max-height: none;
}

.page-content::after {
    content: "";
    display: table;
    clear: both;
}

@media (max-width: 640px) {
    .ressource-figure--left,
    .ressource-figure--right {
        float: none;
        width: auto;
        margin: 0 0 1.25rem;
    }
}

/* ------------------------------ Articles ------------------------------ */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1.1rem;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--surface-card);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--color-primary) 8%, transparent);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.article-card:hover {
    border-color: var(--primary-300);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--color-primary) 14%, transparent);
    transform: translateY(-2px);
}

.article-card h3 {
    margin: 0;
    color: var(--text-title);
    font-size: 1.1rem;
    line-height: 1.35;
}

.article-card h3 a {
    color: inherit;
}

.article-card h3 a:hover,
.article-card h3 a:focus-visible {
    text-decoration: underline;
}

.article-badge {
    align-self: flex-start;
    margin: 0;
    padding: .2rem .6rem;
    border-radius: 999px;
    background: var(--surface-highlight);
    color: var(--navy);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.article-extrait {
    margin: 0;
    font-size: .92rem;
    color: var(--ink);
}

.article-meta {
    margin: auto 0 0;
    padding-top: .4rem;
    border-top: 1px solid var(--border-soft);
    font-size: .8rem;
    color: var(--muted);
}

.article-subtitle {
    margin: .5rem 0 0;
    color: var(--primary-200);
    font-size: 1rem;
    font-style: italic;
}

.article-summary {
    padding: .9rem 1.1rem;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 7px 7px 0;
    background: var(--surface-subtle);
    font-style: italic;
}