/* =====================================================================
   Publier une offre (admin) — complète offre.css / styles.css
   ===================================================================== */

.pub-hero-sub { margin: 0.375rem 0 0; font-size: 0.875rem; color: #6b5f6b; max-width: 42rem; }


.pub-uc { font-size: 0.6875rem; color: #6b5f6b; background: #f2eff1; border-radius: 62rem; padding: 0.0625rem 0.5rem; margin-left: 0.375rem; font-weight: 600; }

/* --- Étoile « mise en avant » sur la carte catalogue --- */
.pub-star-card {
  width: 1.625rem; height: 1.625rem; flex: 0 0 1.625rem; display: inline-flex; align-items: center; justify-content: center;
  border: 0.0625rem solid var(--wsh-border); border-radius: 50%; background: #fff; color: #c9bfc7;
  cursor: pointer; padding: 0; transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.pub-star-card svg { width: 0.875rem; height: 0.875rem; }
.pub-star-card:hover { color: #e0a100; border-color: #e0a100; }
.pub-star-card.is-on { color: #e0a100; background: #fff8e1; border-color: #e0a100; }

/* --- Modale de composition --- */
.wsh-modal.wsh-modal-admin.pub-modal { max-width: 74rem; width: 96vw; }
.pub-modal .admin-modal-grid { margin-top: 0.5rem; }

.pub-visibilite { width: 100%; min-width: 0; flex: none; }
.pub-visibilite .wsh-multiselect-btn { width: 100%; text-align: left; }
.pub-aide { display: block; margin-top: 0.25rem; font-size: 0.71875rem; color: #8a7e88; }

/* Sélection d'un article : seul le contour violet change (aucun fond, aucune recoloration,
   aucune modification de la photo). */
.wsh-card.wsh-in-cart {
  background: var(--wsh-bg-card);
  border-color: var(--wsh-primary);
  box-shadow: 0 0 0 0.0625rem var(--wsh-primary);
}
.wsh-card.wsh-in-cart .wsh-card-side { background: var(--wsh-bg-soft); }
.wsh-card.wsh-in-cart .wsh-prix-line { background: var(--wsh-bg-soft); color: #8f7d8c; }
.wsh-card.wsh-in-cart .wsh-prix-line em { color: #a898a5; }
.wsh-card.wsh-in-cart .wsh-prix-line strong { color: var(--wsh-primary); }
.wsh-card.wsh-in-cart .offre-prix-barre { color: #a898a5; }
.wsh-card.wsh-in-cart .offre-prix-nouveau-inline { color: var(--wsh-red); }
.wsh-photo, .wsh-photo-frame { transition: none !important; transform: none !important; }

/* --- Boutons --- */
.pub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4375rem;
  padding: 0.5625rem 1.0625rem; border-radius: 62rem; border: 0.0625rem solid transparent;
  font: inherit; font-size: 0.8125rem; font-weight: 600; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease, color .15s ease;
}
.pub-btn svg { width: 0.9375rem; height: 0.9375rem; flex-shrink: 0; }
.pub-btn:active { transform: scale(0.97); }
.pub-btn:disabled { opacity: .55; cursor: default; }
.pub-btn:focus-visible { outline: 0.125rem solid var(--wsh-primary-light); outline-offset: 0.125rem; }
.pub-btn-primary { background: var(--wsh-primary); color: #fff; box-shadow: 0 0.25rem 0.875rem rgba(74,32,80,.2); }
.pub-btn-primary:hover:not(:disabled) { background: var(--wsh-primary-light); box-shadow: 0 0.375rem 1.125rem rgba(74,32,80,.26); }
.pub-btn-soft { background: #fff; color: var(--wsh-primary); border-color: var(--wsh-border); }
.pub-btn-soft:hover:not(:disabled) { background: var(--wsh-bg-soft); border-color: var(--wsh-primary-light); }
.pub-btn-lg { padding: 0.6875rem 1.375rem; font-size: 0.875rem; }

.pub-remise-barre { display: flex; justify-content: flex-end; margin: 0.75rem 0 0.5rem; }
.pub-remise-modal { max-width: 36rem; width: 94vw; }
.pub-remise-aide { margin: 0 0 0.75rem; }
.pub-remise-champ { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin: 0.5rem 0 1rem; }
.pub-remise-champ > label { font-size: 0.875rem; font-weight: 700; color: var(--wsh-primary); }
.pub-remise-input {
  display: inline-flex; align-items: center; gap: 0.25rem; background: #fff;
  border: 0.0625rem solid var(--wsh-border); border-radius: 62rem; padding: 0.3125rem 0.875rem;
}
.pub-remise-input:focus-within { border-color: var(--wsh-primary-light); }
.pub-remise-input input { width: 4rem; text-align: right; border: none; outline: none; background: transparent; font: inherit; font-size: 0.9375rem; font-weight: 700; color: var(--wsh-primary); padding: 0; }
.pub-remise-input span { font-weight: 700; color: #6b5f6b; }

.pub-lignes-scroll { max-height: 23rem; overflow: auto; border: 0.0625rem solid var(--wsh-border-soft); border-radius: 0.75rem; margin-top: 0.5rem; }
.pub-lignes { width: 100%; border-collapse: collapse; font-size: 0.8125rem; min-width: 46rem; }
.pub-lignes th {
  position: sticky; top: 0; z-index: 2; background: var(--wsh-bg-soft);
  text-align: center; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; color: #6b5f6b;
  padding: 0.5rem 0.625rem; border-bottom: 0.0625rem solid var(--wsh-border-soft); white-space: nowrap;
}
.pub-lignes td { padding: 0.4375rem 0.625rem; border-bottom: 0.0625rem solid var(--wsh-border-soft); vertical-align: middle; }
.pub-lignes tr:last-child td { border-bottom: none; }
.pub-num { text-align: center !important; white-space: nowrap; }
.pub-col-star, .pub-col-suppr { width: 2.25rem; text-align: center; }

.pub-lignes input[type="number"], .pub-lignes input[type="text"] {
  border: 0.0625rem solid var(--wsh-border-soft); border-radius: 0.4375rem; padding: 0.3125rem 0.375rem;
  font: inherit; font-size: 0.8125rem; background: #fff;
}
.pub-lignes input[data-f="qte"] { width: 4.5rem; text-align: center; }
.pub-lignes input[data-f="prix"] { width: 5rem; text-align: center; }
.pub-lignes input[data-f="remise"] { width: 3.75rem; text-align: center; }
.pub-lignes input[data-f="badge"] { width: 9.5rem; text-align: center; }
.pub-lignes th:nth-child(2) { text-align: left; }
.pub-remise-cell span { margin-left: 0.1875rem; color: #6b5f6b; }
.pub-base { color: #8a7e88; }
.pub-total-ligne { font-weight: 700; color: var(--wsh-primary); }

.pub-art-nom { font-weight: 600; color: #2a2a2a; }
.pub-art-sub { font-size: 0.71875rem; color: #8a7e88; margin-top: 0.0625rem; }
.pub-art-alerte { font-size: 0.71875rem; color: var(--wsh-red); font-weight: 600; margin-top: 0.125rem; }
.pub-lignes tr.is-hors-dispo { background: #fff6f6; }

.pub-star, .pub-suppr {
  width: 1.875rem; height: 1.875rem; border: none; background: transparent; border-radius: 0.5rem;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.pub-star { color: #c9bfc7; }
.pub-star svg { width: 1.0625rem; height: 1.0625rem; }
.pub-star:hover { color: #e0a100; background: #fff8e1; }
.pub-star.is-on { color: #e0a100; }
.pub-suppr { color: #a898a5; font-size: 1.25rem; line-height: 1; }
.pub-suppr:hover { color: var(--wsh-red); background: var(--wsh-red-bg); }

.pub-totaux {
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 0.25rem 1.25rem;
  padding: 0.75rem 0.25rem 0.25rem; font-size: 0.8125rem; color: #5a4a5c;
}
.pub-totaux strong { font-size: 1rem; color: var(--wsh-primary); }
.pub-eco { color: var(--wsh-green); font-weight: 700; }

.pub-actions { flex-wrap: wrap; gap: 0.625rem; align-items: center; }

@media (max-width: 640px) {
  .pub-lignes-scroll { max-height: 18rem; }
  .pub-actions .pub-btn { flex: 1 1 100%; }
}

/* Prix de l'offre modifiable directement sur la carte, même après ajout. */
.wsh-card .offre-prix-input { width: 4.375rem; text-align: center; }
.wsh-card .offre-prix-input.is-modifie { color: var(--wsh-red); font-weight: 700; }
.wsh-card .offre-prix-modif-slot em .offre-prix-barre { margin-left: 0.25rem; color: #a898a5; }

/* Champ « Visibilité » : même hauteur et même largeur que le champ date voisin. */
#pub-date-fin,
.pub-visibilite .wsh-multiselect-btn {
  box-sizing: border-box; width: 100%; height: 2.75rem;
  border: 0.09375rem solid var(--wsh-border); border-radius: 0.625rem;
  font: inherit; font-size: 0.84375rem; background: #fff;
}
#pub-date-fin { padding: 0 0.875rem; }
.pub-visibilite .wsh-multiselect-btn {
  padding: 0 1.875rem 0 0.875rem; line-height: 2.5625rem; font-weight: 400; color: #2b1f2b;
}
.pub-visibilite .wsh-multiselect-btn:hover { background: #fff; border-color: var(--wsh-primary-light); }
.pub-visibilite.wsh-open .wsh-multiselect-btn { border-color: var(--wsh-primary-light); }

/* Fenêtre « Appliquer une remise » : les deux boutons côte à côte, de même taille. */
.pub-remise-modal .pub-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.pub-remise-modal .pub-actions .pub-btn {
  width: 100%; min-height: 2.75rem; white-space: normal; text-align: center; line-height: 1.2; padding: 0.5rem 0.75rem;
}
@media (max-width: 640px) {
  .pub-remise-modal .pub-actions .pub-btn { flex: none; font-size: 0.75rem; }
}
