/* ===============================
   GLOBAL
================================ */
.quickhead {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px; 
color:#000 !important;
background:#fff !important;
}

.text-muted-foreground {
  color: #6b7280;
  font-size: 14px;
}

/* ===============================
   TOP ACTION BAR
================================ */





.filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;

}

.filter-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Category select */
#select_fmm_cat {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  background: #fff;
}

/* Quick filters buttons */
.quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-item {
  position: relative;
}

.filter-checkbox {
  display: none;
}

.filter-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
margin: 0;
}

.filter-item.is-active .filter-label {
  background: #f47b20;
  color: #fff;
  border-color: #f47b20;
}

.filter-item.is-active svg {
  stroke: #fff;
}

/* ===============================
   RESULTS BAR
================================ */
.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  background: #f9fafb;          /* gris très clair */
  border-radius: 8px;
  padding: 16px;
margin-bottom: 10px;
  flex-wrap: wrap;
}

.results-count {
  font-size: 14px;
  color: #6b7280;
}
.results-count strong {
  color: #111827;
  font-weight: 600;
}
.btn-add-selected {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  background-color: #d8a62e45;
  transition: background-color 0.25s ease;          /* rouge comme image */
  color: #fff;

  border: none;
  border-radius: 6px;
  padding: 10px 16px;

  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
body:has(.fmm_check:checked) .btn-add-selected {
  background-color: #d8a62e;
}



.btn-add-selected:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===============================
   TABLE
================================ */
#fmm_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

/* Header */
#fmm_table thead th {
  background: #000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px;
  text-align: left;
}

/* Body rows */
#fmm_table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

#fmm_table tbody td {
  padding: 14px 12px;
  vertical-align: middle;
  font-size: 14px;
}

/* ===============================
   DESIGNATION
================================ */
.designation-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.designation-title {
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}

.designation-title:hover {
  text-decoration: underline;
}

.designation-category {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* Favorite star */
.favorite-toggle {
  cursor: pointer;
}

.favorite-toggle svg {
  stroke: #facc15;
  fill: none;
}

.favorite-toggle.active svg {
  fill: #facc15;
}

/* ===============================
   STOCK
================================ */
.stock {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.in-stock {
  color: #16a34a;
   font-size:23px;
}

.low-stock {
  color: #f97316;
font-size:23px;
}

.out-stock {
  color: #dc2626;
font-size:23px;
}

/* ===============================
   PRICE
================================ */
#fmm_table td[data-label="Prix"] {
  font-weight: 700;
  color: #f47b20;
  font-size: 16px;
}

/* ===============================
   QUANTITY
================================ */
.number {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
}

.number span {
  width: 32px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  background: #f3f4f6;
}

.number input {
  width: 40px;
  border: none;
  text-align: center;
}

/* ===============================
   ADD BUTTON
================================ */
.fmm-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  background:#f47b20;
  color: #fff;
  font-weight: 600;
  border: none;
}

.fmm-add-btn:hover {
  background: #b91c1c;
}

/* ===============================
   RESPONSIVE TABLE (MOBILE)
================================ */
@media (max-width: 768px) {
  #fmm_table thead {
    display: none;
  }

  #fmm_table tbody tr {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 12px;
  }

  #fmm_table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
  }

  #fmm_table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
  }
  .actions-wrapper {
    flex: 1 1 auto;   
    width: 100%;
  }
}

/* ===============================
   MOBILE ACTION BAR
================================ */
@media (max-width: 640px) {
  .quick-actions-bar,
  .results-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-add-selected {
    width: 100%;
    justify-content: center;
  }
 .filter-label {
    white-space: normal;     }
 .actions-wrapper {
    align-items: flex-start;
  }
.filters {
    flex: 0 0 auto;          
  }

  #select_fmm_cat {
    width: 100%;
    max-width: 100%;
  }
  .quick-filters {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-item {
    flex: 1 1 auto;
  }
}
#fmm_table_filter input[type="search"] {
  width: 100%;
  height: 42px;
  line-height: 42px;
  padding: 10px 16px 10px 44px; /* ✅ NORMAL right padding */
  border: 1px solid #dcdcdc;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.868-3.834zM12 6.5a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
  font-size: 14px;
  color: #333;
  box-shadow: none;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.filter-icon {
  width: 16px !important;
  height: 16px !important; 
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
.filter-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hide ALL DataTable search blocks by default */
#fmm_table_wrapper .dataTables_filter {
    display: none !important;
}

/* Show ONLY the one inside your custom container */
#datatable-search-holder #fmm_table_filter {
    display: block !important;
    position: relative !important;
}
/* ==============================
   FLOATING CART BUTTON
============================== */

.floating-cart {
    position: fixed;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;

    width: 56px;
    height: 56px;
    background: #f47b20;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);

    transition: transform .2s ease, box-shadow .2s ease;
}

/* Hover effect */
.floating-cart:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 14px 30px rgba(0,0,0,.35);
}

/* Icon color */
.floating-cart svg {
    stroke: #fff;
}

/* ==============================
   MOBILE ADAPTATION
============================== */

@media (max-width: 768px) {
    .floating-cart {
        top: auto;

    
        transform: none;
       
    }

    .floating-cart:hover {
        transform: scale(1.05);
    }

}
#fmm_table_filter input::placeholder {
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    font-size: 14px;
}
.quick-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  flex-wrap: wrap;
}

/* ==========================
   DATATABLE SEARCH
   ========================== */
#datatable-search-holder {
  flex: 1 1 auto;        /* 🔑 shrink first */
  min-width: 150px;  /* 🔑 before wrap */
}

/* DataTables default structure */
#datatable-search-holder .dataTables_filter {
  width: 100%;
  margin: 0;
}

#datatable-search-holder label {
  width: 100%;
  display: block;
}

#datatable-search-holder input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid #dcdcdc;
  font-size: 14px;
}

/* ==========================
   ACTIONS
   ========================== */
.actions-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

/* ==========================
   FILTER SELECT
   ========================== */
.filters {
  display: inline-flex;      /* 🔥 inline = pas de retour ligne interne */
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;         /* 🔥 interdit le wrap */
  white-space: nowrap;       /* 🔥 texte jamais coupé */
}

.filters select {
  height: 34px;
  border-radius: 6px;
  border: 1px solid #dcdcdc;
  padding: 0 8px;
}

.filter-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ==========================
   BUTTONS
   ========================== */
.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
  background: #fff;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.action-btn:hover {
  background: #f5f5f5;
}
/* hide native checkbox */
.filter-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* clickable button */
.filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #dcdcdc;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* icon size */
.filter-icon svg {
  width: 16px;
  height: 16px;
}

/* hover = button hover */
.filter-label:hover {
  background: #f5f5f5;
}

/* checked state */
.fmm_check:checked + .filter-label {
  background: #fb0001;
  border-color: #fb0001;
color:#fff;
}

/* optional: checked icon color */
.fmm_check:checked + .filter-label svg {
  stroke: #fff;
}
.container .tiret{
   border-bottom: 1px solid #e5e5e5;
}
/* Bouton "Voir prix pro" */
.voir-prix-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    height: 36px;
    padding: 0 12px;

    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;

    border: 1px solid #e5e7eb;
    border-radius: 6px;

    background-color: #ffffff;
    color: #111827;

    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* Hover */
.voir-prix-btn:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* Focus (accessibilité) */
.voir-prix-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Icône cadenas */
.voir-prix-btn .lock-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    pointer-events: none;
}


#fmm_table th:first-child,
#fmm_table td:first-child {
    width: 30px !important;     /* smaller width */
    min-width: 30px !important;  /* prevents shrinking too much */
    max-width: 30px !important;  /* fixes the width */
    text-align: center !important; /* center the checkbox */
    padding: 6px !important;     /* adjust padding */
}

th .fmm_check{
border: 1px solid #fff;
background: #000;
}
.fmm_check {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    width: 16px;
    height: 16px;
    border: 1px solid #D8A62E;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

/* État checked */
.fmm_check:checked {
    background-color: #f47b20;
}
.fmm_check:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 0px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
#chkal, #chkal2 {
    margin-left: 0px !important; 
}

#fmm_table.is-loading {
    opacity: 0.4;
    pointer-events: none;
}
