/*style.css*/
/* VARIABLES GLOBALES */
:root {
    /* Couleurs principales */
    --primary-color: #1B365D;
    --primary-light: #234578;
    --primary-dark: #122340;
    --accent-color: #28a745;
    --accent-hover: #218838;
    --text-light: #ffffff;
    --text-dark: #212529;
    --glass-bg: rgba(27, 54, 93, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Spacing */
    --container-padding: 24px;
    --section-spacing: 1.5rem;
    
    /* Layout */
    --container-max-width: 1240px;
  }
  
  /* RESET COMPLET */
  html, body {
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100%;
      background-color: var(--primary-color);
      color: var(--text-light);
  }
  
  body {
      max-width: none;
      overflow-x: hidden;
  }
  
  /* LAYOUT & CONTAINERS */
  .content-wrapper {
      max-width: var(--container-max-width);
      margin: 0 auto;
      padding: 0 15px;
  }
  
  .site-container {
      max-width: var(--container-max-width);
      margin: 0 auto;
      padding-left: var(--container-padding);
      padding-right: var(--container-padding);
  }
  
  .container, .container-fluid {
      padding-left: 15px;
      padding-right: 15px;
  }
  
  /* Ajustement pour le contenu principal */
  main {
      width: 100%;
      
  }
  
  /* Ajuste la position des messages */
  .messages {
      margin-top: 30px;
  }
  
  /* NAVIGATION */
  .top-nav, .bottom-nav {
      background-color: var(--primary-color);
      color: var(--text-light);
  }
  
  .top-nav {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      width: 100% !important;
      z-index: 1030 !important;
  }
  
  .navbar .container-fluid {
      padding: 8px 24px;
  }
  
  .nav-link {
      color: var(--text-light);
  }
  
  .navbar-toggler {
      border-color: var(--text-light);
  }
  
  .btn-outline-light:hover {
      color: var(--primary-color);
  }
  
  /* Navigation bottom */
  .bottom-nav .navbar-nav {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      flex-direction: row;
  }
  
  .navbar-nav > .nav-item {
      flex: 0 1 auto;
  }
  
  /* DROPDOWN MENUS */
  .dropdown-menu {
      background-color: var(--primary-color) !important;
      z-index: 1000;
      margin: 0;
      padding: 0;
      border: 1px solid var(--primary-light);
      border-radius: 0;
      width: auto;
      min-width: 200px;
  }
  
  .dropdown-menu.show {
      display: block !important;
  }
  
  .dropdown-menu .dropdown-item {
      color: var(--text-light) !important;
      padding: 8px 16px;
      background-color: var(--primary-color);
  }
  
  .dropdown-menu .dropdown-item:hover {
      background-color: var(--primary-light) !important;
      color: var(--text-light) !important;
  }
  
  .dropdown-submenu .dropdown-menu {
      background-color: var(--primary-light) !important;
  }
  
  .dropdown-submenu .dropdown-menu .dropdown-menu {
      background-color: #2d5693 !important;
  }
  
  .dropdown-divider {
      border-top: 1px solid var(--primary-light);
      margin: 4px 0;
  }
  
  /* EFFETS VISUELS COMMUNS */
  .glass-effect {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid var(--glass-border);
      border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
      transition: all 0.3s ease;
  }
  
  .glass-effect:hover {
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  }
  
  /* ANIMATIONS */
  @keyframes iconBounce {
      0% { transform: translateY(-20px); opacity: 0; }
      50% { transform: translateY(10px); }
      100% { transform: translateY(0); opacity: 1; }
  }
  
  @keyframes slideDown {
      from { transform: translateY(-100%); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
  }
  
  @keyframes float {
      0% { transform: translateY(0px); }
      50% { transform: translateY(-10px); }
      100% { transform: translateY(0px); }
  }
  
  @keyframes wave-animation {
      0% { background-position-x: 0; }
      100% { background-position-x: 1440px; }
  }
  
  .animate-bounce { 
      animation: iconBounce 1s ease-in-out; 
  }
  
  .animate-slide-down { 
      animation: slideDown 0.5s ease-out; 
  }
  
  .animate-float {
      animation: float 4s ease-in-out infinite;
  }
  
  /* CARDS */
  .card {
      background-color: #ffffff;
      transition: all 0.3s ease;
  }
  
  .card-body, .card-text, .card-title, .card-text strong, .card-text small, .card a {
      color: #000;
  }
  
  .card:hover {
      transform: translateY(-5px);
      transition: transform 0.3s ease;
  }
  
  /* FOOTER */
  footer {
      background-color: #212529;
      padding: 50px 0 20px;
      margin-top: 50px;
  }
  
  footer .container {
      max-width: var(--container-max-width);
      margin: 0 auto;
  }
  
  footer h5 {
      font-weight: 600;
  }
  
  footer .social-links a:hover,
  footer ul li a:hover {
      opacity: 0.8;
      text-decoration: underline !important;
  }
  
  footer .row {
      margin-left: 0;
      margin-right: 0;
  }
  
  /* FORMS */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  input[type="password"],
  input[type="search"],
  select,
  textarea,
  .form-control {
      display: block;
      width: 100%;
      padding: 0.375rem 0.75rem;
      font-size: 1rem;
      font-weight: 400;
      line-height: 1.5;
      color: #212529;
      background-color: #f8f9fa;
      background-clip: padding-box;
      border: 1px solid #ced4da !important;
      border-radius: 0.25rem;
      transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  }
  
  input:focus,
  select:focus,
  textarea:focus,
  .form-control:focus {
      color: #212529;
      background-color: #fff;
      border-color: #86b7fe !important;
      outline: 0;
      box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
  }
  
  /* OFFCANVAS */
  .offcanvas {
      z-index: 1050 !important;
      height: 100% !important;
      max-height: 100% !important;
      overflow: hidden !important;
  }
  
  .offcanvas-body {
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
      height: calc(100% - 60px) !important;
      max-height: calc(100% - 60px) !important;
      padding-bottom: 100px !important;
  }
  
  .offcanvas-backdrop {
      z-index: 1045 !important;
  }
  
  .offcanvas *, .offcanvas-body * {
      pointer-events: auto !important;
  }
  
  .side-category-item, .side-level-1, .side-level-2, .side-level-3,
  .offcanvas-body a, .offcanvas-header button {
      position: relative;
      z-index: 1051 !important;
      pointer-events: auto !important;
  }
  
  /* BADGES DE STATUT */
 
  
  
  /* FILTRES BOOTSTRAP */
  .filter-btn {
      position: relative;
      display: inline-flex;
      align-items: center;
      padding: 8px 16px;
      border-radius: 5px;
      border-width: 2px;
      border-style: solid;
      text-decoration: none;
      transition: all 0.2s;
      font-size: 0.9rem;
      font-weight: 500;
  }
  
  .filter-btn .badge {
      position: absolute;
      top: -10px;
      right: -10px;
      border-radius: 50%;
      font-size: 0.75rem;
      font-weight: 700;
      box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  }
  
  /* MEDIA QUERIES */
  @media (max-width: 576px) {
      .section-title {
          font-size: 1.3rem;
      }
      
      .category-image-container {
          height: 120px;
      }
      
      .search-banner, .cta-banner {
          padding: 1.5rem;
      }
      
      .status-badge {
          width: 100%;
          margin-bottom: 8px;
          padding: 8px 12px;
      }
  }
  
  @media (max-width: 768px) {
      .content-wrapper {
          padding: 1rem 0;
      }
      
      .clock {
          font-size: 1rem;
      }
      
      .product-list-item a {
          flex-direction: column;
          align-items: flex-start;
      }
      
      .product-price, .product-family {
          margin: 0.5rem 0 0 0;
      }
      
      footer .container {
          padding-left: 15px;
          padding-right: 15px;
      }
      
      .map-container {
          height: 300px;
      }
  }
  
  @media (max-width: 992px) {
      .section-title {
          font-size: 1.5rem;
      }
      
      .cta-banner .btn {
          margin-top: 1rem;
      }
      
      .bottom-nav .navbar-nav {
          flex-direction: column;
      }
      
      .dropdown-submenu {
          position: static !important;
      }
      
      .dropdown-submenu .dropdown-menu {
          position: static !important;
          display: none;
          border: none;
          background: transparent;
          box-shadow: none;
      }
      
      .dropdown-submenu.show .dropdown-menu {
          display: block;
      }
      
      .dropdown-menu {
          position: static !important;
          float: none;
          width: auto;
          margin-left: 1rem;
      }
      
      .dropdown-submenu .submenu {
          position: static;
          visibility: visible;
          margin-left: 1rem;
      }
  
      .dropdown-submenu > .dropdown-menu {
          left: 0;
      }
  
      .submenu-arrow {
          transform: rotate(90deg);
      }
      
      .navbar-collapse {
          max-height: 80vh;
          overflow-y: auto;
      }
      
      .row.g-4 > .col-lg-3 {
          margin-top: 1.5rem;
      }
  }
  
  @media (min-width: 992px) {
      .dropdown-submenu {
          position: relative;
      }
      
      .dropdown-submenu > .dropdown-menu {
          top: 0;
          left: 100%;
          margin-top: -0.5rem;
      }
      
      .dropdown-menu-end {
          right: 0;
          left: auto;
      }
      
      /* Alignement des sliders sur la page d'accueil */
      .row.g-4 {
          display: flex;
          align-items: stretch;
      }
      
      .slider-container {
          height: 100%;
      }
      
      .col-lg-3 .glass-effect {
          height: 100%;
          display: flex;
          flex-direction: column;
      }
      
      #main-slider-container, 
      #announcements-container {
          flex: 1;
          display: flex;
          flex-direction: column;
      }
      
      .section-container.my-5:first-of-type {
          margin-top: 0 !important;
      }
  }
  
  @media (min-width: 992px) and (max-width: 1400px) {
      .bottom-nav {
          padding: 10px 0;
      }
      
      .bottom-nav .container-fluid {
          justify-content: flex-start;
      }
  }
  
  @media (max-height: 600px) {
      .offcanvas-body {
          padding-bottom: 120px !important;
      }
      
      .account-profile-header {
          padding: 10px !important;
      }
      
      .account-link {
          padding: 10px 20px !important;
      }
  }

  /* BOUTONS ET GROUPES D'ENTRÉE */
/* Styles nécessaires pour les boutons et input-group manquants dans Bootstrap */
/*
.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
*/

/* INPUT GROUP */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group > .btn {
    position: relative;
    z-index: 2;
}

.input-group > :not(:first-child) {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > :not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}


/* SOLUTION GLOBALE - Correction pour les éléments mal positionnés */

/* Ajoutez ce code à la fin de votre fichier style.css */

/* === FIX GLOBAL POUR LES ÉLÉMENTS MAL POSITIONNÉS === */



/* 3. Exception pour les éléments qui DOIVENT être en position absolue */
.position-absolute.bottom-0.end-0.bg-success,
.dropdown-menu.position-absolute,
.position-absolute.d-none {
  position: absolute !important;
}

/* 4. Correction pour les conteneurs flex */
.d-flex,
.d-inline-flex,
.d-md-flex,
.d-lg-flex,
[class*="align-items"],
[class*="justify-content"] {
  display: flex !important;
  position: relative !important;
}

/* 5. Correction pour les icônes et textes dans les cadres */
.glass-effect i,
.glass-effect span,
.glass-effect a,
.glass-effect h2,
.glass-effect h3,
.glass-effect h4,
.glass-effect h5,
.glass-effect h6,
.glass-effect p,
.card-body > * {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
}

/* 6. Correction pour les items de navigation */
.navbar-nav > .nav-item,
.nav-link,
.navbar-brand {
  position: relative !important;
  float: none !important;
}

/* 7. Correction pour les temps/dates/timestamps */
[data-message-id] time,
[data-message-id] small,
[data-status] small,
span[class*=":"],
small[class*=":"],
time {
  position: static !important;
  display: inline !important;
  float: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
}

/* 8. Correction spéciale pour les numéros de commande et références */
[class*="ref"],
[class*="Réf"],
[id*="ref"],
[href*="ref"] {
  position: static !important;
  float: none !important;
}

/* 9. Correction pour les éléments d'information utilisateur */
.user-info,
.profile-info,
[class*="acheteur"],
[class*="vendeur"],
[class*="Nom"] {
  position: relative !important;
  display: block !important;
}

/* 10. Réinitialisation générale de position pour les éléments causant des problèmes */
[style*="position: absolute"]:not(.position-absolute):not(.dropdown-menu):not([class*="status"]) {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
}




/* Badges dans les entêtes et les cartes */
.glass-effect .badge,
.card-header .badge,
.card-body .badge,
.d-flex .badge,
h1 .badge, h2 .badge, h3 .badge, h4 .badge, h5 .badge, h6 .badge {
  position: relative !important;
  display: inline-flex !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
}

/* Badges arrondis (pills) */
.badge.rounded-pill,
.rounded-pill.bg-success,
.rounded-pill.bg-warning,
.rounded-pill.bg-danger,
.rounded-pill.bg-secondary,
.rounded-pill.bg-primary,
.rounded-pill.bg-info,
.rounded-pill.bg-light,
.rounded-pill.bg-dark {
  border-radius: 50rem !important;
  padding-right: 0.6em !important;
  padding-left: 0.6em !important;
}

/* Badges dans un conteneur flex */
.d-flex .badge,
.d-inline-flex .badge {
  position: relative !important;
  transform: none !important;
}

/* Force l'affichage correct du conteneur de badges */
div:has(> .badge) {
  position: relative !important;
  display: block !important;
}

/* Badge avec icône */
.badge i,
.badge .fas,
.badge .far,
.badge .fab,
.badge .bi {
  position: relative !important;
  display: inline-block !important;
  margin-right: 0.25rem !important;
}

/* Styles spécifiques pour les badges dans les pages de commande */
[href*="ref"] + .badge,
[class*="ref"] + .badge,
[class*="Réf"] + .badge {
  position: relative !important;
  display: inline-flex !important;
  margin-left: 0.5rem !important;
}


/* CORRECTION POUR LES ICÔNES DE LA NAVBAR - Ajoutez à la fin de style.css */

/* Rétablir le centrage correct des icônes dans les cercles */
.nav-icon {
    position: relative !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 5px !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    transition: background-color 0.2s !important;
}

/* Positionnement correct des badges sur les icônes - SAUF WALLET */
.nav-icon .badge:not(.wallet-badge-main):not(.wallet-badge-pending) {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  transform: translate(25%, -25%) !important;
  margin: 0 !important;
  width: 18px !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}


/* S'assurer que les icônes sont centrées dans leur conteneur */
.nav-icon i,
.nav-icon .fas,
.nav-icon .far,
.nav-icon .fab,
.nav-icon .bi {
  position: static !important;
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}
  
 
/* STYLES AGRESSIFS POUR LES BOUTONS WISHLIST */
/* Force les boutons à avoir la bonne couleur selon leur état */
.btn-danger.wishlist-toggle-btn {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.btn-danger.wishlist-toggle-btn .fa-heart {
    color: white !important;
}

.btn-light.wishlist-toggle-btn {
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
}

.btn-light.wishlist-toggle-btn .fa-heart {
    color: #0d6efd !important;
}

/* Styles pour le survol */
.btn-danger.wishlist-toggle-btn:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

.btn-light.wishlist-toggle-btn:hover {
    background-color: #e2e6ea !important;
    border-color: #dae0e5 !important;
}


/* Définition du style pour btn-success */
.btn-success {
    color: #fff;
    background-color: var(--accent-color); /* Utilise la variable définie à #28a745 */
    border-color: var(--accent-color);
}

.btn-success:hover {
    color: #fff;
    background-color: var(--accent-hover); /* Utilise la variable définie à #218838 */
    border-color: var(--accent-hover);
}


/* Correction du dropdown pour les options de tri */
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    background-color: var(--primary-light) !important;
    color: var(--text-light) !important;
    font-weight: 600;
    border-left: 3px solid var(--accent-color);
}

/* Assure la visibilité du texte dans le bouton de tri */
#sortDropdown {
    color: var(--text-light);
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

#sortDropdown:hover {
    background-color: var(--primary-lighter);
    border-color: var(--primary-lighter);
}

/* Menu de tri déroulant */
#sortDropdown + .dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
}

/* Stylisation du menu de tri */
.dropdown-menu .dropdown-item {
    transition: background-color 0.2s, border-left 0.2s;
    border-left: 3px solid transparent;
}

.dropdown-menu .dropdown-item:hover {
    border-left: 3px solid var(--accent-color);
}


/* Styles améliorés pour le fil d'Ariane */
.breadcrumb {
    background-color: var(--primary-light);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

/* Effet de vague subtil */
.breadcrumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    opacity: 0.4;
    z-index: -1;
}

/* Items du fil d'Ariane */
.breadcrumb-item {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
}

/* Liens dans le fil d'Ariane */
.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-1px);
}

/* Item actif */
.breadcrumb-item.active {
    color: var(--accent-color);
    font-weight: 600;
    padding: 2px 8px;
}

/* Séparateur personnalisé */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2em;
    line-height: 1;
    color: rgba(255, 255, 255, 0.5);
    padding-right: 0.5rem;
    font-weight: 300;
}

/* Premier élément avec icône maison */
.breadcrumb-item:first-child a {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item:first-child a::before {
    content: "\f015";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 5px;
    font-size: 0.9em;
}

/* Adaptation mobile */
@media (max-width: 576px) {
    .breadcrumb {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        padding-right: 0.3rem;
    }
}

/* 2. Augmenter la priorité du menu dropdown pour qu'il apparaisse au-dessus des autres éléments */
.dropdown-menu.show {
    position: absolute !important;
    z-index: 1050 !important; /* Plus élevé que les autres éléments de la page */
  }
  
  #sortDropdown,
  .dropdown-toggle,
  .dropdown-menu {
    position: relative !important;
    z-index: 999 !important;
  }


/* Styles pour les champs hérités */
.form-control.border-info {
    border-color: #0dcaf0;
}
.form-control.border-info:focus {
    border-color: #0dcaf0;
    box-shadow: 0 0 0 0.25rem rgba(13, 202, 240, 0.25);
}
.badge.bg-info {
    background-color: #0dcaf0;
    color: #fff;
    font-size: 0.75em;
    vertical-align: middle;
}

/* Animation pour les éléments qui apparaissent */
/* Animation pour les champs dynamiques */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
}

/* Styles pour les champs hérités */
.form-control.border-info {
    border-color: #0dcaf0;
}
.badge.bg-info {
    background-color: #0dcaf0;
}


/* Marges responsives */
.margin-responsive {
    margin-top: 5rem;
    /*padding-top: 3rem; /* Ajoutez ce padding pour créer de l'espace supplémentaire */
}


/* Alternative avec positionnement relatif et transformation */
table.table td:nth-child(7) {
    position: relative !important;
    text-align: center !important;
    vertical-align: middle !important;
  }
  




/* Ajoutez ce CSS à votre fichier de style principal */



/* Améliorations pour les boutons d'action */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.2rem;
    border-bottom-left-radius: 0.2rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.2rem;
    border-bottom-right-radius: 0.2rem;
}

/* Animation au survol du bouton supprimer */
.btn-outline-danger:hover {
    box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.25);
    transition: all 0.2s ease-in-out;
}




/* Couleurs spécifiques pour les badges de statut */
.badge.bg-danger, span.Ouvert {
    background-color: #dc3545 !important;
    color: white !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
    font-weight: 700;
}

.badge.bg-success, span.Résolu {
    background-color: #198754 !important;
    color: white !important;
}

.badge.bg-secondary, span[class*="Clôturé"] {
    background-color: #6c757d !important;
    color: white !important;
}


.badge-success {
    background-color: #28a745 !important;
    color: white !important;
}



/* === STYLES SPÉCIFIQUES POUR LES BADGES WALLET === */
/* Ces styles doivent avoir la priorité sur les styles généraux */

/* Badge principal wallet (solde disponible) */
.wallet-badge-main {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    background-color: #28a745 !important; /* Vert - écrase le rouge général */
    color: white !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 0.7rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translate(25%, -25%) !important;
    z-index: 1001 !important;
    min-width: auto !important;
    padding: 0 !important;
    line-height: normal !important;
    font-weight: 600 !important;
}

/* Badge secondaire wallet (montant en attente) */
.wallet-badge-pending {
    position: absolute !important;
    top: 12px !important; /* Position différente */
    right: -10px !important; /* Position différente */
    background-color: #ff9800 !important; /* Orange - écrase le rouge général */
    color: white !important;
    border-radius: 50% !important;
    width: 16px !important;
    height: 16px !important;
    font-size: 0.65rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important; /* Pas de transform pour éviter la superposition */
    z-index: 1002 !important; /* Au-dessus du badge principal */
    min-width: auto !important;
    padding: 0 !important;
    line-height: normal !important;
    font-weight: 600 !important;
    border: 2px solid white !important; /* Bordure pour contraste */
}

/* S'assurer que les badges wallet ont la priorité absolue */
.wallet-icon .wallet-badge-main,
.wallet-icon .wallet-badge-pending {
    background-color: inherit !important; /* Hérite des couleurs définies ci-dessus */
}

/* === PRIORITÉ ABSOLUE POUR LES BADGES WALLET === */
.wallet-icon .wallet-badge-main {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    transform: translate(25%, -25%) !important;
    background-color: #28a745 !important; /* Vert */
    color: white !important;
    z-index: 1001 !important;
}

.wallet-icon .wallet-badge-pending {
    position: absolute !important;
    top: 12px !important;
    right: -10px !important;
    transform: none !important; /* Pas de transform pour éviter la superposition */
    background-color: #ff9800 !important; /* Orange */
    color: white !important;
    z-index: 1002 !important;
    border: 2px solid white !important;
}





/*26/09/2026 pb badges*/
/* === OVERRIDE DES INTERFÉRENCES DE STYLE.CSS === */

/* Annuler les règles globales pour les badges de la navbar */
.nav-icon .badge {
    /* Reset des valeurs forcées par style.css */
    min-width: unset !important;
    padding: unset !important;
}

/* === BADGES WALLET - VERSION CORRECTE === */
/* Desktop */
/* Mobile */
/* Mobile - Version avec badges plus grands */
/* Mobile - Badges wallet élargis */
@media (max-width: 576px) {
    .mobile-line-2 .wallet-icon .wallet-badge-main {
        position: absolute !important;
        top: -8px !important;
        right: -12px !important;
        transform: none !important;
        background-color: #28a745 !important;
        color: white !important;
        border-radius: 12px !important;
        min-width: 30px !important;        /* Élargi de 22px à 35px */
        height: 18px !important;
        padding: 2px 8px !important;       /* Padding horizontal augmenté */
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        z-index: 1001 !important;
        white-space: nowrap !important;    /* Empêche le retour à la ligne */
    }

    .mobile-line-2 .wallet-icon .wallet-badge-pending {
        position: absolute !important;
        top: 18px !important;
        left: -12px !important;            /* Ajusté pour la nouvelle largeur */
        transform: none !important;
        background-color: #ff9800 !important;
        color: white !important;
        border-radius: 12px !important;
        min-width: 30px !important;        /* Élargi de 20px à 30px */
        height: 18px !important;
        padding: 2px 8px !important;       /* Padding horizontal augmenté */
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        z-index: 1002 !important;
        border: 1px solid var(--primary-color) !important;
        white-space: nowrap !important;    /* Empêche le retour à la ligne */
    }
}



/* Correction pour le contenu sous la navbar fixe en mobile */
@media (max-width: 576px) {
    .container-fluid {
        padding-top: 90px !important;
    }
    
    /* Ajustement spécifique pour les cartes principales */
    .card.shadow-lg:first-child {
        margin-top: 0 !important; /* Évite le double espacement */
    }
}

/* Pour desktop */
@media (min-width: 577px) {
    .container-fluid {
        padding-top: 70px !important;
    }
}


/* Correction spécifique pour les pages utilisant .container */
@media (max-width: 576px) {
    .container {
        margin-top: 90px !important;
    }
}

@media (min-width: 577px) {
    .container {
        margin-top: 70px !important;
    }
}


/* === POSITIONNEMENT DES NOTIFICATIONS === */
/* Décalage sous la navbar fixe */
#toast-container,
.toast-container {
    top: 80px !important; /* Sous la navbar */
}

.payment-notification {
    top: 80px !important; /* Pour les notifications du workflow de paiement */
}

/* Ajustement mobile pour la navbar à 2 lignes */
@media (max-width: 576px) {
    #toast-container,
    .toast-container {
        top: 110px !important; /* Plus bas en mobile (navbar + 2 lignes) */
    }
    
    .payment-notification {
        top: 110px !important;
    }
}



/* === CORRECTION DE L'ESPACEMENT SOUS LA NAVBAR === */

/* Reset */
body {
    padding-top: 0 !important;
}

/* Espacement pour le contenu dans <main> */
main {
    width: 100%;
    padding-top: 10px;
}

/* Espacement pour pages sans <main> (inbox, wishlist, etc.) */
body > .container:first-of-type,
body > .container-fluid:first-of-type {
    margin-top: 75px;
}

/* Mobile */
@media (max-width: 576px) {
    main {
        padding-top: 20px;
    }
    
    body > .container:first-of-type,
    body > .container-fluid:first-of-type {
        margin-top: 10px;
    }
}

/* Si bandeau DEV présent */
body:has(#dev-warning-placeholder > .alert) main {
    padding-top: calc(60px + 45px);
}

body:has(#dev-warning-placeholder > .alert) > .container:first-of-type,
body:has(#dev-warning-placeholder > .alert) > .container-fluid:first-of-type {
    margin-top: calc(75px + 45px);
}

@media (max-width: 576px) {
    body:has(#dev-warning-placeholder > .alert) main {
        padding-top: calc(120px + 45px);
    }
    
    body:has(#dev-warning-placeholder > .alert) > .container:first-of-type,
    body:has(#dev-warning-placeholder > .alert) > .container-fluid:first-of-type {
        margin-top: calc(135px + 45px);
    }
}

/* Reset styles contradictoires */
.hero-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Exception pour product_search qui a son propre style */
.search-results-header {
    margin-top: 75px !important;
}

@media (max-width: 576px) {
    .search-results-header {
        margin-top: 135px !important;
    }
}



/*Corriger le blanc qui est dans les card-header*/
.card-header.bg-light {
    color: black !important;
}

/* ================================================
   STATUS BADGES — commandes
   Utilisé via templates/orders/_status_badge.html
   25/03/2026
   ================================================ */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.7rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Cycle de vie normal */
.status-pending       { background: #ffc107; color: #212529; border: 1px solid #e0a800; }
.status-paid          { background: #28a745; color: white;   border: 1px solid #1e7e34; }
.status-shipping      { background: #17a2b8; color: white;   border: 1px solid #138496; }
.status-delivered     { background: #28a745; color: white;   border: 1px solid #1e7e34; }
.status-completed     { background: #155724; color: white;   border: 1px solid #0d3b17; }

/* Fin de vie */
.status-cancelled     { background: #495057; color: white;   border: 1px solid #343a40; }
.status-expired       { background: #dc3545; color: white;   border: 1px solid #bd2130; }
.status-abandoned     { background: #6c757d; color: white;   border: 1px solid #545b62; }

/* Sécurité (admin uniquement) */
.status-security      { background: #6f42c1; color: white;   border: 1px solid #5a32a3; }

/* Fallback */
.status-unknown       { background: #e9ecef; color: #495057; border: 1px solid #ced4da; }

/* ================================================
   FILTRES LITIGES — dual-count-badge
   Utilisé dans mes_commandes, mes_ventes
   ================================================ */

.dual-count-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.dual-count-badge.bg-dark {
    background-color: rgba(0, 0, 0, 0.7) !important;
    color: white;
}

.dual-count-badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529;
}

.dual-count-badge.bg-success {
    background-color: #28a745 !important;
    color: white;
}

.count-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.filter-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.filter-btn .btn-label {
    display: flex;
    align-items: center;
    gap: 4px;
}

/*badge négocié dans le panier*/
.badge-negotiated {
    font-size: 0.85rem !important;
    padding: 0.35em 0.65em !important;
}