
.productTable {
  margin: auto;
  width: 100%;
  border-collapse: collapse;
}

tbody tr:nth-child(2n){
  background-color: #f0f0f0;
}

.productTable th {
  position: sticky;
  top: 52px;
  background-color: rgb(215,215,215);
  transition: all 0.2s ease;
  text-decoration: none;  
  cursor: pointer;  
}

.productTable th:hover, #recapTable th:hover {
    text-decoration: underline;
    color: #800000;
}

.productTable tr {
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.productTable th {
  display: none;
  white-space: nowrap;
}

.productTable td {
  display: block;
}

.productTable td:first-child,
.productTable th:first-child{
  margin-top: .5em;
  text-align: left;
}

.productTable td:last-child {
  margin-bottom: .5em;
}

.productTable td:before {
  content: attr(data-th) ": ";
  font-weight: bold;
  width: 120px;
  display: inline-block;
  color: #000;
}

.productTable th,
.productTable td {
  text-align: center;
  margin: 0;
}

.productTable {
  color: #333;
  border-radius: .4em;
}

.productTable tr {
  border-color: #bfbfbf;
}

.productTable th,
.productTable td {
  padding: .5em 1em;
}
.productTable tr:hover:not(:first-child) {
    background-color: #d8e7f3;
}
.productTable td:before {
    display: none;
}
.productTable th,
.productTable td {
    display: table-cell;
    padding: .25em .5em;
}
.productTable th:first-child,
.productTable td:first-child {
    padding-left: 0;
}
.productTable th:last-child,
.productTable td:last-child {
    padding-right: 0;
}
.productTable th,
.productTable td {
    padding: 1em !important;
}

.productLeft{
text-align:left !important
}

/* THE END OF THE IMPORTANT STUFF */
@-webkit-keyframes leftRight {
  0%    { -webkit-transform: translateX(0)}
  25%   { -webkit-transform: translateX(-10px)}
  75%   { -webkit-transform: translateX(10px)}
  100%  { -webkit-transform: translateX(0)}
}
@keyframes leftRight {
  0%    { transform: translateX(0)}
  25%   { transform: translateX(-10px)}
  75%   { transform: translateX(10px)}
  100%  { transform: translateX(0)}
}

@media print {
    body {
      counter-reset: page;
      margin: 0;
      padding: 0;
    }
    #id-top,
    .side-nav
    {
        display: none;
    }
    .productTable {
        display: block;
    }
    .productTable th {
      top: 0 !important;
    }
    
    .footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        text-align: center;
        font-size: 12px;
    }

    /* Numérotation des pages */
    .footer::after {
        content: "Page " counter(page);
        counter-increment: page;
    }

    /* Initialisation du compteur de pages */
    body {
        counter-reset: page;
    }
            
} 
/* ------------------------------------------------------------------
 * Modale de modification des seuils de stock (Stock Forecast).
 * Cette modale ne manipule que des seuils, jamais des quantites.
 * ------------------------------------------------------------------ */

.sf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf-modal {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: min(1100px, 94vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.sf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: bold;
    font-size: 1.1em;
}

.sf-modal-close {
    text-decoration: none;
    font-size: 1.6em;
    line-height: 1;
    color: #666;
}

.sf-modal-close:hover {
    color: #000;
}

/* Rappel permanent : aucun stock n'est modifie */
.sf-modal-warning {
    background: #fff8e1;
    border-left: 4px solid #f0ad4e;
    padding: 8px 14px;
    font-size: 0.9em;
}

.sf-modal-body {
    padding: 14px 18px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.sf-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-top: 1px solid #e0e0e0;
}

.sf-modal-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.sf-modal-scroll {
    max-height: 46vh;
    overflow-y: auto;
}

.sf-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.sf-modal-table th,
.sf-modal-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.sf-modal-table th, .tagtable th{
    background: #f5f5f5;
    position: sticky;
    top: 0;
}

.sf-modal-table td.right,
.sf-modal-table th.right {
    text-align: right;
}

.sf-modal-empty {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Previsualisation */
.sf-preview-item {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.sf-preview-head {
    font-weight: bold;
    margin-bottom: 2px;
}

.sf-preview-loc {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 6px;
}

.sf-preview-line {
    padding: 2px 0;
}

/* Le stock reel est grise : il ne change pas */
.sf-preview-stock {
    color: #888;
}

.sf-tag-unchanged {
    display: inline-block;
    background: #eee;
    color: #555;
    border-radius: 3px;
    padding: 0 6px;
    font-size: 0.8em;
    text-transform: uppercase;
}

.sf-preview-reason {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e0e0e0;
    color: #666;
    font-size: 0.85em;
}

/* Barre d'outils des tableaux de seuils : filtres d'affichage seulement */
.sf-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0;
}

.sf-toolbar-warehouses {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.sf-toolbar-check {
    white-space: nowrap;
    cursor: pointer;
}

.sf-toolbar-search input[type="search"] {
    min-width: 260px;
}

.fixTableHead{
    overflow-y: auto;
    height: 42em;
}

.tagtable thead th{
    position: sticky;
    top: 0;
}