:root {
    --primary: #e67131;
    --light: #f3f4f6;
    --primary-dark: #f6b800;
    --bs-primary: #e67131;
    --bs-primary-rgb: 230, 113, 49;
    --bs-light-rgb: 248, 249, 250;
    --bs-primary-dark-rgb: 246, 184, 0;
    --bs-body-color: #505151;
    /* #4b4d4c; */
    --btn-disabled-bg: #ffd65140;
    --btn-disabled-border-color: #ffd65140;
    --secondary-rgb: #6c757d;

    --accent-color: #e74c3c;
    --blue-dark-bg: #2c3e50;
    --blue-bg: #667eea;
    --purple-bg: #764ba2;
    --success: #198754;
}

body {
    font-family: 'Gotham', sans-serif;
    font-weight: 400;
    font-size: 13px;
}

.list-group-item.active {
    /* background: var(--primary-dark) !important; */
    background: rgba(var(--bs-secondary-rgb), 1) !important;
    border-color: rgba(var(--bs-secondary-rgb), 1) !important;
    color: #fff !important;
}

.list-group-item.active .badge {
    color: rgba(var(--bs-secondary-rgb), 1) !important;
    background: #fff !important;
}

/* Naomi  */
.btn-primary.active {
    background-color: var(--bs-btn-bg, #e67131);
    border-color: var(--bs-btn-border-color, #e67131);
}

.btn-outline-secondary.active {
    background-color: var(--bs-btn-bg, #e67131);
    border-color: var(--bs-btn-border-color, #e67131);
}

/* Pour validation  */
/* Validation Bootstrap */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Animation pour les onglets */
.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style pour la zone de dépôt de fichiers */
.border-dashed {
    border-style: dashed !important;
}

.modal-xxl {
    max-width: 90% !important;
}

/* Style pour les boutons de navigation */
.nav-tabs .nav-link {
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Styles pour les erreurs de validation */
#errorContainer {
    margin-bottom: 1rem;
}

#errorContainer .alert {
    animation: slideDown 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour la navigation des documents */
.doc-navigation {
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
}

/* Correction pour les boutons radio Bootstrap */
.btn-check:checked+.btn-outline-primary {
    background-color: #e67131;
    border-color: #e67131;
    color: white;
}

/* Amélioration de la visibilité des champs invalides */
.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
}

/* Style pour les onglets actifs */
.nav-tabs .nav-link.active {
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 600;
}

.modal-header-produit {
    background: linear-gradient(135deg, #ff9900 0%, #ff6600 100%);
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}


/* Naomi end  */

.btn,
button {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 600;
}

.table {
    padding-left: 10px;
    padding-right: 10px;
    --bs-table-hover-bg: rgba(81, 162, 255, 0.12) !important;
    /* --bs-table-hover-bg: rgba(81, 113, 255, 0.12) !important; */
}

.table thead {
    font-family: 'Gotham' !important;
    font-size: 13px !important;
    background: transparent;
    border-bottom: 2px solid #000;
}

thead tr th {
    white-space: nowrap;
}

.table-striped thead tr th {
    background: none !important;
    border-bottom: 2px solid #000;
}

.table th {
    padding-top: .8rem;
    padding-bottom: .8rem;
}

.table td {
    padding-top: .6rem;
    padding-bottom: .6rem;
    font-size: 12px;
}

#dataPreviewSection .table td {
    padding-top: .6rem;
    padding-bottom: .6rem;
}

.table th {
    text-transform: uppercase;
    font-weight: 600;
}

tbody tr {
    font-family: 'Gotham' !important;
    /* font-size: 14px !important; */
}


.table td,
.table tr,
.table th {
    vertical-align: middle;
}


.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}


/* Sidebar */
.sidebar {
    width: 220px;
    transition: transform 0.3s ease;
    background: #fff;
    height: 100vh;
    position: fixed;
    /* Clé pour rester figée */
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 1px 0 6px rgba(0, 0, 0, 0.06);
    font-weight: 400;
    font-size: 14px;
}

.sidebar-icon-label {
    display: inline-flex;
    column-gap: 5px;
    align-items: center;
    padding: 0;
    margin: 0;
}

.sidebar-icon-label i {
    min-width: 18px; /* 20px; */
}

.nav-link {
    white-space: nowrap !important;
}

.main-content {
    position: relative;
    max-width: 100vw;
    width: 100%;
    overflow: auto;
    flex-grow: 1;
}

.my-main {
    position: relative;
    max-width: 100vw;
    width: 100%;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

@media (min-width: 992px) {
    .sidebar.collapsed+.main-content {
        margin-left: 0;
    }

    .sidebar:not(.collapsed)+.main-content {
        margin-left: 220px;
    }
}

.sidebar .sidebar-items {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
    /* max-height: calc(100vh - 130px); */
    overflow-x: hidden !important;
    overflow-y: scroll !important;
}

@media (min-width: 768px) {
    .sidebar .sidebar-items {
        justify-content: space-between;
    }
}

.sidebar .nav-link {
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.15rem;
    opacity: 1;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    color: var(--bs-body-color);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    opacity: 1;
    background-color: #e9ecef;
    color: var(--bs-body-color);
}

.nav-item .btn-full {
    position: relative;
    width: 100%;
}

.sidebar .submenu .nav-link {
    padding-left: 1.35rem;
    color: var(--bs-body-color);
}

.sidebar .nav-link i.fa-chevron-right {
    font-size: 0.75rem;
    transition: transform 0.2s ease-in-out;
}

.sidebar .nav-link[aria-expanded="true"] i.fa-chevron-right {
    transform: rotate(90deg);
}

.sidebar-list-group {
    margin-bottom: 0.8rem;
}

.sidebar-list-group .group-title {
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.navbar {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.sidebar div.logo {
    display: block;
}

.navbar div.logo-container {
    display: none;
}

/* Style pour le bouton toggle */
#sidebarToggle,
#sidebarTogglelg {
    padding: 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    background: transparent;
    border: 0;
    color: #a2a1a1;
}

#sidebarToggle:hover,
#sidebarTogglelg:hover {
    color: var(--primary);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin-right: 6px;
}

.avatar:hover {
    background: var(--primary-dark);
}

.toggle-password:hover {
    color: #333;
}

.accordion-button:not(.collapsed) {
    color: var(--bs-body-color);
    background-color: var(--light);
}

.accordion-button:focus {
    border-color: var(--bs-accordion-btn-focus-border-color);
    border-bottom: 1px;
    box-shadow: none;
}

.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-focus-shadow-rgb: 13, 110, 253;
    --bs-btn-active-bg: var(--primary);
    --bs-btn-active-border-color: var(--primary);
    --bs-btn-disabled-color: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: #var(--primary-dark);
    --bs-btn-hover-border-color: #var(--primary-dark);
    /* --bs-btn-focus-shadow-rgb: 49,132,253; */
    --bs-btn-focus-shadow-rgb: 253, 212, 49;
    --bs-btn-active-bg: #var(--primary-dark);
    --bs-btn-active-border-color: #var(--primary-dark);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-bg: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
    --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark);
}

.btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(246, 184, 0, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}


.text-primary {
    color: var(--primary) !important;
}

.text-blue-dark {
    color: var(--blue-dark-bg);
}

.bg-primary-subtle {
    background-color: #e6703155 !important;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 214, 81, 0.25) !important;
}

.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-control[readonly] {
    background-color: #e9ecef;
    border-color: #dee2e6;
    opacity: 0.7;
    cursor: not-allowed;
}

.border-dashed {
    border-style: dashed !important;
}

.logo-upload-zone {
    transition: all 0.3s ease;
}

.logo-upload-zone:hover {
    background-color: var(--light-gray);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.dropzone-container {
    border: 2px dashed #dee2e6;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
    cursor: pointer;
    /* min-height: 200px; */
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropzone-container:hover,
.dropzone-container.dragover {
    border-color: var(--primary);
    background: #fff;
}

.dropzone-message {
    color: var(--secondary-rgb);
}

.dropzone-container.has-file {
    border-style: solid;
    background: #fff;
}

.dropzone-container img {
    max-height: 150px;
    width: auto;
    margin: 0 auto;
}

.dropzone-preview img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    margin-top: 10px;
}

.max-h-150 {
    max-height: 150px;
    width: auto;
}

.min-h-40 {
    min-height: 40vh;
}

.max-h-50 {
    max-height: 50vh;
    overflow: auto;
}

.max-h-70 {
    max-height: 70vh;
    overflow: auto;
}

.h-420-px {
    height: 420px;
}


.dragover {
    background-color: rgba(81, 113, 255, 0.05);
}

.login-page {
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-page .col-md-8 {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    width: 400px;
}

.login-page .form-control {
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.login-page .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(81, 113, 255, 0.25);
}

.login-page .btn-primary {
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.login-page .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(81, 113, 255, 0.3);
}

.login-page img {
    margin-bottom: 2rem;
}

.login-page a {
    color: var(--primary);
    text-decoration: none;
}

.login-page a:hover {
    color: var(--primary-dark);
}

.etroit {
    letter-spacing: -0.5px;
}

#evolutionChart {
    min-height: 400px !important;
}

/* Ajout du style pour le logo dans la sidebar */
.sidebar .logo {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.btn-group {
    display: flex;
    gap: 0.1rem;
}

.file-upload-label {
    display: block;
    background-color: #e9ecef;
    color: #495057;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    border: 1px dashed #ced4da;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
}

/* Responsive */
@media (max-width: 991.98px) {
    .wrapper {
        padding-top: 60px;
    }

    .fixed-to-top {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1025;
        padding: 0.5rem 1rem;
        background: #fff;
    }

    .top-bar {
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 10px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -220px;
        width: 220px;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
        margin-top: 40px;
        padding-top: 20px;
    }

    .sidebar.show {
        left: 0;
    }

    /*  Overlay (for mobile only) */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(59, 69, 81, 0.79);
        z-index: 998;
        /* Doit être supérieur à .sidebar */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        margin-left: 0 !important;
    }

    main.p-4 {
        padding-top: 1rem !important;
    }

    /* Ajustement pour les modales */
    .modal {
        z-index: 1100;
    }

    .sidebar div.logo {
        display: none;
    }

    .navbar div.logo-container {
        display: block;
    }

    .navbar div.logo-container .logo-nav {
        height: 30px;
        margin-left: -20px;
        width: auto;
    }

    .sidebar.show {
        display: block;
    }

    #sidebarToggle,
    #sidebarTogglelg {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {

    /* Style spécial pour la description */
    .table td[data-column="designation"],
    .table td[data-column="description"] {
        grid-template-columns: 1fr;
    }

    .table td[data-column="description"]::before {
        margin-bottom: 0.5rem;
    }

    .table td[data-column="actions"] {
        grid-template-columns: 1fr;
        padding-top: 1rem;
        margin-top: 0.5rem;
        border-top: 1px solid #dee2e6 !important;
    }

    .table td[data-column="actions"] .btn-group {
        justify-content: flex-start;
        width: 100%;
    }

    .table td[data-column="actions"] .btn {
        flex: 1;
        padding: 0.5rem;
    }

    /* Ajustements pour les filtres */
    .input-group {
        width: 100%;
        max-width: none;
    }

    .input-group-filter {
        width: 50%;
        max-width: none;
    }


    .btn-group {
        width: 100%;
    }

    .btn-group .btn {
        flex: 1;
    }

    /* Ajustements cartes et conteneurs */
    .card-body {
        padding: 1rem;
    }

    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    /* Ajustements des badges */
    .badge {
        width: fit-content;
    }

    /* .sidebar, .my-main {
        padding-top: 10px;
    } */
}

@media (max-width: 564px) {
    .top-bar {
        flex-wrap: wrap;
    }

    /* .sidebar, .my-main {
        padding-top: 10px;
    } */
}

/* Style de pagination */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: 1px solid #dee2e6;
    color: #333;
    transition: all 0.2s;
}

.page-link:hover {
    background-color: #f0f0f0;
    color: #000;
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.next-prev-btn {
    color: #676767;
}

.next-prev-btn:hover {
    color: var(--primary);
}


/* Styles spécifiques pour la page devis */
.devis-container {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Style pour le header du devis */
.devis-header {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

/* Style pour les informations société et client */
.info-section {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.info-section img {
    max-width: 150px;
    height: auto;
    margin-bottom: 1rem;
}

/* Style pour le tableau de devis */
.devis-table {
    margin-top: 1.5rem;
}

.devis-table .form-control {
    padding: 0.5rem;
}

/* Style pour la barre de recherche client */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .info-section {
        margin-bottom: 1rem;
    }

    .devis-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        padding: 1rem;
        box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .btn-group {
        display: flex;
        gap: 0.1rem;
    }

    .btn-group .btn {
        flex: 1;
    }
}

/* Améliorations esthétiques générales */

.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

.btn-light {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.btn-light:hover {
    background: #e9ecef;
}

/* Style pour les infobulles */
.tooltip {
    font-size: 12px;
}

@media (max-width: 768px) {}

/* Styles pour la liste des devis */
.devis-list {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Style des boutons */
.btn-group {
    display: flex;
    gap: 0.1rem;
}

.btn-light {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.btn-light:hover {
    background: #e9ecef;
}

/* Style pour l'autocomplétion */
.resultats-produit,
#resultats_recherche,
.drop-search {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    z-index: 990;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2px;
}

.autocomplete-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    z-index: 990;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2px;
}

.autocomplete-items div {
    border-bottom: 1px solid #dee2e6;
    padding: .5rem;
    transition: background-color 0.2s;
    cursor: pointer;
}

.autocomplete-items div:hover {
    background-color: #f8f9fa;
}

.selected-department {
    font-weight: 500;
    color: var(--primary);
}

/* Style mobile pour l'autocomplétion */
@media (max-width: 768px) {

    .produit-suggestion,
    .client-suggestion,
    .ajouter-produit-btn,
    .ajouter-client-btn {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }

    .produit-suggestion:last-child,
    .client-suggestion:last-child {
        border-bottom: none;
    }

    /* Ajout d'un overlay sombre quand l'autocomplétion est ouverte */
    .autocomplete-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
    }

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

/* Style des suggestions */
.produit-suggestion,
.client-suggestion,
.ajouter-produit-btn,
.ajouter-client-btn {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
}

.produit-suggestion:hover,
.client-suggestion:hover,
.ajouter-produit-btn:hover,
.ajouter-client-btn:hover {
    background-color: #f8f9fa;
}

/* Style des résultats de recherche actifs */
.recherche-active .resultats-produit,
.recherche-active #resultats_recherche {
    display: block;
}

/* Styles spécifiques pour le tableau devis en responsive */
@media (max-width: 768px) {

    /* Boutons fixes en bas */
    .devis-container .btn-outline-primary,
    .devis-container .btn-success {
        position: fixed;
        bottom: 1rem;
        z-index: 1030;
        border-radius: 2rem;
        padding: 0.75rem 1.5rem;
    }

    .devis-container .btn-outline-primary {
        right: 1rem;
    }

    .devis-container .btn-success {
        left: 1rem;
    }
}

/* Styles de l'overlay pour l'autocomplétion */
.autocomplete-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

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

/* Styles des résultats d'autocomplétion */
.produit-suggestion,
.client-suggestion {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.produit-suggestion:last-child,
.client-suggestion:last-child {
    border-bottom: none;
}


@media (max-width: 768px) {

    /* Style des totaux */
    .totals-section {
        background: #fff;
        padding: 1rem;
        border-top: 1px solid #dee2e6;
        margin-bottom: 1rem;
    }

    .totals-section .row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.5rem;
    }

    /* Retrait de l'overlay */
    .autocomplete-overlay {
        display: none !important;
    }
}

/* Style des suggestions */
.produit-suggestion,
.client-suggestion {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
}

.produit-suggestion:hover,
.client-suggestion:hover {
    background-color: #f8f9fa;
}

@media (max-width: 768px) {

    /* Ajout d'un padding en bas pour éviter que le contenu soit caché par la barre de boutons */
    .devis-container {
        margin-bottom: 100px;
    }
}

/* Style de la section des actions */
.devis-actions {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 1rem;
}

.devis-actions .btn {
    min-width: 140px;
}


/* Style du tableau et des totaux */
.devis-table-container {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

/* Style de la section des actions */
.devis-actions {
    background: #fff;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.devis-actions .btn {
    min-width: 140px;
}

@media (max-width: 768px) {
    .devis-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .devis-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

/* Supprimer le positionnement fixe existant */
@media (max-width: 768px) {
    .devis-container {
        padding-bottom: 1rem;
        /* Réduire le padding car les boutons ne sont plus fixes */
    }

    /* Conteneur pour les boutons */
    .devis-actions {
        position: relative;
        /* Au lieu de fixed */
        bottom: auto;
        left: auto;
        right: auto;
        background: #fff;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: none;
        display: flex;
        gap: 0.5rem;
        justify-content: center;
        /* Centrer les boutons */
    }

    /* Style des boutons */
    .devis-actions .btn {
        flex: 1;
        max-width: 100%;
        /* Limiter la largeur maximale */
        border-radius: 0.375rem;
        padding: 0.75rem 1rem;
    }

    /* Assurer que les boutons restent de la même taille */
    .devis-actions .btn-outline-primary,
    .devis-actions .btn-success {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
    }

    /* Ajuster l'espacement du contenu */
    .devis-table-container {
        margin-bottom: 1rem;
    }
}

/* Styles spécifiques pour mobile */
@media (max-width: 768px) {

    .recherche-active #resultats_recherche,
    .recherche-active .resultats-produit {
        display: block;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 50vh;
        width: 100%;
        margin: 0;
        border: none;
        border-radius: 1rem 1rem 0 0;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
        z-index: 990;
    }

    /* Style pour le conteneur de recherche */
    .position-relative {
        position: relative !important;
    }

    /* S'assurer que l'overlay fonctionne correctement */
    .autocomplete-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
    }

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

    /* Style des suggestions en mobile */
    .client-suggestion,
    .produit-suggestion {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }

    .ajouter-client-btn,
    .ajouter-produit-btn {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }
}

/* Styles spécifiques pour mobile */
@media (max-width: 768px) {
    .recherche-active #resultats_recherche {
        display: block;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 50vh;
        width: 100%;
        margin: 0;
        border: none;
        border-radius: 1rem 1rem 0 0;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    }

    .autocomplete-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .autocomplete-overlay.show {
        display: block !important;
    }
}

/* Style des suggestions */
.client-suggestion,
.ajouter-client-btn {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
}

.client-suggestion:hover,
.ajouter-client-btn:hover {
    background-color: #f8f9fa;
}

@media (max-width: 768px) {

    /* Désactive spécifiquement l'overlay pour la recherche client */
    #recherche_client:focus~.autocomplete-overlay,
    #recherche_client:focus+.autocomplete-overlay,
    #resultats_recherche~.autocomplete-overlay {
        display: none !important;
    }

    /* Empêche l'application des styles mobiles pour le client */
    #recherche_client.recherche-active,
    #resultats_recherche.recherche-active {
        position: static !important;
        transform: none !important;
    }
}

/* Style des suggestions client */
.client-suggestion,
.ajouter-client-btn {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    background: #fff;
}

.client-suggestion:hover,
.ajouter-client-btn:hover {
    background-color: #f8f9fa;
}

/* Correction spécifique pour le conteneur de recherche client */
/* #recherche_client {
    position: relative;
    z-index: 990;
} */

.position-relative {
    position: relative !important;
}

@media (max-width: 768px) {
    .position-relative {
        position: relative !important;
    }

    /* Suggestions mobile */
    .produit-suggestion,
    .client-suggestion,
    .ajouter-produit-btn,
    .ajouter-client-btn {
        padding: 1rem;
    }

    /* Overlay */
    .autocomplete-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
    }

    .autocomplete-overlay.show {
        display: block !important;
    }
}

/* Styles de base pour les résultats de recherche */
.resultats-produit {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    z-index: 990;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2px;
}

/* Styles spécifiques pour mobile */
@media (max-width: 768px) {
    .resultats-produit.mobile-results {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 50vh !important;
        margin: 0;
        border: none;
        border-radius: 1rem 1rem 0 0;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
        z-index: 1051;
    }

    /* Suggestions en mode mobile */
    .produit-suggestion,
    .ajouter-produit-btn {
        padding: 1rem !important;
        border-bottom: 1px solid #dee2e6;
    }

    /* Overlay pour mobile */
    .autocomplete-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 990;
    }

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

    /* Empêcher le défilement du body quand l'autocomplétion est active */
    body.modal-open {
        overflow: hidden;
    }
}

/* Style des suggestions */
.produit-suggestion,
.ajouter-produit-btn {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.produit-suggestion:hover,
.ajouter-produit-btn:hover {
    background-color: #f8f9fa;
}

@media (max-width: 768px) {
    .resultats-produit {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        transform: none !important;
        border-radius: 0.5rem !important;
        margin-top: 2px !important;
        max-height: 300px !important;
    }

    /* Désactiver tous les overlays et styles fixes */
    .recherche-produit:focus~.autocomplete-overlay,
    .recherche-produit:focus+.autocomplete-overlay,
    .resultats-produit~.autocomplete-overlay {
        display: none !important;
    }

    .position-relative {
        position: relative !important;
    }

    /* Suggestions en mode mobile */
    .produit-suggestion,
    .ajouter-produit-btn {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #dee2e6;
    }
}

/* Style des suggestions client */
.client-suggestion,
.ajouter-client-btn {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #dee2e6;
}

.client-suggestion:last-child {
    border-bottom: none;
}

.client-suggestion:hover,
.ajouter-client-btn:hover {
    background-color: #f8f9fa;
}

/* Conteneur de recherche client */
.position-relative {
    position: relative !important;
}

/* Fix spécifique pour mobile */
@media (max-width: 768px) {

    /* Retirer les styles qui interfèrent */
    #recherche_client:focus~.autocomplete-overlay,
    #recherche_client:focus+.autocomplete-overlay,
    #resultats_recherche~.autocomplete-overlay {
        display: none !important;
    }
}

/* Ajustements pour le tableau en mobile */
@media (max-width: 768px) {

    /* Réduction des marges des textareas */
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    /* Ajustement des marges des boutons */
    #ajouter_ligne {
        /* margin-bottom: 0.75rem !important; */
    }

    /* Réduire l'espace entre les éléments du formulaire */
    .form-label {
        margin-bottom: 0.25rem;
    }

    .form-control,
    .form-select {
        padding: 0.4rem 0.75rem;
    }

    /* Marges plus petites autour des sections */
    .mt-3 {
        margin-top: 0.75rem !important;
    }

    .mt-4 {
        margin-top: 1rem !important;
    }
}

/* Espacer les sections d'informations */
.mb-3 {
    margin-bottom: 1.5rem !important;
}

/* Style du champ désignation et recherche produit */
@media (max-width: 768px) {

    /* Espacement entre sections */
    .informations-debut,
    .informations-supplementaires {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
}

/* Style spécifique pour les champs texte */
.form-control::placeholder {
    color: #adb5bd;
}

/* Reset du style table et table-responsive */
.table-responsive {
    overflow: unset !important;
}

.table {
    position: relative;
    z-index: 1;
}

.produit-description {
    font-size: 11px;
    /* white-space: pre-line; */
    color: #666;
    margin-top: 4px;
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-left: 3px solid #dee2e6;
    font-style: italic;
}

.btn-label {
    position: relative;
    padding-left: 44px
}

.btn-label .label-icon {
    position: absolute;
    width: 32px;
    height: 100%;
    left: 0;
    top: 0;
    background-color: hsla(0, 0%, 100%, .1);
    border-right: 1px solid hsla(0, 0%, 100%, .1);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center
}

.btn-label.btn-light .label-icon {
    background-color: rgba(52, 58, 64, .1);
    border-right: 1px solid rgba(52, 58, 64, .2)
}

@media (min-width: 768px) {
    .w-md-25 {
        width: 25% !important;
    }
}

/* masociete */
.image-container {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 5px;
}

.image-container img {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.delete-doc-btn,
.delete-logo-btn,
.delete-certification-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: #fff;
    border: none;
    width: 15px;
    height: 15px;
    font-size: 10px;
    line-height: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.delete-scan-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 10;
    padding: 0px 5px;
}

.delete-scan-btn i {
    font-size: 8px;
}

#scanSection img {
    background-color: rgba(44, 62, 80, 0.12);
    padding: 8px;
}

.add-container {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    border: 1px dashed #999;
    border-radius: 4px;
    cursor: pointer;
}

.grip-icon {
    cursor: grab;
}

/* iframe style */
.iframe-container {
    position: relative;
}

#page-iframe {
    position: relative;
    width: auto;
    min-width: 100%;
    height: auto;
    min-height: 100vh;
}