/* =====================================================
   single.php — Template article
===================================================== */

.single-post {
  width: 100%;
}

/* ---- Lien retour ---- */
.single-post__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Loos_bold", sans-serif;
  font-size: 0.95rem;
  color: var(--color-primary);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: opacity .15s ease;
}

.single-post__back:hover {
  opacity: 0.7;
}

/* ---- Layout 2 colonnes ---- */
.single-post__layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4rem;
  align-items: start;
}

/* ---- Colonne principale ---- */
.single-post__title {
  font-family: "Loos_bold", sans-serif;
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #1a1a1a;
  text-shadow: none;
}

.single-post__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "poppins_regular", sans-serif;
  font-size: 0.88rem;
  color: #999;
  margin-bottom: 1.6rem;
}

.single-post__sep {
  color: #ccc;
}

.single-post__thumbnail {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.single-post__thumbnail-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ---- Contenu de l'article ---- */
.single-post__content {
  font-family: "poppins_regular", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #2a2a2a;
}

.single-post__content p {
  margin-bottom: 1.2em;
}

.single-post__content h2 {
  font-family: "Loos_bold", sans-serif;
  font-size: 1.6rem;
  margin: 2rem 0 0.8rem;
  color: #1a1a1a;
}

.single-post__content h3 {
  font-family: "Loos_bold", sans-serif;
  font-size: 1.25rem;
  margin: 1.6rem 0 0.6rem;
  color: #1a1a1a;
}

.single-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 1.5rem 0;
}

.single-post__content ul,
.single-post__content ol {
  padding-left: 1.4rem;
  margin-bottom: 1.2em;
}

.single-post__content li {
  margin-bottom: 0.4em;
}

.single-post__content a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ---- Sidebar ---- */
.single-post__sidebar {
  /* position gérée par JS (smooth sticky) — fallback CSS si JS inactif */
  position: sticky;
  top: 2rem;
}

.single-post__sidebar-inner {
  background: var(--color-muted, #e9e2d8);
  border-radius: 20px;
  padding: 1.8rem;
}

.single-post__sidebar-title {
  font-family: "Loos_bold", sans-serif;
  font-size: 1.15rem;
  color: #1a1a1a;
  margin-bottom: 1.4rem;
}

/* ---- Carte article sidebar ---- */
.sidebar-actu {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: opacity .15s ease;
}

.sidebar-actu:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-actu:first-of-type {
  padding-top: 0;
}

.sidebar-actu:hover {
  opacity: 0.7;
}

.sidebar-actu__img {
  flex: 0 0 90px;
  width: 90px;
  height: 70px;
  border-radius: 10px;
  overflow: hidden;
}

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

.sidebar-actu__body {
  flex: 1;
  min-width: 0;
}

.sidebar-actu__title {
  font-family: "Loos_bold", sans-serif;
  font-size: 0.97rem;
  line-height: 1.35;
  margin: 0 0 0.4rem;
  color: #1a1a1a;

  /* Tronque à 2 lignes */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-actu__date {
  font-size: 0.8rem;
  color: #999;
  font-family: "poppins_regular", sans-serif;
}

.sidebar-actu__empty {
  font-size: 0.88rem;
  color: #999;
  font-family: "poppins_regular", sans-serif;
  margin: 0;
}

/* =====================================================
   Responsive
===================================================== */

@media (max-width: 900px) {
  .single-post__layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .single-post__sidebar {
    position: static;
  }

  .single-post__title {
    font-size: 2rem;
  }
}

@media (max-width: 560px) {
  .single-post__title {
    font-size: 1.7rem;
  }

  .single-post__thumbnail {
    border-radius: 12px;
  }

  .single-post__sidebar-inner {
    padding: 1.2rem;
  }
}
