/**
 * DG Coffrets panachés — styles front (composeur + affichage panier/commande).
 * Charte : Poppins, vert #007a4d, orange #F27405 (cf. catalog/product.tpl du thème enfant).
 */

/* ======================================================================
 * Accroche colonne droite
 * ==================================================================== */
.dgc-teaser {
  margin: 10px 0 30px;
}
.dgc-teaser__badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  background: #F2740512;
  border: 1px dashed #F27405;
  color: #d96504;
  font-size: 13px;
  font-weight: 600;
}
.dgc-teaser__lead {
  margin: 14px 0 0;
  color: #555;
}
.dgc-teaser__price small {
  font-size: 13px;
  font-weight: 500;
  color: #777;
}
.dgc-teaser__cta,
.dgc-teaser__cta:hover,
.dgc-teaser__cta:focus {
  display: block;
  width: 100%;
  text-align: center;
  color: #fff;
  text-decoration: none;
}
.dgc-teaser__rules {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  font-size: 14px;
  color: #555;
}
.dgc-teaser__rules li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 6px;
}
.dgc-teaser__rules li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #007a4d;
  font-weight: 700;
}

/* ======================================================================
 * Composeur
 * ==================================================================== */
.dgc {
  --dgc-green: #007a4d;
  --dgc-green-hover: #009c5f;
  --dgc-orange: #F27405;
  --dgc-orange-dark: #d96504;
  --dgc-orange-soft: #F2740512;
  --dgc-text: #333;
  --dgc-muted: #6b6b6b;
  --dgc-border: #e7e2dc;
  --dgc-radius: 16px;
  font-family: 'Poppins', sans-serif;
  color: var(--dgc-text);
  margin: 50px auto 40px;
  padding: 0 15px;
  scroll-margin-top: 90px;
}
.dgc *,
.dgc *::before,
.dgc *::after {
  box-sizing: border-box;
}
.dgc [hidden] {
  display: none !important;
}

.dgc__header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 28px;
}
.dgc__title {
  color: #00744A;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
}
.dgc__intro {
  color: #555;
  line-height: 1.7;
}
.dgc__steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}
.dgc__steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--dgc-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* --- Formats --- */
.dgc__formats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}
.dgc__formats-label {
  font-weight: 600;
}
.dgc__formats-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dgc-format {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  padding: 8px 18px;
  border: 2px solid #ddd;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dgc-format:hover,
.dgc-format.is-active {
  border-color: var(--dgc-orange);
  background: var(--dgc-orange-soft);
}
.dgc-format__label {
  font-weight: 600;
}
.dgc-format__price {
  font-size: 13px;
  color: var(--dgc-muted);
}
.dgc-format__na {
  font-size: 12px;
  color: #b3261e;
}
.dgc-format:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.dgc__notice {
  max-width: 760px;
  margin: 0 auto 18px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--dgc-orange-soft);
  border: 1px dashed var(--dgc-orange);
  text-align: center;
  font-size: 14px;
}

/* --- Mise en page --- */
.dgc__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

/* --- Barre d'outils --- */
.dgc__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.dgc__search {
  flex: 1 1 220px;
  margin: 0;
}
.dgc__search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid #ccc;
  border-radius: 30px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23999' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 15px center;
  font-size: 14px;
}
.dgc__search input:focus {
  outline: none;
  border-color: var(--dgc-green);
}
.dgc__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dgc-chip {
  border: 2px solid #ddd;
  border-radius: 50px;
  padding: 5px 14px;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  transition: .2s;
}
.dgc-chip:hover,
.dgc-chip.is-active {
  border-color: #ff7e00;
  background: #ff7e00;
  color: #fff;
}
.dgc-chip--selected.is-active {
  border-color: var(--dgc-green);
  background: var(--dgc-green);
}

/* --- Grille de bières --- */
.dgc__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 18px;
}
.dgc__noresult {
  padding: 30px 0;
  text-align: center;
  color: var(--dgc-muted);
}
.dgc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid var(--dgc-border);
  border-radius: var(--dgc-radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.dgc-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}
.dgc-card.is-selected {
  border-color: var(--dgc-green);
  box-shadow: 0 6px 18px rgba(0, 122, 77, .15);
}
.dgc-card.is-bumped {
  animation: dgc-bump .25s ease;
}
@keyframes dgc-bump {
  50% { transform: scale(1.03); }
}
.dgc-card.is-out {
  opacity: .55;
}
.dgc-card.is-out img {
  filter: grayscale(1);
}
.dgc-card__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  background: #faf7f2;
  cursor: pointer;
}
.dgc-card__media:disabled {
  cursor: default;
}
.dgc-card__media img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: contain;
}
.dgc-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 50px;
  background: var(--dgc-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.dgc-card__count {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 17px;
  background: var(--dgc-green);
  color: #fff;
  font-weight: 700;
  line-height: 34px;
  text-align: center;
}
.dgc-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 6px;
}
.dgc-card__name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--dgc-text);
}
.dgc-card__variant {
  font-weight: 400;
  color: var(--dgc-muted);
}
.dgc-card__features {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dgc-orange-dark);
}
.dgc-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--dgc-muted);
}
.dgc-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: auto;
  font-size: 13px;
}
.dgc-card__price {
  font-weight: 700;
}
.dgc-card__supp {
  padding: 1px 8px;
  border-radius: 50px;
  background: var(--dgc-orange-soft);
  color: var(--dgc-orange-dark);
  font-weight: 600;
  font-size: 12px;
}
.dgc-card__stock {
  font-size: 12px;
  color: #b3261e;
}
.dgc-card__link {
  margin-top: 6px;
  font-size: 12px;
  color: var(--dgc-muted);
  text-decoration: underline;
}
.dgc-card__link:hover {
  color: var(--dgc-orange);
}

.dgc-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 14px;
}
.dgc-stepper__btn {
  width: 38px;
  height: 38px;
  border: 2px solid var(--dgc-green);
  border-radius: 50%;
  background: #fff;
  color: var(--dgc-green);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: .2s;
}
.dgc-stepper__btn--add {
  background: var(--dgc-green);
  color: #fff;
}
.dgc-stepper__btn:hover:not(:disabled) {
  background: var(--dgc-green-hover);
  border-color: var(--dgc-green-hover);
  color: #fff;
}
.dgc-stepper__btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.dgc-stepper__qty {
  min-width: 30px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

/* --- Récapitulatif --- */
.dgc__summary {
  position: sticky;
  top: 100px;
}
.dgc-box {
  padding: 20px;
  border: 1px dashed var(--dgc-orange);
  border-radius: var(--dgc-radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}
.dgc-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dgc-box__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.dgc-box__count {
  padding: 3px 12px;
  border-radius: 50px;
  background: var(--dgc-green);
  color: #fff;
  font-weight: 700;
}
.dgc-box__slots {
  --dgc-slots: 6;
  display: grid;
  grid-template-columns: repeat(var(--dgc-slots), 1fr);
  gap: 5px;
  margin-bottom: 10px;
}
.dgc-slot {
  aspect-ratio: 3 / 4;
  border: 2px dashed #d8d2ca;
  border-radius: 6px;
  background: #faf7f2 center / contain no-repeat;
}
.dgc-slot.is-required {
  border-color: #f0b27a;
}
.dgc-slot.is-filled {
  border: 2px solid var(--dgc-green);
  background-color: #fff;
}
.dgc-box__progress {
  height: 6px;
  border-radius: 3px;
  background: #eee;
  overflow: hidden;
}
.dgc-box__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--dgc-orange), var(--dgc-green));
  transition: width .25s;
}
.dgc-box__status {
  margin: 10px 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dgc-orange-dark);
}
.dgc-box__status.is-ok {
  color: var(--dgc-green);
}
.dgc-box__lines {
  max-height: 260px;
  overflow-y: auto;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.dgc-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f0ebe5;
  font-size: 13px;
}
.dgc-line img {
  width: 36px;
  height: 46px;
  object-fit: contain;
}
.dgc-line__name {
  flex: 1;
  min-width: 0;
}
.dgc-line__qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dgc-line__qty button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: #fff;
  line-height: 1;
  cursor: pointer;
}
.dgc-line__qty button:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.dgc-box__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.dgc-tool {
  padding: 6px 14px;
  border: 2px solid var(--dgc-orange);
  border-radius: 25px;
  background: transparent;
  color: var(--dgc-orange);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}
.dgc-tool:hover:not(:disabled) {
  background: var(--dgc-orange);
  color: #fff;
}
.dgc-tool--ghost {
  border-color: #ccc;
  color: var(--dgc-muted);
}
.dgc-tool--ghost:hover:not(:disabled) {
  background: #eee;
  color: var(--dgc-text);
}
.dgc-tool:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.dgc-box__options {
  margin-bottom: 14px;
}
.dgc-box__options-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.dgc-options {
  margin: 0;
  padding: 0;
  list-style: none;
}
.dgc-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 2px solid var(--dgc-border);
  border-radius: 12px;
  background: #fff;
  transition: border-color .2s, background .2s;
}
.dgc-option.is-selected {
  border-color: var(--dgc-green);
  background: #e6f4ee;
}
.dgc-option.is-out {
  opacity: .55;
}
.dgc-option__main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.dgc-option__main input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--dgc-green);
  cursor: pointer;
}
.dgc-option__main img {
  flex: 0 0 auto;
  width: 40px;
  height: 52px;
  object-fit: contain;
}
.dgc-option__name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dgc-option__name small {
  font-weight: 400;
  color: var(--dgc-muted);
}
.dgc-option__stock:empty {
  display: none;
}
.dgc-option__price {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--dgc-orange-dark);
  white-space: nowrap;
}
.dgc-option__qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dgc-option__qty button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: #fff;
  line-height: 1;
  cursor: pointer;
}
.dgc-option__qty button:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.dgc-box__message {
  margin-bottom: 14px;
}
.dgc-box__message label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}
.dgc-box__message textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
  resize: vertical;
}
.dgc-box__message textarea:focus {
  outline: none;
  border-color: var(--dgc-green);
}
.dgc-box__counter {
  display: block;
  text-align: right;
  color: var(--dgc-muted);
}
.dgc-box__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #eee;
  margin-bottom: 14px;
}
.dgc-box__total small {
  color: var(--dgc-muted);
}
.dgc-box__total strong {
  font-size: 24px;
  font-weight: 700;
}
.dgc-box__actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.dgc-box__qty {
  display: inline-flex;
  align-items: center;
  margin: 0;
  border: 1px solid var(--dgc-green);
  border-radius: 30px;
  overflow: hidden;
}
.dgc-box__qty button {
  width: 30px;
  height: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}
.dgc-box__qty button:disabled {
  opacity: .35;
}
.dgc-box__qty input {
  width: 36px;
  border: 0;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
}
.dgc-box__qty input::-webkit-outer-spin-button,
.dgc-box__qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.dgc .dgc-box__add {
  flex: 1;
  min-height: 48px;
  background: var(--dgc-green);
  color: #fff;
  border: 0;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
}
.dgc .dgc-box__add:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.dgc-box__feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
}
.dgc-box__feedback.is-success {
  background: #e6f4ee;
  color: #00543a;
}
.dgc-box__feedback.is-success a {
  color: #00543a;
  font-weight: 600;
  text-decoration: underline;
}
.dgc-box__feedback.is-error {
  background: #fdecea;
  color: #8a1c14;
}

/* --- Barre mobile --- */
.dgc-mobilebar {
  display: none;
}

@media (max-width: 991.98px) {
  .dgc__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .dgc__summary {
    position: static;
  }
  .dgc-mobilebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1031;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .12);
    transform: translateY(110%);
    transition: transform .25s;
  }
  .dgc-mobilebar.is-visible {
    transform: translateY(0);
  }
  .dgc-mobilebar__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: 13px;
  }
  .dgc-mobilebar__info span {
    font-weight: 700;
    font-size: 15px;
  }
  .dgc-mobilebar__btn {
    flex: 0 0 auto;
    padding: 10px 18px;
    border: 0;
    border-radius: 50px;
    background: var(--dgc-orange);
    color: #fff;
    font-weight: 600;
  }
  .dgc-mobilebar__btn.is-ready {
    background: var(--dgc-green);
  }
}

@media (max-width: 575.98px) {
  .dgc {
    padding: 0 10px;
  }
  .dgc__title {
    font-size: 23px;
  }
  .dgc__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .dgc-card__media img {
    height: 140px;
  }
  .dgc-card__body {
    padding: 10px 10px 4px;
  }
  .dgc-card__desc {
    display: none;
  }
  .dgc-stepper {
    padding: 6px 10px 12px;
  }
  .dgc-stepper__btn {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dgc-card.is-bumped {
    animation: none;
  }
  .dgc-mobilebar,
  .dgc-box__progress span {
    transition: none;
  }
}

/* ======================================================================
 * Contenu d'un coffret dans le panier / la commande
 * ==================================================================== */
.dgc-custo {
  display: block;
  font-size: 13px;
  line-height: 1.6;
}
.dgc-custo__line--option {
  color: #555;
}
.dgc-custo__msg {
  display: inline-block;
  margin-top: 4px;
  color: #555;
}
.dgc-custo__edit {
  display: inline-block;
  margin-top: 6px;
  color: #F27405;
  font-weight: 600;
  text-decoration: underline;
}
.dgc-cart-content {
  margin: 6px 0;
  padding: 8px 12px;
  border-left: 3px solid #F27405;
  background: #F2740508;
  border-radius: 0 8px 8px 0;
}
.dgc-cart-content__title {
  display: block;
  font-weight: 600;
  font-size: 13px;
}
