  /* ---------- Section Articles : liste + détail ---------- */
  /* Page autonome : reprend la base (variables, nav) de la charte "papier chaud". */

/* Palette, polices, rayons, ombres : voir styles-base.css (source unique,
   chargee avant ce fichier). Rien n'est redefini ici. */

  * {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--police-texte);
    -webkit-font-smoothing: antialiased;
  }

  .screen {
    max-width: 1040px;
    margin: 0 auto;
    padding: 36px 24px 56px;
  }

  /* ---------- Navigation (même charte que les autres pages) ---------- */

  .top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .brand-logo {
    font-family: var(--police-titre);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px 8px 0;
    margin-right: 4px;
  }

  .nav-link {
    font-family: var(--police-texte);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
  }

  /* Page courante : signalee, pas criee. Un bouton bleu plein dans la barre
     de nav se dispute l'attention avec le vrai bouton d'action a droite. */
  .nav-link.active {
    background: var(--accent-doux);
    color: var(--accent);
  }

  .nav-link:hover { background: var(--track-bg); color: var(--text); }

  .nav-link:not(.active):hover {
    background: var(--track-bg);
  }

  .auth-btn {
    font-family: var(--police-texte);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    background: #FFFFFF;
    border: 1px solid var(--divider);
    border-radius: 999px;
    padding: 9px 16px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
  }

  .auth-btn:hover {
    background: var(--track-bg);
  }

  .badge-beta {
    display: inline-flex;
    align-items: center;
    background: var(--attention-texte);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
  }

  /* ---------- En-tête ---------- */

  header h1 {
    font-family: var(--police-titre);
    font-weight: 700;
    font-size: 30px;
    margin: 18px 0 6px;
  }

  .articles-sous-titre {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 22px;
  }

  /* ---------- Filtres par catégorie ---------- */

  .categories-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
  }

  .categorie-pill {
    font-family: var(--police-texte);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--card);
    border: 1px solid var(--divider);
    border-radius: 999px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .categorie-pill:hover {
    background: var(--track-bg);
  }

  .categorie-pill.active {
    background: var(--green);
    border-color: var(--green);
    color: #FFFFFF;
  }

  /* ---------- Mise en page : contenu principal + colonne "Les plus lus" ---------- */

  .articles-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: start;
  }

  /* ---------- Article héros ---------- */

  .article-hero {
    display: block;
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--divider);
    box-shadow: none;
    margin-bottom: 28px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .article-hero:hover {
    transform: translateY(-2px);
    box-shadow: var(--ombre-carte);
  }

  .article-hero-visuel {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .article-hero-visuel span {
    font-size: 72px;
  }

  .article-hero-texte {
    padding: 22px 26px 26px;
  }

  .article-hero-texte h2 {
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.3;
    margin: 10px 0 10px;
  }

  .article-hero-texte p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 12px;
  }

  /* ---------- Tags et métadonnées ---------- */

  .categorie-tag {
    display: inline-flex;
    align-items: center;
    background: var(--track-bg);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
  }

  .article-meta {
    font-size: 12px;
    color: var(--text-secondary);
  }

  /* ---------- Grille de cartes article ---------- */

  .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }

  .article-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--divider);
    box-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ombre-carte);
  }

  .article-card-visuel {
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .article-card-visuel span {
    font-size: 42px;
  }

  .article-card-texte {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .article-card-texte h3 {
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.35;
    margin: 0;
  }

  .article-card-texte p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .articles-vide {
    color: var(--text-secondary);
    font-size: 14px;
  }

  /* ---------- Colonne "Les plus lus" ---------- */

  .articles-aside {
    background: var(--card);
    border-radius: 16px;
    padding: 20px 22px;
    border: 1px solid var(--divider);
    box-shadow: none;
    position: sticky;
    top: 24px;
  }

  .articles-aside h2 {
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: 17px;
    margin: 0 0 14px;
  }

  .plus-lus-liste {
    list-style: none;
    counter-reset: plus-lus;
    margin: 0;
    padding: 0;
  }

  .plus-lus-liste li {
    counter-increment: plus-lus;
    border-top: 1px solid var(--divider);
  }

  .plus-lus-liste li:first-child {
    border-top: none;
  }

  .plus-lus-liste a {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 12px 0;
    text-decoration: none;
    color: var(--text);
  }

  .plus-lus-liste a::before {
    content: counter(plus-lus);
    font-family: var(--police-titre);
    font-weight: 700;
    font-size: 20px;
    color: var(--divider);
    flex-shrink: 0;
  }

  .plus-lus-liste a:hover .plus-lus-titre {
    color: var(--green);
  }

  .plus-lus-titre {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
  }

  .plus-lus-categorie {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 3px;
  }

  .plus-lus-liste a > span {
    display: flex;
    flex-direction: column;
  }

  /* ---------- Page détail article ---------- */

  .article-detail {
    max-width: 68ch;
    margin: 0 auto;
  }

  .article-retour {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    margin: 6px 0 18px;
  }

  .article-retour:hover {
    color: var(--green);
  }

  .article-detail h1 {
    font-family: var(--police-titre);
    font-weight: 700;
    font-size: 38px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: var(--esp-2) 0 var(--esp-1);
  }

  .article-detail-visuel {
    height: 200px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0 6px;
  }

  .article-detail-visuel span {
    font-size: 64px;
  }

  /* Chapo : plus gros que le corps, en gris soutenu. Il resume, il ne
     concurrence pas le titre. */
  .article-chapo {
    font-size: 19px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: var(--esp-3) 0 var(--esp-4);
    padding-bottom: var(--esp-3);
    border-bottom: 1px solid var(--divider);
  }

  .article-detail p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    margin: 0 0 var(--esp-3);
    text-wrap: pretty;
  }

  /* Intertitres : script-articles.js transforme une ligne commencant par
     "## " en h2. Les articles existants, qui n'en ont pas, sont inchanges. */
  .article-detail h2 {
    font-family: var(--police-titre);
    font-weight: 700;
    font-size: 23px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    /* Marge haute nettement superieure a la marge basse : le titre appartient
       visuellement au texte qui suit, pas a celui qui precede. */
    margin: var(--esp-6) 0 var(--esp-2);
  }

  /* ---------- "À lire ensuite" ---------- */

  .articles-suite {
    max-width: 960px;
    margin: 44px auto 0;
  }

  .articles-suite h2 {
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: 20px;
    margin: 0 0 16px;
  }

  /* ---------- Responsive ---------- */

  @media (max-width: 860px) {
    .articles-layout {
      grid-template-columns: 1fr;
    }
    .articles-aside {
      position: static;
    }
  }

  @media (max-width: 720px) {
    /* Pages Articles : pas de menu compte ici, la nav reste complète mais compacte. */
    .nav-link {
      padding: 7px 11px;
      font-size: 13px;
    }
  }

/* ---------- Barre de progression de lecture (article.html) ---------- */
.lecture-progression {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 200;
  /* Pilotee au scroll : pas de transition, sinon la barre traine derriere
     le doigt sur mobile. */
}

/* ---------- Vraies photos d'article ----------
   Le visuel n'est plus un emoji sur un aplat : c'est une photo, cadrée par
   le conteneur. Les articles sans photo gardent l'ancien repli. */
.visuel-photo { overflow: hidden; background: var(--track-bg); }
.visuel-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
