/* ==========================================================================
   AMV Services — Pages article
   Chargé après main.css. Tout ce qui touche à la lecture longue.
   ========================================================================== */

.article { padding-block: var(--sp-7); }

/* --- En-tête d'article --------------------------------------------------- */
.article__header {
  max-width: var(--measure);
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-6);
  border-bottom: 1px solid var(--rule);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  align-items: baseline;
  margin-bottom: var(--sp-4);
}

.article__title {
  font-size: var(--t-2xl);
  margin-bottom: var(--sp-4);
}

.article__standfirst {
  font-size: var(--t-md);
  color: var(--ink-muted);
  margin-bottom: 0;
}

/* Calée sur la largeur de lecture : une image plus large que la colonne de
   texte casse l'alignement de la page. */
.article__cover {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  max-width: var(--measure);
  margin-bottom: var(--sp-6);
  background: var(--signal-wash);
}

/* --- Corps --------------------------------------------------------------- */
.article__body { max-width: var(--measure); }

.article__body h2 {
  font-size: var(--t-xl);
  margin-top: var(--sp-8);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
}
/* Le premier h2 suit déjà le filet de l'en-tête : pas de double ligne. */
.article__body > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.article__body h3 {
  font-size: var(--t-lg);
  margin-top: var(--sp-6);
}
.article__body p { font-size: 1.06rem; line-height: 1.72; }

.article__body ul,
.article__body ol {
  margin: 0 0 var(--sp-5);
  padding-left: var(--sp-5);
}
.article__body li { margin-bottom: var(--sp-2); }

.article__body blockquote {
  margin: var(--sp-6) 0;
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-5);
  border-left: 3px solid var(--signal);
  font-family: var(--font-display);
  font-size: var(--t-md);
  color: var(--ink);
}
.article__body blockquote p:last-child { margin-bottom: 0; }

.article__body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-6);
  font-size: var(--t-sm);
}
.article__body th,
.article__body td {
  text-align: left;
  padding: var(--sp-3);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.article__body th {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Filet fort réservé à une vraie ligne d'en-tête ; un tableau clé/valeur
   (th en première colonne) garde le filet léger de ses lignes. */
.article__body thead th { border-bottom: 2px solid var(--ink); }

/* Les tableaux larges défilent seuls, jamais la page */
.table-scroll {
  overflow-x: auto;
  margin-bottom: var(--sp-6);
  -webkit-overflow-scrolling: touch;
}
.table-scroll table { margin-bottom: 0; }

.article__body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--signal-wash);
  padding: 0.12em 0.36em;
}

/* --- Encadré « L'essentiel à retenir » -----------------------------------
   Fourni par Wisewand avec un style en dur ; on ne garde que le contenu. */
.essentiel {
  max-width: var(--measure);
  margin: 0 0 var(--sp-6);
  padding: var(--sp-5);
  background: var(--signal-wash);
  border-left: 3px solid var(--signal);
}
.essentiel p:last-child { margin-bottom: 0; }
.essentiel > .mono {
  display: block;
  margin-bottom: var(--sp-3);
  color: var(--signal);
}

/* --- Encadré « à retenir » ---------------------------------------------- */
.keypoints {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
}
.keypoints h2 {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--sp-3);
  padding: 0;
  border: 0;
}
.keypoints ul { margin-bottom: 0; }

/* --- FAQ dépliable -------------------------------------------------------
   <details> natif : accessible au clavier sans JS, et le contenu replié reste
   dans le DOM — donc indexable et lisible par les moteurs de réponse. */
.faq { max-width: var(--measure); }

.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-item:first-child { border-top: 1px solid var(--rule); }

.faq-item summary {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  cursor: pointer;
  list-style: none;             /* masque le triangle par défaut */
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary h3 {
  margin: 0;
  font-size: var(--t-md);
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.18s ease;
}
.faq-item summary:hover h3 { color: var(--signal); }

/* Indicateur d'état, en monospace comme le reste des éléments de service */
.faq-item summary::after {
  content: "+";
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--t-md);
  line-height: 1;
  color: var(--signal);
}
.faq-item[open] summary::after { content: "–"; }

.faq-item summary:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.faq-item > p {
  margin: 0;
  padding: 0 var(--sp-6) var(--sp-5) 0;
  color: var(--ink-muted);
}

/* --- Signature auteur ---------------------------------------------------- */
.byline {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  max-width: var(--measure);
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 2px solid var(--ink);
}
/* En tête de corps (page rédaction), le filet de l'en-tête suffit. */
.article__body > .byline:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.byline img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--signal-wash);
}
.byline__name {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 var(--sp-1);
}
.byline p {
  font-size: var(--t-sm);
  color: var(--ink-muted);
  margin: 0;
}

/* --- Mention partenaire -------------------------------------------------- */
/* Affichée sur tout contenu publié dans le cadre d'un partenariat. */
.disclosure {
  max-width: var(--measure);
  margin-bottom: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--flag);
  background: var(--surface);
  font-size: var(--t-sm);
  color: var(--ink-muted);
}
.disclosure strong {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flag);
}

/* --- Sommaire ------------------------------------------------------------ */
.toc {
  max-width: var(--measure);
  margin-bottom: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--rule);
}
.toc h2 {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--sp-3);
  padding: 0;
  border: 0;
}
.toc ol {
  margin: 0;
  padding-left: var(--sp-5);
  font-size: var(--t-sm);
}
.toc li { margin-bottom: var(--sp-2); }

/* --- À lire aussi -------------------------------------------------------- */
.related { padding-block: var(--sp-7); border-top: 1px solid var(--rule); }
.related > h2 {
  font-size: var(--t-lg);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-6);
  border-bottom: 2px solid var(--ink);
}

/* --- Fil d'Ariane -------------------------------------------------------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-block: var(--sp-4);
  margin: 0;
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb span { margin-inline: var(--sp-2); color: var(--rule-strong); }

@media (max-width: 720px) {
  .article__title { font-size: var(--t-xl); }
  .byline { flex-direction: column; gap: var(--sp-3); }
}
