/* ==========================================================================
   PIAM — Rubrique « Actualités » (pages /actualites, article, section de la page d'accueil)
   Chargé après piam.css et landing.css : réutilise les tokens (--accent --brand --ink --muted --line
   --surface …) et les composants (.btn .lp-section-inner .lp-kicker .lp-reveal). Classes préfixées `art-`.
   Mobile d'abord, thèmes clair et sombre via les variables uniquement.
   ========================================================================== */

/* -- Page liste : en-tête ------------------------------------------------- */
.art-page { padding-bottom: 72px; }
.art-hero {
  padding: 36px 0 30px;
  background:
    radial-gradient(900px 320px at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, var(--bg)) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.art-hero h1 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15;
  color: var(--ink); max-width: 22ch; margin: 0 0 14px;
}
.art-hero-lead { color: var(--ink-2); font-size: clamp(.98rem, .94rem + .25vw, 1.1rem); max-width: 62ch; margin: 0; line-height: 1.6; }

.art-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: .82rem; color: var(--muted); margin-bottom: 18px;
}
.art-crumbs a { color: var(--muted); font-weight: 550; }
.art-crumbs a:hover { color: var(--ink); }
.art-crumbs .ic { width: 14px; height: 14px; opacity: .6; }
.art-crumbs [aria-current] { color: var(--ink-2); font-weight: 600; }

.art-list { padding-top: 26px; }

/* -- Filtre par catégorie (puces) ------------------------------------------ */
.art-filters {
  display: flex; gap: 8px; margin: 0 -20px 30px; padding: 2px 20px 6px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
}
.art-filters::-webkit-scrollbar { display: none; }
.art-filters a {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .88rem;
  white-space: nowrap; scroll-snap-align: start; transition: border-color .15s var(--ease), color .15s var(--ease), background-color .15s var(--ease);
}
.art-filters a:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.art-filters a[aria-current="page"] {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent);
}
@media (min-width: 900px) {
  .art-filters { flex-wrap: wrap; overflow: visible; margin: 0 0 34px; padding: 0; mask-image: none; }
}

.art-section-title { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.45rem); font-weight: 750; color: var(--ink); margin: 44px 0 20px; letter-spacing: -.01em; }

/* -- Cartes ----------------------------------------------------------------- */
.art-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px)  { .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .art-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; } }

.art-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.art-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.art-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.art-card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.art-card-media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.art-card:hover .art-card-media img { transform: scale(1.045); }

/* Visuel de repli (article sans image) */
.art-ph {
  display: grid; place-items: center; width: 100%; height: 100%; color: #fff;
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--accent) 60%, transparent) 0, transparent 52%),
    radial-gradient(circle at 88% 90%, color-mix(in srgb, var(--accent) 30%, transparent) 0, transparent 45%),
    linear-gradient(135deg, var(--brand-2), var(--brand));
}
.art-ph .ic { width: 44px; height: 44px; opacity: .9; transition: transform .6s var(--ease); }
.art-card:hover .art-ph .ic { transform: scale(1.08); }

.art-card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; min-width: 0; }
.art-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.art-badge {
  position: relative; z-index: 2; align-self: flex-start; display: inline-flex; align-items: center;
  padding: 4px 11px; border-radius: 99px; font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  color: var(--accent); background: var(--accent-soft); text-decoration: none; white-space: nowrap;
}
.art-badge:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 20%, transparent); }
.art-flag {
  display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 99px; font-size: .74rem; font-weight: 700;
  color: #fff; background: var(--brand-2);
}
:root[data-theme="dark"] .art-flag { background: color-mix(in srgb, var(--accent) 35%, var(--surface-2)); }
.art-card-title { font-size: 1.08rem; font-weight: 720; line-height: 1.35; letter-spacing: -.01em; margin: 0; }
.art-card-title a { color: var(--ink); text-decoration: none; }
.art-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.art-card-title a:focus-visible { outline: none; }
.art-card:hover .art-card-title a { color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.art-card-excerpt {
  color: var(--ink-2); font-size: .92rem; line-height: 1.55; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.art-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: auto 0 0; padding-top: 4px;
  font-size: .8rem; color: var(--muted); font-weight: 550;
}
.art-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.art-meta .ic { width: 14px; height: 14px; }
.art-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .7; }

/* Carte « À la une » */
.art-card--featured { margin-bottom: 8px; }
.art-card--featured .art-card-body { padding: 22px 22px 24px; gap: 12px; }
.art-card--featured .art-card-title { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.85rem); font-weight: 800; line-height: 1.22; letter-spacing: -.02em; }
.art-card--featured .art-card-excerpt { font-size: 1rem; -webkit-line-clamp: 4; }
@media (min-width: 860px) {
  .art-card--featured { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .art-card--featured .art-card-media { aspect-ratio: auto; min-height: 340px; }
  .art-card--featured .art-card-body { padding: 36px 36px 32px; justify-content: center; }
  .art-card--featured .art-meta { margin-top: 8px; }
}

/* -- Pagination -------------------------------------------------------------- */
.art-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin: 44px 0 0; }
.art-pager-num, .art-pager-step {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 650; font-size: .92rem;
}
a.art-pager-num:hover, a.art-pager-step:hover { border-color: var(--accent); text-decoration: none; }
.art-pager-num[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; }
:root[data-theme="dark"] .art-pager-num[aria-current="page"] { background: var(--accent); border-color: var(--accent); }
.art-pager-step .ic { width: 16px; height: 16px; }
.art-pager-gap { color: var(--muted); padding: 0 4px; }
@media (max-width: 420px) { .art-pager-step span { display: none; } .art-pager-step { padding: 0; } }

/* -- États vides / 404 ------------------------------------------------------- */
.art-empty {
  max-width: 560px; margin: 10px auto 0; text-align: center; padding: 44px 24px; background: var(--surface);
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
}
.art-empty-ic {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; margin-bottom: 14px;
  color: var(--accent); background: var(--accent-soft);
}
.art-empty-ic .ic { width: 26px; height: 26px; }
.art-empty h1, .art-empty h2 { font-size: 1.25rem; color: var(--ink); margin: 0 0 8px; }
.art-empty p { color: var(--ink-2); margin: 0 auto 18px; max-width: 46ch; }
.art-empty--404 { margin-top: 48px; border-style: solid; }
.art-empty .art-empty-code { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* -- Encadré d'appel à l'action (blocs data-cta et fin d'article) ------------- */
.art-cta {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; gap: 20px;
  margin: 36px 0; padding: 26px 22px; border-radius: 20px; color: #fff;
  background:
    radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--accent) 70%, transparent) 0%, transparent 58%),
    linear-gradient(135deg, var(--accent) -20%, var(--brand-2) 48%, var(--brand) 100%);
  box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--brand) 55%, transparent);
}
.art-cta::before, .art-cta::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.art-cta::before { width: 260px; height: 260px; right: -90px; bottom: -130px; border: 40px solid rgba(255, 255, 255, .06); }
.art-cta::after { width: 110px; height: 110px; right: 120px; top: -70px; background: rgba(255, 255, 255, .05); }
.art-cta-kicker {
  display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .7); margin-bottom: 6px;
}
.art-cta .art-cta-title { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); font-weight: 800; line-height: 1.25; letter-spacing: -.015em; color: #fff; margin: 0 0 8px; }
.art-cta .art-cta-desc { color: rgba(255, 255, 255, .84); font-size: .96rem; line-height: 1.55; margin: 0; max-width: 56ch; }
.art-cta .art-cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px;
  border-radius: 12px; background: #fff; color: #0B1F3A; font-weight: 750; font-size: .95rem; text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18); transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.art-cta .art-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, .24); text-decoration: none; }
.art-cta .art-cta-btn:focus-visible { outline: 3px solid rgba(255, 255, 255, .7); outline-offset: 3px; }
.art-cta .art-cta-btn .ic { width: 17px; height: 17px; transition: transform .15s var(--ease); }
.art-cta .art-cta-btn:hover .ic { transform: translateX(3px); }
.art-cta--final { margin-top: 48px; }
@media (min-width: 720px) {
  .art-cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 30px; padding: 30px 34px; }
  .art-cta .art-cta-btn { flex: none; }
}
.art-list > .art-cta--final { margin-top: 64px; }

/* -- Article ------------------------------------------------------------------- */
.art-preview-bar { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 80%, var(--ink)); border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.art-preview-inner { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; }
.art-preview-inner > span { flex: 1; min-width: 200px; }
.art-preview-inner .btn { margin-left: auto; }

.art-article { padding: 34px 0 20px; }
.art-article-head { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.art-article-head .art-badge { margin-bottom: 14px; }
.art-article-head h1 {
  font-size: clamp(1.8rem, 1.3rem + 2.3vw, 2.75rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; color: var(--ink);
  margin: 0 0 16px; overflow-wrap: break-word;
}
.art-lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.6; color: var(--ink-2); margin: 0 0 18px; }
.art-meta--lg { font-size: .88rem; margin: 0; padding-bottom: 4px; }
.art-author { font-weight: 700; color: var(--ink-2); }

.art-article-media { max-width: 1080px; margin: 30px auto 38px; padding: 0 20px; }
.art-article-media img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--surface-2);
}
@media (max-width: 640px) { .art-article-media { padding: 0; } .art-article-media img { border-radius: 0; border-left: 0; border-right: 0; } }
.art-article-sep { max-width: 720px; height: 1px; margin: 26px auto 34px; background: var(--line); }

/* Typographie de lecture */
.art-body {
  max-width: 760px; margin: 0 auto; padding: 0 20px;
  font-size: clamp(1rem, .96rem + .25vw, 1.0625rem); line-height: 1.7; color: var(--ink-2); overflow-wrap: break-word;
}
.art-body > :first-child { margin-top: 0; }
.art-body p { margin: 0 0 1.15em; }
.art-body h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.6rem); font-weight: 780; line-height: 1.28; letter-spacing: -.02em; color: var(--ink); margin: 2.1em 0 .7em; }
.art-body h3 { font-size: clamp(1.12rem, 1.05rem + .3vw, 1.25rem); font-weight: 720; line-height: 1.35; color: var(--ink); margin: 1.8em 0 .55em; }
.art-body h4 { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin: 1.5em 0 .45em; }
.art-body strong { color: var(--ink); font-weight: 700; }
.art-body em { font-style: italic; }
.art-body a { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.art-body a:hover { text-decoration-color: currentColor; }
.art-body ul, .art-body ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.art-body li { margin: 0 0 .5em; padding-left: .2em; }
.art-body li::marker { color: var(--accent); font-weight: 700; }
.art-body li > ul, .art-body li > ol { margin: .5em 0 0; }
.art-body blockquote {
  position: relative; margin: 1.8em 0; padding: 20px 22px 20px 24px; border-left: 4px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--r) var(--r) 0; color: var(--ink); font-size: 1.06em; font-style: italic;
  box-shadow: var(--shadow-sm);
}
.art-body blockquote p:last-child { margin-bottom: 0; }
.art-body aside.article-note {
  position: relative; margin: 1.8em 0; padding: 18px 20px 18px 54px; border-radius: var(--r);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--ink); font-size: .97em;
}
.art-body aside.article-note::before {
  content: "i"; position: absolute; left: 18px; top: 18px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  font: 800 .8rem/1 Georgia, "Times New Roman", serif; font-style: italic;
}
.art-body aside.article-note p:last-child, .art-body aside.article-note ul:last-child { margin-bottom: 0; }
.art-body img { display: block; max-width: 100%; height: auto; border-radius: var(--r); }
.art-body figure { margin: 2em 0; }
.art-body figure img { width: 100%; border: 1px solid var(--line); }
.art-body figcaption { margin-top: 10px; font-size: .85rem; color: var(--muted); text-align: center; line-height: 1.5; }
.art-body .art-table { margin: 1.6em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); -webkit-overflow-scrolling: touch; }
.art-body table { width: 100%; border-collapse: collapse; font-size: .92em; line-height: 1.5; }
.art-body th, .art-body td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.art-body th { background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: .95em; white-space: nowrap; }
.art-body tbody tr:last-child td { border-bottom: 0; }
.art-body tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.art-body br + br { display: none; }
.art-body .art-back { margin: 34px 0 0; }
.art-back a { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; text-decoration: none; }
.art-back a .ic { width: 16px; height: 16px; }

/* « À lire aussi » */
.art-related { margin-top: 40px; padding: 8px 0 72px; background: var(--surface-2); border-top: 1px solid var(--line); }
.art-related .art-section-title { margin-top: 48px; }

/* -- Section « Actualités » de la page d'accueil ------------------------------ */
.lp-articles { padding: 56px 0; }
.art-grid > .art-reveal { display: flex; min-width: 0; }
.art-reveal > .art-card { flex: 1; }
.lp-articles-more { display: flex; justify-content: center; margin-top: 36px; }
.lp-articles-more .btn .ic { width: 17px; height: 17px; }

@media (prefers-reduced-motion: reduce) {
  .art-card, .art-card-media img, .art-ph .ic, .art-cta .art-cta-btn { transition: none; }
  .art-card:hover, .art-card:hover .art-card-media img, .art-cta .art-cta-btn:hover { transform: none; }
}
@media print {
  .art-cta, .art-related, .art-preview-bar, .art-back { display: none; }
}
