/* /assets/css/blog-article-side.css — habillage d'un article de blog (04/10/2026).
   Chargé par blog/article.php ET blog/preview.php (aperçu admin) : une seule source.
   Markup : blog/includes/article-extras.php. Sommaire : assets/js/blog-article-extras.js.

   - « À lire ensuite » : visible sur tous les écrans.
   - Colonnes gauche (sommaire) et droite (action, alerte, appli) : écrans >= 1240 px seulement.
     En dessous, la page reste une colonne de 900 px comme avant.
   Valeurs en dur (pas de variables) : l'aperçu admin n'a pas les mêmes :root que la page publique. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.article-body h2, .article-body h3 { scroll-margin-top: 96px; }

/* --- À lire ensuite --- */
.art-related { margin-top: 48px; }
.art-related h2 { font-family: 'Outfit', sans-serif; font-size: 22px; font-weight: 700; color: #0F172A; margin: 0 0 16px; }
.art-related-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.art-related-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid #E2E8F0; border-radius: 16px;
  overflow: hidden; text-decoration: none; color: #0F172A; transition: border-color .2s ease, transform .2s ease;
}
.art-related-card:hover { border-color: #A7F3D0; transform: translateY(-2px); }
.art-related-card img, .art-related-noimg { display: block; width: 100%; height: 150px; object-fit: cover; background: #F1F5F9; margin: 0; border-radius: 0; }
.art-related-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.art-related-date { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #64748B; }
.art-related-body strong { font-family: 'Outfit', sans-serif; font-size: 17px; line-height: 1.3; font-weight: 700; color: #0F172A; }
@media (min-width: 640px) { .art-related-grid { grid-template-columns: 1fr 1fr; } }

/* --- Colonnes latérales : cachées sous 1240 px --- */
.art-side { display: none; }
.art-layout { display: block; }

@media (min-width: 1240px) {
  main .wrap { max-width: 1380px; }
  .art-layout { display: grid; grid-template-columns: 176px minmax(0, 1fr) 264px; gap: 36px; align-items: start; }
  .art-layout.art-no-right { grid-template-columns: 176px minmax(0, 1fr); }
  .art-side { display: block; }
  .art-side-left:has(#artToc[hidden]) { visibility: hidden; }
}
/* Colonnes fixes seulement si elles tiennent dans la hauteur de l'écran (sinon le bas serait inatteignable). */
@media (min-width: 1240px) and (min-height: 860px) {
  .art-side { position: sticky; top: 92px; }
}

/* --- Sommaire --- */
.art-side-title { font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700; color: #0F172A; margin: 0 0 10px; }
.art-toc ol { list-style: none; margin: 0; padding: 0; }
.art-toc a {
  display: block; font-size: 13.5px; line-height: 1.4; color: #475569; text-decoration: none;
  padding: 6px 0 6px 12px; border-left: 2px solid #E2E8F0; transition: color .2s ease, border-color .2s ease;
}
.art-toc a:hover { color: #0F172A; }
.art-toc a.is-active { color: #047857; border-left-color: #10B981; font-weight: 600; }

/* --- Cartes de droite --- */
.art-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.art-card h2 { display: flex; align-items: center; gap: 8px; font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; line-height: 1.3; color: #0F172A; margin: 0 0 8px; }
.art-card h2 .lmp-icon { color: #047857; flex-shrink: 0; }
.art-card p { font-size: 13.5px; line-height: 1.45; color: #475569; margin: 0 0 10px; }
.art-card-action { background: #ECFDF5; border-color: #A7F3D0; }
.art-count { color: #0F172A !important; }
.art-count strong { font-family: 'Outfit', sans-serif; font-size: 22px; color: #047857; margin-right: 4px; }
.art-btn {
  display: block; width: 100%; text-align: center; background: #047857; color: #fff; border: 0; border-radius: 12px;
  padding: 11px 14px; font-family: 'DM Sans', sans-serif; font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.art-btn:hover { background: #065F46; color: #fff; }
.art-btn:disabled { opacity: .6; cursor: default; }
.art-link { display: block; text-align: center; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: #047857; }

.art-alert-form { display: flex; flex-direction: column; gap: 8px; }
.art-alert-form input[type="search"] {
  width: 100%; height: 42px; padding: 0 12px; border: 1.5px solid #E2E8F0; border-radius: 12px; background: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: #0F172A;
}
.art-alert-form input[type="search"]:focus { outline: 2px solid #047857; outline-offset: 1px; border-color: #047857; }
.art-alert-form .lmp-ac-list { top: calc(100% + 4px); }
.lmp-search-hint { font-size: 13px; color: #B45309; margin: 8px 0 0; }

.art-stores { display: flex; gap: 8px; }
.art-stores a {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; background: #000; color: #fff; padding: 10px 8px; border-radius: 12px;
  text-decoration: none; font-family: 'Outfit', sans-serif; font-size: 13.5px; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.art-stores a:hover { opacity: .88; color: #fff; }
.art-stores span { display: flex; flex-direction: column; }
.art-stores small { display: none; }
.art-store-icon { width: 22px; height: 22px; fill: #fff; flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  .art-related-card, .art-toc a { transition: none; }
}
