/* ============================================================
   Douceo Shop — styles communs panier / commande / confirmation
   (chargé uniquement sur les pages Shop ; reprend les variables de style.css)
   ============================================================ */

/* Icône panier dans la nav */
.nav-v2-inner > .nav-v2-links { order: 2; margin-left: auto; }
.shop-nav-cart { order: 3; position: relative; margin-left: 1.5rem; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 999px; color: var(--text); background: #fff; border: 1px solid var(--border-glass); transition: all 0.2s; }
.shop-nav-cart:hover { border-color: var(--accent); color: var(--accent); }
.shop-nav-cart-count { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: linear-gradient(135deg, #1E88E5, #26A69A); color: #fff; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.shop-nav-cart-count[hidden] { display: none; }
.shop-nav-account { order: 3; margin-left: 1.5rem; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 999px; color: var(--text); background: #fff; border: 1px solid var(--border-glass); transition: all 0.2s; }
.shop-nav-account + .shop-nav-cart { margin-left: 0.5rem; }
.shop-nav-account:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 768px) {
  .shop-nav-cart { position: fixed; top: 1rem; right: 4.25rem; z-index: 10001; margin: 0; }
  .shop-nav-account { position: fixed; top: 1rem; right: 7.5rem; z-index: 10001; margin: 0; }
}

/* Notification "ajouté au panier" */
.shop-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: #fff; padding: 0.85rem 1.25rem; border-radius: 999px; font-size: 0.9rem; font-weight: 600; z-index: 10002; transition: all 0.3s var(--ease); box-shadow: 0 10px 30px rgba(10,30,46,0.25); max-width: calc(100% - 2rem); text-align: center; }
.shop-toast.show { opacity: 1; transform: translate(-50%, 0); }
.shop-toast a { color: #7cc4ff; text-decoration: none; margin-left: 0.3rem; }

/* Mise en page des pages panier / commande */
.shop-page { max-width: 1200px; margin: 0 auto; padding: 7rem 3rem 4rem; }
.shop-page h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; margin: 0.5rem 0 1.5rem; }
.shop-breadcrumb { font-size: 0.85rem; color: var(--text-secondary); }
.shop-breadcrumb a { color: var(--accent); text-decoration: none; }
.shop-layout { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 2rem; align-items: start; }
.shop-box { background: #fff; border: 1px solid var(--border-glass); border-radius: var(--radius-xl); padding: 1.5rem; }
.shop-box + .shop-box { margin-top: 1.25rem; }
.shop-box h2 { font-size: 1.1rem; margin: 0 0 1rem; }
.shop-muted { color: var(--text-muted); font-size: 0.85rem; }
.shop-loading { padding: 2rem; text-align: center; color: var(--text-muted); }
.shop-error { background: #fdecea; color: #b42318; border-radius: var(--radius); padding: 0.9rem 1.1rem; font-size: 0.9rem; margin: 1rem 0; }

/* Lignes du panier */
.cart-line { display: grid; grid-template-columns: 84px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border-glass); }
.cart-line:last-child { border-bottom: 0; }
.cart-line-img { width: 84px; height: 84px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(30,136,229,0.05), rgba(38,166,154,0.06)); display: flex; align-items: center; justify-content: center; padding: 6px; }
.cart-line-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cart-line-name { font-weight: 700; color: var(--text); text-decoration: none; display: block; margin-bottom: 0.25rem; }
.cart-line-unit { color: var(--text-muted); font-size: 0.85rem; }
.cart-line-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.6rem; flex-wrap: wrap; }
.cart-line-total { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.cart-remove { background: none; border: 0; color: var(--text-muted); font-size: 0.82rem; cursor: pointer; text-decoration: underline; font-family: var(--font); padding: 0; }
.cart-remove:hover { color: #b42318; }
.shop-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--border-glass); border-radius: 999px; overflow: hidden; }
.shop-qty button { background: #fff; border: 0; width: 32px; height: 36px; font-size: 1rem; font-weight: 600; cursor: pointer; color: var(--text); }
.shop-qty button:hover { background: var(--bg-secondary); }
.shop-qty span { min-width: 30px; text-align: center; font-weight: 700; }

/* Récapitulatif */
.sum-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; font-size: 0.95rem; color: var(--text-secondary); }
.sum-row.total { border-top: 1px solid var(--border-glass); margin-top: 0.5rem; padding-top: 0.9rem; font-size: 1.15rem; font-weight: 800; color: var(--text); }
.sum-row.vat { font-size: 0.8rem; color: var(--text-muted); padding-top: 0; }
.sum-item { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; padding: 0.35rem 0; }
.shop-select, .shop-field input, .shop-field select, .shop-field textarea { width: 100%; padding: 0.75rem 0.9rem; border: 1.5px solid var(--border-glass); border-radius: 12px; font-family: var(--font); font-size: 1rem; background: #fff; color: var(--text); }
.shop-select:focus, .shop-field input:focus, .shop-field select:focus, .shop-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,136,229,0.12); }
.shop-btn { width: 100%; padding: 0.95rem 1.25rem; border-radius: 999px; font-weight: 700; font-size: 1rem; cursor: pointer; border: 0; font-family: var(--font); background: linear-gradient(135deg, #1E88E5, #26A69A); color: #fff; box-shadow: 0 6px 18px rgba(30,136,229,0.3); display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; transition: all 0.2s; margin-top: 1rem; }
.shop-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(30,136,229,0.4); }
.shop-btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }
.shop-btn.secondary { background: var(--bg-secondary); color: var(--text); box-shadow: none; }
.shop-trust { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.82rem; color: var(--text-secondary); }

/* Formulaire de commande */
.shop-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.shop-field { display: flex; flex-direction: column; gap: 0.35rem; }
.shop-field.full { grid-column: 1 / -1; }
.shop-field label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.shop-field.invalid input, .shop-field.invalid select { border-color: #d92d20; }
.shop-check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; margin-top: 0.9rem; }
.shop-check input { margin-top: 0.25rem; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); }
.shop-check.invalid { color: #b42318; }
.shop-check[hidden] { display: none; }
.shop-check a { color: var(--accent); }

/* Confirmation */
.shop-status { text-align: center; padding: 2rem 1rem 1rem; }
.shop-status-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; background: linear-gradient(135deg, #1E88E5, #26A69A); }
.shop-status-icon.bad { background: #d92d20; }
.shop-status-icon.wait { background: var(--text-muted); }

.shop-empty { text-align: center; padding: 3rem 1rem; }
.shop-empty p { color: var(--text-secondary); margin-bottom: 1.25rem; }

@media (max-width: 900px) {
  .shop-page { padding: 6rem 1.5rem 3rem; }
  .shop-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .shop-fields { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 64px 1fr; }
  .cart-line-img { width: 64px; height: 64px; }
  .cart-line-total { grid-column: 2; }
}
