/* ==========================================================================
   VARIABLES & GLOBALS
   ========================================================================== */
:root {
    --mt-dark: #162d46;
    --mt-glpi-bg: #cbd5e0;
    --mt-yellow: #f1b943;
}

.fadein { animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Effet de soulèvement pour les cartes et lignes de tickets */
.hover-lift { 
    transition: transform 0.3s ease, box-shadow 0.3s ease !important; 
}
.hover-lift:hover { 
    transform: translateY(-1px) !important; 
    box-shadow: 0 5px 8px rgba(0,0,0,0.06) !important;
	background-color: #f1f4f9 !important;
}

/* ==========================================================================
   HERO BANNER (Identité Microtiq)
   ========================================================================== */
.hero-tickets {
    position: relative;
    padding: 50px 0;
    text-align: center;
    border-bottom: 1px solid #b1bdcb;
    background-image: linear-gradient(to bottom, rgba(22, 45, 70, 1) 10%, rgba(22, 45, 70, 0.7) 50%, rgba(240, 245, 240, 0.5) 100%), 
                      url('/images/banniere.webp'); 
    background-position: center bottom;
    background-size: cover;
}

.hero-tickets h2 { 
    font-family: 'Alkatra', cursive; 
    color: #fff; 
    font-weight: 700; 
    margin-bottom: 0;
}

/* ==========================================================================
   LISTE DES TICKETS & ÉTATS
   ========================================================================== */
/* Bordures colorées à gauche selon l'état du ticket */
.border-etat-0 { border-left: 5px solid #dc3545 !important; } /* Envoyé (Rouge) */
.border-etat-1 { border-left: 5px solid #ffc107 !important; } /* Reçu (Jaune) */
.border-etat-2 { border-left: 5px solid #198754 !important; } /* Clôturé (Vert) */

.ref-badge { 
    background: #f1f4f9; 
    padding: 4px 10px; 
    border-radius: 6px; 
    font-family: monospace; 
    font-weight: bold; 
    font-size: 0.85rem; 
}

/* ==========================================================================
   SYSTÈME DE CHAT (Bulles de discussion)
   ========================================================================== */
#disc {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.msg-wrapper {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Technicien Microtiq = Alignement GAUCHE */
.msg-microtiq { align-items: flex-start; }
.msg-microtiq .bubble {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0 15px 15px 15px; /* Angle vif en haut à gauche */
    padding: 12px 18px;
    width: 60%;
    color: #333;
}

/* Client = Alignement DROITE */
.msg-client { align-items: flex-end; }
.msg-client .bubble {
    background: var(--mt-dark);
    color: white;
    border-radius: 15px 0 15px 15px; /* Angle vif en bas à droite */
    padding: 12px 18px;
    width: 60%;
    text-align: right;
}

.msg-meta {  
    color: #6c757d; 
    margin-bottom: 5px; 
    font-style: italic; 
}

/* ==========================================================================
   FORMULAIRE D'INCIDENT & UPLOAD
   ========================================================================== */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.upload-zone:hover { 
    border-color: var(--mt-dark); 
    background-color: #f1f4f9; 
}

.incident-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Correction pour que Summernote s'intègre bien avec les bords arrondis */
.note-editor { 
    border-radius: 8px !important; 
    overflow: hidden; 
    border: 1px solid #dee2e6 !important;
}

/* ==========================================================================
   LEGACY / GLOBAL FIXES
   ========================================================================== */
#container { pointer-events: auto !important; }

/* Style spécifique pour le texte d'en-tête (Alkatra) */
.alkatra-title {
    font-family: "Alkatra", system-ui;
    color: var(--mt-dark);
}


    /* On ne garde que le strict nécessaire non-géré par Bootstrap 
    .hero-tickets {
        background-image: linear-gradient(to bottom, rgba(22, 45, 70, 1) 10%, rgba(22, 45, 70, 0.7) 50%, rgba(240, 245, 240, 0.5) 100%), url('/images/banniere.webp'); 
        background-position: center bottom;
        background-size: cover;
    }
    .hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: pointer; }
    .hover-lift:hover { transform: translateY(-5px); box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important; }
    
    .border-etat-0 { border-left: 5px solid #dc3545 !important; }
    .border-etat-1 { border-left: 5px solid #ffc107 !important; }
    .border-etat-2 { border-left: 5px solid #198754 !important; }
*/

/* --- Style de la carte Détails (Gauche) --- */
.ticket-details-box {
    background: #f8fafd;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--mt-yellow); /* Rappel de la couleur Clôture */
}

.detail-item {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 8px;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
    color: #64748b;
    display: block;
}

.detail-value {
    color: #162d46;
    font-weight: 600;
}

/* --- Correction Contraste Summernote Client --- */

/* Force le texte en blanc pour les bulles du client, en ignorant le style de Summernote */
.msg-client .bubble,
.msg-client .bubble * {
    color: #ffffff !important;
}


/* --- Vignette miniature pour pièces jointes --- */

.img-preview-sm {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    border: 2px solid #eee !important;
    margin-top: 10px;
    display: inline-block;
}

.img-preview-sm:hover {
    border-color: #162d46;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.attachment-label {
    display: block;
    font-size: 0.7rem;
    font-weight: bold;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 15px;
}

.alert-info {
    transition: transform 0.2s ease;
}

.alert-info:hover {
    transform: scale(1.01);
}

.bi-lightbulb-fill {
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-yellow {
    0% { color: #0d6efd; }
    50% { color: #ffc107; }
    100% { color: #0d6efd; }
}