/* ============================================
   COMPOSANTS WEBSOCKET & RECHERCHE TEMPS RÉEL
   ============================================ */

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: #2C2F33;
    color: #FFFFFF;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: all;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid #3498db;
}

.toast.success { border-left-color: #57F287; }
.toast.error { border-left-color: #ED4245; }
.toast.warning { border-left-color: #FEE75C; }
.toast.info { border-left-color: #5865F2; }

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Recherche Temps Réel */
.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.search-input-wrapper input:focus {
    border-color: #e74c3c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #999;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 4px;
    display: none;
    transition: color 0.2s;
}

.search-clear:hover {
    color: #e74c3c;
}

.search-input-wrapper input:not(:placeholder-shown) + .search-icon + .search-clear {
    display: block;
}

.search-loading,
.search-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.search-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-no-results i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 1rem;
}

/* Dossier Card avec Highlights */
.dossier-card mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.search-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.dossier-allergies {
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .toast {
        min-width: 280px;
        font-size: 14px;
    }
    
    .toast-container {
        right: 10px;
        top: 10px;
    }
}
