/* ============================================================
   Repère IA — Article page styles
   Loaded only on is_singular() pages.
   Mockup reference: 02-article-desktop.png / 12-article-mobile.png
   ============================================================ */

/* ── Reading progress bar ────────────────────────────────── */

.ri-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #1d4ed8;
  transform: scaleX(0);
  transform-origin: left;
  z-index: 9999;
  will-change: transform;
}

/* ── Wrapper root ────────────────────────────────────────── */

.ri-art-wrap {
  background: #fff;
}

/* ── TOP ZONE: intro (text+image) | À la une ────────────── */

.ri-art-top {
  background: #fff;
  border-bottom: 1px solid #f0f2f5;
}

.ri-art-top-grid {
  display: grid;
  grid-template-columns: 1fr 236px;
  column-gap: 24px;
  align-items: start;
  padding-top: 18px;
  padding-bottom: 18px;
}

.ri-art-top-main { min-width: 0; }

.ri-art-top-sidebar { min-width: 0; }

/* ── LEADERBOARD ROW (full editorial width) ──────────────── */

.ri-art-leaderboard-row {
  background: #fff;
  padding: 12px 0 0;
}

/* ── BODY ZONE: TOC | content | sidebar widgets ──────────── */

.ri-art-body { background: #fff; }

.ri-art-body-grid {
  display: grid;
  grid-template-columns: 180px 1fr 236px;
  column-gap: 24px;
  align-items: start;
  padding-top: 20px;
  padding-bottom: 40px;
}

/* ── Left TOC column ─────────────────────────────────────── */

.ri-art-toc-col {
  position: sticky;
  top: 80px;
  align-self: start;
}

.ri-art-toc-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.ri-art-toc-card__title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #9ca3af;
  margin-bottom: 12px;
}

/* TOC link styles (shared with right sidebar TOC) */
.ri-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ri-toc__item { margin: 0; }
.ri-toc__link {
  display: block;
  padding: 5px 0 5px 11px;
  font-size: 12.5px;
  color: #6b7280;
  text-decoration: none;
  border-left: 2px solid #e5e7eb;
  line-height: 1.4;
  transition: color 0.15s, border-color 0.15s;
}
.ri-toc__link:hover,
.ri-toc__link--active {
  color: #1d4ed8;
  border-left-color: #1d4ed8;
  background: #eff6ff;
}
.ri-toc__item--h3 .ri-toc__link {
  padding-left: 20px;
  font-size: 11.5px;
  color: #9ca3af;
}
.ri-toc__item--h3 .ri-toc__link:hover,
.ri-toc__item--h3 .ri-toc__link.ri-toc__link--active {
  color: #1d4ed8;
}

/* ── Mobile TOC (hidden desktop, revealed by JS on mobile) ── */

.ri-art-toc-mobile {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin: 0 16px;
}

.ri-art-toc-mobile__inner {
  padding: 16px;
}

.ri-art-toc-mobile__title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
}

.ri-art-toc-mobile__nav .ri-toc__list {
  columns: 2;
  column-gap: 16px;
}

.ri-art-toc-mobile__nav .ri-toc__link {
  border-left: none;
  padding: 5px 0;
  font-size: 13px;
  color: #1d4ed8;
  break-inside: avoid;
}

.ri-art-toc-mobile__nav .ri-toc__item--h3 .ri-toc__link {
  padding-left: 10px;
  font-size: 12px;
  color: #4b6cf5;
}

/* ── Main article column ─────────────────────────────────── */

.ri-art-main {
  min-width: 0;
}

/* ── Breadcrumb ──────────────────────────────────────────── */

.ri-art-breadcrumb {
  margin-bottom: 14px;
}

.ri-art-breadcrumb .ri-breadcrumb { font-size: 12px; }

.ri-art-breadcrumb .ri-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ri-art-breadcrumb .ri-breadcrumb__item { display: flex; align-items: center; min-width: 0; }

.ri-art-breadcrumb .ri-breadcrumb__sep {
  flex-shrink: 0;
  margin: 0 6px;
  color: #b0b9cc;
  font-size: 11px;
}

.ri-art-breadcrumb .ri-breadcrumb a {
  color: #64748b;
  text-decoration: none;
}

.ri-art-breadcrumb .ri-breadcrumb a:hover { color: var(--ri-blue); }

.ri-art-breadcrumb .ri-breadcrumb__item:last-child span,
.ri-art-breadcrumb .ri-breadcrumb__current {
  color: var(--ri-blue);
  font-weight: 700;
}

/* ── Intro section: text col + visual col ────────────────── */

.ri-art-intro {
  display: grid;
  grid-template-columns: 1fr 420px;
  column-gap: 24px;
  align-items: start;
}

/* Category badge */
.ri-art-badge {
  display: inline-flex;
  align-items: center;
  background: #1d4ed8;
  color: #fff;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: 12px;
  transition: background 0.15s;
}
.ri-art-badge:hover { background: #1e40af; }

/* H1 */
.ri-art-h1 {
  font-size: clamp(22px, 2.1vw, 32px);
  font-weight: 800;
  color: #0a1628;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}

/* Excerpt */
.ri-art-excerpt {
  font-size: 13.5px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 12px;
}

/* ── Meta row ────────────────────────────────────────────── */

.ri-art-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.ri-art-meta__author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ri-art-meta__avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0;
}

.ri-art-meta__sep {
  color: #d1d5db;
  user-select: none;
}

.ri-art-meta__date { color: #6b7280; }

.ri-art-meta__rt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
}

.ri-art-meta__rt-icon {
  flex-shrink: 0;
  color: #9ca3af;
}

.ri-art-fav {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #d1d5db;
  padding: 3px;
  line-height: 1;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.ri-art-fav:hover { color: #1d4ed8; }
.ri-art-fav.is-fav {
  color: #1d4ed8;
}
.ri-art-fav.is-fav svg { fill: currentColor; }
.ri-art-fav:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Featured image ──────────────────────────────────────── */

.ri-art-thumb {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
}

.ri-art-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ri-art-thumb__fallback {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Share row (below image) ─────────────────────────────── */

.ri-art-share {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  flex-wrap: wrap;
}

.ri-art-share__label {
  font-size: 11.5px;
  color: #9ca3af;
  font-weight: 500;
  white-space: nowrap;
}

.ri-art-share__btns {
  display: flex;
  gap: 5px;
}

.ri-art-share-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.ri-art-share-btn:hover {
  border-color: #9ca3af;
  color: #111827;
  background: #f9fafb;
}
.ri-art-share-btn:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

/* ── Leaderboard ad (970×90) ─────────────────────────────── */

.ri-art-leaderboard {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 12px;
  margin: 0 0 18px;
  text-align: center;
}

.ri-art-leaderboard__label {
  font-size: 9px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ri-art-leaderboard__info {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* ── Article content typography ──────────────────────────── */

.ri-article-content {
  font-size: 14.5px;
  line-height: 1.68;
  color: #1f2937;
}

.ri-article-content h2 {
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: 700;
  color: #2563eb;
  margin: 28px 0 10px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  padding-left: 12px;
  border-left: 3px solid #2563eb;
}

.ri-article-content h3 {
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 600;
  color: #111827;
  margin: 20px 0 8px;
  line-height: 1.4;
}

.ri-article-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 16px 0 6px;
}

.ri-article-content p { margin: 0 0 12px; }

.ri-article-content a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ri-article-content a:hover { color: #1e40af; }

.ri-article-content ul,
.ri-article-content ol {
  padding-left: 20px;
  margin: 0 0 12px;
}
.ri-article-content li { margin-bottom: 4px; }

.ri-article-content blockquote {
  border-left: 3px solid #1d4ed8;
  margin: 22px 0;
  padding: 12px 18px;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.ri-article-content code {
  background: #f3f4f6;
  color: #dc2626;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ri-article-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 22px 0;
  font-size: 13px;
  line-height: 1.6;
  position: relative;
}
.ri-article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.ri-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 22px 0;
  display: block;
}

.ri-article-content strong { font-weight: 700; color: #111827; }
.ri-article-content em { font-style: italic; }
.ri-article-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 36px 0;
}

/* ── Code block with copy button ─────────────────────────── */

.ri-code-block {
  position: relative;
  margin: 22px 0;
}
.ri-code-block pre {
  margin: 0;
}
.ri-code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #94a3b8;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ri-code-copy:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}

/* ── Callout box (À retenir, etc.) ───────────────────────── */

.ri-callout {
  border-radius: 8px;
  padding: 11px 16px;
  margin: 16px 0;
  border-left: 3px solid;
}
.ri-callout--info {
  background: #eff6ff;
  border-color: #1d4ed8;
}
.ri-callout--tip {
  background: #f0fdf4;
  border-color: #16a34a;
}
.ri-callout--warn {
  background: #fffbeb;
  border-color: #d97706;
}
.ri-callout__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #1d4ed8;
  margin-bottom: 5px;
}
.ri-callout--tip  .ri-callout__title { color: #16a34a; }
.ri-callout--warn .ri-callout__title { color: #d97706; }
.ri-callout p { margin: 0; font-size: 13.5px; line-height: 1.55; color: #1e3a8a; }
.ri-callout--tip p { color: #14532d; }
.ri-callout--warn p { color: #78350f; }

/* ── Feature grid (4 concepts) ───────────────────────────── */

.ri-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.ri-feature-card {
  background: #f8faff;
  border: 1px solid #e0e7ff;
  border-radius: 8px;
  padding: 11px 10px;
  text-align: center;
}
.ri-feature-card__icon {
  font-size: 18px;
  margin-bottom: 6px;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ri-feature-card__title {
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 4px;
}
.ri-feature-card p {
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.45;
  margin: 0;
}

/* ── Method / step list ──────────────────────────────────── */

.ri-method-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  counter-reset: method;
}
.ri-method-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13.5px;
  color: #374151;
}
.ri-method-list li::before {
  counter-increment: method;
  content: counter(method);
  min-width: 22px;
  height: 22px;
  background: #1d4ed8;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.ri-method-list li strong {
  color: #111827;
  display: block;
  margin-bottom: 1px;
}

/* ── Example cards (3-col) ───────────────────────────────── */

.ri-example-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}
.ri-example-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 11px 10px;
}
.ri-example-card__icon {
  font-size: 16px;
  margin-bottom: 6px;
  color: #1d4ed8;
  display: flex;
  align-items: center;
}
.ri-example-card__title {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}
.ri-example-card p {
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.45;
  margin: 0;
}

/* ── Gradient CTA block ──────────────────────────────────── */

.ri-art-cta {
  background: linear-gradient(135deg, #1d4ed8 0%, #673cff 100%);
  border-radius: 10px;
  padding: 16px 22px;
  margin: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  transition: opacity 0.15s;
}
.ri-art-cta:hover { opacity: 0.92; }
.ri-art-cta__text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}
.ri-art-cta__arrow {
  font-size: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* ── Table wrapper ───────────────────────────────────────── */

.ri-table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}
.ri-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 400px;
}
.ri-table-wrap th {
  background: #f9fafb;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #e5e7eb;
  color: #374151;
  white-space: nowrap;
}
.ri-table-wrap td {
  padding: 9px 14px;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
  vertical-align: top;
}
.ri-table-wrap tr:last-child td { border-bottom: none; }

/* ── Right sidebar ───────────────────────────────────────── */

.ri-art-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── À la une widget ─────────────────────────────────────── */

.ri-art-une {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
}

.ri-art-une__title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f3f4f6;
}

.ri-une-item {
  display: flex;
  gap: 9px;
  padding: 8px 0;
  align-items: center;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}
.ri-une-item:last-of-type { border-bottom: none; }

.ri-une-item__thumb {
  width: 52px;
  min-width: 52px;
  height: 40px;
  border-radius: 5px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}
.ri-une-item__thumb img,
.ri-une-item__thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ri-une-item__body { flex: 1; min-width: 0; }

.ri-une-item__title {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 2px;
}

.ri-une-item__link {
  text-decoration: none;
  color: inherit;
}
.ri-une-item__link::after {
  content: '';
  position: absolute;
  inset: 0;
}
.ri-une-item:hover .ri-une-item__title { color: #1d4ed8; }

.ri-une-item__date { font-size: 10.5px; color: #9ca3af; margin: 0; }
.ri-une-item__arrow { color: #d1d5db; font-size: 14px; flex-shrink: 0; line-height: 1; }

.ri-art-une__more {
  display: block;
  font-size: 12px;
  color: #1d4ed8;
  text-decoration: none;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}
.ri-art-une__more:hover { text-decoration: underline; }

/* ── Sidebar ad 300×250 ──────────────────────────────────── */

.ri-art-ad {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  min-height: 220px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  text-align: center;
  box-sizing: border-box;
}
.ri-art-ad__label {
  font-size: 9px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ri-art-ad__info { font-size: 12px; color: #6b7280; font-weight: 500; }

/* ── Newsletter sidebar widget ───────────────────────────── */

.ri-art-newsletter {
  background: #030d18;
  color: #fff;
  border-radius: 10px;
  padding: 14px 14px;
}
.ri-art-newsletter__icon {
  margin-bottom: 6px;
  color: rgba(255,255,255,0.7);
  display: flex;
}
.ri-art-newsletter__title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 4px;
}
.ri-art-newsletter__sub {
  font-size: 11px;
  color: #7a96b0;
  margin-bottom: 10px;
}
.ri-art-newsletter__form { display: flex; flex-direction: column; gap: 6px; }
.ri-art-newsletter__input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-size: 12px;
  font-family: inherit;
}
.ri-art-newsletter__input::placeholder { color: rgba(255,255,255,0.38); }
.ri-art-newsletter__btn {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: linear-gradient(90deg, #673cff, #3c8cff);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.ri-art-newsletter__btn:hover { opacity: 0.9; }

/* ── Sidebar TOC ─────────────────────────────────────────── */

.ri-art-sidebar-toc {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
}
.ri-art-sidebar-toc__title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #9ca3af;
  margin-bottom: 12px;
}
.ri-art-sidebar-toc .ri-toc__link { font-size: 11.5px; }

/* ── Recommended articles ────────────────────────────────── */

.ri-art-recommended { }

.ri-art-recommended__title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.ri-rec-item {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  align-items: flex-start;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}
.ri-rec-item:last-of-type { border-bottom: none; }

.ri-rec-item__thumb {
  width: 58px;
  min-width: 58px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}
.ri-rec-item__thumb img,
.ri-rec-item__thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ri-rec-item__body { flex: 1; min-width: 0; }

.ri-rec-item__title {
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 3px;
}

.ri-rec-item__link {
  text-decoration: none;
  color: inherit;
}
.ri-rec-item__link::after {
  content: '';
  position: absolute;
  inset: 0;
}
.ri-rec-item:hover .ri-rec-item__title { color: #1d4ed8; }
.ri-rec-item__rt { font-size: 11px; color: #9ca3af; }

.ri-art-recommended__more {
  display: block;
  font-size: 12px;
  color: #1d4ed8;
  text-decoration: none;
  margin-top: 10px;
}
.ri-art-recommended__more:hover { text-decoration: underline; }

/* ── Top outils ──────────────────────────────────────────── */

.ri-art-tools { }

.ri-art-tools__title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.ri-tool-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}
.ri-tool-item:last-of-type { border-bottom: none; }

.ri-tool-item__rank {
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
  min-width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.ri-tool-item__logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #374151;
  flex-shrink: 0;
  overflow: hidden;
}
.ri-tool-item__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ri-tool-item__info { flex: 1; min-width: 0; }

.ri-tool-item__name { font-size: 12.5px; font-weight: 600; color: #111827; display: block; }

.ri-tool-item__link {
  text-decoration: none;
  color: inherit;
}
.ri-tool-item__link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.ri-tool-item__cat { font-size: 11px; color: #9ca3af; }

.ri-art-tools__more {
  display: block;
  font-size: 12px;
  color: #1d4ed8;
  text-decoration: none;
  margin-top: 10px;
}
.ri-art-tools__more:hover { text-decoration: underline; }

/* ── À lire ensuite (4 compact cards) ───────────────────── */

.ri-art-next {
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  padding: 24px 0 36px;
  margin-top: 0;
}

.ri-art-next__title {
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
}

.ri-art-next__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.ri-next-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.15s;
}
.ri-next-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.ri-next-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.ri-next-card__image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}
.ri-next-card__image img,
.ri-next-card__image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ri-next-card__badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: #1d4ed8;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.ri-next-card__body { padding: 8px 10px 10px; }

.ri-next-card__title {
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
  line-height: 1.38;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ri-next-card:hover .ri-next-card__title { color: #1d4ed8; }

.ri-next-card__rt { font-size: 11px; color: #9ca3af; }

/* ── Image fallback overrides (article context) ──────────── */

/* Premium gradient fallback for next-cards (aspect-ratio 3:2) */
.ri-next-card__image .ri-hp-img-fallback {
  background: linear-gradient(155deg, #edf1f9 0%, #d9e3f0 100%);
}
.ri-next-card__image .ri-hp-img-fallback svg {
  width: 20px;
  height: 20px;
  opacity: 0.22;
}

/* Compact fallback for sidebar thumbnails */
.ri-une-item__thumb .ri-hp-img-fallback,
.ri-rec-item__thumb .ri-hp-img-fallback {
  background: #f0f2f6;
}
.ri-une-item__thumb .ri-hp-img-fallback svg,
.ri-rec-item__thumb .ri-hp-img-fallback svg {
  width: 16px;
  height: 16px;
  opacity: 0.3;
}

/* Main article featured image fallback */
.ri-art-thumb .ri-hp-img-fallback {
  background: linear-gradient(135deg, #1d4ed8 0%, #673cff 80%);
  opacity: 0.15;
}

/* ── Visually hidden (accessibility) ────────────────────── */

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

/* ── Responsive: Tablet (900–1199px) ─────────────────────── */

@media (min-width: 900px) and (max-width: 1199px) {
  .ri-art-top-grid {
    grid-template-columns: 1fr 220px;
    column-gap: 20px;
  }

  .ri-art-body-grid {
    grid-template-columns: 1fr 220px;
    column-gap: 24px;
  }
  .ri-art-toc-col { display: none; }
  .ri-art-toc-mobile { display: none; }

  .ri-art-intro {
    grid-template-columns: 1fr 260px;
  }
}

/* Desktop: hide mobile TOC */
@media (min-width: 900px) {
  .ri-art-toc-mobile { display: none; }
}

/* ── Responsive: Mobile (≤899px) ────────────────────────── */

@media (max-width: 899px) {
  .ri-art-top-grid {
    grid-template-columns: 1fr;
    padding: 0;
  }
  .ri-art-top-sidebar { display: none; }

  .ri-art-body-grid {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
  }

  .ri-art-toc-col { display: none; }
  .ri-art-sidebar  { display: none; }

  .ri-art-leaderboard-row { padding: 0; }

  /* Intro: stack, image first */
  .ri-art-intro {
    display: flex;
    flex-direction: column;
    padding: 0 16px 20px;
    gap: 0;
  }

  .ri-art-intro__visual {
    order: -1;
    margin-bottom: 14px;
  }

  .ri-art-thumb {
    border-radius: 0;
    width: calc(100% + 32px);
    margin-left: -16px;
    aspect-ratio: 16 / 9;
  }

  .ri-art-share {
    margin-top: 10px;
    flex-wrap: wrap;
  }

  .ri-art-breadcrumb {
    padding: 12px 16px 0;
    margin-bottom: 0;
  }

  .ri-art-intro__text {
    padding-top: 14px;
  }

  .ri-art-h1 { font-size: clamp(20px, 6.5vw, 28px); }
  .ri-art-excerpt { font-size: 14px; }

  .ri-art-main {
    padding-bottom: calc(var(--ri-bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px) + 20px);
  }

  .ri-article-content {
    padding: 0 16px;
    font-size: 14.5px;
  }

  .ri-art-leaderboard {
    margin: 0 16px 20px;
  }

  /* Feature grid: 2-col on mobile */
  .ri-feature-grid { grid-template-columns: repeat(2, 1fr); }

  /* Example cards: 1-col on mobile */
  .ri-example-cards { grid-template-columns: 1fr; }

  /* À lire ensuite: 2-col on mobile */
  .ri-art-next__grid { grid-template-columns: repeat(2, 1fr); }
}
