/*
 * Articles (/articles) : « Les Carnets », sommaire façon revue sur fond papier.
 * Titre, article à la une, sommaire filtrable par catégorie, puis appel au pilote.
 * Classes cn-* : équivalents des ar-mast / ar-cover / ar-row de la maquette ressources-articles.
 */

.cn-paper {
  overflow-x: clip;
  color: var(--ps-ink);
  background:
    radial-gradient(900px 620px at 90% 0%, rgba(244, 81, 30, 0.12), transparent 70%),
    var(--ps-paper);
}

.cn-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 56px;
  padding-bottom: 40px;
}

/* ---------- Fil d'Ariane et bandeau ---------- */

.cn-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #8a7266;
  font-size: 14px;
}

.ps-page main .cn-crumbs a {
  color: #8a7266;
  text-decoration: none;
}

.ps-page main .cn-crumbs a:hover {
  color: var(--ps-ink);
}

.cn-crumbs [aria-current="page"] {
  color: var(--ps-ink);
}

/* Taille du h1 : règle commune de provseal.css (--ps-h1-size). */
.ps-page .cn-h1 {
  color: var(--ps-ink);
  font-weight: 900;
}

/* Titre et chapeau alignés à gauche, à l'aplomb du logo. */
.cn-intro {
  max-width: 40em;
  margin: 0;
  color: var(--ps-muted-light);
  font-size: var(--ps-lead-size);
  line-height: 1.55;
}

/* ---------- À la une ---------- */

.ps-page main .cn-cover {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 36px 0 44px;
  border-bottom: 1.5px solid var(--ps-ink);
  color: var(--ps-ink);
  text-decoration: none;
}

.cn-cover-kick {
  color: var(--ps-orange-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* Titre de l'article à la une : taille des titres de section. */
.ps-page main .cn-cover-title {
  max-width: 14em;
  font-size: var(--ps-h2-size);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.cn-cover-out {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ps-orange-dark);
}

.ps-page main .cn-cover:hover .cn-cover-title,
.ps-page main .cn-cover:focus-visible .cn-cover-title {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}

.cn-cover-lead {
  max-width: 34em;
  color: var(--ps-muted-light);
  font-family: var(--ps-font-sans);
  font-size: var(--ps-lead-size);
  line-height: 1.55;
}

/* Lien secondaire : texte souligné, sans flèche (forme ps-link). */
.cn-cover-go {
  align-self: flex-start;
  color: var(--ps-ink);
  font-size: 17px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
}

.ps-page main .cn-cover:hover .cn-cover-go {
  color: var(--ps-orange-dark);
}

/* ---------- Sommaire et filtres ---------- */

.cn-toc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 30px;
}

/* Titre de section puis sous-titre, empilés ; la taille vient de --ps-h2-size. */
.cn-toc-title {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ps-page main .cn-toc-lead {
  margin: 0;
  color: var(--ps-muted-light);
}

.cn-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cn-filters[hidden] {
  display: none;
}

.cn-filter {
  min-height: 38px;
  padding: 7px 14px;
  border: 1.5px solid var(--ps-ink);
  border-radius: var(--ps-radius-pill);
  background: transparent;
  color: var(--ps-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ps-ease), background 0.2s, color 0.2s;
}

.cn-filter:hover {
  transform: translateY(-2px);
}

.cn-filter[aria-pressed="true"] {
  background: var(--ps-ink);
  color: #fff;
}

.cn-filter:focus-visible {
  outline: 3px solid rgba(244, 81, 30, 0.55);
  outline-offset: 3px;
}

.cn-list {
  margin: 0;
  padding: 0;
  border-top: 1.5px solid var(--ps-ink);
  list-style: none;
}

.ps-page main .cn-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid #d8c6b9;
  color: var(--ps-ink);
  text-decoration: none;
  transition: background 0.25s, padding 0.25s var(--ps-ease);
}

.ps-page main .cn-row:hover,
.ps-page main .cn-row:focus-visible {
  padding-right: 12px;
  padding-left: 12px;
  background: rgba(244, 81, 30, 0.06);
}

/* Catégorie : pastille teintée. */
.cn-cat {
  justify-self: start;
  align-self: start;
  padding: 4px 10px;
  border-radius: var(--ps-radius-pill);
  background: rgba(244, 81, 30, 0.12);
  color: var(--ps-orange-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cn-t {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cn-lead {
  display: block;
  margin-top: 6px;
  color: var(--ps-muted-light);
  font-size: 17px;
  line-height: 1.6;
}

.cn-pg {
  color: #8a7266;
  font-size: 13px;
  white-space: nowrap;
}

.cn-empty {
  padding: 22px 0;
  color: var(--ps-muted-light);
  font-size: var(--ps-lead-size);
}

/* ---------- Mobile et mouvement réduit ---------- */

@media (max-width: 900px) {
  .ps-page main .cn-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cn-filter,
  .ps-page main .cn-row {
    transition: none;
  }

  .cn-filter:hover {
    transform: none;
  }
}

/* ---------- Sommaire des Carnets : titres au gabarit d'une revue, pas d'une page vitrine ---------- */

.ps-page main .cn-h1 {
  margin: 0;
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.ps-page main .cn-cover-title {
  max-width: 20em;
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.ps-page main .cn-h2 {
  margin: 0;
  color: var(--ps-ink);
  font-size: clamp(28px, 2.6vw, 34px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.ps-page main .cn-cover {
  margin-top: 16px;
  border-top: 1px solid #d8c6b9;
}
