/* Compléments pour le site public branché sur l'API (classes PHP). */

.header-note { color: var(--muted); }

.head-user {
  font-size: 13px; font-weight: 600; color: var(--niza);
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.notice {
  background: var(--niza-soft); border: 1px solid #cfe0f5; color: #123f70;
  border-radius: 12px; padding: 14px 16px; font-size: 13.5px; line-height: 1.55;
  margin: 18px 0;
}
.notice a { color: var(--niza); font-weight: 700; text-decoration: underline; }
.notice.bad { background: var(--bad-soft); border-color: #f3c9c9; color: #8a1c1c; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 26px 0 16px; }
.page-head h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.4px; }
.page-head p { margin: 0; font-size: 13px; color: var(--muted); }

.search-inline { display: flex; gap: 8px; align-items: center; }
.search-inline input {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13.5px; min-width: 220px; outline: none; background: #fff;
}
.search-inline input:focus { border-color: var(--niza-2); box-shadow: 0 0 0 3px rgba(20,99,176,.12); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--niza-soft); color: var(--niza); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 600;
}

/* ---- Cartes article ---- */
.card-media {
  position: relative; display: block; aspect-ratio: 4 / 3;
  background: #f6f8fb; overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-size: 26px; font-weight: 800; color: #b7c6da; letter-spacing: 1px;
  background: repeating-linear-gradient(135deg, #f4f7fb 0 10px, #eef3f9 10px 20px);
}
.card-badge { position: absolute; top: 10px; left: 10px; }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.3; display: block; }
.card-title:hover { color: var(--niza); }
.card-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 12px;
}
.card-foot .price { font-size: 15px; font-weight: 800; color: var(--niza); }
.card-foot .price span { font-size: 11px; font-weight: 600; color: var(--muted); }

.empty-state {
  background: #fff; border: 1px dashed var(--line); border-radius: 14px;
  padding: 44px 16px; text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0;
}
.empty-state a { color: var(--niza); font-weight: 700; }

.pager { display: flex; justify-content: center; gap: 10px; margin: 24px 0 40px; }

/* ---- Produit ---- */
.crumb { display: inline-block; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.crumb:hover { color: var(--niza); }
.product-media {
  background: #f6f8fb; border: 1px solid var(--line); border-radius: 16px;
  aspect-ratio: 1 / 1; overflow: hidden; display: grid; place-items: center;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-ph {
  font-size: 46px; font-weight: 800; color: #b7c6da;
  background: repeating-linear-gradient(135deg, #f4f7fb 0 12px, #eef3f9 12px 24px);
  width: 100%; height: 100%; display: grid; place-items: center;
}
.product-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.product-state { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.add-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.qty-field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: #334155; }
.qty-field input {
  width: 120px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; outline: none;
}

/* ---- Panier ---- */
.cart-wrap { display: block; margin-top: 18px; }
table.cart { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 13.5px; }
table.cart th, table.cart td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
table.cart th { background: #fafcfe; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
table.cart .num, table.cart th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.cart tfoot td { background: #fafcfe; font-weight: 700; }
.qty-inline { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.qty-inline input { width: 80px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.cart-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 4px; }

/* ---- Auth ---- */
.auth { max-width: 440px; margin: 40px auto; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 21px; }
.auth-card p { margin: 0 0 18px; font-size: 13px; }
.btn-block { width: 100%; }

.muted { color: var(--muted); }
.small { font-size: 11.5px; }

@media (max-width: 860px) {
  .product { grid-template-columns: 1fr; }
  .product-media { aspect-ratio: 16 / 10; }
  .page-head { align-items: flex-start; }
  .search-inline input { min-width: 0; width: 100%; }
}

/* Paliers de prix volume + messages panier (W2 reel) */
.notice-warn { background: #fff7e6; border-color: #f5d9a8; color: #7a4a06; }
.tiers { width: 100%; max-width: 380px; border-collapse: collapse; margin: 10px 0 6px; font-size: 14px; }
.tiers th, .tiers td { padding: 6px 8px; border-bottom: 1px solid var(--line, #e6e6e6); text-align: left; }
.tiers td.num, .tiers th.num { text-align: right; }
.price .from { font-size: 12px; font-weight: 600; color: var(--muted, #6b7280); }
