/* Selfia : pages d'affirmations (/affirmations, /en/affirmations). Complete site.css (memes jetons, theme sombre
   automatique). Ecrit par lib/sections/affirmations.js dans public/affirmations.css. */

/* ---------- cartes d'affirmations ---------- */

.affs {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
  gap: 0.85rem;
  margin: 1.5rem 0 2.6rem;
}

.affs > li {
  gap: 0.75rem;
  padding: 1.15rem 1.35rem 1.25rem;
  font-size: clamp(1.14rem, 1.08rem + 0.25vw, 1.24rem);
  line-height: 1.45;
  hanging-punctuation: first;
}

.affs > li::before {
  height: 1.35rem;
  margin: 0 0 -0.2rem -0.06rem;
  font-size: 3.1rem;
  opacity: 0.85;
}

/* une carte d'encre sur sept, decalee pour ne jamais tomber au meme endroit d'une section a l'autre */
.affs > li:nth-child(7n + 4) {
  background:
    radial-gradient(18rem 10rem at 100% 0%, rgba(233, 184, 114, 0.2), transparent 70%),
    linear-gradient(155deg, var(--ink-1), var(--ink-2));
}

@media (min-width: 40rem) {
  .affs > li {
    padding: 1.3rem 1.5rem 1.35rem;
  }
  /* deux colonnes : la derniere carte d'un nombre impair prend toute la largeur, comme une citation mise en exergue */
  .affs:not(.affs--featured) > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    padding: 1.5rem 1.8rem 1.55rem;
    font-size: clamp(1.24rem, 1.14rem + 0.4vw, 1.4rem);
  }
}

/* telephone : cartes plus compactes (la page reste longue : 45 a 80 phrases) */
@media (max-width: 39.99rem) {
  .affs {
    gap: 0.7rem;
  }
  .affs > li {
    gap: 0.6rem;
    padding: 0.95rem 1.15rem 1.05rem;
    font-size: 1.15rem;
  }
  .affs > li::before {
    height: 1.1rem;
    font-size: 2.6rem;
  }
}

/* ---------- hub : chiffres, affirmations mises en avant, familles ---------- */

.aff-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0;
  margin: 1.8rem 0 2rem;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.aff-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0;
  padding: 1rem 1.1rem 1rem 0;
}

.aff-stats li + li {
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}

.aff-stats strong {
  font: 400 clamp(1.7rem, 1.4rem + 1vw, 2.2rem)/1.05 var(--serif);
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: lining-nums;
}

.aff-stats span {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-3);
}

@media (max-width: 34rem) {
  .aff-stats li + li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.affs--featured > li {
  justify-content: space-between;
}

.affs__text {
  display: block;
}

.affs--featured > li::after {
  display: none;
}

.affs__from {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font: 700 0.78rem/1.3 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  text-decoration: none;
}

.affs__from::after {
  content: "→";
  content: "→" / "";
  letter-spacing: 0;
  transition: transform 0.18s;
}

.affs__from:hover {
  color: var(--text);
}

.affs > li:nth-child(7n + 4) .affs__from {
  color: #f0c98a;
  border-top-color: rgba(243, 238, 230, 0.18);
}

.affs > li:nth-child(7n + 4) .affs__from:hover {
  color: var(--ink-text);
}

@media (prefers-reduced-motion: no-preference) {
  .affs__from:hover::after {
    transform: translateX(3px);
  }
}

/* cartes de themes : un peu plus serrees que les cartes de liens ordinaires */
.cards--themes,
.cards--related,
.cards--guides {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr));
  gap: 0.75rem;
  margin: 1.2rem 0 2.4rem;
}

.cards--themes a,
.cards--related a,
.cards--guides a {
  gap: 0.3rem;
  padding: 1.05rem 2.4rem 1.1rem 1.2rem;
}

.cards--themes strong,
.cards--related strong,
.cards--guides strong {
  font-size: 1.16rem;
}

.cards--themes span:not(.cards__kicker),
.cards--related span:not(.cards__kicker),
.cards--guides span:not(.cards__kicker) {
  font-size: 0.92rem;
  color: var(--text-3);
}

/* ---------- bas de page ---------- */

.related {
  margin-top: 3.4rem;
}

.related > h2 {
  margin-top: 0;
}

.more-link {
  margin: -0.8rem 0 0;
  font-weight: 700;
}

.more-link a::after {
  content: "\00a0→";
  content: "\00a0→" / "";
}

.page-body > .note:first-of-type {
  margin-top: 1.2rem;
}
