/* Module BacEquivalents - CSS front */

/* Macaron "Équivalents dispo" style badge NEW */
.bac-eq-macaron {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 3px;
  margin-left: 10px;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  line-height: 1.3;
  white-space: nowrap;
  position: relative;
  top: -2px;
}
.bac-eq-macaron::before {
  content: "⇄ ";
  margin-right: 2px;
}


.bac-equivalents-block { margin: 30px 0; border: 2px solid #036a87; border-radius: 4px; overflow: hidden; font-family: inherit; }
.bac-eq-header { background: #036a87; color: #fff; padding: 12px 20px; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.bac-eq-count { background: rgba(255,255,255,0.2); padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.bac-eq-intro { background: #eaf2f8; padding: 10px 20px; font-size: 13px; color: #555; border-bottom: 1px solid #d0dce6; }
.bac-eq-list { padding: 15px; background: #fafcfd; }

.bac-eq-card { display: grid; grid-template-columns: 310px 1fr auto; gap: 18px; padding: 15px; background: #fff; border: 1px solid #e0e0e0; margin-bottom: 10px; align-items: center; border-radius: 3px; transition: box-shadow 0.2s; }
.bac-eq-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.bac-eq-card:last-child { margin-bottom: 0; }

.bac-eq-img { width: 300px; height: 300px; background: #f5f5f5; border: 1px solid #eee; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bac-eq-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bac-eq-img-placeholder { color: #888; font-size: 11px; text-align: center; padding: 5px; font-weight: 600; }

.bac-eq-info { display: flex; flex-direction: column; gap: 4px; }
.bac-eq-brand-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }

.bac-eq-badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }
.bac-eq-badge-strict { background: #d4edda; color: #155724; }
.bac-eq-badge-proche { background: #fff3cd; color: #856404; }
.bac-eq-badge-alternative { background: #e2e3f3; color: #383d5c; }
.bac-eq-badge-quote { background: #f8d7da; color: #721c24; }

.bac-eq-name { font-size: 15px; color: #0a3c5c; font-weight: 600; }
.bac-eq-name a { color: #0a3c5c; text-decoration: none; }
.bac-eq-name a:hover { text-decoration: underline; }
.bac-eq-ref { font-size: 12px; color: #888; font-family: 'Courier New', monospace; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ========== MACARONS DE REMISE (-X% vs prix mère à l'unité) ========== */
.bac-eq-discount {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 9px;
  border-radius: 12px;
  line-height: 1.3;
  white-space: nowrap;
  vertical-align: middle;
}

/* Strict (3/3 dimensions identiques) — rouge vif, style promo commerciale */
.bac-eq-discount-strict {
  background: #e74c3c;
  color: #fff;
  box-shadow: 0 1px 2px rgba(150, 30, 20, 0.25);
}

/* Proche (2/3 dimensions identiques) — gris moyen, moins visible */
.bac-eq-discount-close {
  background: #e5e5e5;
  color: #888;
  box-shadow: none;
}

/* Alternative (0 ou 1 dimension correspondante) — gris très clair, discret */
.bac-eq-discount-faded {
  background: #f2f2f2;
  color: #b0b0b0;
  box-shadow: none;
}

/* ========== BANNER REMISE au-dessus du prix à l'unité (très visible) ========== */
.bac-eq-discount-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-family: Arial, sans-serif;
  line-height: 1.15;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
  text-align: center;
}
.bac-eq-discount-banner-sub {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.95;
  letter-spacing: 0.2px;
}
.bac-eq-discount-banner-sub strong {
  font-family: 'Courier New', monospace;
  font-weight: 800;
}
.bac-eq-discount-banner-pct {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.bac-eq-discount-banner-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  opacity: 0.9;
}
.bac-eq-discount-banner-star {
  font-size: 14px;
  font-weight: 800;
  margin-left: 2px;
  top: -0.4em;
  line-height: 0;
  position: relative;
}
/* Banner strict : rouge vif (promo commerciale) */
.bac-eq-discount-banner.bac-eq-discount-strict {
  background: #e74c3c;
  color: #fff;
  box-shadow: 0 2px 6px rgba(180, 30, 20, 0.3);
}
/* Banner proche : gris moyen */
.bac-eq-discount-banner.bac-eq-discount-close {
  background: #e5e5e5;
  color: #666;
  box-shadow: none;
}
/* Banner faded : gris très clair */
.bac-eq-discount-banner.bac-eq-discount-faded {
  background: #f2f2f2;
  color: #aaa;
  box-shadow: none;
}

/* ========== TABLEAU COMPARATIF DES DIMENSIONS (mère vs fils) ========== */
.bac-eq-dims-table {
  margin-top: 8px;
  border-collapse: collapse;
  font-family: 'Open Sans Semi Bold', 'Open Sans', sans-serif;
  font-size: 14px;
  line-height: 1.4;
}
.bac-eq-dims-table th,
.bac-eq-dims-table td {
  padding: 5px 10px;
  text-align: center;
  border: 1px solid #e0e8ef;
  font-weight: 600;
  font-family: 'Open Sans Semi Bold', 'Open Sans', sans-serif;
}
.bac-eq-dims-table .bac-eq-dims-label {
  background: #f5f9fb;
  color: #036a87;
  font-weight: 700;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.2px;
  padding: 5px 10px;
  min-width: 100px;
  max-width: 160px;
  white-space: nowrap;
  font-family: 'Open Sans Semi Bold', 'Open Sans', sans-serif;
}
.bac-eq-dims-table .bac-eq-dim-sep {
  border: none;
  color: #aaa;
  padding: 5px 2px;
  background: transparent;
  font-weight: 400;
}
.bac-eq-dims-table .bac-eq-dim-unit {
  background: transparent;
  border: none;
  color: #666;
  font-size: 13px;
  padding-left: 0;
  padding-right: 4px;
  font-weight: 600;
}
.bac-eq-dims-table .bac-eq-dim-last {
  padding-right: 2px;
}
.bac-eq-dims-table .bac-eq-dim-diff {
  color: #c0392b;
  font-weight: 700;
  background: #fdecea;
}
.bac-eq-dims-table .bac-eq-dim-missing {
  color: #b8860b;
  background: #fff8e1;
  font-style: italic;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Open Sans Semi Bold', 'Open Sans', sans-serif;
  padding: 5px 10px;
}

/* Note astérisque en bas de la zone prix unitaire */
.bac-eq-price-note {
  font-size: 10px;
  color: #2d6a0e;
  text-align: center;
  padding-top: 4px;
  opacity: 0.85;
  line-height: 1.3;
}
.bac-eq-price-note strong {
  font-family: 'Courier New', monospace;
  font-weight: 700;
}

.bac-eq-conditioning { font-size: 12px; color: #777; font-style: italic; }

.bac-eq-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 320px; max-width: 380px; }

/* ZONES SÉPARÉES : tarif unitaire + tarifs dégressifs */
.bac-eq-zone { border-radius: 5px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }

/* Zone tarif à l'unité (verte, achat direct) */
.bac-eq-zone-unit { background: #eaf7df; border: 1.5px solid #6dbe45; }
.bac-eq-zone-unit .bac-eq-zone-head { align-items: center; }
.bac-eq-zone-unit .bac-eq-zone-label { color: #2d6a0e; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; flex: 1; }
.bac-eq-zone-unit .bac-eq-zone-icon { background: #6dbe45; color: #fff; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: bold; }
.bac-eq-zone-unit .bac-eq-zone-price { color: #2d6a0e; font-weight: 700; font-size: 18px; white-space: nowrap; }

/* Zone tarifs dégressifs (neutre, devis) */
.bac-eq-zone-lot { background: #f7f9fb; border: 1px solid #d0dce6; }
.bac-eq-zone-lot .bac-eq-zone-head { align-items: center; }
.bac-eq-zone-lot .bac-eq-zone-label { color: #0a3c5c; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; }
.bac-eq-zone-lot .bac-eq-zone-icon { font-size: 15px; }

.bac-eq-zone-head { display: flex; gap: 8px; align-items: baseline; }

.bac-eq-lot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.bac-eq-lot-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed #e0e8ef; }
.bac-eq-lot-cart { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.bac-eq-lot-qty { width: 56px; padding: 4px 6px; border: 1px solid #c0d0de; border-radius: 3px; font-size: 12px; font-family: inherit; text-align: center; background: #fff; }
.bac-eq-lot-qty:focus { outline: 2px solid #6dbe45; outline-offset: -1px; }
.bac-eq-btn-cart-lot { padding: 5px 10px; font-size: 12px; font-weight: 600; background: #6dbe45; color: #fff; border: none; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.bac-eq-btn-cart-lot:hover { background: #5ca638; }
.bac-eq-btn-cart-lot:disabled { opacity: 0.6; cursor: wait; }
.bac-eq-lot-list li:last-child { border-bottom: none; }
.bac-eq-lot-cond { color: #555; }
.bac-eq-lot-price { color: #0a3c5c; font-weight: 600; white-space: nowrap; }

.bac-eq-btn-full { width: 100%; padding: 9px 12px; font-size: 13px; text-align: center; }
.bac-eq-btns { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.bac-eq-btn { padding: 7px 12px; font-size: 12px; border-radius: 3px; border: none; cursor: pointer; font-weight: 600; transition: all 0.15s; }
.bac-eq-btn-devis { background: #fff; color: #036a87; border: 1px solid #036a87; }
.bac-eq-btn-devis:hover { background: #036a87; color: #fff; }
.bac-eq-btn-cart { background: #6dbe45; color: #fff; }
.bac-eq-btn-cart:hover { background: #5ca638; }

/* Modal */
.bac-eq-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; align-items: center; justify-content: center; }
.bac-eq-modal-overlay.active { display: flex; }
.bac-eq-modal { background: #fff; border-radius: 6px; width: 500px; max-width: 92%; padding: 25px; position: relative; max-height: 90vh; overflow-y: auto; }
.bac-eq-modal h3 { color: #036a87; margin: 0 0 5px; font-size: 18px; }
.bac-eq-modal-sub { font-size: 13px; color: #666; margin: 0 0 10px; }
.bac-eq-product-target { background: #f5f9fb; padding: 10px; margin: 15px 0; border-left: 3px solid #036a87; font-size: 13px; }
.bac-eq-modal-close { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; color: #999; border: none; background: none; }
.bac-eq-modal-close:hover { color: #333; }

.bac-eq-form-row { margin-bottom: 12px; }
.bac-eq-form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #444; }
.bac-eq-form-row input, .bac-eq-form-row textarea { width: 100%; padding: 9px; border: 1px solid #ccc; border-radius: 3px; font-size: 13px; font-family: inherit; }
.bac-eq-form-row textarea { resize: vertical; min-height: 70px; }
.bac-eq-form-submit { background: #036a87; color: #fff; padding: 12px 25px; border: none; border-radius: 3px; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; margin-top: 10px; }
.bac-eq-form-submit:hover { background: #024f66; }
.bac-eq-form-submit:disabled { opacity: 0.6; cursor: wait; }

/* Toast */
.bac-eq-toast { position: fixed; top: 20px; right: 20px; background: #6dbe45; color: #fff; padding: 15px 20px; border-radius: 4px; box-shadow: 0 3px 10px rgba(0,0,0,0.15); z-index: 20000; display: none; }
.bac-eq-toast.active { display: block; animation: bac-eq-slideIn 0.3s; }
.bac-eq-toast.error { background: #d9534f; }
@keyframes bac-eq-slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Responsive */
@media (max-width: 768px) {
  .bac-eq-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .bac-eq-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; min-width: 0; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee; width: 10
/* ===== v1.3.3 : Colonne Capacité (L) dans tableau comparatif ===== */
.bac-eq-dims-table .bac-eq-cap-sep {
  background: #f5f9fb;
  color: #036a87;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 5px 8px;
  border-left: 2px solid #036a87;
}
.bac-eq-dims-table .bac-eq-cap-value {
	text-align: right;
	font-weight: 600;
	padding-left: 6px;
	padding-right: 2px;
}
.bac-eq-dims-table .bac-eq-cap-unit {
	text-align: left;
	color: #666;
	font-size: 11px;
	padding-left: 2px;
}

/* v1.4.1 — Bouton "Demande de devis pour lot" grisé/inactif quand option désactivée */
.bac-eq-btn.bac-eq-btn-disabled,
.bac-eq-btn.bac-eq-btn-disabled:hover,
.bac-eq-btn.bac-eq-btn-disabled:focus {
  background: #e8e8e8 !important;
  color: #999 !important;
  border-color: #d0d0d0 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  pointer-events: none;
  box-shadow: none !important;
}

