/* ============================================================
   Boutique en ligne ACV Tech — styles complémentaires
   (à côté de css/style.css, ne remplace rien)
   ============================================================ */

/* ---------- Compteur sur l'icône panier ---------- */
.nav-button-panier {position: fixed;}
.bp-count {
    position: absolute; top: -4px; right: -6px;
    min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: #d02626; color: #fff;
    font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
    box-sizing: border-box; pointer-events: none;
}

/* ---------- Panier latéral ---------- */
.bp-mini { width: 92%; margin: 10px auto 0; }
.bp-mini__item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,.12);
}
.bp-mini__img { flex: 0 0 70px; display: flex; justify-content: center; }
.bp-mini__img img { max-width: 70px; max-height: 70px; object-fit: contain; }
.bp-mini__info { flex: 1; min-width: 0; }
.bp-mini__nom { display: block; font-weight: 700; font-size: 15px; color: inherit; text-decoration: none; line-height: 1.25; }
.bp-mini__prix { font-size: 13px; color: #666; margin: 3px 0 6px; }
.bp-mini__row { display: flex; align-items: center; gap: 10px; }
.bp-mini__total { font-weight: 700; margin-left: auto; white-space: nowrap; }
.bp-mini__del {
    border: 0; background: transparent; color: #c53030; font-size: 16px;
    cursor: pointer; padding: 4px 6px;
}

.bp-qty { display: inline-flex; align-items: center; border: 1px solid #bbb; border-radius: 6px; overflow: hidden; background: #fff; }
.bp-qty button {
    width: 30px; height: 30px; border: 0; background: #f1f1f1; cursor: pointer;
    font-size: 18px; line-height: 1; color: #222;
}
.bp-qty button:hover { background: #e2e2e2; }
.bp-qty button:disabled { opacity: .5; cursor: wait; }
.bp-qty span { min-width: 34px; text-align: center; font-weight: 700; color: #222; }

/* ---------- Messages ---------- */
.bw-alert {
    width: min(1100px, 92%); margin: 20px auto; padding: 14px 18px;
    border-radius: 10px; border: 1px solid; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.45;
    box-sizing: border-box;
}
.bw-alert--ok    { background: #eaf7ee; border-color: #8fd19e; color: #1d5b2c; }
.bw-alert--warn  { background: #fff8e1; border-color: #f0c36d; color: #6b4e00; }
.bw-alert--err   { background: #fdecec; border-color: #f1a1a1; color: #7a1c1c; }
.bw-alert--info  { background: #eef4fb; border-color: #a8c5e8; color: #1f3f66; }

/* ---------- Bloc validation commande ---------- */
.bw-card {
    width: min(1100px, 92%); margin: 25px auto; padding: 20px 22px;
    background: #fff; border: 1px solid #e3e3e3; border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05); box-sizing: border-box; color: #222;
}
.bw-card h3 { margin: 0 0 14px; font-size: clamp(18px, 2vw, 22px); }

.bw-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.bw-mode { display: block; cursor: pointer; }
.bw-mode input { position: absolute; opacity: 0; pointer-events: none; }
.bw-mode__box {
    border: 2px solid #ddd; border-radius: 12px; padding: 14px; height: 100%;
    box-sizing: border-box; transition: border-color .15s, background .15s;
}
.bw-mode input:checked + .bw-mode__box { border-color: #2f855a; background: #0263001f; }
.bw-mode__titre { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.bw-mode__sub { font-size: 14px; color: #555; line-height: 1.35; }

.bw-field { margin-bottom: 14px; }
.bw-field label { display: block; font-weight: 600; margin-bottom: 5px; }
.bw-field input[type=text], .bw-field textarea {
    width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #ccc;
    border-radius: 8px; font: inherit; font-size: 15px;
}
.bw-field textarea { min-height: 70px; resize: vertical; }

.bw-totaux { width: 100%; max-width: 420px; margin-left: auto; border-collapse: collapse; font-size: 16px; }
.bw-totaux td { padding: 6px 4px; border: 0 !important; }
.bw-totaux td:last-child { text-align: right; white-space: nowrap; }
.bw-totaux .bw-grand td { font-size: 20px; font-weight: 800; border-top: 2px solid #222 !important; padding-top: 10px; }
.bw-muted { color: #666; font-size: 14px; }

.bw-cgv { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-size: 15px; line-height: 1.4; }
.bw-cgv input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; }

.bw-btn {
    display: inline-block; border: 0; border-radius: 10px; cursor: pointer;
    padding: 14px 26px; font-size: 18px; font-weight: 700; text-decoration: none; text-align: center;
}
.bw-btn--go { background: #2f855a; color: #fff; }
.bw-btn--go:hover { background: #276749; }
.bw-btn--go:disabled { background: #9ac5ad; cursor: wait; }
.bw-btn--ghost { background: #eee; color: #222; }
.bw-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 10px; }

/* ---------- Modale adresse ---------- */
.bw-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; z-index: 10000; padding: 16px; }
.bw-modal.is-open { display: flex; }
.bw-modal__box { background: #fff; color: #222; border-radius: 14px; padding: 22px; width: min(520px, 100%); max-height: 90vh; overflow: auto; box-sizing: border-box; }
.bw-modal__box h3 { margin-top: 0; }
.bw-grid2 { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

/* ---------- Badges statut (si absents de style.css) ---------- */
.bw-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }

/* ---------- Liste commandes client ---------- */
.bw-cmd-list { width: min(1100px, 92%); margin: 20px auto; display: grid; gap: 12px; }
.bw-cmd {
    display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; gap: 10px; align-items: center;
    padding: 16px 18px; background: #fff; border: 1px solid #e3e3e3; border-radius: 12px;
    color: #222; text-decoration: none; transition: box-shadow .15s;
}
.bw-cmd:hover { box-shadow: 0 3px 12px rgba(0,0,0,.1); }
.bw-cmd__ref { font-weight: 800; font-size: 18px; }
.bw-cmd__total { font-weight: 700; font-size: 17px; }
@media (max-width: 700px) {
    .bw-cmd { grid-template-columns: 1fr 1fr; }
}

/* ---------- Suivi ---------- */
.bw-suivi { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 12px auto 5px; width: min(900px, 92%); }
.bw-suivi__step { flex: 1; min-width: 110px; text-align: center; font-size: 13px; color: #999; }
.bw-suivi__step::before { content: ''; display: block; height: 6px; border-radius: 3px; background: #ddd; margin-bottom: 6px; }
.bw-suivi__step.is-done { color: #2f855a; font-weight: 700; }
.bw-suivi__step.is-done::before { background: #2f855a; }

/* ============================================================
   Récapitulatif commande (voir-commande.php)
   ============================================================ */
.bw-order {
    width: min(1400px, 93%);
    margin: 35px auto 10px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
    overflow: hidden;
    color: #222;
}
.bw-order *, .bw-order *::before { box-sizing: border-box; }

.bw-order__head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding: 18px 24px; border-bottom: 1px solid #eee;
}
.bw-order__head h3 { margin: 0; font-size: clamp(18px, 1.8vw, 21px); }
.bw-order__count { color: #777; font-size: 14px; }

.bw-order__items { padding: 4px 24px; }
.bw-item {
    display: flex; align-items: center; gap: 18px; padding: 16px 0;
    border-bottom: 1px solid #f0f0f0; color: inherit; text-decoration: none;
}
.bw-item:last-child { border-bottom: 0; }
.bw-item:hover .bw-item__nom { text-decoration: underline; }

.bw-item__img {
    position: relative; flex: 0 0 76px; width: 76px; height: 76px;
    border: 1px solid #eee; border-radius: 12px; background: #fafafa;
    display: flex; align-items: center; justify-content: center;
}
.bw-item__img img { max-width: 64px; max-height: 64px; object-fit: contain; }
.bw-item__qbadge {
    position: absolute; top: -8px; right: -8px; min-width: 24px; height: 24px; padding: 0 6px;
    border-radius: 12px; background: #333; color: #fff; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.bw-item__info { flex: 1; min-width: 0; }
.bw-item__nom { font-weight: 700; font-size: 16px; line-height: 1.3; }
.bw-item__calc { color: #777; font-size: 14px; margin-top: 4px; }
.bw-item__total { font-weight: 700; font-size: 17px; white-space: nowrap; }

.bw-order__foot {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 24px;
    padding: 20px 24px 24px; background: #fafafa; border-top: 1px solid #eee;
}
.bw-order__infos { display: flex; flex-direction: column; gap: 12px; }
.bw-info span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #888; margin-bottom: 2px; }
.bw-info strong { font-weight: 600; font-size: 15px; }

.bw-sum { background: #fff; border: 1px solid #e6e6e6; border-radius: 12px; padding: 16px 18px; }
.bw-sum__row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 15px; color: #444; }
.bw-sum__free { color: #2f855a; font-weight: 700; }
.bw-sum__total {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    margin-top: 10px; padding-top: 12px; border-top: 2px solid #222;
    font-size: 22px; font-weight: 800;
}
.bw-sum__tva { margin-top: 6px; font-size: 13px; color: #888; text-align: right; }

@media (max-width: 700px) {
    .bw-order__head, .bw-order__items, .bw-order__foot { padding-left: 16px; padding-right: 16px; }
    .bw-order__foot { grid-template-columns: minmax(0, 1fr); }
    .bw-order__foot .bw-sum { order: -1; }
    .bw-item { gap: 12px; }
    .bw-item__img { flex-basis: 60px; width: 60px; height: 60px; }
    .bw-item__img img { max-width: 50px; max-height: 50px; }
    .bw-item__nom { font-size: 15px; }
}