/* Page article v2 (2026-10-15) — app/Views/public/article-detail.php.
   Structure inspirée d'IT-Connect (fil d'Ariane, image, rubrique, titre souligné,
   méta, chapeau, sommaire dans le texte, sections soulignées, auteur, partage,
   précédent/suivant, « Vous pourrez aussi aimer », colonne latérale), sans newsletter.
   Suit les jetons du site (site-pro.css / site-v3.css). */

body.ng-site:not(.ng-admin) .art {
  --art-line: var(--pro-line, rgba(127,127,127,.16));
  --art-accent: var(--ng-accent, #2f4cf0);
  padding-top: clamp(112px, 12vw, 150px);
  padding-bottom: clamp(70px, 9vw, 110px);
}

/* Barre de progression de lecture */
.art-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.art-progress span { display: block; height: 100%; width: 100%; background: var(--ng-accent, #2f4cf0); transform-origin: 0 50%; transform: scaleX(0); }

/* Fil d'Ariane */
.art-crumbs { margin-bottom: 22px; }
.art-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--ng-t50); }
.art-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.art-crumbs li + li::before { content: "›"; margin: 0 9px; color: var(--ng-t35); }
.art-crumbs a { color: var(--ng-t55); text-decoration: none; transition: color .2s; }
.art-crumbs a:hover { color: var(--ng-heading); text-decoration: underline; text-underline-offset: 3px; }
.art-crumbs [aria-current] span { color: var(--ng-t45); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Deux colonnes : article + colonne latérale */
.art-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 1100px) { .art-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; } }
.art-main { min-width: 0; max-width: 50rem; }

/* Image en tête */
.art-cover { margin: 0 0 28px; }
.art-cover img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: clamp(12px, 1.6vw, 18px); box-shadow: 0 0 0 1px var(--art-line); background: var(--ng-inner); }

/* En-tête : rubrique, titre souligné, méta, chapeau */
.art-head { margin-bottom: 32px; }
.art-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.art-rubrique { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--art-accent); text-decoration: none; }
.art-rubrique:hover { text-decoration: underline; text-underline-offset: 3px; }
.art-badge { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; }
.art-badge-type { color: #fff; }
body.ng-site:not(.ng-admin) .art .art-title { margin: 0; padding-bottom: 20px; border-bottom: 1px solid var(--art-line); font-size: clamp(28px, 4vw, 46px); line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; position: relative; }
body.ng-site:not(.ng-admin) .art .art-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 72px; height: 3px; border-radius: 3px; background: var(--art-accent); }
.art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 18px; font-size: 14px; color: var(--ng-t55); }
.art-meta-i { display: inline-flex; align-items: center; gap: 7px; }
.art-meta-i svg { width: 16px; height: 16px; opacity: .75; }
.art-meta-k { color: var(--ng-t50); }
.art-meta strong { color: var(--ng-heading); font-weight: 600; }
.art-author { display: inline-flex; align-items: center; gap: 9px; }
.art-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--art-line); }
.art-avatar-lg { width: 72px; height: 72px; }
.art-avatar-txt { display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--art-accent); }
.art-avatar-lg.art-avatar-txt { font-size: 22px; }
body.ng-site:not(.ng-admin) .art .art-lead { margin: 24px 0 0; font-size: clamp(16.5px, 1.4vw, 18.5px); line-height: 1.65; font-weight: 600; color: var(--ng-heading); text-wrap: pretty; }

/* Sommaire dans le texte */
.art-toc { margin: 28px 0 32px; padding: 20px 24px; border-radius: 14px; background: var(--ng-inner); box-shadow: 0 0 0 1px var(--art-line) inset; }
.art-toc-title { display: flex; align-items: center; gap: 9px; margin: 0 0 10px !important; font-size: 15px; font-weight: 700; color: var(--ng-heading); }
.art-toc-title svg { width: 17px; height: 17px; }
body.ng-site:not(.ng-admin) .art .art-toc-list { list-style: none; margin: 0; padding: 0; }
body.ng-site:not(.ng-admin) .art .art-toc-list li { margin: 0; padding: 0; }
body.ng-site:not(.ng-admin) .art .art-toc-list a { display: block; padding: 5px 0 5px 16px; position: relative; font-size: 15px; line-height: 1.45; color: var(--ng-t65); text-decoration: none; transition: color .2s; }
body.ng-site:not(.ng-admin) .art .art-toc-list a::before { content: ""; position: absolute; left: 2px; top: .95em; width: 6px; height: 6px; border-radius: 50%; background: var(--ng-t30); transition: background-color .2s; }
body.ng-site:not(.ng-admin) .art .art-toc-list .art-toc-l3 a { padding-left: 34px; font-size: 14px; }
body.ng-site:not(.ng-admin) .art .art-toc-list .art-toc-l3 a::before { left: 20px; width: 5px; height: 5px; background: transparent; box-shadow: 0 0 0 1px var(--ng-t30) inset; }
body.ng-site:not(.ng-admin) .art .art-toc-list a:hover { color: var(--art-accent); }
body.ng-site:not(.ng-admin) .art .art-toc-list a:hover::before { background: var(--art-accent); }
body.ng-site:not(.ng-admin) .art .art-toc-list a.is-active { color: var(--ng-heading); font-weight: 600; }
body.ng-site:not(.ng-admin) .art .art-toc-list a.is-active::before { background: var(--art-accent); }

/* Corps de l'article */
body.ng-site:not(.ng-admin) .art .art-body { font-size: clamp(16px, 1.1vw, 17.5px); line-height: 1.8; color: var(--ng-t75, var(--ng-text)); padding: 0; background: none; box-shadow: none; }
body.ng-site:not(.ng-admin) .art .art-body > :first-child { margin-top: 0; }
body.ng-site:not(.ng-admin) .art .art-body p { margin: 0 0 1.25em; }
body.ng-site:not(.ng-admin) .art .art-body :is(h2, h3, h4) { position: relative; color: var(--ng-heading); scroll-margin-top: 110px; text-wrap: balance; }
/* Sections soulignées */
body.ng-site:not(.ng-admin) .art .art-body h2 { margin: 2.3em 0 .9em; padding-bottom: .45em; border-bottom: 1px solid var(--art-line); font-size: clamp(22px, 2vw, 28px); line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
body.ng-site:not(.ng-admin) .art .art-body h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 48px; height: 2px; background: var(--art-accent); }
body.ng-site:not(.ng-admin) .art .art-body h3 { margin: 1.8em 0 .6em; font-size: clamp(18.5px, 1.5vw, 21px); line-height: 1.3; font-weight: 600; }
body.ng-site:not(.ng-admin) .art .art-body h4 { margin: 1.5em 0 .5em; font-size: 17px; font-weight: 600; }
.art-body .md-anchor { position: absolute; left: -1.1em; padding-right: .3em; color: var(--ng-t30); text-decoration: none !important; opacity: 0; transition: opacity .15s; font-weight: 400; }
.art-body :is(h2, h3):hover .md-anchor, .art-body .md-anchor:focus-visible { opacity: 1; }
body.ng-site:not(.ng-admin) .art .art-body h2::after { pointer-events: none; }
@media (max-width: 760px) { .art-body .md-anchor { display: none; } }
body.ng-site:not(.ng-admin) .art .art-body a:not(.md-anchor):not([data-toc-link]) { color: var(--art-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.ng-site:not(.ng-admin) .art .art-body a:not(.md-anchor):not([data-toc-link]):hover { text-decoration-thickness: 2px; }
body.ng-site:not(.ng-admin) .art .art-body strong { color: var(--ng-heading); font-weight: 600; }
body.ng-site:not(.ng-admin) .art .art-body :is(ul, ol):not(.art-toc-list) { margin: 0 0 1.3em; padding-left: 1.4em; }
body.ng-site:not(.ng-admin) .art .art-body ul:not(.art-toc-list) { list-style: disc; }
body.ng-site:not(.ng-admin) .art .art-body ol:not(.art-toc-list) { list-style: decimal; }
body.ng-site:not(.ng-admin) .art .art-body li { margin: .4em 0; padding-left: .2em; }
body.ng-site:not(.ng-admin) .art .art-body li > :is(ul, ol) { margin: .4em 0 .2em; }
body.ng-site:not(.ng-admin) .art .art-body li::marker { color: var(--ng-t40); }
body.ng-site:not(.ng-admin) .art .art-body ol > li::marker { font-weight: 600; color: var(--ng-t50); }
body.ng-site:not(.ng-admin) .art .art-body hr { margin: 2.6em auto; width: 80px; border: 0; border-top: 1px solid var(--art-line); }
body.ng-site:not(.ng-admin) .art .art-body blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.3em; border-left: 3px solid var(--art-accent); font-style: normal; font-size: 1.06em; color: var(--ng-heading); }
body.ng-site:not(.ng-admin) .art .art-body blockquote p:last-child { margin-bottom: 0; }

/* Code */
body.ng-site:not(.ng-admin) .art .art-body :not(pre) > code { font-size: .86em; padding: .16em .42em; border-radius: 6px; background: var(--ng-inner); box-shadow: 0 0 0 1px var(--art-line) inset; color: var(--ng-heading); }
body.ng-site:not(.ng-admin) .art .art-body pre.code-block { position: relative; margin: 1.6em 0; padding: 2.6rem 1.2rem 1.1rem; border: 0; border-radius: 14px; background: #0d1117; color: #e6edf3; box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset; font-size: 13.5px; line-height: 1.65; overflow-x: auto; tab-size: 4; }
body.ng-site:not(.ng-admin) .art .art-body pre.code-block code { color: inherit; background: none; padding: 0; box-shadow: none; font-size: inherit; }
body.ng-site:not(.ng-admin) .art .art-body pre.code-block::before { content: attr(data-lang); position: absolute; left: 1.1rem; top: .75rem; padding: 0; background: none; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(230,237,243,.5); }
body.ng-site:not(.ng-admin) .art .art-body pre.code-block:not([data-lang])::before { content: "code"; }
.art-body .tok-comment { color: #8b949e !important; font-style: italic; }
.art-body .tok-string { color: #a5d6ff !important; }
.art-body .tok-number { color: #79c0ff !important; }
.art-body .tok-keyword { color: #ff7b72 !important; font-weight: 500; }
.art-code-copy { position: absolute; top: .5rem; right: .55rem; padding: 4px 10px; border: 0; border-radius: 7px; background: rgba(255,255,255,.08); color: rgba(230,237,243,.8); font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.4; cursor: pointer; transition: background-color .2s, color .2s; }
.art-code-copy:hover { background: rgba(255,255,255,.16); color: #fff; }
.art-code-copy.is-done { background: rgba(46,160,67,.3); color: #fff; }

/* Images, tableaux, encadrés */
body.ng-site:not(.ng-admin) .art .art-body figure.article-figure { margin: 2em 0; }
body.ng-site:not(.ng-admin) .art .art-body :is(figure.article-figure img, p img) { display: block; max-width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--art-line); border: 0; cursor: zoom-in; }
body.ng-site:not(.ng-admin) .art .art-body figure.article-figure figcaption { margin-top: .7em; font-size: 13.5px; font-style: italic; text-align: center; color: var(--ng-t50); }
.art-body .md-table { margin: 1.6em 0; overflow-x: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--art-line) inset; }
.art-body .md-table table { width: 100%; border-collapse: collapse; font-size: .92em; line-height: 1.5; }
.art-body .md-table th { text-align: left; font-weight: 600; color: var(--ng-heading); background: var(--ng-inner); }
.art-body .md-table :is(th, td) { padding: .7em 1em; border-bottom: 1px solid var(--art-line); vertical-align: top; }
.art-body .md-table tr:last-child td { border-bottom: 0; }
.art-body .md-callout { --c: var(--art-accent); margin: 1.6em 0; padding: 1em 1.2em; border-radius: 12px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 7%, transparent); }
.art-body .md-callout-tip { --c: #16a34a; }
.art-body .md-callout-warning { --c: #d97706; }
.art-body .md-callout-important { --c: #9333ea; }
.art-body .md-callout > :last-child { margin-bottom: 0 !important; }
.art-body .md-callout-title { margin: 0 0 .35em !important; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--c); }

/* Visionneuse d'image */
.art-lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 4vmin; background: rgba(0,0,0,.86); cursor: zoom-out; opacity: 0; transition: opacity .2s; }
.art-lightbox.is-open { opacity: 1; }
.art-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* Pied de l'article : auteur, partage, précédent / suivant */
.art-foot { display: flex; flex-direction: column; gap: 24px; margin-top: 52px; padding-top: 32px; border-top: 1px solid var(--art-line); }
.art-foot-k { display: block; font-size: 13px; color: var(--ng-t50); }
.art-authorbox { display: flex; gap: 20px; align-items: flex-start; padding: 24px; border-radius: 16px; background: var(--ng-inner); box-shadow: 0 0 0 1px var(--art-line) inset; }
.art-authorbox-txt strong { display: block; margin: 2px 0 6px; font-size: 18px; color: var(--ng-heading); }
.art-authorbox-txt p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: var(--ng-t60); }
.art-authorbox-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: 14px; }
.art-authorbox-links a { display: inline-flex; align-items: center; gap: 7px; color: var(--ng-heading); font-weight: 500; text-decoration: none; }
.art-authorbox-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.art-authorbox-links svg { width: 16px; height: 16px; }
.art-share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.art-share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ng-inner); box-shadow: 0 0 0 1px var(--art-line) inset; color: var(--ng-heading); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none; cursor: pointer; transition: background-color .2s, transform .2s; }
.art-share-btn:hover { background: var(--ng-inner-hover); transform: translateY(-1px); }
.art-share-btn svg { width: 17px; height: 17px; flex: none; }
.art-share-btn.is-done { color: #16a34a; }
.art-share-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.art-share-foot .art-foot-k { font-size: 15px; color: var(--ng-t60); }
.art-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.art-pager-a { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 14px; box-shadow: 0 0 0 1px var(--art-line) inset; text-decoration: none; transition: background-color .2s, box-shadow .2s; }
.art-pager-a:hover { background: var(--ng-inner); box-shadow: 0 0 0 1px var(--ng-t30) inset; }
.art-pager-a strong { font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--ng-heading); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-pager-next { text-align: right; grid-column: 2; }
@media (max-width: 640px) {
  .art-pager { grid-template-columns: 1fr; }
  .art-pager-next { grid-column: 1; }
  .art-authorbox { flex-direction: column; }
}

/* Colonne latérale */
.art-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
@media (min-width: 1100px) { .art-side { position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 124px); overflow-y: auto; scrollbar-width: thin; padding: 2px; } }
.art-side-box { padding: 20px; border-radius: 16px; box-shadow: 0 0 0 1px var(--art-line) inset; }
.art-side-title { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--art-line); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ng-heading); }
.art-side-toc { display: none; }
@media (min-width: 1100px) { .art-side-toc { display: block; } }
body.ng-site:not(.ng-admin) .art .art-side-toc .art-toc-list a { font-size: 13.5px; padding-top: 4px; padding-bottom: 4px; }
body.ng-site:not(.ng-admin) .art .art-side-toc .art-toc-list .art-toc-l3 a { font-size: 13px; }
.art-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.art-side-item { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; }
.art-side-thumb { flex: none; width: 76px; height: 54px; border-radius: 8px; overflow: hidden; background: var(--ng-inner); }
.art-side-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.16,1,.3,1); }
.art-side-item:hover .art-side-thumb img { transform: scale(1.06); }
.art-side-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.art-side-cat { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--art-accent); }
.art-side-txt strong { font-size: 13.5px; line-height: 1.35; font-weight: 600; color: var(--ng-heading); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.art-side-item:hover strong { color: var(--art-accent); }
.art-side-date { font-size: 12px; color: var(--ng-t50); }
.art-side-cats { list-style: none; margin: 0; padding: 0; }
.art-side-cats a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--art-line); font-size: 14px; color: var(--ng-t65); text-decoration: none; transition: color .2s; }
.art-side-cats li:last-child a { border-bottom: 0; }
.art-side-cats a:hover, .art-side-cats a[aria-current] { color: var(--ng-heading); }
.art-side-cats a[aria-current] span { font-weight: 600; }
.art-side-cats b { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--ng-inner); font-size: 12px; font-weight: 600; text-align: center; color: var(--ng-t55); }

/* Vous pourrez aussi aimer */
.art-related { margin: clamp(60px, 8vw, 90px) 0 0; padding-top: clamp(36px, 5vw, 48px); border-top: 1px solid var(--art-line); }
body.ng-site:not(.ng-admin) .art .art-related-h { margin: 0 0 24px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.025em; color: var(--ng-heading); }
.art-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
@media (min-width: 900px) { .art-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.art-rel-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--art-line) inset; text-decoration: none; transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s; }
.art-rel-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--ng-t30) inset, 0 14px 30px -18px rgba(0,0,0,.35); }
.art-rel-thumb { display: block; aspect-ratio: 16 / 9; background: var(--ng-inner); overflow: hidden; }
.art-rel-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.art-rel-card:hover .art-rel-thumb img { transform: scale(1.04); }
.art-rel-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.art-rel-cat { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--art-accent); }
.art-rel-title { font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--ng-heading); }
.art-rel-meta { font-size: 13px; color: var(--ng-t50); }

@media (prefers-reduced-motion: reduce) {
  .art-rel-card, .art-rel-thumb img, .art-side-thumb img, .art-share-btn, .art-lightbox { transition: none; }
  .art-rel-card:hover, .art-share-btn:hover { transform: none; }
}
@media print {
  .art-progress, .art-side, .art-share, .art-pager, .art-related, .art-code-copy, .art-crumbs { display: none !important; }
  .art-layout { display: block; }
}
