/* ==========================================================================
   PrimeO — pages commerce (panier, checkout, résultat, recherche, saves, compare)
   ========================================================================== */

.pg-wrap { max-width: 1080px; margin: 0 auto; padding: 46px 22px 90px; }
.pg-head { margin-bottom: 34px; }
.pg-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--po-blue); margin-bottom: 8px; }
.pg-head h1 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 700; letter-spacing: -0.03em; color: var(--po-ink); }
.pg-head p { font-size: 16px; color: var(--po-ink-2); margin-top: 10px; max-width: 40em; line-height: 1.5; }

.pg-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .pg-grid { grid-template-columns: 1fr; } }

.pg-card {
  background: var(--po-card); border: 1px solid var(--po-sep); border-radius: 20px;
  padding: 22px; margin-bottom: 16px;
}
.pg-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }

/* ---- lignes produit ---- */
.pgl {
  display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--po-sep);
}
.pgl:last-child { border-bottom: none; }
.pgl .thumb {
  width: 72px; height: 72px; border-radius: 16px; flex-shrink: 0;
  background: var(--po-bg-alt); display: flex; align-items: center; justify-content: center;
}
.pgl .thumb .apei { font-size: 30px; color: var(--po-brand); }
.pgl .body { flex: 1; min-width: 0; }
.pgl .name { font-size: 15.5px; font-weight: 650; color: var(--po-ink); }
.pgl .meta { font-size: 12.5px; color: var(--po-ink-3); margin-top: 3px; }
.pgl .meta .ok { color: #248a3d; font-weight: 600; }
.pgl .meta .ko { color: #d70015; font-weight: 600; }
.pgl .links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.pgl .links button, .pgl .links a {
  border: none; background: none; cursor: pointer; padding: 0; font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--po-blue); text-decoration: none;
}
.pgl .links .mut { color: var(--po-ink-3); }

.pg-bundle-details { margin-top: 12px; }
.pg-bundle-details summary {
  cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--po-blue);
  list-style: none;
}
.pg-bundle-details summary::-webkit-details-marker { display: none; }
.pg-grade-group { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--po-sep); }
.pg-grade-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--po-ink-3); margin-bottom: 8px;
}
.pg-grade-line {
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--po-ink);
  padding: 6px 0;
}
.pg-grade-line span:first-child { flex: 1; min-width: 0; }
.pg-grade-line strong { font-size: 12.5px; white-space: nowrap; }
.pgl .right { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pgl .price { font-size: 16px; font-weight: 700; color: var(--po-ink); letter-spacing: -0.01em; }
.pgl .unit { font-size: 11.5px; color: var(--po-ink-3); }

.pg-qty { display: inline-flex; align-items: center; border-radius: 10px; background: var(--po-bg-alt); }
.pg-qty button {
  width: 30px; height: 30px; border: none; background: none; cursor: pointer;
  font-size: 16px; color: var(--po-ink); font-family: inherit; border-radius: 9px;
}
.pg-qty button:hover { background: rgba(0,0,0,0.06); }
.pg-qty span { min-width: 26px; text-align: center; font-size: 14px; font-weight: 600; }

/* ---- résumé / totals ---- */
.pg-summary { position: sticky; top: 70px; }
.pg-tot-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--po-ink-2); padding: 7px 0; }
.pg-tot-row strong { color: var(--po-ink); }
.pg-tot-row.total { border-top: 1px solid var(--po-sep); margin-top: 8px; padding-top: 14px; font-size: 17px; }
.pg-tot-row.total strong { font-size: 20px; letter-spacing: -0.02em; }
.pg-ship-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px;
  border: 1.5px solid var(--po-sep); border-radius: 12px; cursor: pointer;
  font-size: 13.5px; transition: all 0.15s;
}
.pg-ship-opt:hover { border-color: rgba(0,113,227,0.4); }
.pg-ship-opt.sel { border-color: var(--po-blue); background: rgba(0,113,227,0.04); }
.pg-ship-opt .radio {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid #c7c7cc; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.pg-ship-opt.sel .radio { border-color: var(--po-blue); }
.pg-ship-opt.sel .radio::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--po-blue); }
.pg-ship-opt .lbl { flex: 1; }
.pg-ship-opt .lbl small { display: block; color: var(--po-ink-3); font-size: 11.5px; }
.pg-ship-opt .p { font-weight: 700; }

.pg-coupon { display: flex; gap: 8px; margin-top: 12px; }
.pg-coupon input {
  flex: 1; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--po-sep);
  font-size: 13.5px; font-family: inherit; outline: none;
}
.pg-coupon input:focus { border-color: var(--po-blue); }
.pg-coupon button {
  padding: 11px 15px; border: none; border-radius: 11px; cursor: pointer;
  background: var(--po-bg-alt); font-weight: 600; font-size: 13px; font-family: inherit;
}

.pg-cta {
  display: flex; align-items: center; justify-content: center; width: 100%;
  margin-top: 14px; padding: 14px; border: none; border-radius: 13px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
  background: var(--po-blue); color: #fff; box-shadow: 0 5px 18px rgba(0,113,227,0.28);
  transition: transform 0.15s, background 0.2s;
}
.pg-cta:hover { background: var(--po-blue-hover); }
.pg-cta:active { transform: scale(0.985); }
.pg-cta.ghost { background: var(--po-bg-alt); color: var(--po-ink); box-shadow: none; }
.pg-cta[disabled] { opacity: 0.45; pointer-events: none; }

.pg-help-band {
  display: flex; align-items: center; gap: 12px; margin-top: 22px;
  padding: 15px 18px; border-radius: 14px; background: rgba(0,113,227,0.05);
  font-size: 13.5px; color: var(--po-ink-2);
}
.pg-help-band .apei { font-size: 20px; color: var(--po-blue); }
.pg-help-band button { border: none; background: none; color: var(--po-blue); font-weight: 600; cursor: pointer; font-family: inherit; font-size: 13.5px; padding: 0; }

.pg-empty { text-align: center; padding: 70px 20px; }
.pg-empty .apei { font-size: 52px; color: #d2d2d7; }
.pg-empty h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 18px 0 8px; }
.pg-empty p { color: var(--po-ink-3); font-size: 14.5px; margin-bottom: 24px; }
.pg-empty .pg-cta { display: inline-flex; width: auto; padding: 13px 28px; }

/* ---- reco / carrousel ---- */
.pg-reco { margin-top: 44px; }
.pg-reco h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 18px; }
.pg-reco-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pg-reco-card {
  background: var(--po-card); border: 1px solid var(--po-sep); border-radius: 18px; padding: 20px;
  display: flex; flex-direction: column; gap: 4px; transition: all 0.2s;
}
.pg-reco-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.pg-reco-card .apei { font-size: 30px; color: var(--po-brand); margin-bottom: 8px; }
.pg-reco-card strong { font-size: 14px; color: var(--po-ink); }
.pg-reco-card .p { font-size: 13px; font-weight: 700; color: var(--po-ink); margin: 4px 0 10px; }
.pg-reco-card button {
  margin-top: auto; padding: 9px; border: none; border-radius: 10px; cursor: pointer;
  background: rgba(0,113,227,0.08); color: var(--po-blue); font-weight: 600; font-size: 12.5px; font-family: inherit;
}
.pg-reco-card button:hover { background: rgba(0,113,227,0.14); }

/* ---- checkout ---- */
.pg-steps { display: flex; gap: 6px; margin-bottom: 28px; }
.pg-step {
  flex: 1; display: flex; align-items: center; gap: 9px; padding: 11px 14px;
  border-radius: 12px; background: var(--po-bg-alt); font-size: 13px; font-weight: 600; color: var(--po-ink-3);
}
.pg-step .n {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0;
}
.pg-step.active { background: rgba(0,113,227,0.08); color: var(--po-blue); }
.pg-step.active .n { background: var(--po-blue); color: #fff; }
.pg-step.done { color: #248a3d; }
.pg-step.done .n { background: #34c759; color: #fff; }

.pg-form label { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--po-ink-3); margin: 15px 2px 6px; }
.pg-form input, .pg-form select {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--po-sep);
  font-size: 14.5px; font-family: inherit; outline: none; background: var(--po-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pg-form input:focus { border-color: var(--po-blue); box-shadow: 0 0 0 3.5px rgba(0,113,227,0.13); }
.pg-form .row2c { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pg-form .hint { font-size: 12px; color: var(--po-ink-3); margin-top: 6px; line-height: 1.45; }
.pg-check { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 13.5px; color: var(--po-ink-2); cursor: pointer; }
.pg-check input { width: auto; }

.pg-pay-opt {
  display: flex; align-items: center; gap: 13px; padding: 15px 16px; margin-bottom: 8px;
  border: 1.5px solid var(--po-sep); border-radius: 14px; cursor: pointer; transition: all 0.15s;
}
.pg-pay-opt:hover { border-color: rgba(0,113,227,0.4); }
.pg-pay-opt.sel { border-color: var(--po-blue); background: rgba(0,113,227,0.04); }
.pg-pay-opt .radio {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #c7c7cc; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.pg-pay-opt.sel .radio { border-color: var(--po-blue); }
.pg-pay-opt.sel .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--po-blue); }
.pg-pay-opt .ico { font-size: 20px; color: var(--po-brand); }
.pg-pay-opt strong { display: block; font-size: 14.5px; color: var(--po-ink); }
.pg-pay-opt small { display: block; font-size: 12px; color: var(--po-ink-3); }
.pg-pay-detail { padding: 4px 4px 12px; }

.pg-sum-toggle {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 14px 16px; border: 1px solid var(--po-sep); border-radius: 14px;
  background: var(--po-card); cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600;
  margin-bottom: 14px;
}
.pg-sum-toggle .tot { color: var(--po-blue); }

.pg-addr-card {
  padding: 14px 16px; border-radius: 13px; background: var(--po-bg-alt);
  font-size: 13.5px; line-height: 1.5; color: var(--po-ink-2); margin-top: 10px;
}
.pg-addr-card strong { color: var(--po-ink); }

/* ---- confirmation ---- */
.pg-confirm-hero { text-align: center; padding: 34px 0 26px; }
.pg-confirm-hero .ok-ring {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 22px;
  background: rgba(52,199,89,0.12); display: flex; align-items: center; justify-content: center;
  animation: pg-pop 0.55s cubic-bezier(0.34,1.56,0.64,1);
}
.pg-confirm-hero .ok-ring .apei { font-size: 38px; color: #248a3d; }
@keyframes pg-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.pg-confirm-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.03em; }
.pg-confirm-hero p { color: var(--po-ink-2); margin-top: 10px; font-size: 16px; }
.pg-confirm-hero .ref { font-weight: 700; color: var(--po-ink); }
.pg-confirm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0; }
@media (max-width: 760px) { .pg-confirm-grid { grid-template-columns: 1fr; } }
.pg-confirm-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 20px; border-radius: 18px; background: var(--po-card); border: 1px solid var(--po-sep);
  text-decoration: none; transition: all 0.2s; cursor: pointer; font-family: inherit; text-align: left;
}
.pg-confirm-tile:hover { border-color: var(--po-blue); box-shadow: 0 10px 28px rgba(0,113,227,0.12); transform: translateY(-2px); }
.pg-confirm-tile .apei { font-size: 24px; color: var(--po-blue); margin-bottom: 8px; }
.pg-confirm-tile strong { font-size: 14.5px; color: var(--po-ink); }
.pg-confirm-tile span { font-size: 12.5px; color: var(--po-ink-3); line-height: 1.4; }

/* ---- recherche ---- */
.pg-search-bar {
  display: flex; align-items: center; gap: 13px; padding: 15px 20px; margin-bottom: 22px;
  border-radius: 16px; background: var(--po-card); border: 1px solid var(--po-sep);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04); color: var(--po-ink-3);
}
.pg-search-bar input { flex: 1; border: none; outline: none; font-size: 19px; font-family: inherit; color: var(--po-ink); background: transparent; }
.pg-filter-row { display: flex; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }
.pg-filter {
  padding: 8px 16px; border-radius: 99px; border: 1px solid var(--po-sep); background: var(--po-card);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; color: var(--po-ink-2);
  transition: all 0.15s;
}
.pg-filter.active { background: var(--po-ink); border-color: var(--po-ink); color: #fff; }
.pg-count { font-size: 13.5px; color: var(--po-ink-3); margin-bottom: 18px; }
.pg-result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pg-result-card {
  background: var(--po-card); border: 1px solid var(--po-sep); border-radius: 20px; padding: 22px;
  display: flex; flex-direction: column; transition: all 0.2s;
}
.pg-result-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0,0,0,0.08); }
.pg-result-card .thumb {
  width: 58px; height: 58px; border-radius: 15px; background: var(--po-bg-alt);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.pg-result-card .thumb .apei { font-size: 26px; color: var(--po-brand); }
.pg-result-card .cat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--po-blue); margin-bottom: 4px; }
.pg-result-card strong { font-size: 15px; color: var(--po-ink); letter-spacing: -0.01em; }
.pg-result-card p { font-size: 12.5px; color: var(--po-ink-3); margin: 5px 0 12px; line-height: 1.45; flex: 1; }
.pg-result-card .price { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.pg-result-card .acts { display: flex; gap: 6px; }
.pg-result-card .acts .buy {
  flex: 1; padding: 9px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--po-blue); color: #fff; font-weight: 600; font-size: 12.5px; font-family: inherit;
}
.pg-result-card .acts .mini {
  width: 36px; padding: 9px 0; border: none; border-radius: 10px; cursor: pointer;
  background: var(--po-bg-alt); color: var(--po-ink-2); font-family: inherit;
}
.pg-result-card .acts .mini.on { background: rgba(0,113,227,0.12); color: var(--po-blue); }

/* ---- saves (wishlist) ---- */
.pg-wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pg-wl-card {
  background: var(--po-card); border: 1px solid var(--po-sep); border-radius: 20px; padding: 24px;
  cursor: pointer; transition: all 0.2s; text-align: left; font-family: inherit;
}
.pg-wl-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0,0,0,0.08); }
.pg-wl-card .icons { display: flex; gap: 6px; margin-bottom: 16px; }
.pg-wl-card .icons .it {
  width: 44px; height: 44px; border-radius: 12px; background: var(--po-bg-alt);
  display: flex; align-items: center; justify-content: center;
}
.pg-wl-card .icons .it .apei { font-size: 19px; color: var(--po-brand); }
.pg-wl-card strong { font-size: 16.5px; letter-spacing: -0.02em; color: var(--po-ink); }
.pg-wl-card span { display: block; font-size: 13px; color: var(--po-ink-3); margin-top: 3px; }
.pg-wl-card .see { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--po-blue); }
.pg-wl-card.new {
  border-style: dashed; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--po-ink-3); min-height: 170px; background: transparent;
}
.pg-wl-card.new .plus {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(0,113,227,0.09);
  color: var(--po-blue); font-size: 22px; display: flex; align-items: center; justify-content: center;
}
.pg-wl-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.pg-wl-head .back { border: none; background: none; color: var(--po-blue); font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; padding: 0; }
.pg-wl-head .acts { display: flex; gap: 8px; }
.pg-wl-head .acts button {
  padding: 9px 16px; border: none; border-radius: 11px; cursor: pointer;
  background: var(--po-bg-alt); font-weight: 600; font-size: 13px; font-family: inherit;
}
.pg-wl-head .acts button.primary { background: var(--po-blue); color: #fff; }

/* ---- compare ---- */
.pg-cmp-scroll { overflow-x: auto; border-radius: 20px; border: 1px solid var(--po-sep); background: var(--po-card); }
.pg-cmp-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.pg-cmp-table th, .pg-cmp-table td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--po-sep); font-size: 13.5px; }
.pg-cmp-table thead th { vertical-align: top; }
.pg-cmp-table tbody tr:last-child td { border-bottom: none; }
.pg-cmp-table td:first-child { color: var(--po-ink-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.pg-cmp-col-head .thumb {
  width: 52px; height: 52px; border-radius: 13px; background: var(--po-bg-alt);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.pg-cmp-col-head .thumb .apei { font-size: 23px; color: var(--po-brand); }
.pg-cmp-col-head strong { display: block; font-size: 14.5px; letter-spacing: -0.01em; }
.pg-cmp-col-head .p { font-size: 14px; font-weight: 700; margin: 6px 0 10px; }
.pg-cmp-col-head .rm { border: none; background: none; color: var(--po-ink-3); font-size: 12px; cursor: pointer; font-family: inherit; padding: 0; font-weight: 600; }
.pg-cmp-col-head .buy {
  display: block; margin-top: 8px; padding: 8px 14px; border: none; border-radius: 10px;
  background: var(--po-blue); color: #fff; font-weight: 600; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.pg-cmp-table .best { background: rgba(0,113,227,0.04); }
.pg-cmp-badge {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  background: var(--po-blue); color: #fff; margin-bottom: 8px;
}

[data-theme="dark"] .pg-qty button:hover { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .pg-filter.active { background: var(--po-blue); border-color: var(--po-blue); }
[data-theme="dark"] .pg-ship-opt.sel,
[data-theme="dark"] .pg-pay-opt.sel { background: rgba(106,161,245,0.1); }
[data-theme="dark"] .pg-cmp-table .best { background: rgba(106,161,245,0.08); }
[data-theme="dark"] .pg-help-band { background: rgba(106,161,245,0.1); }
[data-theme="dark"] .pgl .meta .ok { color: #4cd964; }
[data-theme="dark"] .pg-step.done { color: #4cd964; }
