/* Uses the existing Claude palette and encadre component. Scope: V2 candidates only. */
.psy92-legacy-panel {
  padding: var(--e-4, 1rem);
  margin-block: var(--e-6, 2rem);
  border: 1px solid var(--c-filet, #e2dac8);
  background-size: cover;
  background-position: center;
}
.psy92-legacy-panel > .encadre {
  background: var(--c-blanc, #fffdf8);
  color: var(--c-encre, #14202e);
  margin-block: 0;
  min-width: 0;
}
.psy92-legacy-panel img { max-width: 100%; height: auto; }
.psy92-legacy-excerpt > :last-child { margin-bottom: 0; }
@media (max-width: 600px) {
  .psy92-legacy-panel { padding: var(--e-2, .5rem); }
  .psy92-legacy-panel > .encadre { padding: var(--e-4, 1rem); }
}

/* Historical page Query cards: fit the editorial column, not the viewport.
 * This file is appended to legacy-pages.css, enqueued only for the legacy pages.
 * Keep the existing Claude card palette, image treatment, spacing and hover.
 */
:where(body:is(.page-id-14745, .page-id-14761, .page-id-14860, .page-id-15013, .page-id-15081, .page-id-15100, .page-id-15214, .page-id-15393, .page-id-15407))
.prose .psy92-post-query > .wp-block-post-template.grille-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--e-5, 1.5rem);
  padding: 0;
  margin: 0;
  list-style: none;
}

/* A post-template is a card collection, not an editorial bulleted list. */
:where(body:is(.page-id-14745, .page-id-14761, .page-id-14860, .page-id-15013, .page-id-15081, .page-id-15100, .page-id-15214, .page-id-15393, .page-id-15407))
.prose .psy92-post-query > .wp-block-post-template.grille-articles > li {
  min-width: 0;
  padding: 0;
  margin: 0;
}
:where(body:is(.page-id-14745, .page-id-14761, .page-id-14860, .page-id-15013, .page-id-15081, .page-id-15100, .page-id-15214, .page-id-15393, .page-id-15407))
.prose .psy92-post-query > .wp-block-post-template.grille-articles > li::before {
  content: none;
}

/* Restore the existing card heading instead of the surrounding prose H2. */
:where(body:is(.page-id-14745, .page-id-14761, .page-id-14860, .page-id-15013, .page-id-15081, .page-id-15100, .page-id-15214, .page-id-15393, .page-id-15407))
.psy92-post-query .carte-article__titre {
  position: static;
  margin: 0;
  padding: 0;
  font-size: clamp(1.375rem, 1.25rem + 0.4vw, 1.5625rem);
  line-height: 1.15;
  letter-spacing: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}
:where(body:is(.page-id-14745, .page-id-14761, .page-id-14860, .page-id-15013, .page-id-15081, .page-id-15100, .page-id-15214, .page-id-15393, .page-id-15407))
.psy92-post-query .carte-article__titre::before {
  content: none;
}
:where(body:is(.page-id-14745, .page-id-14761, .page-id-14860, .page-id-15013, .page-id-15081, .page-id-15100, .page-id-15214, .page-id-15393, .page-id-15407))
.psy92-post-query .carte-article__titre a {
  color: inherit;
  text-decoration: none;
}
:where(body:is(.page-id-14745, .page-id-14761, .page-id-14860, .page-id-15013, .page-id-15081, .page-id-15100, .page-id-15214, .page-id-15393, .page-id-15407))
.psy92-post-query .carte-article__titre + .carte-article__extrait {
  margin-top: 0;
}

/* The first editorial heading is followed by a one-paragraph separator group.
 * The nine verified sources contain 52 underscores there. Keep the text intact
 * and let it wrap; never hide the overflow or shorten the source paragraph.
 */
:where(body:is(.page-id-14745, .page-id-14761, .page-id-14860, .page-id-15013, .page-id-15081, .page-id-15100, .page-id-15214, .page-id-15393, .page-id-15407))
.prose > .wp-block-group:first-child .wp-block-heading:first-child + .wp-block-group > p:only-child {
  overflow-wrap: anywhere;
}
