/*
 * CE Widget — Fiche produit : tags / accroche / THE DETAILS (cew-product-details),
 * bandeau de réassurance (cew-reassurance-band), barre d'achat fixe
 * (cew-sticky-atc). Couleurs : jetons du thème (--dz-*) avec repli maquette.
 */
.cew-pd,
.cew-rb,
.cew-satc {
  --cew-ink: var(--dz-ink, #111);
  --cew-lilac: var(--dz-lilac, #a991c1);
  --cew-mint: var(--dz-mint, #B1D1BA);
  --cew-display: var(--dz-display, 'Archivo Black', sans-serif);
  --cew-body: 'Archivo', system-ui, sans-serif;
}

/* ------------------------------------------------------------ Fiche */
.cew-pd {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--cew-body);
  color: var(--cew-ink);
}

.cew-pd__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cew-pd__tag {
  padding: 6px 14px;
  border: 2px solid var(--cew-ink);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
}
.cew-pd__tag--strain { background: var(--cew-lilac); }
.cew-pd__tag--flavours { background: var(--cew-mint); }

.cew-pd__intro {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
  text-wrap: pretty;
}

.cew-pd__details {
  padding: 16px 18px;
  border: 2.5px solid var(--cew-ink);
  border-radius: 16px;
  background: #fff;
}

.cew-pd__details > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  list-style: none;
}
.cew-pd__details > summary::-webkit-details-marker { display: none; }
.cew-pd__details > summary:focus-visible { outline: 3px solid var(--cew-lilac); outline-offset: 4px; border-radius: 8px; }

.cew-pd__plus::before {
  content: '+';
  font-family: var(--cew-display);
  font-size: 18px;
  line-height: 1;
  color: var(--cew-lilac);
}
.cew-pd__details[open] .cew-pd__plus::before { content: '−'; }

.cew-pd__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
}
.cew-pd__grid dt { margin: 0; font-weight: 700; }
.cew-pd__grid dd { margin: 0; }

/* ---------------------------------------------------- Réassurance */
.cew-rb {
  padding: clamp(36px, 5vw, 56px) clamp(16px, 4vw, 48px);
  background: var(--cew-ink);
  font-family: var(--cew-body);
}

.cew-rb__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: clamp(16px, 3vw, 28px);
  max-width: 1200px;
  margin: 0 auto;
}

.cew-rb__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.cew-rb__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 2.5px solid #fff;
  border-radius: 999px;
  background: var(--cew-rb-bubble, var(--cew-lilac));
  box-shadow: 4px 4px 0 rgba(255, 255, 255, .18);
}

.cew-rb__body { display: flex; flex-direction: column; gap: 3px; }
.cew-rb__title { font-family: var(--cew-display); font-size: 15px; color: #fff; }
.cew-rb__text { font-size: 13px; font-weight: 600; color: #bbb; }

/* ------------------------------------------------- Barre d'achat */
.cew-satc {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px clamp(12px, 3vw, 24px);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  border-top: 2.5px solid var(--cew-ink);
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .12);
  font-family: var(--cew-body);
  color: var(--cew-ink);
  animation: cew-satc-in .2s ease-out;
}
.cew-satc[hidden] { display: none; }

@keyframes cew-satc-in {
  from { transform: translateY(100%); }
  to { transform: none; }
}

.cew-satc__info { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.cew-satc__price { font-family: var(--cew-display); font-size: 19px; }
.cew-satc__sub { overflow: hidden; font-size: 12px; font-weight: 600; color: #555; white-space: nowrap; text-overflow: ellipsis; }

.cew-satc__btn {
  flex: 1;
  max-width: 420px;
  min-height: 48px;
  margin-left: auto;
  border: 2.5px solid var(--cew-ink);
  border-radius: 999px;
  background: var(--cew-lilac);
  color: var(--cew-ink);
  font-family: var(--cew-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}
.cew-satc__btn:active:not(:disabled) { transform: translate(2px, 2px); }
.cew-satc__btn:focus-visible { outline: 3px solid var(--cew-ink); outline-offset: 3px; }
.cew-satc__btn:disabled {
  border-style: dashed;
  background: #fff;
  color: #777;
  cursor: not-allowed;
}

/* Laisse voir le bas de page et remonte le bouton flottant fidélité. */
html.cew-satc-on body { padding-bottom: 76px; }
html.cew-satc-on .lh-floating { bottom: 90px; }

@media (min-width: 1025px) {
  .cew-satc--mobile { display: none !important; }
  html.cew-satc-on:has(.cew-satc--mobile) body { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cew-satc { animation: none; }
}
