.jem-bc-wrap { max-width: 900px; margin: 1.5rem auto; color: inherit; }
.jem-bc-form fieldset { border: 1px solid #b6923f; border-radius: 12px; padding: 1.25rem; margin: 0 0 1.4rem; }
.jem-bc-form legend { font-size: 1.2rem; font-weight: 600; padding: 0 .5rem; }
.jem-bc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.jem-bc-wide { grid-column: 1 / -1; }
.jem-bc-form label { display: block; margin: .65rem 0; }
.jem-bc-form input[type=text], .jem-bc-form input[type=email], .jem-bc-form input[type=tel], .jem-bc-form input[type=number], .jem-bc-form select, .jem-bc-form textarea { box-sizing: border-box; width: 100%; margin-top: .35rem; padding: .72rem; border: 1px solid #999; border-radius: 8px; background: #fff; color: #111; font: inherit; }
.jem-bc-line { display: grid; grid-template-columns: minmax(220px, 1fr) 170px 150px 42px; gap: .75rem; align-items: end; border-bottom: 1px solid rgba(128,128,128,.35); padding: .5rem 0 1rem; }
.jem-bc-form .jem-bc-qty { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; font-weight: 600; white-space: nowrap; }
.jem-bc-form .jem-bc-qty input[type=number] { width: 68px; margin: 0; padding: .55rem; }
.jem-bc-subtotal { display: flex; flex-direction: row; align-items: center; gap: .45rem; padding-bottom: .72rem; white-space: nowrap; }
.jem-bc-subtotal span { display: inline; margin: 0; font-size: inherit; font-weight: 600; }
.jem-bc-remove { width: 42px; height: 42px; margin-bottom: .45rem; border: 1px solid #a33; border-radius: 10px; background: transparent; color: #c33; font-size: 1.25rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; } .jem-bc-remove:hover, .jem-bc-remove:focus { background: rgba(204,51,51,.12); }
.jem-bc-add, .jem-bc-submit { border: 0; border-radius: 30px; padding: .8rem 1.25rem; cursor: pointer; font: inherit; font-weight: 600; }
.jem-bc-add { margin-top: 1rem; background: #eee; color: #111; }
.jem-bc-submit { background: #b6923f; color: #fff; font-size: 1.05rem; }
.jem-bc-total { text-align: right; font-size: 1.15rem; margin-top: 1.25rem; }
.jem-bc-consent { display: flex !important; gap: .6rem; align-items: flex-start; }
.jem-bc-consent input { margin-top: .25rem; }
.jem-bc-legal { font-size: .9rem; opacity: .8; }
.jem-bc-notice { border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.jem-bc-success { border: 1px solid #2b7a3d; background: #eaf7ed; color: #174c24; }
.jem-bc-error { border: 1px solid #b22; background: #fdecec; color: #711; }
.jem-bc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 700px) {
  .jem-bc-grid { grid-template-columns: 1fr; }
  .jem-bc-line { grid-template-columns: minmax(0, 1fr) minmax(145px, auto) 42px; align-items: end; }
  .jem-bc-book { grid-column: 1 / -1; }
  .jem-bc-qty { grid-column: 1; }
  .jem-bc-subtotal { grid-column: 2; padding-bottom: .72rem; }
  .jem-bc-remove { grid-column: 3; margin-bottom: .45rem; }
  .jem-bc-wide { grid-column: auto; }
}


/* v1.4.1 — Aperçu de couverture */
.jem-bc-cover-preview {
  flex: 0 0 82px;
  width: 82px;
  text-align: center;
}
.jem-bc-cover-preview img {
  display: block;
  width: 72px;
  max-height: 110px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  background: #fff;
  margin: 0 auto;
}
@media (max-width: 700px) {
  .jem-bc-cover-preview {
    flex-basis: 100%;
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
  }
  .jem-bc-cover-preview img {
    margin: 0;
    width: 68px;
    max-height: 104px;
  }
}


/* v1.4.4 — Couverture + titre, quantité et prix côte à côte */
.jem-bc-line {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.jem-bc-cover-preview {
  width: 90px;
  min-width: 90px;
  text-align: center;
}

.jem-bc-cover-preview img {
  width: 82px;
  max-height: 125px;
  object-fit: contain;
  margin: 0;
}

.jem-bc-line-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.jem-bc-book {
  width: 100%;
  min-width: 0;
}

.jem-bc-book select {
  width: 100%;
  max-width: 100%;
}

.jem-bc-line-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 18px 28px;
}

.jem-bc-line-meta .jem-bc-qty,
.jem-bc-line-meta .jem-bc-subtotal {
  margin: 0;
}

.jem-bc-line-meta .jem-bc-subtotal {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.jem-bc-remove {
  align-self: end;
}

@media (max-width: 700px) {
  .jem-bc-line {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
  }

  .jem-bc-cover-preview {
    width: 82px;
    min-width: 82px;
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 0;
    text-align: left;
  }

  .jem-bc-cover-preview img {
    width: 74px;
    max-height: 112px;
  }

  .jem-bc-line-info {
    grid-column: 2;
  }

  .jem-bc-line-meta {
    gap: 10px 18px;
  }

  .jem-bc-remove {
    grid-column: 2;
    justify-self: end;
    align-self: center;
  }
}

@media (max-width: 520px) {
  .jem-bc-line-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}


/* v1.4.5 — Titre sans sélecteur visible */
.jem-bc-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.jem-bc-selected-title {
  font-size: 1.05rem;
  font-weight: 700;
  flex: 1 1 280px;
  line-height: 1.35;
}
.jem-bc-change-book {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 7px 14px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 600;
}
.jem-bc-book-chooser {
  margin-top: 8px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(127,127,127,.35);
  border-radius: 10px;
  padding: 8px;
}
.jem-bc-book-choice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(127,127,127,.2);
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 10px 6px;
  cursor: pointer;
}
.jem-bc-book-choice:last-child {
  border-bottom: 0;
}
.jem-bc-book-choice img {
  width: 38px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}
.jem-bc-book-choice span {
  font-weight: 600;
}


/* v1.4.6 — Alignement Quantité / Prix */
.jem-bc-line-meta {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(180px, auto);
  align-items: center;
  justify-content: start;
  column-gap: 28px;
  row-gap: 10px;
}

.jem-bc-line-meta .jem-bc-qty,
.jem-bc-line-meta .jem-bc-subtotal {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 0;
}

.jem-bc-line-meta .jem-bc-qty span,
.jem-bc-line-meta .jem-bc-subtotal span {
  white-space: nowrap;
  line-height: 1;
}

.jem-bc-line-meta .jem-bc-subtotal strong {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .jem-bc-line-meta {
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
  }

  .jem-bc-line-meta .jem-bc-qty,
  .jem-bc-line-meta .jem-bc-subtotal {
    min-height: 48px;
  }
}

@media (max-width: 520px) {
  .jem-bc-line-meta {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}


/* v1.4.7 — Corbeille à côté du prix */
.jem-bc-price-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.jem-bc-price-actions .jem-bc-subtotal {
  margin: 0;
}

.jem-bc-price-actions .jem-bc-remove {
  position: static;
  margin: 0;
  align-self: center;
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .jem-bc-price-actions {
    gap: 10px;
  }
}


/* v1.4.8 — Boutons dorés et corbeille alignée à droite */
.jem-bc-price-actions {
  width: 100%;
}

.jem-bc-price-actions .jem-bc-remove {
  margin-left: auto;
}

/* Boutons d'action */
.jem-bc-add,
.jem-bc-change-book,
.jem-bc-remove {
  background: #C89B2A !important;
  color: #ffffff !important;
  border-color: #C89B2A !important;
}

.jem-bc-add:hover,
.jem-bc-add:focus,
.jem-bc-change-book:hover,
.jem-bc-change-book:focus,
.jem-bc-remove:hover,
.jem-bc-remove:focus {
  background: #C89B2A !important;
  color: #ffffff !important;
  border-color: #C89B2A !important;
  filter: brightness(.92);
}

/* Le bouton Ajouter un autre livre reste bien identifiable comme bouton */
.jem-bc-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 12px 20px;
  border: 1px solid #C89B2A;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

/* Corbeille carrée, poussée complètement à droite de la ligne */
.jem-bc-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  border-radius: 10px;
}

@media (max-width: 700px) {
  .jem-bc-price-actions {
    width: 100%;
  }

  .jem-bc-price-actions .jem-bc-remove {
    margin-left: auto;
  }
}


/* v1.4.9 — Corbeille sans fond doré */
.jem-bc-remove,
.jem-bc-remove:hover,
.jem-bc-remove:focus {
  background: transparent !important;
  color: #C89B2A !important;
  border-color: #C89B2A !important;
  filter: none !important;
}


/* v1.5.0 — séparation visuelle avant le récapitulatif */
.jem-bc-summary-separator {
  width: 100%;
  margin: 22px 0 16px;
  text-align: center;
  overflow: hidden;
}

.jem-bc-summary-separator img {
  display: block;
  width: 100%;
  max-width: 720px;
  max-height: 90px;
  object-fit: contain;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .jem-bc-summary-separator {
    margin: 18px 0 14px;
  }

  .jem-bc-summary-separator img {
    max-height: 70px;
  }
}



/* v1.5.3 — Champs de saisie sombres + mentions obligatoires */
.jem-bc-form input[type="text"],
.jem-bc-form input[type="email"],
.jem-bc-form input[type="tel"],
.jem-bc-form input[type="number"],
.jem-bc-form textarea {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #C89B2A !important;
  caret-color: #ffffff !important;
}

.jem-bc-form input[type="text"]::placeholder,
.jem-bc-form input[type="email"]::placeholder,
.jem-bc-form input[type="tel"]::placeholder,
.jem-bc-form textarea::placeholder {
  color: #bfbfbf !important;
}

.jem-bc-form input[type="text"]:focus,
.jem-bc-form input[type="email"]:focus,
.jem-bc-form input[type="tel"]:focus,
.jem-bc-form input[type="number"]:focus,
.jem-bc-form textarea:focus {
  background: #000000 !important;
  color: #ffffff !important;
  outline: 2px solid #C89B2A;
  outline-offset: 1px;
}

.jem-bc-required-note {
  margin: 14px 0 10px;
  font-weight: 700;
}


/* v1.5.4 — Médiation de la consommation */
.jem-bc-mediation {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(200, 155, 42, .55);
  font-size: .95rem;
  line-height: 1.6;
}

.jem-bc-mediation p {
  margin: 0 0 14px;
}

.jem-bc-mediation a {
  color: #C89B2A;
  text-decoration: underline;
}

.jem-bc-mediation strong {
  color: inherit;
}

/* Titres et visuels plus grands dans le sélecteur de livres */
.jem-bc-book-choice {
  gap: 16px;
  padding: 14px 10px;
}
.jem-bc-book-choice img {
  width: 56px;
  height: 78px;
  object-fit: contain;
  flex: 0 0 56px;
}
.jem-bc-book-choice span {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
}
.jem-bc-selected-title {
  font-size: 1.15rem;
  line-height: 1.35;
}
.jem-bc-cover-preview {
  width: 98px;
  min-width: 98px;
}
.jem-bc-cover-preview img {
  width: 90px;
  max-height: 136px;
}
@media (max-width: 700px) {
  .jem-bc-book-choice img {
    width: 52px;
    height: 74px;
    flex-basis: 52px;
  }
  .jem-bc-book-choice span {
    font-size: 1.04rem;
  }
  .jem-bc-cover-preview {
    width: 92px;
    min-width: 92px;
  }
  .jem-bc-cover-preview img {
    width: 84px;
    max-height: 128px;
  }
}


/* v1.5.6 — Catégories de livres */
.jem-bc-book-category {
  padding: 12px 8px 8px;
  margin-top: 4px;
  font-weight: 800;
  font-size: 1rem;
  color: #C89B2A;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 1px solid rgba(200,155,42,.35);
}
.jem-bc-book-category:first-child {
  margin-top: 0;
}


/* v1.5.9 — Ajout au bon de commande depuis le catalogue */
.jem-bc-catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}
.jem-bc-catalog-add,
.jem-bc-catalog-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.jem-bc-catalog-add {
  border: 1px solid #C89B2A;
  background: #C89B2A;
  color: #fff;
  cursor: pointer;
}
.jem-bc-catalog-view {
  border: 1px solid #C89B2A;
  background: transparent;
  color: #C89B2A;
}

/* v1.6.1 — Bouton Copier pour le shortcode catalogue */
.jem-bc-shortcode-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.jem-bc-shortcode-copy code {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(127,127,127,.12);
}

/* v1.6.2 — État persistant « Livre ajouté » */
.jem-bc-catalog-add.is-added {
  background: transparent !important;
  color: #C89B2A !important;
  border-color: #C89B2A !important;
}
