/* ================================================
   Blog — Cabinet Pr M. Bouame
   Complément de style.css
   ================================================ */

/* --- Liste des articles --- */
.blog-hero {
  padding: 80px 0 40px;
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(193,58,78,.08) 0%, transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--paper-off) 100%);
  text-align: center;
}
.blog-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--ink-900);
  margin-bottom: 14px;
}
.blog-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-500);
  font-size: 1.05rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  padding: 20px 0 60px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

.post-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-soft);
}
.post-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--red-50);
}
.post-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__tag {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(255,255,255,.95);
  color: var(--red-800);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.post-card__body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--ink-900);
  margin-bottom: 10px;
}
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--red-800); }
.post-card__excerpt {
  color: var(--ink-500);
  font-size: .93rem;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}
.post-card__more {
  color: var(--red-800);
  font-weight: 600;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card__more::after {
  content: "→";
  transition: transform .2s ease;
}
.post-card__more:hover::after { transform: translateX(3px); }

/* --- Article individuel --- */
.article {
  padding: 50px 0 70px;
  background: #fff;
}
.article__header {
  max-width: 780px;
  margin: 0 auto 36px;
  text-align: center;
}
.article__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--red-800);
  font-size: .78rem;
  letter-spacing: .18em;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.article__eyebrow a { color: var(--red-800); }
.article__title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.8vw, 2.9rem);
  line-height: 1.15;
  color: var(--ink-900);
  margin: 0 0 18px;
  font-weight: 600;
}
.article__meta {
  color: var(--ink-400);
  font-size: .88rem;
  letter-spacing: .02em;
}
.article__meta span + span::before {
  content: "•";
  margin: 0 10px;
  color: var(--red-500);
}
.article__cover {
  max-width: 1000px;
  margin: 0 auto 40px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}
.article__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.article__content {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink-700);
  font-size: 1.05rem;
  line-height: 1.8;
}
.article__content h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--ink-900);
  margin: 44px 0 14px;
  line-height: 1.25;
  position: relative;
  padding-left: 18px;
}
.article__content h2::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 4px;
  background: linear-gradient(180deg, var(--red-800), var(--red-500));
  border-radius: 2px;
}
.article__content h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--ink-900);
  margin: 28px 0 10px;
}
.article__content p { margin: 0 0 16px; }
.article__content strong { color: var(--ink-900); }
.article__content ul, .article__content ol {
  padding-left: 22px;
  margin: 0 0 18px;
}
.article__content li { margin-bottom: 8px; }
.article__content blockquote {
  margin: 26px 0;
  padding: 18px 22px;
  background: var(--red-50);
  border-left: 4px solid var(--red-800);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--ink-900);
  font-style: italic;
}
.article__content figure {
  margin: 26px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.article__content figure img { width: 100%; display: block; }
.article__content figcaption {
  padding: 10px 14px;
  background: var(--paper-off);
  font-size: .85rem;
  color: var(--ink-400);
  text-align: center;
  border-top: 1px solid var(--line-soft);
}

/* Callout appel à l'action en fin d'article */
.article__cta {
  max-width: 760px;
  margin: 50px auto 0;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--red-900) 0%, var(--red-800) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 200'><path d='M0 100 L150 100 L180 50 L210 150 L240 30 L280 170 L320 100 L800 100' fill='none' stroke='white' stroke-opacity='0.1' stroke-width='2'/></svg>");
  background-size: 600px 150px;
  background-repeat: repeat-x;
  background-position: center;
  opacity: .7;
  pointer-events: none;
}
.article__cta > * { position: relative; }
.article__cta h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #fff;
  margin: 0 0 10px;
}
.article__cta p { margin: 0 0 20px; color: rgba(255,255,255,.88); }
.article__cta .btn--primary {
  background: #fff;
  color: var(--red-800);
}
.article__cta .btn--primary:hover { color: var(--red-900); }
.article__cta .btn--outline {
  background: transparent;
  border-color: rgba(255,255,255,.6);
  color: #fff;
}
.article__cta .btn--outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Navigation articles précédent / suivant */
.article__nav {
  max-width: 760px;
  margin: 40px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.article__nav a {
  color: var(--ink-700);
  font-weight: 500;
  font-size: .92rem;
}
.article__nav a:hover { color: var(--red-800); }

/* Animation ECG discrète dans la cover */
.ecg-line {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  height: 36px;
  color: rgba(255,255,255,.7);
  pointer-events: none;
}
.ecg-line path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: ecg-draw 4s ease-out forwards;
}
@keyframes ecg-draw {
  to { stroke-dashoffset: 0; }
}

/* Lecture : mise en évidence des chiffres-clés */
.keyfig {
  display: inline-block;
  padding: 1px 8px;
  background: var(--red-50);
  color: var(--red-900);
  border-radius: 6px;
  font-weight: 600;
}
