/* ==========================================================================
   Algo Data · charte Éditeur v1.1 · ad-article-guide.css (20/11/2026)
   Compléments de ad-article-v2.css pour une actualité de type guide : intertitres de niveau 3, listes,
   étapes numérotées, tableaux de lecture, sources numérotées, appel final. Requêtes en max-width : aucun « < ».
   Aucun mot de vocabulaire publicitaire dans les noms de classes (contrôle_bloqueurs.py).
   ========================================================================== */

/* 0. Conteneur de page : même règle que .ad-wrap du socle, sous un nom que les bloqueurs de publicité ne masquent pas
   (incident du 27/10/2026, article PHP corrigé en r0085 : article-cadre) ---------------------------------- */
.guide-cadre { width: 100%; max-width: calc(var(--ad-max) + 2 * var(--ad-gouttiere)); margin-inline: auto; padding-inline: var(--ad-gouttiere); }

/* 1. Intertitre de niveau 3 et parties ----------------------------------------------------------- */
.ad-ar-partie + .ad-ar-partie { margin-top: clamp(28px, 2vw + 16px, 44px); }
.ad-ar-h3 { margin: 0 0 var(--ad-e-3); font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem); line-height: 1.3;
            letter-spacing: -0.01em; font-weight: 600; text-wrap: balance; }
.ad-ar-h2 + .ad-ar-partie { margin-top: var(--ad-e-6); }

/* 2. Listes à puces et étapes numérotées ---------------------------------------------------------- */
.ad-ar-corps p + .ad-ar-liste, .ad-ar-corps .ad-ar-liste + p, .ad-ar-corps p + .ad-ar-etapes,
.ad-ar-corps .ad-ar-etapes + p { margin-top: 1.15em; }
.ad-ar-liste, .ad-ar-etapes { max-width: 37rem; margin: 1.15em 0 0; padding-left: 1.35em; }
.ad-ar-liste li, .ad-ar-etapes li { padding-left: 0.3em; }
.ad-ar-liste li + li, .ad-ar-etapes li + li { margin-top: 0.7em; }
.ad-ar-liste li::marker { color: var(--ad-texte-doux); }
.ad-ar-etapes li::marker { font-weight: 640; color: var(--ad-texte-doux); }
/* 2 bis. Lecture rapide (20/11/2026, retour de lecture sur téléphone) : sections resserrées, réponse posée sur un fond,
   cinq actions en fiches numérotées ----------------------------------------------------------------------- */
.ad-ar-corps .ad-ar-section { margin-top: clamp(32px, 2.5vw + 14px, 56px); }
.guide-bref { padding: clamp(18px, 2vw + 8px, 32px); background: var(--ad-fond-alt); border: 1px solid var(--ad-filet); border-radius: 8px; }
.guide-bref .ad-ar-tableau-cadre { margin-top: var(--ad-e-4); }
.guide-bref .ad-ar-tableau thead th { border-bottom-color: var(--ad-filet-fort); }
.ad-ar-corps ol.ad-ar-etapes { list-style: none; padding-left: 0; counter-reset: etape; display: grid; gap: 10px; max-width: none; }
.ad-ar-etapes li { counter-increment: etape; position: relative; margin: 0 !important; padding: 14px 16px 14px 56px;
                   border: 1px solid var(--ad-filet); border-radius: 8px; }
.ad-ar-etapes li::before { content: counter(etape); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px;
                           display: grid; place-items: center; border-radius: 50%; background: var(--ad-fond-alt);
                           font-weight: 640; font-size: var(--ad-t-petit); font-variant-numeric: tabular-nums; }
.ad-ar-etapes li strong { display: block; margin-bottom: 2px; }
.ad-ar-corps strong { font-weight: 640; }

/* 3. Tableaux de lecture : trois colonnes au plus, repliés en fiches sur téléphone ------------------ */
.ad-ar-tableau-cadre { margin: var(--ad-e-6) 0 0; overflow-x: auto; }
.ad-ar-tableau-cadre:focus-visible { outline: 2px solid var(--ad-action); outline-offset: 3px; }
.ad-ar-tableau { width: 100%; border-collapse: collapse; font-size: var(--ad-t-petit); line-height: 1.5; text-align: left; }
.ad-ar-tableau th, .ad-ar-tableau td { padding: 12px 14px 12px 0; border-top: 1px solid var(--ad-filet); vertical-align: top; }
.ad-ar-tableau thead th { border-top: 0; border-bottom: 1px solid var(--ad-filet-fort); font-weight: 600; color: var(--ad-texte-doux); }
.ad-ar-tableau tbody th { font-weight: 600; color: var(--ad-texte); }
.ad-ar-tableau tbody tr:last-child th, .ad-ar-tableau tbody tr:last-child td { border-bottom: 1px solid var(--ad-filet); }
.ad-ar-tableau td:last-child, .ad-ar-tableau th:last-child { padding-right: 0; }

/* 4. Lien « pour en savoir plus » et appel final ------------------------------------------------- */
.ad-ar-corps .ad-ar-tableau-cadre + p { margin-top: 1.5em; }
.ad-ar-corps .ad-ar-appel { margin-top: var(--ad-e-6); max-width: none; }
.ad-ar-corps .ad-ar-suite { margin-top: var(--ad-e-6); }

/* 4 bis. Appel de fin de page : un seul bouton, sur un fond posé ---------------------------------------------- */
.guide-appel { padding: clamp(24px, 2vw + 12px, 36px); background: var(--ad-fond-alt); border: 1px solid var(--ad-filet); border-radius: 8px; }
.guide-appel .ad-ar-h2 { margin-bottom: var(--ad-e-4); }
.guide-appel p { max-width: 34rem; }
.guide-appel .bouton { text-wrap: balance; text-align: center; }
.ad-ar-corps .guide-appel .ad-ar-appel { margin-top: var(--ad-e-6); }

/* 5. Sources numérotées : le numéro est celui des renvois du texte --------------------------------- */
.ad-ar-liens { counter-reset: source; }
.ad-ar-liens li { counter-increment: source; display: flex; gap: 0.75em; scroll-margin-top: 96px; }
.ad-ar-liens li::before { content: counter(source) "."; flex: none; min-width: 1.75em; padding-block: 12px;
                          font-variant-numeric: tabular-nums; color: var(--ad-texte-doux); }
.ad-ar-liens li a { flex: 1; }
.ad-ar-liens li:target { background: var(--ad-fond-alt); }
.ad-ar-section { scroll-margin-top: 96px; }

/* 6. Téléphone : chaque ligne de tableau devient une fiche ---------------------------------------- */
@media (max-width: 560px) {
  .ad-ar-tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ad-ar-tableau, .ad-ar-tableau tbody, .ad-ar-tableau tr, .ad-ar-tableau th, .ad-ar-tableau td { display: block; }
  .ad-ar-tableau tr { padding: 14px 0; border-top: 1px solid var(--ad-filet); }
  .ad-ar-tableau tbody tr:last-child { border-bottom: 1px solid var(--ad-filet); }
  .ad-ar-tableau th, .ad-ar-tableau td { padding: 0; border: 0 !important; }
  .ad-ar-tableau tbody th { font-size: var(--ad-t-texte); margin-bottom: 6px; }
  .ad-ar-tableau td + td { margin-top: 6px; }
  .ad-ar-tableau td::before { content: attr(data-label) " : "; font-weight: 600; color: var(--ad-texte-doux); }
  .ad-ar-tableau td:only-of-type::before { content: none; }
  .ad-ar-tableau tbody th:has(+ td:last-child:only-of-type) { margin-bottom: 4px; }
  .ad-ar-corps .ad-ar-appel .bouton { width: 100%; }
}
