/* daensemble : bloc « Complétez votre ensemble » (fiche produit). Règles ajoutées seulement, portée #da-ens / .da-ens-*. Charte : vert #5c7a5e, bordeaux #7d2039, texte #2b2420. */
.da-ens { border: 1px solid #e3e9ef !important; border-top: 3px solid #7d2039 !important; border-radius: .5rem; background: #fff; margin-top: 1.25rem; }
.da-ens .card-body { padding: 1rem 1.125rem; }
.da-ens-title { font-weight: 700; font-size: 1.25rem; line-height: 1.3; color: #2b2420; margin-bottom: .75rem; }
.da-ens-main { display: flex; align-items: center; gap: .75rem 1.25rem; }
.da-ens-thumbs { display: flex; align-items: center; min-width: 0; }
.da-ens-op { color: #7d879c; font-size: 1.25rem; font-weight: 300; padding: 0 .4rem; flex: 0 0 auto; }
.da-ens-thumb { position: relative; display: block; width: 120px; flex: 0 1 120px; min-width: 0; margin: 0; cursor: pointer; }
.da-ens-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: .375rem; border: 1px solid #e3e9ef; background: #f6f9fc; transition: opacity .15s, filter .15s; }
.da-ens-thumb input { position: absolute; top: .35rem; left: .35rem; width: 1.15rem; height: 1.15rem; accent-color: #7d2039; cursor: pointer; margin: 0; }
.da-ens-thumb.is-off img, .da-ens-line.is-off { opacity: .4; }
.da-ens-thumb.is-off img { filter: grayscale(1); }
.da-ens-buy { margin-left: auto; flex: 0 0 13.5rem; text-align: right; }
.da-ens-total { font-weight: 700; font-size: 1.25rem; color: #2b2420; line-height: 1.2; white-space: nowrap; }
.da-ens-total-label { font-size: .8125rem; color: #7d879c; }
.da-ens .da-ens-btn { display: block; width: 100%; margin-top: .6rem; padding: .45rem .75rem; border: 2px solid #5c7a5e; border-radius: 50rem; background: #fff; color: #5c7a5e; font-weight: 700; font-size: .875rem; line-height: 1.3; white-space: normal; box-shadow: none; }
.da-ens .da-ens-btn:not(:disabled):hover, .da-ens .da-ens-btn:not(:disabled):focus { background: #5c7a5e; color: #fff; }
.da-ens .da-ens-btn:disabled { opacity: .6; cursor: not-allowed; }
.da-ens-lines { list-style: none; margin: .875rem 0 0; padding: .625rem 0 0; border-top: 1px solid #f0f2f5; font-size: .875rem; }
.da-ens-line { display: flex; align-items: baseline; gap: .75rem; padding: .15rem 0; }
.da-ens-line a { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #4b566b; }
.da-ens-line a:hover { color: #9c2847; }
.da-ens-line .da-ens-price { flex: 0 0 auto; font-weight: 500; color: #2b2420; }
.da-ens-line .da-ens-this { font-weight: 600; color: #2b2420; }
/* ligne d'accroche sous « Ajouter au panier » (ordinateur seulement) */
.da-ens-hook { display: none; align-items: center; gap: .5rem; margin-top: .75rem; padding: .45rem .7rem; border: 1px solid #5c7a5e; border-radius: .5rem; background: #f1f5f1; font-size: .9375rem; color: #2b2420 !important; text-decoration: none !important; transition: background-color .15s; }
.da-ens-hook:hover, .da-ens-hook:focus { background: #e3ebe3; }
.da-ens-hook strong { color: #46614a; }
.da-ens-hook img { width: 36px; height: 36px; object-fit: cover; border-radius: .25rem; border: 1px solid #d5ddd5; background: #fff; }
.da-ens-hook i { margin-left: auto; color: #5c7a5e; }
@media (min-width: 992px) { .da-ens-hook { display: flex; } }
/* mobile : masqué tant que le script ne l'a pas placé après la zone d'achat (jamais entre photos et prix) */
#da-ens[hidden] { display: none !important; }
/* ordinateur : sous la ligne photo + infos, pleine largeur (rangée .da-ens-row créée par le JS seulement à partir de 992 px) */
.da-ens-row > .col-12 > #da-ens { margin: 0 0 1.5rem; }
@media (max-width: 991.98px) { #da-ens:not(.is-placed) { display: none; } .da-ens { margin: 0 0 1rem; } }
/* écrans étroits : total puis bouton sous les vignettes */
@media (max-width: 575.98px) {
  .da-ens-main { flex-wrap: wrap; }
  .da-ens-thumbs { width: 100%; }
  .da-ens-thumb { flex: 1 1 0; max-width: 120px; }
  .da-ens-buy { margin-left: 0; flex: 1 1 100%; text-align: left; }
  .da-ens-sum { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
  .da-ens-total { font-size: 1.125rem; }
}
/* étape 5 : message après l'ajout au panier (vide = invisible) */
.da-ens-msg { margin-top: .75rem; padding: .5rem .75rem; border-radius: .375rem; font-size: .875rem; line-height: 1.4; color: #2b2420; }
.da-ens-msg:empty { display: none; }
.da-ens-msg p { margin: 0 0 .25rem; }
.da-ens-msg.is-ok { background: #f1f5f1; border: 1px solid #5c7a5e; }
.da-ens-msg.is-warn { background: #fdf6ec; border: 1px solid #c8913a; }
.da-ens-msg.is-error { background: #fbeef1; border: 1px solid #7d2039; }
.da-ens-msg .da-ens-cart { font-weight: 600; color: #46614a; text-decoration: underline; }
.da-ens .da-ens-btn[aria-busy] { cursor: progress; }
/* 04/12/2026 : lignes avec « + », ligne du produit visité en gras, signes « + » des vignettes (prix des lignes en .checkoutprice, total en .categoryprice, classes du thème) */
.da-ens .da-ens-op { font-size: 1.8rem; font-weight: 500; padding: .5rem; }
.da-ens-line .da-ens-plus { flex: 0 0 auto; color: #7d879c; font-size: 1.125rem; font-weight: 500; line-height: 1; margin-right: -.25rem; }
/* « + » réservé mais invisible sur la ligne du produit visité : les 3 noms restent alignés */
.da-ens-line.is-anchor .da-ens-plus { visibility: hidden; }
.da-ens-line.is-anchor, .da-ens-line.is-anchor a, .da-ens-line.is-anchor .da-ens-this { font-weight: 700; color: #2b2420; }
.da-ens .da-ens-line.is-anchor .checkoutprice { font-weight: 700 !important; }
/* ordinateur pleine largeur (façon Amazon) : titre, grandes vignettes avec « + » puis total et bouton à droite, lignes dessous à largeur limitée */
.da-ens-row .da-ens .card-body { padding: 1.25rem 1.5rem 1.125rem; }
.da-ens-row .da-ens-title { margin-bottom: 1rem; }
.da-ens-row .da-ens-main { gap: 1rem 2.5rem; }
.da-ens-row .da-ens-thumb { width: 180px; flex: 0 1 180px; min-width: 110px; }
.da-ens-row .da-ens-buy { flex: 0 0 16rem; }
.da-ens-row .da-ens-line { max-width: 44rem; }
/* ordinateur (>= 992 px, bloc pleine largeur) : nom (3 lignes au plus) et prix sous chaque image, liste masquée ;
   grille : rangée 1 = images et « + » centrés sur les images, rangée 2 = légendes (colonne posée dans le gabarit), prix alignés en bas */
.da-ens-cap { display: none; }
@media (min-width: 992px) {
  .da-ens-row .da-ens-main { align-items: flex-start; flex-wrap: wrap; }
  .da-ens-row .da-ens-buy { align-self: center; }
  .da-ens-row .da-ens-thumbs { display: grid; grid-template-columns: repeat(var(--k, 2), minmax(110px, 180px) auto) minmax(110px, 180px); align-items: center; }
  .da-ens-row .da-ens-thumb { width: auto; min-width: 0; grid-row: 1; }
  .da-ens-row .da-ens .da-ens-op { grid-row: 1; font-size: 1.8rem; text-align: center; }
  .da-ens-row .da-ens-cap { grid-row: 2; display: flex; flex-direction: column; align-self: stretch; min-width: 0; padding-top: .5rem; transition: opacity .15s; }
  .da-ens-row .da-ens-cap-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: .875rem; line-height: 1.35; color: #4b566b; margin-bottom: .35rem; }
  .da-ens-row .da-ens-cap-name:hover { color: #9c2847; }
  .da-ens-row .da-ens-cap.is-anchor .da-ens-cap-name, .da-ens-row .da-ens-cap.is-anchor .da-ens-this { font-weight: 700; color: #2b2420; }
  .da-ens-row .da-ens-cap .da-ens-price { margin-top: auto; }
  .da-ens-row .da-ens-cap.is-off { opacity: .4; }
  .da-ens-row .da-ens-lines { display: none; }
}
/* 992-1199 px : vignettes et légendes plus petites (150 px au plus) pour garder 3 colonnes, total et bouton à droite ;
   s'ils ne tiennent plus, ils passent sous les vignettes (flex-wrap) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .da-ens-row .da-ens-main { gap: 1rem 1.5rem; }
  .da-ens-row .da-ens-thumbs { grid-template-columns: repeat(var(--k, 2), minmax(90px, 150px) auto) minmax(90px, 150px); }
  .da-ens-row .da-ens .da-ens-op { padding: .5rem .35rem; }
  .da-ens-row .da-ens-cap-name { font-size: .8125rem; }
  .da-ens-row .da-ens-buy { flex: 0 0 13rem; }
}
/* mobile et écran étroit (< 992 px) : environ 1rem de plus au-dessus et au-dessous du bloc (marges qui fusionnent avec
   celles des voisins : même écart quel que soit l'élément au-dessus) ; noms sur 2 lignes au plus au lieu d'une ligne tronquée */
@media (max-width: 991.98px) {
  .product-add-to-cart #da-ens.is-placed { margin-top: 2rem; margin-bottom: 2rem; }
  .da-ens-line a { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-overflow: clip; line-height: 1.35; }
}
