/**
 * 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;
}

/* ========== 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;
}

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

#wizardModal.in {
  display: block;
}

#wizardModal .modal-dialog {
  max-width: 580px;
  width: 90%;
  margin: 30px auto;
}

#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;;
}

/* ========== 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');
}

/* ========== 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: 0 auto 8px;
}

#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) {
  #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));
  }
}
