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

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

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

.champ-date-periode {
	width: auto;
	max-width: 175px;
}

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

.bg-purple {
    background-color: #7f00ff !important;
}

.text-purple {
    color: #7f00ff !important;
}

.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;
}

.petite-alerte {
    padding: 3px;
    font-size: 12px;
}

.petite-alerte .fas {
    font-size: 14px !important;
    margin-right: 5px !important;
}

.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: #c7042c;
  }
  
  .dot2 {
    animation-delay: -0.16s;
    background-color: #223174;
  }
  
  .dot3 {
    background-color: #0e1943;
  }
  
  .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 */

.bg-gris {background-color: #b2b2b2 !important;}

.dropzone .dz-preview {
    margin: 12px !important;
}

 /* Styles pour la zone d'upload - Version améliorée */
 .upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
    position: relative;
}

/* Input réel, posé sur la zone. Pas de display:none : sinon Android recharge la page. */
.upload-zone-input {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
}

.upload-zone:hover {
    border-color: #0d6efd;
    background-color: #e7f3ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.1);
}

.upload-content {
    color: #6c757d;
    pointer-events: none; /* Empêche les éléments enfants d'intercepter les clics */
}

.upload-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.upload-zone:hover .upload-content i {
    transform: scale(1.1);
}

.upload-content h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-content p {
    margin-bottom: 1rem;
}

/* Animation pour la zone d'upload */
.upload-zone.dragover {
    border-color: #198754;
    background-color: #d1ecf1;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(25, 135, 84, 0.2);
}

.upload-zone.dragover .upload-content {
    color: #198754;
}

.upload-zone.dragover .upload-content i {
    color: #198754 !important;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 576px) {
    .upload-zone {
        padding: 1.5rem 1rem;
    }

    .upload-content i {
        font-size: 2.5rem;
    }
    
    .upload-content h6 {
        font-size: 1rem;
    }
    
    .upload-content p {
        font-size: 0.875rem;
    }
}

/* Animation de pulsation pour attirer l'attention */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}

.upload-zone:active {
    animation: pulse-border 0.6s ease-out;
}

/* Style pour la zone d'upload désactivée */
.upload-zone-disabled {
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
}

.upload-zone-disabled .upload-content {
    color: #6c757d !important;
}

.upload-zone-disabled .upload-content i {
    color: #6c757d !important;
}

.upload-zone-disabled:hover {
    border-color: #dee2e6 !important;
    background-color: #f8f9fa !important;
    transform: none !important;
    box-shadow: none !important;
}

.upload-zone-compact {
    padding: 0.75rem 0.5rem;
    margin-bottom: 0.5rem;
}

.upload-zone-compact .upload-content i {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}

.upload-zone-compact .upload-content h6 {
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.upload-zone-compact .upload-content p {
    margin-bottom: 0.25rem;
}

/* Just common table stuff. Really. */
.tableFixHead table { border-collapse: collapse; width: 100%; }

.tableFixHead {
    overflow: auto;
    height: 600px;
}

.tableFixHead table {
    border-collapse: collapse;
    width: 100%;
}

#formEntretien table {
    font-size: 0.8rem;
}

.tableFixHead thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* .tableFixHead th {
    background: #878787;
} */

/* Ajoutez ceci pour gérer les rowspans */
.tableFixHead thead tr:nth-child(1) th {
    position: sticky;
    top: 0;
}

.tableFixHead thead tr:nth-child(2) th {
    position: sticky;
    top: 30px; /* Ajustez cette valeur en fonction de la hauteur de votre première ligne d'en-tête */
}

@media (max-width: 991px) {
    .modal .modal-title {
        font-size: 0.95rem !important;
    }

    .modal .modal-subtitle  {
        display: none !important;
    }
}

@media (max-width: 1356px) {
    .titre-thead-formation {
        display: none !important;
    }
}

/* Styles pour la colonne fixe des salariés dans les formations */
.tableFixHead th:first-child,
.tableFixHead td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 10 !important;
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
}

.tableFixHead thead th:first-child {
    z-index: 15 !important;
}

.tableFixHead tbody td:first-child {
    z-index: 5 !important;
}

/* Styles pour les badges de formation avec icône de configuration */
.formation-badge {
    position: relative;
    display: block;
    width: 100%;
    text-align: center;
}

@media (max-width: 991px) {
    .mbsc-calendar-header.mbsc-material {
        font-size: 11px !important;
    }
}

.formation-badge:hover .formation-config-icon {
    display: inline-block !important;
}

.formation-config-icon {
    font-size: 0.8em;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.formation-badge:hover .formation-config-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}


.mds-full-height {
    height: 100%;
  }
  
  .mds-search-calendar {
    border-left: 1px solid #ccc;
    overflow: hidden;
  }
  
  .mds-search-sidebar {
    width: 350px;
  }
  
  .mds-search-sidebar .mbsc-textfield-wrapper.mbsc-ios {
    margin-top: 27px;
    margin-bottom: 26px;
  }
  
  .mds-search-sidebar .mbsc-textfield-wrapper.mbsc-material {
    margin-top: 26px;
    margin-bottom: 26px;
  }
  
  .mds-search-sidebar .mbsc-textfield-wrapper.mbsc-windows {
    margin-top: 35px;
    margin-bottom: 35px;
  }
  
  @media (min-width: 1135px) {
    .mds-search-sidebar .mbsc-textfield-wrapper.mbsc-windows {
      margin-top: 40px;
      margin-bottom: 40px;
    }
  }

@media (max-width: 575px) {
    .card-body {
        padding: 6px !important;
    }
}

div.dropdown-menu.open { width: 100%; } ul.dropdown-menu.inner>li>a { white-space: initial; }

/* Styles compacts pour les offcanvas de filtres */
#filtresOffcanvasNotesFrais .offcanvas-body,
#filtresOffcanvasFormations .offcanvas-body,
#filtresOffcanvasNotesService .offcanvas-body {
    padding: 1rem 0.75rem !important; /* Réduire le padding */
}

/* Réduire l'espacement entre les groupes de formulaires */
#filtresOffcanvasNotesFrais .form-group,
#filtresOffcanvasFormations .form-group,
#filtresOffcanvasNotesService .form-group {
    margin-bottom: 0.75rem !important; /* Au lieu de mb-3 (1rem) */
}

/* Labels plus petits et compacts */
#filtresOffcanvasNotesFrais .form-label,
#filtresOffcanvasFormations .form-label,
#filtresOffcanvasNotesService .form-label {
    font-size: 0.875rem !important; /* Réduire la taille */
    margin-bottom: 0.25rem !important; /* Moins d'espace sous les labels */
    font-weight: 600 !important;
}

/* Inputs et selects plus compacts */
#filtresOffcanvasNotesFrais .form-control,
#filtresOffcanvasNotesFrais .form-select,
#filtresOffcanvasFormations .form-control,
#filtresOffcanvasFormations .form-select,
#filtresOffcanvasNotesService .form-control,
#filtresOffcanvasNotesService .form-select {
    font-size: 0.875rem !important; /* Texte légèrement plus petit */
    padding: 0.375rem 0.75rem !important; /* Padding réduit */
    height: calc(1.5em + 0.75rem + 2px) !important; /* Hauteur réduite */
}

/* Boutons radio plus compacts (pour formations) */
#filtresOffcanvasFormations .btn-group .btn {
    font-size: 0.875rem !important;
    padding: 0.375rem 0.75rem !important;
}

/* SelectPicker compacts */
#filtresOffcanvasNotesFrais .selectpicker,
#filtresOffcanvasFormations .selectpicker,
#filtresOffcanvasNotesService .selectpicker {
    font-size: 0.875rem !important;
}

/* Bouton submit plus compact */
#filtresOffcanvasNotesFrais .btn,
#filtresOffcanvasFormations .btn,
#filtresOffcanvasNotesService .btn {
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
}

/* Pour les écrans très petits, réduire encore plus */
@media (max-width: 576px) {
    #filtresOffcanvasNotesFrais .offcanvas-body,
    #filtresOffcanvasFormations .offcanvas-body,
    #filtresOffcanvasNotesService .offcanvas-body {
        padding: 0.75rem 0.5rem !important;
    }
    
    #filtresOffcanvasNotesFrais .form-group,
    #filtresOffcanvasFormations .form-group,
    #filtresOffcanvasNotesService .form-group {
        margin-bottom: 0.5rem !important;
    }

    .offcanvas-end {
        max-width: -webkit-fill-available !important;
    }

    .content .container-fluid {
        padding: 0 !important;
    }
}

.mbsc-calendar-today.mbsc-selected .mbsc-calendar-cell-text {
    color: white !important;
}

.mbsc-material.mbsc-calendar-cell-text:not(.mbsc-calendar-today) {
    /* color: rgba(var(--falcon-gray-900-rgb), var(--falcon-text-opacity)) !important;  */
}

@media (max-width: 768px) {
    .mbsc-material.mbsc-calendar-cell-text:not(.mbsc-calendar-today) {
        font-size: 9px;
    }

    .mbsc-material.mbsc-calendar-label-inner {
        font-size: 8px;
    }

    .planning-event-intitule-grille {
        font-size: 7px !important;
    }

    .btn.btn-sm.btn-falcon-default {
        padding: 2px;
        font-size: 10px;
        height: 35px;
    }

    .btn.btn-sm.btn-falcon-default i {
        display: none;
    }

    .btn.btn-sm.btn-falcon-primary {
        padding: 2px;
        font-size: 10px;
        height: 35px;
    }

    .btn.btn-sm.btn-falcon-primary i {
        display: none;
    }
}

.mbsc-material.mbsc-eventcalendar {
    --falcon-card-bg: var(--falcon-emphasis-bg) !important;
    background: none !important;
    color: rgba(var(--falcon-gray-900-rgb), var(--falcon-text-opacity)) !important;
}

.mbsc-calendar-controls .mbsc-flex .mbsc-material {
    color: rgba(var(--falcon-gray-900-rgb), var(--falcon-text-opacity)) !important;
}

.mbsc-calendar-button {
    color: rgba(var(--falcon-gray-900-rgb), var(--falcon-text-opacity)) !important;
}

.mbsc-calendar-week-day {
    color: rgba(var(--falcon-gray-900-rgb), var(--falcon-text-opacity)) !important;
    --falcon-card-bg: var(--falcon-emphasis-bg) !important;
    background: none !important;
}

.mbsc-material.mbsc-calendar-picker-slide, .mbsc-material.mbsc-calendar-slide {
    color: rgba(var(--falcon-gray-900-rgb), var(--falcon-text-opacity)) !important;
    --falcon-card-bg: var(--falcon-emphasis-bg) !important;
    background: none !important;
}

.mbsc-material.mbsc-event-day.mbsc-list-header, .mbsc-material.mbsc-schedule-date-header {
    color: rgba(var(--falcon-gray-900-rgb), var(--falcon-text-opacity)) !important;
    --falcon-card-bg: var(--falcon-emphasis-bg) !important;
    background: none !important;
}

.signature-pad {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    font-size: 10px;
    width: 100%;
    height: 300px; /* Hauteur fixe pour permettre au canvas de s'afficher */
    max-width: 700px;
    max-height: 460px;
    border: 1px solid #e8e8e8;
    background-color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.08) inset;
    border-radius: 4px;
    padding: 16px;
  }
  
  .signature-pad::before,
  .signature-pad::after {
    position: absolute;
    z-index: -1;
    content: '';
    width: 40%;
    height: 10px;
    bottom: 10px;
    background: transparent;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
  }
  
  .signature-pad::before {
    left: 20px;
    -webkit-transform: skew(-3deg) rotate(-3deg);
    transform: skew(-3deg) rotate(-3deg);
  }
  
  .signature-pad::after {
    right: 20px;
    -webkit-transform: skew(3deg) rotate(3deg);
    transform: skew(3deg) rotate(3deg);
  }
  
  .signature-pad--body {
    position: relative;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    border: 1px solid #f4f4f4;
    border-radius: 4px;
  }
  
  .signature-pad--body.empty {
    background-color: #333;
  }

  .UtilisateurPlanning {
    background-color: var(--falcon-quaternary-bg);
  }
  
  .signature-pad--body canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.02) inset;
  }
  
  .signature-pad--footer {
    color: #c3c3c3;
    text-align: center;
    font-size: 1.2em;
    margin-top: 8px;
  }
  
  .signature-pad--actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    margin-top: 8px;
  }
  
  .signature-pad--actions .column {
    padding: 0.1em;
  }
  
  .signature-pad--actions .button {
    margin: 0.2em;
  }

  .bloc-historique-coefficients,
  .bloc-historique-taux-horaires {
    height: 180px;
    overflow-y: auto;
  }

  .clignote {
    animation: clignote 1s infinite;
  }

  .bs-actionsbox .actions-btn {
    font-size: 10px !important;
  }
  
  @keyframes clignote {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
  }
  
  @media (max-width: 480px) {
    .signature-pad--actions .button {
      display: block;
      width: 100%;
      min-height: 2em;
    }
  }

/* Styles modernes et responsive pour le formulaire de congé */
#formConge .user-info-card {
    background: #f8f9fa;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #495057;
}

#formConge .user-info-item {
    /* display: flex;
    align-items: center; */
    padding: 0.75rem 0;
    gap: 0.5rem;
}

#formConge .user-info-item i {
    font-size: 1.1rem;
    opacity: 0.9;
    min-width: 20px;
}

#formConge .user-info-item .label {
    font-size: 0.875rem;
    opacity: 0.85;
    margin-right: 0.5rem;
}

#formConge .user-info-item .value {
    font-weight: 600;
    font-size: 0.95rem;
}

#formConge .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

#formConge .form-section label {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#formConge .form-section label i {
    color: #667eea;
    font-size: 0.9rem;
}

#formConge .form-control, #formConge .selectPickerMotif {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.625rem 0.75rem;
    transition: all 0.2s ease;
}

#formConge .form-control:focus, #formConge .selectPickerMotif:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#formConge .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

#formConge .form-check {
    margin: 0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#formConge .form-check-input {
    margin: 0;
    cursor: pointer;
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

#formConge .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

#formConge .form-check .form-check-input {
    margin-left: 0 !important;
}

#formConge .form-check-label {
    cursor: pointer;
    margin: 0;
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

#table-statistiques-formations td, #table-statistiques-formations th {
    padding: 0.30rem 0.30rem;
}

#table-statistiques-formations-internes td, #table-statistiques-formations-internes th {
    padding: 0.30rem 0.30rem;
}

/* Calendar base styles */
#tableau-formations .mbsc-timeline-grid,
#tableau-formations .mbsc-timeline-grid-scroll,
#tableau-formations .mbsc-schedule-grid-scroll {
    cursor: grab;
}
#tableau-formations.is-panning,
#tableau-formations.is-panning * {
    cursor: grabbing !important;
    user-select: none;
}   


/* Event title */
#tableau-formations .mds-event-simple-title {
    flex: 1;
    font-size: 10px;
    margin-right: 12px;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 16px;
}

/* Right side container */
#tableau-formations .mds-event-simple-right {
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
}

/* Date range */
#tableau-formations .mds-event-simple-date {
    font-size: 11px;
    line-height: 14px;
    opacity: 0.85;
    white-space: nowrap;
    margin-bottom: 2px;
    font-weight: 700;
}

/* Subtitle wrapper (avatar/dot + text) */
#tableau-formations .mds-event-simple-subtitle-wrapper {
    align-items: center;
}

/* Avatar for assignee in type view */
#tableau-formations .mds-event-simple-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}

/* Avatar for assignee in type view */
#tableau-formations .mds-event-grouping-event-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Resource rendering - Employees */
#tableau-formations .mds-event-grouping-avatar {
    width: 30px;
    height: 30px;
}

/* Colored dot for type in assignee view */
#tableau-formations .mds-event-simple-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}


/* Subtitle text (type or assignee name) */
#tableau-formations .mds-event-simple-subtitle {
    font-size: 9px;
    font-weight: 600;
}

/* Header controls */
#tableau-formations .mds-event-grouping-header-controls {
    align-items: center;
    gap: 8px;
}

/* Select input */
#tableau-formations .mds-event-grouping-select.mbsc-textfield {
    width: 210px;
}

#tableau-formations #event-zoom-level-slider {
    width: 140px;
}
#tableau-formations .mds-add-formation-popover {
    min-width: 230px;
}
#tableau-formations .mds-add-formation-popover .mds-add-formation-type-select {
    width: 100%;
    height: 25px;
}
#tableau-formations .mds-event-grouping-calendar .mds-proximity-lane-row {
    border-top-color: #fff !important;
}
#tableau-formations .mds-event-grouping-calendar .mbsc-timeline-resource.mds-proximity-lane-row,
.mds-event-grouping-calendar .mbsc-timeline-grid-row.mds-proximity-lane-row {
    border-top-color: #fff !important;
}

/* Client group title */
#tableau-formations .mds-event-grouping-title-text {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 20px;
    flex: 1;
    min-width: 0;
    margin-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#tableau-formations .mds-event-grouping-title {
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
}

/* Date range */
#tableau-formations .mds-event-grouping-date-range {
    color: #797979;
    font-size: 11px;
    line-height: 14px;
    white-space: nowrap;
    margin-bottom: 2px;
}

/* Event title */
#tableau-formations .mds-event-grouping-event-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    line-height: 18px;
    flex: 1;
    min-width: 0;
    margin-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#tableau-formations .mbsc-calendar-controls {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}

#tableau-formations .mds-event-simple {
    padding: 2px 2px;
    border-radius: 5px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 1px 2px rgba(0, 0, 0, 0.1);
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 8px;
    box-sizing: border-box;
    color: #2c2c2c;
    min-width:100px;
}

 /* Right side (date + detail) */
#tableau-formations .mds-event-grouping-event-right {
    flex-direction: column;
    align-items: flex-end;
    min-width: 80px;
}

#tableau-formations .mds-event-grouping-event-date {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    line-height: 14px;
    text-align: right;
    margin-bottom: 2px;
}

/* Detail container (avatar/dot + text) */
#tableau-formations .mds-event-grouping-event-detail {
    align-items: center;
    justify-content: flex-end;
}

#tableau-formations .mds-event-grouping-event-info {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
    line-height: 14px;
    text-align: right;
    text-transform: capitalize;
}

/* Colored dot for type in assignee view */
#tableau-formations .mds-event-grouping-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Grouped event - collapsed state */
#tableau-formations .mds-event-grouping-task-client {
    background-color: #f8f9fa;
    border-left: 4px solid;
    border-radius: 0 8px 8px 0;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    overflow: hidden;
}

#tableau-formations .mbsc-timeline-resource-title {
    font-size: 11px;
}

#tableau-formations .mds-event-grouping-type-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
    margin-top: 4px;
}

@media (max-width: 768px) {
    #tableau-formations .mbsc-timeline-resource-title {
        font-size: 9px;
    }
}

@media (max-width: 576px) {
    #formConge .user-info-item {
        padding: 0.5rem 0;
    }
    
    #formConge .form-section {
        padding: 1rem;
    }
    
    #formConge .checkbox-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #formConge .form-check {
        width: 100%;
        padding: 0.75rem;
    }
}


@media (max-width: 768px) {
    .mbsc-material.mbsc-timeline-resource {
        font-size: 10px;
    }

    .mbsc-material.mbsc-schedule-event-inner {
        font-size:10px;
    }

    /* Reduce the width of the resource column */
    .mbsc-timeline-resource-col {
        width: 80px !important;
    }

    .mbsc-material.mbsc-schedule-event-title {
        font-weight: 200 !important;
        font-size: 10px !important;
    }
}

/* Card de notification : ligne ciblée au-dessus du tableau */
.carte-ligne-notification {
    border-left: 4px solid #f5c442 !important;
}

.carte-ligne-notification .card-header {
    background-color: rgba(255, 236, 153, 0.55) !important;
}

html[data-bs-theme="dark"] .carte-ligne-notification .card-header {
    background-color: rgba(255, 214, 102, 0.18) !important;
}

/*
 * Tableaux de saisie des demandes diverses (trajet d'un ordre de mission, bénéficiaires, etc.).
 * Sur mobile et tablette, les champs gardent une largeur de saisie normale.
 * Seuls le padding et la police diminuent. Le défilement horizontal reste sur .table-responsive.
 */
@media (max-width: 1199.98px) {
    #formDemandeDiverse .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #formDemandeDiverse .table-responsive > table {
        width: max-content;
        min-width: 100%;
        table-layout: auto;
    }

    #formDemandeDiverse .table-responsive > table > thead > tr > th,
    #formDemandeDiverse .table-responsive > table > tbody > tr > td {
        width: auto !important;
        padding: 0.25rem;
        font-size: 0.75rem;
    }

    #formDemandeDiverse .table-responsive .form-control,
    #formDemandeDiverse .table-responsive .form-select {
        width: 12rem;
        min-width: 12rem;
        max-width: none;
        font-size: 0.8rem;
        padding: 0.15rem 0.4rem;
    }
}