/* ====== SEARCH PAGE (compacte) ====== */

/* Conteneur principal plus étroit */
.search-shell{
  max-width: 760px;              /* ⬅️ moins large qu'avant (880) */
  margin: 36px auto 48px;
  background: #fff;
  border-radius: 16px;
  padding: 22px 16px 26px;
  box-shadow: 0 6px 24px rgba(14,14,72,.06);
}

/* En-tête & barre */
.search-header{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}
.search-title{
  font-family: 'Designer', BebasNeue, system-ui, sans-serif;
  letter-spacing: .02em;
  font-size: 1.9rem;
  color: #0e0e48;
  margin: 0;
}
.search-form{
  display: flex;
  gap: 10px;
  align-items: center;
}
.search-form input{
  flex: 1 1 220px;
  max-width: 320px;              /* ⬅️ plus court */
  height: 38px;
  border-radius: 10px;
  border: 1px solid #e6e8ee;
  padding: 0 12px;
  font-size: .98rem;
  background: #fafbff;
}
.search-form.retry{
  justify-content: center;
  margin-top: 8px;
}
.search-intro{
  font-size: .96rem;
  color: #5b6f95;
  margin: 2px 0 4px;
}

/* ===== Résultats ===== */
.search-results{
  padding: 14px 10px 18px;
}

/* Grille compacte (petites vignettes) */
.poster-grid.compact{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* ⬅️ 140px */
  gap: 12px;                                                     /* ⬅️ plus serré */
  align-items: start;
}

/* Carte compacte */
.poster-card{
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(14,14,72,.05);
  padding: 8px;                                                  /* ⬅️ plus fin */
  transition: transform .15s ease, box-shadow .15s ease;
}
.poster-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14,14,72,.09);
}

/* ⚠️ On supprime l’ancienne contrainte énorme (height:420px) */
.search-card .thumb{ height: auto; max-height: none; } /* neutralise l’ancienne règle si elle traîne */

/* Vignette poster */
.thumb-wrap{
  width: 100%;
  aspect-ratio: 3/4;             /* ratio affiche */
  border-radius: 10px;
  overflow: hidden;
  background: #f4f6fb;
}
.thumb-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Texte compact */
.poster-card .meta{ line-height: 1.25; }
.poster-card .title{
  font-size: .92rem;              /* ⬅️ plus petit */
  font-weight: 700;
  color: #0e0e48;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px;
}
.poster-card .sub{
  font-size: .8rem;               /* ⬅️ plus petit */
  color: #5b6f95;
  margin: 0 0 4px;
}
.poster-card .price{
  font-size: .88rem;              /* ⬅️ plus petit */
  font-weight: 700;
  margin-top: 2px;
}

/* Actions mini */
.poster-card .actions{
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.btn.xs{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .8rem;
  line-height: 1;
}

/* États vides & relance */
.search-empty{
  text-align: center;
  padding: 20px 8px 8px;
  color: #516188;
}
.search-empty .empty-emoji{
  font-size: 1.8rem;
  margin-bottom: 6px;
}
.search-tryagain{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.search-tryagain input{
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #e6e9f2;
  font-size: .98rem;
  width: 260px;
}

/* Petites suggestions */
.search-suggestions{
  margin-top: 10px;
  font-size: .9rem;
  color: #5b6f95;
}
.pill{
  border: 1px solid #e6e9f2;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  margin-left: 6px;
  cursor: pointer;
  transition: box-shadow .15s ease, transform .05s ease;
}
.pill:hover{ box-shadow: 0 2px 8px rgba(14,14,72,.08); }
.pill:active{ transform: translateY(1px); }

/* Responsive */
@media (max-width: 560px){
  .search-shell{ padding: 16px 12px 20px; margin: 22px auto; }
  .poster-grid.compact{ grid-template-columns: repeat(2, 1fr); }
  .search-form input{ max-width: 100%; }
}
