#eccd-root{
  --eccd-green: #005021;
  --eccd-green-2: #0b3f20;
  --eccd-cream: #eef4e6;
  --eccd-accent: #eff7e6;
  --eccd-border: rgba(0,80,33,0.22);
  --eccd-text: #005021;
  --eccd-muted: rgba(0,80,33,0.75);
}

.eccd-cart-trigger{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:0;
  background:transparent;
  color:#c3da8b;
  cursor:pointer;
  font-weight:700;
  font-family:inherit;
  padding:10px 12px;
  border-radius:999px;
  transition:background .2s ease,transform .2s ease;
}

.eccd-cart-trigger:hover{
  background:rgba(0,80,33,0.08);
}

.eccd-cart-icon{
  display:inline-flex;
  color:currentColor;
}

.eccd-cart-icon svg{
  width:25px;
  height:25px;
}

.eccd-cart-text{
  font-size:14px;
}

.eccd-cart-count{
  min-width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#c3da8b;
  color:#005021;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  padding:0 6px;
}

#eccd-root .eccd-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
  z-index:2147483645;
}

#eccd-root .eccd-drawer{
  position:fixed;
  top:0;
  right:0;
  height:100dvh;
  width:440px;
  max-width:92vw;
  background:var(--eccd-accent);
  color:var(--eccd-text);
  transform:translateX(100%);
  transition:transform .28s ease;
  z-index:2147483646;
  padding:0;
  box-shadow:-10px 0 30px rgba(0,0,0,.25);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-top-left-radius:0;
}

html.eccd-open #eccd-root .eccd-overlay{
  opacity:1;
  pointer-events:auto;
}

html.eccd-open #eccd-root .eccd-drawer{
  transform:translateX(0);
}

#eccd-root .eccd-drawer-header{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0;
  padding:18px 22px 14px;
  background:var(--eccd-accent);
}

#eccd-root .eccd-close{
  position:absolute;
  top:14px;
  right:18px;
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.45);
  border:1px solid var(--eccd-border);
  color:var(--eccd-text);
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:0;
  border-radius:999px;
  z-index:3;
}

#eccd-root .eccd-close:hover{
  background:rgba(255,255,255,.7);
}

#eccd-root .eccd-badges{
  display:flex;
  gap:18px;
  flex-wrap:nowrap;
  width:100%;
  justify-content:space-between;
  padding-top:0;
  padding-right:52px;
}

#eccd-root .eccd-badge{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  color:var(--eccd-text);
  justify-content:center;
  flex:1 1 0;
  min-width:0;
  text-align:center;
}

#eccd-root .eccd-badge span{
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
  line-height:1.1;
}

#eccd-root .eccd-badge .eccd-ico{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:block;
}

#eccd-root .eccd-ico{
  opacity:.95;
}

#eccd-root .eccd-badge svg{
  color:inherit;
}

#eccd-root #eccd-drawer-content{
  flex:1 1 auto;
  overflow:auto;
  padding:0 22px 18px;
  overscroll-behavior:contain;
}

#eccd-root #eccd-drawer-content::-webkit-scrollbar{
  width:10px;
}

#eccd-root #eccd-drawer-content::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.18);
  border-radius:999px;
}

#eccd-root .eccd-empty{
  padding:28px 6px;
}

#eccd-root .eccd-empty h3{
  margin:0 0 8px;
  font-size:22px;
  color:var(--eccd-text);
}

#eccd-root .eccd-empty p{
  margin:0 0 18px;
  color:var(--eccd-muted);
}

#eccd-root .eccd-ghost-btn{
  display:inline-block;
  padding:12px 18px;
  border:1px solid var(--eccd-border);
  color:var(--eccd-green);
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  background:rgba(255,255,255,.45);
}

#eccd-root .eccd-ghost-btn:hover{
  background:rgba(255,255,255,.65);
}

#eccd-root .eccd-items{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:6px 0 18px;
  border-bottom:1px solid var(--eccd-border);
}

#eccd-root .eccd-item{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px 14px;
  align-items:center;
}

#eccd-root .eccd-item-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

#eccd-root .eccd-thumb-wrap{
  width:66px;
  height:66px;
  background:rgba(255,255,255,.55);
  border:1px solid var(--eccd-border);
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex:0 0 auto;
}

#eccd-root .eccd-thumb{
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:12px;
}

#eccd-root .eccd-item-meta{
  min-width:0;
}

#eccd-root .eccd-item-title{
  font-weight:800;
  font-size:14px;
  line-height:1.25;
  margin-bottom:4px;
}

#eccd-root .eccd-item-title a{
  color:var(--eccd-text);
  text-decoration:none;
}

#eccd-root .eccd-item-title a:hover{
  text-decoration:underline;
}

#eccd-root .eccd-item-price{
  color:var(--eccd-muted);
  font-weight:800;
  font-size:13px;
}

#eccd-root .eccd-item-right{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:flex-end;
}

#eccd-root .eccd-remove{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid var(--eccd-border);
  background:rgba(255,255,255,.35);
  color:var(--eccd-text);
  cursor:pointer;
  font-size:18px;
  line-height:1;
}

#eccd-root .eccd-remove:hover{
  background:rgba(255,255,255,.55);
}

#eccd-root .eccd-qty{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.45);
  border:1px solid var(--eccd-border);
  overflow:hidden;
}

#eccd-root .eccd-qty-btn{
  width:34px;
  height:34px;
  border:0;
  background:transparent;
  color:var(--eccd-text);
  cursor:pointer;
  font-size:18px;
}

#eccd-root .eccd-qty-btn:hover{
  background:rgba(255,255,255,.55);
}

#eccd-root .eccd-qty-input{
  width:44px;
  height:34px;
  border:0;
  background:transparent;
  color:var(--eccd-text);
  text-align:center;
  font-weight:900;
  outline:none;
  -moz-appearance:textfield;
}

#eccd-root .eccd-qty-input::-webkit-outer-spin-button,
#eccd-root .eccd-qty-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

#eccd-root .eccd-item-subtotal{
  grid-column:1 / -1;
  text-align:left;
  color:var(--eccd-text);
  font-weight:900;
  font-size:13px;
  padding-left:78px;
}

#eccd-root .eccd-totals{
  padding:22px 0 10px;
}

#eccd-root .eccd-totals h2{
  margin:0 0 14px;
  font-size:34px;
  font-weight:900;
  letter-spacing:-.5px;
  color:var(--eccd-text);
}

#eccd-root .eccd-totals-box{
  border:1px solid var(--eccd-border);
  background:rgba(255,255,255,.45);
  border-radius:14px;
  padding:14px;
  margin-bottom:16px;
}

#eccd-root .eccd-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 4px;
  border-bottom:1px solid rgba(0,80,33,.12);
}

#eccd-root .eccd-row:last-child{
  border-bottom:0;
}

#eccd-root .eccd-row span{
  color:var(--eccd-muted);
  font-weight:800;
}

#eccd-root .eccd-row strong{
  color:var(--eccd-text);
  font-weight:900;
}

#eccd-root .eccd-checkout{
  display:block;
  text-align:center;
  background:var(--eccd-green);
  color:var(--eccd-cream);
  font-weight:900;
  padding:18px;
  border-radius:999px;
  text-decoration:none;
  transition:transform .2s ease,box-shadow .2s ease;
}

#eccd-root .eccd-checkout:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(0,0,0,.22);
}

#eccd-root .eccd-cartlink{
  display:block;
  margin-top:10px;
  text-align:center;
  color:var(--eccd-green);
  font-weight:900;
  text-decoration:none;
}

#eccd-root .eccd-cartlink:hover{
  text-decoration:underline;
}

html.eccd-open .eccd-floating-cart,
html.eccd-open .eccd-floating-cart-btn{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(12px) scale(.92);
}

@media (max-width:767px){
  #eccd-root .eccd-drawer{
    top:0;
    height:100dvh;
    max-width:100vw;
    width:min(440px, 100vw);
    padding:0;
  }

  #eccd-root .eccd-drawer-header{
    padding:14px 18px 12px;
  }

  #eccd-root #eccd-drawer-content{
    padding:0 18px 18px;
  }

  #eccd-root .eccd-close{
    top:10px;
    right:14px;
  }
}

@media (max-width:520px){
  #eccd-root .eccd-badges{
    gap:16px;
  }

  #eccd-root .eccd-badge span{
    white-space:normal;
  }

  #eccd-root .eccd-totals h2{
    font-size:30px;
  }
}

/* Ancien bouton flottant legacy */
.eccd-floating-cart-btn{
  position:fixed;
  right:18px;
  bottom:18px;
  width:60px;
  height:60px;
  padding:0;
  border:0;
  border-radius:999px;
  background:#005021;
  color:#fff;
  display:none;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 25px rgba(0,80,33,.35);
  z-index:10001;
  text-decoration:none;
  transition:transform .25s ease,box-shadow .25s ease,background-color .25s ease;
}

.eccd-floating-cart-btn:hover{
  background:#5d9032;
  transform:translateY(-3px) scale(1.04);
  box-shadow:0 12px 30px rgba(0,80,33,.45);
}

.eccd-floating-cart-btn .eccd-floating-cart-icon{
  display:inline-flex;
  line-height:1;
}

.eccd-floating-cart-btn .eccd-floating-cart-icon svg{
  width:24px;
  height:24px;
}

.eccd-floating-cart-btn .eccd-cart-count{
  position:absolute;
  top:-2px;
  right:-2px;
  min-width:24px;
  width:24px;
  height:24px;
  padding:0;
  border-radius:999px;
  background:#876219;
  color:#fff;
  border:2px solid #fdfaf0;
  font-size:12px;
  font-weight:900;
  box-shadow:none;
}

@media (max-width: 767px){
  .eccd-floating-cart-btn{
    display:flex;
  }
}