/* Styles personnalisés globaux pour TheHub */

/* Classe pour empêcher la sélection de texte */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Styles globaux pour améliorer l'expérience utilisateur */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Amélioration des transitions */
* {
    transition: all 0.2s ease-in-out;
}

/* Styles pour les éléments interactifs */
button, a, input, textarea, select {
    outline: none;
}

button:focus, a:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Styles pour les messages d'erreur de formulaire */
.form-error,
.invalid-feedback,
.help-block,
.form-error-message,
.alert-danger {
    color: white !important;
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin-top: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* Styles spécifiques pour les erreurs Symfony */
ul li {
    color: white !important;
}

/* Messages d'erreur dans les formulaires */
form .form-error,
form .invalid-feedback,
form .help-block {
    color: white !important;
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin-top: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* Styles spécifiques pour les erreurs Symfony Twig */
.form-error-message,
.alert.alert-danger,
.text-danger {
    color: white !important;
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin-top: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* Messages d'erreur génériques */
.error,
.error-message,
.validation-error {
    color: white !important;
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin-top: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* Styles pour les formulaires d'administration */
.admin-form select,
.admin-form input,
.admin-form textarea {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.admin-form select option {
    background: #1f2937 !important;
    color: white !important;
}

.admin-form label {
    color: white !important;
    font-weight: 500 !important;
}

/* Scrollbar personnalisée pour la conversation */
.conversation-scroll {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 transparent;
}

.conversation-scroll::-webkit-scrollbar {
    width: 6px;
}

.conversation-scroll::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.conversation-scroll::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.conversation-scroll::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

.conversation-scroll::-webkit-scrollbar-thumb:active {
    background: #6d28d9;
}

/* Scrollbar pour les dropdowns */
.custom-select-options::-webkit-scrollbar {
    width: 4px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Styles globaux pour les dropdowns personnalisés */
.custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
    z-index: 9999;
}

.custom-select-trigger {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: white;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.custom-select-trigger:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.custom-select-trigger:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), 0 4px 15px rgba(0, 0, 0, 0.2);
    outline: none;
}

.custom-select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

.custom-select.open .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-options {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 300px !important;
    background: rgba(15, 15, 35, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.5rem;
    z-index: 9999999 !important;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.custom-select-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9999998 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 0.75rem 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(26, 26, 46, 0.95);
    position: relative;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: rgba(139, 92, 246, 0.4);
    color: white;
    transform: translateX(5px);
    z-index: 10;
}

.custom-select-option.selected {
    background: rgba(139, 92, 246, 0.5);
    color: white;
    font-weight: 600;
}

/* Styles pour les options de priorité colorées - avec plus de spécificité */
.custom-select-option .priority-text.urgent {
    color: #ef4444 !important;
    font-weight: bold !important;
    text-shadow: 0 0 3px rgba(239, 68, 68, 0.5) !important;
}

.custom-select-option .priority-text.high {
    color: #f59e0b !important;
    font-weight: bold !important;
    text-shadow: 0 0 3px rgba(245, 158, 11, 0.5) !important;
}

.custom-select-option .priority-text.medium {
    color: #3b82f6 !important;
    font-weight: bold !important;
    text-shadow: 0 0 3px rgba(59, 130, 246, 0.5) !important;
}

.custom-select-option .priority-text.low {
    color: #10b981 !important;
    font-weight: bold !important;
    text-shadow: 0 0 3px rgba(16, 185, 129, 0.5) !important;
}

.custom-select-option .priority-text {
    color: white !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

/* Styles pour les options de priorité avec background coloré */
.custom-select-option[data-color="urgent"] {
    background: rgba(239, 68, 68, 0.1) !important;
    border-left: 3px solid #ef4444 !important;
}

.custom-select-option[data-color="high"] {
    background: rgba(245, 158, 11, 0.1) !important;
    border-left: 3px solid #f59e0b !important;
}

.custom-select-option[data-color="medium"] {
    background: rgba(59, 130, 246, 0.1) !important;
    border-left: 3px solid #3b82f6 !important;
}

.custom-select-option[data-color="low"] {
    background: rgba(16, 185, 129, 0.1) !important;
    border-left: 3px solid #10b981 !important;
}

.custom-select-option[data-color="default"] {
    background: rgba(255, 255, 255, 0.05) !important;
    border-left: 3px solid #6b7280 !important;
}


/* CSS simple pour les select */
select {
    background: #2d2d54 !important;
    border: 1px solid #4a4a7a !important;
    border-radius: 4px !important;
    color: white !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    width: 100% !important;
}

select:focus {
    border-color: #6366f1 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

select:hover {
    border-color: #6366f1 !important;
}

/* Styles pour les options de priorité colorées */
select option[value="urgent"] {
    background: #ef4444 !important;
    color: white !important;
    font-weight: bold !important;
}

select option[value="high"] {
    background: #f59e0b !important;
    color: white !important;
    font-weight: bold !important;
}

select option[value="medium"] {
    background: #3b82f6 !important;
    color: white !important;
    font-weight: bold !important;
}

select option[value="low"] {
    background: #10b981 !important;
    color: white !important;
    font-weight: bold !important;
}

/* Styles pour les options par défaut */
select option[value="all"] {
    background: #2d2d54 !important;
    color: white !important;
}

/* CSS simple pour tous les inputs */
input[type="text"], 
input[type="email"], 
input[type="password"], 
textarea {
    background: #2d2d54 !important;
    border: 1px solid #4a4a7a !important;
    border-radius: 4px !important;
    color: white !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    width: 100% !important;
    transition: border-color 0.2s ease !important;
}

/* Styles personnalisés pour les inputs de type file */
input[type="file"] {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 12px !important;
    font-size: 14px !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

input[type="file"]:focus {
    outline: none !important;
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2) !important;
}

input[type="file"]:hover {
    border-color: #8b5cf6 !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Masquer le texte par défaut du navigateur et le remplacer */
input[type="file"]::file-selector-button {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    color: white !important;
    padding: 8px 16px !important;
    margin-right: 12px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Style pour les inputs de type file - garder visible mais styliser */
input[type="file"] {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-size: 14px !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}


input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
textarea:focus {
    border-color: #6366f1 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

input[type="text"]:hover, 
input[type="email"]:hover, 
input[type="password"]:hover, 
textarea:hover {
    border-color: #6366f1 !important;
}

/* Placeholder */
input::placeholder, 
textarea::placeholder {
    color: #9ca3af !important;
}


/* Animations pour le bouton de support */
@keyframes support-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes support-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    }
}

.support-button {
    animation: support-pulse 2s infinite, support-glow 3s infinite;
}

.support-button:hover {
    animation: none;
}

/* Animation pour le point d'interrogation */
@keyframes question-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.support-button:hover span {
    animation: question-rotate 0.5s ease-in-out;
}

/* Styles pour les badges de priorité - renforcés */
.priority-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

/* Styles très spécifiques pour forcer les couleurs de priorité */
tbody tr td .priority-badge.priority-urgent {
    background: #ef4444 !important;
    color: white !important;
    border: 2px solid #dc2626 !important;
}

tbody tr td .priority-badge.priority-high {
    background: #f59e0b !important;
    color: white !important;
    border: 2px solid #d97706 !important;
}

tbody tr td .priority-badge.priority-medium {
    background: #3b82f6 !important;
    color: white !important;
    border: 2px solid #2563eb !important;
}

tbody tr td .priority-badge.priority-low {
    background: #10b981 !important;
    color: white !important;
    border: 2px solid #059669 !important;
}

/* Styles finaux pour les badges de priorité */
tbody tr td .priority-badge {
    display: inline-block !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: bold !important;
    color: white !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 11px !important;
}


.priority-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}


/* Styles pour les lignes de priorité - avec plus de spécificité */
tbody tr.priority-row-urgent,
tbody tr.priority-row-high {
    border-left: 4px solid #ef4444 !important;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(255, 255, 255, 0.05)) !important;
    position: relative !important;
}

tbody tr.priority-row-medium {
    border-left: 4px solid #f59e0b !important;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(255, 255, 255, 0.05)) !important;
    position: relative !important;
}

tbody tr.priority-row-low {
    border-left: 4px solid #10b981 !important;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(255, 255, 255, 0.05)) !important;
    position: relative !important;
}

tbody tr.priority-row-urgent:hover,
tbody tr.priority-row-high:hover {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.25), rgba(255, 255, 255, 0.1)) !important;
    transform: translateX(2px) !important;
}

tbody tr.priority-row-medium:hover {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.25), rgba(255, 255, 255, 0.1)) !important;
    transform: translateX(2px) !important;
}

tbody tr.priority-row-low:hover {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.25), rgba(255, 255, 255, 0.1)) !important;
    transform: translateX(2px) !important;
}

/* Styles spécifiques pour les cellules dans les lignes de priorité */
tbody tr.priority-row-urgent td,
tbody tr.priority-row-high td {
    border-left: none !important;
}


tbody tr.priority-row-medium td {
    border-left: none !important;
}

tbody tr.priority-row-low td {
    border-left: none !important;
}

/* Styles pour les badges de statut */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-open {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.status-pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.status-closed {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}
