@import 'variables';
@import 'mixins';
@import 'identification';
@import 'pnotify_override';
@import 'datatables_override';
@import 'doe';
@import 'loader';
@import 'icons';
@import 'dashboard';
@import '_print';
@import '_crm';

h1, .h1 {
    font-size: 2.5rem;
    line-height: 2.7rem;
    @media (max-width: 575px) {
        font-size: 2rem;
        line-height: 2.2rem;
    }      
}

h2, .h2 {
    font-size: 2rem;
    line-height: 2rem;
}
.vert {
    color: $green !important;
}
.orange {
    color: $orange !important;
}
.noir {
    color: $color-dark !important;
}
.gris {
    color: lighten($color-secondary, 20%);
}

.text-deleted {
    text-decoration: line-through;
}

body {
    background-color: $grey-bg;
    position: relative;
    &.test {
        background-color: #cdcdcd;
        .navbar.bg-dark {
            background-color: #666!important;
        }
        .table {
            background-color: white;
        }
        .btn-outline-success {
            background-color: white;
        }
    }
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(222,226,230,.9);
    z-index: 3;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

footer {
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 40px;
    clear: both;
}

.operations {
    .btn-group-sm>.btn, .btn-sm {
        padding: .2rem .8rem;
    }
}

.dropzone {
    border: 1px dashed #becad6;
    background-color: $grey-bg;
    border-radius: .375rem;
    .dz-preview .dz-image {
        border-radius: 0.375rem;
    }
}

fieldset {
    border:1px solid #becad6;
    border-radius: .375rem;
    padding: 1rem;
    background-color: $grey-bg;
    margin-bottom: 10px;
    legend {
        display: inline-block;
        width: auto;
        padding: 0 10px;
        margin-bottom: 0;
        background-color: #fff;
        border-radius: .375rem;
        font-size: 1.2rem;
    }    
}

// Page voir élément
.titre-client {
    display: block;
    text-align: center;
    font-size: 1.2em;
}

.zone-titre-element {
    text-align: center;
    h3 {
        color: $color-secondary;
    }
    .logo-client {
        max-height: 100px;
        max-width: 60%;
        margin-bottom: .6rem;
        @media (max-width: 575px) {
            max-height: auto;
            max-width: 100%;
        }        
    }
}

.circuits {
    h3 {
        font-size: 1rem;
        line-height: 1rem;
        margin-bottom: 0;
        margin-top: .75rem;
    }
}

.card {
    &.card-photo-sm {
        .card-img-top {
            height: 240px;
            object-fit: cover;
        }
        .card-body {
            padding: .6rem;
        }
        .card-title {
            display: inline-block;
            font-size: 14px;
            font-weight: 300;
            line-height: 1rem;
            margin: .60rem .2rem;
        }
    }
    &.card-installation {
        .card-header {
            font-size: 1.5rem;
            font-weight: 400;
        }
    }
    &.sheet {
        .logo-client {
            max-width: 200px;
            max-height: 80px;
            width: auto;
            height: auto;
        }            
    }
}

.group-item {
    border-bottom: 1px solid #e0e0e0;
    font-weight: 400;
    color: $color-dark;
    padding: .3rem .5rem;
    margin: .5rem 0 .3rem 0;
    background-color: #fff;
    border-radius: .25rem;
    .titre-item {
        font-weight: 300;
        color: $color-secondary;    

    }
    &.danger {
        background-color: $red;
        color: white;
        border-bottom-color: darken($red, 15%);
        .titre-item {
            color: darken(white, 15%);
        }        
        
    }
}

ul.list {
    list-style-type: none;
    padding-left: 20px;
    li {
        color: $color-secondary; 
        &:before {
            display: none;
            font-family: 'Font Awesome 5 Solid';
            content: "\f105";
            color: $color-secondary;
        }
        .svg-inline--fa {
            margin-right: 0.5em;
        }        
    }
}

/* Breadcrumb */
body > div.container-fluid > nav {
    @media (min-width: 576px) {
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

.hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border-top: 1px solid #dee2e6;
}

.pdf-btn {
    margin: .2rem;
}



/*.accordion {
    &>.card {
        .card-header {
            h2 > button.btn-link {
                font-size: 1.8rem;
                padding: 0;
            }        
            a.btn {
                margin-bottom: 0!important;
            }

        }        
    }
}
*/

.dropdown {
    &.lang {
        font-size: .9rem;
        img {
            width: 18px;
        }
        .dropdown-menu {
            left: auto;
            right: 0;   
            font-size: 0.8rem;
        }
    }
}


// Custom plugin chosen
.chosen-container-multi {
    .chosen-choices {
        height: auto;
        padding: .2rem .5rem;
        color: #495057;
        background-color: #fff;
        border: 1px solid #becad6;
        font-weight: 300;
        will-change: border-color,box-shadow;
        border-radius: .375rem;
        box-shadow: none;
        transition: box-shadow 250ms cubic-bezier(.27,.01,.38,1.06),border 250ms cubic-bezier(.27,.01,.38,1.06);
        background-image: none;
    }
}

.badge_doc {
    font-size: .8rem;
    line-height: 1.3;
    span {
        width:10px;
        height:10px;
        border-radius:50%;
        display:inline-block;
    }
    
}

@media (max-width: 575px) {
    .card-body {
        padding: 1rem;
    }
}

.bg-cyan,
.bg-teal,
.bg-amber{
    .card {
        background-color: rgba(255,255,255,.7);
    }    
}
.bg-cyan {
    background-color: $cyan-light;
}
.bg-teal {
    background-color: $teal-light;
}
.bg-amber {
    background-color: $amber-light;
}
.bg-green {
    background-color: $green-light;
}
.bg-red {
    background-color: $red-light;
}

.sort-form {
    &:hover {
        cursor: pointer;
    }
}

.nav-tabs.planning {
    border-bottom: 0;
    .nav-item.show .nav-link, .nav-link.active {
        color: white!important;
        background-color: #212529;        
        font-weight: bold;
        border: none;
    }
    .nav-item {
        /*margin-bottom: 0;*/
        .nav-link {
            border-color: transparent;
            color: #212529;  
            &:hover {
                border-color: #212529;
            }
        }
    }
}

.bg-infogradient {
    background: rgb(0,184,216);
    background: linear-gradient(135deg, rgba(255,180,0,1) 0%, rgba(255,180,0,1) 50%, rgba(0,184,216,1) 50%, rgba(0,184,216,1) 100%);
}

@media (min-width: 992px) {
    .modal-xl {
        max-width: 800px;
    }
}

@media (min-width: 1200px) {
    .modal-xl {
        max-width: 1140px;
    }
}

/** NOTIFICATIONS **/

.dropdown-notifications {
    position: relative;
    &:after {
        display: none;
    }
}
.badge-counter {
    position: absolute;
    transform: scale(.8);
    transform-origin: top right;
    right: 5px;
    margin-top: -0.25rem;
    padding: .25em .4em
}
.dropdown-list-notifications {
    width: 20rem;
    padding: 0;
    border-radius: .5rem;
    .dropdown-header {
        text-transform: uppercase;
        background-color: #4e73df;
        border: 1px solid #4e73df;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        color: #fff;     
        border-top-left-radius: .375rem;
        border-top-right-radius: .375rem;
        font-size: .8rem;
    }
    .dropdown-item {
        white-space: normal;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        border-left: 1px solid #e3e6f0;
        border-right: 1px solid #e3e6f0;
        border-bottom: 1px solid #e3e6f0;
        line-height: 1.3rem;
    }
    .dropdown-footer {
        border-bottom-left-radius: .375rem;
        border-bottom-right-radius: .375rem;        
    }

}

article.notification {
    a.card {
        display: block;
        margin: 1.5rem 0 .5rem 0;
        color: inherit;
        transition: all 250ms cubic-bezier(.27,.01,.38,1.06);
        box-shadow: 0 .125rem .25rem rgba(33,37,41,.15);
        &:hover {
            box-shadow: 0 .5rem 1rem rgba(33,37,41,.15);
            text-decoration: none;
        }
        &.unpublished {
            opacity: .3;
        }        
        
    }
    h2 {
        font-weight: 600;
        font-size: 1.4rem;
    }
    &.read {
        h2 {
            font-weight: 400;
        }
    }

    .operations {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        justify-content: center;
        margin: 1rem 0;
    }
    
}

.custom-file.easyp-custom-file {
    height: 10rem;
    .custom-file-label, .custom-file-input {
        height: 10rem;
        display: flex;
        justify-content: center;
        align-items: flex-end;
    }
    .custom-file-label {
        &::after {
            display: none;
        }
        border-width: 2px;
        border-style: dashed;     
        background-image: url('https://assets.easyp.fr/img/file-arrow-up-solid.svg');
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 30px 40px;
    }    
    .custom-file-input[accept='image/*']+label {
        background-image: url('https://assets.easyp.fr/img/image-regular.svg');
        background-size: 45px 45px;
    }
    
    &.single-file {
        height: 7rem; // mettre 9 rem en JS
        .custom-file-label, .custom-file-input {
            height: 7rem;
        }     
        .custom-file-label {
            background-position: center 1rem;
        }    
    }
}


// Veille réglementaire
.reglementation-texte {
    font-weight: bold;
    font-size: .85rem;
}

// REX
.sites-selection {
    height: 300px;
    overflow-y: auto;
    background-color: white;
    padding: .75rem;
    border: 1px solid #becad6;
    border-radius: .375rem;
    margin-bottom: 2rem;
    ul {
        list-style-type: none;
        margin-bottom: 0;
        padding-left: 0;
        li {
            font-size: .9rem;
            line-height: 1;
            &:before {
                content: '✓ ';
                color: green;
                font-size: 1.2rem;
            }
        }
    }
    
}
.rex-questions {
    .question {
        border-bottom: 1px solid rgba(0,0,0,.1);
        margin-bottom: 1rem;
    }
    .question_num {
        text-transform: uppercase;
        font-size: 1rem;
        font-weight: bold;
        color: #007bff;
    }
    label {
        color: #212529;
    }
    .custom-select:disabled,
    .form-control:disabled,
    .form-control[readonly] {
        color: #212529;
        background-color: white;        
    }
}

.fa-info-circle {
    display: none;
}

.pulse {
    display: inline-block;
    -webkit-animation-name: pulse;
    animation-name: pulse;
    -webkit-animation-duration: 2s;
    animation-duration: 2s;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }

}


.text-orange {
    color: $orange-light;
}

.modal-orange {
    color: white;
    .modal-title {
        color: white;
    }
    .modal-header, .modal-body, .modal-footer {
        background-color: $orange-light;
    }
    
}

.container-installation-items {
    display: flex;
    justify-content: space-evenly;
    gap: 2rem;
    flex-wrap: wrap;
    .card {
        flex: 0 0 280px;
        .card-header {
            padding: 1.2rem 1rem;
            text-align: center;
            position: relative;
            .number {
                display: block;
                font-size: 1.8rem;
                line-height: 1;
            }
            .label {
                font-size: 1.1rem;
                font-weight: bold;
                line-height: 1.2;
            }
            .badge-nouveau {
                position: absolute;
                top: -15px;
                left: -8px;
                font-size: .75rem;
                border: 3px solid #fafafa;
                font-weight: bold;
                padding: .4rem .7rem;
            }
        }
        @media(max-width:1600px) {
            flex: 0 0 250px;
        }
        @media(max-width:1430px) {
            flex: 0 0 280px;
        }       
        @media(max-width:1250px) {
            flex: 0 0 300px;
        }  
        @media(max-width:1020px) {
            flex: 0 0 250px;
        }   
        @media(max-width:767px) {
            flex: 0 0 300px;
        }       
        @media(max-width:575px) {
            flex: 0 0 100%;
        }          
    }
}
@media (max-width: 1600px) {
    .container-installation-items .card {
        flex: 0 0 250px; } }
@media (max-width: 1430px) {
    .container-installation-items .card {
        flex: 0 0 280px; } }
@media (max-width: 1250px) {
    .container-installation-items .card {
        flex: 0 0 300px; } }
@media (max-width: 1020px) {
    .container-installation-items .card {
        flex: 0 0 250px; } }
@media (max-width: 767px) {
    .container-installation-items .card {
        flex: 0 0 300px; } }
@media (max-width: 575px) {
    .container-installation-items .card {
        flex: 0 0 100%; } }
@media (min-width: 1400px) {
    .flex-xxl-row {
        flex-direction: row !important;
    }
    .flex-xxl-column {
        flex-direction: column !important;
    }
    .order-xxl-1 {
        order: 1;
    }
    .order-xxl-2 {
        order: 2;
    }
    .col-xxl-1 {
        flex: 0 0 8.33%;
        max-width: 8.33%;
    }

    .col-xxl-2 {
        flex: 0 0 16.66%;
        max-width: 16.66%;
    }

    .col-xxl-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-xxl-4 {
        flex: 0 0 33.33%;
        max-width: 33.33%;
    }

    .col-xxl-5 {
        flex: 0 0 41.66%;
        max-width: 41.66%;
    }

    .col-xxl-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-xxl-7 {
        flex: 0 0 58.33%;
        max-width: 58.33%;
    }

    .col-xxl-8 {
        flex: 0 0 66.66%;
        max-width: 66.66%;
    }

    .col-xxl-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }

    .col-xxl-10 {
        flex: 0 0 83.33%;
        max-width: 83.33%;
    }

    .col-xxl-11 {
        flex: 0 0 91.66%;
        max-width: 91.66%;
    }

    .col-xxl-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .padding-xxl-3 {
        padding :0.1rem 1rem!important;
    }
    .offset-xxl-0 {
        margin-left: 0;
    }
    .justify-content-xxl-start{
        justify-content: flex-start!important;

    }
}
.text-dossier {
    font-size: 16px; /* This is default font size when the viewport is less than 576px */
}

@media (min-width: 576px) {
    .text-dossier {
        font-size: 18px; /* font size for screen sizes greater than 576px */
    }
}

@media (min-width: 768px) {
    .text-dossier {
        font-size: 20px; /* font size for screen sizes greater than 768px */
    }
}

@media (min-width: 992px) {
    .text-dossier {
        font-size: 17px; /* font size for screen sizes greater than 992px */
    }
}

@media (min-width: 1200px) {
    .text-dossier {
        font-size: 0.8rem; /* font size for screen sizes greater than 1200px */
    }
}
ol.cgu-steps {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    justify-content: space-between;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 6rem;
    margin-bottom: 3rem;
    position: relative;
    &:after {
        content: '';
        display: block;
        width: 70%;
        height: 1px;
        background-color: rgba( 0, 0, 0 , 0.1);
        position: absolute;
        left: 0;
        right: 0;
        top: -28px;
        margin-left: auto;
        margin-right: auto;        
    }
    li {
        text-align: center;
        position: relative;
        line-height: 1.2;
        font-size: .9rem;
        color: #6D6D6D;
        &:before {
            position: absolute;
            left: 0;
            right: 0;
            margin-left: auto;
            margin-right: auto;
            top: -3.7rem;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: 10px solid #fafafa;
            background-color: #6D6D6D;
            line-height: 40px;
            font-weight: bold;
            color: white;
            z-index: 2;
        }
        &:nth-child(1) {
            &:before {
                content: "1";
            }
        }
        &:nth-child(2) {
            &:before {
                content: "2";
            }
        }            
        &.active {
            color: #007bff;
            &:before {
                background-color: #007bff;
            }            
        }
        &.checked {
            &:before {
                content: "✓";
                background-color: #17c671;
            }
        }   
    }
}

// Select 2
.select2-container .select2-selection--single {
    height: calc(2.425rem + 2px);
    border-color: #becad6;
    border-radius: .375rem;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(2.425rem + 2px);
}

.updateDateMesModal {
    ul.list-group.list-group-flush {
        li {
            padding: .3rem .6rem;
            font-size: .8rem;
            .custom-control-label {
                vertical-align: middle;
            }
            span {
                padding-right: .8rem;
            }
        }
        
    }
}

.img-apercu {
    position: absolute;
    left: 0; 
    right: 0; 
    top: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    padding: 4px 4px 0 4px;
    margin-bottom: 16px;
    img {
        width: 100%;
        height: 100%;
        /*opacity: .4;*/
        object-fit: contain;
    }

}

.dropdown-toggle.no-after::after {
    display: none;
}

table.first_thead_hidden > thead:nth-child(1) {
    display: none;
}

table.first_thead_hidden {
    &> thead:nth-child(1) {
        display: none;
    }
    th {
        vertical-align: middle;
    }
}

.table-sm {
    font-size: .8rem;
}
.td-action {
    &:hover {
        cursor: pointer;
    }
}

td.td-vertical-info {
    padding-left: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.container-vertical-info {
    display: flex;
}

.vertical-info {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    background-color: violet;
    padding: 8px 4px;
    font-size: .6rem;
    color: white;
    text-align: center;
    &:hover {
        color: white;
        text-decoration: none;
    }
}

.bg-violet-gradient {
    background: rgb(171,71,188);
    background: linear-gradient(90deg, rgba(171,71,188,1) 0%, rgba(123,31,162,1) 100%);
}

.btn-violet {
    background-color: rgb(171,71,188);
    color: white;
    &:hover {
        background-color: rgb(123,31,162);
        color: white;        
        box-shadow: 0 5px 15px rgba(0,0,0,.05),0 4px 10px rgba(123,31,162,.25);
    }
}

.table-carte-deplacement-wrapper {
    max-height: 350px;
    overflow-y: auto;
}

.table-carte-deplacement {
    td, th {
        border: 1px solid #becad6;
        padding: 2px 4px;
    }
    th {
        font-weight: normal;
        background-color: #e9ecef;
    }
}

.custom-popup-carte {
    width: 450px;
    .leaflet-popup-content {
        margin-left: 12px;
        margin-right: 12px;
        width: 426px!important;
    }
}

.btn-action {
    width: 21px;
    height: 21px;
    cursor: pointer;
    margin: 0 auto;
}
.btn-note {
    i {
        font-size: 20px;
    }
}

.video-header-container {
    position: relative;
    width: 100%; /* La vidéo prendra toute la largeur de son conteneur */
    padding-top: 21%; /* Ajuste la hauteur en fonction du ratio de la vidéo */
    overflow: hidden; /* Coupe tout débordement éventuel */
    video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%; /* La vidéo s'ajuste à la largeur du conteneur */
        height: 100%; /* Maintient la hauteur proportionnelle */
        object-fit: cover; /* Assure que la vidéo remplit l'espace tout en respectant le ratio */
    }
}

.btn-orange {
    background-color: $orange;
    color: white;
    &:hover {
        color: white;
        background-color: $orange-light;
    }
}

.container-export-papier {
    max-width: 1000px;
    margin: 0 auto;
    
}
.table-export-papier {
    th, td {
        vertical-align: middle;
    }
    td.td-size,
    td.td-sous-total {
        text-align: right;
        width: 90px;
        span.size {
            display: none;
        }
    }
    td.td-sous-total {
        font-weight: bold;
    }
    td.td-checkbox {
        width: 40px;
        padding-top: 0;
        padding-bottom: 0;
        .custom-control {
            margin: 0 5px;
            padding-left: 0;
        }
    }
}

.gap-1 {
    gap: ($spacer * .25) !important;
}
.gap-2 {
    gap: ($spacer * .5) !important;
}
.gap-3 {
    gap: $spacer !important;
}
.gap-4 {
    gap: ($spacer * 1.5) !important;
}
.gap-5 {
    gap: ($spacer * 3) !important;
}

.no-caret::after {
    display: none !important;
}

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

#table-wo {
    /* On prend 100% de la hauteur de l'écran (100vh), auxquels on soustrait 
       la hauteur approximative du header, des filtres et du footer (ici 320px). */
    max-height: calc(100vh); 
    overflow-y: auto;

    thead th {
        position: sticky;
        top: -1px;
        z-index: 10;
        background-color: #f8f9fa;
        background-clip: padding-box;
        box-shadow: inset 0 1px 0 #dee2e6, inset 0 -2px 0 #dee2e6;
    }
}