/* ===== BASE ===== */
.cv-root{width:100%;}
.cv-card{background:#fff;border:1px solid #e9edf3;border-radius:16px;overflow:hidden;}
.cv-step{padding:18px 16px;}
.cv-step + .cv-step{border-top:1px solid #eef2f7;}
.cv-step__title{font-weight:900;font-size:16px;color:#0b0b0e;margin:0 0 12px 0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
.cv-step__hint{margin-top:10px;font-size:13px;color:#6b7280;font-weight:800;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}

/* ===== DATE DROPDOWN ===== */
.cv-dateSelectWrap{position:relative;width:100%;max-width:520px;}
.cv-dateSelect{
  width:100%;height:46px;border-radius:12px;border:1px solid #e6ebf2;background:#fff;
  color:#0b0b0e;font-weight:900;font-size:14px;padding:0 44px 0 14px;
  appearance:none;-webkit-appearance:none;outline:none;cursor:pointer;
  box-shadow:0 6px 18px rgba(11,11,14,.06);
}
.cv-dateSelect:focus{border-color:#0b0b0e;box-shadow:0 10px 26px rgba(11,11,14,.10);}
.cv-dateSelectIcon{
  position:absolute;right:12px;top:50%;transform:translateY(-50%);
  width:28px;height:28px;border-radius:999px;background:#f7f9fc;border:1px solid #e6ebf2;
  display:flex;align-items:center;justify-content:center;pointer-events:none;
}

/* ===== LISTE ===== */
.cv-cats{display:flex;flex-direction:column;gap:0;}
.cv-cat{border-top:1px solid #eef2f7;}
.cv-cat:first-child{border-top:none;}

/* dispo + grand */
.cv-cat__row{
  display:flex;align-items:stretch;gap:14px;
  padding:22px 14px;background:#fff;cursor:pointer;user-select:none;
}
/* épuisé + petit */
.cv-cat--soldout .cv-cat__row{
  padding:16px 14px;background:#f3f4f6;cursor:not-allowed;
}

/* barre pleine hauteur */
.cv-cat__bar{width:5px;flex:0 0 5px;border-radius:3px;height:auto;background:#FCD34D;}
/* pas de barre épuisé */
.cv-cat--soldout .cv-cat__bar{display:none;}

.cv-cat__main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;}
.cv-cat__title{
  font-weight:900;color:#0b0b0e;font-size:15px;line-height:1.1;text-transform:uppercase;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
.cv-cat--soldout .cv-cat__title{color:#9ca3af;}

.cv-cat__right{display:flex;align-items:center;gap:10px;white-space:nowrap;}
.cv-cat__price{display:flex;align-items:baseline;gap:10px;white-space:nowrap;}
.cv-priceNow{font-weight:900;font-size:16px;color:#059669;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
.cv-priceWas{font-weight:800;font-size:13px;color:#9ca3af;text-decoration:line-through;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}

.cv-chevron{
  width:36px;height:36px;border-radius:999px;border:1px solid #e6ebf2;
  display:flex;align-items:center;justify-content:center;background:#f7f9fc;flex:0 0 auto;
}
.cv-chevron svg{transition:transform .18s ease;}
.cv-cat[data-open="true"] .cv-chevron svg{transform:rotate(180deg);}

.cv-badgeSoldout{background:#7f1d1d;color:#fff;font-weight:900;font-size:12px;padding:7px 12px;letter-spacing:.4px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}

/* ===== PANEL ===== */
.cv-cat__panel{display:none;padding:14px 14px 18px 14px;background:#f8fafc;}
.cv-cat[data-open="true"] .cv-cat__panel{display:block;}

.cv-panelTitle{font-weight:900;font-size:18px;text-align:center;color:#0b0b0e;margin:10px 0 14px 0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
.cv-panelSub{font-weight:900;font-size:13px;color:#0b0b0e;margin:0 0 10px 0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}

.cv-qtyGrid{display:grid;grid-template-columns:repeat(6, minmax(0,1fr));gap:12px;}
.cv-qtyBtn{
  /*
    IMPORTANT:
    Sur certains thèmes WordPress (surtout mobile), des styles globaux sur <button>
    (ex: background gris via :active/:focus) écrasent nos styles.
    On utilise donc des sélecteurs plus forts + !important sur les propriétés critiques.
  */
  height:52px;
  border:2px solid #0b0b0e !important; /* contour noir visible */
  background:#fff !important;
  color:#0b0b0e !important;
  font-weight:900;
  font-size:16px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  appearance:none;
  -webkit-appearance:none;
  -webkit-tap-highlight-color: transparent;
}
.cv-qtyBtn[aria-pressed="true"]{
  background:#0b0b0e !important;
  color:#fff !important;
  border-color:#0b0b0e !important;
}

/*
  Anti "tap gray" / overrides mobile:
  - Certains thèmes appliquent un fond gris via :active/:focus sur <button>
  - On force le fond blanc sur l'état normal, et on re-force noir sur l'état sélectionné
*/
.cv-cat__panel .cv-qtyBtn:active,
.cv-cat__panel .cv-qtyBtn:focus{
  background:#fff !important;
}
.cv-cat__panel .cv-qtyBtn[aria-pressed="true"]:active,
.cv-cat__panel .cv-qtyBtn[aria-pressed="true"]:focus{
  background:#0b0b0e !important;
}

/* Sélecteurs encore plus forts (certains thèmes utilisent des sélecteurs très spécifiques) */
.cv-cat__panel .cv-qtyGrid .cv-qtyBtn[aria-pressed="true"]{
  background:#0b0b0e !important;
  color:#fff !important;
  border-color:#0b0b0e !important;
}

/* Empêche l'effet gris AU SEUL état non sélectionné */
.cv-qtyBtn:not([aria-pressed="true"]):active,
.cv-qtyBtn:not([aria-pressed="true"]):focus,
.cv-qtyBtn:not([aria-pressed="true"]):focus-visible{
  background:#fff !important;
  color:#0b0b0e !important;
}
.cv-qtyBtn[aria-pressed="true"]:active,
.cv-qtyBtn[aria-pressed="true"]:focus,
.cv-qtyBtn[aria-pressed="true"]:focus-visible{
  background:#0b0b0e !important;
  color:#fff !important;
}
.cv-qtyBtn:active{transform:translateY(0);} /* on neutralise les thèmes qui animent */

/* ===== QTY DISABLED ===== */
.cv-qtyBtn{position:relative;border-radius:10px;gap:6px;flex-direction:column;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
.cv-qtyBtn__num{line-height:1;}
.cv-qtyBtn__soldout{font-size:11px;font-weight:900;color:#dc2626;line-height:1;letter-spacing:.2px;}
.cv-qtyBtn.is-disabled{
  border-color:#e5e7eb;background:#f3f4f6;color:#9ca3af;cursor:not-allowed;opacity:.85;
}
.cv-qtyBtn.is-disabled[aria-pressed="true"]{background:#f3f4f6;color:#9ca3af;}
.cv-qtyBtn.is-disabled::after{
  content:"";position:absolute;inset:0;border-radius:10px;background:rgba(255,255,255,.35);pointer-events:none;
}

.cv-totals{margin-top:12px;display:flex;align-items:center;gap:6px;font-size:16px;font-weight:900;color:#0b0b0e;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
.cv-totalValue{color:#059669;}

.cv-add{
  margin-top:12px;width:100%;height:48px;border:none;background:#0b0b0e;color:#fff;font-weight:900;font-size:14px;
  cursor:pointer;border-radius:8px;display:flex;align-items:center;justify-content:center;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
.cv-add[disabled]{opacity:.55;cursor:not-allowed;}

.cv-panelBottom{
  margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;
  font-size:14px;color:#0b0b0e;font-weight:900;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
.cv-pmr{display:flex;align-items:center;gap:10px;font-weight:800;color:#6b7280;}
.cv-link{color:#0b0b0e;text-decoration:underline;cursor:pointer;}
.cv-link--preview{color:#2563eb;}
.cv-link--preview:after{content:'';display:block;height:2px;width:100%;background:rgba(37,99,235,.35);margin-top:2px;}

/* ===== MODALS ===== */
.cv-modal{position:fixed;inset:0;display:none;z-index:99999;}
.cv-modal[aria-hidden="false"]{display:block;}
.cv-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45);}

.cv-modal__box{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(760px, calc(100% - 28px));background:#fff;box-shadow:0 22px 80px rgba(0,0,0,.25);
}
.cv-modal__box--assign{border:2px solid #0b0b0e;border-radius:14px;overflow:hidden;}
.cv-assign{display:flex;align-items:center;gap:16px;padding:22px 20px;}
.cv-assign__left{width:52px;display:flex;align-items:center;justify-content:center;}
.cv-spinner{
  width:34px;height:34px;border-radius:999px;border:4px solid rgba(11,11,14,.12);
  border-top-color:#2563eb;border-right-color:#059669;animation:cvspin .9s linear infinite;
}
@keyframes cvspin{to{transform:rotate(360deg)}}
.cv-assign__title{font-weight:900;font-size:18px;color:#0b0b0e;line-height:1.25;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
.cv-assign__sub{margin-top:8px;font-weight:800;color:#6b7280;font-size:14px;line-height:1.35;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
.cv-accent{color:#2563eb;}
.cv-accent2{color:#059669;}
.cv-chip{display:inline-block;padding:4px 8px;border-radius:999px;background:rgba(5,150,105,.12);color:#059669;font-weight:900;}

.cv-modal__box--generic{border-radius:14px;border:1px solid #e5e7eb;width:min(520px, calc(100% - 28px));overflow:hidden;}
.cv-generic{padding:16px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;}
.cv-generic__body img{width:100%;border-radius:12px;display:block;margin:0 0 12px 0;}
.cv-generic__body .cv-generic__title{font-weight:900;font-size:16px;margin:0 0 6px 0;color:#0b0b0e;}
.cv-generic__body .cv-generic__text{margin:0;font-weight:800;color:#6b7280;font-size:14px;line-height:1.35;}
.cv-generic__close{margin-top:14px;width:100%;height:42px;border-radius:10px;border:1px solid #e5e7eb;background:#fff;font-weight:900;cursor:pointer;}

/* ===== RESPONSIVE ===== */
@media (max-width: 540px){
  .cv-step{padding:16px 12px;}
  .cv-cat__row{padding:20px 12px;gap:10px;}
  .cv-cat--soldout .cv-cat__row{padding:14px 12px;}
  .cv-priceNow{font-size:15px;}
  .cv-priceWas{font-size:12px;}
  .cv-qtyGrid{grid-template-columns:repeat(3, minmax(0,1fr));}
  .cv-qtyBtn{height:50px;}
  .cv-assign{padding:18px 16px;}
  .cv-assign__title{font-size:16px;}
  .cv-panelBottom{font-size:14px;}
}
