/* ============================================================
   DN Exposer LLC — article.css v3
   Chargee par private/views/public/article.php uniquement,
   apres main.css et pages.css.

   Le gabarit d'article ne pose pas de .container : c'est
   .article-page qui porte la largeur de lecture et les marges
   laterales. Tout le reste suit la grammaire du site : titres
   en DM Serif Display, texte en DM Sans, filet rose sur les
   elements qui demandent une pause, teal pour les liens
   internes.

   v3 : sommaire des piliers a droite, sous-liste des H3,
   sommaire du fil masque quand la colonne est visible, icone
   plus / croix dessinee dans la pastille de la FAQ.
   ============================================================ */


/* ══════════════════════════════════════════════════════════════
   1. BARRE DE PROGRESSION ET BANDEAU DE BROUILLON
   ══════════════════════════════════════════════════════════════ */

/* Posee sous l'en-tete fixe, pas en haut de l'ecran : au-dessus,
   elle serait masquee par la barre de navigation. */
.reading-progress{
  position:fixed;top:var(--nav-h);left:0;right:0;z-index:999;
  height:3px;background:transparent;pointer-events:none;
}
.reading-progress__bar{
  display:block;height:100%;width:0;
  background:linear-gradient(90deg,var(--rose),var(--teal));
  transition:width .1s linear;
}

.preview-banner{
  max-width:var(--max-w);margin:24px auto 0;
  padding:14px 22px;
  background:#FFF8E6;border-left:4px solid #B45309;
  border-radius:0 var(--r-sm) var(--r-sm) 0;
  font-size:.9rem;color:#7A4A00;line-height:1.65;
}
.preview-banner strong{color:#7A4A00}


/* ══════════════════════════════════════════════════════════════
   2. EN-TETE DE L'ARTICLE
   ══════════════════════════════════════════════════════════════ */

.article-page{max-width:var(--max-w);margin:0 auto;padding:0 32px}

.article-header{max-width:820px;padding:32px 0 40px}

.article-category{
  display:inline-block;margin-bottom:20px;
  padding:5px 16px;
  font-size:.66rem;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;
  color:var(--teal);background:var(--teal-light);
  border-radius:var(--r-pill);
  transition:background var(--tr),color var(--tr);
}
.article-category:hover{background:var(--teal);color:#fff}

.article-title{
  font-family:var(--f-display);font-weight:400;
  font-size:clamp(2rem,4.5vw,3.2rem);
  line-height:1.12;color:var(--slate);margin-bottom:24px;
}

.article-standfirst{
  font-size:1.15rem;color:var(--slate);
  line-height:1.75;margin-bottom:28px;
  padding-left:20px;border-left:3px solid var(--rose);
}

/* ── Ligne de signature ────────────────────────────────────── */
.article-meta{
  display:flex;align-items:center;flex-wrap:wrap;gap:12px 20px;
  padding-top:20px;border-top:1px solid var(--border);
  font-size:.82rem;color:var(--muted);
}
.article-meta__author{display:flex;align-items:center;gap:12px}
.article-meta__avatar{
  width:40px;height:40px;flex-shrink:0;
  border-radius:50%;object-fit:cover;object-position:top center;
  border:2px solid var(--border);
}
.article-meta__author a{color:var(--slate);font-weight:600;transition:color var(--tr)}
.article-meta__author a:hover{color:var(--rose)}
.article-meta__expertise{display:block;font-size:.74rem;color:var(--light)}

.article-meta__date,
.article-meta__updated,
.article-meta__reading{display:inline-flex;align-items:center;gap:6px}
.article-meta__updated{color:var(--teal);font-weight:600}
.article-meta__reading{color:var(--light);font-style:italic}

.article-badge{
  display:inline-block;padding:4px 14px;
  font-size:.62rem;font-weight:700;letter-spacing:1px;text-transform:uppercase;
  color:var(--muted);background:var(--cream-mid);
  border-radius:var(--r-pill);
}
.article-badge--pillar{color:#fff;background:var(--rose)}


/* ══════════════════════════════════════════════════════════════
   3. IMAGE DE COUVERTURE
   ══════════════════════════════════════════════════════════════ */

.article-cover{
  margin:0 0 48px;
  border-radius:var(--r-xl);overflow:hidden;
  box-shadow:var(--sh-lg);
}
.article-cover__img{
  width:100%;height:auto;max-height:520px;
  object-fit:cover;display:block;
}
.article-cover__caption{
  padding:12px 20px;
  font-size:.78rem;color:var(--muted);
  text-align:center;font-style:italic;
  background:var(--cream-mid);
}
.article-cover__credit{color:var(--light)}
.article-cover__credit a{text-decoration:underline;text-underline-offset:2px}
.article-cover__credit a:hover{color:var(--rose)}


/* ══════════════════════════════════════════════════════════════
   4. MISE EN PAGE : CORPS + COLONNE LATERALE
   ══════════════════════════════════════════════════════════════ */

.article-layout{
  display:grid;grid-template-columns:minmax(0,1fr) 320px;
  gap:56px;align-items:start;
  padding-bottom:80px;
}
.article-main{min-width:0;max-width:760px}

.article-aside{position:sticky;top:calc(var(--nav-h) + 32px)}

/* Sur un pilier, la colonne de droite porte le sommaire a la
   place de l'appel a l'action. Elle reste a droite, comme sur
   les autres articles : le texte garde la meme position d'une
   page a l'autre et le sommaire suit la lecture a cote. */
.article-layout--pillar{grid-template-columns:minmax(0,1fr) 280px}


/* ══════════════════════════════════════════════════════════════
   5. SOMMAIRE
   ══════════════════════════════════════════════════════════════ */

/* Classe de base, commune aux deux variantes. */
.toc{font-family:var(--f-body)}
.toc__item{margin:0}

/* ── Variante repliable, dans le fil du texte ──────────────── */
.toc--inline{
  margin:0 0 40px;
  background:var(--cream-mid);
  border-radius:var(--r-lg);
  padding:20px 24px;
}
.toc__summary{
  cursor:pointer;list-style:none;
  display:flex;align-items:center;justify-content:space-between;
  font-family:var(--f-body);font-size:.72rem;font-weight:700;
  letter-spacing:2px;text-transform:uppercase;color:var(--muted);
}
.toc__summary::-webkit-details-marker{display:none}
.toc__summary::after{
  content:'';width:7px;height:7px;flex-shrink:0;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
  transition:transform var(--tr);
}
.toc--inline[open] .toc__summary{margin-bottom:14px}
.toc--inline[open] .toc__summary::after{transform:rotate(225deg) translateY(-2px)}

/* Quand la colonne laterale est visible, le sommaire du fil
   ferait doublon : il ne sert que sous 900px (voir section 11). */
.article-layout--pillar .toc--inline{display:none}

/* ── Variante colonne, collante ────────────────────────────── */
.toc--sidebar{
  background:var(--white);border:1px solid var(--border);
  border-radius:var(--r-lg);padding:24px 20px;
  box-shadow:var(--sh-xs);
  max-height:calc(100vh - var(--nav-h) - 80px);
  overflow-y:auto;overscroll-behavior:contain;
}
.toc__title{
  font-size:.66rem;font-weight:700;letter-spacing:2px;text-transform:uppercase;
  color:var(--muted);margin-bottom:14px;
}

/* Jauge de lecture propre au sommaire lateral */
.toc__progress{height:3px;background:var(--border);border-radius:2px;overflow:hidden;margin-bottom:16px}
.toc__progress-bar{display:block;height:100%;width:0;background:var(--rose);transition:width .15s linear}

.toc__list{display:flex;flex-direction:column;gap:2px;list-style:none;margin:0;padding:0}
/* Les H3 sont rendus dans une sous-liste de leur H2 */
.toc__list--nested{margin-top:2px}
.toc__link{
  display:block;padding:7px 10px;
  font-size:.8rem;line-height:1.45;color:var(--muted);
  border-left:2px solid transparent;border-radius:var(--r-xs);
  transition:background var(--tr),color var(--tr),border-color var(--tr);
}
.toc__link:hover,
.toc__link.is-active{color:var(--rose);background:var(--rose-light);border-left-color:var(--rose)}
/* H2 dont un H3 est en cours de lecture */
.toc__link.is-parent-active{color:var(--slate)}
.toc__link:focus-visible{outline:2px solid var(--rose);outline-offset:2px}
.toc__item--level-3 .toc__link{padding-left:24px;font-size:.76rem}


/* ══════════════════════════════════════════════════════════════
   6. CORPS DE L'ARTICLE
   Le corps est du HTML sans classes, ecrit en back-office :
   tout est style par descendance depuis .article-body.
   ══════════════════════════════════════════════════════════════ */

.article-pillar-link{
  margin-bottom:28px;padding:12px 18px;
  background:var(--teal-light);border-radius:var(--r-sm);
  font-size:.86rem;color:var(--muted);
}
.article-pillar-link a{color:var(--teal);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.article-pillar-link a:hover{color:var(--rose)}

.article-body{font-size:1.02rem;color:var(--text);line-height:1.85}

.article-body h2{
  font-family:var(--f-display);font-weight:400;
  font-size:clamp(1.5rem,2.8vw,2rem);color:var(--slate);
  line-height:1.2;
  margin:56px 0 20px;padding-bottom:14px;
  border-bottom:1px solid var(--border);
  scroll-margin-top:calc(var(--nav-h) + 24px);
}
.article-body h2:first-child{margin-top:0}
.article-body h3{
  font-family:var(--f-display);font-weight:400;
  font-size:1.25rem;color:var(--slate);
  margin:36px 0 14px;line-height:1.25;
  scroll-margin-top:calc(var(--nav-h) + 24px);
}
.article-body h4{font-size:1.05rem;margin:28px 0 10px}

.article-body p{margin-bottom:20px}

.article-body ul,
.article-body ol{margin:0 0 24px 4px;display:flex;flex-direction:column;gap:10px}
.article-body li{
  position:relative;padding-left:24px;
  font-size:.98rem;line-height:1.75;
}
.article-body ul > li::before{
  content:'';position:absolute;left:4px;top:11px;
  width:7px;height:7px;border-radius:50%;background:var(--rose);
}
.article-body ol{counter-reset:abody}
.article-body ol > li{counter-increment:abody}
.article-body ol > li::before{
  content:counter(abody) '.';position:absolute;left:0;top:0;
  font-weight:700;color:var(--rose);
}

/* Liens : teal pour l'interne, rose pour l'externe. La
   distinction est volontaire, le lecteur sait s'il quitte
   l'article avant de cliquer. */
.article-body a{
  color:var(--teal);font-weight:500;
  text-decoration:underline;text-underline-offset:3px;
  text-decoration-color:rgba(42,157,143,.3);
  transition:color var(--tr),text-decoration-color var(--tr);
}
.article-body a:hover{text-decoration-color:var(--teal)}
.article-body a[target="_blank"]{color:var(--rose);text-decoration-color:rgba(229,52,91,.3)}
.article-body a[target="_blank"]:hover{text-decoration-color:var(--rose)}

.article-body strong{color:var(--slate);font-weight:600}

.article-body figure{margin:40px 0;border-radius:var(--r-xl);overflow:hidden;box-shadow:var(--sh-md)}
.article-body figure img{width:100%;height:auto;display:block}
.article-body figcaption{
  padding:12px 18px;
  font-size:.78rem;color:var(--muted);font-style:italic;
  background:var(--cream-mid);text-align:center;
}
.article-body > img{margin:36px 0;border-radius:var(--r-lg);width:100%;height:auto}

.article-body blockquote{
  margin:32px 0;padding:20px 26px;
  border-left:4px solid var(--rose);
  background:var(--rose-light);
  border-radius:0 var(--r-sm) var(--r-sm) 0;
  font-family:var(--f-display);font-size:1.08rem;font-style:italic;
  color:var(--slate);line-height:1.6;
}
.article-body blockquote p:last-child{margin-bottom:0}

/* Un tableau large defile dans son propre cadre : sans cela,
   c'est la page entiere qui defile lateralement sur telephone. */
.article-body table{
  width:100%;border-collapse:collapse;
  margin:32px 0;font-size:.9rem;
  background:var(--white);
  border-radius:var(--r-lg);overflow:hidden;
  box-shadow:var(--sh-sm);display:block;overflow-x:auto;
}
.article-body thead tr{background:var(--slate)}
.article-body th{
  padding:14px 18px;text-align:left;white-space:nowrap;
  font-family:var(--f-body);font-size:.74rem;font-weight:600;
  letter-spacing:.5px;text-transform:uppercase;
  color:rgba(255,255,255,.85);
}
.article-body td{padding:14px 18px;color:var(--text);vertical-align:top;line-height:1.6}
.article-body tbody tr{border-bottom:1px solid var(--border)}
.article-body tbody tr:last-child{border-bottom:none}
.article-body tbody tr:hover{background:var(--cream)}
.article-body tbody td:first-child{font-weight:600;color:var(--slate)}

.article-body code{
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:.86em;padding:2px 6px;
  background:var(--cream-mid);border-radius:4px;
}
.article-body hr{border:none;border-top:1px solid var(--border);margin:44px 0}


/* ══════════════════════════════════════════════════════════════
   7. CLUSTERS, FAQ, POLITIQUE EDITORIALE
   ══════════════════════════════════════════════════════════════ */

.article-clusters{
  margin:56px 0 0;padding:36px 32px;
  background:var(--cream-mid);border-radius:var(--r-xl);
}
.article-clusters h2{font-size:1.4rem;margin-bottom:22px}

.cluster-list{display:flex;flex-direction:column;gap:2px}
.cluster-item{
  padding:16px 18px;border-radius:var(--r-md);
  transition:background var(--tr);
}
.cluster-item:hover{background:var(--white)}
.cluster-item > a{
  display:block;
  font-family:var(--f-display);font-size:1.05rem;
  color:var(--slate);line-height:1.35;margin-bottom:5px;
  transition:color var(--tr);
}
.cluster-item:hover > a{color:var(--rose)}
.cluster-item__excerpt{display:block;font-size:.85rem;color:var(--muted);line-height:1.6}

/* ── FAQ ───────────────────────────────────────────────────
   Balise <details> : le style d'ouverture vient du navigateur,
   la mise en forme est ici. Le marqueur natif est remplace par
   une pastille portant un plus, qui pivote en croix a
   l'ouverture. Le plus est dessine par deux degrades dans le
   fond du pseudo-element : aucun balisage ajoute au gabarit. */
.article-faq{margin:56px 0 0}
.article-faq h2{font-size:1.4rem;margin-bottom:22px}

.article-faq .faq-item{
  background:var(--white);border:1px solid var(--border);
  border-radius:var(--r-lg);margin-bottom:12px;
  box-shadow:var(--sh-xs);overflow:hidden;
  transition:border-color var(--tr-md),box-shadow var(--tr-md);
}
.article-faq .faq-item:hover{border-color:var(--rose);box-shadow:var(--sh-sm)}
.article-faq .faq-item[open]{border-color:var(--rose)}

.faq-question{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:20px 26px;cursor:pointer;list-style:none;
  font-family:var(--f-display);font-size:1.05rem;
  color:var(--slate);line-height:1.35;
  transition:background var(--tr);
}
.faq-question::-webkit-details-marker{display:none}
.faq-question::marker{content:''}
.faq-question:hover{background:var(--cream)}
.faq-question:focus-visible{outline:2px solid var(--rose);outline-offset:-2px}
.faq-question::after{
  content:'';flex-shrink:0;
  width:28px;height:28px;border-radius:50%;
  color:var(--slate);
  background:
    linear-gradient(currentColor,currentColor) center / 10px 2px no-repeat,
    linear-gradient(currentColor,currentColor) center / 2px 10px no-repeat,
    var(--cream-mid);
  transition:background-color var(--tr-md),color var(--tr-md),transform var(--tr-md);
}
.faq-question:hover::after{color:var(--rose)}
.faq-item[open] .faq-question::after{
  color:#fff;background-color:var(--rose);
  transform:rotate(45deg);
}

.faq-answer{
  padding:0 26px 22px;
  font-size:.94rem;color:var(--muted);line-height:1.8;
}
.faq-answer a{color:var(--teal);text-decoration:underline;text-underline-offset:3px}

.article-policy{
  margin-top:48px;padding:18px 22px;
  background:var(--cream-mid);border-radius:var(--r-md);
  font-size:.82rem;color:var(--muted);line-height:1.7;
}
.article-policy a{color:var(--teal);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.article-policy a:hover{color:var(--rose)}


/* ══════════════════════════════════════════════════════════════
   8. PARTAGE
   ══════════════════════════════════════════════════════════════ */

.share{
  display:flex;align-items:center;flex-wrap:wrap;gap:10px;
  margin-top:40px;padding-top:28px;
  border-top:1px solid var(--border);
}
.share__label{
  font-size:.66rem;font-weight:700;letter-spacing:2px;text-transform:uppercase;
  color:var(--light);margin-right:6px;
}
.share__link{
  display:flex;align-items:center;justify-content:center;
  width:44px;height:44px;border-radius:50%;
  color:var(--muted);background:var(--cream-mid);
  border:1.5px solid transparent;cursor:pointer;
  transition:transform var(--tr-md),background var(--tr-md),color var(--tr-md),box-shadow var(--tr-md);
}
.share__link:hover{transform:translateY(-2px);box-shadow:var(--sh-sm)}
.share__link--linkedin:hover{background:#0A66C2;color:#fff}
.share__link--x:hover{background:#0f1419;color:#fff}
.share__link--facebook:hover{background:#1877F2;color:#fff}
.share__link--mail:hover{background:var(--teal);color:#fff}

.share__copy{position:relative;border-color:var(--border)}
.share__copy:hover{background:var(--teal);color:#fff;border-color:var(--teal)}
.share__copy-icon{display:flex}
.share__copy-icon--check{display:none}
.share__copy.is-copied{background:var(--teal);color:#fff;border-color:var(--teal)}
.share__copy.is-copied .share__copy-icon--link{display:none}
.share__copy.is-copied .share__copy-icon--check{display:flex}

/* La confirmation sort du bouton, sinon elle en deforme le
   cercle au moment ou elle apparait. */
.share__copy-feedback{
  position:absolute;bottom:calc(100% + 8px);left:50%;
  transform:translateX(-50%);
  padding:4px 10px;border-radius:var(--r-xs);
  background:var(--slate);color:#fff;
  font-size:.7rem;font-weight:600;white-space:nowrap;
  opacity:0;transition:opacity var(--tr);
  pointer-events:none;
}
.share__copy-feedback:not(:empty){opacity:1}


/* ══════════════════════════════════════════════════════════════
   9. ENCART AUTEUR
   ══════════════════════════════════════════════════════════════ */

.author-box{
  display:flex;align-items:flex-start;gap:24px;
  margin-top:40px;padding:32px 34px;
  background:var(--white);border-radius:var(--r-xl);
  box-shadow:var(--sh-sm);
}
.author-box__avatar{
  width:96px;height:96px;flex-shrink:0;
  border-radius:50%;object-fit:cover;object-position:top center;
  border:3px solid var(--cream);box-shadow:var(--sh-xs);
}
.author-box__content{min-width:0}
.author-box__kicker{
  font-size:.64rem;font-weight:700;letter-spacing:2px;text-transform:uppercase;
  color:var(--light);margin-bottom:4px;
}
.author-box__name{font-family:var(--f-display);font-size:1.25rem;color:var(--slate);margin-bottom:4px}
.author-box__name a{transition:color var(--tr)}
.author-box__name a:hover{color:var(--rose)}
.author-box__expertise{
  font-size:.72rem;font-weight:700;letter-spacing:1px;text-transform:uppercase;
  color:var(--rose);margin-bottom:12px;
}
.author-box__bio{font-size:.9rem;color:var(--muted);line-height:1.7;margin-bottom:14px}
.author-box__links{display:flex;flex-wrap:wrap;gap:8px 20px}
.author-box__links a{
  font-size:.84rem;font-weight:600;color:var(--teal);
  transition:color var(--tr);
}
.author-box__links a:hover{color:var(--rose)}


/* ══════════════════════════════════════════════════════════════
   10. APERCU BACK-OFFICE
   Le fragment article-preview est rendu dans la fenetre modale
   de l'editeur, qui charge admin.css. Ces deux regles ne
   servent que si l'apercu est ouvert dans un onglet du site.
   ══════════════════════════════════════════════════════════════ */

.adm-preview{max-width:760px;margin:0 auto}
.adm-preview__toc{
  margin:0 0 28px;padding:14px 18px;
  background:var(--cream-mid);border-radius:var(--r-sm);font-size:.9rem;
}


/* ══════════════════════════════════════════════════════════════
   11. RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media(max-width:1080px){
  .article-layout{grid-template-columns:minmax(0,1fr) 280px;gap:40px}
  .article-layout--pillar{grid-template-columns:minmax(0,1fr) 240px}
}

@media(max-width:900px){
  /* En dessous de cette largeur, la colonne laterale passe sous
     le texte. Un sommaire de 200px de large coupe une entree
     sur deux, et un appel a l'action y devient illisible. */
  .article-layout,
  .article-layout--pillar{grid-template-columns:1fr;gap:0}
  .article-main{max-width:none}
  .article-aside{position:static;margin-top:48px}

  /* Pilier : le sommaire repliable en tete d'article prend le
     relais, la colonne laterale n'a plus rien a ajouter. */
  .article-layout--pillar .toc--inline{display:block}
  .article-layout--pillar .article-aside--toc{display:none}
}

@media(max-width:768px){
  .article-page{padding:0 20px}
  .article-header{padding:24px 0 32px}
  .article-standfirst{font-size:1.05rem;padding-left:16px}
  .article-meta{gap:10px 16px;font-size:.78rem}
  .article-cover{margin-bottom:32px;border-radius:var(--r-lg)}
  .article-layout{padding-bottom:56px}

  .article-body{font-size:.98rem}
  .article-body h2{font-size:1.35rem;margin-top:40px}
  .article-body h3{font-size:1.15rem;margin-top:28px}
  .article-body figure{border-radius:var(--r-lg)}

  .article-clusters{padding:28px 22px;margin-top:40px}
  .article-faq{margin-top:40px}
  .faq-question{padding:16px 20px;font-size:.98rem}
  .faq-answer{padding:0 20px 18px}

  .author-box{flex-direction:column;align-items:center;text-align:center;padding:28px 22px}
  .author-box__bio{text-align:left}
  .author-box__links{justify-content:center}

  .preview-banner{margin:16px 20px 0}
  .share{gap:8px}
  .share__link{width:40px;height:40px}
}

@media(max-width:480px){
  .article-page{padding:0 16px}
}

@media(prefers-reduced-motion:reduce){
  .reading-progress__bar,
  .toc__progress-bar,
  .faq-question::after{transition:none}
}