/* G373 — desktop project cards rebalanced for Guide reference width */
@media (min-width:900px){
  body.projets-page #listingContainer{gap:14px!important;}
  body.projets-page .project-card .card-body{
    display:grid!important;
    grid-template-columns:128px minmax(250px,1.15fr) minmax(300px,.95fr) minmax(285px,1fr)!important;
    grid-template-rows:auto auto 1fr!important;
    column-gap:24px!important;
    row-gap:5px!important;
    align-items:center!important;
    min-height:156px!important;
    padding:18px 20px!important;
    position:relative!important;
  }
  body.projets-page .project-card .listing-photo-user{
    position:static!important;
    grid-column:1!important;
    grid-row:1 / 4!important;
    align-self:center!important;
    justify-self:start!important;
    width:118px!important;
    height:84px!important;
    max-height:none!important;
    margin:0!important;
    transform:none!important;
    border-radius:12px!important;
    object-fit:cover!important;
    object-position:center!important;
  }
  body.projets-page .project-card .listing-kicker{
    grid-column:2!important;grid-row:1!important;
    padding-left:0!important;margin:0!important;align-self:end!important;
  }
  body.projets-page .project-card .card-title-static{
    grid-column:2!important;grid-row:2!important;
    padding-left:0!important;margin:0!important;
    font-size:18px!important;line-height:1.12!important;
    word-break:normal!important;overflow-wrap:normal!important;hyphens:none!important;
  }
  body.projets-page .project-card .card-location{
    grid-column:2!important;grid-row:3!important;
    padding-left:0!important;margin:3px 0 0!important;align-self:start!important;
  }
  body.projets-page .project-card .stats.v18-stats{
    grid-column:3!important;grid-row:1 / 4!important;
    align-self:center!important;margin:0!important;width:100%!important;
  }
  body.projets-page .project-card .group-progress{
    grid-column:4!important;grid-row:1 / 3!important;
    align-self:end!important;margin:0 0 8px!important;width:100%!important;
  }
  body.projets-page .project-card .owner{
    grid-column:4!important;grid-row:3!important;
    align-self:start!important;margin:0!important;padding-top:11px!important;width:100%!important;
  }
  body.projets-page .project-card:not(:has(.listing-photo-user)) .listing-kicker,
  body.projets-page .project-card:not(:has(.listing-photo-user)) .card-title-static,
  body.projets-page .project-card:not(:has(.listing-photo-user)) .card-location{grid-column:1 / 3!important;}
  body.projets-page .project-card:not(:has(.listing-photo-user)) .stats.v18-stats{grid-column:3!important;}
}
@media (min-width:900px) and (max-width:1180px){
  body.projets-page .project-card .card-body{
    grid-template-columns:110px minmax(220px,1.1fr) minmax(250px,.9fr) minmax(250px,1fr)!important;
    column-gap:18px!important;
  }
  body.projets-page .project-card .listing-photo-user{width:100px!important;height:76px!important;}
}

/* G374 — remove the legacy photo offset now that the desktop card uses a real grid. */
@media (min-width:900px){
  body.projets-page .project-card:has(.listing-photo-user) .listing-kicker,
  body.projets-page .project-card:has(.listing-photo-user) .card-title-static,
  body.projets-page .project-card:has(.listing-photo-user) .card-location{
    padding-left:0!important;
  }
  body.projets-page .project-card .card-body{
    grid-template-columns:118px minmax(280px,1.15fr) minmax(300px,.95fr) minmax(285px,1fr)!important;
    column-gap:18px!important;
  }
}


/* G375 — compact desktop card header: age and featured badge stay top-right. */
@media (min-width:900px){
  body.projets-page .project-card .card-body{
    grid-template-columns:118px minmax(300px,1.12fr) minmax(300px,.95fr) minmax(285px,1fr)!important;
    column-gap:14px!important;
    padding-top:20px!important;
  }
  body.projets-page .project-card .project-card-top-meta{
    position:absolute!important;
    top:14px!important;
    right:20px!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    white-space:nowrap!important;
    z-index:2!important;
  }
  body.projets-page .project-card .project-card-top-meta .pioneer-featured-badge{margin:0!important;}
  body.projets-page .project-card .project-card-top-meta .project-age{margin:0!important;}
  body.projets-page .project-card .listing-kicker{padding-right:0!important;}
}

/* G376 — contain the right column and slightly reduce listing titles. */
@media (min-width:900px){
  body.projets-page .project-card .card-body{
    grid-template-columns:118px minmax(270px,1.08fr) minmax(285px,.92fr) minmax(0,1.08fr)!important;
    column-gap:14px!important;
    overflow:hidden!important;
  }
  body.projets-page .project-card .card-title-static{
    font-size:16.5px!important;
    line-height:1.14!important;
  }
  body.projets-page .project-card .group-progress,
  body.projets-page .project-card .owner{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.projets-page .project-card .group-progress * ,
  body.projets-page .project-card .owner *{
    min-width:0;
    box-sizing:border-box;
  }
  body.projets-page .project-card .group-progress > div,
  body.projets-page .project-card .group-progress .progress,
  body.projets-page .project-card .group-progress .progress-bar{
    max-width:100%!important;
  }
  body.projets-page .project-card .project-card-top-meta{
    right:18px!important;
    max-width:calc(100% - 36px)!important;
  }
}

/* G377 — desktop containment fix: reserve a real safe area on the right. */
@media (min-width:900px){
  body.projets-page .project-card .card-body{
    grid-template-columns:118px minmax(230px,.95fr) minmax(260px,.9fr) minmax(300px,1.12fr)!important;
    column-gap:14px!important;
    padding:20px 28px 18px 20px!important;
    overflow:visible!important;
  }
  body.projets-page .project-card .card-title-static{
    font-size:15px!important;
    line-height:1.16!important;
  }
  body.projets-page .project-card .group-progress,
  body.projets-page .project-card .owner{
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:visible!important;
    padding-right:0!important;
  }
  body.projets-page .project-card .group-progress-top{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
  }
  body.projets-page .project-card .group-progress-top strong{
    flex:1 1 auto!important;
    min-width:0!important;
  }
  body.projets-page .project-card .group-progress-top span{
    flex:0 1 auto!important;
    min-width:0!important;
    max-width:48%!important;
    white-space:normal!important;
    text-align:right!important;
    overflow-wrap:break-word!important;
  }
  body.projets-page .project-card .group-progress-track-v18{
    width:100%!important;
    max-width:100%!important;
  }
  body.projets-page .project-card .owner{
    padding-right:0!important;
  }
  body.projets-page .project-card .owner-actions{
    flex:0 0 auto!important;
    margin-left:8px!important;
  }
  body.projets-page .project-card .project-card-top-meta{
    right:28px!important;
  }
}

/* G378 — featured badge beside category; desktop titles stay on one line and shrink to fit. */
@media (min-width:900px){
  body.projets-page .project-card .listing-kicker{
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    min-width:0!important;
    white-space:nowrap!important;
  }
  body.projets-page .project-card .listing-kicker .pioneer-featured-badge{
    margin:0!important;
    flex:0 0 auto!important;
  }
  body.projets-page .project-card .card-title-static{
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
    max-width:100%!important;
    font-size:15px!important;
  }
  body.projets-page .project-card .project-card-top-meta{
    top:15px!important;
  }
}

/* G423 — desktop project thumbnails: true vertical centering inside each card. */
@media (min-width:900px){
  body.projets-page .project-card .listing-photo-user{
    position:absolute!important;
    left:20px!important;
    top:50%!important;
    width:112px!important;
    height:80px!important;
    margin:0!important;
    align-self:auto!important;
    justify-self:auto!important;
    transform:translateY(-50%)!important;
    object-fit:cover!important;
    object-position:center center!important;
  }
}
@media (min-width:900px) and (hover:hover) and (pointer:fine){
  body.projets-page .project-card:hover .listing-photo-user,
  body.projets-page .project-card:focus-within .listing-photo-user{
    transform:translateY(-50%) scale(1.04)!important;
  }
}

/* G426 — keep G423 layout; add visible breathing room to the right of desktop thumbnails. */
@media (min-width:900px){
  body.projets-page .project-card .listing-photo-user{
    left:20px!important;
    top:50%!important;
    width:100px!important;
    height:74px!important;
    transform:translateY(-50%)!important;
  }
}
@media (min-width:900px) and (hover:hover) and (pointer:fine){
  body.projets-page .project-card:hover .listing-photo-user,
  body.projets-page .project-card:focus-within .listing-photo-user{
    transform:translateY(-50%) scale(1.04)!important;
  }
}
