:root {
    --primary-color:#2c3e50;
    --link-color:#2c3e50;
    --link-color-hover: #161f28;
    --white:#ecf0f1;
    --gray:#f8f9fa;
    --box-shadow-color:rgba(44, 62, 80, 0.07);
    --header-table-color:#fffae6;
    --table-row-color:#f9f9f9;
    --bg-transparent: rgba(44, 62, 80, 0.55);
    --checkbox-bg:#2c3e50;
    --infobulle: #2c3e50;
    --color-warning: #ab0000;
    --bs-info-text-emphasis:#2c3e50;
    --bs-info-bg-subtle: #ecf0f1;
    --bs-info-border-subtle: #2c3e50;
    --header-table-color:#BCCDD1;
    --row-normal-table-color:transparent;
    --total-table-color: #f9f9f9;
    --table-text-color: #000;
}

html[data-bs-theme="dark"] {
    --primary-color: #212529;
    --link-color:#ecf0f1;
    --gray:transparent;
    --link-color-hover:white;
    --box-shadow-color:rgba(255, 255, 255, 0.07);
    --header-table-color: #bbbbbb;
    --checkbox-bg: #525252;
    --infobulle: #ecf0f1;
    --color-warning: #e54f4f;
    --bg-total: transparent;
    --table-row-total-color:#2c3e50;
    --table-text-color: #ecf0f1;
    --total-table-color: #353535;
}
body {
    margin: 0;
    font-family: 'Montserrat',Arial, sans-serif;
    display: flex;
    min-height: 100vh;
}
html[data-bs-theme="light"] body{
    background-color:var(--white);
}
html.login_page body{
    background-color:var(--primary-color)
}


/*BOUTONS & LIENS*/

.btn {
    --bs-btn-color: var(--white);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: var(--primary-color);
    --bs-btn-hover-bg: var(--white);
    --bs-btn-hover-border-color: var(--primary-color);
    --bs-btn-focus-shadow-rgb: 255, 193, 7;
    --bs-btn-active-color:var(--primary-color);
    --bs-btn-active-bg: var(--primary-color);
    --bs-btn-active-border-color: var(--primary-color);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--primary-color);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--primary-color);
    --bs-gradient: var(--primary-color);
    --bs-btn-bg: var(--primary-color);
    white-space: nowrap;
}
html[data-bs-theme="dark"] .btn{
    --bs-btn-border-color: var(--white);
}
html[data-bs-theme="dark"] .btn:disabled{
    border-color: var(--white);
    color: var(--white);
}
a.see_details{
    text-decoration:none;
    color:var(--link-color);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    position:relative;
}
a.see_details::before{
    content:'\F4F8';
    font-family: bootstrap-icons !important;
    margin-right:7px;
    margin-left:-7px;
    transition:0.3s;
}
a.see_details::after{
    content:'';
    position:absolute;
    background:var(--primary-color);
    bottom:1px;
    left:14px;
    width:0;
    height:1px;
    transition:0.3s;
}
a.see_details:hover{
    color:var(--link-color-hover);
}
a.see_details:hover::before{
    content:'\F4F9';
}
a.see_details:hover::after{
    width:calc(100% - 15px);
}

/*LOGO*/
.navbar-brand{
    width: 100%;
}
.logo {
    max-width:90%;
    transition:0.3s;
    margin: 0 auto;
    display: block;
}
.logo path,
.logo polygon{
    fill: var(--white);
    transition:0.3s;
}
.logo #groupe_travaux_out path,
.logo #groupe_travaux_out polygon {
    fill: var(--primary-color);
}
.sidebar.collapsed .logo{
    margin-left:0;
}
.sidebar.collapsed .logo #groupe_jones path,
.sidebar.collapsed .logo #groupe_travaux_out path,
.sidebar.collapsed .logo #groupe_travaux_in path{
    opacity:0
}
.logo path,
.logo polygon{
    fill: var(--white);
    transition:0.3s;
}
.logo_login path,
.logo_login polygon{
    fill: var(--primary-color);
}
.logo_login #groupe_travaux_out path,
.logo_login #groupe_travaux_out polygon {
    fill: var(--white);
}

/*MENU*/
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease-in-out;
    z-index: 1000;
    box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.62);
}
.sidebar.collapsed {
    width: 80px;
}
.sidebar .bi-three-dots::before{
    transition:0.3s;
}
.sidebar.collapsed .bi-three-dots::before{
    transform:rotate(90deg);
}
.sidebar-header {
    height: 110px;
    display: flex;
    align-items: center;
}
.sidebar-toggle {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
}
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-nav ul li {
    margin: 0;
}
.sidebar-link {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    letter-spacing:1.1px;
    font-weight:200;
    padding: 10px 20px;
    color: var(--white);
    text-decoration: none;
    transition: background-color 0.2s ease, gap 0.3s;
}
.sidebar-link.current-menu,
.sidebar-link:hover {
    background-color: rgba(255,255,255,0.2);
}
.sidebar-link i {
    font-size: 20px;
    width: 30px;
    height: 30px;
    text-align: center;
}
.sidebar-link .link-text {
    display: inline-block;
    white-space: nowrap;
    transition:opacity 0.3s, width 0.7s;
    width:200px;
    max-width:100%;
}
.sidebar.collapsed .sidebar-link {
    gap:0;
}
.sidebar.collapsed .link-text {
    width:0;
    overflow:hidden;
    opacity:0;
    transition:opacity 0.6s, width 0.4s;
}
.sidebar-footer {
    display:flex;
    align-items:center;
    margin-top: auto;
    padding: 10px 20px;
    text-align: center;
    border-top: 1px solid var(--white);
}
.sidebar .sidebar-footer i.bi{
    transition:0.3s;
}
.sidebar.collapsed .sidebar-footer{
    padding:10px;
}
.sidebar.collapsed .sidebar-footer i.bi{
    opacity:0;
    width:0;
}
.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    margin: 10px auto;
    cursor: pointer;
}
.theme-toggle-switch input {
    display: none;
}
.theme-toggle-switch .slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--white);
    border-radius: 25px;
    transition: background-color 0.3s ease;
}
.theme-toggle-switch .slider::before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    left: 4px;
    bottom: 4px;
    background-color: var(--white);
    border:1px solid var(--primary-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
}
.theme-toggle-switch input:checked + .slider:before {
    transform: translateX(25px);
}
html[data-bs-theme="dark"] .slider {
    background-color: #2c3e50;
}
html[data-bs-theme="dark"] .slider::before{
    background-color: #2c3e50;
    border:1px solid var(--white);
}
/* CONTENU PRINCIPAL */
.content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
    transition: margin-left 0.3s ease-in-out;
}
.sidebar.collapsed ~ .content {
    margin-left: 80px;
}

/*LOGIN PAGE*/
html.login_page,
.container-login-form,
body.page-template-page-login{
    height:100dvh;
}
html.login_page  .card.shadow-sm{
    background: var(--white);
    overflow:hidden;
}
/*FORMS*/
.form-select:focus,
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 .25rem var(--box-shadow-color);
}
.form-select::placeholder,
.form-control::placeholder{
    font-size:12px;
    opacity:0.8;
    transition:0.3s;
}
.form-select:focus::placeholder,
.form-control:focus::placeholder{
    opacity:0.1;
}
:focus-visible {
    outline: none!important;
}
.total_row {
    font-weight: bold;
}
.fourniture_unit,
.selected-loueur,
.selected-fournisseur{
    display: block;
    padding: 4px;
}
.selected-loueur,
.selected-fournisseur{
    font-size: 11px;
    position:absolute;
    bottom: -1.5rem;
}
.fourniture_unit{
    min-width: 60px;
    max-width: 60px;
    font-size:10px;
}
.tarifs-container label {
    width:100%;
    margin-bottom:2px;
    font-size:12px;
    align-items:center;
    display:flex;
    justify-content:center;
}
.calcul_cost {
    position: absolute;
    bottom: -1rem;
    font-size: 11px;
    right: 20px;
    text-align: center;
    font-style: italic;
}
.tarifs-container label input{
    margin-right:3px;
}
.recap-section {
    display: none;
}
.recap-section li.error {
    font-weight:bold;
    color:#d70000
}
.list-group-item-action{
    cursor:pointer;
}
table td{
    vertical-align: middle;
}
tr.need_validation td{
    background: rgb(210 97 97 / 22%);
}
.link-special{
    color:var(--link-color);
    text-decoration:none;
    position:relative;
}
.link-special::before{
    content:'';
    width:0;
    height:1px;
    background:var(--link-color-hover);
    position:absolute;
    bottom:1px;
    left:20px;
    transition:0.3s;
}
.link-special i::before{
    transition:0.3s;
}
.link-special:hover{
    color:var(--link-color-hover);
}
.link-special:hover::before{
    width:calc(100% - 20px);
}
.link-special:hover i::before{
    transform: rotate(180deg);
}
.last_update_mention {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    font-style: italic;
}
.form-check-input {
    margin-right:5px;
    margin-top:0;
    box-shadow:none!important
}
.form-check-input:checked {
    background-color: var(--checkbox-bg);
    border-color: var(--checkbox-bg)
}
.form-check-label{
    cursor:pointer;
}
.message-autre {
    background:var(--color-warning);
    color:var(--white);
    font-size:9px;
    text-align:center;
    margin-top: 4px;
    padding: 0 5px;
}
.select2-results__group{
    background:var(--primary-color);
    color:var(--white)!important;
    width:100%;
    display:block;
    font-size:13px
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option{
    font-size:13px;
    line-height:1.1
}
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected{
    background-color:var(--bg-transparent);
}
.form-control,
.select2-container--bootstrap-5 .select2-selection{
    font-size:0.9rem;
}
/*ETATS FINANCIERS*/
td.no_wrap{
    white-space: nowrap;
}
.infobulle_finance{
    color:var(--infobulle);
    cursor:pointer;
    position:absolute;
}
.financial-card {
    text-decoration: none;
    color: inherit;
    position:relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.financial-card::after{
    content:'';
    width:100%;
    height:0;
    position:absolute;
    bottom:0;
    left:0;
    background:var(--primary-color);
    border-radius:var(--bs-border-radius);
    transition:0.3s;
    z-index:-1;
}
.financial-card:hover::after{
    height:100%;
}
.financial-card:hover {
    color:var(--white);
    transform: translateY(-5px);
    box-shadow: 0px 4px 12px var(--box-shadow-color)!important;
}
.financial-card:hover p.text-muted{
    color:var(--white)!important;
}
.financial-card i {
    transition: transform 0.3s ease;
}
.financial-card:hover i {
    transform: rotate(-5deg);
}
.table_financial{
    border-collapse:collapse;
}
.table_financial td,
.table_financial th{
    font-size:14px!important;
    color:var(--table-text-color);
    white-space: nowrap;
    padding:10px;
    border:none;
    position:relative;
}
.table_saisie thead th,
.table_financial thead th {
    font-size:16px!important;
    font-weight: bold;
    background-color: var(--header-table-color);
    color:var(--primary-color);
}
.table_saisie td{
    position:relative;
}
.table_financial thead th a{
    color:var(--primary-color);
    margin-left:-10px
}
.table_financial tr{
    background:transparent;
}

.table_saisie  tr th:first-child,
.table_financial tr th:first-child
{
    border-top-left-radius:10px;
}
.table_financial tbody tr th:first-child
{
    border-bottom-left-radius:10px;
}
.table_saisie  tr th:last-child,
.table_financial thead tr th:last-child
{
    border-top-right-radius:10px;
}
.table_financial tbody th{
    width:15%;
    min-width:190px;
    max-width: 190px;
    font-weight:normal;
}
.table_financial .col-width {
    /* width: 10%; */
    min-width: 120px;
}
.table_financial th:first-child {
    width: 240px !important;
    max-width: 240px !important;
    min-width: 240px !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.table_financial tbody th,
.table_financial tbody td{
    background:var(--row-normal-table-color);
}
.table_financial tbody tr{
    border:none!important
}
.table_financial.table-striped > tbody > tr.row_total > *,
.table_financial tbody tr.row_total td,
.table_financial tbody tr.row_total th{
    font-weight:bold;
    font-size:14px;
    background-color: var(--total-table-color)!important;
    border:none!important;
    --bs-table-bg-type:none;
}
.table_financial.table-striped tbody tr.row_total.row_sub_total td{
    border-top:1px solid var(--header-table-color)!important;
    border-bottom:1px solid var(--header-table-color)!important;
}
.table_financial tbody td.table-total{
    background:var(--total-table-color);
    border-color:var(--bs-border-color);
}
.table_saisie tbody tr:last-child td:first-child,
.table_financial tbody tr:last-child td:first-child,
.table_financial tbody tr:last-child th:first-child{
    border-bottom-left-radius:10px;
}
.table_saisie tbody tr:last-child td:last-child,
.table_financial tbody tr:last-child td:last-child{
    border-bottom-right-radius:10px;
}
.table_saisie{
    font-size:14px!important
}
.table_saisie tbody tr:last-child td{
    border-bottom:0;
}
.table_saisie thead th{
    white-space: nowrap;
    font-size:14px!important;
}
.canvas_container canvas{
    min-height:500px;
}
/*VUE PROJETS*/
.badge.bg-primary{
    color:var(--link-color);
    border:1px solid var(--link-color);
    background-color:transparent!important;
}
.project-header {
    background-color: var(--gray);
    font-weight: bold;
    border-left: 4px solid var( --link-color);
    border-top-width: 1px!important;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}
.project-header h5{
    display: flex;
    align-items: center;
}
.project-header h5 span:first-child{
    margin-left:20px;
    margin-right:7px;
}
.list-group-projet .list-group-item:nth-child(2){
    border-top-width:0
}
.list-group-item.item-chantier {
    position: relative;
    overflow: hidden;
    border-top-width:1px;
    padding: 10px;
    margin-bottom: 5px;
    transition:0.3s;
}
.item-chantier:hover{
    background:var(--gray);
}
.item-chantier .progress-background {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    transition: width 1s ease-in-out;
    opacity:0.3;
}
.item-chantier .chantier-info {
    position: relative;
    z-index: 1;
}
#calculator-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    text-align:right;
}

#calculator-toggle {
    background: var(--white);
    color: var(--primary-color);
    padding: 10px 12px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    text-align: center;
    font-size: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.8);
    transition:0.3s;
    float: right;
}
#calculator-toggle:hover{
    color: var(--white);
    background: var(--primary-color);
    box-shadow: 0 2px 1px rgba(0,0,0,0.8);
}
#calculator-body {
    display: none;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    width: 200px;
}

#calculator-body input {
    width: 100%;
    padding: 5px;
    font-size: 16px;
    margin-bottom: 5px;
}

#calc-result {
    font-weight: bold;
    font-size: 16px;
    color: var(--primary-color);
}
/*ADMIN BAR FIX*/
body.admin-bar{
    min-height:calc(100vh - 32px)
}
body.admin-bar .sidebar {
    top: 32px;
}
body.admin-bar .content {
    margin-top: 32px;
}
body.admin-bar .sidebar{
    height:calc(100% - 32px);
}

/*LOADER*/
.loader {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    transition: 0.4s;
}
.loader.active {
    display: block;
}
.loader-circle {
    border: 4px solid var(--white);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
}
/*PROGRESS BAR*/
.progress-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.progress-ring {
    transform: rotate(-90deg); /* Pour dÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â ÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â©marrer ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â ÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â  12h */
}
.progress-ring__background {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 10;
}
.progress-ring__circle {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 314; /* 2 * PI * R */
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1.5s ease-out;
}
.progress-text {
    position: absolute;
    font-size: 18px;
    font-weight: bold;
}
/* DIVERS */
.spin::before {
    animation: spin 1s linear infinite;
}
.back_sub{
    background:var(--primary-color);
    padding:4px;
    color:var(--white);
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@media screen and (max-width:1299px){
    .table_financial td,
    .table_financial thead th,
    .table_financial .btn,
    .table_saisie,
    .table_saisie .btn,
    .table_saisie thead th{
        font-size:12px!important
    }
    .table_financial th:first-child {
        width: 180px !important;
        max-width: 180px !important;
        min-width: 180px !important;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}
/* Responsive */
@media screen and (max-width: 1199px) {
    body{
        --bs-body-font-size: 0.75rem;
    }
    .btn{
        --bs-btn-font-size:0.75rem;
    }

}