/**
 * BYLED Configurator - Wizard Modal Styles for PrestaShop 1.6 (Bootstrap 3.3)
 * Design moderne basé sur presta1.6-configurator-byled
 */

/* ========== BOUTON CTA ========== */
.byled-cta-button {
  background: orange; /*#598ef7;*/
  border: none;
  padding: 1rem;
  font-size: 18px;
  font-weight: 900;
  transition: all 0.2s ease;
  width: 100%;
  color: black;
}

.byled-cta-button:hover {
  background: #bd8002;
}

/* ah 2026-02-16 : top config banner */
.byled-configurator-banner { 
    background: linear-gradient(135deg, #102a43 0%, #243b53 100%); 
    border-radius: 8px; 
    padding: 25px; 
    margin: 20px 0; 
    color: white; 
    font-family: Arial, sans-serif; 
    display: flex; 
    align-items: center; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    position: relative; overflow: hidden; 
} 
/* Motif décoratif en arrière-plan */ 
.byled-configurator-banner::after { 
    content: ""; 
    position: absolute; 
    right: -50px; 
    top: -50px; 
    width: 200px; 
    height: 200px; 
    background: rgba(255, 255, 255, 0.05); 
    border-radius: 50%; 
} 
.config-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    z-index: 1; 
    gap: 20px; 
} 
.config-text h2 { 
    margin: 0 0 8px 0; 
    font-size: 1.4rem; 
    color: #ffffff; 
    letter-spacing: 0.5px; 
    font-weight: bold; 
} 
.config-text p { 
    margin: 0; 
    font-size: 1rem; 
    color: #bcccdc; 
} 
.config-text strong { color: #ffffff; } 
.btn-config-ban { 
    background-color: #f3a723; /* Orange ByLED */ 
    color: #ffffff !important; 
    text-decoration: none !important; 
    padding: 15px 30px; 
    border-radius: 5px; 
    border: none;
    font-weight: bold; 
    font-size: 1.1rem; 
    display: flex; 
    align-items: center; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 0px #c68516; 
    white-space: nowrap; 
} 
.btn-config-ban:hover { 
    background-color: #ffb83d; 
    transform: translateY(-2px); 
    box-shadow: 0 6px 0px #c68516; 
} 
.btn-config-ban:active { transform: translateY(2px); box-shadow: 0 0px 0px #c68516; } 
.btn-config-ban .icon { margin-right: 10px; font-size: 1.3rem; } 
/* Responsive Design */ 
@media (max-width: 992px) { 
    .config-content { flex-direction: column; text-align: center; } 
    .config-text h2 { font-size: 1.2rem; } 
    .btn-config-ban { width: 100%; justify-content: center; } 
}

/* ========== WRAPPER ========== */
.byled-configurator-wrapper {
  margin: 0;
  padding: 0;
}

/* ========== UTILITY ========== */
.d-none {
  display: none;
}

/* ========== CUSTOM BACKDROP ========== */
.byled-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100%;
  height: 100%;
  background-color: #000000;
  opacity: 0;
  display: none;
  transition: opacity 0.3s ease;
}

.byled-modal-backdrop.show {
  display: block;
  opacity: 0.7;
}

/* ========== MODAL BACKDROP (Bootstrap default) ========== */
.modal-backdrop,
.modal-backdrop.in,
.modal-backdrop.fade,
.modal-backdrop.fade.in {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  z-index: -9999 !important;
}

/* Empêcher le body de devenir modal-open avec overflow hidden */
body.modal-open {
  overflow: auto !important;
}

/* ========== CONFIGURATOR POPUP (PRODUCT PAGE) ========== */
body.byled-configurator-open {
  overflow: hidden !important;
}

.byled-configurator-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(15, 23, 42, 0.78);
  padding: 24px;
}

.byled-configurator-popup.show {
  display: block;
}

.byled-configurator-popup__dialog {
  width: 96%;
  max-width: 1400px;
  height: calc(100vh - 48px);
  margin: 0 auto;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.byled-configurator-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.byled-configurator-popup__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.byled-configurator-popup__close {
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 26px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.byled-configurator-popup__close:hover {
  color: #0f172a;
}

.byled-configurator-popup__body {
  flex: 1;
  min-height: 0;
}

#byledConfiguratorIframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ========== MODAL BASE ========== */
#wizardModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.2) !important;
  /* background-color: transparent !important; */
}

#wizardModal.in {
  display: block;
}

#wizardModal .modal-dialog {
  position: relative;
  top: 50%;
  left: 50%;
  max-width: 580px;
  width: 90%;
  /* margin: 30px auto; */
  transform: translate(-50%, -50%);
}

#wizardModal .modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* ========== HEADER ========== */
#wizardModal .modal-header {
  background: orange;/*linear-gradient(135deg, #4a90e2 0%, #2563eb 100%);*/
  color: black;
  padding: 2rem;
  border: none;
  border-bottom: none;
}

#wizardModal .modal-header .close {
  color: white;
  opacity: 0.9;
  text-shadow: none;
  font-size: 18px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#wizardModal .modal-header .close:hover {
  opacity: 1;
  color: white;
  transform: scale(1.1);
}

#wizardModal .modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: white;
  letter-spacing: -0.01em;
  text-align: center;
  padding-right: 2rem;
  line-height: 1.3;
}

/* ========== PROGRESS BAR ========== */
.wizard-progress {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.wizard-progress .progress {
  display: none;
}

.wizard-progress .progress-bar {
  background: linear-gradient(90deg, #4a90e2 0%, #2563eb 100%);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
  line-height: 8px;
  color: transparent;
  font-size: 0;
}

.wizard-progress p {
  color: #1e293b;
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  text-align: center;
  letter-spacing: 0.01em;
}

.wizard-progress .current-step {
  color: #000000;
  font-weight: 700;
}

/* ========== MODAL BODY ========== */
#wizardModal .modal-body {
  padding: 1rem;
  background-color: white;
}

/* ========== STEP TITLES ========== */
.wizard-step {
  margin-top: -1rem;
  animation: fadeIn 0.4s ease;
}

.wizard-step h4 {
  font-size: 13px;
  font-weight: 700;
  color: black;
  margin-bottom: 2rem;
  margin-top: 0;
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.4;
  padding: 1rem;;
}

.wizard-step-subtitle {
  font-size: 13px;
  color: #475569;
  text-align: center;
  margin: -0.8rem 0 1.25rem;
}

/* ========== CARDS GRID ========== */
.wizard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 170px));
  gap: 0.85rem;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  width: 100%;
  max-width: 900px;
}

.wizard-cards > div {
  width: 100%;
  margin: 0;
}

/* ========== WIZARD CARDS ========== */
.wizard-card {
  background: white;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 0;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 140px;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}

/* Overlay sombre */
.wizard-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
  transition: background 0.25s ease;
}

.wizard-card:hover {
  border-color: #4a90e2;
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(74, 144, 226, 0.25);
}

.wizard-card:hover::after {
  background: linear-gradient(to bottom, rgba(74,144,226,0.1) 0%, rgba(74,144,226,0.7) 100%);
}

.wizard-card.selected {
  border-color: #4a90e2;
  border-width: 3px;
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.35);
  transform: translateY(-4px);
}

.wizard-card.selected::after {
  background: linear-gradient(to bottom, rgba(74,144,226,0.15) 0%, rgba(74,144,226,0.75) 100%);
}

/* Checkmark */
.wizard-card.selected::before {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  background: #4a90e2;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Card content */
.wizard-card h5 {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin: 0;
  padding: 1rem;
  line-height: 1.3;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  width: 100%;
}

.wizard-card small {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  display: block;
  margin-top: 0.25rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

/* ========== CARD BACKGROUNDS ========== */
.wizard-card[data-value="cuisine"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/cuisine.png');
}

.wizard-card[data-value="salon"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/salon.png');
}

.wizard-card[data-value="chambre"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/chambre.png');
}

.wizard-card[data-value="bureau"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/bureau.png');
}

.wizard-card[data-value="escaliers"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/escaliers.png');
}

.wizard-card[data-value="autre"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/autre.png');
}

.wizard-card[data-value="blanc"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/blanc.png');
}

.wizard-card[data-value="rgb"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/rgb.png');
}

.wizard-card[data-value="dynamic"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/dynamic.png');
}

.wizard-card[data-value="stairs"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/stairs.png');
}

.wizard-card[data-value="audio"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/audio.png');
}

.wizard-card[data-value="dmx"] {
  background-image: url('/modules/byledconfigurator/public/images/categories/dmx.png');
}

/* ========== FOOTER ========== */
#wizardModal .modal-footer {
  background: white;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

#wizardModal .modal-footer .btn {
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.25s ease;
  border: none;
}

#wizardModal .modal-footer .btn-default {
  background: #ef4444;
  color: white;
  border: none;
}

#wizardModal .modal-footer .btn-default:hover {
  background: #dc2626;
  color: white;
  transform: translateX(-2px);
}

#wizardModal .modal-footer #wizardPrev {
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  order: 0;
}

#wizardModal .modal-footer #wizardPrev:hover {
  background: #cbd5e0;
  color: #2d3748;
  transform: translateX(-2px);
}

#wizardModal .modal-footer #wizardCancel {
  order: 1;
  margin: 8px auto;
}

#wizardModal .modal-footer #wizardStart {
  order: 2;
}

#wizardModal .modal-footer .btn-success {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  border: none;
}

#wizardModal .modal-footer .btn-success:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
  color: white;
}

#wizardPrev, #wizardCancel, #wizardStart {
  padding: 1rem 1.5rem;
  margin: 0 auto 8px;
}


/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .byled-configurator-popup {
    padding: 10px;
  }

  .byled-configurator-popup__dialog {
    width: 100%;
    height: calc(100vh - 20px);
    border-radius: 8px;
  }

  #wizardModal .modal-dialog {
    max-width: 95%;
    /* margin: 1rem auto; */
  }
  
  #wizardModal .modal-body {
  }
  
  .wizard-card {
    min-height: 120px;
  }
  
  .wizard-step h4 {
    font-size: 18px;
  }
  
  .wizard-cards {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}
