/* Blog et inspirations (template-parts/post-listing.php, template-parts/blog/helpers.php): the posts page, the
   archives and the article search. The title, the page's words and a folio rule; the filter bar (news-filters.css);
   the newest article as the lead, the one authored moment: its photo over eight columns and the text on a raised card
   that overlaps its right edge (under the photo's lower edge on a phone); then the other articles as cards: rows with a
   small photo on a phone, two then three columns from 640 and 1100 px, the last row always full (a lone last card
   spans it, image beside text). Every layout is set here before the first paint and follows the light/dark choice and
   the world. Motion: transform and opacity only, none with reduced motion. */

.gp-blog { overflow-x: clip; }
.gp-blog ::selection { background: var(--accent); color: var(--on-accent); }
.gp-blog time { font-variant-numeric: tabular-nums; }

/* ---------- Title ---------- */
.gp-blog-hero { padding-top: calc(var(--header-total) + clamp(28px, 5vw, 76px)); background: radial-gradient(ellipse 55% 70% at 88% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), var(--bg); color: var(--ink); }
.gp-blog-hero__top { display: grid; gap: 18px 56px; align-items: end; }
.gp-blog-hero__title { max-width: 7.8em; margin: 0; font-size: clamp(2.6rem, 1.1rem + 6vw, 6rem); line-height: .9; } /* em, not ch, and no mid-word break: main.css « Titles » */
@media (max-width: 639.98px) { .gp-blog-hero__title { max-width: none; } } /* « Entrepreneuriat, » whole at 390 and 414 */
.gp-blog-hero__intro { max-width: 46ch; margin: 0; color: var(--ink-2); font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem); line-height: 1.5; }
@media (min-width: 980px) {
	.gp-blog-hero__top { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
	.gp-blog-hero__intro { padding-bottom: .4em; }
}
/* The folio: the journal's name, the real counts, the date of the latest article, between a double and a thin rule. */
.gp-blog-folio { position: relative; margin-top: clamp(28px, 4vw, 56px); padding: 18px 0 14px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line); }
.gp-blog-folio::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--ink); opacity: .55; }
.gp-blog-folio__line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 1.6em; overflow: hidden; margin: 0; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .1em; line-height: 1.4; text-transform: uppercase; }
.gp-blog-folio__line > span { position: relative; }
.gp-blog-folio__line > span + span::before { content: "·"; position: absolute; left: -.8em; translate: -50% 0; color: var(--accent-ink); font-weight: 800; }
.gp-blog-folio__name { color: var(--ink); }
.gp-blog-folio__line time { text-transform: none; letter-spacing: .02em; }

/* ---------- Filters ---------- */
.gp-blog-zone { padding-top: clamp(16px, 2.4vw, 32px); padding-bottom: var(--space-section, clamp(70px, 9vw, 130px)); } /* the room after the list, outside the stuck bar's travel */
/* The article search (search results only). */
.gp-blog-filters { padding-top: clamp(24px, 3.4vw, 44px); }
.gp-blog-search { position: relative; display: flex; max-width: 640px; }
.gp-blog-search input[type="search"] { flex: 1; min-width: 0; min-height: var(--field-h-l); padding: 0 60px 0 18px; border: 1px solid var(--field-line); border-radius: var(--field-radius-l); background: var(--bg); color: var(--ink); font-size: 1rem; -webkit-appearance: none; appearance: none; }
.gp-blog-search input::placeholder { color: var(--muted); opacity: 1; }
.gp-blog-search input:focus-visible { outline-offset: 2px; border-radius: var(--field-radius-l); }
.gp-blog-search button { position: absolute; right: 6px; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--accent-edge); cursor: pointer; translate: 0 -50%; }
.gp-blog-search button:focus-visible { outline-offset: 2px; border-radius: 10px; }
.gp-blog-search button .gp-i { width: 20px; height: 20px; }
.gp-blog-count { margin: 14px 0 0; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Meta line ---------- */
/* Separator dots sit in the gap, left of each item; the one that starts a wrapped line falls outside and is clipped. */
.gp-blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 1.4em; overflow: hidden; margin: 0; color: var(--muted); font-size: .82rem; font-weight: 600; line-height: 1.35; }
.gp-blog-meta > * { position: relative; }
.gp-blog-meta > * + *::before { content: ""; position: absolute; left: -.7em; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; translate: -50% -50%; }
.gp-blog-meta__tag { color: var(--accent-ink); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Results ---------- */
.gp-blog-results { padding-top: clamp(28px, 4vw, 56px); padding-bottom: var(--space-section, clamp(70px, 9vw, 130px)); } /* search and archives (no zone) */
.gp-blog-zone .gp-blog-results { padding-bottom: 0; } /* with the bar, the zone keeps the room (above) */

/* The lead. The title is the link; its ::after covers the whole block (the card stays unpositioned for that, so the
   photo goes under it with z-index -1 inside the isolated block). */
.gp-blog-lead { position: relative; display: grid; margin-bottom: clamp(44px, 6vw, 88px); isolation: isolate; }
.gp-blog-lead__media { position: relative; z-index: -1; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--bg-3); }
.gp-blog-lead__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gp-blog-lead__card { display: grid; align-content: center; gap: 16px; margin: -52px 10px 0; padding: clamp(22px, 3vw, 48px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); box-shadow: 0 34px 70px -38px rgba(var(--chrome-rgb), .6); }
.gp-blog-lead__title { margin: 0; font-size: clamp(1.75rem, 1rem + 2.4vw, 3.2rem); line-height: 1; text-wrap: balance; }
.gp-blog-lead__link { color: inherit; text-decoration: underline 3px transparent; text-underline-offset: .16em; }
.gp-blog-lead__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.gp-blog-lead:hover .gp-blog-lead__link { text-decoration-color: currentColor; }
.gp-blog-lead__link:focus-visible { outline: none; }
.gp-blog-lead:has(.gp-blog-lead__link:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 6px; border-radius: var(--radius); }
.gp-blog-lead__excerpt { display: -webkit-box; max-width: 62ch; margin: 0; overflow: hidden; color: var(--ink-2); -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; }
.gp-blog-lead__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 4px; }
.gp-blog-lead__cta { display: inline-flex; align-items: center; gap: .75em; color: var(--ink); font-family: var(--font-display); font-size: .92rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.gp-blog-lead__dot { display: inline-grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--accent-edge); }
.gp-blog-lead__dot .gp-i { width: 20px; height: 20px; transition: transform .45s var(--ease-out); }
.gp-blog-lead:hover .gp-blog-lead__dot .gp-i { transform: translateX(3px); }
@media (min-width: 640px) {
	.gp-blog-lead__media { aspect-ratio: 16 / 9; }
	.gp-blog-lead__card { margin: -88px clamp(24px, 4vw, 48px) 0; }
}
@media (min-width: 1000px) {
	.gp-blog-lead { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 1.8vw, 28px); align-items: center; }
	.gp-blog-lead__media { grid-column: 1 / 9; grid-row: 1; aspect-ratio: 16 / 11; }
	.gp-blog-lead__card { grid-column: 7 / 13; grid-row: 1; margin: 0; padding: clamp(32px, 3.2vw, 52px); }
}

/* The cards. */
.gp-blog-grid { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.gp-blog-card { min-width: 0; border-bottom: 1px solid var(--line); }
.gp-blog-card__in { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; height: 100%; padding: 16px 0; }
.gp-blog-card__media { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: var(--radius-s); background: var(--bg-3); }
.gp-blog-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gp-blog-card__go { position: absolute; right: 14px; bottom: 14px; display: none; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--accent-edge); opacity: 0; transform: translate3d(-8px, 8px, 0) scale(.85); transition: opacity .35s var(--ease-out), transform .5s var(--ease-out); }
.gp-blog-card__go .gp-i { width: 20px; height: 20px; }
.gp-blog-card__body { display: grid; align-content: start; gap: 10px; min-width: 0; }
.gp-blog-card__title { margin: 0; font-family: var(--font-display); font-size: clamp(1.08rem, .98rem + .5vw, 1.45rem); font-weight: 700; line-height: 1.14; letter-spacing: -.01em; text-wrap: pretty; }
.gp-blog-card__link { color: inherit; text-decoration: underline 2px transparent; text-underline-offset: .2em; }
.gp-blog-card__link::after { content: ""; position: absolute; inset: 0; }
.gp-blog-card__in:hover .gp-blog-card__link { text-decoration-color: currentColor; }
.gp-blog-card__link:focus-visible { outline: none; }
/* The excerpt and « Lire l’article »: only on the lone last card that spans the row (below); never read elsewhere. */
.gp-blog-card__excerpt, .gp-blog-card__cta { display: none; }
.gp-blog-card__excerpt { max-width: 56ch; margin: 0; overflow: hidden; color: var(--ink-2); line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.gp-blog-card__cta { align-items: center; gap: .75em; margin-top: 8px; color: var(--ink); font-family: var(--font-display); font-size: .92rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.gp-blog-card__dot { display: inline-grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--accent-edge); }
.gp-blog-card__dot .gp-i { width: 20px; height: 20px; transition: transform .45s var(--ease-out); }
.gp-blog-card__in:hover .gp-blog-card__dot .gp-i { transform: translateX(3px); }
.gp-blog-card__in:has(.gp-blog-card__link:focus-visible) { outline: 2px solid var(--accent-ink); outline-offset: 6px; border-radius: var(--radius-s); }
@media (min-width: 640px) {
	.gp-blog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(40px, 4.6vw, 64px) clamp(20px, 2.4vw, 32px); }
	.gp-blog-card { grid-column: span 2; border-bottom: 0; }
	.gp-blog-card__in { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 0; }
	.gp-blog-card__media { aspect-ratio: 4 / 3; border-radius: var(--radius); }
	.gp-blog-card__in:has(.gp-blog-card__link:focus-visible) { border-radius: var(--radius); }
}
@media (min-width: 640px) and (hover: hover) {
	.gp-blog-card__go { display: grid; }
	.gp-blog-card__in:hover .gp-blog-card__go, .gp-blog-card__in:focus-within .gp-blog-card__go { opacity: 1; transform: none; }
}
/* The last row is always full. Two columns: a lone last card spans the row, its photo beside its text. */
@media (min-width: 640px) and (max-width: 1099.98px) {
	.gp-blog-card:nth-child(odd):last-child { grid-column: 1 / -1; }
	.gp-blog-card:nth-child(odd):last-child .gp-blog-card__in { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: clamp(22px, 3vw, 40px); }
	.gp-blog-card:nth-child(odd):last-child .gp-blog-card__media { aspect-ratio: 16 / 10; }
	.gp-blog-card:nth-child(odd):last-child .gp-blog-card__title { font-size: clamp(1.35rem, 1rem + 1.2vw, 2rem); }
	.gp-blog-card:nth-child(odd):last-child .gp-blog-card__excerpt { display: -webkit-box; }
}
/* Three columns: two cards left on the last row share it; a lone one spans it, its photo beside its text. */
@media (min-width: 1100px) {
	.gp-blog-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.gp-blog-card:nth-child(3n+1):nth-last-child(2), .gp-blog-card:nth-child(3n+2):last-child { grid-column: span 3; }
	.gp-blog-card:nth-child(3n+1):nth-last-child(2) .gp-blog-card__media, .gp-blog-card:nth-child(3n+2):last-child .gp-blog-card__media { aspect-ratio: 16 / 10; }
	.gp-blog-card:nth-child(3n+1):last-child { grid-column: 1 / -1; }
	.gp-blog-card:nth-child(3n+1):last-child .gp-blog-card__in { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 3vw, 56px); }
	.gp-blog-card:nth-child(3n+1):last-child .gp-blog-card__media { aspect-ratio: 16 / 9; }
	.gp-blog-card:nth-child(3n+1):last-child .gp-blog-card__title { font-size: clamp(1.5rem, 1rem + 1.1vw, 2.3rem); }
	.gp-blog-card:nth-child(3n+1):last-child .gp-blog-card__body { gap: 14px; }
	.gp-blog-card:nth-child(3n+1):last-child .gp-blog-card__excerpt { display: -webkit-box; font-size: 1.06rem; -webkit-line-clamp: 4; line-clamp: 4; }
	.gp-blog-card:nth-child(3n+1):last-child .gp-blog-card__cta { display: inline-flex; }
	.gp-blog-card:nth-child(3n+1):last-child .gp-blog-card__go { display: none; } /* the cue under the text instead */
}

/* « Afficher plus d’articles » and the numbered links. */
.gp-blog-more { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: clamp(40px, 5vw, 68px); }
.gp-blog-more__status { margin: 0; color: var(--muted); font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.gp-blog-more__error { margin: 0; color: var(--danger); font-weight: 600; text-align: center; }
.gp-blog-pages { justify-content: center; }

/* ---------- Motion ---------- */
/* Hover: the photos lean in (a mouse, motion allowed); the lead's photo also follows the pointer (news-filters.css). */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.gp-blog-card__media img { transition: scale 1s var(--ease-out); }
	.gp-blog-card__in:hover .gp-blog-card__media img { scale: 1.06; }
	.gp-blog-lead:hover [data-nf-depth] img { scale: 1.08; }
}
/* On arrival (script, motion allowed): the lead's photo settles, then its card rises over it. */
@media (prefers-reduced-motion: no-preference) {
	html.gp-js .gp-blog-lead__media img { animation: gp-blog-settle 1.7s var(--ease-out) backwards; }
	html.gp-js .gp-blog-lead__card { animation: gp-blog-rise 1.1s var(--ease-out) .25s backwards; }
}
@keyframes gp-blog-settle { from { opacity: .001; scale: 1.14; } }
@keyframes gp-blog-rise { from { opacity: .001; transform: translate3d(0, 40px, 0); } }
@media (prefers-reduced-motion: reduce) {
	.gp-blog-card__go { transition: none; }
}
