/* ============================================
    RESET AND GLOBAL STYLES
   ============================================ */
*,
*:after,
*:before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

:root {
    --font-family: "Roboto", sans-serif;
    --white: #fffefa;
    --grey: #f9f7f0;
    --alabaster: #efebe4;
    --dark-alabaster: #e0e0d4;
    --black: #000;
    --taupe: #504139;
    --dark-taupe: #3d2d25;
}

body {
    margin: 1rem 3rem;
    letter-spacing: 0.5px;
    background-color: #fffef8;
}

*::placeholder {
    font-style: italic;
}

/* ========== MESSAGE TEMPORAIRE ========== */
.temporary-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: fadeInOut 4s ease-in-out;
}

.temporary-message.show {
    display: block;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* ============================================
    PRODUCT PAGE
   ============================================ */

/* ========== ERREUR DE SAISIE DE LA DATE ========== */
.invalid-input {
    animation: blink-red 0.5s ease-in-out 3;
}

@keyframes blink-red {

    0%,
    100% {
        background-color: #f8d7da;
    }

    50% {
        background-color: #f5c6cb;
    }
}

/* ========== FIRST CONTAINER ========== */
.first-container {
    display: flex;
    margin: 3rem 0;
    gap: 2rem;
}

/* ========== LIEN ========== */
.link-model {
    display: inline-flex;
    white-space: nowrap;
    font-weight: normal;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 30px;
    background-color: var(--white);
    font-size: 14px;
    color: var(--taupe);
    text-decoration: none;
    border-radius: 5px;
    border: solid 1px var(--taupe);
    transition: all 0.3s ease;
}

.link-model:hover {
    background-color: var(--taupe);
    color: var(--white);
}

/* ========== FORMULAIRE D'AJOUT ET SUGGESTIONS ========== */

.form-products {
    position: relative;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-radius: 5px;
}

.form-products input[type="text"],
.form-products select {
    padding: 12px 10px;
    font-size: 14px;
    background-color: var(--white);
    border: 1px solid var(--dark-alabaster);
    border-radius: 5px;
    width: 100%;
    flex: 1;
    min-width: 0;
}

.form-products select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("/assets/images/arrow.svg");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 25px;
    padding-right: 30px;
    border: 1px solid var(--dark-alabaster);
    border-radius: 4px;
    padding: 12px 10px;
    font-size: 14px;
    background-color: var(--white);
}

.form-products ::placeholder {
    font-size: 14px;
}

.form-products .input-wrapper {
    flex: 1.7;
}

.form-products #barcodeInput {
    flex: 0.8;
}

.form-products #expiryInput {
    flex: 0.5;
}

.form-products #priceInput,
.form-products #weightInput {
    flex: 0.3;
}

.form-products #typeInput {
    flex: 0.4;
}

.form-products #categoryInput {
    flex: 0.7;
}

/* SUGGESTIONS */
.input-wrapper {
    position: relative;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 1000;
    padding: 5px 0;
    display: none;
}

.suggestions li {
    padding: 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.suggestions li:hover {
    background-color: var(--grey);
}

.suggestions li.empty {
    color: #999;
    text-align: center;
    cursor: default;
}

/* BOUTON D'AJOUT */
.form-products button {
    padding: 8px 8px;
    font-size: 14px;
    font-weight: normal;
    color: var(--white);
    background-color: var(--taupe);
    border: var(--taupe) solid 1px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0.5;
}

.form-products button:hover {
    background-color: var(--white);
    color: var(--taupe);
}

.form-products.delivery-active button {
    background-color: var(--white);
    color: var(--taupe);
}

.form-products.delivery-active button:hover {
    background-color: var(--taupe);
    color: var(--white);
}

/* ========== MODAL DE CONFIRMATION D'AJOUT AU MODELE ========== */
.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.confirmation-modal.open {
    display: flex;
}

.confirmation-modal .modal-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: 5px;
    border: solid var(--taupe) 2px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.confirmation-modal .modal-message {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--black);
}

.confirmation-modal .modal-actions {
    display: flex;
    justify-content: space-around;
}

.confirmation-modal .modal-actions button {
    padding: 10px 30px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.confirmation-modal .modal-actions .confirm-btn {
    background-color: var(--taupe);
    color: var(--white);
    border: solid var(--taupe) 1px;
}

.confirmation-modal .modal-actions .confirm-btn:hover {
    background-color: var(--white);
    color: var(--taupe);
}

.confirmation-modal .modal-actions .cancel-btn {
    background-color: var(--white);
    color: var(--taupe);
    border: solid var(--taupe) 1px;
}

.confirmation-modal .modal-actions .cancel-btn:hover {
    background-color: var(--taupe);
    color: var(--white);
}

/* Bouton Livraison */
.delivery-button {
    padding: 8px 15px;
    font-size: 14px;
    color: var(--taupe);
    background-color: var(--white);
    border: var(--taupe) solid 1px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 130px;
}

.delivery-button:hover {
    background-color: var(--taupe);
    color: var(--white);
}

.delivery-button.open {
    background-color: var(--taupe);
    color: var(--white);
}

.delivery-button.delivery-active {
    background-color: var(--taupe);
    color: var(--white);
}

.delivery-button.delivery-active:hover {
    background-color: var(--white);
    color: var(--taupe);
}

/* ========== SECOND CONTAINER ========== */
.second-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
}

/* ========== FILTRES ========== */
.filters {
    display: flex;
    gap: 0;
    width: 33.33%;
    position: relative;
    justify-content: flex-end;
    z-index: 2;
}

.filters input[type="radio"] {
    display: none;
}

.filters label {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-top: solid 1px var(--dark-alabaster);
    border-left: solid 1px var(--dark-alabaster);
    border-right: solid 1px var(--dark-alabaster);
    background-color: var(--white);
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 5px 5px 0 0;
    margin-bottom: 0;
}

.filters input[type="radio"]:checked+label {
    background-color: var(--grey);
    transform: scaleY(1.1);
    transform-origin: bottom;
    z-index: 1;
}

.filters label:hover {
    background-color: var(--grey);
}

/* ========== LIVRAISON ========== */
.delivery-container {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 33.33%;
    margin-bottom: 10px;
}

.delivery-mode {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
}

.delivery-label {
    font-size: 14px;
    color: var(--taupe);
}

/* Barre de recherche livraison */
.delivery-search-container {
    width: 100%;
    position: relative;
}

.delivery-search-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.search-field-container {
    position: relative;
    flex: 1;
}

.delivery-search {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid var(--taupe);
    border-radius: 5px;
    background-color: var(--white);
}

.validate-delivery {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: normal;
    color: var(--white);
    background-color: var(--taupe);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: solid var(--taupe) 1px;
}

.validate-delivery:hover {
    color: var(--taupe);
    background-color: var(--white);
}

/* Suggestions de recherche livraison */
.delivery-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    font-size: 14px;
    background-color: var(--white);
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}

.delivery-suggestions li {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.delivery-suggestions li:hover {
    background-color: #f0f0f0;
}

/* Modal de livraison */
.delivery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.delivery-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--white);
    border: solid var(--taupe) 2px;
    padding: 30px;
    border-radius: 5px;
    min-width: 300px;
}

.delivery-modal .modal-content h2 {
    margin: 10px 0;
    font-size: 1rem;
    color: var(--taupe);
    text-transform: uppercase;
}

.delivery-modal .close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    color: var(--taupe);
}

.delivery-modal #productInfo {
    margin: 20px 0;
}

.delivery-modal #productInfo p {
    margin: 10px 0;
    font-weight: 400;
    color: var(--taupe);
}

.delivery-modal .form-group {
    margin-bottom: 15px;
}

.delivery-modal .confirm-delivery {
    background-color: var(--taupe);
    margin-top: 20px;
    width: 100%;
    font-size: 14px;
    color: var(--white);
    padding: 10px 20px;
    border: solid var(--taupe) 1px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delivery-modal .confirm-delivery:hover {
    background-color: var(--white);
    color: var(--taupe);
}

/* ========== BARRE DE RECHERCHE ========== */
.search-product-container {
    display: flex;
    width: 33.33%;
    margin-bottom: 10px;
    align-items: center;
}

.search-product {
    width: 80%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: var(--white);
}

.search-product::placeholder {
    font-size: 14px;
}

/* ========== TABLEAU ========== */


.table-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 300px;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    text-align: left;
    min-width: 1500px;
}

/* Classes pour masquer les lignes via les filtres */
.hidden-by-filter,
.hidden-by-search {
    display: none !important;
}

/* Empêche le contenu de déborder */
.products-table th,
.products-table td {
    white-space: nowrap;
}

/* ========== ENTETE ========== */

.products-table th {
    background-color: var(--white);
    color: var(--black);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1.5rem 1rem;
    border: 1px solid var(--dark-alabaster);
}

.products-table tr {
    background-color: var(--grey);
}

.products-table.center-th {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.products-table th svg {
    width: 15px;
    height: 15px;
    pointer-events: none;
}

/* ======== CONTENU ========= */

.products-table td {
    border: 1px solid var(--dark-alabaster);
    padding: 0 1rem;
}

.products-table tr:nth-child(even) {
    background-color: var(--white);
}

.products-table .col-name {
    width: 20%;
    min-width: 0;

}

.products-table .col-barcode {
    width: 10%;
    min-width: 0;

}

.products-table .col-expiry {
    width: 9%;
    min-width: 0;

}

.products-table .col-status {
    width: 10%;
    min-width: 0;

}

.products-table .col-price {
    width: 6%;
    min-width: 0;

}

.products-table .col-weight {
    width: 6%;
    min-width: 0;

}

.products-table .col-price-per-kg {
    width: 8%;
    min-width: 0;

}

.products-table .col-discount {
    width: 6%;
    min-width: 0;

}

.products-table .col-category {
    width: 8%;
    min-width: 0;

}

.products-table .col-type {
    width: 6%;
    min-width: 0;

}

.products-table .col-actions {
    width: 6%;
    min-width: 0;
}

/* ========== STATUS ========== */
.custom-select {
    position: relative;
    width: 100%;
    padding: 5px 0;
}

.selected {
    padding: 5px 8px;
    cursor: pointer;
    border: 1px solid var(--grey);
    border-radius: 5px;
}

/* ========== OPTIONS STATUS ========== */
.options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    border: 1px solid #ccc;
    border-radius: 5px;
    z-index: 1000;
}

.option {
    padding: 8px 8px;
    margin: 10px;
    cursor: pointer;
    text-align: left;
    border-radius: 5px;
}

.option:hover {
    background-color: #ddd;
}

.custom-select .show {
    display: block;
}

/* ========== COULEUR DES STATUS ========== */

.en-stock {
    background-color: #d4edda;
}

.étiqueté {
    background-color: #fff3cd;
}

.indisponible {
    background-color: #f8d7da;
}

.à-venir {
    background-color: #cce5ff;
}

.non-reçu {
    background-color: #e2e3e5;
}

/* ========== ICONE SUPPRIMER ========== */

.products-table tbody .col-actions {
    padding: 0;
}

.delete-btn {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.delete-btn svg {
    display: flex;
    margin: 0 auto;
    align-items: center;
    width: 22px;
    height: 22px;
    pointer-events: none;
    cursor: pointer;
}

.delete-btn svg path {
    fill: red;
}

.delete-btn:hover svg path {
    fill: darkred;
}

/* ============================================
    MODEL PAGE
   ============================================ */

.header-models {
    display: flex;
    align-items: center;
    margin: 3rem 0;
    white-space: nowrap;
    gap: 2rem;
}

/* ========== LIENS ========== */
.link-product {
    display: inline-flex;
    white-space: nowrap;
    font-weight: 400;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding: 12px 30px;
    background-color: var(--taupe);
    font-size: 14px;
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;

    border: solid 1px var(--taupe);
    transition: all 0.3s ease;
}

.link-product:hover {
    background-color: var(--white);
    border-color: var(--taupe);
    color: var(--taupe);
}

/* ========== FORMULAIRE D'AJOUT========== */

.form-models {
    position: relative;
    display: flex;
    width: 100%;
    gap: 10px;
    border-radius: 5px;
}

.form-models input[type="text"],
.form-models select {
    padding: 12px 10px;
    font-size: 14px;
    background-color: var(--white);
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-models select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("/assets/images/arrow.svg");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 25px;
    padding-right: 30px;
    border: 1px solid var(--dark-alabaster);
}

.form-models ::placeholder {
    font-size: 14px;
}

.form-models #nameInput {
    flex: 2;
}

.form-models #barcodeInput {
    flex: 1.5;
}

.form-models #priceInput,
.form-models #weightInput {
    flex: 0.6;
}

.form-models #typeInput,
.form-models #categoryInput {
    flex: 0.6;
    text-transform: capitalize;
}

/* BOUTON D'AJOUT */
.form-models button {
    padding: 12px 15px;
    font-size: 14px;
    color: var(--taupe);
    background-color: var(--white);
    border: var(--taupe) solid 1px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0.5;
}

.form-models button:hover {
    background-color: var(--taupe);
    color: var(--white);
}

/* ========== BARRE DE RECHERCHE ========== */
.search-container-models {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.search-model {
    padding: 10px;
    width: 20%;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.search-model::placeholder {
    font-size: 14px;
}

/* MESSAGE D'ERREUR */

#message {
    font-size: 14px;
    color: red;
    text-align: center;
}

/* ========== TABLEAU ========== */

.table-container-models {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 300px;
}

.models-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
    font-size: 15px;
    text-align: left;
}

.modelsTable th,
.modelsTable td {
    white-space: nowrap;
}

/* ========== ENTETE ========== */

.models-table th {
    background-color: var(--white);
    color: var(--black);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1.5rem 1rem;
    border: 1px solid var(--dark-alabaster);
}

.models-table tr {
    background-color: var(--grey);
}

.models-table th svg {
    width: 15px;
    height: 15px;
    pointer-events: none;
}

.models-table.center-th {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* ======== CONTENU ========= */

.models-table td {
    border: 1px solid var(--dark-alabaster);
    padding: 0.2rem 1rem;
    white-space: nowrap;

}

.models-table tr {
    background-color: var(--grey);
}

.models-table tr:nth-child(even) {
    background-color: var(--white);
}


.models-table .col-name {
    width: 20%;
    min-width: 0;

}

.models-table .col-barcode {
    width: 10%;
    min-width: 0;

}

.models-table .col-price {
    width: 6%;
    min-width: 0;

}

.models-table .col-weight {
    width: 6%;
    min-width: 0;

}

.models-table .col-category {
    width: 8%;
    min-width: 0;
    text-transform: capitalize;

}

.models-table .col-type {
    width: 6%;
    min-width: 0;
    text-transform: capitalize;
}

.models-table .col-actions {
    width: 6%;
    min-width: 0;
}

/* ========== FENETRE DE MODIFICATION ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-overlay.show {
    display: block;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--white);
    padding: 20px;
    border: 1px solid var(--taupe);
    border-radius: 5px;
    z-index: 1000;
    display: none;
}

.modal.open {
    display: block;
}

.modal .close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

#editModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease-in-out;
    z-index: 1001;
    padding: 20px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
}

#editModal.open {
    opacity: 1;
    pointer-events: auto;
}

#editModal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.form-group label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#editModal .modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#editModal .modal-content h2 {
    margin-bottom: 20px;
}

#editModal .modal-content button {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 400;
    color: var(--white);
    background-color: var(--taupe);
    border: solid var(--taupe) 1px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#editModal .modal-content button:hover {
    background-color: var(--white);
    color: var(--taupe);
}

/* ========== ACTION ========== */
.models-table td.col-actions {
    text-align: center;
}

.models-table .col-actions button {
    padding: 1px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
    background-color: var(--white);
    border: solid var(--taupe) 1px;
}

.models-table .col-actions .delete-model-btn:hover {
    border: solid red 1px;
}

.models-table .col-actions .delete-model-btn svg {
    align-items: center;
    width: 20px;
    height: 20px;
    pointer-events: none;
    cursor: pointer;
}

.models-table .col-actions .delete-model-btn svg path {
    fill: red;
}

.models-table .col-actions .delete-model-btn:hover svg path {
    fill: darkred;
}

.models-table .col-actions .edit-model-btn:hover {
    border: solid 1px blue;
}

.models-table .col-actions .edit-model-btn svg {
    align-items: center;
    width: 20px;
    height: 20px;
    pointer-events: none;
    cursor: pointer;
}

.models-table .col-actions .edit-model-btn svg path {
    fill: blue;
}

.models-table .col-actions .edit-model-btn:hover svg path {
    fill: darkblue;
}

/* ========== CONFIRMATION DE SUPPRESSION ========== */

.confirmation-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--white);
    padding: 50px;
    border: 1px solid var(--taupe);
    display: none;
    z-index: 1000;
    text-align: center;
    border-radius: 5px;
}

.confirmation-box p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 400;
}

.confirmation-box button {
    margin: 0 10px;
    padding: 10px 15px;
    font-size: 20px;
    border-radius: 5px;
    width: 120px;
}

.confirmation-box #confirmNo {
    background-color: var(--white);
    color: var(--taupe);
    border: solid 1px var(--taupe);
}

.confirmation-box #confirmNo:hover {
    background-color: var(--taupe);
    color: var(--white);
}

.confirmation-box #confirmYes {
    background-color: red;
    color: var(--white);
    border: solid 1px red;
}

.confirmation-box #confirmYes:hover {
    background-color: darkred;
    border-color: darkred;
    color: var(--white);
}

/* Bouton d'aide */
.help-button {
    background: var(--white);
    color: var(--taupe);
    border: var(--taupe) solid 2px;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.help-button:hover {
    background: var(--taupe);
    color: var(--white);
    transform: scale(1.1);
}

/* Modal d'aide */
.help-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.help-modal .modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 30px;
    border: none;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.help-modal h2 {
    color: var(--taupe);
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid var(--taupe);
    padding-bottom: 10px;
}

.help-modal h3 {
    color: var(--taupe);
    margin-bottom: 15px;
    font-size: 18px;
}

.help-content {
    line-height: 1.6;
    color: #666;
}

.help-content ol,
.help-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.help-content li {
    margin-bottom: 10px;
    font-variant: var(--black);
}

.help-content strong {
    color: var(--taupe);
}

.help-content p {
    background-color: var(--grey);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--taupe);
    margin-top: 20px;
}

.close-help {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.3s ease;
}

.close-help:hover,
.close-help:focus {
    color: #000;
    text-decoration: none;
}

/* RESPONSIVE PAGE PRODUIT */
@media (max-width: 1800px) {

    .form-products input[type="text"],
    .form-products select,
    .form-products ::placeholder,
    .link-model,
    .form-products button,
    .delivery-button,
    .delivery-label,
    .delivery-search,
    .validate-delivery {
        font-size: 12px;
    }

    .link-model {
        padding: 8px 20px;
    }

    .form-products button {
        padding: 8px 5px;
    }

    .delivery-button {
        min-width: 120px;
    }

    .filters label {
        font-size: 14px;
    }

    .products-table {
        font-size: 14px;
    }

    .products-table th {
        font-size: 1rem;
    }

    .products-table th svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 1440px) {
    .form-products #barcodeInput {
        flex: 0.7;
    }

    .form-products #typeInput {
        flex: 0.5;
    }

    .delivery-label,
    .delivery-search,
    .validate-delivery {
        font-size: 11px;
    }

    .form-products button {
        padding: 8px 8px;
    }

    .delivery-button {
        min-width: 100px;
    }

    .filters label {
        font-size: 13px;
    }

    .search-product,
    .search-product::placeholder {
        font-size: 12px;
    }
}

@media (max-width: 1300px) {
    .delivery-container {
        width: 30%;
    }

    .delivery-suggestions {
        font-size: 12px;
    }

    .search-product-container {
        width: 27%;
    }
}

@media (max-width: 1245px) {

    .form-products input[type="text"],
    .form-products select,
    .form-products ::placeholder,
    .link-model,
    .form-products button,
    .delivery-button,
    .delivery-label,
    .delivery-search,
    .validate-delivery {
        font-size: 10px;
    }

    .filters label {
        font-size: 11px;
    }

    .products-table {
        font-size: 12px;
    }

    .products-table th {
        font-size: 0.8rem;
    }

    .products-table th svg {
        width: 11px;
        height: 11px;
    }

    .link-model {
        padding: 8px 15px;
    }

    .delivery-button {
        min-width: 100px;
    }
}

@media (max-width: 1140px) {

    .first-container,
    .second-container {
        flex-direction: column;
        gap: 1rem;
        margin: 1rem 0;
        align-items: stretch;
    }

    .first-container>*,
    .second-container>* {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .form-products {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .form-products input[type="text"],
    .form-products select {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 11px;
        padding: 10px 8px;
    }

    .form-products button {
        font-size: 12px;
        padding: 10px 8px;
    }

    .input-wrapper,
    .form-products .input-wrapper {
        width: 100%;
        flex: unset;
    }

    .delivery-button,
    .link-model {
        width: 100%;
        min-width: 0;
        font-size: 12px;
        padding: 10px 0;
    }

    .delivery-search-container,
    .search-product-container,
    .search-container-models {
        width: 100%;
    }

    .search-product {
        width: 100% !important;
        font-size: 12px;
        padding: 10px 8px;
    }

    .search-product-container {
        margin-bottom: -10px;
    }

    .filters {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
        margin-bottom: -18px;
    }

    .filters label {
        font-size: 11px;
        padding: 8px 4px;
        width: 100%;
        min-width: 0;
        text-align: center;
        border-bottom: solid 1px var(--dark-alabaster);
    }

    .delivery-label {
        font-size: 11px;
    }

    .delivery-search {
        font-size: 11px;
        padding: 8px 8px;
    }

    .validate-delivery {
        font-size: 11px;
        padding: 8px 20px;
    }


    .form-products {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }


    .form-products-row {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .form-products-row .form-field {
        flex: 1;
        min-width: 0;
    }

    .form-products-row2 {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .form-products-row2 .form-field {
        flex: 1;
        min-width: 0;
    }

    .form-products #expiryInput,
    .form-products #priceInput,
    .form-products #weightInput,
    .form-products #categoryInput,
    .form-products #typeInput {
        width: 100% !important;
        min-width: 0 !important;
    }

    .form-products #expiryInput,
    .form-products #priceInput,
    .form-products #weightInput {
        margin-bottom: 0 !important;
    }

    .form-products #categoryInput,
    .form-products #typeInput {
        margin-bottom: 0 !important;
    }

    .form-products input[type="text"],
    .form-products select {
        padding: 8px 6px;
        font-size: 11px;
    }

    .form-products input,
    .form-products select {
        box-sizing: border-box;
    }
}

@media (max-width: 1140px) {
    .form-products {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }

    .form-products .input-wrapper,
    .form-products #barcodeInput {
        flex: 1 1 100%;
        min-width: 0;
    }


    .form-products #expiryInput {
        order: 2;
        flex: 1 1 0;
        min-width: 0;
        width: 33.33% !important;
        margin-bottom: 0 !important;
    }

    .form-products #priceInput {
        order: 3;
        flex: 1 1 0;
        min-width: 0;
        width: 33.33% !important;
        margin-bottom: 0 !important;
    }

    .form-products #weightInput {
        order: 4;
        flex: 1 1 0;
        min-width: 0;
        width: 33.34% !important;
        margin-bottom: 0 !important;
    }


    .form-products #categoryInput {
        order: 5;
        flex: 1 1 0;
        flex-basis: 100%;
        min-width: 0;
        width: 50% !important;
        margin-bottom: 0 !important;
    }

    .form-products #typeInput {
        order: 6;
        flex: 1 1 0;
        min-width: 0;
        width: 50% !important;
        margin-bottom: 0 !important;
    }

    .form-products button {
        order: 7;
        flex: 1 1 100%;
        min-width: 0;
        width: 100% !important;
    }
}

@media (max-width: 950px) {

    .form-products #expiryInput,
    .form-products #priceInput,
    .form-products #weightInput {
        width: 33.33% !important;
    }

    .form-products #categoryInput,
    .form-products #typeInput {
        width: 50% !important;
    }

    .form-products .input-wrapper,
    .form-products #barcodeInput {
        width: 100% !important;
    }
}

@media (max-width: 880px) {

    .form-products input[type="text"],
    .form-products select,
    .form-products ::placeholder,
    .link-model,
    .form-products button,
    .delivery-button,
    .delivery-label,
    .delivery-search,
    .validate-delivery {
        font-size: 10px;
    }

    .link-model {
        padding: 8px 20px;
    }

    .form-products button {
        padding: 8px 5px;
    }

    .delivery-button {
        padding: 8px 0;
        min-width: 120px;
    }

    .filters label {
        font-size: 10px;
    }

    .products-table {
        font-size: 14px;
    }

    .products-table th {
        font-size: 1rem;
    }

    .products-table th svg {
        width: 12px;
        height: 12px;
    }

    .delivery-label,
    .delivery-search,
    .validate-delivery {
        font-size: 10px;
    }

    .search-product,
    .search-product::placeholder {
        font-size: 10px;
        padding: 8px 5px;
    }

    .products-table {
        font-size: 11px;
    }

    .products-table th {
        font-size: 0.9rem;
    }

    .products-table th svg {
        width: 10px;
        height: 10px;
    }

    .products-table .col-expiry,
    .products-table .col-barcode,
    .products-table .col-name,
    .products-table .col-price,
    .products-table .col-weight,
    .products-table .col-price-per-kg,
    .products-table .col-discount,
    .products-table .col-category,
    .products-table .col-type,
    .products-table .col-actions {
        width: 1%;
    }

    .products-table .col-status {
        width: 3%;
    }

    .custom-select {
        width: 80%;
    }
}

@media (max-width: 380px) {
    .filters label {
        font-size: 8px;
    }
}


/* ============================================
    RESPONSIVE PAGE MODELS
   ============================================ */

@media (max-width: 1730px) {

    .form-models #nameInput {
        flex: 2;
    }

    .form-models #barcodeInput {
        flex: 1;
    }

    .form-models #priceInput,
    .form-models #weightInput {
        flex: 0.1;
    }

    .form-models #typeInput,
    .form-models #categoryInput {
        flex: 1;
    }

}

@media (max-width: 1470px) {


    .form-models input {
        min-width: 0;
        flex-grow: 0;
        flex-shrink: 1;
        flex-basis: 0;
    }

    .form-models #nameInput {
        flex: 20;
    }

    .form-models #barcodeInput {
        flex: 10;
    }

    .form-models #priceInput,
    .form-models #weightInput {
        flex: 4;
    }

    .form-models #typeInput {
        flex: 6;
    }

    .form-models #categoryInput {
        flex: 9;
    }


    .models-table .col-name,
    .models-table .col-barcode,
    .models-table .col-price,
    .models-table .col-weight,
    .models-table .col-category,
    .models-table .col-type,
    .models-table .col-actions {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }


}

@media (max-width: 1345px) {

    .link-product {
        padding: 12px 20px;
        font-size: 12px;
    }

    .form-models input[type="text"],
    .form-models select {
        font-size: 12px;
    }

    .form-models ::placeholder {
        font-size: 12px;
    }

    .form-models button {
        font-size: 12px;
    }

    .search-model {
        font-size: 12px;
    }

    .models-table {
        font-size: 13px;
    }

    .models-table th {
        font-size: 1rem;
        padding: 1.5rem 0.5rem;
    }

    .models-table th svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 1230px) {
    .header-models {
        flex-direction: column;
    }

    .form-models {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .form-models input[type="text"],
    .form-models select {
        width: 100% !important;
        min-width: 0 !important;
    }

    .form-models button {
        width: 100% !important;
    }

}

@media (max-width: 1230px) {


    .form-models {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }

    .form-models #nameInput,
    .form-models #barcodeInput {
        flex: 1 1 100%;
        min-width: 0;
        width: 100% !important;
    }


    .form-models #priceInput,
    .form-models #weightInput {
        flex: 1 1 0;
        min-width: 0;
        width: 50% !important;
        margin-bottom: 0 !important;
    }


    .form-models #categoryInput,
    .form-models #typeInput {
        flex: 1 1 0;
        min-width: 0;
        width: 50% !important;
        margin-bottom: 0 !important;
    }

    .form-models button {
        flex: 1 1 100%;
        min-width: 0;
        width: 100% !important;
    }

    .search-model {
        width: 30%;
    }
}

@media (max-width: 600px) {

    .form-models #categoryInput,
    .form-models #typeInput {
        flex: 1 1 100%;
        min-width: 0;
        width: 100% !important;
    }

    .link-product {
        padding: 10px 20px;
        font-size: 10px;
    }

    .form-models input[type="text"],
    .form-models select {
        font-size: 10px;
        padding: 10px 10px;
    }

    .form-models ::placeholder {
        font-size: 10px;
    }

    .form-models button {
        font-size: 10px;
    }

    .search-model {
        font-size: 10px;
    }

    .models-table {
        font-size: 11px;
    }

    .models-table th {
        font-size: 0.9rem;
        padding: 1.5rem 0.5rem;
    }

    .models-table th svg {
        width: 12px;
        height: 12px;
    }

    .search-model::placeholder {
        font-size: 10px;
    }


    .models-table .col-name,
    .models-table .col-barcode,
    .models-table .col-price,
    .models-table .col-weight,
    .models-table .col-category,
    .models-table .col-type,
    .models-table .col-actions {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

@media (max-width: 400px) {
    .search-model {
        width: 40%;
    }
}