/**
 * ============================================================================
 * cfg-06 - Mini-panier du header ([soeasy_header_cart])
 * ============================================================================
 *
 * Le bloc historique (.soeasy-header-cart__*) stylait un simple listing de
 * contenu, sans icone ni tiroir. Il a ete retire avec ce markup : le shortcode
 * produit desormais le composant complet ci-dessous.
 */
/* ==========================================================================
   cfg-06 — Composant mini-panier du header (icone + badge + tiroir droit)
   ==========================================================================
   Le JS deplace le scrim et le tiroir en enfants directs de <body> (un ancetre
   transforme du header Elementor piegerait leur position:fixed). Les selecteurs
   ne peuvent donc PAS descendre de .se-hdrcart : l'etat .is-open est pose sur
   chacun des deux elements en plus de la racine.
   ========================================================================== */

.se-hdrcart {
  --se-hc-line: #eceaf3;
  --se-hc-muted: #6b6980;
  --se-hc-ink: #1b1930;
  position: relative;
  /* inline-flex + align-items:center : le centre de la pastille s'aligne sur
     celui des icones voisines du header, quelle que soit leur hauteur de ligne. */
  display: block;
  align-items: center;
  line-height: 1;
}

/* --- Icone + badge ---------------------------------------------------------
   SPECIFICITE : le kit Elementor stylise tous les <button> du site en pilule
   violette (`.elementor-kit-N button`, soit 0,1,1). Un simple
   `.se-hdrcart__toggle` (0,1,0) perdait : la pastille sortait en pilule de 80px
   de large, radius 40. On qualifie donc par le parent ET le type
   (`.se-hdrcart button.se-hdrcart__toggle` = 0,2,1) pour repasser devant sans
   recourir a !important. Les proprietes heritees du kit (padding, min-width,
   line-height, box-shadow, letter-spacing) sont explicitement remises a zero :
   il ne suffit pas de redeclarer width/height pour annuler un padding. */
.se-hdrcart button.se-hdrcart__toggle {
  position: relative;
  box-sizing: border-box;
  width: 20px; height: 20px;
  min-width: 0; max-width: none; min-height: 0;
  padding: 0; margin: 0px;
  border: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  vertical-align: middle;
  line-height: 1; letter-spacing: normal; text-transform: none;
  box-shadow: none; overflow: visible;
  cursor: pointer; transition: background-color .18s, box-shadow .18s;
  background: 0; color: var(--se-violet-clair);
}
.se-hdrcart button.se-hdrcart__toggle .fa-cart-shopping {
  font-size: 18px; line-height: 1;
}
.se-hdrcart button.se-hdrcart__toggle:focus-visible {
  outline: 2px solid var(--se-orange, #f6921e); outline-offset: 2px;
}

/* Le badge deborde du cercle : la racine doit lui laisser la place, sinon il
   est rogne par le bord droit du header (constate a ~6px hors viewport). */
.se-hdrcart { margin-right: 6px; margin-top: -4px; }

.se-hdrcart__badge {
  position: absolute; top: -3px; right: -9px;
  min-width: 15px; height: 15px; padding: 0px;
  border-radius: 11px;
  background: var(--se-orange, #f6921e); color: #fff;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: .75rem;
  line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 3px 8px rgba(246, 146, 30, .5);
  pointer-events: none; z-index: 1;
}
.se-hdrcart__badge[data-count="0"] { display: none; }

/* --- Scrim ----------------------------------------------------------------- */
.se-hdrcart__scrim {
  position: fixed; inset: 0;
  background: rgba(28, 18, 48, .44);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: .28s; z-index: 99998;
}
.se-hdrcart__scrim.is-open { opacity: 1; visibility: visible; }

/* --- Tiroir droit ---------------------------------------------------------- */
.se-hdrcart__drawer {
  position: fixed; top: 0; right: 0; height: 100vh;
  width: 420px; max-width: 92vw;
  background: #fff; z-index: 99999;
  display: flex; flex-direction: column;
  transform: translateX(110%);
  transition: transform .32s cubic-bezier(.4, 0, .2, 1);
  box-shadow: -12px 0 40px rgba(20, 10, 40, .18);
}
.se-hdrcart__drawer.is-open { transform: translateX(0); }

body.se-hdrcart-lock { overflow: hidden; }

/* --- En-tete du tiroir ------------------------------------------------------ */
.se-hdrcart__head {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 22px; color: #fff;
  background: linear-gradient(90deg, var(--se-violet, #28004f), #4b1490);
}
.se-hdrcart__headic {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px;
  background: rgba(255, 255, 255, .14);
  display: grid; place-items: center; font-size: .94rem;
}
.se-hdrcart__title {
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.03rem; line-height: 1.1;
}
.se-hdrcart__title small {
  display: block; margin-top: 2px;
  font-family: 'Inter', system-ui, sans-serif; font-weight: 400; font-size: .78rem; opacity: .8;
}
.se-hdrcart__close {
  margin-left: auto; padding: 0!important;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .14); color: #fff;
  display: grid; place-items: center; cursor: pointer; font-size: 1rem; transition: .15s;
}
.se-hdrcart__close:hover { background: rgba(255, 255, 255, .28); }

/* --- Corps (cible de fragment) ---------------------------------------------- */
.se-hdrcart__body { flex: 1; overflow-y: auto; padding: 16px; }

.se-hdrcart__empty { text-align: center; color: var(--se-hc-muted); padding: 40px 20px; }
.se-hdrcart__empty i { font-size: 2.6rem; color: var(--se-mauve, #d9a9fb); margin-bottom: 10px; display: block; }
.se-hdrcart__empty p { margin: 0; }

/* Carte configuration */
.se-hdrcart__cfg {
  background: #fff; border: 1px solid var(--se-hc-line); border-radius: 14px;
  padding: 14px; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(40, 0, 79, .05);
}
.se-hdrcart__cfgtop { display: flex; align-items: flex-start; gap: 11px; }
.se-hdrcart__cfgic {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--se-violet-clair, #761dbc), var(--se-violet, #28004f));
  color: #fff; display: grid; place-items: center; font-size: .94rem;
}
.se-hdrcart__cfghead { flex: 1; min-width: 0; }
.se-hdrcart__cfgname { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .88rem; color: var(--se-hc-ink); }
.se-hdrcart__cfgaddr {
  display: flex; align-items: center; gap: 5px; margin-top: 2px;
  color: var(--se-hc-muted); font-size: .78rem;
}
.se-hdrcart__cfgaddr i { color: var(--se-violet-clair, #761dbc); font-size: .72rem; flex: 0 0 auto; }
.se-hdrcart__cfgmeta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.se-hdrcart__chip {
  font-size: .69rem; font-weight: 500; padding: 3px 9px; border-radius: 999px;
  background: var(--se-mauve-clair, #f2e5ff); color: var(--se-violet, #28004f);
}

/* Decomposition */
.se-hdrcart__brk {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--se-hc-line);
}
.se-hdrcart__brkrow {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; padding: 3px 0; font-size: .81rem; color: #3a3350;
}
.se-hdrcart__brkrow span:last-child { font-weight: 600; color: var(--se-hc-ink); }
.se-hdrcart__brkrow small { font-weight: 500; color: var(--se-hc-muted); font-size: .69rem; }
.se-hdrcart__brkrow--hi {
  margin-top: 5px; padding-top: 8px; border-top: 1px solid var(--se-hc-line);
}
.se-hdrcart__brkrow--hi span:first-child { color: var(--se-violet, #28004f); font-weight: 600; }
.se-hdrcart__brkrow--hi span:last-child,
.se-hdrcart__brkrow--mono span:last-child {
  color: var(--se-violet, #28004f); font-family: 'Poppins', sans-serif; font-weight: 700; font-size: .94rem;
}
.se-hdrcart__brkrow .woocommerce-Price-amount { font-size: inherit; color: inherit; }

/* Produit hors configuration */
.se-hdrcart__prod {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border: 1px solid var(--se-hc-line); border-radius: 14px;
  padding: 11px 13px; margin-bottom: 12px;
}
.se-hdrcart__prodth {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px;
  background: var(--se-mauve-clair, #f2e5ff); color: var(--se-violet-clair, #761dbc);
  display: grid; place-items: center; font-size: .94rem;
}
.se-hdrcart__prodn { flex: 1; min-width: 0; font-size: .84rem; font-weight: 500; }
.se-hdrcart__prodn small {
  display: block; margin-top: 2px; font-weight: 400; font-size: .75rem; color: var(--se-hc-muted);
}
.se-hdrcart__prodp { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .84rem; white-space: nowrap; }

/* --- Pied (cible de fragment) ------------------------------------------------ */
.se-hdrcart__foot {
  border-top: 1px solid var(--se-hc-line); padding: 16px 18px; background: #fbf9ff;
}
/* Panier vide : le conteneur reste dans le DOM pour rester ciblable, mais ne
   doit rien occuper visuellement. */
.se-hdrcart__foot:empty { display: none; }

.se-hdrcart__subt {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px;
}
.se-hdrcart__subt span { color: var(--se-hc-muted); font-size: .84rem; }
.se-hdrcart__subt strong {
  font-family: 'Poppins', sans-serif; font-size: 1.25rem; color: var(--se-violet, #28004f);
}
.se-hdrcart__subt strong small { font-size: .75rem; color: var(--se-hc-muted); font-weight: 400; }
.se-hdrcart__subt .woocommerce-Price-amount { font-size: inherit; color: inherit; }
.se-hdrcart__subtnote {
  margin: 0 0 14px; font-size: .72rem; color: var(--se-hc-muted); line-height: 1.4;
}

.se-hdrcart__actions { display: flex; flex-direction: column; gap: 9px; }
.se-hdrcart__btn {
  display: block; text-align: center; text-decoration: none;
  border: none; border-radius: 999px; padding: 12px 18px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: .16s;
}
.se-hdrcart__btn--cta {
  background: var(--se-orange, #f6921e); color: #fff;
  box-shadow: 0 8px 20px rgba(246, 146, 30, .32);
}
.se-hdrcart__btn--cta:hover { filter: brightness(1.05); color: #fff; }
.se-hdrcart__btn--ghost {
  background: #fff; border: 1.5px solid var(--se-violet-clair, #761dbc); color: var(--se-violet, #28004f);
}
.se-hdrcart__btn--ghost:hover { background: var(--se-mauve-clair, #f2e5ff); color: var(--se-violet, #28004f); }

/* --- Responsive -------------------------------------------------------------- */
@media (max-width: 520px) {
  .se-hdrcart__drawer { width: 100vw; max-width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
  .se-hdrcart__drawer, .se-hdrcart__scrim, .se-hdrcart__toggle { transition: none; }
}
