/**
 * Blog Elsässer — typographie long texte, tableaux, citations, code.
 * Chargé uniquement sur /blog et /blog/*.
 * Cohérent avec la palette (--els-*) et les composants existants.
 */

.blog-prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: rgba(0, 0, 0, 0.8);
}

.blog-prose > * + * {
  margin-top: 1.25em;
}

.blog-prose h2 {
  font-family: var(--font-display, "Syne", system-ui, sans-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: #000;
  margin-top: 2.25em;
  margin-bottom: 0.5em;
  line-height: 1.25;
}

.blog-prose h3 {
  font-family: var(--font-display, "Syne", system-ui, sans-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: #000;
  margin-top: 1.75em;
  margin-bottom: 0.4em;
}

.blog-prose a {
  color: var(--els-magenta, #db0055);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-prose a:hover {
  color: var(--els-orange, #ff510b);
}

.blog-prose strong {
  font-weight: 600;
  color: #000;
}

.blog-prose ul,
.blog-prose ol {
  padding-left: 1.35em;
}

.blog-prose li + li {
  margin-top: 0.35em;
}

.blog-prose blockquote {
  margin: 1.75em 0;
  padding: 0.85em 1.15em;
  border-left: 3px solid var(--els-magenta, #db0055);
  background: #faf7f8;
  color: rgba(0, 0, 0, 0.7);
  font-style: italic;
}

.blog-prose blockquote p {
  margin: 0;
}

.blog-prose blockquote p + p {
  margin-top: 0.75em;
}

.blog-prose pre,
.blog-prose code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.9em;
}

.blog-prose code {
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
}

.blog-prose pre {
  overflow-x: auto;
  padding: 1rem 1.15rem;
  border-radius: 8px;
  background: #111;
  color: #f5f5f5;
  line-height: 1.55;
}

.blog-prose pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 0.875rem;
}

.blog-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.75em 0;
}

.blog-prose th,
.blog-prose td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.65em 0.85em;
  text-align: left;
  vertical-align: top;
}

.blog-prose th {
  background: #faf7f8;
  font-weight: 600;
  color: #000;
}

.blog-prose hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 2.5em 0;
}

.blog-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.45);
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.blog-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none;
}

.blog-tag:hover {
  border-color: var(--els-magenta, #db0055);
  color: var(--els-magenta, #db0055);
}

.blog-card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
}

@media (min-width: 640px) {
  .blog-card {
    grid-template-columns: minmax(0, 11.5rem) minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
  }

  .blog-card:not(:has(.blog-card__media)) {
    grid-template-columns: minmax(0, 1fr);
  }
}

.blog-card__media {
  overflow: hidden;
  border-radius: 0.85rem;
  background: #f3eef0;
  aspect-ratio: 16 / 9;
}

.blog-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__body {
  min-width: 0;
}

.blog-card:hover .blog-card__title {
  color: var(--els-magenta, #db0055);
}

.blog-card__title {
  font-family: var(--font-display, "Syne", system-ui, sans-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: #000;
  transition: color 0.15s ease;
}

.blog-card__excerpt {
  margin-top: 0.5rem;
  color: rgba(0, 0, 0, 0.65);
  line-height: 1.6;
}

.blog-banner {
  margin: 1.75rem 0 0;
  overflow: hidden;
  border-radius: 1rem;
  background: #f3eef0;
  aspect-ratio: 16 / 9;
}

.blog-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
}

.blog-share a,
.blog-share button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.75);
  text-decoration: none;
  cursor: pointer;
}

.blog-share a:hover,
.blog-share button:hover {
  border-color: var(--els-magenta, #db0055);
  color: var(--els-magenta, #db0055);
}

.blog-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-related__list {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}

.blog-related__link {
  color: var(--els-magenta, #db0055);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.blog-upcoming {
  margin-top: 3rem;
  padding-top: 2rem;
}

.blog-cta {
  margin-top: 3rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #faf7f8;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .blog-cta {
    padding: 2rem;
  }
}

.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  align-items: center;
}

.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  min-width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.7);
}

.blog-pagination a:hover {
  border-color: var(--els-magenta, #db0055);
  color: var(--els-magenta, #db0055);
}

.blog-pagination .is-active {
  background: var(--els-magenta, #db0055);
  border-color: var(--els-magenta, #db0055);
  color: #fff;
}

.blog-pagination .is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

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

/* Home — bandeau derniers articles */
.home-blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 0;
  border-radius: 1rem;
  border: 1px solid rgba(219, 0, 85, 0.14);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-blog-card__media {
  overflow: hidden;
  background: #f3eef0;
  aspect-ratio: 16 / 9;
}

.home-blog-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.35rem 1.25rem;
}
.home-blog-card:hover {
  border-color: rgba(219, 0, 85, 0.35);
  box-shadow: 0 12px 28px rgba(153, 0, 95, 0.08);
  transform: translateY(-2px);
}
.home-blog-card:hover .home-blog-card__title {
  color: var(--els-magenta, #db0055);
}
.home-blog-card__title {
  font-family: "El Messiri", serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  color: #111;
  transition: color 0.15s ease;
}
.home-blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: rgba(17, 17, 17, 0.45);
}
.home-blog-card__excerpt {
  margin-top: 0.75rem;
  flex: 1 1 auto;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(17, 17, 17, 0.65);
}
.home-blog-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--els-magenta, #db0055);
}
