/*
 * Articles (Les Carnets) : gabarit de lecture partagé par toutes les pages articles/<slug>.
 * Fond papier, tout en Satoshi, une seule échelle de lecture (celle de la documentation) :
 * h2 34 px, chapô 21 px, texte 18 px / 1.7, titres de cartes 21 px / 800, texte de carte 17 px,
 * tableaux 16 px, citation 30 px, libellés 12-13 px. Titre d'article au gabarit d'une page de lecture
 * (36 à 52 px), pas celui des pages vitrine.
 * Encadrés teintés (pas de barre latérale colorée), tableau, étapes, matrice, citation, sources,
 * FAQ et suites de lecture.
 * Les classes ar-* reprennent celles de la maquette modele-article.
 */

/* ---------- Barre de progression de lecture ---------- */

.ar-prog {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 3px;
  background: var(--ps-orange);
  transform: scaleX(var(--ar-p, 0));
  transform-origin: left;
  pointer-events: none;
}

@keyframes ar-p {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@supports (animation-timeline: scroll()) {
  .ar-prog {
    animation: ar-p linear both;
    animation-timeline: scroll(root);
  }
}

/* ---------- Ambiance et colonnes ---------- */

.ar-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);
}

/* Même conteneur que le header : la colonne de lecture démarre à l'aplomb du logo. */
.ar-w,
.ar-wide {
  box-sizing: border-box;
  max-width: var(--ps-container);
  margin: 0 auto;
  padding-right: var(--ps-gutter);
  padding-left: var(--ps-gutter);
}

.ar-w > * {
  max-width: 880px;
}

.ar-layout > .ar-body {
  max-width: 880px;
}


/* ---------- En-tête de l'article ---------- */

.ar-head {
  padding-top: 48px;
  padding-bottom: 32px;
}

/* Retour au sommaire : lien secondaire souligné, sans flèche. */
.ps-page main .ar-back {
  color: var(--ps-ink);
  font-size: 17px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.ps-page main .ar-back:hover {
  color: var(--ps-orange-dark);
}

.ar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 18px;
  padding: 10px 0;
  border-top: 1.5px solid var(--ps-ink);
  border-bottom: 1px solid #d8c6b9;
  color: #8a7266;
  font-size: 13px;
}

.ar-cat {
  color: var(--ps-orange-dark);
}

.ps-page .ar-title {
  margin: 26px 0 22px;
  color: var(--ps-ink);
  font-weight: 900;
}



.ps-page .ar-chap {
  color: #3a2a22;
  font-family: var(--ps-font-sans);
  font-size: 21px;
  line-height: 1.6;
}

/* ---------- Corps de lecture ---------- */

.ar-body {
  padding-bottom: 96px;
  color: #2d1f18;
  font-family: var(--ps-font-sans);
  font-size: 18px;
  line-height: 1.7;
}

.ps-page .ar-body p {
  margin: 0 0 20px;
}

.ps-page main .ar-body a {
  color: var(--ps-orange-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

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

.ar-body strong {
  color: var(--ps-ink);
}

.ps-page .ar-h2 {
  margin: 64px 0 14px;
  color: var(--ps-ink);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.035em;
  scroll-margin-top: 96px;
}

.ar-kick {
  display: block;
  margin-top: 64px;
  color: var(--ps-orange-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ps-page .ar-kick + .ar-h2 {
  margin-top: 8px;
}

/* Listes du corps : pastilles orange (comme sur l'accueil) pour les puces ; numéros seulement pour les vraies suites d'étapes. */
.ar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.ar-list li {
  position: relative;
  padding-left: 30px;
}

ul.ar-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ps-orange);
}

ol.ar-list {
  counter-reset: ar-li;
}

ol.ar-list li {
  counter-increment: ar-li;
  padding-left: 44px;
}

ol.ar-list li::before {
  content: counter(ar-li);
  position: absolute;
  top: 0.15em;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(244, 81, 30, 0.12);
  color: var(--ps-orange-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

/* ---------- Encadré « À retenir » : fond teinté et pastille, sans barre latérale ---------- */

.ar-note {
  margin: 30px 0;
  padding: 22px 24px;
  border: 1px solid #ecd4c8;
  border-radius: 16px;
  background: transparent;
  color: var(--ps-ink);
  font-family: var(--ps-font-sans);
  font-size: 17px;
  line-height: 1.55;
}

.ar-note-label {
  display: inline-block;
  margin-bottom: 10px;
  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;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ar-note--alert {
  border-color: #f5c9c9;
  background: transparent;
}

.ar-note--alert .ar-note-label {
  background: rgba(214, 38, 74, 0.12);
  color: #a8173a;
}

.ar-note p {
  margin: 0;
}

/* ---------- Trio C2PA / IA / les deux ---------- */

.ar-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 44px 0;
  border-top: 1.5px solid var(--ps-ink);
  border-bottom: 1.5px solid var(--ps-ink);
  font-family: var(--ps-font-sans);
}

.ar-trio > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 18px;
}

.ar-trio > div + div {
  border-left: 1px solid #d8c6b9;
}

/* Repère de colonne : pastille teintée (plus de grand mot au trait). */
.ar-sym {
  align-self: flex-start;
  margin-bottom: 6px;
  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: 800;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ar-trio-title {
  color: var(--ps-ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ar-trio-text {
  color: var(--ps-muted-light);
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Deux approches côte à côte ---------- */

.ar-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 30px 0;
  font-family: var(--ps-font-sans);
  line-height: 1.5;
}

.ar-split > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
}

.ar-split > div:first-child {
  background: var(--ps-ink);
  color: #fff;
}

.ar-split > div:last-child {
  border: 1.5px solid var(--ps-ink);
  background: transparent;
}

.ar-split-tag {
  color: var(--ps-orange-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ar-split > div:first-child .ar-split-tag {
  color: var(--ps-orange-light);
}

.ps-page .ar-split h3 {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ar-split-text,
.ar-split ul {
  color: var(--ps-muted-light);
  font-size: 17px;
  line-height: 1.6;
}

.ar-split > div:first-child :is(.ar-split-text, ul) {
  color: #d7c3b8;
}

.ar-split ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.ar-split li::before {
  content: "— ";
  color: var(--ps-orange);
}

/* ---------- Tableau : cadre arrondi fermé, en-têtes alignés sur une ligne (comme .hm-compare) ---------- */

.ar-tablewrap {
  margin: 36px 0;
  overflow-x: auto;
  border: 1px solid var(--ps-line-light);
  border-radius: var(--ps-radius-card);
  background: transparent;
}

.ar-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-family: var(--ps-font-sans);
  font-size: 16px;
  line-height: 1.5;
}

.ar-table th,
.ar-table td {
  padding: 16px 22px;
  border-top: 1px solid var(--ps-line-light);
  text-align: left;
  vertical-align: top;
}

.ar-table td {
  color: var(--ps-muted-light);
}

.ar-table thead th {
  padding: 20px 22px;
  border-top: 0;
  color: var(--ps-ink);
  font-size: 16px;
  font-weight: 800;
  vertical-align: middle;
}

.ar-table tbody th,
.ar-table tbody td:first-child {
  width: 30%;
  color: var(--ps-ink);
  font-weight: 700;
}

/* ---------- Étapes numérotées (vraie suite : l'ordre compte) ---------- */

.ar-steps {
  margin: 24px 0;
  padding: 0;
  counter-reset: ar-s;
  font-family: var(--ps-font-sans);
  line-height: 1.5;
  list-style: none;
}

.ar-steps li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #d8c6b9;
  counter-increment: ar-s;
}

/* L'ordre compte ici (une suite d'étapes) : numéro dans une pastille teintée, sans chiffre au trait. */
.ar-steps li::before {
  content: counter(ar-s);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(244, 81, 30, 0.12);
  color: var(--ps-orange-dark);
  font-size: 16px;
  font-weight: 800;
}

.ar-steps strong {
  display: block;
  color: var(--ps-ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

/* ---------- Matrice d'interprétation ---------- */

.ar-mx {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 6px;
  margin: 30px 0;
  font-family: var(--ps-font-sans);
  line-height: 1.4;
}

.ar-mx-ax {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  color: #8a7266;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* Libellés de ligne posés à plat (rien d'incliné). */
.ar-mx-ax--side {
  justify-content: flex-start;
  max-width: 7em;
  text-align: left;
}

.ar-mx-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 150px;
  padding: 18px;
  border: 1.5px solid var(--ps-ink);
  background: transparent;
}

.ar-mx-cell--empty {
  border-style: dashed;
  background: transparent;
}

.ar-mx-tag {
  color: var(--ps-orange-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ar-mx-cell strong {
  color: var(--ps-ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ar-mx-text {
  color: var(--ps-muted-light);
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Schéma en ligne (cycle de vie) ---------- */

.ar-flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 30px 0;
  padding: 26px 24px;
  border-top: 1.5px solid var(--ps-ink);
  border-bottom: 1.5px solid var(--ps-ink);
  font-family: var(--ps-font-sans);
}

.ps-page .ar-flow .ar-flow-line {
  margin: 0;
  color: var(--ps-ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.ar-flow-note {
  color: var(--ps-orange-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Citation ---------- */

.ps-page .ar-body .ar-pull {
  margin: 56px 0;
  color: var(--ps-ink);
  font-family: var(--ps-font-sans);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.ar-pull span {
  color: var(--ps-orange-dark);
}

/* ---------- FAQ de l'article ---------- */

.ar-faq {
  margin: 20px 0 0;
  font-family: var(--ps-font-sans);
}

.ar-faq .f-q summary {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.ps-page .ar-faq .f-q p {
  margin: 14px 0 0;
  font-size: 17px;
}

/* ---------- Sources ---------- */

.ar-refs {
  margin: 40px 0 0;
  padding: 20px 0 0;
  border-top: 1.5px solid var(--ps-ink);
  font-family: var(--ps-font-sans);
  font-size: 15px;
}

.ar-refs ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 20px;
}

@media (max-width: 760px) {
  .ar-trio,
  .ar-split,
  .ar-mx {
    grid-template-columns: 1fr;
  }

  .ar-trio > div + div {
    border-top: 1px solid #d8c6b9;
    border-left: 0;
  }

  .ar-mx-ax {
    display: none;
  }

  .ps-page .ar-h2 {
    font-size: 28px;
  }

  .ps-page .ar-body .ar-pull {
    font-size: 26px;
  }

  .ar-steps li {
    grid-template-columns: 48px 1fr;
    gap: 12px;
  }
}

@media (max-width: 420px) {
  .ar-w,
  .ar-wide {
    padding-right: 20px;
    padding-left: 20px;
  }
}

/* ---------- En-tête façon page article de référence : fil, rubrique, titre, chapeau, puis infos ---------- */

.ar-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-top: 40px;
  padding-bottom: 36px;
}

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

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

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

.ar-head .ar-cat {
  margin-top: 12px;
  color: var(--ps-orange-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ps-page main .ar-title {
  max-width: 20em;
  margin: 0;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.ps-page .ar-head .ar-chap {
  max-width: 38em;
  margin: 4px 0 0;
  color: #3a2a22;
  font-size: 20px;
  line-height: 1.6;
}

.ar-head .ar-meta {
  align-self: stretch;
  margin-top: 12px;
  border-top: 1px solid #d8c6b9;
}

/* Blocs du corps : mêmes cartes arrondies et filets clairs partout (plus de cadres noirs carrés). */
.ar-split {
  gap: 16px;
}

.ar-split > div {
  border-radius: var(--ps-radius-card);
}

.ar-split > div:last-child {
  border: 1px solid var(--ps-line-light);
}

.ar-trio,
.ar-flow {
  border-top: 1px solid #d8c6b9;
  border-bottom: 1px solid #d8c6b9;
}

.ar-refs {
  border-top: 1px solid #d8c6b9;
}

.ar-mx-cell {
  border: 1px solid var(--ps-line-light);
  border-radius: 16px;
}

.ar-mx-cell--empty {
  border: 1px dashed #d8c6b9;
}

@media (max-width: 760px) {
  .ps-page .ar-head .ar-chap {
    font-size: 18px;
  }
}

/* Liste de statuts : pastilles aux couleurs de statut du site (mêmes tokens que l'extension) au lieu des tirets. */
ul.ar-status li::before {
  content: "";
  top: 0.5em;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ps-status-none);
}
ul.ar-status li.ar-st--trusted::before { background: var(--ps-status-trusted); }
ul.ar-status li.ar-st--untrusted::before { background: var(--ps-status-untrusted); }
ul.ar-status li.ar-st--invalid::before { background: var(--ps-status-invalid); }
ul.ar-status li.ar-st--none::before { background: var(--ps-status-none); }
