/* Variables CSS pour faciliter la maintenance */
:root {
    --primary-color: #1976d2;
    --secondary-color: #dc004e;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --info-color: #2196f3;
}

/* Styles pour le chat des tickets */
.chat-container {
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f5f5f5;
}

.chat-message {
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-admin {
    text-align: left;
}

.chat-message-client {
    text-align: right;
}

.chat-bubble {
    display: inline-block;
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    word-wrap: break-word;
}

.chat-bubble-admin {
    background-color: #e3f2fd;
    border-bottom-left-radius: 0.25rem;
}

.chat-bubble-client {
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

/* Styles pour les widgets du dashboard */
.dashboard-widget {
    transition: transform 0.2s, box-shadow 0.2s;
}

    .dashboard-widget:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

/* Styles pour les statuts */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-en-attente {
    background-color: var(--warning-color);
    color: white;
}

.status-en-cours {
    background-color: var(--info-color);
    color: white;
}

.status-traite {
    background-color: var(--success-color);
    color: white;
}

/* Animation de chargement personnalis�e */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Styles pour les notifications */
.notification-badge {
    position: relative;
    display: inline-block;
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--error-color);
    color: white;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 1.5rem;
    text-align: center;
}

/* Styles pour l'upload de fichiers */
.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

    .file-upload-area:hover {
        border-color: var(--primary-color);
        background-color: #f5f5f5;
    }

    .file-upload-area.drag-over {
        border-color: var(--primary-color);
        background-color: #e3f2fd;
    }

/* Styles pour les tableaux responsifs */
.responsive-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Styles pour l'impression */
@media print {
    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }
}

/* Animations pour les transitions de page */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease-out;
}

/* Styles pour le mode sombre (si impl�ment�) */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #121212;
        color: #ffffff;
    }
}

/* Utilitaires personnalis�s */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.min-height-400 {
    min-height: 400px;
}

/* Styles pour les graphiques */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Am�lioration de l'accessibilit� */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible pour l'accessibilit� */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Classes personnalisées pour le layout */
.custom-appbar-border {
    border-bottom: 2px solid #eb6536 !important;
    box-shadow: none !important;
}

.custom-drawer-border {
    border-right: 1px solid var(--mud-palette-lines-default, #282828) !important;
}

/* Désactiver l'alternance des couleurs de fond sur les tableaux */
.mud-table-row:nth-child(even),
.mud-table-row:nth-child(odd),
.mud-table-row,
.mud-table .mud-table-row {
    background-color: transparent !important;
}

/* Conserver le hover mais sans alternance */
.mud-table-row:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* Styles pour les dialogs personnalisés */
.dialog-backdrop-blur {
    backdrop-filter: blur(3px);
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* =========================================
   SYSTÈME DE POLICES GÉNÉRIQUE - CHARTE GRAPHIQUE
   ========================================= */

/* Configuration des polices MudBlazor - Open Sans pour les titres */
.mud-typography-h1, 
.mud-typography-h2, 
.mud-typography-h3, 
.mud-typography-h4, 
.mud-typography-h5, 
.mud-typography-h6 {
    font-family: 'Open Sans', sans-serif !important;
}

/* Configuration des polices MudBlazor - Roboto pour le texte courant */
.mud-typography-body1, 
.mud-typography-body2, 
.mud-typography-subtitle1, 
.mud-typography-subtitle2,
.mud-typography-caption,
.mud-typography-overline {
    font-family: 'Roboto', sans-serif !important;
}

/* Configuration des polices pour les boutons */
.mud-button-label,
.mud-fab .mud-button-label,
.mud-icon-button .mud-button-label {
    font-family: 'Roboto', sans-serif !important;
}

/* Configuration des polices pour les inputs */
.mud-input,
.mud-input-slot,
.mud-select,
.mud-textfield {
    font-family: 'Roboto', sans-serif !important;
}

/* Configuration des polices pour les tableaux */
.mud-table,
.mud-table-cell,
.mud-table-head {
    font-family: 'Roboto', sans-serif !important;
}

/* Headers de tableau avec Open Sans */
.mud-table-head .mud-table-cell {
    font-family: 'Open Sans', sans-serif !important;
    font-weight: 600 !important;
}

/* Configuration des polices pour les alertes et messages */
.mud-alert,
.mud-snackbar {
    font-family: 'Roboto', sans-serif !important;
}

/* Configuration des polices pour les menus */
.mud-menu,
.mud-menu-item,
.mud-nav-item,
.mud-nav-link {
    font-family: 'Roboto', sans-serif !important;
}

/* Configuration générale du body pour les polices par défaut */
body {
    font-family: 'Roboto', sans-serif !important;
}

/* Autres éléments MudBlazor en Roboto (sauf titres) */
.mud-typography:not(.mud-typography-h1):not(.mud-typography-h2):not(.mud-typography-h3):not(.mud-typography-h4):not(.mud-typography-h5):not(.mud-typography-h6) {
    font-family: 'Roboto', sans-serif !important;
}

/* Titres génériques hors MudBlazor */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', sans-serif !important;
}

/* Classes utilitaires pour forcer les polices */
.font-open-sans {
    font-family: 'Open Sans', sans-serif !important;
}

.font-roboto {
    font-family: 'Roboto', sans-serif !important;
}
