/* ---------- Section « Cette semaine » ---------- */
.cette-semaine, .tendances, .videos {
    padding: 2rem var(--marge-page);
}

.entete-section h2 {
    margin: 0 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--encre);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/*.cette-semaine-contenu {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 2rem;
    align-items: start;
}*/

.une {
    margin: 0;
}

.une img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cette-semaine-contenu {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;               /* narrow: articles under the Une */
}

/*.une img {
    display: block;
    width: 100%;
    height: auto;
}*/

/* Wide: Une on the left, articles on the right */
@media (min-width: 64rem) {
    .cette-semaine-contenu {
        grid-template-columns: minmax(14rem, 22rem) 1fr;
        align-items: start;
    }
}

/* ---------- Articles ---------- */

/*.articles {
    --colonnes: 3;
    display: grid;
    grid-template-columns: repeat(var(--colonnes), minmax(0, 1fr));
    gap: 2rem 1.5rem;
}*/

.articles {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
.articles > :nth-child(n + 3) { display: none; }

/* Stacked under the Une: the articles have the full width */
@media (min-width: 40rem) {
    .articles { grid-template-columns: repeat(2, 1fr); }
    .articles > :nth-child(-n + 4) { display: block; }
}

/* Side by side with the Une: the articles area is narrower, so go back to 2 columns */
@media (min-width: 64rem) {
    .articles { grid-template-columns: repeat(2, 1fr); }
}

/* Very wide screens: 3 columns × 2 rows */
@media (min-width: 90rem) {
    .articles { grid-template-columns: repeat(3, 1fr); }
    .articles > :nth-child(-n + 6) { display: block; }
}

/* ---------- Mode portrait ----------
   Placé après les media queries de largeur pour les surcharger
   (articles.css est chargé après home.css). */
@media (orientation: portrait) {
    .cette-semaine, .tendances, .videos {
        padding-block: 1rem;
    }

    .entete-section h2 {
        margin-bottom: 1rem;
    }

    /* La Une, puis les articles en dessous */
    .cette-semaine-contenu {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* La Une tient entièrement dans l'écran, sans être déformée
       (10.5rem ≈ header + titre de section) */
    .une {
        display: block;
    }

    .une img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: calc(100svh - 10.5rem);
        margin-inline: auto;
    }

    /* 2 articles, l'un sous l'autre, visibles en scrollant */
    .cette-semaine .articles {
        grid-template-columns: 1fr;
    }

    .cette-semaine .articles > :nth-child(-n + 2) {
        display: block;
    }

    .cette-semaine .articles > :nth-child(n + 3) {
        display: none;
    }
}

/* Articles tendances : 4 colonnes au lieu de 3 */
.tendances .articles {
    --colonnes: 4;
}

/* Articles tendances : miniature à gauche du texte */
.tendances .article {
    --vignette: 6rem; /* largeur de la miniature */

    display: grid;
    grid-template-columns: var(--vignette) minmax(0, 1fr);
    column-gap: 1rem;
    align-items: start;
}

.article {
    padding-top: 0.75rem;
    border-top: 1px solid var(--filet);
}

.article h3 {
    margin: 0 0 0.25rem;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.25;
}

.article h3 a {
    color: inherit;
    text-decoration: none;
}

.auteur {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--texte-discret);
}

/* Extrait qui s'estompe derrière le lien « Lire l'article » */
.extrait {
    position: relative;
    max-height: 8rem;
    overflow: hidden;
    line-height: 1.6;
}

.extrait p {
    margin: 0;
}

.extrait::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5rem;
    background: linear-gradient(to bottom, transparent, var(--fond) 85%);
    pointer-events: none;
}

.lire {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.lire:hover {
    text-decoration: underline;
}