/* barre de scrool des iframes */
/* Pour Chrome, Safari et Opera */
::-webkit-scrollbar {  
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--bs-dark);
  border-radius: var(--bs-border-radius);
}

/* Pour Firefox */
scrollbar-width: thin;
scrollbar-color: var(--bs-dark) var(--bs-light);

/* Pour Internet Explorer et Edge */
-ms-overflow-style: none;
scrollbar-face-color: var(--bs-light);
scrollbar-base-color: var(--bs-dark);




.ql-toolbar {
    z-index: 1000 !important;
}

.tagify__inline__suggestions {
    z-index: 9999 !important; /* Choisissez un nombre qui convient à votre situation */
}


/* suppresion de l'increment des input de type number */
/* Pour tous les navigateurs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Pour Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

.select2-valid .select2-selection {
    border-color: #50CD89 !important; /* Vert pour valide */
}

.select2-invalid .select2-selection {
    border-color: #F1416C !important; /* Orange pour non valide */
}

.select2-warning .select2-selection {
    border-color: #1B1B29 !important; /* Orange pour non valide */
}
    

.min-height-100vh {
    min-height: calc(100vh - 250px); /* Utilise la hauteur de la fenêtre de visualisation pour le minimum de hauteur */
    display: flex;
    flex-direction: column; /* Garde la direction du flux en colonne comme le comportement par défaut */
    justify-content: center; /* Centre verticalement le contenu */
}

.ql-size-10px { font-size: 10px; }
.ql-size-12px { font-size: 12px; }
.ql-size-14px { font-size: 14px; }
.ql-size-18px { font-size: 18px; }
.ql-size-24px { font-size: 24px; }
.ql-size-36px { font-size: 36px; }


/* 
   ============================
   GLOBAL READONLY-MODE
   ============================
   1) Tous les <input>, <select>, <textarea>, <button>, 
      ainsi que les .form-check (checkbox/radio Metronic) 
      et .btn... sont rendus "non-cliquables" et "non sélectionnables".
*/
/* ============================
   Lecture seule globale
============================ */

/* 1) Empêche le clic, etc. */
.readonly-mode input,
.readonly-mode select,
.readonly-mode textarea,
.readonly-mode button,
.readonly-mode .form-check-input,
.readonly-mode .form-check-label,
.readonly-mode .btn {
  pointer-events: none !important;
  user-select: none !important;
  cursor: default !important;
  opacity: 1 !important;
}

/* 2) Désactivation de Select2 (clic bloqué) */
.readonly-mode .select2-container,
.readonly-mode .select2-container * {
  pointer-events: none !important;
  user-select: none !important;
  cursor: default !important;
  opacity: 1 !important;
}

/* 3) Exceptions : éléments qui doivent rester cliquables malgré .readonly-mode */
.readonly-mode .ignore-readonly {
  pointer-events: auto !important;
  user-select: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

/* ============================
   Fond gris en lecture seule
   par défaut (thème clair)
============================ */
.readonly-mode .form-control,
.readonly-mode .form-select,
.readonly-mode .form-check-input {
  background-color: #F2F2F2 !important;
  color: #000 !important; /* texte noir */
}

/* ============================
   FOND ET TEXTE EN THÈME SOMBRE
   On cible TOUT ce qui doit être "foncé"
============================ */
[data-bs-theme="dark"] .readonly-mode .form-control,
[data-bs-theme="dark"] .readonly-mode .form-select,
[data-bs-theme="dark"] .readonly-mode .form-check-input,
[data-bs-theme="dark"] .readonly-mode .select2-container .select2-selection__rendered,
[data-bs-theme="dark"] .readonly-mode .select2-container .select2-selection--single,
[data-bs-theme="dark"] .readonly-mode .select2-container .select2-selection--multiple {
  background-color: #3B3B3B !important; /* gris foncé */
  color: #E0E0E0 !important;           /* texte clair */
}

/* OPTIONNEL : si vous voulez aussi régler la bordure des éléments en sombre */
[data-bs-theme="dark"] .readonly-mode .form-control,
[data-bs-theme="dark"] .readonly-mode .form-select,
[data-bs-theme="dark"] .readonly-mode .form-check-input,
[data-bs-theme="dark"] .readonly-mode .select2-container .select2-selection--single,
[data-bs-theme="dark"] .readonly-mode .select2-container .select2-selection--multiple {
  border-color: #555 !important; /* par exemple un gris un peu plus clair */
}

/* 
   2) Optionnel : si vous ne voulez plus du tout le "hover effect" 
      sur les boutons quand on survole, 
      vous pouvez remettre pointer-events, 
      ou forcer un style neutre sur :hover 
      (ex. background-color: initial) 
      Mais en général pointer-events: none 
      suffit pour désactiver le hover.
*/

/* Quand le bouton est en mode "recording", on le colore en rouge */
.tox-tbtn.recording {
  color: red !important;
  /* Vous pouvez aussi changer le fond, par ex:
  background-color: #ffe0e0 !important;
  border-color: red !important; */
}

.nav-link .small-number {
  font-size: 0.75rem; /* ou ce que tu veux */
  text-transform: none;
}


/* custom-navbar.css : avatar, emoji et espacements mobiles */

/* -------- Avatars et emoji -------- */
@media (max-width: 767.98px) {
	#kt_header_user_menu_toggle .symbol-40px {
		width: 40px !important;
		height: 40px !important;
	}
	#kt_header_user_menu_toggle img,
	#kt_header_user_menu_toggle .symbol-label {
		width: 40px !important;
		height: 40px !important;
		font-size: 1.25rem !important;   /* ≃ fs-2 */
	}
	#kt_header_user_menu_toggle .fs-3x,
	#kt_header_user_menu_toggle .fs-md-3x {
		font-size: 1.6rem !important;    /* ≃ fs-2x */
	}
}

/* -------- Icônes génériques -------- */
@media (max-width: 767.98px) {
	/* marge horizontale plus serrée entre les icônes de la barre */
	.app-navbar-item {
		margin-left: .5rem !important;
		margin-right: .5rem !important;
	}

	/* petits boutons icône (notifications, chat, etc.) */
	.app-navbar .btn-icon.w-35px,
	.app-navbar .btn-icon.w-md-40px {
		width : 32px !important;
		height: 32px !important;
	}

	/* police un peu plus petite pour ki-icons super‑larges */
	.app-navbar .fs-2hx { font-size: 1.6rem !important; }
}


/* 1) Wrapper positionné */
.voice-wrapper {
  position: relative;
  width: 100%;
}

/* 2) On décale le texte du textarea */
.voice-textarea {
  padding-left: 3rem; /* laisse assez de place au micro */
}

/* 3) Bouton micro discret et centré */
.voice-btn-floating {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 0.25rem;
  display: flex;               /* <<< passe en flex */
  align-items: center;         /* <<< centre verticalement */
  justify-content: center;     /* <<< centre horizontalement */
  font-size: 1rem;             /* taille de l’icône */
  z-index: 10;
  transition: background-color .2s, border-color .2s;
}

/* 4) État enregistrement */
.voice-btn-floating.recording {
  background-color: #dc3545;
  color: #fff;
  border-color: #dc3545;
}

.voice-btn-floating i {
  margin-left: 0.15rem;
}

.tox-toolbar .tox-tbtn.recording {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
}

#selectChecklist {
  min-width: 200px;   /* Largeur minimale souhaitée */
  max-width: 100%;    /* Ne pas dépasser la largeur du conteneur parent */
  box-sizing: border-box;
}

.ql-snow .ql-toolbar button svg {
  fill: currentColor;
}

.shadow-glow {
    box-shadow: 0 0 8px 4px var(--bs-primary);
    transition: box-shadow 0.2s ease-in-out;
}



/* FAB : Floating Action Button PDF */
.sig-pdf-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1060;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0d6efd;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: background-color 0.3s ease;
  cursor: pointer;
  padding: 0;
}

.sig-pdf-fab:hover {
  background-color: #0b5ed7;
}

.sig-pdf-fab i {
  font-size: 1.25rem;
  line-height: 1;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sur le body : évite scroll et garde le FAB au-dessus */
body.overflow-hidden .sig-pdf-fab {
  z-index: 2000;
}

/* Wrapper PDF par défaut */
.sig-pdf-container {
  position: relative;
  width: 100%;
  height: 75vh;
  border: 1px solid #ddd;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: #f9f9f9;
  transition: height 0.3s ease;
}

/* Plein écran */
.sig-pdf-container.sig-pdf-fullscreen {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100dvh !important; /* meilleure compatibilité mobile */
  z-index: 1055;
  background-color: #fff;
  border: none;
  border-radius: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

/* Iframe PDF */
.sig-pdf-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

/* Ajustement responsive mobile */
@media (max-width: 576px) {
  .sig-pdf-container {
    height: 60vh;
  }

  .sig-pdf-container.sig-pdf-fullscreen {
    position: absolute !important; /* évite bug iOS */
    height: 100dvh !important;
  }
}

/* Bouton de téléchargement adapté */
.sig-download-btn {
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  height: auto;
  line-height: 1.5;
}

/* Agrandir les champs dans le modal XL */
#modal_initializer_workflow .workflow-step {
  background-color: #f9f9f9;
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed #ccc;
}

#modal_initializer_workflow .workflow-step:not(:last-child) {
  margin-bottom: 12px;
}

#modal_initializer_workflow select.form-select-sm,
#modal_initializer_workflow input.form-control-sm {
  min-width: 180px;
}

/* Mieux séparer les colonnes */
#modal_initializer_workflow .workflow-step > div {
  min-width: 120px;
}

/* Centrer l'icône de suppression */
#modal_initializer_workflow .remove-step {
  margin-top: 4px;
}

/* Styliser les radios pour 'à voir' et 'à signer' */
#modal_initializer_workflow .form-check-inline {
  margin-right: 10px;
}

/* Multiselect dépendances plus clair */
#modal_initializer_workflow .depends-select {
  max-height: 90px;
  overflow-y: auto;
}

.swal2-popup.swal-planning-period .swal2-select {
    width: auto;
    min-width: 200px; /* Ajustez si nécessaire */
    max-width: 90%;   /* Assure qu'il ne dépasse pas */
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

#paginationContainerTicket ul.pagination {
    margin-bottom: 0;
}

/* Animation pour le badge des bureaux virtuels */
@keyframes pulse-animation {
    0% {
        transform: scale(1) translate(50%, -50%);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        transform: scale(1.1) translate(50%, -50%);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(1) translate(50%, -50%);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.badge.pulse-animation {
    animation: pulse-animation 1s ease-out;
}

/* Style spécifique pour les badges sur les icônes de bureau */
.menu-icon {
    position: relative !important;
}

.menu-icon .badge {
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    line-height: 18px;
}

/* Menu principal - Largeur fixe et z-index élevé */
.custom-menu-width {
    width: 500px !important;
    max-width: 90vw !important; /* Pour mobile */
    z-index: 999 !important;
    position: relative;
}

/* Forcer le z-index sur tous les éléments du menu */
.app-header-menu,
.app-header-menu .menu-sub,
.app-header-menu .menu-sub-lg-dropdown,
.menu-state-bg {
    z-index: 999 !important;
}

/* S'assurer que le menu est au-dessus de tout */
.menu-sub-lg-dropdown {
    position: absolute !important;
    z-index: 10000 !important;
    box-shadow: 0 0 50px 0 rgba(0, 0, 0, 0.15) !important;
    background: white !important;
}

/* Widget toolbar doit rester en dessous */
.widget-control-toolbar {
    position: relative !important;
    z-index: 100 !important;
}

/* GridStack doit rester en dessous */
.grid-stack,
.grid-stack-item {
    z-index: 1 !important;
}

/* Menu items - Une colonne */
.custom-menu-width .menu-item {
    margin-bottom: 0.5rem;
}

.custom-menu-width .menu-link {
    padding: 0.75rem 1rem;
    border-radius: 0.475rem;
    transition: all 0.2s ease;
}

.custom-menu-width .menu-link:hover {
    background-color: #f5f8fa;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-menu-width {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Style pour le bouton de fermeture fullscreen */
.widget-fullscreen-modal .swal2-close {
    background: transparent !important;
    border: none !important;
    font-size: 0 !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.widget-fullscreen-modal .swal2-close:hover {
    background-color: var(--bs-light) !important;
    transform: rotate(90deg);
}

.widget-fullscreen-modal .swal2-close:focus {
    box-shadow: none !important;
}

    /* Classes spécifiques pour éviter les conflits */
    .user-todo-modern-list {
        padding: 1rem 0;
    }
    
    .user-todo-modern-item .card {
        transition: all 0.3s ease;
    }
    
    .user-todo-modern-item .hover-elevate-up:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px 0 rgba(0,0,0,0.1) !important;
    }
    
    .user-todo-content {
        line-height: 1.6;
        cursor: pointer;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .user-todo-content:hover {
        -webkit-line-clamp: unset;
    }
    
    /* Animation pour la timeline */
    .user-todo-modern-item {
        animation: fadeInLeft 0.5s ease;
    }
    
    @keyframes fadeInLeft {
        from {
            opacity: 0;
            transform: translateX(-20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    /* Styles pour les tâches terminées */
    #kt_tab_inactiv .user-todo-modern-item {
        position: relative;
    }
    
    #kt_tab_inactiv .user-todo-modern-item::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--bs-success);
        opacity: 0.2;
        z-index: -1;
    }
    
 /* Styles pour les tâches de projet */
.project-tasks-modern-container {
    padding: 1rem 0;
}

.task-modern-item {
    transition: all 0.3s ease;
}

.task-modern-item.task-blocked {
    opacity: 0.7;
}

.task-modern-item.task-blocked .card {
    background-color: #f8f9fa;
}

.task-hierarchy-line {
    transition: background 0.3s ease;
}

.task-modern-item:hover .task-hierarchy-line {
    background: #009ef7 !important;
}

.hover-elevate-up:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px 0 rgba(0,0,0,0.1) !important;
}

/* Styles communs pour projets et interventions */
.project-tasks-modern-container,
.interventions-modern-container {
    padding: 0; /* Pas de padding en haut pour éviter l'espace */
}

.task-modern-item,
.intervention-modern-item {
    transition: all 0.3s ease;
}

.task-modern-item.task-blocked {
    opacity: 0.7;
}

.task-modern-item.task-blocked .card {
    background-color: #f8f9fa;
}

.task-hierarchy-line {
    transition: background 0.3s ease;
}

.task-modern-item:hover .task-hierarchy-line {
    background: #009ef7 !important;
}

.hover-elevate-up {
    transition: all 0.3s ease;
}

.hover-elevate-up:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px 0 rgba(0,0,0,0.1) !important;
}

/* Timeline pour les interventions */
.intervention-modern-item .position-absolute {
    transition: all 0.3s ease;
}

.intervention-modern-item:hover .position-absolute.w-6px {
    width: 10px !important;
    height: 10px !important;
    transform: translateX(-4.5px) !important;
}

/* Meta information styling */
.intervention-meta {
    border-top: 1px solid #f5f5f5;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.project-group,
.intervention-modern-item {
    animation: fadeInLeft 0.5s ease;
}

/* Loader personnalisé */
.spinner-border {
    width: 3rem;
    height: 3rem;
}


/* Mode dark pour GridStack */
[data-bs-theme="dark"] .grid-stack-item-content,
[data-theme="dark"] .grid-stack-item-content,
body.dark-mode .grid-stack-item-content {
    background-color: transparent !important;
}

/* S'assurer que les cartes dans les widgets héritent du thème */
[data-bs-theme="dark"] .widget-card,
[data-theme="dark"] .widget-card {
    background-color: var(--bs-card-bg, #1e1e2e) !important;
    color: var(--bs-card-color, #ffffff) !important;
}

/* Pour les widgets sans carte */
[data-bs-theme="dark"] .grid-stack-item-content > div:not(.widget-card),
[data-theme="dark"] .grid-stack-item-content > div:not(.widget-card) {
    background-color: transparent;
}

/* Transitions fluides */
.grid-stack-item-content,
.widget-card {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== Modal de création de ticket ===== */

/* Modal structure */
#kt_modal_new_ticket .modal-dialog {
    max-height: 90vh;
}

#kt_modal_new_ticket .modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* Switch de type de ticket */
.form-switch.form-check-custom .form-check-input {
    width: 3rem;
    height: 1.5rem;
    background-color: var(--bs-gray-300);
    transition: all 0.3s ease;
}

.form-switch.form-check-custom .form-check-input:checked {
    background-color: var(--bs-primary);
}

.form-switch.form-check-custom .form-check-label {
    padding-left: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

/* Hint text animation */
#ticket_type_hint {
    transition: all 0.3s ease;
    display: inline-block;
}

/* Select2 dans le modal */
#kt_modal_new_ticket .select2-container {
    width: 100% !important;
}

#kt_modal_new_ticket .select2-dropdown {
    z-index: 99999;
}

#kt_modal_new_ticket .select2-selection--single {
    height: calc(3.125rem + 2px);
    padding: 0.775rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

#kt_modal_new_ticket .select2-selection__rendered {
    padding-left: 0;
    padding-right: 0;
}

/* Customer option styling */
.customer-option {
    padding: 0.5rem;
}

.customer-option:hover {
    background-color: var(--bs-gray-100);
}

/* TinyMCE container */
#ticket_description {
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.475rem;
    transition: border-color 0.15s ease-in-out;
}

#ticket_description:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.1);
}

/* Dropzone styling */
#kt_modal_ticket_attachments {
    border: 2px dashed var(--bs-gray-300);
    border-radius: 0.475rem;
    background-color: var(--bs-gray-100);
    transition: all 0.3s ease;
    min-height: 120px;
}

#kt_modal_ticket_attachments:hover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

#kt_modal_ticket_attachments.dz-drag-hover {
    border-color: var(--bs-success);
    background-color: rgba(var(--bs-success-rgb), 0.1);
}

#kt_modal_ticket_attachments .dz-message {
    margin: 2rem 0;
    text-align: center;
}

#kt_modal_ticket_attachments .dz-preview {
    margin: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.475rem;
    box-shadow: 0 0.1rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#kt_modal_ticket_attachments .dz-preview:hover {
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
}

#kt_modal_ticket_attachments .dz-preview .dz-image {
    border-radius: 0.375rem;
    overflow: hidden;
}

#kt_modal_ticket_attachments .dz-preview .dz-details {
    padding: 0.5rem;
}

#kt_modal_ticket_attachments .dz-preview .dz-filename {
    font-weight: 500;
    color: var(--bs-gray-800);
}

#kt_modal_ticket_attachments .dz-preview .dz-size {
    font-size: 0.875rem;
    color: var(--bs-gray-600);
}

#kt_modal_ticket_attachments .dz-preview .dz-remove {
    color: var(--bs-danger);
    font-weight: 500;
    transition: all 0.2s ease;
}

#kt_modal_ticket_attachments .dz-preview .dz-remove:hover {
    color: var(--bs-danger);
    text-decoration: none;
    transform: scale(1.1);
}

#kt_modal_ticket_attachments .dz-preview.dz-error .dz-error-message {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bs-danger);
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    z-index: 10;
}

/* SLA info */
#sla_info {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border-left: 3px solid var(--bs-primary);
}

/* Section transitions */
#external_ticket_section,
#internal_ticket_section {
    transition: all 0.3s ease;
}

/* Form validation states */
.fv-row.is-invalid .form-control,
.fv-row.is-invalid .form-select {
    border-color: var(--bs-danger);
}

.fv-row.is-valid .form-control,
.fv-row.is-valid .form-select {
    border-color: var(--bs-success);
}

/* Loading state */
#kt_modal_new_ticket_submit[data-kt-indicator="on"] {
    position: relative;
    cursor: not-allowed;
}

#kt_modal_new_ticket_submit[data-kt-indicator="on"] .indicator-label {
    opacity: 0;
}

#kt_modal_new_ticket_submit[data-kt-indicator="on"] .indicator-progress {
    opacity: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal.show .modal-dialog {
    animation: slideIn 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #kt_modal_new_ticket .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    #kt_modal_new_ticket .row.g-5 {
        row-gap: 1rem !important;
    }
    
    #kt_modal_ticket_attachments .dz-message h3 {
        font-size: 1rem;
    }
    
    #kt_modal_ticket_attachments .dz-message span {
        font-size: 0.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #kt_modal_ticket_attachments {
        background-color: var(--bs-gray-800);
        border-color: var(--bs-gray-700);
    }
    
    #kt_modal_ticket_attachments:hover {
        background-color: rgba(var(--bs-primary-rgb), 0.1);
    }
    
    #kt_modal_ticket_attachments .dz-preview {
        background: var(--bs-gray-900);
    }
    
    #ticket_description {
        background-color: var(--bs-gray-900);
        border-color: var(--bs-gray-700);
        color: var(--bs-gray-100);
    }
}

/* Priority color indicators */
.select2-results__option[data-color] {
    position: relative;
    padding-left: 2rem;
}

.select2-results__option[data-color]::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: attr(data-color);
}

/* Fix pour le menu mobile */
@media (max-width: 991.98px) {
    /* S'assurer que le drawer prend toute la largeur sur mobile */
    .app-header-menu.drawer-on {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Forcer l'affichage du contenu du menu */
    .app-header-menu .menu-sub {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        width: 100% !important;
    }
    
    /* Ajuster la largeur du conteneur */
    .app-header-menu .custom-menu-width {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* S'assurer que les tuiles sont visibles */
    .app-header-menu .menu-state-bg {
        display: block !important;
        background: transparent !important;
        padding: 15px !important;
    }
    
    /* Ajuster la grille pour mobile */
    .app-header-menu .row.g-3 {
        margin: 0 !important;
    }
    
    .app-header-menu .col-6 {
        padding: 5px !important;
    }
    
    /* Styles pour les tuiles */
    .app-header-menu .menu-link.tiles_clic {
        background: #f5f8fa;
        border-radius: 8px;
        padding: 15px !important;
        display: flex !important;
        align-items: center !important;
        min-height: 80px;
        transition: all 0.3s ease;
    }
    
    .app-header-menu .menu-link.tiles_clic:hover {
        background: #e8eff5;
        transform: translateY(-2px);
    }
    
    /* Ajuster les icônes */
    .app-header-menu .menu-custom-icon {
        width: 35px !important;
        height: 35px !important;
        background: rgba(255, 255, 255, 0.8);
    }
    
    .app-header-menu .menu-custom-icon i {
        font-size: 1.5rem !important;
    }
    
    /* Ajuster les textes */
    .app-header-menu .fs-6 {
        font-size: 0.875rem !important;
    }
    
    .app-header-menu .fs-8 {
        font-size: 0.75rem !important;
    }
    
    /* Fix pour le bouton toggle */
    #kt_app_header_menu_toggle {
        z-index: 1050;
    }
    
    /* S'assurer que le backdrop fonctionne */
    .drawer-overlay {
        background-color: rgba(0, 0, 0, 0.2) !important;
    }
    
    /* Mode édition sur mobile */
    .app-header-menu .separator {
        margin: 15px 0 !important;
    }
    
    .app-header-menu .d-flex.flex-stack {
        padding: 0 15px !important;
    }
}

/* Fix supplémentaire pour très petits écrans */
@media (max-width: 575.98px) {
    .app-header-menu .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .app-header-menu .menu-link.tiles_clic {
        min-height: 70px;
    }
}




/* Reset et base pour le menu */
.nav-menu-wrapper {
    --nav-menu-spacing: 1.5rem;
    --nav-menu-border-radius: 16px;
}

/* Icône principale - Animation de pulsation subtile au changement de mode */
.nav-menu-icon {
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-menu-trigger:hover .nav-menu-icon {
    transform: scale(1.05);
}

/* Container du dropdown */
.nav-menu-dropdown {
    width: 100%;
    max-width: 640px;
    min-width: 320px;
}

@media (min-width: 992px) {
    .nav-menu-dropdown {
        min-width: 560px;
    }
}

/* Container principal du menu - Utilise les variables Metronic */
.nav-menu-container {
    background: var(--bs-app-bg, var(--bs-body-bg));
    border-radius: var(--nav-menu-border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--bs-gray-200);
    padding: var(--nav-menu-spacing);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Header mobile avec bouton de fermeture */
.nav-menu-mobile-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--bs-gray-200);
    align-items: center;
}

.nav-menu-mobile-header h4 {
    color: var(--bs-text-emphasis);
}

.nav-menu-close {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-menu-close:hover {
    background: var(--bs-gray-200);
}

/* Grille des items de menu */
.nav-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

/* Items de menu individuels - Style carte Apple adapté Metronic */
.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Icône de l'item */
.nav-menu-item-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bs-gray-200);
    transition: all 0.3s ease;
}

.nav-menu-item-icon i {
    color: var(--menu-color);
    transition: transform 0.3s ease;
}

/* Contenu de l'item */
.nav-menu-item-content {
    flex: 1;
    min-width: 0;
}

.nav-menu-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--bs-text-emphasis);
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.nav-menu-item-desc {
    font-size: 13px;
    color: var(--bs-text-muted);
    font-weight: 500;
}

/* Bordure animée en bas */
.nav-menu-item-border {
    position: absolute;
    bottom: 0;
    left: 30%;
    right: 30%;
    height: 3px;
    background: var(--menu-color);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    border-radius: 3px 3px 0 0;
}

/* Effets hover */
.nav-menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: transparent;
    background: var(--bs-gray-200);
}

.nav-menu-item:hover .nav-menu-item-border {
    transform: scaleX(1);
    left: 0;
    right: 0;
}

.nav-menu-item:hover .nav-menu-item-icon {
    background: var(--menu-color);
    transform: scale(1.05);
}

.nav-menu-item:hover .nav-menu-item-icon i {
    color: #ffffff !important;
    transform: scale(1.1);
}

.nav-menu-item:hover .nav-menu-item-title {
    color: var(--menu-color);
}

/* Attribution dynamique des couleurs */
.nav-menu-item[data-menu-color="#FFC700"] { --menu-color: #FFC700; }
.nav-menu-item[data-menu-color="#00ABA9"] { --menu-color: #00ABA9; }
.nav-menu-item[data-menu-color="#00A261"] { --menu-color: #00A261; }
.nav-menu-item[data-menu-color="#E671B8"] { --menu-color: #E671B8; }
.nav-menu-item[data-menu-color="#E42855"] { --menu-color: #E42855; }
.nav-menu-item[data-menu-color="#0d6efd"] { --menu-color: #0d6efd; }
.nav-menu-item[data-menu-color="#883FFF"] { --menu-color: #883FFF; }
.nav-menu-item[data-menu-color="#464852"] { --menu-color: #464852; }

/* Animation d'apparition du menu */
.menu-sub-lg-dropdown.show .nav-menu-container {
    animation: navMenuFadeIn 0.3s ease;
}

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

/* Styles spécifiques Dark Mode Metronic */
[data-bs-theme="dark"] .nav-menu-container {
    background: var(--bs-gray-900);
    border-color: var(--bs-gray-800);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .nav-menu-mobile-header {
    border-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] .nav-menu-close:hover {
    background: var(--bs-gray-800);
}

[data-bs-theme="dark"] .nav-menu-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .nav-menu-item-icon {
    background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .nav-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Responsive - Mobile */
@media (max-width: 575px) {
    .nav-menu-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .nav-menu-container {
        padding: 1rem;
    }
    
    .nav-menu-item {
        padding: 16px;
    }
    
    .nav-menu-item-icon {
        width: 40px;
        height: 40px;
    }
    
    .nav-menu-item-title {
        font-size: 14px;
    }
    
    .nav-menu-item-desc {
        font-size: 12px;
    }
}

/* Ajustements pour tablettes */
@media (min-width: 576px) and (max-width: 991px) {
    .nav-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Styles spécifiques pour le drawer mobile */
.app-header-mobile-drawer {
    background: transparent !important;
}

.app-header-mobile-drawer .nav-menu-container {
    height: 100%;
    border-radius: 0;
    max-width: 100%;
}

/* Ajustement pour le dropdown dans le dark mode */
[data-bs-theme="dark"] .menu-sub-lg-dropdown {
    background: transparent;
}

{{if $check_access_config.sub_module.xlr_flux.interface_notification.is_access}}
<div class="app-navbar-item ms-3 ms-md-3">
    <!--begin::Menu wrapper-->
    <div id="notification_icon" 
         class="btn btn-icon btn-custom position-relative notif-trigger-btn" 
         data-kt-menu-trigger="{default: 'click', lg: 'hover'}" 
         data-kt-menu-attach="parent" 
         data-kt-menu-placement="bottom-end">
        
        <!-- Icon avec animation de pulsation si notifications -->
        <div class="notif-icon-wrapper {{if $nb_notify>'0'}}notif-has-new{{/if}}">
            <i class="ki-duotone ki-notification-on fs-2hx notif-icon {{if $nb_notify>'0'}}text-danger{{else}}text-gray-600{{/if}}">
                <span class="path1"></span>
                <span class="path2"></span>
                <span class="path3"></span>
                <span class="path4"></span>
                <span class="path5"></span>
            </i>
        </div>
        
        <!-- Badge avec animation -->
        {{if $nb_notify>'0'}}
            <span id="badge_notify" class="notif-badge notif-badge-danger">{{$nb_notify}}</span>
        {{else}}
            <span id="badge_notify" class="notif-badge notif-badge-success">0</span>
        {{/if}}
        
    </div>
    
    <!--begin::Menu dropdown-->
    <div class="menu menu-sub menu-sub-dropdown menu-column notif-dropdown" data-kt-menu="true" id="kt_menu_notifications">
        
        <!-- Container principal avec style Apple -->
        <div class="notif-container">
            
            <!-- Header du menu -->
            <div class="notif-header">
                <div class="d-flex align-items-center">
                    <h4 class="fw-light flex-grow-1 m-0">Notifications</h4>
                    {{if $nb_notify>'0'}}
                        <span class="badge badge-light-danger rounded-pill px-3">{{$nb_notify}} nouvelles</span>
                    {{/if}}
                </div>
            </div>
            
            <!-- Zone de notifications scrollable -->
            <div class="notif-body">
                <div id="kt_topbar_notifications_1_body" class="notif-scroll"></div>
                
                <!-- Message si pas de notifications (à afficher via JS si nécessaire) -->
                <div class="notif-empty d-none">
                    <div class="text-center py-10">
                        <i class="ki-duotone ki-notification-off fs-5x text-gray-400 mb-5">
                            <span class="path1"></span>
                            <span class="path2"></span>
                            <span class="path3"></span>
                            <span class="path4"></span>
                            <span class="path5"></span>
                        </i>
                        <div class="text-gray-600 fs-6">Aucune notification</div>
                    </div>
                </div>
            </div>
            
            <!-- Footer avec bouton voir toutes -->
            <div class="notif-footer">
                <a href="{{$path_user}}notify.php" class="notif-view-all">
                    <span>Voir toutes les notifications</span>
                    <i class="ki-outline ki-arrow-right fs-5 ms-1"></i>
                </a>
            </div>
            
        </div>
    </div>
    <!--end::Menu dropdown-->
</div>
{{/if}}

<style>
/* Bouton déclencheur */
.notif-trigger-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    transition: all 0.3s ease;
    position: relative;
}

.notif-trigger-btn:hover {
    background: transparent !important;
}

.notif-trigger-btn:hover .notif-icon {
    color: var(--bs-primary) !important;
}

/* Wrapper de l'icône avec animation de pulsation */
.notif-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-icon-wrapper.notif-has-new::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
    animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
    0% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* Badge personnalisé */
.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    border-radius: 10px;
    transform: translate(40%, -40%);
    transition: all 0.3s ease;
    animation: notifBadgeAppear 0.3s ease;
}

@keyframes notifBadgeAppear {
    from {
        transform: translate(40%, -40%) scale(0);
    }
    to {
        transform: translate(40%, -40%) scale(1);
    }
}

.notif-badge-danger {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.notif-badge-success {
    background: var(--bs-success);
    color: white;
    opacity: 0.7;
}

/* Dropdown principal */
.notif-dropdown {
    width: 380px !important;
    max-width: calc(100vw - 30px);
    padding: 0 !important;
    border: none !important;
    margin-top: 10px !important;
}

/* Container avec style Apple */
.notif-container {
    background: var(--bs-app-bg, var(--bs-body-bg));
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--bs-gray-200);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    max-height: 480px;
}

/* Header */
.notif-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--bs-gray-200);
    background: var(--bs-gray-100);
}

.notif-header h4 {
    color: var(--bs-text-emphasis);
    font-size: 18px;
}

/* Body scrollable */
.notif-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.notif-scroll {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
}

/* Scrollbar personnalisée */
.notif-scroll::-webkit-scrollbar {
    width: 6px;
}

.notif-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.notif-scroll::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 3px;
}

.notif-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Footer avec bouton */
.notif-footer {
    padding: 12px;
    border-top: 1px solid var(--bs-gray-200);
    background: var(--bs-gray-100);
}

.notif-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--bs-primary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: transparent;
}

.notif-view-all:hover {
    background: var(--bs-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.25);
}

/* Item de notification (style pour les futures notifications) */
.notif-item {
    display: block;
    padding: 16px;
    margin: 4px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.notif-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bs-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.notif-item:hover {
    background: var(--bs-gray-200);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.notif-item:hover::before {
    transform: scaleX(1);
}

.notif-item.unread {
    background: rgba(var(--bs-primary-rgb), 0.05);
    border-color: rgba(var(--bs-primary-rgb), 0.2);
}

.notif-item.unread::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--bs-primary);
    border-radius: 0 2px 2px 0;
}

/* Icône dans l'item de notification */
.notif-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-gray-100);
    border-radius: 10px;
    flex-shrink: 0;
}

/* Dark mode */
[data-bs-theme="dark"] .notif-trigger-btn {
    background: transparent !important;
}

[data-bs-theme="dark"] .notif-trigger-btn:hover {
    background: transparent !important;
}

[data-bs-theme="dark"] .notif-container {
    background: var(--bs-gray-900);
    border-color: var(--bs-gray-800);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .notif-header,
[data-bs-theme="dark"] .notif-footer {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] .notif-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .notif-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .notif-item.unread {
    background: rgba(var(--bs-primary-rgb), 0.1);
}

[data-bs-theme="dark"] .notif-item-icon {
    background: var(--bs-gray-800);
}

/* Animation d'apparition du menu */
.menu-sub-dropdown.show .notif-container {
    animation: notifDropdownFadeIn 0.3s ease;
}

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

/* Responsive */
@media (max-width: 575px) {
    .notif-dropdown {
        width: calc(100vw - 30px) !important;
    }
    
    .notif-container {
        max-height: 70vh;
    }
    
    .notif-header {
        padding: 16px 20px;
    }
    
    .notif-scroll {
        max-height: calc(70vh - 140px);
    }
}

/* Avatar trigger */
.user-menu-trigger {
    position: relative;
}

.user-menu-avatar {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.user-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-avatar-initials {
    background: var(--bs-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-menu-trigger:hover .user-menu-avatar {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .user-menu-avatar {
        width: 50px;
        height: 50px;
    }
}

/* Dropdown principal */
.user-menu-dropdown {
    width: 320px !important;
    min-width: 280px;
    max-width: calc(100vw - 30px);
    padding: 0 !important;
    border: none !important;
    margin-top: 10px !important;
}

/* Gestion des textes longs */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Container avec style Apple */
.user-menu-container {
    background: var(--bs-app-bg, var(--bs-body-bg));
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--bs-gray-200);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Header */
.user-menu-header {
    padding: 20px;
    background: var(--bs-gray-100);
    border-bottom: 1px solid var(--bs-gray-200);
}

.user-menu-header-info {
    text-align: center;
    max-width: 100%;
}

.user-menu-header-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--bs-text-emphasis);
    margin-bottom: 4px;
    max-width: 100%;
    padding: 0 10px;
}

.user-menu-header-email {
    font-size: 13px;
    color: var(--bs-text-muted);
    text-decoration: none;
    display: block;
    max-width: 100%;
    padding: 0 10px;
    transition: color 0.3s ease;
}

.user-menu-header-email:hover {
    color: var(--bs-primary);
}

/* Admin Alert */
.user-menu-admin-alert {
    margin: 12px;
    padding: 16px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    max-width: 100%;
    overflow: hidden;
}

.user-menu-admin-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 193, 7, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-menu-admin-back {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--bs-primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.user-menu-admin-back:hover {
    background: var(--bs-primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3);
}

/* Menu Items */
.user-menu-items {
    padding: 8px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--bs-text-emphasis);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-menu-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-gray-100);
    border-radius: 8px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.user-menu-item-icon i {
    color: var(--bs-gray-600);
    transition: color 0.3s ease;
}

.user-menu-item-text {
    font-size: 14px;
    font-weight: 500;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Bordure animée */
.user-menu-item-border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bs-primary);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

/* Hover effects */
.user-menu-item:hover {
    background: var(--bs-gray-100);
    transform: translateX(4px);
}

.user-menu-item:hover .user-menu-item-border {
    transform: scaleX(1);
}

.user-menu-item:hover .user-menu-item-icon {
    background: var(--bs-primary);
}

.user-menu-item:hover .user-menu-item-icon i {
    color: white;
}

/* Footer */
.user-menu-footer {
    padding: 12px;
    background: var(--bs-gray-100);
    border-top: 1px solid var(--bs-gray-200);
}

.user-menu-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: transparent;
    color: var(--bs-danger);
    border: 1px solid var(--bs-danger);
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-menu-logout:hover {
    background: var(--bs-danger);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--bs-danger-rgb), 0.3);
}

/* Dark mode */
[data-bs-theme="dark"] .user-menu-container {
    background: var(--bs-gray-900);
    border-color: var(--bs-gray-800);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .user-menu-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] .user-menu-admin-alert {
    background: rgba(255, 193, 7, 0.05);
    border-color: rgba(255, 193, 7, 0.15);
}

[data-bs-theme="dark"] .user-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .user-menu-item-icon {
    background: var(--bs-gray-800);
}

[data-bs-theme="dark"] .user-menu-footer {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--bs-gray-800);
}

/* Animation d'apparition */
.menu-sub-dropdown.show .user-menu-container {
    animation: userMenuFadeIn 0.3s ease;
}

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

/* Responsive */
@media (max-width: 575px) {
    .user-menu-dropdown {
        width: calc(100vw - 30px) !important;
    }
    
    .user-menu-header {
        padding: 16px;
    }
    
    .user-menu-header-name {
        font-size: 15px;
    }
    
    .user-menu-header-email {
        font-size: 12px;
    }
    
    .user-menu-item {
        padding: 10px 14px;
    }
    
    .user-menu-item-text {
        font-size: 13px;
    }
}

/* Bouton déclencheur */
.history-trigger-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    transition: all 0.3s ease;
    position: relative;
}

.history-icon {
    color: var(--bs-gray-600);
    transition: color 0.3s ease, transform 0.3s ease;
}

.history-trigger-btn:hover .history-icon {
    color: var(--bs-primary) !important;
    transform: scale(1.05);
}

/* Badge avec animation de pulsation */
.history-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    transform: translate(40%, -40%);
    animation: historyBadgeAppear 0.3s ease;
}

.history-badge-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #dc3545;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
    animation: historyPulse 2s infinite;
}

@keyframes historyPulse {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
}

@keyframes historyBadgeAppear {
    from {
        transform: translate(40%, -40%) scale(0);
    }
    to {
        transform: translate(40%, -40%) scale(1);
    }
}

/* Dropdown principal */
.history-dropdown {
    width: 380px !important;
    padding: 0 !important;
    border: none !important;
    margin-top: 10px !important;
}

.history-dropdown-wide {
    width: 440px !important;
}

@media (min-width: 992px) {
    .history-dropdown-wide {
        width: 460px !important;
    }
}

/* Container avec style Apple */
.history-container {
    background: var(--bs-app-bg, var(--bs-body-bg));
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--bs-gray-200);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    max-height: 520px;
}

/* Header */
.history-header {
    padding: 20px 20px 0;
    background: var(--bs-gray-100);
    border-bottom: 1px solid var(--bs-gray-200);
}

.history-title {
    font-size: 18px;
    font-weight: 300;
    color: var(--bs-text-emphasis);
    margin-bottom: 16px;
    text-align: center;
}

/* Tabs style Apple Pills */
.history-tabs-wrapper {
    background: var(--bs-gray-200);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: -1px;
}

.history-tabs {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.history-tabs .nav-item {
    flex: 1;
}

.history-tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--bs-gray-700);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.history-tabs .nav-link i {
    transition: color 0.3s ease;
}

.history-tabs .nav-link.active {
    background: white;
    color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.history-tabs .nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

/* Content area */
.history-content {
    flex: 1;
    overflow: hidden;
}

.history-items-container {
    max-height: 360px;
    overflow-y: auto;
    padding: 12px;
}

/* Scrollbar personnalisée */
.history-items-container::-webkit-scrollbar {
    width: 6px;
}

.history-items-container::-webkit-scrollbar-track {
    background: transparent;
}

.history-items-container::-webkit-scrollbar-thumb {
    background: var(--bs-gray-400);
    border-radius: 3px;
}

/* Items d'historique */
.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.history-item-id {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.history-item-content {
    flex: 1;
    min-width: 0;
}

.history-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-text-emphasis);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-subtitle {
    font-size: 12px;
    color: var(--bs-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-time {
    font-size: 11px;
    color: var(--bs-text-muted);
    white-space: nowrap;
    padding: 4px 8px;
    background: var(--bs-gray-200);
    border-radius: 6px;
}

/* Bordure animée */
.history-item-border {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--item-color);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Hover effects */
.history-item:hover {
    background: var(--bs-gray-200);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.history-item:hover .history-item-border {
    transform: scaleY(1);
}

.history-item:hover .history-item-id {
    background: var(--item-color);
    color: white;
    transform: scale(1.05);
}

.history-item:hover .history-item-title {
    color: var(--item-color);
}

/* Couleurs par type */
.history-item-customer {
    --item-color: #00ABA9;
}

.history-item-contract {
    --item-color: #FFC700;
}

.history-item-product {
    --item-color: #1B84FF;
}

.history-item-timer {
    --item-color: #E42855;
}

/* État animé pour les timers actifs */
.history-timer-card.active {
    border-color: var(--bs-primary);
    background: linear-gradient(45deg, 
        rgba(var(--bs-primary-rgb), 0.05) 0%, 
        rgba(var(--bs-primary-rgb), 0.02) 100%);
}

.history-timer-card.paused {
    opacity: 0.7;
}

/* Indicateur de timer actif */
.history-timer-card::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    opacity: 0;
    animation: timerActivePulse 2s infinite;
}

.history-timer-card.active::before {
    opacity: 1;
}

@keyframes timerActivePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

/* Message vide */
.history-empty {
    text-align: center;
    padding: 40px 20px;
}

.history-empty-icon {
    font-size: 48px;
    color: var(--bs-gray-400);
    margin-bottom: 16px;
}

.history-empty-text {
    font-size: 14px;
    color: var(--bs-gray-600);
}

/* Timer spécifique */
.history-timer-card {
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.history-timer-card:hover {
    background: var(--bs-gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.history-timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-timer-client {
    font-weight: 600;
    color: var(--bs-text-emphasis);
    font-size: 14px;
}

.history-timer-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.history-timer-input {
    width: 50px !important;
    height: 36px !important;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: white !important;
    border: 1px solid var(--bs-gray-300) !important;
    border-radius: 8px !important;
    color: var(--bs-text-emphasis);
}

.history-timer-separator {
    font-size: 18px;
    font-weight: 600;
    color: var(--bs-gray-600);
}

.history-timer-actions {
    display: flex;
    gap: 8px;
}

.history-timer-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
}

.history-timer-btn-pause {
    background: var(--bs-primary);
    color: white;
}

.history-timer-btn-pause:hover {
    background: var(--bs-primary-dark);
    transform: scale(1.05);
}

.history-timer-btn-stop {
    background: var(--bs-danger);
    color: white;
}

.history-timer-btn-stop:hover {
    background: var(--bs-danger-dark);
    transform: scale(1.05);
}

/* Dark mode */
[data-bs-theme="dark"] .history-container {
    background: var(--bs-gray-900);
    border-color: var(--bs-gray-800);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .history-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] .history-tabs-wrapper {
    background: var(--bs-gray-800);
}

[data-bs-theme="dark"] .history-tabs .nav-link.active {
    background: var(--bs-gray-700);
}

[data-bs-theme="dark"] .history-item,
[data-bs-theme="dark"] .history-timer-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .history-item:hover,
[data-bs-theme="dark"] .history-timer-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .history-timer-input {
    background: var(--bs-gray-800) !important;
    border-color: var(--bs-gray-700) !important;
}

/* Tab indicator animation */
.history-tabs {
    position: relative;
}

.history-tabs::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 2px;
    background: var(--bs-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
    opacity: 0;
}

/* Transition entre tabs */
.tab-pane {
    animation: tabFadeIn 0.3s ease;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Amélioration des timers */
.history-timer-display {
    position: relative;
    padding: 12px;
    background: var(--bs-gray-50);
    border-radius: 10px;
}

[data-bs-theme="dark"] .history-timer-display {
    background: var(--bs-gray-800);
}

/* Animation d'apparition */
.menu-sub-dropdown.show .history-container {
    animation: historyFadeIn 0.3s ease;
}

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

/* Responsive */
@media (max-width: 575px) {
    .history-dropdown,
    .history-dropdown-wide {
        width: calc(100vw - 30px) !important;
    }
    
    .history-container {
        max-height: 70vh;
    }
    
    .history-tabs .nav-link {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .history-tabs .nav-link i {
        display: none;
    }
    
    .history-timer-input {
        width: 40px !important;
        font-size: 14px;
    }
}


/* Modal structure */
.quicklink-modal-dialog {
    max-width: 1000px;
}

.quicklink-modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.quicklink-body {
    display: flex;
    min-height: 500px;
    background: #ffffff; /* Ajouter cette ligne */
}

/* Header */
.quicklink-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    background: var(--bs-gray-100);
    border-bottom: 1px solid var(--bs-gray-200);
}

.quicklink-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quicklink-logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.quicklink-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--bs-text-emphasis);
    margin: 0;
}

.quicklink-subtitle {
    font-size: 14px;
    color: var(--bs-text-muted);
    margin: 0;
}

.quicklink-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-gray-600);
    transition: all 0.3s ease;
}

.quicklink-close:hover {
    background: var(--bs-gray-200);
    color: var(--bs-danger);
}

/* Body */
.quicklink-body {
    display: flex;
    min-height: 500px;
}

/* Navigation */
.quicklink-nav {
    width: 0;
    overflow: hidden;
    background: var(--bs-gray-100);
    border-right: 1px solid var(--bs-gray-200);
    transition: width 0.3s ease;
}

.quicklink-nav.show {
    width: 250px;
}

.quicklink-nav-back {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: var(--bs-gray-700);
    font-weight: 500;
    transition: all 0.3s ease;
}

.quicklink-nav-back:hover {
    background: var(--bs-gray-200);
    color: var(--bs-primary);
}

.quicklink-nav-title {
    padding: 20px;
    font-weight: 600;
    color: var(--bs-text-emphasis);
}

/* Content */
.quicklink-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.quicklink-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.quicklink-view.active {
    opacity: 1;
    transform: translateX(0);
}

/* Grid principal */
.quicklink-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Cards */
.quicklink-card {
    background: white;
    border: 1px solid var(--bs-gray-200);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
}

.quicklink-card-icon {
    width: 56px;
    height: 56px;
    background: rgba(var(--icon-color-rgb, 13, 110, 253), 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.quicklink-card-icon i {
    color: var(--icon-color);
}

.quicklink-card-content {
    flex: 1;
}

.quicklink-card-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--bs-text-emphasis);
    margin: 0 0 4px 0;
}

.quicklink-card-content p {
    font-size: 13px;
    color: var(--bs-text-muted);
    margin: 0;
}

.quicklink-card-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--bs-gray-500);
}

.quicklink-card-border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--icon-color);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

/* Card hover */
.quicklink-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.quicklink-card:hover .quicklink-card-icon {
    transform: scale(1.1);
    background: var(--icon-color);
}

.quicklink-card:hover .quicklink-card-icon i {
    color: white;
}

.quicklink-card:hover .quicklink-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

.quicklink-card:hover .quicklink-card-border {
    transform: scaleX(1);
}

/* Section header */
.quicklink-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.quicklink-section-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--bs-text-emphasis);
    margin-bottom: 8px;
}

.quicklink-section-header p {
    color: var(--bs-text-muted);
    font-size: 14px;
}

/* Actions grid */
.quicklink-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.quicklink-action-card {
    background: var(--bs-gray-100);
    border: 1px solid var(--bs-gray-200);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quicklink-action-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.3s ease;
}

.quicklink-action-icon i {
    color: var(--action-color);
}

.quicklink-action-card h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-text-emphasis);
    margin-bottom: 4px;
}

.quicklink-action-card p {
    font-size: 12px;
    color: var(--bs-text-muted);
    margin: 0;
}

.quicklink-action-card:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.quicklink-action-card:hover .quicklink-action-icon {
    background: var(--action-color);
    transform: scale(1.1);
}

.quicklink-action-card:hover .quicklink-action-icon i {
    color: white;
}

/* Illustrations */
.quicklink-illustration {
    text-align: center;
    margin-top: 40px;
}

.quicklink-illustration img {
    max-width: 300px;
    opacity: 0.8;
}

.quicklink-illustration-small {
    text-align: center;
    margin-top: 30px;
}

.quicklink-illustration-small img {
    max-width: 200px;
    opacity: 0.8;
}

/* Dark mode */
[data-bs-theme="dark"] .quicklink-modal-content {
    background: var(--bs-gray-900);
}

[data-bs-theme="dark"] .quicklink-body {
    background: var(--bs-gray-900); /* Ajouter cette ligne */
}

[data-bs-theme="dark"] .quicklink-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] .quicklink-logo {
    background: var(--bs-gray-800);
}

[data-bs-theme="dark"] .quicklink-card {
    background: var(--bs-gray-800);
    border-color: var(--bs-gray-700);
}

[data-bs-theme="dark"] .quicklink-action-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .quicklink-action-icon {
    background: var(--bs-gray-800);
}

/* Animations */
@keyframes quicklinkSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.quicklink-view.active .quicklink-card,
.quicklink-view.active .quicklink-action-card {
    animation: quicklinkSlideIn 0.4s ease forwards;
}

.quicklink-view.active .quicklink-card:nth-child(1),
.quicklink-view.active .quicklink-action-card:nth-child(1) { animation-delay: 0.05s; }
.quicklink-view.active .quicklink-card:nth-child(2),
.quicklink-view.active .quicklink-action-card:nth-child(2) { animation-delay: 0.1s; }
.quicklink-view.active .quicklink-card:nth-child(3),
.quicklink-view.active .quicklink-action-card:nth-child(3) { animation-delay: 0.15s; }
.quicklink-view.active .quicklink-card:nth-child(4),
.quicklink-view.active .quicklink-action-card:nth-child(4) { animation-delay: 0.2s; }
.quicklink-view.active .quicklink-card:nth-child(5),
.quicklink-view.active .quicklink-action-card:nth-child(5) { animation-delay: 0.25s; }
.quicklink-view.active .quicklink-card:nth-child(6),
.quicklink-view.active .quicklink-action-card:nth-child(6) { animation-delay: 0.3s; }
.quicklink-view.active .quicklink-card:nth-child(7),
.quicklink-view.active .quicklink-action-card:nth-child(7) { animation-delay: 0.35s; }
.quicklink-view.active .quicklink-card:nth-child(8),
.quicklink-view.active .quicklink-action-card:nth-child(8) { animation-delay: 0.4s; }

/* Responsive */
@media (max-width: 768px) {
    .quicklink-header {
        padding: 20px;
    }
    
    .quicklink-logo {
        width: 48px;
        height: 48px;
    }
    
    .quicklink-title {
        font-size: 20px;
    }
    
    .quicklink-subtitle {
        display: none;
    }
    
    .quicklink-nav.show {
        width: 200px;
    }
    
    .quicklink-grid {
        grid-template-columns: 1fr;
    }
    
    .quicklink-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .quicklink-view {
        padding: 20px;
    }
    
    .quicklink-actions-grid {
        grid-template-columns: 1fr;
    }
}

.quicklink-modern-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1040;
    background: var(--bs-primary);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(var(--bs-primary-rgb), 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.quicklink-modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(var(--bs-primary-rgb), 0.4);
    background: var(--bs-primary);
    color: white;
}

.quicklink-modern-btn:active {
    transform: scale(0.95);
}

/* Animation de pulsation */
.quicklink-modern-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: var(--bs-primary);
    opacity: 0;
    animation: quicklinkPulse 3s infinite;
}

@keyframes quicklinkPulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0;
    }
    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* Ajustement pour éviter le chevauchement avec scroll-to-top */
.quicklink-float-btn,
#kt_app_layout_builder_toggle {
    position: fixed;
    bottom: 90px !important; /* Force la priorité */
    right: 30px;
    z-index: 1039; /* Légèrement en dessous du scroll-to-top */
}

/* Animation d'entrée ajustée */
@keyframes quicklinkEntry {
    from {
        transform: translateY(100px) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Si vous avez un bouton scroll-to-top */
#kt_scrolltop,
.scroll-to-top {
    bottom: 30px !important;
    z-index: 1040;
}

/* QuickLink Ultra Minimal */
.quicklink-minimal-btn {
    position: fixed;
    bottom: 40px;
    right: -35px; /* Presque entièrement caché */
    z-index: 999; /* Juste en dessous des modals */
    
    /* Cercle minimal */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    
    /* Design ultra léger */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    
    /* Ombre très légère */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    
    /* Centrage de l'icône */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Transitions douces */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Reset Bootstrap */
    padding: 0;
    outline: none;
    color: #94a3b8; /* Gris clair */
}

/* SVG Icon */
.quicklink-minimal-btn svg {
    transition: all 0.3s ease;
    opacity: 0.6;
}

/* État par défaut - Indicateur subtil */
.quicklink-minimal-btn::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hover - Révélation douce */
.quicklink-minimal-btn:hover {
    right: 15px; /* Entre complètement */
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: #3b82f6;
}

.quicklink-minimal-btn:hover svg {
    opacity: 1;
    transform: scale(1.1);
}

.quicklink-minimal-btn:hover::after {
    opacity: 0;
}

/* Active */
.quicklink-minimal-btn:active {
    transform: scale(0.95);
}

/* Focus (accessibilité) */
.quicklink-minimal-btn:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Alternative : Version encore plus discrète avec tab uniquement */
.quicklink-tab-only {
    position: fixed;
    bottom: 50%;
    right: 0;
    transform: translateY(50%);
    
    /* Tab vertical */
    width: 4px;
    height: 60px;
    border-radius: 2px 0 0 2px;
    
    /* Presque invisible */
    background: #e2e8f0;
    border: none;
    padding: 0;
    
    /* Transition */
    transition: all 0.3s ease;
    cursor: pointer;
    
    /* Cache le contenu */
    overflow: hidden;
    color: transparent;
}

.quicklink-tab-only:hover {
    width: 50px;
    background: #f1f5f9;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
}

.quicklink-tab-only:hover::before {
    content: '⚡';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #64748b;
}

/* Version flottante avec auto-hide */
.quicklink-autohide {
    position: fixed;
    bottom: 30px;
    right: 30px;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.quicklink-autohide:hover,
.quicklink-autohide:focus {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .quicklink-minimal-btn {
        bottom: 70px; /* Plus haut sur mobile pour éviter les barres de navigation */
        right: -38px;
        width: 40px;
        height: 40px;
    }
    
    .quicklink-minimal-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Animation d'entrée initiale (optionnel) */
@keyframes slideInHint {
    0%, 100% { right: -35px; }
    50% { right: -25px; }
}

.quicklink-minimal-btn {
    animation: slideInHint 2s ease-out 3s; /* Hint après 3 secondes */
}

/* Raccourci clavier (optionnel) */
.quicklink-kbd-hint {
    position: absolute;
    bottom: 100%;
    right: 10px;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: #1a202c;
    color: white;
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.quicklink-minimal-btn:hover .quicklink-kbd-hint {
    opacity: 0.9;
}

.badge-light-info {
    background-color: rgba(0, 156, 224, 0.1) !important;
    color: #009ce0 !important;
    font-weight: 500;
}

.timeline-title + .badge {
    margin-left: 8px;
    vertical-align: middle;
}

.route-results-modal .swal2-html-container {
    max-height: 70vh;
    overflow-y: auto;
}

.route-results .timeline-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.route-results .timeline-line {
    border-left: 2px dashed #e4e6ef;
    position: absolute;
    top: 40px;
    bottom: 0;
    left: 19px;
}

.route-results .timeline-item:last-child .timeline-line {
    display: none;
}

/* Layout Master Template - Apple Inspired Design */
/* Header Card Styles */
.layout-xlr-header-card {
    background: #ffffff;
    border: 1px solid #eff2f5;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 48px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.layout-xlr-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0.3);
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd 0%, #0dcaf0 100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.layout-xlr-header-card:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.layout-xlr-header-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Content Card Styles */
.layout-xlr-content-card {
    background: #ffffff;
    border: 1px solid #eff2f5;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.layout-xlr-content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 3px;
    background: #0d6efd;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.layout-xlr-content-card:hover::before {
    transform: translateX(-50%) scaleX(0.5);
}

.layout-xlr-content-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Header Content Layout */
.layout-xlr-header-content {
    display: flex;
    align-items: center;
    gap: 48px;
}

.layout-xlr-header-text {
    flex: 1;
}

.layout-xlr-header-visual {
    flex-shrink: 0;
}

/* Typography */
.layout-xlr-page-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #181c32;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.layout-xlr-page-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 24px;
}

.layout-xlr-page-description {
    font-size: 0.9375rem;
    color: #7e8299;
    line-height: 1.7;
    max-width: 600px;
}

/* Breadcrumb Custom Style */
.layout-xlr-breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 32px;
}

.layout-xlr-breadcrumb .breadcrumb-item {
    font-size: 0.875rem;
    font-weight: 500;
}

.layout-xlr-breadcrumb .breadcrumb-item a {
    color: #7e8299;
    text-decoration: none;
    transition: color 0.2s ease;
}

.layout-xlr-breadcrumb .breadcrumb-item a:hover {
    color: #0d6efd;
}

.layout-xlr-breadcrumb .breadcrumb-item.active {
    color: #181c32;
    font-weight: 600;
}

/* Action Buttons */
.layout-xlr-header-actions {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.layout-xlr-header-actions .btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Illustration/Icon Container */
.layout-xlr-illustration {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f8fa;
    border-radius: 20px;
    position: relative;
}

.layout-xlr-illustration i {
    font-size: 80px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 991px) {
    .layout-xlr-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .layout-xlr-header-text {
        order: 2;
    }
    
    .layout-xlr-header-visual {
        order: 1;
    }
    
    .layout-xlr-page-description {
        margin: 0 auto;
    }
    
    .layout-xlr-header-actions {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .layout-xlr-header-card,
    .layout-xlr-content-card {
        padding: 32px 24px;
    }
    
    .layout-xlr-page-title {
        font-size: 2rem;
    }
    
    .layout-xlr-illustration {
        width: 140px;
        height: 140px;
    }
    
    .layout-xlr-illustration i {
        font-size: 60px;
    }
}

@media (max-width: 575px) {
    .layout-xlr-header-card,
    .layout-xlr-content-card {
        padding: 24px 16px;
    }
    
    .layout-xlr-page-title {
        font-size: 1.75rem;
    }
    
    .layout-xlr-page-subtitle {
        font-size: 1rem;
    }
}

/* Loading State */
.layout-xlr-loading {
    position: relative;
    min-height: 200px;
}

.layout-xlr-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #eff2f5;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: layout-xlr-spin 1s linear infinite;
}

@keyframes layout-xlr-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}