/* assets/css/panier.css */

.notice-bar {
  max-width: 1180px; margin: 1rem auto 0;
  padding: 0.85rem 1.5rem;
  border-radius: 10px; font-size: 0.9rem;
  display: flex; align-items: center; gap: 1rem;
}
.notice-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); color: #f59e0b; }
.notice-bar button { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; font-size: 1rem; }

.cart-section { padding: 2rem 2rem 6rem; background: var(--bg); }
.cart-inner { max-width: 1180px; margin: 0 auto; }

.cart-layout {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 2rem; align-items: start;
}

/* ─── ITEMS COLUMN ─── */
.cart-items-col { display: flex; flex-direction: column; gap: 1rem; }
.cart-items-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border);
  color: var(--muted); font-size: 0.88rem;
}
.clear-cart-btn {
  background: none; border: none; cursor: pointer;
  color: #ef4444; font-size: 0.85rem; font-family: 'DM Sans', sans-serif;
  opacity: 0.7; transition: opacity 0.2s;
}
.clear-cart-btn:hover { opacity: 1; }

#items-list { display: flex; flex-direction: column; gap: 1rem; }

.cart-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.cart-item:hover { border-color: var(--border-l); }

.item-img {
  width: 80px; height: 80px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden;
  background: var(--bg2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-img-placeholder { font-size: 2rem; opacity: 0.4; }

.item-info { flex: 1; min-width: 0; }
.item-info h4 {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem;
  color: var(--text); margin-bottom: 0.3rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-unit-price { color: var(--muted); font-size: 0.85rem; }

.item-actions { display: flex; align-items: center; gap: 1.25rem; flex-shrink: 0; }

.item-subtotal {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  min-width: 70px; text-align: right;
}

.item-remove {
  width: 32px; height: 32px;
  background: rgba(239,68,68,0.07); border: 1px solid rgba(239,68,68,0.15);
  border-radius: 8px; color: #ef4444;
  font-size: 0.8rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s; flex-shrink: 0;
}
.item-remove:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); }

/* ─── SUMMARY ─── */
.cart-summary { position: sticky; top: 90px; }

.summary-card {
  background: var(--card); border: 1px solid var(--border-l);
  border-radius: var(--radius); padding: 2rem;
}
.summary-card h3 {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.2rem;
  margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.summary-lines { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.summary-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-size: 0.88rem; color: var(--muted);
}
.summary-line span:last-child { font-weight: 500; color: var(--text); white-space: nowrap; }

.summary-total {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1rem; border-top: 1px solid var(--border);
  font-weight: 600; font-size: 0.95rem;
}

.continue-link {
  display: block; text-align: center; margin-top: 1rem;
  color: var(--muted); font-size: 0.85rem; text-decoration: none;
  transition: color 0.2s;
}
.continue-link:hover { color: var(--blue); }

.secure-badges {
  display: flex; gap: 0.75rem; justify-content: center;
  margin-top: 1rem; flex-wrap: wrap;
}
.secure-badges span {
  font-size: 0.78rem; color: var(--muted);
  padding: 0.3rem 0.75rem; border: 1px solid var(--border);
  border-radius: 100px;
}

@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .item-actions { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .cart-item { flex-direction: column; align-items: flex-start; }
  .item-img { width: 60px; height: 60px; }
  .item-actions { width: 100%; justify-content: space-between; }
}
