/* Content Engine Blog — front-office styles. Scoped under .ce-blog* so it
   never bleeds into the shop's own theme rules. */

.ce-blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.ce-blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ce-blog-cat-link {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 13px;
  text-decoration: none;
  color: inherit;
}

.ce-blog-cat-link.active {
  background: #222;
  color: #fff;
  border-color: #222;
}

.ce-blog-rss-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  text-decoration: none;
  color: inherit;
}

.ce-blog-empty {
  padding: 40px 0;
  text-align: center;
  color: #777;
}

.ce-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.ce-blog-card {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.ce-blog-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ce-blog-card-cover {
  width: 100%;
  padding-top: 56%;
  background-size: cover;
  background-position: center;
  background-color: #f2f2f2;
}

.ce-blog-card-body {
  padding: 16px;
}

.ce-blog-card-cat {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  text-decoration: none;
}

.ce-blog-card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.ce-blog-card-excerpt {
  margin: 0 0 8px;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

.ce-blog-card-date {
  font-size: 12px;
  color: #999;
}

.ce-blog-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.ce-blog-pager-link {
  text-decoration: none;
  color: inherit;
  font-size: 14px;
}

.ce-blog-pager-status {
  font-size: 13px;
  color: #999;
}

.ce-blog-post-header {
  margin-bottom: 24px;
}

.ce-blog-post-title {
  margin: 8px 0;
  font-size: 32px;
  line-height: 1.25;
}

.ce-blog-post-cover {
  display: block;
  width: 100%;
  /* Bandeau plutôt qu'une image pleine hauteur : la hauteur est plafonnée
     et recadrée (object-fit: cover) quelle que soit la taille/orientation
     de l'image envoyée par Content Engine. */
  height: clamp(140px, 24vw, 320px);
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
}

.ce-blog-post-content {
  font-size: 16px;
  line-height: 1.7;
}

.ce-blog-post-content img {
  max-width: 100%;
  height: auto;
}

.ce-blog-post-back {
  margin-top: 32px;
}

/* ── Disposition « 2 colonnes » : contenu 2/3 + colonne de droite 1/3 ─────────
   Activée dans la configuration du module (Affichage de l'article). En une colonne,
   .ce-blog-layout n'ajoute aucun style. */

.ce-blog-layout--two {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.ce-blog-side-box {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
}

.ce-blog-side-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ce-blog-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ce-blog-side-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
}

.ce-blog-side-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: #e5e5e5;
}

.ce-blog-side-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ce-blog-side-item-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.ce-blog-side-link:hover .ce-blog-side-item-title {
  text-decoration: underline;
}

.ce-blog-side-date {
  font-size: 12px;
  color: #999;
}

.ce-blog-side-more {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 991px) {
  .ce-blog-layout--two {
    grid-template-columns: 1fr;
  }
}
