/* Grille portfolio uniforme, image à hauteur fixe, bloc adaptatif */
.pxl-grid-item, div.pxl-grid-item {
  box-sizing: border-box;
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 30px;
  display: block;
}

.pxl-grid-item .item--featured img,
.pxl-grid-item .item--featured {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 12px 12px 0 0;
  background: #222;
}

.pxl-grid-item .pxl-item--inner {
  background: transparent;
  display: block;
}

.pxl-grid-item .item--meta {
  margin-top: 10px;
  margin-bottom: 0;
}

.pxl-grid-item .pxl-item--title {
  font-size: 1.1em;
  line-height: 1.2;
  color: #fff;
  margin: 12px 0 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

@media (max-width: 1024px) {
  .pxl-grid-item, div.pxl-grid-item {
    width: 48vw;
    height: 55vh;
  }
}
@media (max-width: 600px) {
  .pxl-grid-item, div.pxl-grid-item {
    width: 98vw;
    height: 55vw;
  }
}

div.pxl-grid-item {
	margin-bottom: 30px;
	
}


.item--meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px; /* espace avant le nom du client */
}

.item--meta-top .item-date {
    font-size: 12px;
    font-weight: 500;
    font-family: "DM Sans", sans-serif; /* Assurez-vous que la police est chargée */
    color: #fff;
    letter-spacing: 0.1em;
    text-align: left;
    /* même style que .item--category, sauf couleur si tu veux la différencier */
}

.item--meta-top .item--category {
    text-align: center;
    font-size: 16px;
    color: #fff;
    font-weight: 300;
}

.item--category {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  border-radius: 2em;
  padding: 0.25em 0.9em 0.25em 0.6em;
  font-size: 1em;
  font-weight: 400;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.03);
  transition: background 0.2s;
}

.item--category .cat-icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.3em;
  vertical-align: middle;
  object-fit: contain;
}

.item--category img.cat-icon {
  width: 1.2em;
  height: 1.2em;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.item--category .cat-motion + a,
.item--category .cat-motion + span,
.item--category .cat-motion {
  color: #c05cff !important;
}
.item--category .cat-videos + a,
.item--category .cat-videos + span,
.item--category .cat-videos {
  color: #f22f46 !important;
}
.item--category .cat-graphisme + a,
.item--category .cat-graphisme + span,
.item--category .cat-graphisme {
  color: #4895ed !important;
}
.item--category .cat-photos + a,
.item--category .cat-photos + span,
.item--category .cat-photos {
  color: #d4f22f !important;
}
.item--category .cat-web + a,
.item--category .cat-web + span,
.item--category .cat-web {
  color: #ffc000 !important;
}

.item--category .cat-agents-ia + a,
.item--category .cat-agents-ia + span,
.item--category .cat-agents-ia {
  color: #dd7671 !important;
}
/* 📱 Ajustement responsive mobile */
@media (max-width: 600px) {
  /* Hauteur auto pour éviter les superpositions */
  .pxl-grid-item, div.pxl-grid-item {
    height: auto;
    padding-bottom: 10px; /* espace sous le texte */
  }

  /* Fix: affichage correct de l'image */
  .pxl-grid-item .item--featured,
  .pxl-grid-item .item--featured img {
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
  }

  /* Inner : ajouter du padding au texte */
  .pxl-grid-item .pxl-item--inner {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* Titre lisible et fluide */
  .pxl-grid-item .pxl-item--title {
    font-size: 1em;
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .item--meta-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .item--meta-top .item-date,
  .item--meta-top .item--category {
    font-size: 0.9em;
    text-align: left;
  }

  .item--category {
    padding: 0.2em 0.6em;
    font-size: 0.9em;
    gap: 0.4em;
  }

  .item--category .cat-icon {
    width: 1em;
    height: 1em;
  }
}
