/* =============================================================================
 * Editorial theme — gabarits Article + Hub (Catégorie).
 * Chargé UNIQUEMENT sur ces pages (block stylesheets_overide) → les sélecteurs
 * de balises (h2/p/table/blockquote/a) sont scopés sous .ar-ed-body et ne
 * fuient pas sur le reste du site.
 *
 * Direction plate "de-sloppée" (maquettes v3) — règles dures :
 *   AUCUN dégradé · AUCUNE box-shadow · hairlines 1px · arrondis 4px max ·
 *   pas de liseré coloré de carte · pas de barre d'accent à gauche des H2.
 * Palette = valeurs exactes des maquettes. #1FB25A == --color-brand-500 du DS.
 * ========================================================================== */
:root {
  --ed-brand:   #1FB25A;
  --ed-brand-d: #0C5C2E;
  --ed-gold:    #C9A227;
  --ed-gold-d:  #9A6E12;
  --ed-ink:     #14181C;
  --ed-muted:   #6E7278;
  --ed-faint:   #9AA1A9;
  --ed-line:    #E4E1D8;
  --ed-bg:      #FCFBF7;
  --ed-paper:   #F3EFE4;
  --ed-body:    #2C3238;
  --ed-body-2:  #3A3B33;
  --ed-answer:  #4A4E54;
}

/* Fond crème + encre + Inter, uniquement sur les pages éditoriales (classe body). */
body.ar-editorial-page { background: var(--ed-bg); color: var(--ed-ink); font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
body.ar-editorial-page #main.main-content { background: transparent; }

/* ---------- Colonnes ---------- */
.ar-editorial { color: var(--ed-ink); font-family: 'Inter', sans-serif; }
.ar-ed-col  { max-width: 760px;  margin: 0 auto; padding: 0 24px 72px; }   /* colonne de lecture */
.ar-ed-wide { max-width: 1000px; margin: 0 auto; padding: 0 28px 0; }      /* hub : grille large */

/* ---------- Breadcrumb visuel ---------- */
.ar-ed-crumb { font-size: 13px; color: var(--ed-muted); padding: 26px 0 0; }
.ar-ed-crumb a { color: var(--ed-muted); text-decoration: none; }
.ar-ed-crumb a:hover { text-decoration: underline; }
.ar-ed-crumb .sep { padding: 0 7px; color: var(--ed-faint); }
.ar-ed-crumb .cur { color: var(--ed-ink); }

/* ---------- Hero illustré ---------- */
.ar-ed-hero { display: block; width: 100%; height: 250px; object-fit: cover; border-radius: 4px; margin-top: 20px; background: var(--ed-paper); }

/* ---------- Kicker · H1 · lead · byline ---------- */
.ar-ed-kick { font-size: 13px; font-weight: 600; color: var(--ed-muted); margin: 34px 0 10px; }
.ar-ed-kick b { color: var(--ed-brand-d); font-weight: 700; }
.ar-editorial h1 { font-size: 43px; line-height: 1.08; letter-spacing: -1.6px; font-weight: 800; margin: 0 0 20px; color: var(--ed-ink); }
.ar-ed-lead { font-size: 20px; line-height: 1.6; color: var(--ed-body); font-weight: 500; margin: 0 0 18px; }

.ar-ed-by { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ed-muted); padding-bottom: 26px; border-bottom: 1px solid var(--ed-line); margin-bottom: 6px; }
.ar-ed-by__in { width: 30px; height: 30px; border-radius: 50%; background: var(--ed-brand-d); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ar-ed-by b { color: var(--ed-ink); font-weight: 600; }
.ar-ed-by .sep { color: var(--ed-faint); }
.ar-ed-by a { color: inherit; text-decoration: none; }
.ar-ed-by a:hover b { text-decoration: underline; }

/* ---------- CORPS auto-stylé (HTML issu du BO) ---------- */
.ar-ed-body p { font-size: 17.5px; line-height: 1.74; color: var(--ed-body); margin: 0 0 18px; }
.ar-ed-body--article > p:first-of-type { font-size: 20px; line-height: 1.6; font-weight: 500; }   /* 1er p = chapô */
.ar-ed-body h2 { font-size: 29px; font-weight: 800; letter-spacing: -0.8px; margin: 46px 0 6px; color: var(--ed-ink); scroll-margin-top: 88px; }
.ar-ed-body h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; margin: 32px 0 6px; color: var(--ed-ink); }
.ar-ed-body a { color: var(--ed-brand-d); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.ar-ed-body strong { font-weight: 700; color: var(--ed-ink); }
.ar-ed-body em { font-style: italic; }
.ar-ed-body ul { margin: 0 0 18px; padding-left: 22px; }
.ar-ed-body li { font-size: 17.5px; line-height: 1.7; color: var(--ed-body); margin-bottom: 8px; }

/* tableaux : en-tête vert plein, lignes à hairlines, dernière colonne gras vert */
.ar-ed-body table { width: 100%; border-collapse: collapse; margin: 16px 0 6px; font-size: 15.5px; }
.ar-ed-body thead th { background: var(--ed-brand-d); color: #fff; font-weight: 600; text-align: left; padding: 13px 16px; font-size: 14px; }
.ar-ed-body tbody td { padding: 13px 16px; border-bottom: 1px solid var(--ed-line); }
.ar-ed-body tbody td:first-child { font-weight: 600; }
.ar-ed-body tbody td:last-child { font-weight: 700; color: var(--ed-brand-d); }

/* blockquote → encadré "À retenir" (filet doré gauche + label) — LE fix demandé.
   Le label est ajouté en ::before (le BO ne peut pas produire le libellé lui-même). */
.ar-ed-body blockquote { border-left: 3px solid var(--ed-gold); padding: 6px 0 6px 20px; margin: 30px 0; }
.ar-ed-body blockquote::before { content: "À retenir"; display: block; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ed-gold-d); margin-bottom: 7px; }
.ar-ed-body blockquote p { font-size: 16.5px; line-height: 1.6; color: var(--ed-body-2); font-weight: 400; margin: 0; }

/* ---------- Chiffres-clés (bandeau à filets — PAS de cards, PAS de liserés) ----------
   Rendu entre le chapô et le corps quand `article.key_facts` (BO) est rempli.
   Réf. maquette v3 / REFERENCE-css-gabarits.html (.facts / .fact). */
.ar-ed-facts { display: flex; border-top: 1px solid var(--ed-ink); border-bottom: 1px solid var(--ed-line); margin: 0 0 38px; }
.ar-ed-fact { flex: 1; padding: 18px 4px 20px; }
.ar-ed-fact + .ar-ed-fact { border-left: 1px solid var(--ed-line); padding-left: 22px; }
.ar-ed-fact__n { font-size: 32px; font-weight: 800; letter-spacing: -1.2px; color: var(--ed-ink); }
.ar-ed-fact__l { font-size: 13px; color: var(--ed-muted); margin-top: 6px; line-height: 1.4; }
@media (max-width: 560px) {
  .ar-ed-facts { flex-direction: column; }
  .ar-ed-fact + .ar-ed-fact { border-left: none; border-top: 1px solid var(--ed-line); padding-left: 4px; }
}

/* ---------- CTA (plat, sans dégradé ni ombre) ---------- */
.ar-ed-cta { background: var(--ed-brand-d); color: #fff; border-radius: 6px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 36px 0; }
.ar-ed-cta__h { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 4px; }
.ar-ed-cta__s { font-size: 15px; opacity: 0.9; }
.ar-ed-cta__btn { flex-shrink: 0; border: 1.5px solid rgba(255,255,255,0.5); color: #fff; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 5px; text-decoration: none; white-space: nowrap; }
.ar-ed-cta__btn:hover { border-color: #fff; }
@media (max-width: 560px) { .ar-ed-cta { flex-direction: column; align-items: flex-start; } }

/* ---------- FAQ (accordéon natif à filets, pas de boîtes) ---------- */
.ar-ed-faqh { font-size: 29px; font-weight: 800; letter-spacing: -0.8px; margin: 46px 0 6px; color: var(--ed-ink); }
.ar-ed-faq { border-top: 1px solid var(--ed-line); margin-top: 14px; }
.ar-ed-qa { border-bottom: 1px solid var(--ed-line); padding: 20px 2px; }
.ar-ed-qa > summary { font-weight: 700; font-size: 17px; color: var(--ed-ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; list-style: none; }
.ar-ed-qa > summary::-webkit-details-marker { display: none; }
.ar-ed-qa > summary::after { content: "+"; color: var(--ed-muted); font-size: 22px; font-weight: 400; line-height: 1; }
.ar-ed-qa[open] > summary::after { content: "\2013"; }
.ar-ed-qa__a { font-size: 16px; color: var(--ed-answer); line-height: 1.62; margin-top: 10px; }

/* ---------- HUB : sommaire ancré ("DANS CE GUIDE") ---------- */
.ar-ed-toc { border-top: 1px solid var(--ed-ink); border-bottom: 1px solid var(--ed-line); margin: 26px 0 0; padding: 16px 0; }
.ar-ed-toc__t { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ed-muted); margin-bottom: 10px; }
.ar-ed-toc a { display: inline-block; color: var(--ed-brand-d); text-decoration: none; font-size: 15px; font-weight: 600; margin: 5px 26px 5px 0; }
.ar-ed-toc a:hover { text-decoration: underline; }

/* ---------- HUB : header de section + grille de cartes (borderless) ---------- */
.ar-ed-sech { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 42px 0 22px; }
.ar-ed-sech h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.7px; color: var(--ed-ink); }
.ar-ed-sech .cnt { font-size: 13px; color: var(--ed-muted); font-weight: 600; white-space: nowrap; }
.ar-ed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px; }
.ar-ed-gc { text-decoration: none; color: inherit; display: block; }
.ar-ed-gc__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; display: block; background: var(--ed-paper); }
.ar-ed-gc__ph { width: 100%; aspect-ratio: 16 / 10; border-radius: 4px; display: block; background: var(--ed-paper); }
.ar-ed-gc__tag { font-size: 12px; font-weight: 600; color: var(--ed-gold-d); margin: 12px 0 4px; }
.ar-ed-gc__t { font-weight: 800; font-size: 17px; line-height: 1.25; letter-spacing: -0.3px; margin-bottom: 5px; color: var(--ed-ink); }
.ar-ed-gc:hover .ar-ed-gc__t { text-decoration: underline; }
.ar-ed-gc__d { font-size: 13.5px; color: var(--ed-muted); line-height: 1.45; margin-bottom: 7px; }
.ar-ed-gc__m { font-size: 12px; color: var(--ed-faint); font-weight: 600; }
@media (max-width: 800px) { .ar-ed-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ar-ed-grid { grid-template-columns: 1fr; } }

/* séparateur grille / corps pilier */
.ar-ed-div { border-top: 1px solid var(--ed-line); margin: 48px 0 0; }

/* ---------- "Pour aller plus loin" (article, cartes borderless) ---------- */
.ar-ed-more { margin-top: 8px; }
.ar-ed-more__h { font-size: 26px; font-weight: 800; letter-spacing: -0.7px; margin: 46px 0 22px; color: var(--ed-ink); }

/* Responsive H1 */
@media (max-width: 640px) { .ar-editorial h1 { font-size: 32px; letter-spacing: -1px; } }

/* ---------- Encart auteur (E-E-A-T, guides) — hairline, sans ombre ---------- */
.ar-ed-authorbox { display: flex; gap: 14px; align-items: flex-start; border-top: 1px solid var(--ed-line); margin-top: 44px; padding-top: 22px; }
.ar-ed-authorbox .ar-ed-by__in { width: 38px; height: 38px; font-size: 14px; flex-shrink: 0; }
.ar-ed-authorbox p { font-size: 15px; line-height: 1.6; color: var(--ed-body); margin: 0 0 6px; }
.ar-ed-authorbox a { color: var(--ed-brand-d); text-decoration: none; font-weight: 600; }
.ar-ed-authorbox a:hover { text-decoration: underline; }

/* ---------- HUB : colonne large (grille) + colonne étroite (lecture) ---------- */
.ar-editorial--hub .ar-ed-hubhead,
.ar-editorial--hub .ar-ed-body,
.ar-editorial--hub .ar-ed-faqh,
.ar-editorial--hub .ar-ed-faq { max-width: 760px; }
.ar-editorial--hub .ar-ed-hero { height: 300px; }
.ar-editorial--hub .navigation { max-width: 760px; margin-top: 24px; }

/* ---------- Neutralisation des bleeds legacy (index.css) ---------- */
/* h2:after global = barre d'accent 1px sous chaque h2 → INTERDITE dans cette DA
   (hiérarchie par la typo). On la retire sur tous les h2 du thème éditorial. */
.ar-editorial h2::after,
.ar-editorial h2:after { content: none; display: none; }
/* Listes ordonnées : même rythme que les <ul>. */
.ar-ed-body ol { margin: 0 0 18px; padding-left: 22px; }
