/****** COMMUNS ******/
#elementor-menu-cart__toggle_button {
  padding: 0!important;
  background: transparent!important;
  height: 24px!important;
}


.configurateur-wrapper {
  background: #36006b;
  background: radial-gradient(circle, rgba(42, 0, 71, 1) 0%, rgba(13, 0, 21, 1) 80%);
  min-height: 100vh;
  margin-top: -150px;
  padding-top: 150px;  
}

.header-configurateur {
  color: white;
  position: relative;
  z-index: 10;
}

.header-configurateur p {
  font-weight: 300;
}

.header-configurateur h1 {
  font-weight: 400;
  font-size: 3rem;
}

.header-configurateur .title-step {
  font-size: 1.6rem;
}

.header-configurateur .title-step span {
  font-size: 1.3rem;
  display: inline-block;
  height: 40px;
  width: 40px;
  border: 2px solid var(--se-violet-clair);
  background: var(--se-dark);
  border-radius: 100%;
  text-align: center;
  padding: 4px;
}

.config-steps { 
  gap: 20px;
  font-size: 0.9rem; 
}

.config-steps .nav-link {
  color: var(--se-gris);
  border-radius: 50px;
}

.config-steps .nav-link.active {
  background: black;
  color: white;
  border: 1px solid var(--se-violet-clair);
}

.config-steps .nav-link.completed {
  background: var(--se-violet-clair);
  color: white;
}

#config-step-content {
  max-width: 1200px;
  width: 100%;
  transition: width 0.3s ease, margin-left 0.3s ease;
}

#footer-buttons {
  position: relative;
  z-index: 10;
}

#footer-buttons .btn-primary, #step5-navigation .btn-primary {
  background: var(--se-orange);
}

#footer-buttons .btn-primary i, #step5-navigation .btn-primary i {
  color: var(--se-violet-clair);
}

#footer-buttons .btn-primary:hover, #step5-navigation .btn-primary:hover {
  background: var(--se-violet-clair);
}

#footer-buttons .btn-primary:hover i, #step5-navigation .btn-primary:hover i {
  color: white;
}

input[type="checkbox"] { height: 20px!important; width: 20px!important; }

/* Icônes FontAwesome grisées par défaut */
.nav-tabs .nav-link i {
  color: #EEEE;
  filter: grayscale(100%) brightness(0.7);
  margin-right: 5px;
  font-size: 14px;
}

/* Icônes actives avec couleurs et sans filtre */
.nav-tabs .nav-link i.active {
  filter: none;
}


.icon-info { width: 25px; }

/* Loader pour les étapes du configurateur */
.step-loader-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.step-loader-container .spinner-border {
  border-width: 4px;
}

.step-loader-container h5 {
  font-weight: 600;
  color: #495057;
}

.step-loader-container .small {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Animation d'apparition */
.step-loader-container {
  animation: fadeInLoader 0.3s ease-in-out;
}

@keyframes fadeInLoader {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/****** NAV ADRESSES *****/
#nav-adresses  {
  gap: 5px;
}

#nav-adresses .nav-link {
  border-radius: 0!important;
  border-top-left-radius: 20px!important;
  border-top-right-radius: 20px!important;
  background: var(--se-violet);
  color: white;
  border: none;
  border-bottom: 1px solid white;
}

#nav-adresses .nav-link:hover {
  background: var(--se-violet-clair);
}

#nav-adresses .nav-link.active {
  background: white;
  color: var(--se-violet);
}

/****** SIDEBAR *****/
/* =============================================================================
   SIDEBAR COLLAPSIBLE SYSTEM
============================================================================= */

/* État par défaut : sidebar visible */
body {
  transition: margin-right 0.3s ease;
  margin-right: 0;
}

body.sidebar-open {
  margin-right: 300px; /* Pousse le contenu vers la gauche */
}

.sidebar {
  min-height: 100vh;
  width: 300px;
  position: fixed;
  top: 0;
  right: -300px; /* Cachée par défaut */
  z-index: 20;
  background-color: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
}

.sidebar.sidebar-visible {
  right: 0; /* Visible quand la classe est ajoutée */
}

/* Bouton toggle */
.sidebar-toggle {
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  z-index: 25;
  background: var(--se-violet);
  color: white;
  border: none;
  border-radius: 50px; 
  width: 50px;
  height: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.sidebar-toggle:hover {
  background: var(--se-violet-clair);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle.sidebar-open {
  right: 310px; /* Se déplace avec la sidebar */
}

.sidebar-toggle i {
  transition: transform 0.3s ease;
}

.sidebar-toggle.sidebar-open i {
  transform: rotate(180deg);
}

/* Ajustement du contenu principal */
#config-step-content {
  max-width: 1200px;
  width: 100%;
  margin-left: 0;
  transition: width 0.3s ease, margin-left 0.3s ease;
}

body.sidebar-open #config-step-content {
  width: calc(100% - 320px);
  margin-left: 0;
}

/* Header de la sidebar */
.sidebar-header {
  background: var(--se-mauve-clair);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header .title {
  color: var(--se-violet);
  font-size: 1.1rem;
  font-weight: 600;
}

.sidebar-close-btn {
  border-color: var(--se-violet);
  color: var(--se-violet);
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-close-btn:hover {
  background: var(--se-violet);
  color: white;
  border-color: var(--se-violet);
}

/* Animation du bouton toggle */
.sidebar-toggle {
  backdrop-filter: blur(10px);
  border-top-right-radius: 0!important;
  border-bottom-right-radius: 0!important;
}

.sidebar-toggle::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-toggle:hover::before {
  opacity: 1;
}

/* Responsive : masquer la sidebar sur mobile */
@media (max-width: 991.98px) {
  .sidebar-toggle {
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
  
  .sidebar {
    width: 280px;
    right: -280px;
  }
  
  .sidebar.sidebar-visible {
    right: 0;
  }
  
  .sidebar-toggle.sidebar-open {
    right: 295px;
  }
  
  body.sidebar-open {
    margin-right: 0; /* Pas de push sur mobile */
  }
  
  #config-step-content {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

/* Overlay pour mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 19;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Animation d'entrée pour la sidebar */
@keyframes slideInRight {
  from {
    right: -300px;
    opacity: 0;
  }
  to {
    right: 0;
    opacity: 1;
  }
}

.sidebar.sidebar-visible {
  animation: slideInRight 0.3s ease;
}

/* Badge de notification sur le bouton (optionnel) */
.sidebar-toggle .badge-notification {
  position: absolute;
  top: -5px;
  right: 5px;
  background: var(--se-orange);
  color: white;
  border-radius: 50px;
  width: 20px;
  height: 20px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Amélioration des transitions sur les éléments de la sidebar */
.sidebar .blockParameter,
.sidebar .blockRecap {
  transition: transform 0.2s ease;
}

.sidebar:not(.sidebar-visible) .blockParameter,
.sidebar:not(.sidebar-visible) .blockRecap {
  transform: translateX(20px);
  opacity: 0.8;
}

.sidebar { 
  min-height: 100vh; 
  max-width: 300px; 
  position: fixed;
  top: 0px;
  right: -300px;
  z-index: 20;
  background-color: white;
  transition: right 0.3s ease;
}

.sidebar.sidebar-visible {
  right: 0;
}

.sidebar-toggle {
  position: fixed;
  top: 50%;
  right: 0px;
  transform: translateY(-50%);
  z-index: 25;
  background: var(--se-violet);
  color: white;
  border: none;
  border-radius: 50px;
  width: 70px;
  height: 50px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 10px 25px!important;
}

.sidebar-toggle:hover {
  background: var(--se-violet-clair);
  transform: translateY(-50%);
}

.sidebar-toggle.sidebar-open {
  right: 300px; /* Se déplace avec la sidebar */
}

.sidebar-toggle i {
  transition: transform 0.3s ease;
}

.sidebar-toggle.sidebar-open i {
  transform: rotate(180deg);
}

#config-sidebar {
  top: 0px;
  right: 0;
  position: sticky;
  font-size: 13px;
}

#config-sidebar .checkbox-wrapper .cbx span:first-child {
  width: 18px;
  height: 18px;
}

#config-sidebar .checkbox-wrapper .cbx span:first-child svg {
  top: 1px;
  left: 1px;
}

#config-sidebar .blockParameter {
  background: var(--se-mauve-clair);
}

#config-sidebar .blockParameter .title {
  display: flex;
  gap: 10px;
  font-size: 1.7em;
  color: var(--se-violet);
  text-transform: uppercase;
}

#config-sidebar .blockParameter .title img {
  width: 26px;
}

#config-sidebar .blockParameter .form-label {
  font-size: 1.2em;
  font-weight: 600;
}

#config-sidebar .blockRecap {
  background: white;
}

#config-sidebar-total {
  color: var(--se-violet);
  font-size: 1rem;
}

#config-sidebar-total small {
  line-height: 1rem;
}

#config-sidebar-total .text-muted {
  color: var(--se-violet);
  font-size: 0.7rem;
}

#config-recapitulatif .accordion-button {
  padding: 8px!important;
  font-size: 0.8rem;
  background: var(--se-mauve-clair);
  color: var(--se-violet);
  border-radius: 5px!important;
}

#config-recapitulatif .accordion-button:after {
  width: 15px!important;
  height: 15px!important;
  background-size: 12px;
  content: "\f078";
  font-family: FontAwesome;
  margin-top: 2px;
}

#config-recapitulatif .accordion-button[aria-expanded="true"] {
  background: var(--se-violet-clair);
  color: white;
}

#config-recapitulatif .accordion-button[aria-expanded="true"]:after {
  content: "\f077";
  font-family: FontAwesome;
}

#config-recapitulatif .accordion-body {
  padding: 15px;
  background: rgba(229, 229, 229, 0.4);
}

#config-recapitulatif h6 {
  font-size: 0.8rem;
}


/****** ITEM PRODUCT *****/

.card {
  border-radius: 20px;
}

.card-body {
  /* box-shadow: 0 8px 40px var(--se-violet-clair); */
  z-index: 1;
}

.card-title {
  font-size: 1.2rem;
  color: var(--se-violet);
  font-weight: 700!important;
}

.item-product {
  display: flex;
  align-items: center;
  justify-content: space-around;
  border: 1px solid var(--se-gris-clair);
  border-radius: 15px;
  width: 100%;
  padding: 1rem;
}

.item-product .bloc-price-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
}

.item-product .price, .item-frais .price {
  font-size: 1rem;
  color: var(--se-violet);
  font-weight: bold;
  margin: 0;
}

.item-product .product-title {
  font-size: 1rem;
  color: var(--se-violet);
  font-weight: bold;
  margin: 0;
}

.item-product .text-muted {
  font-size: 0.9rem;
}

.item-product .img-responsive {
  max-width: 100px;
  padding: 0 10px;
}

@media (max-width: 767px) { 
  .item-product {
    padding: 1.5rem  1rem 1rem;
    flex-wrap: wrap;
    box-shadow: 0 8px 40px #65598359;
    flex-direction: column;
    align-items: center;
  }
  .item-product .checkbox-wrapper {
    flex-direction: column;
    align-items: center;
  } 
  .item-product .text-muted {
    text-align: center;
    display: block;
  }
  .item-product .bloc-price-end {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
  }
  .item-product .bloc-price-end .prix-affiche {
    display: none;
  }
  .item-product .price, .item-product .product-title, .item-frais .price {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-align: center;
  }
  .item-product .img-responsive {
    max-width: 160px;
  }
}



/****** STEP 1 *****/
#liste-adresses .list-group li {
  background: var(--se-mauve-clair);
  border: none;
}

.btn-remove-adresse {
  padding: 0!important;
  background: transparent!important;
}

.btn-remove-adresse i {
  color: var(--se-rouge);
  font-size: 1.5rem;
}

/****** STEP 5 *****/
.step-5 .frais-total {
  font-size: 1rem;
  background: var(--se-violet)!important;
}


/****** STEP 6 *****/
.step-6 table .colProduct { width: 70%; }
.step-6 table .colQty, .step-6 table .colPrice { width: 10%; }

.step-6 #btn-commander {
  background: var(--se-orange);
}
.step-6 #btn-commander:hover {
  background: var(--se-green);
}
.step-6 #btn-commander img {
  width: 20px;
  margin-right: 5px;
}

.step-6 .accordion-body {
  background: rgba(229, 229, 229, 0.4);
}

.step-6 .accordion-button {
  border-radius: 5px;
  background-color: var(--se-gris);
  color: white;
  padding: 1.2rem;
  text-transform: uppercase;
}

.step-6 .accordion-button i {
  color: var(--se-orange);
}

.step-6 .accordion-button[aria-expanded="true"] {
  border-radius: 5px;
  background-color: var(--se-violet);
}

.step-6 .recap-section {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem 1rem 0.5rem;
  background: #fff;
}

.step-6 .section-title {
  color: var(--se-violet);
  font-weight: 700;
  border-bottom: 1px solid var(--se-gris-clair);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}

/* Structure Grid Responsive */
.products-grid {
  width: 100%;
}

.grid-header {
  display: grid;
  grid-template-columns: 2fr 140px 100px 140px;
  gap: 1rem;
  padding: 0.2rem 1rem;
  border-radius: 6px;
  color: var(--se-gris);
  margin-bottom: 0rem;
  font-size: 0.7rem;
}

.grid-header > div {
  display: flex;
  align-items: center;
}

/* Lignes de produits */
.product-row {
  display: grid;
  grid-template-columns: 2fr 140px 100px 140px;
  gap: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  align-items: center;
  transition: all 0.2s ease;
}

.product-row:hover {
  background: #f8f9fa;
  border-color: var(--se-mauve-clair);
}

.product-row .product-info {
  display: flex;
  flex-direction: column;
}

.product-row .product-name {
  font-weight: 600;
  color: var(--se-violet);
}

.product-row .product-description {
  font-size: 0.875rem;
  color: #6c757d;
}

.product-row .quantity {
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.product-row .total-price {
  text-align: right;
}

.product-row .unit-price,
.product-row .total-price {
  font-weight: 600;
}

.product-row .total-price {
  color: var(--se-violet);
}

.totaux-adresse {
  background: var(--se-violet);
  color: white;
}

/* =============================================================================
   RESPONSIVE MOBILE (< 768px)
============================================================================= */

@media (max-width: 767.98px) {
  
  .step-6 .recap-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .step-6 .section-title {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 0;
  }
  
  /* Grid devient des cartes empilées */
  .product-row {
    display: block;
    padding: 1.5rem 1rem;
    text-align: center;
  }
  
  .product-row .product-info {
    margin-bottom: 1rem;
    text-align: center;
  }
  
  .product-row .product-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  /* Layout mobile en flex */
  .product-row .mobile-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
  }
  
  .product-row .detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
  }
  
  .product-row .detail-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
  }
  
  .product-row .detail-value {
    font-weight: 600;
    font-size: 1rem;
  }
  
  .product-row .quantity.detail-value {
    color: var(--se-violet);
    font-size: 1.2rem;
  }
  
  .product-row .total-price.detail-value {
    color: var(--se-orange);
    font-size: 1.3rem;
  }
}

/* =============================================================================
   RESPONSIVE TABLETTE (768px - 992px)
============================================================================= */

@media (min-width: 768px) and (max-width: 991.98px) {
  
  .grid-header,
  .product-row {
    grid-template-columns: 2fr 80px 120px 120px;
    gap: 0.75rem;
  }
  
  .grid-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .product-row {
    padding: 0.75rem;
  }
  
  .product-row .product-name {
    font-size: 0.95rem;
  }
  
  .product-row .unit-price,
  .product-row .total-price {
    font-size: 0.95rem;
  }
}

/* =============================================================================
   SECTION VALIDATION
============================================================================= */

.validation-section .summary-info {
  color: white;
}

#btn-commander {
  background: var(--se-orange);
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#btn-commander:hover {
  background: var(--se-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#btn-commander img {
  width: 20px;
  margin-right: 8px;
}

/* Mobile pour la section validation */
@media (max-width: 767.98px) {
  .validation-section {
    padding: 1.5rem;
    text-align: center;
  }
  
  .validation-section .row > div {
    margin-bottom: 1rem;
  }
  
  #btn-commander {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
  }
}

/* =============================================================================
   ÉTATS VIDES
============================================================================= */

.products-list:empty::after {
  content: "Aucun produit sélectionné";
  display: block;
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 6px;
}

/* Loader générique pour toutes les étapes du configurateur */
.step-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  min-height: 400px;
  width: 100%;
}

.step-loader-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  text-align: center;
  max-width: 300px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.step-loader-container .spinner-border {
  border-width: 3px;
  width: 48px;
  height: 48px;
  color: var(--se-violet);
}

.step-loader-container h5 {
  font-weight: 600;
  color: var(--se-violet);
  margin: 1rem 0 0.5rem 0;
  font-size: 1.1rem;
}

.step-loader-container .loader-message {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0;
}

/* Animation d'apparition */
.step-loader-container {
  animation: fadeInLoader 0.4s ease-out;
}

@keyframes fadeInLoader {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animation de disparition */
.step-loader-overlay.fade-out {
  animation: fadeOutLoader 0.3s ease-in forwards;
}

@keyframes fadeOutLoader {
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Style pour le conteneur des étapes */
.config-step {
  position: relative;
  min-height: 500px;
}