/* -------------------------------------------------------------------------- */
/*                                CSS Personnalisé                            */
/* -------------------------------------------------------------------------- */

.calendar .calendar-day {
    padding: 0.75rem;
}

.data-table thead th {
    cursor: pointer;
}

.card .card-download-btn {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
}

.card:hover > .card-download-btn {
    display: block;
}

/** Permet d'enlever la petite flèche du dropdown */
#add-row-button::after {
    display: none;
}

.column-grid-link {
    border: none;
}

.column-grid-link:hover .grid-bg {
    background-color: rgb(146, 241, 68) !important;
    color: #000000;
    transition: background-color 1s ease;
}

.row-control-buttons {
    top: 10px; /* Ajuster selon la marge supérieure désirée */
    bottom: 10px; /* Ajuster selon la marge inférieure désirée */
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    height: calc(
        100% - 20px
    ); /* Ajuster si nécessaire pour la hauteur totale de la rangée */
}

.row-control-buttons a {
    font-size: 16px; /* Ajuster selon la taille désirée des icônes */
    display: flex;
}

.cursor-move {
    cursor: move !important;
}

.cursor-help {
    cursor: help !important;
}

.cursor-interdit {
    cursor: not-allowed !important;
}

disabled:hover {
    cursor: not-allowed !important;
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    justify-content: start !important;
}

.text-truncate {
    max-width: 250px; /* Ajustez selon vos besoins */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-row {
    position: relative;
    padding-left: 30px; /* Espace pour le panneau de contrôle de rangée, ajuster selon le besoin */
}

.alert-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999; /* Assure que le message reste au-dessus des autres éléments */
    background-color: #f8d7da; /* Couleur de fond pour alert-danger de Bootstrap */
    color: #721c24; /* Couleur de texte pour alert-danger de Bootstrap */
    border-color: #f5c6cb; /* Bordure pour alert-danger de Bootstrap */
    padding: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Optionnel: Ajoute une ombre pour mieux voir l'alerte */
}

.CodeMirror {
    height: auto;
    min-height: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.sql-toolbar {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.blocnote {
    background-color: #fff8bb;
    color: #000000;
}

.blocnote:focus {
    background-color: #fff8bb;
    color: #000000;
}

.nbNotifSuperieur100 {
    font-size: 0.5rem;
}

.nbNotifSuperieur999 {
    font-size: 0.40rem;
}

fieldset legend {
    color: #2362b7;
    width: auto;
}

fieldset {
    border: 1px solid #2362b7;
    padding: 10px;
}

.dropzone:hover {
    border: 2px dashed #0056b3 !important;
}

.dropzone {
    background: none !important;
}

.dropzone .dz-preview.dz-image-preview {
    background: none !important;
}

.excalidraw .dropdown-menu{
    display: unset !important;
    padding: unset !important;
}

#tableaublanc-container section {
    padding: 0 !important;
}

.custom-no-result-picker {
    background-color: #dadada !important;
    color: #dc3545 !important;
    padding: 10px !important;
    font-weight: bold !important;
    text-align: center !important;
    border: 1px solid #dc3545 !important;
    border-radius: 4px !important;
}

.bootstrap-select .no-results {
    background: #f5f5f5 !important;
    color: #dc3545 !important;
    padding: 10px !important;
    margin: 0 5px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    top: 50% !important;
    left: 5px !important;
    height: 1em !important;
    width: 1em !important;
    margin-top: -9px !important;
    display: inline-block !important;
    color: white !important;
    border: .15em solid white !important;
    border-radius: 1em !important;
    box-shadow: 0 0 .2em #444 !important;
    box-sizing: content-box !important;
    text-align: center !important;
    text-indent: 0 !important;
    font-family: "Courier New", Courier, monospace !important;
    line-height: 1em !important;
    content: "+" !important;
    background-color: #31b131 !important;
}

table.dataTable.dtr-inline.collapsed>tbody>tr.dtr-expanded>td.dtr-control:before,
table.dataTable.dtr-inline.collapsed>tbody>tr.dtr-expanded>th.dtr-control:before{
    top: 50% !important;
    left: 5px !important;
    height: 1em !important;
    width: 1em !important;
    margin-top: -9px !important;
    display: inline-block !important;
    color: white !important;
    border: .15em solid white !important;
    border-radius: 1em !important;
    box-shadow: 0 0 .2em #444 !important;
    box-sizing: content-box !important;
    text-align: center !important;
    text-indent: 0 !important;
    font-family: "Courier New", Courier, monospace !important;
    line-height: 1em !important;
    content: "-" !important;
    background-color: #d33333 !important;
}

fieldset:hover {
    background-color: rgba(13, 110, 253, 0.02);
}

fieldset:hover legend {
    font-weight: 600;
}

.card-header[data-fermable="true"] {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.card-header[data-fermable="true"]:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.card-header[data-fermable="true"] i {
    transition: transform 0.3s ease;
}

.card-header[data-fermable="true"] i.fa-minus {
    transform: rotate(180deg);
}

[data-bs-theme=dark] input[readonly]:not(input[type="hidden"].flatpickr-input + input[readonly]) {
    background-color: #343a40 !important;
    color: #fff !important;
}

[data-bs-theme=light] input[readonly]:not(input[type="hidden"].flatpickr-input + input[readonly]) {
    background-color: #e4e4e4 !important;
    color: #000 !important;
}

.pdf-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #2C3E50;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body.swal2-shown > [aria-hidden='true'] {
    transition: 0.1s filter;
    filter: blur(3px);
}

@media screen and (max-width: 767px) {
    .table-cards thead { 
        display: none; 
    }
    
    .table-cards,
    .table-cards tbody,
    .table-cards tr {
        display: block;
        width: 100%;
    }
    
    .table-cards tr {
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.5rem;
        padding: 1rem;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        max-width: 100%;
        overflow: hidden;
        position: relative;
    }
    
    /* Styles pour le titre de la card */
    .table-cards .card-title {
        font-weight: bold;
        font-size: 1.1em;
        margin: -1rem -1rem 1rem -1rem;
        padding: 1rem;
        background: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .table-cards .toggle-icon {
        transition: transform 0.3s ease;
        display: inline-block;
    }

    /* Content container pour l'animation */
    .table-cards .card-content {
        transition: max-height 0.3s ease-out;
        overflow: hidden;
        max-height: 2000px;
    }

    .table-cards tr.collapsed .card-content {
        max-height: 0;
        overflow: hidden;
    }
    
    .table-cards td {
        display: flex;
        padding: 0.25rem 0;
        border: none !important;
        align-items: flex-start;
        min-width: 0;
        text-align: left !important;
        padding-left: 0 !important;
        /* Ajout de ces propriétés */
        flex-wrap: wrap;
        gap: 0.5rem; /* Espace entre les éléments */
    }
    
    .table-cards td::before {
        content: attr(data-label);
        font-weight: bold;
        color: rgb(117, 117, 117);
        width: 140px;
        min-width: 140px;
        flex-shrink: 0;
        padding-right: 1rem;
        text-align: left;
    }
    
    .table-cards td .td-content {
        flex: 1;
        min-width: 0;
        overflow: auto;
        text-overflow: unset;
        word-wrap: break-word;
        text-align: left !important;
    }

    .table-cards .td-content:has(button) {
        overflow: visible;
    }
    
    .table-cards .actions-cell {
        justify-content: flex-end;
        padding-top: 1rem;
        margin-top: 0.5rem;
        border-top: 1px solid #dee2e6 !important;
    }
    
    .table-cards .actions-cell::before {
        display: none;
    }

    .table-cards tfoot {
        display: block;
        width: 100%;
        margin-top: 1rem;
    }

    .table-cards tfoot tr {
        background-color: #f8f9fa;
        padding: 0.5rem; /* Ajout d'un peu de padding */
    }

    .table-cards tfoot td::before {
        content: attr(data-label);
        font-weight: bold;
        color: rgb(117, 117, 117);
        width: 185px;
        min-width: 185px;
        flex-shrink: 0;
        padding-right: 1rem;
        text-align: left !important;
        white-space: nowrap; /* Empêche le retour à la ligne */
        overflow: hidden; /* Au cas où */
        text-overflow: ellipsis; /* Au cas où */
    }

    .table-cards tfoot td {
        display: flex;
        padding: 0.05rem 0.05rem; /* Ajout de padding horizontal */
        border: none !important;
        align-items: center; /* Changed from flex-start */
        min-width: 0;
        gap: 0.5rem; /* Ajoute un espacement entre label et contenu */
    }

    .table-cards tfoot td .td-content {
        flex: 1;
        min-width: 0;
        font-weight: bold;
        color: #000;
        text-align: right !important; /* Aligne les valeurs à droite */
    }

    /* Cache les cellules sans data-label dans le tfoot */
    .table-cards tfoot td:not([data-label]) {
        display: none;
    }

    /* Assure que seules les cellules avec data-label sont visibles */
    .table-cards tfoot td[data-label] {
        display: flex;
        margin: 0; /* Reset des marges */
    }
}

.dropdown-menu.dropdown-menu-end {
    z-index: 1050;
}

/* PRELOADER QUAND LA PAGE EST EN CHARGEMENT */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
  }
  
  #preloader.hide {
    opacity: 0;
    pointer-events: none;
  }
  
  .spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .dot1, .dot2, .dot3 {
    width: 16px;
    height: 16px;
    background-color: #4285f4;
    border-radius: 50%;
    margin: 0 6px;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
  }
  
  .dot1 {
    animation-delay: -0.32s;
    background-color: #f07d00;
  }
  
  .dot2 {
    animation-delay: -0.16s;
    background-color: #7e4100;
  }
  
  .dot3 {
    background-color: #030d05;
  }
  
  .loading-text {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    color: #555;
    margin-top: 10px;
  }
  
  @keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
  }
  
  /* Style supplémentaire pour l'animation de disparition */
  @keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
  }
  /* FIN PRELOADER */