/* ==========================================================================
   POWERS — Conseils techniques
   Deux vues dans une seule page : la liste et l'article. Le corps d'article
   est réglé pour la lecture longue — une seule colonne étroite, interlignage
   généreux, respiration entre les intertitres.
   ========================================================================== */

/* ------------------------------------------------------------- Filtres */
.cs-filtres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s-10); }
.cs-filtre {
  padding: 9px 16px; border-radius: var(--r-full);
  border: 1px solid var(--n-200); background: var(--n-0);
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2);
  transition: border-color 180ms var(--e-out), color 180ms var(--e-out),
              background-color 180ms var(--e-out), transform 180ms var(--e-spring);
}
.cs-filtre:hover { border-color: var(--n-300); color: var(--ink); transform: translateY(-2px); }
.cs-filtre[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --------------------------------------------------------------- Liste */
.cs-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-5); }
@media (max-width: 560px) { .cs-grille { grid-template-columns: 1fr; } }

.cs-carte {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 200ms var(--e-out), box-shadow 260ms var(--e-out), transform 220ms var(--e-out);
  animation: fade-up 480ms var(--e-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.cs-carte:hover { border-color: transparent; box-shadow: var(--sh-3); transform: translateY(-4px); }
.cs-carte h3 {
  font-size: 1.25rem; letter-spacing: -.024em; line-height: 1.25;
  transition: color 180ms var(--e-out);
}
.cs-carte:hover h3 { color: var(--a-600); }
.cs-carte p {
  font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cs-pied {
  display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: var(--s-4);
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs); color: var(--ink-3);
}
.cs-pied em { font-style: normal; margin-left: auto; }

.cs-rub {
  display: inline-flex; align-items: center; align-self: flex-start;
  padding: 5px 12px; border-radius: var(--r-full);
  background: var(--a-50); color: var(--a-700);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em;
}

/* ------------------------------------------------------------- Article */
.cs-tete { max-width: 720px; padding-block: var(--s-4) var(--s-10); }
.cs-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-3); }
.cs-meta em { font-style: normal; }
.cs-tete h1 {
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
  letter-spacing: -.035em; line-height: 1.08; margin-top: var(--s-5);
}
.cs-chapo {
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.6;
  color: var(--ink-2); margin-top: var(--s-5);
}

/* Le corps : une colonne étroite, c'est la seule règle qui compte pour la
   lecture longue. */
.cs-corps { max-width: 68ch; }
.cs-corps h2 {
  font-size: clamp(1.25rem, 1.05rem + .8vw, 1.625rem);
  letter-spacing: -.024em; margin-top: var(--s-12); margin-bottom: var(--s-4);
}
.cs-corps h2:first-child { margin-top: 0; }
.cs-corps p { font-size: 1.0625rem; line-height: 1.75; color: var(--n-700); margin-top: var(--s-4); }
.cs-corps ul { margin-top: var(--s-5); display: grid; gap: var(--s-3); }
.cs-corps li {
  position: relative; padding-left: var(--s-6);
  font-size: 1.0625rem; line-height: 1.7; color: var(--n-700);
}
.cs-corps li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 7px; height: 7px; border-radius: 99px; background: var(--a-500);
}

/* Trois blocs que l'éditeur d'administration sait produire et que la feuille
   ne décrivait pas encore : sous-titre, liste numérotée, citation. Sans eux
   un article rédigé en ligne s'affichait avec les styles par défaut du
   navigateur, en rupture avec le reste de la page. */
.cs-corps h3 {
  font-size: clamp(1.0625rem, .98rem + .35vw, 1.1875rem);
  letter-spacing: -.014em; margin-top: var(--s-8); margin-bottom: var(--s-2);
  color: var(--ink);
}

/* La liste numérotée réutilise la puce ronde de la liste à points, en y
   écrivant le rang. `counter-increment` sur l'élément, le numéro dans le
   pseudo-élément : le marqueur natif resterait inhabillable. */
.cs-corps ol { margin-top: var(--s-5); display: grid; gap: var(--s-3); counter-reset: pas; }
.cs-corps ol li { counter-increment: pas; padding-left: var(--s-8); }
.cs-corps ol li::before {
  content: counter(pas); top: .1em; left: 0;
  width: 22px; height: 22px; border-radius: 99px;
  display: grid; place-items: center;
  font-size: .75rem; font-weight: 700; color: #fff; background: var(--a-500);
}

.cs-citation {
  margin: var(--s-8) 0 0; padding: var(--s-2) 0 var(--s-2) var(--s-6);
  border-left: 3px solid var(--f-heat, var(--a-500));
  font-size: 1.125rem; line-height: 1.6; color: var(--ink);
  font-style: italic;
}

/* Une section sans article — le blog au démarrage. Un cadre discret vaut
   mieux qu'une grille vide, qui se lit comme une page cassée. */
.cs-vide {
  grid-column: 1 / -1;
  padding: var(--s-10) var(--s-6);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  text-align: center;
  color: var(--n-500);
  font-size: var(--fs-sm);
}

.cs-note {
  margin-top: var(--s-8); padding: var(--s-6);
  border-radius: var(--r); border: 1px solid var(--a-100); background: var(--a-50);
  font-size: var(--fs-sm); line-height: 1.65; color: var(--a-700);
}

.cs-fin {
  display: flex; gap: var(--s-3); flex-wrap: wrap;
  max-width: 68ch; margin-top: var(--s-12);
  padding-top: var(--s-8); border-top: 1px solid var(--line-soft);
}

.cs-suite { margin-top: var(--s-20); padding-top: var(--s-10); border-top: 1px solid var(--line-soft); }
.cs-suite h2 { font-size: var(--fs-h3); margin-bottom: var(--s-6); }

@media (prefers-reduced-motion: reduce) { html:not(.mouvement-force) .cs-carte { animation: none; } }
