/* ============================================
   ANIMETRE — Styles partagés des articles de blog (article.css)
   Chargé après base.css sur toutes les pages d'article.
   Mobile-first : media queries en min-width uniquement.
   ============================================ */

/* ----- CONTENEUR ARTICLE (largeur optimale pour la lecture longue) ----- */
.article-container {
  max-width: 720px;
  margin: 0 auto;
}

/* ----- EN-TÊTE DE L'ARTICLE ----- */
.article-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.article-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--bg-dark);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

@media (min-width: 600px) {
  .article-header h1 { font-size: 34px; }
}

/* Métadonnées : date de publication + temps de lecture estimé */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 13px;
  color: var(--text-secondary);
}

/* ----- CORPS DU TEXTE ----- */
.article-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.article-body p {
  margin-bottom: var(--space-5);
}

.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--bg-dark);
  margin-top: var(--space-7);
  margin-bottom: var(--space-4);
  line-height: 1.25;
}

@media (min-width: 600px) {
  .article-body h2 { font-size: 26px; }
}

.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--bg-dark);
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
}

/* Liens dans le corps de l'article — accent corail + soulignement discret */
.article-body a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: rgba(232, 123, 88, 0.4);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.article-body a:hover {
  color: var(--bg-dark);
  text-decoration-color: var(--bg-dark);
}

/* ----- ENCADRÉS "Le savais-tu ?" et "Chiffre clé" ----- */
.encart {
  border-left: 4px solid var(--accent);
  background: #fff8f5;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
}

/* Libellé en petites capitales dans l'encadré */
.encart-titre {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: var(--bg-dark);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.encart p {
  font-size: 15px;
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* Variante "Chiffre clé" — bordure vert sapin, fond crème plus soutenu */
.encart-chiffre {
  border-left-color: var(--bg-dark);
  background: #f0ebe0;
}

/* ----- LISTE D'ÉQUIVALENCES D'ÂGE (responsive, préférable à <table>) ----- */
.age-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}

.age-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 15px;
  gap: var(--space-3);
}

.age-list li:last-child { border-bottom: none; }

/* Zébrage léger pour la lisibilité */
.age-list li:nth-child(even) { background: var(--bg-main); }

.age-list .age-chien  { color: var(--text-secondary); }
.age-list .age-humain { font-weight: 700; color: var(--bg-dark); white-space: nowrap; }

/* ----- LISTE DE COMPARAISON À DEUX COLONNES (responsive, préférable à <table>)
   Un critère par ligne, les deux options empilées sur mobile et côte à côte
   à partir de 600 px. Même habillage que .age-list pour rester cohérent. */
.compare-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}

.compare-list li {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 15px;
}

.compare-list li:last-child { border-bottom: none; }

.compare-list li:nth-child(even) { background: var(--bg-main); }

.compare-critere {
  display: block;
  font-weight: 700;
  color: var(--bg-dark);
  margin-bottom: var(--space-3);
}

.compare-valeurs {
  display: grid;
  gap: var(--space-2);
}

.compare-valeurs b {
  color: var(--bg-dark);
  font-weight: 700;
}

@media (min-width: 600px) {
  .compare-valeurs {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }
}

/* ----- TABLEAUX DE RÉFÉRENCE DANS LES ARTICLES -----
   Les pages article ne chargent pas tool.css. Même habillage que les
   tableaux d'outils (en-tête sapin, zébrage crème/blanc, cadre arrondi),
   avec colonnes égales et texte qui revient à la ligne. */
.article-body .tool-table-scroll {
  overflow-x: auto;
  margin: var(--space-4) 0 var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.article-body .age-table {
  width: 100%;
  min-width: 36rem;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}

.article-body .age-table col,
.article-body .age-table th,
.article-body .age-table td {
  width: 25%;
}

.article-body .age-table th,
.article-body .age-table td {
  padding: var(--space-3);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  border-bottom: 1px solid var(--border-subtle);
}

.article-body .age-table thead th {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  font-weight: 700;
  border-bottom: none;
}

.article-body .age-table th[scope="row"] {
  font-weight: 600;
  color: var(--text-primary);
}

.article-body .age-table tbody tr:nth-child(odd) {
  background: var(--bg-card);
}

.article-body .age-table tbody tr:nth-child(even) {
  background: #f0ebe0;
}

.article-body .age-table tbody tr:last-child th,
.article-body .age-table tbody tr:last-child td {
  border-bottom: none;
}

.article-body .age-table td {
  color: var(--text-secondary);
}

/* ----- CTA FINAL (encart call-to-action en conclusion d'article) ----- */
.article-cta {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  margin-top: var(--space-8);
  text-align: center;
}

.article-cta p {
  color: var(--text-muted-dark);
  font-size: 16px;
  margin-bottom: var(--space-4);
}

.article-cta a {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.article-cta a:hover {
  background: var(--accent-strong);
  color: white;
}

/* ----- VARIANTE : CTA placé en cours d'article (juste après l'introduction) -----
   Même habillage que le CTA de fin, avec des marges qui l'isolent du texte
   au-dessus comme en dessous, et une version plus compacte sur mobile. */
.article-cta--inline {
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
  padding: var(--space-5) var(--space-5);
}

.article-cta--inline p {
  font-size: 15px;
}

@media (max-width: 480px) {
  .article-cta--inline {
    padding: var(--space-4);
  }
  .article-cta--inline a {
    display: block;
    font-size: 15px;
    padding: 13px 20px;
  }
}
