/**
 * File: article.css
 * Theme: PIP'N'HUB
 * Description: Styles contenus articles
 * Author: krafsht
 */

/* ========== ARTICLE CONTAINER ========== */
.post-content,
.entry-content {
  max-width: var(--content-max);
  margin: 0 auto;
}

.post-content p,
.entry-content p {
  text-align: justify;
  hyphens: auto;
}

/* ========== ARTICLE META ========== */
.article-meta {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.article-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.article-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  margin: var(--space-md) 0;
}

.article-title::after {
  display: none;
}

.article-meta-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-family: var(--font-accent);
  color: var(--color-text-light);
}

.article-meta-info i {
  color: var(--color-secondary);
}

.article-updated {
  font-size: var(--text-sm);
  font-family: var(--font-accent);
  color: var(--color-text-light);
}

.article-updated i {
  color: var(--color-secondary);
}

/* ========== IMAGES ========== */
.post-content img,
.entry-content img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: var(--space-lg) 0;
}

.post-content figure,
.entry-content figure {
  margin: var(--space-lg) 0;
}

.post-content .alignwide,
.entry-content .alignwide {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.post-content .alignfull,
.entry-content .alignfull {
  max-width: none;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

/* ========== LIENS ========== */
.post-content a,
.entry-content a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  transition: var(--transition);
}

.post-content a:hover,
.entry-content a:hover {
  text-decoration-thickness: 3px;
  color: var(--color-secondary-dark);
}

/* ========== SEPARATEURS HR ========== */
.post-content hr,
.entry-content hr {
  height: 1px;
  border: none;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-border) 20%,
    var(--color-secondary) 50%,
    var(--color-border) 80%,
    transparent
  );
  margin: var(--space-2xl) 0;
}

/* ========== TABLES ========== */
.post-content table,
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: var(--text-sm);
}

.post-content th,
.entry-content th {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-sm);
  text-align: left;
  font-weight: var(--font-bold);
}

.post-content td,
.entry-content td {
  padding: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.post-content tr:hover,
.entry-content tr:hover {
  background: var(--color-bg-alt);
}

/* ========== NOTES / ASIDES ========== */
.post-content .note,
.entry-content .note,
.post-content aside,
.entry-content aside {
  padding: var(--space-md);
  margin: var(--space-lg) 0;
  border-left: 3px solid var(--color-secondary);
  background: linear-gradient(
    to right,
    rgba(193, 41, 185, 0.05),
    transparent
  );
  border-radius: var(--border-radius);
}

/* ========== TABLE DES MATIERES ========== */
.table-of-contents {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
}

.table-of-contents h3 {
  margin-top: 0;
  padding-left: 0;
}

.table-of-contents h3::before {
  display: none;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  padding: var(--space-xs) 0;
}

.toc-item a {
  color: var(--color-text);
  text-decoration: none;
  transition: var(--transition);
}

.toc-item a:hover {
  color: var(--color-secondary);
  padding-left: var(--space-xs);
}

/* ========== RELATED POSTS ========== */
.related-posts {
  margin-top: var(--space-2xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.related-posts h2 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ========== VIDEO CONTAINER ========== */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: var(--space-xl) 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: #000;
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
  .article-meta-info {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .article-meta-info span::after {
    display: none;
  }
}

/* Image featured pleine largeur */
.post-thumbnail.full-width {
  margin-inline: calc((100vw - var(--container-max)) / -2);
  max-width: 100vw;
  overflow: hidden;
}

.post-thumbnail.container-width {
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--border-radius);
  text-align: center;
}

.post-thumbnail.container-width .article-featured-image {
  display: block;
  margin: 0 auto;
}

.post-thumbnail.full-width .article-featured-image {
  width: 100%;
  height: auto;
  display: block;
  /*max-height: 520px;
  object-fit: cover;*/
}

/* ========== LAYOUT TRADKER ========== */
.split-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin-bottom: var(--space-xl);
}

.split-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
}

.split-shops {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.split-shops h3 {
  margin-top: 0;
}

.tradker {
  display: block;
}

.tradker a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.tradker a:hover {
  border-color: var(--color-secondary);
  box-shadow: var(--shadow);
}

.tradker img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

@media (max-width: 767px) {
  .split-container {
    grid-template-columns: 1fr;
  }
}

/* ========== LÉGENDE IMAGE DE COUVERTURE ========== */
figure.post-thumbnail {
  margin: 0;
}

.post-thumbnail-caption {
  display: block;
  margin-top: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  font-style: italic;
  text-align: center;
  border-left: 3px solid var(--color-secondary);
  background: var(--color-bg-alt);
}
