.bq-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.bq-remise {
  color: var(--brand);
  font-weight: 700;
}

.bq-barre {
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 400;
}

.cp-check a {
  color: var(--brand);
}

@media (max-width: 560px) {
  .bq-grille {
    grid-template-columns: 1fr;
  }
}

#bq-resume-remise {
  display: block;
  font-weight: 500;
  opacity: 0.9;
}

/* Compositeur, dans une fenêtre ouverte depuis la fiche « Carton à composer » */
.bq-dialog {
  width: min(760px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 0;
  border-radius: 18px;
  padding: 1rem 1.1rem 1.2rem;
  background: #fff;
  color: inherit;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.bq-dialog::backdrop {
  background: rgba(20, 30, 25, 0.55);
}

.bq-dialog-tete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.bq-dialog-tete h3 {
  margin: 0;
}

.bq-dialog > p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.bq-fermer {
  border: 0;
  background: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  padding: 0 0.3rem;
}

.bq-compose-pied {
  position: sticky;
  bottom: -1.2rem;
  background: #fff;
  padding: 0.6rem 0;
}

/* Raccourcis vers les rayons, en haut de la liste */
.bq-raccourcis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.2rem 0 0.4rem;
}

.bq-raccourcis a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: inherit;
}

.bq-raccourcis a:hover,
.bq-raccourcis a:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

#bq-catalogue .cp-family {
  scroll-margin-top: 7rem;
}

.bq-carte-composer .bq-composer {
  margin-top: 0.6rem;
}

.bq-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.6rem 0 0.9rem;
}

.bq-formats button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.bq-formats button[aria-checked="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.bq-choix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem;
}

.bq-choix-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.bq-choix-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: var(--cream);
  border-radius: 8px;
  flex-shrink: 0;
}

.bq-choix-item span.bq-nom {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: break-word;
  hyphens: auto;
}

.bq-choix-item .cp-qty {
  flex-shrink: 0;
}

.bq-choix-item .cp-qty button {
  width: 1.9rem;
  height: 1.9rem;
}

.bq-choix-item .cp-qty input {
  width: 2.2rem;
}

.bq-compose-pied {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  font-weight: 600;
}

.bq-composes {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
}

.bq-composes li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-top: 1px dashed var(--line);
  font-size: 0.92rem;
}

.bq-composes button {
  border: 0;
  background: none;
  color: #a3361f;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Code promo / commande groupée */
.bq-code { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin: 14px 0 4px; }
.bq-code .cp-field { flex: 1 1 220px; margin: 0; }
.bq-code-info { flex: 1 0 100%; margin: 0; font-size: 0.92rem; }
.bq-code-erreur { color: #b3261e; }
.bq-groupe { border: 2px solid currentColor; border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; line-height: 1.5; }
.bq-jauge { display: block; height: 8px; border-radius: 4px; background: rgba(127, 127, 127, 0.25); margin-top: 8px; overflow: hidden; }
.bq-jauge span { display: block; height: 100%; background: currentColor; }

/* Expédition */
.bq-large { grid-column: 1 / -1; }
.bq-expedition-info { margin: 0; font-size: 0.95rem; }

/* En-tête : picto et nom lisibles, retour au site */
.bq-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.35rem;
}

.bq-brand img {
  width: 40px;
  height: 40px;
}

.bq-retour-site {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.bq-retour-site:hover {
  color: var(--brand);
}

/* Bandeau compact : on arrive vite aux produits */
.bq-hero {
  padding: 2.4rem 0 2rem;
}

.bq-hero h1 {
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  margin-bottom: 0.4rem;
}

.bq-hero .lede {
  max-width: 46rem;
}

.bq-section {
  padding-top: 1.5rem;
}

/* Étapes cliquables */
.bq-etapes li {
  padding: 0;
}

.bq-etapes button {
  width: 100%;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}

.bq-etapes button:disabled {
  cursor: default;
}

/* Barre du bas : ouvre le panier */
.bq-summary {
  flex-wrap: nowrap;
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  align-items: center;
}

.bq-summary-droite {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.bq-summary-droite small {
  font-weight: 500;
  text-decoration: underline;
  opacity: 0.9;
}

/* Fenêtre du panier */
.bq-panier-ligne {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.4rem 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.bq-panier-prix {
  min-width: 4.5rem;
  text-align: right;
  font-weight: 600;
}

.bq-actions-carton {
  display: flex;
  gap: 0.6rem;
}

.bq-actions-carton button {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--brand);
  padding: 0.2rem 0;
}

.bq-actions-carton button[data-retirer-compose] {
  color: #a3361f;
}

.bq-panier-remise {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.bq-panier-total {
  display: flex;
  justify-content: space-between;
  margin: 0.6rem 0 0;
  font-size: 1.1rem;
}

.bq-panier-pied {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

.bq-panier-vide {
  color: var(--muted);
}

@media (max-width: 560px) {
  /* Petites photos sur le côté : la liste se parcourt plus vite */
  #bq-catalogue .cp-product {
    grid-template-columns: 88px 1fr;
    gap: 0.8rem;
    padding: 0.7rem;
  }

  #bq-catalogue .cp-photo,
  #bq-catalogue .cp-gallery {
    width: 88px;
    height: 88px;
    max-height: none;
    aspect-ratio: auto;
  }

  /* Photo et nom côte à côte, les formats sur toute la largeur en dessous */
  #bq-catalogue .cp-product {
    align-items: start;
    row-gap: 0.3rem;
  }

  #bq-catalogue .cp-product > div:not(.cp-gallery) {
    display: contents;
  }

  #bq-catalogue .cp-entete {
    grid-column: 2;
  }

  #bq-catalogue .cp-option,
  #bq-catalogue .bq-composer,
  #bq-catalogue .bq-composes {
    grid-column: 1 / -1;
  }

  .bq-raccourcis {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -0.2rem;
    padding: 0 0.2rem 0.4rem;
    scrollbar-width: none;
  }

  .bq-raccourcis a {
    flex-shrink: 0;
  }

  #bq-catalogue .cp-gallery-prev,
  #bq-catalogue .cp-gallery-next {
    display: none;
  }

  #bq-catalogue .cp-product p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .bq-brand {
    font-size: 1.15rem;
  }

  .bq-brand img {
    width: 34px;
    height: 34px;
  }

  .bq-etapes {
    flex-wrap: nowrap;
    gap: 0.3rem;
  }

  .bq-etapes li {
    flex: 1 1 0;
  }

  .bq-etapes button {
    padding: 0.55rem 0.3rem;
    font-size: 0.78rem;
  }

  .bq-panier-ligne {
    grid-template-columns: 1fr auto;
  }

  .bq-panier-ligne > span:first-child {
    grid-column: 1 / -1;
  }

  .bq-panier-pied .btn {
    flex: 1 1 100%;
  }
}

.bq-panier-ligne .cp-qty {
  display: inline-flex;
  width: auto;
  justify-self: start;
}

.bq-panier-ligne .cp-qty input {
  width: 2.4rem;
  flex: 0 0 auto;
}

.bq-summary > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.bq-summary > span:first-child small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.bq-summary-droite {
  flex: 0 0 auto;
}

/* L'attribut hidden l'emporte toujours (sinon display: grid / inline-flex des blocs et boutons le masque) */
#boutique [hidden] {
  display: none !important;
}

/* Code promo replié */
.bq-code-replie {
  margin: 0 0 1rem;
}

.bq-code-replie summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
}

.bq-code-replie .bq-code {
  margin-top: 0.6rem;
}

.bq-code-info:empty {
  display: none;
}

/* Notification (panier vide…) */
.bq-notif {
  position: fixed;
  left: 50%;
  bottom: 6.5rem;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--brand-2);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  max-width: calc(100vw - 2rem);
  text-align: center;
}

.bq-vider-ligne {
  margin: 0.6rem 0 0;
  text-align: right;
}

.bq-vider {
  border: 0;
  background: none;
  color: #a3361f;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* Compositeur : pourquoi on ne peut pas ajouter */
.bq-compose-message {
  flex: 1 0 100%;
  margin: 0;
  color: #a3361f;
  font-weight: 600;
  font-size: 0.92rem;
}

.bq-compose-message:empty {
  display: none;
}

.bq-choix-item .cp-qty button.bq-plein {
  opacity: 0.35;
}

#bq-ajouter-compose.bq-incomplet {
  background: var(--cream);
  border-color: var(--line);
  color: var(--muted);
}
