.n4 { background: var(--n4-bg); color: var(--n4-title-color); padding: var(--n4-pad, 96px 0); }

.n4-head { display: grid; gap: 20px 64px; margin-bottom: clamp(32px, 5vw, 56px); }
.n4-head-split .n4-head { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: end; }
.n4-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-family: var(--fx-font-accent); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--n4-accent);
}
.n4-kicker::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid currentColor; }
.n4-title {
  font-family: var(--n4-title-font); font-size: clamp(36px, 6vw, var(--n4-title-size, 64px)); font-weight: var(--n4-title-weight);
  line-height: .98; letter-spacing: -.03em; color: var(--n4-title-color); max-width: 16ch;
}
.n4-head-side { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.n4-intro { font-family: var(--n4-text-font); font-size: 17px; line-height: 1.6; color: var(--n4-text-color); max-width: 48ch; }
.n4-all {
  display: inline-flex; align-items: center; gap: 8px; padding-bottom: 4px;
  font-weight: 600; font-size: 15px; text-decoration: none; color: var(--n4-title-color);
  border-bottom: 2px solid var(--n4-accent); transition: gap .2s;
}
.n4-all:hover { gap: 14px; }
.n4-empty { color: var(--n4-text-color); padding: 40px 0; }

/* Grille : 6 colonnes, motif de 8 tuiles */
.n4-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(var(--n4-row, 250px), auto);
  grid-auto-flow: dense; gap: var(--n4-gap, 16px);
}
.n4-tile { grid-column: span 2; min-width: 0; border-radius: var(--n4-radius, 14px); overflow: hidden; position: relative; }
.n4-s-feature { grid-column: span 4; grid-row: span 2; }
.n4-s-wide { grid-column: span 4; }

.n4-link { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; text-decoration: none; color: inherit; }
.n4-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; padding: clamp(18px, 2.2vw, 28px); }
.n4-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; }
.n4-cat { font-family: var(--fx-font-accent); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.n4-item-title {
  font-family: var(--n4-title-font); font-size: var(--n4-item-size, 22px); font-weight: var(--n4-title-weight);
  line-height: 1.14; letter-spacing: -.015em;
}
.n4-excerpt { font-family: var(--n4-text-font); font-size: 15px; line-height: 1.55; opacity: .86; max-width: 56ch; }

/* Tuiles images : texte sur voile */
.n4-media { position: absolute; inset: 0; background: var(--n4-surface); }
.n4-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.n4-zoom a.n4-link:hover .n4-media img { transform: scale(1.05); }
.n4-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, color-mix(in srgb, var(--n4-overlay) 88%, transparent) 100%);
}
.is-image .n4-body, .is-image .n4-item-title { color: #fff; }
.is-image .n4-cat { padding: 4px 8px; border-radius: 3px; background: var(--n4-accent); color: var(--n4-accent-text); }
.is-image .n4-meta time { color: rgba(255,255,255,.8); }
.n4-t-feature .n4-item-title { font-size: clamp(26px, 3.4vw, calc(var(--n4-item-size, 22px) * 1.9)); line-height: 1.04; max-width: 20ch; }
.n4-t-feature .n4-body { padding: clamp(22px, 3.2vw, 44px); }

/* Tuile large : image à gauche, texte à droite */
.n4-t-wide.is-image .n4-link { display: grid; grid-template-columns: 1.15fr 1fr; }
.n4-t-wide.is-image .n4-media { position: relative; inset: auto; }
.n4-t-wide.is-image .n4-media::after { display: none; }
.n4-t-wide.is-image .n4-body { justify-content: center; background: var(--n4-surface); color: var(--n4-title-color); }
.n4-t-wide.is-image .n4-item-title { color: var(--n4-title-color); font-size: calc(var(--n4-item-size, 22px) * 1.2); }
.n4-t-wide.is-image .n4-meta time { color: var(--n4-text-color); }
.n4-t-wide.is-image .n4-excerpt { color: var(--n4-text-color); opacity: 1; }

/* Tuiles typographiques */
.is-text .n4-link { justify-content: space-between; }
.is-text .n4-body { flex: 1; justify-content: flex-start; }
.is-text .n4-item-title { font-size: calc(var(--n4-item-size, 22px) * 1.22); line-height: 1.1; }
.is-text .n4-cat { opacity: .92; }
.is-text .n4-meta time { opacity: .75; }
.n4-go {
  margin-top: auto; align-self: flex-end; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid currentColor; transition: transform .25s, background-color .2s;
}
a.n4-link:hover .n4-go { transform: rotate(45deg); }
.n4-t-accent { background: var(--n4-accent); color: var(--n4-accent-text); }
.n4-t-alt { background: var(--n4-alt); color: var(--n4-alt-text); }
.n4-t-plain, .is-text.n4-t-image, .is-text.n4-t-feature, .is-text.n4-t-wide {
  background: var(--n4-surface); color: var(--n4-title-color);
}
.n4-t-plain .n4-cat, .is-text.n4-t-image .n4-cat, .is-text.n4-t-feature .n4-cat, .is-text.n4-t-wide .n4-cat { color: var(--n4-accent); }
.n4-t-plain { background: transparent; box-shadow: inset 0 0 0 1.5px var(--n4-title-color); }
.n4-t-plain .n4-item-title::before {
  content: "“"; display: block; height: .5em; margin-bottom: 8px; font-size: 2.4em; line-height: 1; color: var(--n4-accent);
}
.is-text.n4-t-feature .n4-item-title { font-size: clamp(28px, 3.6vw, calc(var(--n4-item-size, 22px) * 2)); }
a.n4-link:focus-visible { outline-offset: -4px; }

@media (max-width: 980px) {
  .n4-head-split .n4-head { grid-template-columns: 1fr; }
  .n4-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .n4-s-feature, .n4-s-wide { grid-column: span 4; }
  .n4-s-feature { grid-row: span 2; }
}
@media (max-width: 620px) {
  .n4-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .n4-tile, .n4-s-feature, .n4-s-wide { grid-column: auto; grid-row: auto; }
  .is-image .n4-link { min-height: 300px; }
  .n4-s-feature.is-image .n4-link { min-height: 420px; }
  .n4-t-wide.is-image .n4-link { display: flex; min-height: 0; }
  .n4-t-wide.is-image .n4-media { aspect-ratio: 16 / 10; }
  .is-text .n4-link { min-height: 220px; }
  .n4-t-feature .n4-item-title { font-size: 26px; }
  .n4-excerpt { font-size: 14.5px; }
}

/* Dernière rangée incomplète (classes posées par le modèle) */
.n4 .n4-fill-full { grid-column: 1 / -1; }
.n4 .n4-fill-half { grid-column: span 3; }
.n4 .n4-fill-tall { grid-row: span 2; }
@media (max-width: 980px) {
  .n4 .n4-fill-half { grid-column: span 2; }
}
@media (max-width: 620px) {
  .n4 .n4-fill-full, .n4 .n4-fill-half { grid-column: auto; }
  .n4 .n4-fill-tall { grid-row: auto; }
}
